book-index-ui 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -6
- package/dist/index.js +655 -643
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { e as pn, a as
|
|
2
|
-
import { B as
|
|
1
|
+
import { e as pn, a as Ir } from "./storage-entry-DkYsoB3e.js";
|
|
2
|
+
import { B as kc, b as wc, c as _c, d as Ic, f as Cc, C as zc, G as Tc, I as Rc, g as Bc, L as Ec, M as Lc, S as Wc, h as $c, i as Ac, j as Pc, k as jc, l as Mc, m as Hc, n as Oc, o as Dc, p as Nc, q as Fc, r as Vc, s as Gc, t as Yc, u as Uc, v as Kc } from "./storage-entry-DkYsoB3e.js";
|
|
3
3
|
import { jsx as t, jsxs as a, Fragment as P } from "react/jsx-runtime";
|
|
4
4
|
import Xe, { createContext as Wi, useMemo as q, useContext as At, useState as R, useEffect as M, useCallback as U, useRef as de } from "react";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { createPortal as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
5
|
+
import Cr from "react-markdown";
|
|
6
|
+
import zr from "remark-gfm";
|
|
7
|
+
import { createPortal as Tr } from "react-dom";
|
|
8
|
+
const Rr = (e) => `/book-index?id=${e}`, $i = Wi(Rr);
|
|
9
|
+
function cc({ buildUrl: e, children: n }) {
|
|
10
10
|
const i = q(() => e, [e]);
|
|
11
11
|
return /* @__PURE__ */ t($i.Provider, { value: i, children: n });
|
|
12
12
|
}
|
|
@@ -16,7 +16,7 @@ function Ce() {
|
|
|
16
16
|
function Ze(e) {
|
|
17
17
|
return e.types && e.types.length > 0 ? e.types : e.type ? e.type === "text+image" ? ["text", "image"] : [e.type] : [];
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Br(e, n) {
|
|
20
20
|
return Ze(e).includes(n);
|
|
21
21
|
}
|
|
22
22
|
const Ai = {
|
|
@@ -24,12 +24,12 @@ const Ai = {
|
|
|
24
24
|
fine: "精校",
|
|
25
25
|
rough: "粗校",
|
|
26
26
|
ocr: "機器識別"
|
|
27
|
-
},
|
|
27
|
+
}, Er = {
|
|
28
28
|
published: "達到出版、學術研究標準,錯誤率在萬分之一以內",
|
|
29
29
|
fine: "通讀無障礙,錯誤率在百分之一以內",
|
|
30
30
|
rough: "保證文意基本正確,錯誤率在百分之三以內",
|
|
31
31
|
ocr: "保持大意和結構,錯誤率在百分之十以內"
|
|
32
|
-
},
|
|
32
|
+
}, Lr = {
|
|
33
33
|
published: "#1b5e20",
|
|
34
34
|
fine: "#2e7d32",
|
|
35
35
|
rough: "#1565c0",
|
|
@@ -328,7 +328,7 @@ const Ai = {
|
|
|
328
328
|
textResource: "文字資源",
|
|
329
329
|
imageResource: "圖片資源"
|
|
330
330
|
}
|
|
331
|
-
},
|
|
331
|
+
}, Wr = {
|
|
332
332
|
indexType: { work: "作品", book: "书籍", collection: "丛编", entity: "人物" },
|
|
333
333
|
resourceType: { text: "文字资源", image: "图片资源", textImage: "文字+图片资源", physical: "馆藏" },
|
|
334
334
|
resourceTypeShort: { text: "文字", image: "图片", textImage: "文字+图片", physical: "馆藏" },
|
|
@@ -622,32 +622,32 @@ const Ai = {
|
|
|
622
622
|
textResource: "文字资源",
|
|
623
623
|
imageResource: "图片资源"
|
|
624
624
|
}
|
|
625
|
-
},
|
|
625
|
+
}, $r = {
|
|
626
626
|
"zh-Hant": Pi,
|
|
627
|
-
"zh-Hans":
|
|
627
|
+
"zh-Hans": Wr
|
|
628
628
|
}, ji = "bim-locale";
|
|
629
|
-
function
|
|
629
|
+
function Ar() {
|
|
630
630
|
try {
|
|
631
631
|
const e = localStorage.getItem(ji);
|
|
632
632
|
if (e === "zh-Hant" || e === "zh-Hans") return e;
|
|
633
633
|
} catch {
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function Pr(e) {
|
|
637
637
|
try {
|
|
638
638
|
localStorage.setItem(ji, e);
|
|
639
639
|
} catch {
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
const
|
|
642
|
+
const jr = "zh-Hans", dc = ({
|
|
643
643
|
locale: e,
|
|
644
644
|
onLocaleChange: n,
|
|
645
645
|
children: i
|
|
646
646
|
}) => {
|
|
647
|
-
const [r, l] = R(e ??
|
|
647
|
+
const [r, l] = R(e ?? jr), o = e ?? r;
|
|
648
648
|
M(() => {
|
|
649
649
|
if (e) return;
|
|
650
|
-
const u =
|
|
650
|
+
const u = Ar();
|
|
651
651
|
u && u !== r && l(u);
|
|
652
652
|
}, []);
|
|
653
653
|
const [c, d] = R(null);
|
|
@@ -660,11 +660,11 @@ const Ar = "zh-Hans", cc = ({
|
|
|
660
660
|
}) : d(null);
|
|
661
661
|
}, [o]);
|
|
662
662
|
const s = U((u) => {
|
|
663
|
-
l(u),
|
|
663
|
+
l(u), Pr(u), n == null || n(u);
|
|
664
664
|
}, [n]), p = q(() => ({
|
|
665
665
|
locale: o,
|
|
666
666
|
setLocale: s,
|
|
667
|
-
messages:
|
|
667
|
+
messages: $r[o],
|
|
668
668
|
converter: c
|
|
669
669
|
}), [o, s, c]);
|
|
670
670
|
return /* @__PURE__ */ t(Pt.Provider, { value: p, children: i });
|
|
@@ -673,7 +673,7 @@ function Y() {
|
|
|
673
673
|
const e = At(Pt);
|
|
674
674
|
return (e == null ? void 0 : e.messages) ?? Pi;
|
|
675
675
|
}
|
|
676
|
-
const
|
|
676
|
+
const Mr = 2e3;
|
|
677
677
|
function N() {
|
|
678
678
|
const e = At(Pt), n = (e == null ? void 0 : e.locale) ?? "zh-Hant", i = (e == null ? void 0 : e.converter) ?? null, r = de(/* @__PURE__ */ new Map()), l = de(n);
|
|
679
679
|
l.current !== n && (r.current.clear(), l.current = n);
|
|
@@ -683,7 +683,7 @@ function N() {
|
|
|
683
683
|
const d = r.current.get(c);
|
|
684
684
|
if (d !== void 0) return d;
|
|
685
685
|
const s = i(c);
|
|
686
|
-
if (r.current.size >=
|
|
686
|
+
if (r.current.size >= Mr) {
|
|
687
687
|
const p = r.current.keys().next().value;
|
|
688
688
|
p !== void 0 && r.current.delete(p);
|
|
689
689
|
}
|
|
@@ -698,7 +698,7 @@ function N() {
|
|
|
698
698
|
function jt(e, n) {
|
|
699
699
|
return e.replace(/\{(\w+)\}/g, (i, r) => String(n[r] ?? ""));
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function Hr(e) {
|
|
702
702
|
if (!e) return "";
|
|
703
703
|
try {
|
|
704
704
|
const n = new URL(e).hostname, i = {
|
|
@@ -717,7 +717,7 @@ function jr(e) {
|
|
|
717
717
|
return "";
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function Or() {
|
|
721
721
|
return { id: "", name: "", url: "", type: "text", details: "" };
|
|
722
722
|
}
|
|
723
723
|
const En = ({
|
|
@@ -740,14 +740,14 @@ const En = ({
|
|
|
740
740
|
const S = Ze(m);
|
|
741
741
|
return l === "text" ? S.includes("text") : l === "image" ? S.includes("image") || S.includes("physical") : l === "physical" ? S.includes("physical") : S.includes(l);
|
|
742
742
|
}, g = e.map((m, S) => ({ item: m, originalIndex: S })).filter(({ item: m }) => u(m)), h = () => {
|
|
743
|
-
const m =
|
|
743
|
+
const m = Or();
|
|
744
744
|
l && (m.type = l), n([...e, m]), d(e.length);
|
|
745
745
|
}, f = (m) => {
|
|
746
746
|
n(e.filter((S, _) => _ !== m)), d(null);
|
|
747
747
|
}, x = (m, S, _) => {
|
|
748
748
|
const w = [...e];
|
|
749
749
|
if (w[m] = { ...w[m], [S]: _ }, S === "url" && !w[m].id) {
|
|
750
|
-
const C =
|
|
750
|
+
const C = Hr(_);
|
|
751
751
|
C && (w[m].id = C);
|
|
752
752
|
}
|
|
753
753
|
n(w);
|
|
@@ -791,7 +791,7 @@ const En = ({
|
|
|
791
791
|
fontSize: "11px",
|
|
792
792
|
padding: "1px 6px",
|
|
793
793
|
borderRadius: "3px",
|
|
794
|
-
background:
|
|
794
|
+
background: Dr(m.type ?? "text"),
|
|
795
795
|
color: "#fff"
|
|
796
796
|
}, children: (() => {
|
|
797
797
|
var I, B;
|
|
@@ -811,7 +811,7 @@ const En = ({
|
|
|
811
811
|
children: "🔗"
|
|
812
812
|
}
|
|
813
813
|
),
|
|
814
|
-
i && m.url &&
|
|
814
|
+
i && m.url && Nr(S, r == null ? void 0 : r[S], i, o),
|
|
815
815
|
/* @__PURE__ */ t(
|
|
816
816
|
"button",
|
|
817
817
|
{
|
|
@@ -834,7 +834,7 @@ const En = ({
|
|
|
834
834
|
}
|
|
835
835
|
),
|
|
836
836
|
c === S && /* @__PURE__ */ a("div", { style: { padding: "12px", borderTop: "1px solid var(--bim-widget-border, #e0e0e0)" }, children: [
|
|
837
|
-
|
|
837
|
+
Br(m, "image") && m.url && Fr(m, o),
|
|
838
838
|
/* @__PURE__ */ a("div", { style: { display: "grid", gap: "8px" }, children: [
|
|
839
839
|
/* @__PURE__ */ a("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
840
840
|
/* @__PURE__ */ a("label", { style: ft, children: [
|
|
@@ -994,7 +994,7 @@ const En = ({
|
|
|
994
994
|
)
|
|
995
995
|
] });
|
|
996
996
|
};
|
|
997
|
-
function
|
|
997
|
+
function Dr(e) {
|
|
998
998
|
switch (e) {
|
|
999
999
|
case "text":
|
|
1000
1000
|
return "var(--bim-restype-text, #2196f3)";
|
|
@@ -1006,7 +1006,7 @@ function Hr(e) {
|
|
|
1006
1006
|
return "var(--bim-restype-physical, #795548)";
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function Nr(e, n, i, r) {
|
|
1010
1010
|
const l = (n == null ? void 0 : n.status) === "downloading", o = (n == null ? void 0 : n.status) === "completed";
|
|
1011
1011
|
return /* @__PURE__ */ t(
|
|
1012
1012
|
"button",
|
|
@@ -1029,7 +1029,7 @@ function Or(e, n, i, r) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
);
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function Fr(e, n) {
|
|
1033
1033
|
const i = /\.(jpg|jpeg|png|gif|webp|svg)$/i.test(e.url) || e.url.includes("iiif") || e.url.includes("image");
|
|
1034
1034
|
return /* @__PURE__ */ t("div", { style: { marginBottom: "12px" }, children: i ? /* @__PURE__ */ t("div", { style: { width: "100%", maxHeight: "150px", overflow: "hidden", borderRadius: "4px", background: "var(--bim-overlay-bg, #00000010)" }, children: /* @__PURE__ */ t(
|
|
1035
1035
|
"img",
|
|
@@ -1060,7 +1060,7 @@ const $e = {
|
|
|
1060
1060
|
fontSize: "12px",
|
|
1061
1061
|
color: "var(--bim-desc-fg, #717171)",
|
|
1062
1062
|
whiteSpace: "nowrap"
|
|
1063
|
-
},
|
|
1063
|
+
}, Vr = {
|
|
1064
1064
|
"commons.wikimedia.org": "維基共享",
|
|
1065
1065
|
"zh.wikisource.org": "維基文庫",
|
|
1066
1066
|
"taiwanebook.ncl.edu.tw": "臺灣華文電子書庫",
|
|
@@ -1071,7 +1071,7 @@ const $e = {
|
|
|
1071
1071
|
};
|
|
1072
1072
|
function Lt(e) {
|
|
1073
1073
|
try {
|
|
1074
|
-
return
|
|
1074
|
+
return Vr[new URL(e).hostname];
|
|
1075
1075
|
} catch {
|
|
1076
1076
|
return;
|
|
1077
1077
|
}
|
|
@@ -1118,11 +1118,11 @@ function Oi(e) {
|
|
|
1118
1118
|
for (const [n, i] of Object.entries(e))
|
|
1119
1119
|
if (n.endsWith("_url") && typeof i == "string") return i;
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function Gr(e) {
|
|
1122
1122
|
return !Array.isArray(e.volumes) || e.volumes.length === 0 ? null : e.volumes.map((n) => ({ ...n, url: n.url || Oi(n) }));
|
|
1123
1123
|
}
|
|
1124
1124
|
function Di(e) {
|
|
1125
|
-
const n =
|
|
1125
|
+
const n = Gr(e);
|
|
1126
1126
|
if (!n) return null;
|
|
1127
1127
|
const i = new Set(n.filter((l) => l.status !== "missing").map((l) => l.volume)).size, r = new Set(n.filter((l) => l.status === "missing").map((l) => l.volume)).size;
|
|
1128
1128
|
return { found: i, missing: r, expected: e.expected_volumes ?? i + r };
|
|
@@ -1159,7 +1159,7 @@ const Wn = {
|
|
|
1159
1159
|
"text+image": "var(--bim-restype-text-image, #9c27b0)",
|
|
1160
1160
|
physical: "var(--bim-restype-physical, #795548)"
|
|
1161
1161
|
};
|
|
1162
|
-
function
|
|
1162
|
+
function Yr(e) {
|
|
1163
1163
|
return e.includes("text") && e.includes("image") ? Wn["text+image"] : Wn[e[0] || "physical"];
|
|
1164
1164
|
}
|
|
1165
1165
|
const Vi = ({
|
|
@@ -1218,7 +1218,7 @@ const Vi = ({
|
|
|
1218
1218
|
return /* @__PURE__ */ a("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: [
|
|
1219
1219
|
[...s.entries()].map(([b, k]) => h(b, k)),
|
|
1220
1220
|
y.map((b) => {
|
|
1221
|
-
const k = f.get(b), m =
|
|
1221
|
+
const k = f.get(b), m = Yr(b.split("+"));
|
|
1222
1222
|
return /* @__PURE__ */ a("div", { style: { display: "flex", alignItems: "baseline", gap: "8px", flexWrap: "wrap" }, children: [
|
|
1223
1223
|
/* @__PURE__ */ t("span", { style: {
|
|
1224
1224
|
fontSize: "11px",
|
|
@@ -1231,7 +1231,7 @@ const Vi = ({
|
|
|
1231
1231
|
] }, b);
|
|
1232
1232
|
})
|
|
1233
1233
|
] });
|
|
1234
|
-
},
|
|
1234
|
+
}, Ur = {
|
|
1235
1235
|
bw: {
|
|
1236
1236
|
label: "",
|
|
1237
1237
|
bg: "var(--bim-colormode-bw-bg, #f5f5f5)",
|
|
@@ -1243,7 +1243,7 @@ const Vi = ({
|
|
|
1243
1243
|
fg: "var(--bim-colormode-color-fg, #f57f17)"
|
|
1244
1244
|
}
|
|
1245
1245
|
}, Gt = ({ item: e }) => {
|
|
1246
|
-
const n = Y(), { convert: i } = N(), [r, l] = R(!1), o = q(() => (e.url ? Lt(e.url) : void 0) || i(e.name), [e.url, e.name, i]), c = q(() => !Array.isArray(e.volumes) || e.volumes.length === 0 ? null : e.volumes.map((x) => ({ ...x, url: x.url || Oi(x) })), [e.volumes]), d = c && c.length > 0, s = d ? new Set(c.filter((x) => x.status !== "missing").map((x) => x.volume)).size : 0, p = d ? new Set(c.filter((x) => x.status === "missing").map((x) => x.volume)).size : 0, u = e.expected_volumes ?? (d ? s + p : 0), g = e.color_mode ? { ...
|
|
1246
|
+
const n = Y(), { convert: i } = N(), [r, l] = R(!1), o = q(() => (e.url ? Lt(e.url) : void 0) || i(e.name), [e.url, e.name, i]), c = q(() => !Array.isArray(e.volumes) || e.volumes.length === 0 ? null : e.volumes.map((x) => ({ ...x, url: x.url || Oi(x) })), [e.volumes]), d = c && c.length > 0, s = d ? new Set(c.filter((x) => x.status !== "missing").map((x) => x.volume)).size : 0, p = d ? new Set(c.filter((x) => x.status === "missing").map((x) => x.volume)).size : 0, u = e.expected_volumes ?? (d ? s + p : 0), g = e.color_mode ? { ...Ur[e.color_mode], label: n.colorMode[e.color_mode] } : null, h = e.details && !d ? i(e.details) : null;
|
|
1247
1247
|
return /* @__PURE__ */ a("div", { style: { display: "inline-flex", flexDirection: "column", gap: "4px" }, children: [
|
|
1248
1248
|
/* @__PURE__ */ a("div", { style: {
|
|
1249
1249
|
display: "inline-flex",
|
|
@@ -1336,7 +1336,7 @@ const Vi = ({
|
|
|
1336
1336
|
}, children: x.volume }, x.volume);
|
|
1337
1337
|
}) })
|
|
1338
1338
|
] });
|
|
1339
|
-
},
|
|
1339
|
+
}, Kr = ({
|
|
1340
1340
|
indexSource: e,
|
|
1341
1341
|
syncConfig: n,
|
|
1342
1342
|
variant: i = "index-browser",
|
|
@@ -1475,27 +1475,27 @@ function yt() {
|
|
|
1475
1475
|
return [];
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function Jr(e) {
|
|
1479
1479
|
try {
|
|
1480
1480
|
const n = yt().filter((i) => i !== e);
|
|
1481
1481
|
n.unshift(e), n.length > $n && (n.length = $n), localStorage.setItem(Mt, JSON.stringify(n));
|
|
1482
1482
|
} catch {
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1485
|
+
function qr(e) {
|
|
1486
1486
|
try {
|
|
1487
1487
|
const n = yt().filter((i) => i !== e);
|
|
1488
1488
|
localStorage.setItem(Mt, JSON.stringify(n));
|
|
1489
1489
|
} catch {
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1492
|
+
function Xr() {
|
|
1493
1493
|
try {
|
|
1494
1494
|
localStorage.removeItem(Mt);
|
|
1495
1495
|
} catch {
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
|
-
const
|
|
1498
|
+
const Zr = ({
|
|
1499
1499
|
transport: e,
|
|
1500
1500
|
value: n,
|
|
1501
1501
|
onChange: i,
|
|
@@ -1559,7 +1559,7 @@ const qr = ({
|
|
|
1559
1559
|
return document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v);
|
|
1560
1560
|
}, []);
|
|
1561
1561
|
const w = U((v) => {
|
|
1562
|
-
v.trim() && (
|
|
1562
|
+
v.trim() && (Jr(v.trim()), b(yt())), r(v), u(!1);
|
|
1563
1563
|
}, [r]), C = U((v) => {
|
|
1564
1564
|
v.type === "history" ? (i(v.text), w(v.text)) : v.entry && (l ? (l(v.entry), u(!1)) : (i(v.text), w(v.text)));
|
|
1565
1565
|
}, [i, w, l]), T = U((v) => {
|
|
@@ -1582,9 +1582,9 @@ const qr = ({
|
|
|
1582
1582
|
break;
|
|
1583
1583
|
}
|
|
1584
1584
|
}, [p, g, f, n, w, C]), I = U((v, L) => {
|
|
1585
|
-
L.stopPropagation(),
|
|
1585
|
+
L.stopPropagation(), qr(v), b(yt()), h((E) => E.filter((D) => !(D.type === "history" && D.text === v)));
|
|
1586
1586
|
}, []), B = U((v) => {
|
|
1587
|
-
v.stopPropagation(),
|
|
1587
|
+
v.stopPropagation(), Xr(), b([]), h([]);
|
|
1588
1588
|
}, []);
|
|
1589
1589
|
M(() => {
|
|
1590
1590
|
if (f >= 0 && m.current) {
|
|
@@ -1718,7 +1718,7 @@ const qr = ({
|
|
|
1718
1718
|
}
|
|
1719
1719
|
)
|
|
1720
1720
|
] });
|
|
1721
|
-
}, kt = "bim-recent-ids", Pn = "bim-recent-entries", jn = 50, Yt = 5,
|
|
1721
|
+
}, kt = "bim-recent-ids", Pn = "bim-recent-entries", jn = 50, Yt = 5, Qr = 50, eo = 200;
|
|
1722
1722
|
function vt() {
|
|
1723
1723
|
try {
|
|
1724
1724
|
const e = localStorage.getItem(kt);
|
|
@@ -1733,27 +1733,27 @@ function vt() {
|
|
|
1733
1733
|
return [];
|
|
1734
1734
|
}
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1736
|
+
function to(e) {
|
|
1737
1737
|
try {
|
|
1738
1738
|
const n = vt().filter((i) => i !== e);
|
|
1739
1739
|
n.unshift(e), n.length > jn && (n.length = jn), localStorage.setItem(kt, JSON.stringify(n));
|
|
1740
1740
|
} catch {
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function no(e) {
|
|
1744
1744
|
try {
|
|
1745
1745
|
const n = vt().filter((i) => i !== e);
|
|
1746
1746
|
localStorage.setItem(kt, JSON.stringify(n));
|
|
1747
1747
|
} catch {
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function io() {
|
|
1751
1751
|
try {
|
|
1752
1752
|
localStorage.removeItem(kt);
|
|
1753
1753
|
} catch {
|
|
1754
1754
|
}
|
|
1755
1755
|
}
|
|
1756
|
-
const
|
|
1756
|
+
const ro = {
|
|
1757
1757
|
works: "totalWorks",
|
|
1758
1758
|
books: "totalBooks",
|
|
1759
1759
|
collections: "totalCollections",
|
|
@@ -1814,10 +1814,10 @@ const no = {
|
|
|
1814
1814
|
M(() => {
|
|
1815
1815
|
let G = !1;
|
|
1816
1816
|
const ce = () => {
|
|
1817
|
-
var ne,
|
|
1817
|
+
var ne, Ge;
|
|
1818
1818
|
const le = ["work", "book", "collection", "entity"], W = Promise.all(
|
|
1819
1819
|
le.map((we) => e.loadEntries(we, { page: 1, pageSize: 1 }).catch(() => ({ total: 0 })))
|
|
1820
|
-
), re = ((ne = e.getResourceCounts) == null ? void 0 : ne.call(e).catch(() => null)) ?? Promise.resolve(null), ue = ((
|
|
1820
|
+
), re = ((ne = e.getResourceCounts) == null ? void 0 : ne.call(e).catch(() => null)) ?? Promise.resolve(null), ue = ((Ge = e.getSubtypeStats) == null ? void 0 : Ge.call(e).catch(() => null)) ?? Promise.resolve(null);
|
|
1821
1821
|
Promise.all([W, re, ue]).then(([we, ve, ut]) => {
|
|
1822
1822
|
G || ($({
|
|
1823
1823
|
works: we[0].total,
|
|
@@ -1854,11 +1854,11 @@ const no = {
|
|
|
1854
1854
|
}
|
|
1855
1855
|
K.current && clearTimeout(K.current), K.current = setTimeout(() => {
|
|
1856
1856
|
C(null), f == null || f(G), he(G);
|
|
1857
|
-
},
|
|
1857
|
+
}, eo);
|
|
1858
1858
|
}, [he, f]), Se = U((G) => {
|
|
1859
1859
|
K.current && clearTimeout(K.current), f == null || f(G), he(G);
|
|
1860
1860
|
}, [he, f]), pe = U((G) => {
|
|
1861
|
-
C(G), he(k,
|
|
1861
|
+
C(G), he(k, Qr);
|
|
1862
1862
|
}, [k, he]);
|
|
1863
1863
|
M(() => {
|
|
1864
1864
|
if (!j.length) {
|
|
@@ -1898,11 +1898,11 @@ const no = {
|
|
|
1898
1898
|
};
|
|
1899
1899
|
}, [j, e]);
|
|
1900
1900
|
const ke = (G) => {
|
|
1901
|
-
z(G.id),
|
|
1901
|
+
z(G.id), to(G.id), V(vt()), r == null || r(G);
|
|
1902
1902
|
}, Ee = (G) => {
|
|
1903
|
-
|
|
1903
|
+
no(G), V(vt());
|
|
1904
1904
|
}, Le = () => {
|
|
1905
|
-
|
|
1905
|
+
io(), V([]);
|
|
1906
1906
|
}, tt = (G) => b.find((ce) => ce.type === G), pt = S && (S.works.length > 0 || S.books.length > 0 || S.collections.length > 0);
|
|
1907
1907
|
return /* @__PURE__ */ a("div", { className: "bim-browser-container", children: [
|
|
1908
1908
|
/* @__PURE__ */ t("header", { style: { padding: "12px 20px", borderBottom: "1px solid var(--bim-widget-border, #e0e0e0)" }, children: /* @__PURE__ */ a("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
@@ -1910,7 +1910,7 @@ const no = {
|
|
|
1910
1910
|
/* @__PURE__ */ a("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1911
1911
|
x,
|
|
1912
1912
|
!p && /* @__PURE__ */ t(
|
|
1913
|
-
|
|
1913
|
+
Kr,
|
|
1914
1914
|
{
|
|
1915
1915
|
variant: "index-browser",
|
|
1916
1916
|
indexSource: n,
|
|
@@ -1925,7 +1925,7 @@ const no = {
|
|
|
1925
1925
|
] }) }),
|
|
1926
1926
|
/* @__PURE__ */ a("div", { style: { display: "flex", gap: "8px", padding: "12px 20px", alignItems: "center" }, children: [
|
|
1927
1927
|
/* @__PURE__ */ t(
|
|
1928
|
-
|
|
1928
|
+
Zr,
|
|
1929
1929
|
{
|
|
1930
1930
|
transport: e,
|
|
1931
1931
|
value: k,
|
|
@@ -2037,7 +2037,7 @@ const no = {
|
|
|
2037
2037
|
)
|
|
2038
2038
|
] }),
|
|
2039
2039
|
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: H.slice(0, X ? 10 : 3).map((G) => G.notFound ? /* @__PURE__ */ t(
|
|
2040
|
-
|
|
2040
|
+
lo,
|
|
2041
2041
|
{
|
|
2042
2042
|
id: G.id,
|
|
2043
2043
|
onRemove: Ee,
|
|
@@ -2081,7 +2081,7 @@ const no = {
|
|
|
2081
2081
|
) : pt ? (
|
|
2082
2082
|
/* Grouped search results */
|
|
2083
2083
|
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: b.map(({ type: G, icon: ce, name: le, key: W }) => {
|
|
2084
|
-
const re = S[W] ?? [], ue =
|
|
2084
|
+
const re = S[W] ?? [], ue = ro[W], ne = S[ue] ?? 0;
|
|
2085
2085
|
if (re.length === 0) return null;
|
|
2086
2086
|
const we = !(w === G) && ne > Yt;
|
|
2087
2087
|
return /* @__PURE__ */ a("div", { children: [
|
|
@@ -2119,7 +2119,7 @@ const no = {
|
|
|
2119
2119
|
)
|
|
2120
2120
|
] }),
|
|
2121
2121
|
/* @__PURE__ */ t("div", { style: u === "card" ? { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(min(340px, 100%), 1fr))", gap: "14px" } : { display: "flex", flexDirection: "column", gap: "4px" }, children: re.map((ve) => g ? /* @__PURE__ */ t(Xe.Fragment, { children: g(ve) }, ve.id) : /* @__PURE__ */ t(
|
|
2122
|
-
u === "card" ?
|
|
2122
|
+
u === "card" ? oo : Hn,
|
|
2123
2123
|
{
|
|
2124
2124
|
entry: ve,
|
|
2125
2125
|
selected: B === ve.id,
|
|
@@ -2137,7 +2137,7 @@ const no = {
|
|
|
2137
2137
|
/* @__PURE__ */ t("p", { style: { color: "var(--bim-desc-fg, #717171)", fontSize: "13px" }, children: y.search.tryOther })
|
|
2138
2138
|
] }) })
|
|
2139
2139
|
] });
|
|
2140
|
-
},
|
|
2140
|
+
}, oo = ({ entry: e, selected: n, onClick: i, getConfig: r, query: l }) => {
|
|
2141
2141
|
const o = Y(), { convert: c } = N(), d = c(e.title || e.primary_name || e.id), s = e.measure_info ? c(e.measure_info) : e.juan_count != null && e.juan_count > 0 ? `${e.juan_count}${o.unit.juan}` : "", p = [...e.additional_titles || [], ...e.attached_texts || []], u = l && p.length ? p.find((h) => {
|
|
2142
2142
|
const f = typeof h == "string" ? h : h == null ? void 0 : h.book_title;
|
|
2143
2143
|
return f == null ? void 0 : f.toLowerCase().includes(l.toLowerCase());
|
|
@@ -2368,7 +2368,7 @@ const no = {
|
|
|
2368
2368
|
]
|
|
2369
2369
|
}
|
|
2370
2370
|
);
|
|
2371
|
-
},
|
|
2371
|
+
}, lo = ({ id: e, onRemove: n, t: i }) => /* @__PURE__ */ a(
|
|
2372
2372
|
"div",
|
|
2373
2373
|
{
|
|
2374
2374
|
style: {
|
|
@@ -2407,11 +2407,11 @@ const no = {
|
|
|
2407
2407
|
]
|
|
2408
2408
|
}
|
|
2409
2409
|
);
|
|
2410
|
-
function
|
|
2410
|
+
function ao(e) {
|
|
2411
2411
|
var n;
|
|
2412
2412
|
return !e.dynasty && !e.birth_year && !e.death_year && (!e.alt_names || e.alt_names.length === 0) && !((n = e.description) != null && n.text);
|
|
2413
2413
|
}
|
|
2414
|
-
function
|
|
2414
|
+
function so({ data: e }) {
|
|
2415
2415
|
const { convert: n } = N(), { dynasty: i, birth_year: r, death_year: l } = e, o = [];
|
|
2416
2416
|
return i && o.push(`〔${n(i)}〕`), r !== void 0 && l !== void 0 ? o.push(`${r}—${l}`) : r !== void 0 ? o.push(`${r}—?`) : l !== void 0 && o.push(`?—${l}`), o.length === 0 ? null : /* @__PURE__ */ t("span", { style: {
|
|
2417
2417
|
fontSize: "14px",
|
|
@@ -2420,7 +2420,7 @@ function lo({ data: e }) {
|
|
|
2420
2420
|
fontWeight: "normal"
|
|
2421
2421
|
}, children: o.join(" ") });
|
|
2422
2422
|
}
|
|
2423
|
-
function
|
|
2423
|
+
function co({ alt_names: e }) {
|
|
2424
2424
|
const { convert: n } = N(), i = /* @__PURE__ */ new Map();
|
|
2425
2425
|
for (const o of e) {
|
|
2426
2426
|
const c = o.type || "別名";
|
|
@@ -2471,7 +2471,7 @@ function ao({ alt_names: e }) {
|
|
|
2471
2471
|
] }, o);
|
|
2472
2472
|
}) });
|
|
2473
2473
|
}
|
|
2474
|
-
function
|
|
2474
|
+
function po({ data: e }) {
|
|
2475
2475
|
const n = e.external_ids;
|
|
2476
2476
|
if (!n) return null;
|
|
2477
2477
|
const i = [];
|
|
@@ -2508,7 +2508,7 @@ function so({ data: e }) {
|
|
|
2508
2508
|
flexWrap: "wrap"
|
|
2509
2509
|
}, children: i });
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function uo({ works: e, transport: n, onNavigate: i, renderLink: r }) {
|
|
2512
2512
|
const l = Y(), { convert: o } = N(), c = Ce(), [d, s] = R(/* @__PURE__ */ new Map());
|
|
2513
2513
|
M(() => {
|
|
2514
2514
|
if (!n) return;
|
|
@@ -2628,7 +2628,7 @@ function co({ works: e, transport: n, onNavigate: i, renderLink: r }) {
|
|
|
2628
2628
|
})
|
|
2629
2629
|
] });
|
|
2630
2630
|
}
|
|
2631
|
-
const
|
|
2631
|
+
const fo = ({
|
|
2632
2632
|
data: e,
|
|
2633
2633
|
transport: n,
|
|
2634
2634
|
onNavigate: i,
|
|
@@ -2643,7 +2643,7 @@ const po = ({
|
|
|
2643
2643
|
s = pn(e.id) === "draft";
|
|
2644
2644
|
} catch {
|
|
2645
2645
|
}
|
|
2646
|
-
const p =
|
|
2646
|
+
const p = ao(e), u = e.subtype === "people" ? "人物" : e.subtype === "place" ? "地名" : e.subtype === "dynasty" ? "朝代" : e.subtype === "anonymous" ? "佚名" : e.subtype === "collective" ? "集体" : e.subtype;
|
|
2647
2647
|
return /* @__PURE__ */ a("div", { children: [
|
|
2648
2648
|
!o && /* @__PURE__ */ a(P, { children: [
|
|
2649
2649
|
/* @__PURE__ */ a("div", { style: {
|
|
@@ -2661,7 +2661,7 @@ const po = ({
|
|
|
2661
2661
|
color: "var(--bim-fg, #222)"
|
|
2662
2662
|
}, children: [
|
|
2663
2663
|
d(e.primary_name),
|
|
2664
|
-
/* @__PURE__ */ t(
|
|
2664
|
+
/* @__PURE__ */ t(so, { data: e })
|
|
2665
2665
|
] }),
|
|
2666
2666
|
l
|
|
2667
2667
|
] }),
|
|
@@ -2705,8 +2705,8 @@ const po = ({
|
|
|
2705
2705
|
borderRadius: "4px",
|
|
2706
2706
|
margin: "8px 0"
|
|
2707
2707
|
}, children: "人物信息暂缺。该 Entity 仅作为作者占位,详细生平资料尚待补充。" }),
|
|
2708
|
-
e.alt_names && e.alt_names.length > 0 && /* @__PURE__ */ t(
|
|
2709
|
-
/* @__PURE__ */ t(
|
|
2708
|
+
e.alt_names && e.alt_names.length > 0 && /* @__PURE__ */ t(co, { alt_names: e.alt_names }),
|
|
2709
|
+
/* @__PURE__ */ t(po, { data: e }),
|
|
2710
2710
|
((g = e.description) == null ? void 0 : g.text) && /* @__PURE__ */ t("p", { style: {
|
|
2711
2711
|
fontSize: "14px",
|
|
2712
2712
|
color: "var(--bim-fg, #444)",
|
|
@@ -2715,7 +2715,7 @@ const po = ({
|
|
|
2715
2715
|
textAlign: "justify"
|
|
2716
2716
|
}, children: d(e.description.text) }),
|
|
2717
2717
|
e.works && e.works.length > 0 && /* @__PURE__ */ t(
|
|
2718
|
-
|
|
2718
|
+
uo,
|
|
2719
2719
|
{
|
|
2720
2720
|
works: e.works,
|
|
2721
2721
|
transport: n,
|
|
@@ -2745,13 +2745,13 @@ const po = ({
|
|
|
2745
2745
|
borderRadius: 3,
|
|
2746
2746
|
fontSize: "0.92em"
|
|
2747
2747
|
}, children: e })
|
|
2748
|
-
},
|
|
2748
|
+
}, go = {
|
|
2749
2749
|
...Gi,
|
|
2750
2750
|
strong: ({ children: e }) => /* @__PURE__ */ t(P, { children: e })
|
|
2751
|
-
},
|
|
2751
|
+
}, Fe = ({ text: e, plainStrong: n, style: i, className: r }) => {
|
|
2752
2752
|
const { convert: l } = N();
|
|
2753
|
-
return /* @__PURE__ */ t("div", { className: r, style: i, children: /* @__PURE__ */ t(
|
|
2754
|
-
},
|
|
2753
|
+
return /* @__PURE__ */ t("div", { className: r, style: i, children: /* @__PURE__ */ t(Cr, { remarkPlugins: [zr], components: n ? go : Gi, children: l(e) }) });
|
|
2754
|
+
}, ho = ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"], On = ["", "十", "百", "千"];
|
|
2755
2755
|
function Yi(e) {
|
|
2756
2756
|
if (e <= 0) return "";
|
|
2757
2757
|
if (e >= 1e4) return String(e);
|
|
@@ -2759,7 +2759,7 @@ function Yi(e) {
|
|
|
2759
2759
|
let r = "", l = !1;
|
|
2760
2760
|
for (let o = 0; o < i; o++) {
|
|
2761
2761
|
const c = parseInt(n[o]), d = i - 1 - o;
|
|
2762
|
-
c === 0 ? l = !0 : (l && r && (r += "〇"), l = !1, c === 1 && d === 1 && o === 0 ? r += On[d] : r +=
|
|
2762
|
+
c === 0 ? l = !0 : (l && r && (r += "〇"), l = !1, c === 1 && d === 1 && o === 0 ? r += On[d] : r += ho[c] + On[d]);
|
|
2763
2763
|
}
|
|
2764
2764
|
return r;
|
|
2765
2765
|
}
|
|
@@ -2776,21 +2776,21 @@ function Ui(e) {
|
|
|
2776
2776
|
background: `color-mix(in srgb, ${e} 3%, transparent)`
|
|
2777
2777
|
};
|
|
2778
2778
|
}
|
|
2779
|
-
const
|
|
2779
|
+
const mo = {
|
|
2780
2780
|
book: "var(--bim-type-book, #c0392b)",
|
|
2781
2781
|
work: "var(--bim-type-work, #8e6f3e)",
|
|
2782
2782
|
collection: "var(--bim-type-collection, #2471a3)",
|
|
2783
2783
|
entity: "var(--bim-type-entity, #5b3e8e)"
|
|
2784
2784
|
};
|
|
2785
|
-
function
|
|
2785
|
+
function bo({ type: e }) {
|
|
2786
2786
|
const n = Y();
|
|
2787
|
-
return /* @__PURE__ */ t("span", { style: Ui(
|
|
2787
|
+
return /* @__PURE__ */ t("span", { style: Ui(mo[e]), children: n.indexType[e] });
|
|
2788
2788
|
}
|
|
2789
|
-
function
|
|
2789
|
+
function xo({ isDraft: e }) {
|
|
2790
2790
|
const n = Y();
|
|
2791
2791
|
return /* @__PURE__ */ t("span", { style: Ui(e ? "var(--bim-status-draft, #e67e22)" : "var(--bim-status-official, #27ae60)"), children: e ? n.status.draft : n.status.official });
|
|
2792
2792
|
}
|
|
2793
|
-
function
|
|
2793
|
+
function yo({ id: e }) {
|
|
2794
2794
|
const n = Y(), [i, r] = Xe.useState(!1), l = () => {
|
|
2795
2795
|
navigator.clipboard.writeText(e).then(() => {
|
|
2796
2796
|
r(!0), setTimeout(() => r(!1), 1500);
|
|
@@ -2907,7 +2907,7 @@ function Te({ id: e, label: n, onNavigate: i, renderLink: r }) {
|
|
|
2907
2907
|
}
|
|
2908
2908
|
) : /* @__PURE__ */ t("span", { children: n || e });
|
|
2909
2909
|
}
|
|
2910
|
-
function
|
|
2910
|
+
function vo({ id: e, title: n, edition: i, type: r, isDraft: l, authors: o, volumeText: c, meta: d, headerExtra: s, onNavigate: p, renderLink: u }) {
|
|
2911
2911
|
return /* @__PURE__ */ a("div", { style: { marginBottom: "4px" }, children: [
|
|
2912
2912
|
/* @__PURE__ */ a("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: "8px" }, children: [
|
|
2913
2913
|
/* @__PURE__ */ a("h1", { style: {
|
|
@@ -2944,9 +2944,9 @@ function xo({ id: e, title: n, edition: i, type: r, isDraft: l, authors: o, volu
|
|
|
2944
2944
|
flexWrap: "wrap",
|
|
2945
2945
|
marginBottom: "4px"
|
|
2946
2946
|
}, children: [
|
|
2947
|
-
/* @__PURE__ */ t(
|
|
2948
|
-
/* @__PURE__ */ t(
|
|
2949
|
-
/* @__PURE__ */ t(
|
|
2947
|
+
/* @__PURE__ */ t(bo, { type: r }),
|
|
2948
|
+
/* @__PURE__ */ t(xo, { isDraft: l }),
|
|
2949
|
+
/* @__PURE__ */ t(yo, { id: e })
|
|
2950
2950
|
] }),
|
|
2951
2951
|
((o == null ? void 0 : o.length) || d.length > 0) && /* @__PURE__ */ a("div", { style: {
|
|
2952
2952
|
display: "flex",
|
|
@@ -3101,11 +3101,11 @@ function Ji({ items: e, label: n, showMeta: i, onNavigate: r, renderLink: l }) {
|
|
|
3101
3101
|
}) })
|
|
3102
3102
|
] });
|
|
3103
3103
|
}
|
|
3104
|
-
function
|
|
3104
|
+
function So({ items: e, onNavigate: n, renderLink: i }) {
|
|
3105
3105
|
const r = Y();
|
|
3106
3106
|
return /* @__PURE__ */ t(Ji, { items: e, label: r.section.indexed, showMeta: !0, onNavigate: n, renderLink: i });
|
|
3107
3107
|
}
|
|
3108
|
-
function
|
|
3108
|
+
function ko({ items: e, onNavigate: n, renderLink: i }) {
|
|
3109
3109
|
const r = Y();
|
|
3110
3110
|
return /* @__PURE__ */ t(Ji, { items: e, label: r.section.emendated, onNavigate: n, renderLink: i });
|
|
3111
3111
|
}
|
|
@@ -3133,15 +3133,15 @@ function qi({ label: e, items: n }) {
|
|
|
3133
3133
|
}) })
|
|
3134
3134
|
] }) : null;
|
|
3135
3135
|
}
|
|
3136
|
-
function
|
|
3136
|
+
function wo({ items: e }) {
|
|
3137
3137
|
const n = Y();
|
|
3138
3138
|
return /* @__PURE__ */ t(qi, { label: n.section.aliases, items: e });
|
|
3139
3139
|
}
|
|
3140
|
-
function
|
|
3140
|
+
function _o({ items: e }) {
|
|
3141
3141
|
const n = Y();
|
|
3142
3142
|
return /* @__PURE__ */ t(qi, { label: n.section.attachedTexts, items: e });
|
|
3143
3143
|
}
|
|
3144
|
-
function
|
|
3144
|
+
function Io({ items: e }) {
|
|
3145
3145
|
const n = Y(), { convert: i } = N();
|
|
3146
3146
|
return e.length ? /* @__PURE__ */ a(P, { children: [
|
|
3147
3147
|
/* @__PURE__ */ t(_e, { children: n.section.appendix }),
|
|
@@ -3170,7 +3170,7 @@ function wo({ items: e }) {
|
|
|
3170
3170
|
] }, l)) })
|
|
3171
3171
|
] }) : null;
|
|
3172
3172
|
}
|
|
3173
|
-
function
|
|
3173
|
+
function Co({ items: e }) {
|
|
3174
3174
|
const n = Y(), { convert: i } = N();
|
|
3175
3175
|
return e.length ? /* @__PURE__ */ a(P, { children: [
|
|
3176
3176
|
/* @__PURE__ */ t(_e, { children: n.section.locationHistory }),
|
|
@@ -3200,7 +3200,7 @@ function _o({ items: e }) {
|
|
|
3200
3200
|
] })
|
|
3201
3201
|
] }) : null;
|
|
3202
3202
|
}
|
|
3203
|
-
function
|
|
3203
|
+
function zo({ items: e }) {
|
|
3204
3204
|
const n = Y(), { convert: i } = N();
|
|
3205
3205
|
return e.length ? /* @__PURE__ */ a(P, { children: [
|
|
3206
3206
|
/* @__PURE__ */ t(_e, { children: n.section.historyOverview }),
|
|
@@ -3313,7 +3313,7 @@ function Ut({ book: e, onNavigate: n, renderLink: i }) {
|
|
|
3313
3313
|
d && !o && /* @__PURE__ */ t("div", { style: { padding: "10px 14px" }, children: /* @__PURE__ */ t(Vi, { items: e.resources, resourceGroups: e.resource_groups, groupByType: !0, onNavigate: n, renderLink: i }) })
|
|
3314
3314
|
] });
|
|
3315
3315
|
}
|
|
3316
|
-
function
|
|
3316
|
+
function To({ ids: e, workData: n, transport: i, onNavigate: r, renderLink: l, footer: o }) {
|
|
3317
3317
|
const c = Y(), { convert: d } = N(), [s, p] = R([]);
|
|
3318
3318
|
if (M(() => {
|
|
3319
3319
|
if (!e.length) {
|
|
@@ -3341,7 +3341,7 @@ function Co({ ids: e, workData: n, transport: i, onNavigate: r, renderLink: l, f
|
|
|
3341
3341
|
x = !0;
|
|
3342
3342
|
};
|
|
3343
3343
|
}, [e, i]), !e.length) return null;
|
|
3344
|
-
const u = s.length ? s : e.map((x) => ({ id: x })), g = new Map(u.map((x) => [x.id, x])), h = n == null ? void 0 : n.version_graph, f =
|
|
3344
|
+
const u = s.length ? s : e.map((x) => ({ id: x })), g = new Map(u.map((x) => [x.id, x])), h = n == null ? void 0 : n.version_graph, f = Ro(e, h);
|
|
3345
3345
|
return /* @__PURE__ */ a(P, { children: [
|
|
3346
3346
|
/* @__PURE__ */ a(_e, { children: [
|
|
3347
3347
|
c.section.relatedVersions,
|
|
@@ -3387,7 +3387,7 @@ function Co({ ids: e, workData: n, transport: i, onNavigate: r, renderLink: l, f
|
|
|
3387
3387
|
] }) : /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginTop: "12px" }, children: u.map((x) => /* @__PURE__ */ t(Ut, { book: x, onNavigate: r, renderLink: l }, x.id)) })
|
|
3388
3388
|
] });
|
|
3389
3389
|
}
|
|
3390
|
-
function
|
|
3390
|
+
function Ro(e, n) {
|
|
3391
3391
|
var b, k;
|
|
3392
3392
|
if (!n || !n.default_collection || !n.node_groups)
|
|
3393
3393
|
return { useGrouping: !1, coreIds: e, groupedIds: [] };
|
|
@@ -3420,7 +3420,7 @@ function zo(e, n) {
|
|
|
3420
3420
|
});
|
|
3421
3421
|
return h.length > 0 && y.push({ id: "__other__", label: "其他版本", description: void 0, ids: h }), { useGrouping: !0, coreIds: u, groupedIds: y };
|
|
3422
3422
|
}
|
|
3423
|
-
function
|
|
3423
|
+
function Bo({ workData: e, onNavigate: n, renderLink: i }) {
|
|
3424
3424
|
var c, d, s, p;
|
|
3425
3425
|
const r = Y(), { convert: l } = N(), o = !!((c = e.description) != null && c.text) || !!e.parent_work;
|
|
3426
3426
|
return /* @__PURE__ */ a("div", { style: {
|
|
@@ -3458,7 +3458,7 @@ function To({ workData: e, onNavigate: n, renderLink: i }) {
|
|
|
3458
3458
|
] }),
|
|
3459
3459
|
o && /* @__PURE__ */ a("div", { style: { padding: "8px 14px" }, children: [
|
|
3460
3460
|
((s = e.description) == null ? void 0 : s.text) && /* @__PURE__ */ t(
|
|
3461
|
-
|
|
3461
|
+
Fe,
|
|
3462
3462
|
{
|
|
3463
3463
|
text: e.description.text,
|
|
3464
3464
|
style: {
|
|
@@ -3473,7 +3473,7 @@ function To({ workData: e, onNavigate: n, renderLink: i }) {
|
|
|
3473
3473
|
] })
|
|
3474
3474
|
] });
|
|
3475
3475
|
}
|
|
3476
|
-
function
|
|
3476
|
+
function Eo({ items: e, onNavigate: n, renderLink: i }) {
|
|
3477
3477
|
const r = Y(), { convert: l } = N();
|
|
3478
3478
|
return e.length ? /* @__PURE__ */ t("div", { style: {
|
|
3479
3479
|
display: "flex",
|
|
@@ -3572,7 +3572,7 @@ const Xi = ({
|
|
|
3572
3572
|
if (!w) return null;
|
|
3573
3573
|
if (w.type === "entity")
|
|
3574
3574
|
return /* @__PURE__ */ t("div", { className: d, style: s, children: /* @__PURE__ */ t(
|
|
3575
|
-
|
|
3575
|
+
fo,
|
|
3576
3576
|
{
|
|
3577
3577
|
data: w,
|
|
3578
3578
|
transport: i,
|
|
@@ -3599,7 +3599,7 @@ const Xi = ({
|
|
|
3599
3599
|
] }, A)) }, "pws")
|
|
3600
3600
|
), /* @__PURE__ */ a("div", { className: d, style: s, children: [
|
|
3601
3601
|
/* @__PURE__ */ t(
|
|
3602
|
-
|
|
3602
|
+
vo,
|
|
3603
3603
|
{
|
|
3604
3604
|
id: w.id,
|
|
3605
3605
|
title: u(w.title),
|
|
@@ -3615,7 +3615,7 @@ const Xi = ({
|
|
|
3615
3615
|
}
|
|
3616
3616
|
),
|
|
3617
3617
|
((H = w.description) == null ? void 0 : H.text) && /* @__PURE__ */ t(
|
|
3618
|
-
|
|
3618
|
+
Fe,
|
|
3619
3619
|
{
|
|
3620
3620
|
text: w.description.text,
|
|
3621
3621
|
style: {
|
|
@@ -3641,7 +3641,7 @@ const Xi = ({
|
|
|
3641
3641
|
color: "var(--bim-muted, #666)"
|
|
3642
3642
|
}, children: u(A.title) }),
|
|
3643
3643
|
/* @__PURE__ */ t(
|
|
3644
|
-
|
|
3644
|
+
Fe,
|
|
3645
3645
|
{
|
|
3646
3646
|
text: A.text,
|
|
3647
3647
|
plainStrong: !0,
|
|
@@ -3656,23 +3656,23 @@ const Xi = ({
|
|
|
3656
3656
|
] }, X)) }),
|
|
3657
3657
|
S.length > 0 && /* @__PURE__ */ a(P, { children: [
|
|
3658
3658
|
/* @__PURE__ */ t(_e, { children: p.section.containedIn }),
|
|
3659
|
-
/* @__PURE__ */ t(
|
|
3659
|
+
/* @__PURE__ */ t(Eo, { items: S, onNavigate: r, renderLink: l })
|
|
3660
3660
|
] }),
|
|
3661
3661
|
k && /* @__PURE__ */ a(P, { children: [
|
|
3662
3662
|
/* @__PURE__ */ t(_e, { children: p.section.belongsToWork }),
|
|
3663
|
-
/* @__PURE__ */ t(
|
|
3663
|
+
/* @__PURE__ */ t(Bo, { workData: k, onNavigate: r, renderLink: l })
|
|
3664
3664
|
] }),
|
|
3665
|
-
w.additional_works && w.additional_works.length > 0 && /* @__PURE__ */ t(
|
|
3666
|
-
w.additional_titles && w.additional_titles.length > 0 && /* @__PURE__ */ t(
|
|
3667
|
-
w.attached_texts && w.attached_texts.length > 0 && /* @__PURE__ */ t(
|
|
3668
|
-
w.indexed_by && w.indexed_by.length > 0 && /* @__PURE__ */ t(
|
|
3669
|
-
w.emendated_by && w.emendated_by.length > 0 && /* @__PURE__ */ t(
|
|
3665
|
+
w.additional_works && w.additional_works.length > 0 && /* @__PURE__ */ t(Io, { items: w.additional_works }),
|
|
3666
|
+
w.additional_titles && w.additional_titles.length > 0 && /* @__PURE__ */ t(wo, { items: w.additional_titles }),
|
|
3667
|
+
w.attached_texts && w.attached_texts.length > 0 && /* @__PURE__ */ t(_o, { items: w.attached_texts }),
|
|
3668
|
+
w.indexed_by && w.indexed_by.length > 0 && /* @__PURE__ */ t(So, { items: w.indexed_by, onNavigate: r, renderLink: l }),
|
|
3669
|
+
w.emendated_by && w.emendated_by.length > 0 && /* @__PURE__ */ t(ko, { items: w.emendated_by, onNavigate: r, renderLink: l }),
|
|
3670
3670
|
w.resources && w.resources.length > 0 && /* @__PURE__ */ a(P, { children: [
|
|
3671
3671
|
/* @__PURE__ */ t(_e, { children: p.section.resources }),
|
|
3672
3672
|
/* @__PURE__ */ t(Vi, { items: w.resources, resourceGroups: w.resource_groups, groupByType: !0, onNavigate: r, renderLink: l })
|
|
3673
3673
|
] }),
|
|
3674
|
-
(C == null ? void 0 : C.location_history) && C.location_history.length > 0 && /* @__PURE__ */ t(
|
|
3675
|
-
(T == null ? void 0 : T.history) && T.history.length > 0 && /* @__PURE__ */ t(
|
|
3674
|
+
(C == null ? void 0 : C.location_history) && C.location_history.length > 0 && /* @__PURE__ */ t(Co, { items: C.location_history }),
|
|
3675
|
+
(T == null ? void 0 : T.history) && T.history.length > 0 && /* @__PURE__ */ t(zo, { items: T.history }),
|
|
3676
3676
|
(C == null ? void 0 : C.related_books) && C.related_books.length > 0 && /* @__PURE__ */ t(Dn, { title: p.section.relatedVersions, ids: C.related_books, transport: i, onNavigate: r, renderLink: l }),
|
|
3677
3677
|
(T == null ? void 0 : T.books) && T.books.length > 0 && /* @__PURE__ */ t(Dn, { title: p.section.containedBooks, ids: T.books, transport: i, onNavigate: r, renderLink: l }),
|
|
3678
3678
|
(T == null ? void 0 : T.contained_works) && T.contained_works.length > 0 && /* @__PURE__ */ a("div", { children: [
|
|
@@ -3696,7 +3696,7 @@ const Xi = ({
|
|
|
3696
3696
|
}, children: /* @__PURE__ */ t(Te, { id: A.id, label: u(A.title), onNavigate: r, renderLink: l }) }, A.id)) })
|
|
3697
3697
|
] }),
|
|
3698
3698
|
(((O = I == null ? void 0 : I.books) == null ? void 0 : O.length) || 0) + (((ee = I == null ? void 0 : I.collections) == null ? void 0 : ee.length) || 0) > 0 && /* @__PURE__ */ t(
|
|
3699
|
-
|
|
3699
|
+
To,
|
|
3700
3700
|
{
|
|
3701
3701
|
ids: [...(I == null ? void 0 : I.books) || [], ...(I == null ? void 0 : I.collections) || []],
|
|
3702
3702
|
workData: I,
|
|
@@ -3731,7 +3731,7 @@ const Xi = ({
|
|
|
3731
3731
|
})()
|
|
3732
3732
|
] });
|
|
3733
3733
|
};
|
|
3734
|
-
function
|
|
3734
|
+
function Lo({ data: e }) {
|
|
3735
3735
|
const n = Y(), { convert: i } = N(), { stats: r } = e, l = r.processed_volumes ?? r.total_found_volumes, o = l != null && e.total_volumes > 0 ? Math.round(l / e.total_volumes * 100) : null;
|
|
3736
3736
|
return /* @__PURE__ */ a("div", { style: { marginBottom: "24px" }, children: [
|
|
3737
3737
|
/* @__PURE__ */ t("h2", { style: {
|
|
@@ -3794,7 +3794,7 @@ function Bo({ data: e }) {
|
|
|
3794
3794
|
] })
|
|
3795
3795
|
] });
|
|
3796
3796
|
}
|
|
3797
|
-
function
|
|
3797
|
+
function Wo({
|
|
3798
3798
|
sections: e,
|
|
3799
3799
|
activeSection: n,
|
|
3800
3800
|
onSelect: i
|
|
@@ -3848,7 +3848,7 @@ function Nn(e) {
|
|
|
3848
3848
|
fontWeight: e ? 600 : 400
|
|
3849
3849
|
};
|
|
3850
3850
|
}
|
|
3851
|
-
function
|
|
3851
|
+
function $o({ id: e, label: n, onNavigate: i, renderLink: r }) {
|
|
3852
3852
|
const l = Ce();
|
|
3853
3853
|
return r ? /* @__PURE__ */ t(P, { children: r(e, n) }) : i ? /* @__PURE__ */ t(
|
|
3854
3854
|
"a",
|
|
@@ -3871,14 +3871,14 @@ function Lo({ id: e, label: n, onNavigate: i, renderLink: r }) {
|
|
|
3871
3871
|
}
|
|
3872
3872
|
) : /* @__PURE__ */ t("span", { style: { fontSize: "12px", color: "var(--bim-desc-fg, #999)" }, children: n || e });
|
|
3873
3873
|
}
|
|
3874
|
-
function
|
|
3874
|
+
function Ao(e, n) {
|
|
3875
3875
|
if (e.length === 0) return "";
|
|
3876
3876
|
if (e.length === 1) return `${e[0]}`;
|
|
3877
3877
|
const i = e[0], r = e[e.length - 1];
|
|
3878
3878
|
return r - i + 1 === e.length ? `${i}–${r}` : e.length <= 3 ? e.join(", ") : `${i}–${r} (${e.length}${n})`;
|
|
3879
3879
|
}
|
|
3880
3880
|
function Fn({ book: e, onNavigate: n, renderLink: i, showVolumes: r }) {
|
|
3881
|
-
const l = Y(), { convert: o } = N(), c = e.book_id || e.work_id, d = r && e.volumes.length > 0 ?
|
|
3881
|
+
const l = Y(), { convert: o } = N(), c = e.book_id || e.work_id, d = r && e.volumes.length > 0 ? Ao(e.volumes, l.unit.volume) : null, s = e.missing_volumes && e.missing_volumes.length > 0;
|
|
3882
3882
|
return /* @__PURE__ */ a("div", { style: {
|
|
3883
3883
|
display: "flex",
|
|
3884
3884
|
alignItems: "baseline",
|
|
@@ -3929,7 +3929,7 @@ function Fn({ book: e, onNavigate: n, renderLink: i, showVolumes: r }) {
|
|
|
3929
3929
|
l.unit.volume
|
|
3930
3930
|
] }),
|
|
3931
3931
|
c && /* @__PURE__ */ t(
|
|
3932
|
-
|
|
3932
|
+
$o,
|
|
3933
3933
|
{
|
|
3934
3934
|
id: c,
|
|
3935
3935
|
label: e.book_id ? l.indexType.book : l.indexType.work,
|
|
@@ -4002,9 +4002,9 @@ const Zi = ({
|
|
|
4002
4002
|
color: "var(--bim-desc-fg, #717171)",
|
|
4003
4003
|
fontSize: "13px"
|
|
4004
4004
|
}, children: h }) : m ? /* @__PURE__ */ a("div", { className: o, style: c, children: [
|
|
4005
|
-
/* @__PURE__ */ t(
|
|
4005
|
+
/* @__PURE__ */ t(Lo, { data: m }),
|
|
4006
4006
|
S && /* @__PURE__ */ t(
|
|
4007
|
-
|
|
4007
|
+
Wo,
|
|
4008
4008
|
{
|
|
4009
4009
|
sections: m.sections,
|
|
4010
4010
|
activeSection: x,
|
|
@@ -4099,7 +4099,7 @@ const Zi = ({
|
|
|
4099
4099
|
const i = setInterval(() => n((r) => r >= 3 ? 1 : r + 1), 500);
|
|
4100
4100
|
return () => clearInterval(i);
|
|
4101
4101
|
}, []), /* @__PURE__ */ t("div", { style: { textAlign: "center", padding: "32px 0", color: "var(--bim-desc-fg, #717171)", fontSize: "14px" }, children: "加载中" + ".".repeat(e) });
|
|
4102
|
-
}, xe = 6, zt = 7,
|
|
4102
|
+
}, xe = 6, zt = 7, Po = ({
|
|
4103
4103
|
content: e,
|
|
4104
4104
|
children: n,
|
|
4105
4105
|
placement: i = "top",
|
|
@@ -4140,7 +4140,7 @@ const Zi = ({
|
|
|
4140
4140
|
children: n
|
|
4141
4141
|
}
|
|
4142
4142
|
),
|
|
4143
|
-
c &&
|
|
4143
|
+
c && Tr(
|
|
4144
4144
|
/* @__PURE__ */ a(
|
|
4145
4145
|
"div",
|
|
4146
4146
|
{
|
|
@@ -4262,7 +4262,7 @@ const Zi = ({
|
|
|
4262
4262
|
"民国",
|
|
4263
4263
|
"朝鲜",
|
|
4264
4264
|
"高丽"
|
|
4265
|
-
],
|
|
4265
|
+
], jo = {
|
|
4266
4266
|
北宋: "宋",
|
|
4267
4267
|
南宋: "宋",
|
|
4268
4268
|
西漢: "漢",
|
|
@@ -4283,7 +4283,7 @@ const Zi = ({
|
|
|
4283
4283
|
北朝: "南北朝"
|
|
4284
4284
|
};
|
|
4285
4285
|
function me(e) {
|
|
4286
|
-
return
|
|
4286
|
+
return jo[e] ?? e;
|
|
4287
4287
|
}
|
|
4288
4288
|
const ot = [
|
|
4289
4289
|
{ pattern: /欽定四庫全書薈要|摛藻堂/, era: "清", reign: "乾隆" },
|
|
@@ -4447,10 +4447,10 @@ function Ht(e) {
|
|
|
4447
4447
|
const r = n[2] ? parseInt(n[2], 10) : void 0;
|
|
4448
4448
|
return { from: i, to: r != null && r >= i && r <= 2100 ? r : void 0 };
|
|
4449
4449
|
}
|
|
4450
|
-
function
|
|
4450
|
+
function Mo(e) {
|
|
4451
4451
|
return e >= 1950 ? "" : e >= 1912 ? "民國" : e >= 1645 ? "清" : e >= 1368 ? "明" : e >= 1279 ? "元" : e >= 960 ? "宋" : e >= 907 ? "五代" : e >= 618 ? "唐" : e >= 581 ? "隋" : e >= 420 ? "南北朝" : e >= 265 ? "晉" : e >= 220 ? "三國" : e >= -202 ? "漢" : "";
|
|
4452
4452
|
}
|
|
4453
|
-
const
|
|
4453
|
+
const Ho = /末[宋元明清]初|[約约]|推定|推算|前後|前后|左右|[前中後后末]期/, Vn = { 曹魏: "三國", 蜀漢: "三國", 東吳: "三國", 前蜀: "五代", 後蜀: "五代" };
|
|
4454
4454
|
function un(e) {
|
|
4455
4455
|
const n = e.trim().replace(/[代朝]$/, "");
|
|
4456
4456
|
for (const l of Object.keys(Vn)) if (n.startsWith(l)) return Vn[l];
|
|
@@ -4466,8 +4466,8 @@ function Ue(e, n) {
|
|
|
4466
4466
|
}
|
|
4467
4467
|
return lt[e];
|
|
4468
4468
|
}
|
|
4469
|
-
const
|
|
4470
|
-
function
|
|
4469
|
+
const Oo = 1911;
|
|
4470
|
+
function Do(e) {
|
|
4471
4471
|
const n = lt[e];
|
|
4472
4472
|
if (n == null) return;
|
|
4473
4473
|
const i = je[e];
|
|
@@ -4476,7 +4476,7 @@ function Ho(e) {
|
|
|
4476
4476
|
je[l] === i && o > n && (r == null || o < r) && (r = o);
|
|
4477
4477
|
return r != null ? r - 1 : void 0;
|
|
4478
4478
|
}
|
|
4479
|
-
const
|
|
4479
|
+
const No = {
|
|
4480
4480
|
零: 0,
|
|
4481
4481
|
"〇": 0,
|
|
4482
4482
|
一: 1,
|
|
@@ -4498,7 +4498,7 @@ function ln(e) {
|
|
|
4498
4498
|
if (/^\d+$/.test(e)) return parseInt(e, 10);
|
|
4499
4499
|
let n = 0, i = 0, r = !1;
|
|
4500
4500
|
for (const o of e) {
|
|
4501
|
-
const c =
|
|
4501
|
+
const c = No[o];
|
|
4502
4502
|
if (c === void 0) return;
|
|
4503
4503
|
r = !0, o === "十" ? i = (i || 1) * 10 : o === "廿" || o === "卅" ? (n += c, i = 0) : i >= 10 ? (n += i + c, i = 0) : i = i * 10 + c;
|
|
4504
4504
|
}
|
|
@@ -4637,7 +4637,7 @@ function Ot(e) {
|
|
|
4637
4637
|
const l = (d = e.publication_info) == null ? void 0 : d.year;
|
|
4638
4638
|
if (l) {
|
|
4639
4639
|
const p = Ht(l);
|
|
4640
|
-
if (p) return { era:
|
|
4640
|
+
if (p) return { era: Mo(p.from), reign: "", source: "publication" };
|
|
4641
4641
|
const u = De(l) ?? un(l) ?? ((s = ot.find((f) => f.pattern.test(l))) == null ? void 0 : s.era) ?? "", g = Je(l, u) ?? "", h = u || (g ? je[g] ?? "" : "");
|
|
4642
4642
|
if (h || g) return { era: me(h), reign: g, source: "publication" };
|
|
4643
4643
|
}
|
|
@@ -4684,7 +4684,7 @@ function fn(e) {
|
|
|
4684
4684
|
const S = De(h);
|
|
4685
4685
|
if (!S || me(S) === "民國") {
|
|
4686
4686
|
const w = ln(y[1]);
|
|
4687
|
-
if (w != null && w >= 1 && w <= 120) return
|
|
4687
|
+
if (w != null && w >= 1 && w <= 120) return Oo + w;
|
|
4688
4688
|
}
|
|
4689
4689
|
}
|
|
4690
4690
|
const b = De(h) ?? ((u = ot.find((S) => S.pattern.test(h))) == null ? void 0 : u.era), k = b ? me(b) : void 0, m = Je(h, k) ?? (De(h) || (g = ot.find((S) => S.pattern.test(h))) == null ? void 0 : g.reign);
|
|
@@ -4738,7 +4738,7 @@ function tr(e) {
|
|
|
4738
4738
|
}
|
|
4739
4739
|
}
|
|
4740
4740
|
if (y.length > 0) {
|
|
4741
|
-
const b = y.map((_) => Ue(_, x)).filter((_) => _ != null), k = Math.min(...b), m = y.reduce((_, w) => Ue(_, x) >= Ue(w, x) ? _ : w), S =
|
|
4741
|
+
const b = y.map((_) => Ue(_, x)).filter((_) => _ != null), k = Math.min(...b), m = y.reduce((_, w) => Ue(_, x) >= Ue(w, x) ? _ : w), S = Do(m) ?? Kt(x ?? "") ?? Math.max(...b);
|
|
4742
4742
|
return { from: k, to: S > k ? S : Kt(x ?? je[m] ?? "") ?? k };
|
|
4743
4743
|
}
|
|
4744
4744
|
if (x && Ke[x] != null)
|
|
@@ -4767,13 +4767,13 @@ const Ke = {
|
|
|
4767
4767
|
高麗: 918,
|
|
4768
4768
|
越南: 1400,
|
|
4769
4769
|
琉球: 1400
|
|
4770
|
-
},
|
|
4770
|
+
}, Fo = [
|
|
4771
4771
|
{ re: /影印|景印|影鈔|影钞|景鈔|景钞/, relation: "影印" },
|
|
4772
4772
|
{ re: /翻刻|覆刻|覆刊|翻雕|重刊|重雕/, relation: "翻刻" },
|
|
4773
4773
|
{ re: /傳鈔|传钞|傳抄|传抄/, relation: "傳鈔" },
|
|
4774
4774
|
{ re: /配補|配补|百衲/, relation: "配補" },
|
|
4775
4775
|
{ re: /據.{0,12}本|据.{0,12}本/, relation: "據刊" }
|
|
4776
|
-
],
|
|
4776
|
+
], Vo = /修補|修补|遞修|递修|[明清元宋]修本|後代修|后代修/, Gn = /約|约|疑|傳為|传为|舊題|旧题|相傳|相传|待考|未詳|未详|\(疑\)|(疑)/;
|
|
4777
4777
|
function Yn(e, n) {
|
|
4778
4778
|
for (const i of Qi) {
|
|
4779
4779
|
const r = e.indexOf(i);
|
|
@@ -4799,11 +4799,11 @@ function Yn(e, n) {
|
|
|
4799
4799
|
if (i.pattern.test(e))
|
|
4800
4800
|
return { era: me(i.era), reign: i.reign ?? "" };
|
|
4801
4801
|
}
|
|
4802
|
-
function
|
|
4802
|
+
function pc(e) {
|
|
4803
4803
|
var k, m, S, _, w;
|
|
4804
4804
|
const n = Ot(e), i = ((k = e.publication_info) == null ? void 0 : k.year) ?? "", r = i ? Ht(i) : void 0;
|
|
4805
4805
|
if (!n.era && !n.reign && !r) return;
|
|
4806
|
-
const l = e.edition || e.title || "", o = /[間间]/.test(l), c = ((m = e.lineage) == null ? void 0 : m.year_text) ?? "", d = /末[宋元明清]初|[約约]|推定|前後|前后|左右/.test(c), s = n.source === "publication" &&
|
|
4806
|
+
const l = e.edition || e.title || "", o = /[間间]/.test(l), c = ((m = e.lineage) == null ? void 0 : m.year_text) ?? "", d = /末[宋元明清]初|[約约]|推定|前後|前后|左右/.test(c), s = n.source === "publication" && Ho.test(i), p = n.source === "publication" && /[間间]/.test(i), u = c.match(/([宋元明清])[^、,,]*?[((](\d{3,4})[))][^、,,]*?原刻/);
|
|
4807
4807
|
let g;
|
|
4808
4808
|
o || d || s || p ? g = void 0 : u ? g = parseInt(u[2], 10) : g = fn(e);
|
|
4809
4809
|
const h = g == null ? tr(e) : void 0;
|
|
@@ -4822,11 +4822,11 @@ function dc(e) {
|
|
|
4822
4822
|
const C = c.match(/[、,,]\s*([宋元明清])/);
|
|
4823
4823
|
C && C[1] !== y.era && (y.laterRepair = { era: C[1] });
|
|
4824
4824
|
}
|
|
4825
|
-
if (!y.laterRepair &&
|
|
4825
|
+
if (!y.laterRepair && Vo.test(l)) {
|
|
4826
4826
|
const C = l.match(/([宋元明清])\s*(?:初|末)?\s*(?:修補|修补|遞修|递修|修)/);
|
|
4827
4827
|
C && C[1] !== n.era && (y.laterRepair = { era: C[1] });
|
|
4828
4828
|
}
|
|
4829
|
-
const b =
|
|
4829
|
+
const b = Fo.find((C) => C.re.test(l));
|
|
4830
4830
|
if (b) {
|
|
4831
4831
|
const C = l.search(b.re), T = l.slice(C), I = Yn(T, n.era) ?? Yn(l, n.era);
|
|
4832
4832
|
I && (y.basedOn = {
|
|
@@ -4870,7 +4870,7 @@ const an = {
|
|
|
4870
4870
|
function Kt(e) {
|
|
4871
4871
|
return an[e];
|
|
4872
4872
|
}
|
|
4873
|
-
function
|
|
4873
|
+
function Go(e) {
|
|
4874
4874
|
const n = fn(e);
|
|
4875
4875
|
if (n != null) return n;
|
|
4876
4876
|
const i = tr(e);
|
|
@@ -4904,7 +4904,7 @@ function Kn(e) {
|
|
|
4904
4904
|
const n = Un.indexOf(e);
|
|
4905
4905
|
return n === -1 ? Un.length : n;
|
|
4906
4906
|
}
|
|
4907
|
-
function
|
|
4907
|
+
function Yo(e) {
|
|
4908
4908
|
const n = {
|
|
4909
4909
|
belongsTo: [],
|
|
4910
4910
|
collected: [],
|
|
@@ -4958,7 +4958,7 @@ function nr(e) {
|
|
|
4958
4958
|
const r = Di(e);
|
|
4959
4959
|
return r && r.expected > 0 && n.push(r.missing > 0 ? `${r.found} / ${r.expected} 冊 缺 ${r.missing}` : `${r.found} / ${r.expected} 冊`), i.version && n.push(String(i.version)), n.join(" · ");
|
|
4960
4960
|
}
|
|
4961
|
-
function
|
|
4961
|
+
function Uo(e, n) {
|
|
4962
4962
|
if (nr(e) || n.filter((r) => r.name === e.name).length < 2) return "";
|
|
4963
4963
|
try {
|
|
4964
4964
|
const r = new URL(e.url), l = r.searchParams.get("res") || r.searchParams.get("id");
|
|
@@ -4969,7 +4969,7 @@ function Go(e, n) {
|
|
|
4969
4969
|
}
|
|
4970
4970
|
return "";
|
|
4971
4971
|
}
|
|
4972
|
-
function
|
|
4972
|
+
function Ko(e, n) {
|
|
4973
4973
|
var o, c;
|
|
4974
4974
|
const i = e.resources || [], r = [], l = [];
|
|
4975
4975
|
for (const d of i) {
|
|
@@ -4981,16 +4981,16 @@ function Yo(e, n) {
|
|
|
4981
4981
|
name: e.edition || e.title || e.id,
|
|
4982
4982
|
era: Ot(e),
|
|
4983
4983
|
year: fn(e),
|
|
4984
|
-
sortYear:
|
|
4984
|
+
sortYear: Go(e),
|
|
4985
4985
|
images: r,
|
|
4986
4986
|
holders: l,
|
|
4987
4987
|
locationName: (o = e.current_location) == null ? void 0 : o.name,
|
|
4988
|
-
important:
|
|
4988
|
+
important: Jo(e.id, n),
|
|
4989
4989
|
group: (c = n == null ? void 0 : n.node_groups) == null ? void 0 : c[e.id],
|
|
4990
4990
|
hasImage: r.length > 0
|
|
4991
4991
|
};
|
|
4992
4992
|
}
|
|
4993
|
-
function
|
|
4993
|
+
function Jo(e, n) {
|
|
4994
4994
|
var d, s;
|
|
4995
4995
|
if (!n) return !1;
|
|
4996
4996
|
const i = n.default_collection;
|
|
@@ -5000,8 +5000,8 @@ function Uo(e, n) {
|
|
|
5000
5000
|
const o = (r == null ? void 0 : r.groups) ?? [], c = (s = n.node_groups) == null ? void 0 : s[e];
|
|
5001
5001
|
return !!c && o.includes(c);
|
|
5002
5002
|
}
|
|
5003
|
-
function
|
|
5004
|
-
const r = new Set((n == null ? void 0 : n.excluded_books) ?? []), l = e.filter((s) => !r.has(s.id)).map((s) =>
|
|
5003
|
+
function qo(e, n, i = {}) {
|
|
5004
|
+
const r = new Set((n == null ? void 0 : n.excluded_books) ?? []), l = e.filter((s) => !r.has(s.id)).map((s) => Ko(s, n));
|
|
5005
5005
|
let o = l;
|
|
5006
5006
|
i.era && (o = o.filter((s) => s.era.era === i.era)), i.scanOnly && (o = o.filter((s) => s.hasImage)), i.sort === "year" ? o = o.map((s, p) => ({ r: s, i: p })).sort((s, p) => {
|
|
5007
5007
|
const u = s.r.sortYear, g = p.r.sortYear;
|
|
@@ -5018,7 +5018,7 @@ function Ko(e, n, i = {}) {
|
|
|
5018
5018
|
hasInferredEra: l.some((s) => s.era.source === "edition")
|
|
5019
5019
|
};
|
|
5020
5020
|
}
|
|
5021
|
-
function
|
|
5021
|
+
function uc(e, n) {
|
|
5022
5022
|
var b, k;
|
|
5023
5023
|
if (!n || !n.default_collection || !n.node_groups)
|
|
5024
5024
|
return { useGrouping: !1, coreIds: e, groupedIds: [] };
|
|
@@ -5046,7 +5046,7 @@ function pc(e, n) {
|
|
|
5046
5046
|
});
|
|
5047
5047
|
return h.length > 0 && y.push({ id: "__other__", label: "其他版本", description: void 0, ids: h }), { useGrouping: !0, coreIds: u, groupedIds: y };
|
|
5048
5048
|
}
|
|
5049
|
-
const
|
|
5049
|
+
const Xo = ["撰", "編", "注", "校", "譯", "繪", "其他"], Zo = [
|
|
5050
5050
|
// 譯 / 繪 放前面:它們的字不會出現在別類裡,先撈掉免得被後面的寬規則吃掉
|
|
5051
5051
|
{ cls: "譯", re: /譯|译/ },
|
|
5052
5052
|
{ cls: "繪", re: /繪|绘|畫|画|圖|图|篆|摹/ },
|
|
@@ -5066,7 +5066,7 @@ function ir(e) {
|
|
|
5066
5066
|
if (!e || !e.trim()) return "撰";
|
|
5067
5067
|
const n = e.replace(/[\s-]/g, "");
|
|
5068
5068
|
if (!n || n === "author") return "撰";
|
|
5069
|
-
for (const { cls: i, re: r } of
|
|
5069
|
+
for (const { cls: i, re: r } of Zo)
|
|
5070
5070
|
if (r.test(n)) return i;
|
|
5071
5071
|
return "其他";
|
|
5072
5072
|
}
|
|
@@ -5075,20 +5075,20 @@ function rr(e) {
|
|
|
5075
5075
|
const n = e.trim();
|
|
5076
5076
|
return !n || !/[一-鿿]/.test(n) ? "" : n;
|
|
5077
5077
|
}
|
|
5078
|
-
function
|
|
5078
|
+
function Qo(e) {
|
|
5079
5079
|
const n = /* @__PURE__ */ new Map();
|
|
5080
5080
|
for (const r of e) {
|
|
5081
5081
|
const l = ir(r);
|
|
5082
5082
|
n.set(l, (n.get(l) ?? 0) + 1);
|
|
5083
5083
|
}
|
|
5084
5084
|
const i = [{ cls: "全部", label: "全部", count: e.length }];
|
|
5085
|
-
for (const r of
|
|
5085
|
+
for (const r of Xo) {
|
|
5086
5086
|
const l = n.get(r);
|
|
5087
5087
|
l && i.push({ cls: r, label: r, count: l });
|
|
5088
5088
|
}
|
|
5089
5089
|
return i.length > 2 ? i : [];
|
|
5090
5090
|
}
|
|
5091
|
-
function
|
|
5091
|
+
function el(e, n, i) {
|
|
5092
5092
|
if (n && n.books && n.books.length > 0) {
|
|
5093
5093
|
const l = n.books.map((c) => ({
|
|
5094
5094
|
id: c.work_id || c.book_id || void 0,
|
|
@@ -5136,27 +5136,27 @@ function or(e, n = "冊") {
|
|
|
5136
5136
|
const i = [...e].sort((o, c) => o - c), r = i[0], l = i[i.length - 1];
|
|
5137
5137
|
return l - r + 1 === i.length ? `${r}–${l}` : i.length <= 3 ? i.join(", ") : `${r}–${l} (${i.length}${n})`;
|
|
5138
5138
|
}
|
|
5139
|
-
const
|
|
5140
|
-
function
|
|
5139
|
+
const tl = ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"], Jn = ["", "十", "百", "千"];
|
|
5140
|
+
function nl(e) {
|
|
5141
5141
|
if (e <= 0) return "";
|
|
5142
5142
|
if (e >= 1e4) return String(e);
|
|
5143
5143
|
const n = String(e), i = n.length;
|
|
5144
5144
|
let r = "", l = !1;
|
|
5145
5145
|
for (let o = 0; o < i; o++) {
|
|
5146
5146
|
const c = parseInt(n[o]), d = i - 1 - o;
|
|
5147
|
-
c === 0 ? l = !0 : (l && r && (r += "〇"), l = !1, c === 1 && d === 1 && o === 0 ? r += Jn[d] : r +=
|
|
5147
|
+
c === 0 ? l = !0 : (l && r && (r += "〇"), l = !1, c === 1 && d === 1 && o === 0 ? r += Jn[d] : r += tl[c] + Jn[d]);
|
|
5148
5148
|
}
|
|
5149
5149
|
return r;
|
|
5150
5150
|
}
|
|
5151
|
-
function
|
|
5151
|
+
function il(e) {
|
|
5152
5152
|
return e == null ? "" : typeof e == "string" ? e : e.title ?? "";
|
|
5153
5153
|
}
|
|
5154
5154
|
function at(e, n = "卷") {
|
|
5155
5155
|
var r, l;
|
|
5156
5156
|
const i = e;
|
|
5157
|
-
return i.measure_info ? i.measure_info : (r = i.juan_count) != null && r.number ?
|
|
5157
|
+
return i.measure_info ? i.measure_info : (r = i.juan_count) != null && r.number ? nl(i.juan_count.number) + n : (l = i.juan_count) != null && l.description ? i.juan_count.description : "";
|
|
5158
5158
|
}
|
|
5159
|
-
function
|
|
5159
|
+
function rl(e) {
|
|
5160
5160
|
var r;
|
|
5161
5161
|
if ((r = e.lineage) != null && r.category) return e.lineage.category;
|
|
5162
5162
|
const n = e.edition || e.title || "", i = [
|
|
@@ -5174,7 +5174,7 @@ function nl(e) {
|
|
|
5174
5174
|
if (l.test(n)) return o;
|
|
5175
5175
|
return "";
|
|
5176
5176
|
}
|
|
5177
|
-
const Tt = 1e3, Jt = 208,
|
|
5177
|
+
const Tt = 1e3, Jt = 208, ol = "(max-width: 719px)", ll = `
|
|
5178
5178
|
.bim-d-page {
|
|
5179
5179
|
background: var(--bim-page-bg, #fbf9f3);
|
|
5180
5180
|
color: var(--bim-ink, #2a231c);
|
|
@@ -5251,7 +5251,7 @@ const Tt = 1e3, Jt = 208, il = "(max-width: 719px)", rl = `
|
|
|
5251
5251
|
align-items: start; margin-bottom: 48px; }
|
|
5252
5252
|
.bim-d-pair-wide { grid-template-columns: 1fr 1.2fr; }
|
|
5253
5253
|
|
|
5254
|
-
@media ${
|
|
5254
|
+
@media ${ol} {
|
|
5255
5255
|
.bim-d-intro { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
|
|
5256
5256
|
.bim-d-pair, .bim-d-pair-wide { grid-template-columns: 1fr; gap: 40px; }
|
|
5257
5257
|
/* 表格:meta 列折到第二行,表头隐藏 */
|
|
@@ -5272,7 +5272,7 @@ const Tt = 1e3, Jt = 208, il = "(max-width: 719px)", rl = `
|
|
|
5272
5272
|
`;
|
|
5273
5273
|
function qt({ children: e, style: n, wide: i }) {
|
|
5274
5274
|
return /* @__PURE__ */ a("div", { className: "bim-d-page", style: n, children: [
|
|
5275
|
-
/* @__PURE__ */ t("style", { children:
|
|
5275
|
+
/* @__PURE__ */ t("style", { children: ll }),
|
|
5276
5276
|
/* @__PURE__ */ t("div", { className: i ? "bim-d-main bim-d-main-wide" : "bim-d-main", children: e })
|
|
5277
5277
|
] });
|
|
5278
5278
|
}
|
|
@@ -5282,7 +5282,7 @@ function lr({ aside: e, children: n }) {
|
|
|
5282
5282
|
/* @__PURE__ */ t("div", { className: "bim-d-reader-main", children: n })
|
|
5283
5283
|
] });
|
|
5284
5284
|
}
|
|
5285
|
-
function
|
|
5285
|
+
function al({ breadcrumb: e, actions: n }) {
|
|
5286
5286
|
return /* @__PURE__ */ a(
|
|
5287
5287
|
"div",
|
|
5288
5288
|
{
|
|
@@ -5325,7 +5325,7 @@ function ar({ char: e, tone: n = "accent" }) {
|
|
|
5325
5325
|
}
|
|
5326
5326
|
);
|
|
5327
5327
|
}
|
|
5328
|
-
function
|
|
5328
|
+
function sl({ items: e }) {
|
|
5329
5329
|
const n = Ce();
|
|
5330
5330
|
return /* @__PURE__ */ t(P, { children: e.map((i, r) => {
|
|
5331
5331
|
const l = r === e.length - 1, o = r > 0 && /* @__PURE__ */ t("span", { style: { color: "var(--bim-hint-fg, #cbbda0)" }, children: "/" }, `s${r}`), c = i.id ? n(i.id) : i.href, d = l || !i.onClick && !c ? /* @__PURE__ */ t("span", { style: { color: "var(--bim-ink, #2a231c)" }, children: i.label }, r) : /* @__PURE__ */ t(
|
|
@@ -5346,7 +5346,7 @@ function ll({ items: e }) {
|
|
|
5346
5346
|
] }, r);
|
|
5347
5347
|
}) });
|
|
5348
5348
|
}
|
|
5349
|
-
function
|
|
5349
|
+
function cl({ title: e, subtitle: n, aside: i, secondLine: r }) {
|
|
5350
5350
|
return /* @__PURE__ */ a("header", { style: { borderBottom: "2px solid var(--bim-rule-strong, #2a231c)", paddingBottom: 18 }, children: [
|
|
5351
5351
|
/* @__PURE__ */ a("div", { style: {
|
|
5352
5352
|
display: "flex",
|
|
@@ -5545,7 +5545,7 @@ function Ft({ children: e, href: n, onClick: i, title: r }) {
|
|
|
5545
5545
|
function mn({ children: e }) {
|
|
5546
5546
|
return /* @__PURE__ */ t("div", { style: { display: "flex", flexWrap: "wrap", gap: 6 }, children: e });
|
|
5547
5547
|
}
|
|
5548
|
-
function
|
|
5548
|
+
function dl({ volumes: e, unit: n = "冊", max: i = 60 }) {
|
|
5549
5549
|
const [r, l] = R(!1);
|
|
5550
5550
|
if (!e.length) return null;
|
|
5551
5551
|
const o = r ? e : e.slice(0, i);
|
|
@@ -5651,7 +5651,7 @@ function yn(e) {
|
|
|
5651
5651
|
function wt() {
|
|
5652
5652
|
return /* @__PURE__ */ t("span", { style: { color: "var(--bim-hint-fg, #cbbda0)" }, children: "—" });
|
|
5653
5653
|
}
|
|
5654
|
-
function
|
|
5654
|
+
function pl({ open: e, onToggle: n, main: i, action: r, children: l }) {
|
|
5655
5655
|
return /* @__PURE__ */ a("div", { style: { borderBottom: "1px solid var(--bim-rule, #eae2d0)" }, children: [
|
|
5656
5656
|
/* @__PURE__ */ a(
|
|
5657
5657
|
"div",
|
|
@@ -5701,7 +5701,7 @@ function cl({ open: e, onToggle: n, main: i, action: r, children: l }) {
|
|
|
5701
5701
|
}, children: l })
|
|
5702
5702
|
] });
|
|
5703
5703
|
}
|
|
5704
|
-
function
|
|
5704
|
+
function sr(e) {
|
|
5705
5705
|
const n = [];
|
|
5706
5706
|
for (let i = 0; i < e.length; i++) {
|
|
5707
5707
|
const r = e[i];
|
|
@@ -5722,12 +5722,24 @@ function dl(e) {
|
|
|
5722
5722
|
}
|
|
5723
5723
|
return n;
|
|
5724
5724
|
}
|
|
5725
|
-
function
|
|
5725
|
+
function cr(e, n) {
|
|
5726
|
+
if (e.length <= n) return e;
|
|
5727
|
+
let i = n;
|
|
5728
|
+
for (const r of sr(e)) {
|
|
5729
|
+
if (r.start >= i) break;
|
|
5730
|
+
if (r.end > i) {
|
|
5731
|
+
i = r.start > 0 ? r.start : r.end;
|
|
5732
|
+
break;
|
|
5733
|
+
}
|
|
5734
|
+
}
|
|
5735
|
+
return e.slice(0, i);
|
|
5736
|
+
}
|
|
5737
|
+
function Ne(e, n = (i) => i) {
|
|
5726
5738
|
if (!e) return "";
|
|
5727
5739
|
if (e.indexOf("⟨") < 0 && e.indexOf("<") < 0) return n(e);
|
|
5728
5740
|
const i = [];
|
|
5729
5741
|
let r = 0, l = 0;
|
|
5730
|
-
for (const o of
|
|
5742
|
+
for (const o of sr(e))
|
|
5731
5743
|
o.start > r && i.push(/* @__PURE__ */ t(Xe.Fragment, { children: n(e.slice(r, o.start)) }, l++)), i.push(
|
|
5732
5744
|
/* @__PURE__ */ t(
|
|
5733
5745
|
"span",
|
|
@@ -5785,7 +5797,7 @@ function qn({ title: e, tag: n, children: i }) {
|
|
|
5785
5797
|
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column" }, children: i })
|
|
5786
5798
|
] });
|
|
5787
5799
|
}
|
|
5788
|
-
function
|
|
5800
|
+
function ul({ name: e, note: n, href: i, extra: r }) {
|
|
5789
5801
|
const l = /* @__PURE__ */ a(P, { children: [
|
|
5790
5802
|
/* @__PURE__ */ t("span", { style: { fontSize: 14, minWidth: 0 }, children: e }),
|
|
5791
5803
|
/* @__PURE__ */ t("span", { className: "bim-d-ui", style: {
|
|
@@ -5818,9 +5830,9 @@ function _t({
|
|
|
5818
5830
|
showVolumes: i = !0,
|
|
5819
5831
|
fallbackNote: r
|
|
5820
5832
|
}) {
|
|
5821
|
-
const { convert: l } = N(), [o, c] = R(!1), d = Di(e), s = i && !!d && d.expected > 0, p = (e.url ? Lt(e.url) : void 0) || l(e.name), u = n ?
|
|
5833
|
+
const { convert: l } = N(), [o, c] = R(!1), d = Di(e), s = i && !!d && d.expected > 0, p = (e.url ? Lt(e.url) : void 0) || l(e.name), u = n ? Uo(e, n) : "", g = u ? `${p}(${u})` : p;
|
|
5822
5834
|
return /* @__PURE__ */ t(
|
|
5823
|
-
|
|
5835
|
+
ul,
|
|
5824
5836
|
{
|
|
5825
5837
|
name: g,
|
|
5826
5838
|
note: nr(e) || r,
|
|
@@ -5846,12 +5858,12 @@ function _t({
|
|
|
5846
5858
|
children: o ? "收起分冊" : `展開 ${d.expected} 冊`
|
|
5847
5859
|
}
|
|
5848
5860
|
),
|
|
5849
|
-
o && /* @__PURE__ */ t(
|
|
5861
|
+
o && /* @__PURE__ */ t(fl, { item: e })
|
|
5850
5862
|
] }) : void 0
|
|
5851
5863
|
}
|
|
5852
5864
|
);
|
|
5853
5865
|
}
|
|
5854
|
-
function
|
|
5866
|
+
function fl({ item: e }) {
|
|
5855
5867
|
return /* @__PURE__ */ t("div", { className: "bim-d-ui", style: {
|
|
5856
5868
|
display: "flex",
|
|
5857
5869
|
flexWrap: "wrap",
|
|
@@ -5877,7 +5889,7 @@ function ul({ item: e }) {
|
|
|
5877
5889
|
}, children: n.volume }, i);
|
|
5878
5890
|
}) });
|
|
5879
5891
|
}
|
|
5880
|
-
function
|
|
5892
|
+
function dr({ label: e, items: n }) {
|
|
5881
5893
|
const { convert: i } = N();
|
|
5882
5894
|
return n.length ? /* @__PURE__ */ a("div", { style: { display: "flex", flexWrap: "wrap", gap: 6, alignItems: "center" }, children: [
|
|
5883
5895
|
/* @__PURE__ */ t("span", { className: "bim-d-ui", style: {
|
|
@@ -5888,14 +5900,14 @@ function sr({ label: e, items: n }) {
|
|
|
5888
5900
|
n.map((r, l) => /* @__PURE__ */ t(Ft, { children: i(r) }, l))
|
|
5889
5901
|
] }) : null;
|
|
5890
5902
|
}
|
|
5891
|
-
function
|
|
5903
|
+
function gl({ rows: e }) {
|
|
5892
5904
|
const n = e.filter((i) => i.items.length > 0);
|
|
5893
|
-
return n.length ? /* @__PURE__ */ t("div", { style: { marginTop: 16, display: "flex", flexDirection: "column", gap: 8 }, children: n.map((i) => /* @__PURE__ */ t(
|
|
5905
|
+
return n.length ? /* @__PURE__ */ t("div", { style: { marginTop: 16, display: "flex", flexDirection: "column", gap: 8 }, children: n.map((i) => /* @__PURE__ */ t(dr, { label: i.label, items: i.items }, i.label)) }) : null;
|
|
5894
5906
|
}
|
|
5895
5907
|
function Wt(e) {
|
|
5896
5908
|
return (e || []).map((n) => typeof n == "string" ? n : n == null ? void 0 : n.book_title).filter((n) => !!n);
|
|
5897
5909
|
}
|
|
5898
|
-
function
|
|
5910
|
+
function hl({ left: e, right: n }) {
|
|
5899
5911
|
return /* @__PURE__ */ a("footer", { className: "bim-d-ui", style: {
|
|
5900
5912
|
marginTop: 52,
|
|
5901
5913
|
paddingTop: 14,
|
|
@@ -5953,17 +5965,17 @@ const Zn = {
|
|
|
5953
5965
|
C: "rough",
|
|
5954
5966
|
D: "ocr"
|
|
5955
5967
|
};
|
|
5956
|
-
function
|
|
5968
|
+
function ml(e) {
|
|
5957
5969
|
return typeof e != "string" ? null : e in Ai ? e : e in Zn ? Zn[e] : null;
|
|
5958
5970
|
}
|
|
5959
|
-
const
|
|
5971
|
+
const bl = {
|
|
5960
5972
|
書: "书",
|
|
5961
5973
|
類: "类",
|
|
5962
5974
|
結語: "结语",
|
|
5963
5975
|
結语: "结语",
|
|
5964
5976
|
考證: "考证",
|
|
5965
5977
|
詩: "诗"
|
|
5966
|
-
},
|
|
5978
|
+
}, xl = {
|
|
5967
5979
|
book: "书",
|
|
5968
5980
|
poem: "诗",
|
|
5969
5981
|
category: "类",
|
|
@@ -5974,21 +5986,21 @@ const ml = {
|
|
|
5974
5986
|
comment: "注释"
|
|
5975
5987
|
};
|
|
5976
5988
|
function be(e) {
|
|
5977
|
-
return typeof e != "string" ? "" :
|
|
5989
|
+
return typeof e != "string" ? "" : bl[e] ?? xl[e] ?? e;
|
|
5978
5990
|
}
|
|
5979
|
-
const
|
|
5980
|
-
function
|
|
5991
|
+
const yl = ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"], Qn = ["", "十", "百", "千"], vl = ["", "萬", "億"];
|
|
5992
|
+
function pr(e) {
|
|
5981
5993
|
if (e === 0) return "〇";
|
|
5982
|
-
if (e < 0) return `負${
|
|
5994
|
+
if (e < 0) return `負${pr(-e)}`;
|
|
5983
5995
|
const n = [];
|
|
5984
5996
|
let i = e, r = 0;
|
|
5985
5997
|
for (; i > 0; ) {
|
|
5986
5998
|
const l = i % 1e4;
|
|
5987
|
-
l > 0 ? n.unshift(
|
|
5999
|
+
l > 0 ? n.unshift(Sl(l, r > 0) + vl[r]) : n.length > 0 && n.unshift("〇"), i = Math.floor(i / 1e4), r++;
|
|
5988
6000
|
}
|
|
5989
6001
|
return n.join("").replace(/〇+/g, "〇").replace(/〇$/, "");
|
|
5990
6002
|
}
|
|
5991
|
-
function
|
|
6003
|
+
function Sl(e, n) {
|
|
5992
6004
|
const i = [];
|
|
5993
6005
|
let r = e;
|
|
5994
6006
|
for (; r > 0; )
|
|
@@ -5996,25 +6008,25 @@ function vl(e, n) {
|
|
|
5996
6008
|
let l = "";
|
|
5997
6009
|
for (let o = 0; o < i.length; o++) {
|
|
5998
6010
|
const c = i[o], d = i.length - 1 - o;
|
|
5999
|
-
c === 0 ? l && !l.endsWith("〇") && (l += "〇") : c === 1 && d === 1 && o === 0 && !n ? l += Qn[d] : l +=
|
|
6011
|
+
c === 0 ? l && !l.endsWith("〇") && (l += "〇") : c === 1 && d === 1 && o === 0 && !n ? l += Qn[d] : l += yl[c] + Qn[d];
|
|
6000
6012
|
}
|
|
6001
6013
|
return l.replace(/〇$/, "");
|
|
6002
6014
|
}
|
|
6003
6015
|
let St = null, Rt = null;
|
|
6004
6016
|
const $t = /* @__PURE__ */ new Set();
|
|
6005
|
-
function
|
|
6017
|
+
function kl() {
|
|
6006
6018
|
return St ? Promise.resolve() : Rt || (Rt = import("opencc-js/t2cn").then((e) => {
|
|
6007
6019
|
St = e.Converter({ from: "tw", to: "cn" }), $t.forEach((n) => n());
|
|
6008
6020
|
}).catch(() => {
|
|
6009
6021
|
St = (e) => e, $t.forEach((e) => e());
|
|
6010
6022
|
}), Rt);
|
|
6011
6023
|
}
|
|
6012
|
-
function
|
|
6024
|
+
function Ve() {
|
|
6013
6025
|
const [, e] = R(0);
|
|
6014
6026
|
return M(() => {
|
|
6015
6027
|
if (St) return;
|
|
6016
6028
|
const n = () => e((i) => i + 1);
|
|
6017
|
-
return $t.add(n),
|
|
6029
|
+
return $t.add(n), kl(), () => {
|
|
6018
6030
|
$t.delete(n);
|
|
6019
6031
|
};
|
|
6020
6032
|
}, []), St ?? ((n) => n);
|
|
@@ -6048,7 +6060,7 @@ function Sn(e, n, i, r) {
|
|
|
6048
6060
|
const l = ct(n, r);
|
|
6049
6061
|
return (i ? [e.title, e.header_line, e.content, e.comment] : [e.title, e.book_title, e.author, e.author_info, e.summary, e.content, e.comment, e.additional_comment]).some((c) => typeof c == "string" && ct(c, r).includes(l));
|
|
6050
6062
|
}
|
|
6051
|
-
function
|
|
6063
|
+
function wl(e, n, i) {
|
|
6052
6064
|
return n ? ct(e, i).includes(ct(n, i)) : !0;
|
|
6053
6065
|
}
|
|
6054
6066
|
const kn = {
|
|
@@ -6057,15 +6069,15 @@ const kn = {
|
|
|
6057
6069
|
序: "var(--bim-section-xu, #1a5276)",
|
|
6058
6070
|
结语: "var(--bim-section-jieyu, #7d6608)",
|
|
6059
6071
|
注释: "var(--bim-section-zhushi, #6c5b7b)"
|
|
6060
|
-
},
|
|
6072
|
+
}, _l = {
|
|
6061
6073
|
考证: "var(--bim-section-kaozhen, #5d6d7e)"
|
|
6062
6074
|
};
|
|
6063
|
-
function
|
|
6075
|
+
function Il(e) {
|
|
6064
6076
|
const n = e.replace(".json", "").replace(/[/\\]/g, "");
|
|
6065
6077
|
return n === "fulu" ? "附錄" : n.startsWith("juanshou") ? `卷首${n.replace("juanshou", "")}` : n.startsWith("juan") ? `卷${n.replace("juan", "").replace(/^0+/, "")}` : n;
|
|
6066
6078
|
}
|
|
6067
6079
|
function sn({ file: e, isActive: n, onSelect: i, meta: r, matchState: l, vertical: o }) {
|
|
6068
|
-
const c = l === 0, d = l === "loading", s = typeof l == "number" && l > 0, p = r != null && r.vol_label ? `${r.vol_label}冊` : null, u = p ??
|
|
6080
|
+
const c = l === 0, d = l === "loading", s = typeof l == "number" && l > 0, p = r != null && r.vol_label ? `${r.vol_label}冊` : null, u = p ?? Il(e), g = !p && !!(r != null && r.vol_label) && !u.includes(r.vol_label);
|
|
6069
6081
|
return /* @__PURE__ */ a(
|
|
6070
6082
|
"button",
|
|
6071
6083
|
{
|
|
@@ -6115,16 +6127,16 @@ function sn({ file: e, isActive: n, onSelect: i, meta: r, matchState: l, vertica
|
|
|
6115
6127
|
}
|
|
6116
6128
|
);
|
|
6117
6129
|
}
|
|
6118
|
-
function
|
|
6130
|
+
function ur(e, n) {
|
|
6119
6131
|
var i;
|
|
6120
|
-
return e.files.includes(n) ? !0 : !!((i = e.children) != null && i.some((r) =>
|
|
6132
|
+
return e.files.includes(n) ? !0 : !!((i = e.children) != null && i.some((r) => ur(r, n)));
|
|
6121
6133
|
}
|
|
6122
|
-
function
|
|
6134
|
+
function fr(e) {
|
|
6123
6135
|
var r;
|
|
6124
|
-
const n = e.files.length, i = ((r = e.children) == null ? void 0 : r.reduce((l, o) => l +
|
|
6136
|
+
const n = e.files.length, i = ((r = e.children) == null ? void 0 : r.reduce((l, o) => l + fr(o), 0)) || 0;
|
|
6125
6137
|
return n + i;
|
|
6126
6138
|
}
|
|
6127
|
-
function
|
|
6139
|
+
function Cl(e, n) {
|
|
6128
6140
|
const i = [], r = (c) => {
|
|
6129
6141
|
var d;
|
|
6130
6142
|
i.push(...c.files), (d = c.children) == null || d.forEach(r);
|
|
@@ -6137,9 +6149,9 @@ function Il(e, n) {
|
|
|
6137
6149
|
for (const c of l) typeof c == "number" && (o += c);
|
|
6138
6150
|
return o;
|
|
6139
6151
|
}
|
|
6140
|
-
function
|
|
6152
|
+
function gr({ group: e, activeFile: n, onSelect: i, depth: r = 0, juanMeta: l, matchStates: o, vertical: c }) {
|
|
6141
6153
|
var y;
|
|
6142
|
-
const d =
|
|
6154
|
+
const d = ur(e, n || ""), s = Cl(e, o), p = typeof s == "number" && s > 0, u = s === 0, [g, h] = R(d || p), f = fr(e), x = !!((y = e.children) != null && y.length);
|
|
6143
6155
|
if (M(() => {
|
|
6144
6156
|
d && h(!0);
|
|
6145
6157
|
}, [d]), M(() => {
|
|
@@ -6223,11 +6235,11 @@ function ur({ group: e, activeFile: n, onSelect: i, depth: r = 0, juanMeta: l, m
|
|
|
6223
6235
|
gap: c ? "1px" : "4px",
|
|
6224
6236
|
padding: c ? `2px 0 2px ${8 + r * 10}px` : `4px 0 4px ${24 + r * 16}px`
|
|
6225
6237
|
}, children: e.files.map((b) => /* @__PURE__ */ t(sn, { file: b, isActive: n === b, onSelect: i, meta: l == null ? void 0 : l[b], matchState: o[b], vertical: c }, b)) }),
|
|
6226
|
-
x && e.children.map((b, k) => /* @__PURE__ */ t(
|
|
6238
|
+
x && e.children.map((b, k) => /* @__PURE__ */ t(gr, { group: b, activeFile: n, onSelect: i, depth: r + 1, juanMeta: l, matchStates: o, vertical: c }, k))
|
|
6227
6239
|
] })
|
|
6228
6240
|
] });
|
|
6229
6241
|
}
|
|
6230
|
-
function
|
|
6242
|
+
function zl({
|
|
6231
6243
|
files: e,
|
|
6232
6244
|
groups: n,
|
|
6233
6245
|
activeFile: i,
|
|
@@ -6237,7 +6249,7 @@ function Cl({
|
|
|
6237
6249
|
vertical: c
|
|
6238
6250
|
}) {
|
|
6239
6251
|
const d = e || [];
|
|
6240
|
-
return n && n.length > 0 ? /* @__PURE__ */ t("div", { style: { marginBottom: c ? 0 : "16px" }, children: n.map((s, p) => /* @__PURE__ */ t(
|
|
6252
|
+
return n && n.length > 0 ? /* @__PURE__ */ t("div", { style: { marginBottom: c ? 0 : "16px" }, children: n.map((s, p) => /* @__PURE__ */ t(gr, { group: s, activeFile: i, onSelect: r, juanMeta: l, matchStates: o, vertical: c }, p)) }) : d.length === 0 ? null : c ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "1px" }, children: d.map((s) => /* @__PURE__ */ t(sn, { file: s, isActive: i === s, onSelect: r, meta: l == null ? void 0 : l[s], matchState: o[s], vertical: !0 }, s)) }) : /* @__PURE__ */ t("div", { style: {
|
|
6241
6253
|
display: "flex",
|
|
6242
6254
|
flexWrap: "wrap",
|
|
6243
6255
|
gap: "4px",
|
|
@@ -6247,7 +6259,7 @@ function Cl({
|
|
|
6247
6259
|
padding: "4px 0"
|
|
6248
6260
|
}, children: d.map((s) => /* @__PURE__ */ t(sn, { file: s, isActive: i === s, onSelect: r, meta: l == null ? void 0 : l[s], matchState: o[s] }, s)) });
|
|
6249
6261
|
}
|
|
6250
|
-
function
|
|
6262
|
+
function Tl({ type: e }) {
|
|
6251
6263
|
const n = be(e), i = kn[n] || "var(--bim-desc-fg, #717171)";
|
|
6252
6264
|
return /* @__PURE__ */ t("span", { style: {
|
|
6253
6265
|
display: "inline-block",
|
|
@@ -6261,12 +6273,12 @@ function zl({ type: e }) {
|
|
|
6261
6273
|
flexShrink: 0
|
|
6262
6274
|
}, children: n });
|
|
6263
6275
|
}
|
|
6264
|
-
function
|
|
6265
|
-
const { convert: r } = N(), l = Ce(), o =
|
|
6276
|
+
function Rl({ section: e, onNavigate: n, highlightQuery: i = "" }) {
|
|
6277
|
+
const { convert: r } = N(), l = Ce(), o = Ve(), c = (y) => y ? Ne(r(y), (b) => i ? dt(b, i, o) : b) : "", [d, s] = R(!1), p = !!e.summary, u = !!e.comment, g = !!e.additional_comment, h = !!(e.content && e.content.length > 60), f = p || u || g || h;
|
|
6266
6278
|
M(() => {
|
|
6267
6279
|
i && s(!0);
|
|
6268
6280
|
}, [i]);
|
|
6269
|
-
const x = !d && h ? e.content.replace(/\n/g, " ")
|
|
6281
|
+
const x = !d && h ? cr(e.content.replace(/\n/g, " "), 80) + "…" : null;
|
|
6270
6282
|
return /* @__PURE__ */ a("div", { style: {
|
|
6271
6283
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
6272
6284
|
borderRadius: "6px",
|
|
@@ -6312,7 +6324,7 @@ function Tl({ section: e, onNavigate: n, highlightQuery: i = "" }) {
|
|
|
6312
6324
|
color: "var(--bim-desc-fg, #999)",
|
|
6313
6325
|
marginLeft: "6px"
|
|
6314
6326
|
}, children: [
|
|
6315
|
-
|
|
6327
|
+
pr(e.n_juan),
|
|
6316
6328
|
"卷"
|
|
6317
6329
|
] }),
|
|
6318
6330
|
(e.author_info || e.author) && /* @__PURE__ */ t("span", { style: {
|
|
@@ -6444,8 +6456,8 @@ function Tl({ section: e, onNavigate: n, highlightQuery: i = "" }) {
|
|
|
6444
6456
|
] })
|
|
6445
6457
|
] });
|
|
6446
6458
|
}
|
|
6447
|
-
function
|
|
6448
|
-
const { convert: i } = N(), r =
|
|
6459
|
+
function Bl({ section: e, highlightQuery: n = "" }) {
|
|
6460
|
+
const { convert: i } = N(), r = Ve(), l = (s) => s ? Ne(i(s), (p) => n ? dt(p, n, r) : p) : "", [o, c] = R(!1), d = !!e.content;
|
|
6449
6461
|
return /* @__PURE__ */ a("div", { style: { padding: "12px 0 6px" }, children: [
|
|
6450
6462
|
/* @__PURE__ */ a(
|
|
6451
6463
|
"div",
|
|
@@ -6459,7 +6471,7 @@ function Rl({ section: e, highlightQuery: n = "" }) {
|
|
|
6459
6471
|
userSelect: "none"
|
|
6460
6472
|
},
|
|
6461
6473
|
children: [
|
|
6462
|
-
/* @__PURE__ */ t(
|
|
6474
|
+
/* @__PURE__ */ t(Tl, { type: e.type }),
|
|
6463
6475
|
/* @__PURE__ */ t("span", { style: {
|
|
6464
6476
|
fontSize: "15px",
|
|
6465
6477
|
fontWeight: 600,
|
|
@@ -6491,15 +6503,15 @@ function Rl({ section: e, highlightQuery: n = "" }) {
|
|
|
6491
6503
|
}, children: l(e.content) }) })
|
|
6492
6504
|
] });
|
|
6493
6505
|
}
|
|
6494
|
-
const
|
|
6495
|
-
function
|
|
6496
|
-
return be(e.type) !== "page_header" ? !1 : (e.content || "").length >=
|
|
6506
|
+
const El = 100;
|
|
6507
|
+
function hr(e) {
|
|
6508
|
+
return be(e.type) !== "page_header" ? !1 : (e.content || "").length >= El;
|
|
6497
6509
|
}
|
|
6498
|
-
function
|
|
6499
|
-
const { convert: i } = N(), r =
|
|
6500
|
-
if (be(e.type) === "page_header" && !
|
|
6510
|
+
function Ll({ section: e, highlightQuery: n = "" }) {
|
|
6511
|
+
const { convert: i } = N(), r = Ve();
|
|
6512
|
+
if (be(e.type) === "page_header" && !hr(e) || !e.content && !e.title) return null;
|
|
6501
6513
|
const l = i((e.content || e.title || "").replace(/\n{2,}/g, `
|
|
6502
|
-
`)), o = n ? dt(
|
|
6514
|
+
`)), o = Ne(l, (p) => n ? dt(p, n, r) : p), c = be(e.type), d = kn[c] || "var(--bim-desc-fg, #717171)", s = c === "序" || c === "结语" || c === "注释";
|
|
6503
6515
|
return /* @__PURE__ */ a("div", { style: {
|
|
6504
6516
|
padding: s ? "10px 12px" : "6px 0",
|
|
6505
6517
|
margin: s ? "8px 0" : void 0,
|
|
@@ -6527,7 +6539,7 @@ function El({ section: e, highlightQuery: n = "" }) {
|
|
|
6527
6539
|
o
|
|
6528
6540
|
] });
|
|
6529
6541
|
}
|
|
6530
|
-
function
|
|
6542
|
+
function Wl(e, n, i) {
|
|
6531
6543
|
const [r, l] = R({});
|
|
6532
6544
|
return M(() => {
|
|
6533
6545
|
var p;
|
|
@@ -6570,16 +6582,16 @@ function Ll(e, n, i) {
|
|
|
6570
6582
|
};
|
|
6571
6583
|
}, [e.join(","), n]), r;
|
|
6572
6584
|
}
|
|
6573
|
-
function
|
|
6574
|
-
const { convert: o } = N(), c = Ce(), d =
|
|
6585
|
+
function $l({ section: e, onNavigate: n, transport: i, workLabelCache: r, highlightQuery: l = "" }) {
|
|
6586
|
+
const { convert: o } = N(), c = Ce(), d = Ve(), s = (m) => m ? Ne(o(m), (S) => l ? dt(S, l, d) : S) : "", [p, u] = R(!1);
|
|
6575
6587
|
M(() => {
|
|
6576
6588
|
l && u(!0);
|
|
6577
6589
|
}, [l]);
|
|
6578
|
-
const g = be(e.type), h =
|
|
6590
|
+
const g = be(e.type), h = _l[g] || "var(--bim-desc-fg, #717171)", f = !!e.content, x = e.work_ids || [], y = x.length > 1, b = Wl(
|
|
6579
6591
|
y ? x : [],
|
|
6580
6592
|
i,
|
|
6581
6593
|
r
|
|
6582
|
-
), k = f && !p && e.content.length > 80 ? e.content
|
|
6594
|
+
), k = f && !p && e.content.length > 80 ? cr(e.content, 80) + "……" : null;
|
|
6583
6595
|
return /* @__PURE__ */ a("div", { style: {
|
|
6584
6596
|
borderBottom: "1px solid var(--bim-widget-border, #f0f0f0)",
|
|
6585
6597
|
padding: "10px 0"
|
|
@@ -6717,14 +6729,14 @@ function Wl({ section: e, onNavigate: n, transport: i, workLabelCache: r, highli
|
|
|
6717
6729
|
] })
|
|
6718
6730
|
] });
|
|
6719
6731
|
}
|
|
6720
|
-
function
|
|
6732
|
+
function Al({
|
|
6721
6733
|
juan: e,
|
|
6722
6734
|
searchQuery: n,
|
|
6723
6735
|
onNavigate: i,
|
|
6724
6736
|
transport: r,
|
|
6725
6737
|
workLabelCache: l
|
|
6726
6738
|
}) {
|
|
6727
|
-
const { convert: o } = N(), c =
|
|
6739
|
+
const { convert: o } = N(), c = Ve(), d = n.trim(), s = q(() => d ? e.sections.filter((g) => Sn(g, d, !0, c)) : e.sections, [e.sections, d, c]), p = e.sections.filter((g) => be(g.type) === "考证").length, u = s.filter((g) => be(g.type) === "考证").length;
|
|
6728
6740
|
return /* @__PURE__ */ a("div", { children: [
|
|
6729
6741
|
/* @__PURE__ */ a("div", { style: {
|
|
6730
6742
|
display: "flex",
|
|
@@ -6760,7 +6772,7 @@ function $l({
|
|
|
6760
6772
|
children: "原文來源"
|
|
6761
6773
|
}
|
|
6762
6774
|
) }),
|
|
6763
|
-
/* @__PURE__ */ t("div", { children: s.map((g, h) => /* @__PURE__ */ t(
|
|
6775
|
+
/* @__PURE__ */ t("div", { children: s.map((g, h) => /* @__PURE__ */ t($l, { section: g, onNavigate: i, transport: r, workLabelCache: l, highlightQuery: d }, h)) }),
|
|
6764
6776
|
s.length === 0 && /* @__PURE__ */ t("div", { style: {
|
|
6765
6777
|
padding: "32px",
|
|
6766
6778
|
textAlign: "center",
|
|
@@ -6769,8 +6781,8 @@ function $l({
|
|
|
6769
6781
|
}, children: "无匹配结果" })
|
|
6770
6782
|
] });
|
|
6771
6783
|
}
|
|
6772
|
-
function
|
|
6773
|
-
const { convert: i } = N(), r =
|
|
6784
|
+
function Pl({ text: e, highlightQuery: n = "" }) {
|
|
6785
|
+
const { convert: i } = N(), r = Ve(), l = (c) => Ne(i(c), (d) => n ? dt(d, n, r) : d), o = e.split(`
|
|
6774
6786
|
`);
|
|
6775
6787
|
return /* @__PURE__ */ t("div", { style: { fontSize: "15px", lineHeight: 2.2, color: "var(--bim-fg, #333)", textAlign: "justify" }, children: o.map((c, d) => {
|
|
6776
6788
|
if (c.startsWith("# "))
|
|
@@ -6787,12 +6799,12 @@ function Al({ text: e, highlightQuery: n = "" }) {
|
|
|
6787
6799
|
) }, d);
|
|
6788
6800
|
}) });
|
|
6789
6801
|
}
|
|
6790
|
-
function
|
|
6791
|
-
const { convert: r } = N(), l = Ce(), o =
|
|
6802
|
+
function jl({ sections: e, onNavigate: n, highlightQuery: i = "" }) {
|
|
6803
|
+
const { convert: r } = N(), l = Ce(), o = Ve(), c = (p) => p ? Ne(r(p), (u) => i ? dt(u, i, o) : u) : "", d = [];
|
|
6792
6804
|
let s = null;
|
|
6793
6805
|
for (const p of e) {
|
|
6794
6806
|
const u = be(p.type);
|
|
6795
|
-
u === "page_header" && !
|
|
6807
|
+
u === "page_header" && !hr(p) || (u === "类" ? (s && d.push(s), s = { category: p.title, categoryContent: p.content || void 0, items: [] }) : u === "书" || u === "诗" || u === "考证" || u === "注释" ? (s || (s = { category: "", items: [] }), s.items.push(p)) : (u === "序" || u === "结语") && (s || (s = { category: "", items: [] }), s.items.push(p), u === "结语" && (d.push(s), s = null)));
|
|
6796
6808
|
}
|
|
6797
6809
|
return s && d.push(s), /* @__PURE__ */ t("div", { style: { fontSize: "15px", lineHeight: 2.2, color: "var(--bim-fg, #333)", textAlign: "justify" }, children: d.map((p, u) => /* @__PURE__ */ a("div", { style: { marginBottom: "20px" }, children: [
|
|
6798
6810
|
p.category && /* @__PURE__ */ a("h4", { style: { fontSize: "15px", fontWeight: 600, margin: "16px 0 8px", color: "var(--bim-fg, #1a1a1a)" }, children: [
|
|
@@ -6816,13 +6828,13 @@ function Pl({ sections: e, onNavigate: n, highlightQuery: i = "" }) {
|
|
|
6816
6828
|
] }, h))
|
|
6817
6829
|
] }, u)) });
|
|
6818
6830
|
}
|
|
6819
|
-
function
|
|
6831
|
+
function Ml({
|
|
6820
6832
|
juan: e,
|
|
6821
6833
|
rawText: n,
|
|
6822
6834
|
searchQuery: i,
|
|
6823
6835
|
onNavigate: r
|
|
6824
6836
|
}) {
|
|
6825
|
-
const { convert: l } = N(), o =
|
|
6837
|
+
const { convert: l } = N(), o = Ve(), [c, d] = R("catalog"), s = i.trim(), p = q(() => s ? e.sections.filter((f) => Sn(f, s, !1, o)) : e.sections, [e.sections, s, o]), u = e.sections.filter((f) => be(f.type) === "书").length, g = e.sections.filter((f) => be(f.type) === "诗").length, h = s ? p.filter((f) => be(f.type) === "书" || be(f.type) === "诗").length : null;
|
|
6826
6838
|
return /* @__PURE__ */ a("div", { children: [
|
|
6827
6839
|
/* @__PURE__ */ a("div", { style: {
|
|
6828
6840
|
display: "flex",
|
|
@@ -6859,10 +6871,10 @@ function jl({
|
|
|
6859
6871
|
f
|
|
6860
6872
|
)) })
|
|
6861
6873
|
] }),
|
|
6862
|
-
c === "raw" && (n ? /* @__PURE__ */ t(
|
|
6874
|
+
c === "raw" && (n ? /* @__PURE__ */ t(Pl, { text: n, highlightQuery: s }) : /* @__PURE__ */ t(jl, { sections: e.sections, onNavigate: r, highlightQuery: s })),
|
|
6863
6875
|
c === "catalog" && p.map((f, x) => {
|
|
6864
6876
|
const y = be(f.type);
|
|
6865
|
-
return y === "书" || y === "诗" || y === "考证" ? /* @__PURE__ */ t(
|
|
6877
|
+
return y === "书" || y === "诗" || y === "考证" ? /* @__PURE__ */ t(Rl, { section: f, onNavigate: r, highlightQuery: s }, x) : y === "类" ? /* @__PURE__ */ t(Bl, { section: f, highlightQuery: s }, x) : /* @__PURE__ */ t(Ll, { section: f, highlightQuery: s }, x);
|
|
6866
6878
|
}),
|
|
6867
6879
|
c === "catalog" && p.length === 0 && /* @__PURE__ */ t("div", { style: {
|
|
6868
6880
|
padding: "32px",
|
|
@@ -6872,15 +6884,15 @@ function jl({
|
|
|
6872
6884
|
}, children: "无匹配结果" })
|
|
6873
6885
|
] });
|
|
6874
6886
|
}
|
|
6875
|
-
function
|
|
6887
|
+
function mr(e) {
|
|
6876
6888
|
return e.juan_files && e.juan_files.length > 0 ? e.juan_files : e.files && e.files.length > 0 ? e.files.map((n) => n.filename) : [];
|
|
6877
6889
|
}
|
|
6878
|
-
function
|
|
6879
|
-
const n =
|
|
6890
|
+
function Hl(e) {
|
|
6891
|
+
const n = mr(e);
|
|
6880
6892
|
return n.length > 0 ? n[0] : null;
|
|
6881
6893
|
}
|
|
6882
|
-
function
|
|
6883
|
-
const { workId: n, transport: i, files: r, activeFile: l, activeJuan: o, activeRawText: c, query: d, isKaozhen: s } = e, p =
|
|
6894
|
+
function Ol(e) {
|
|
6895
|
+
const { workId: n, transport: i, files: r, activeFile: l, activeJuan: o, activeRawText: c, query: d, isKaozhen: s } = e, p = Ve(), u = de(/* @__PURE__ */ new Map()), [g, h] = R({});
|
|
6884
6896
|
M(() => {
|
|
6885
6897
|
l && o && u.current.set(l, { juan: o, rawText: c });
|
|
6886
6898
|
}, [l, o, c]), M(() => {
|
|
@@ -6891,7 +6903,7 @@ function Hl(e) {
|
|
|
6891
6903
|
if (x.juan)
|
|
6892
6904
|
for (const k of x.juan.sections)
|
|
6893
6905
|
Sn(k, y, s, p) && b++;
|
|
6894
|
-
return b === 0 && x.rawText &&
|
|
6906
|
+
return b === 0 && x.rawText && wl(x.rawText, y, p) && (b = 1), b;
|
|
6895
6907
|
}, [s, p]);
|
|
6896
6908
|
return M(() => {
|
|
6897
6909
|
const x = d.trim();
|
|
@@ -6932,7 +6944,7 @@ function Hl(e) {
|
|
|
6932
6944
|
};
|
|
6933
6945
|
}, [d, n, i, r.join(","), f, p]), { matchStates: g };
|
|
6934
6946
|
}
|
|
6935
|
-
const
|
|
6947
|
+
const br = ({
|
|
6936
6948
|
index: e,
|
|
6937
6949
|
workId: n,
|
|
6938
6950
|
transport: i,
|
|
@@ -6961,7 +6973,7 @@ const hr = ({
|
|
|
6961
6973
|
};
|
|
6962
6974
|
}, [e, n, i]), M(() => {
|
|
6963
6975
|
if (L && !z) {
|
|
6964
|
-
const O =
|
|
6976
|
+
const O = Hl(L);
|
|
6965
6977
|
O && v(O);
|
|
6966
6978
|
}
|
|
6967
6979
|
}, [L, z, v]);
|
|
@@ -7001,9 +7013,9 @@ const hr = ({
|
|
|
7001
7013
|
fontSize: "13px"
|
|
7002
7014
|
}, children: h });
|
|
7003
7015
|
if (!L) return null;
|
|
7004
|
-
const V = L.type === "kaozhen", H =
|
|
7016
|
+
const V = L.type === "kaozhen", H = mr(L);
|
|
7005
7017
|
return /* @__PURE__ */ t(
|
|
7006
|
-
|
|
7018
|
+
Dl,
|
|
7007
7019
|
{
|
|
7008
7020
|
className: c,
|
|
7009
7021
|
style: d,
|
|
@@ -7023,7 +7035,7 @@ const hr = ({
|
|
|
7023
7035
|
workLabelCacheRef: I
|
|
7024
7036
|
}
|
|
7025
7037
|
);
|
|
7026
|
-
},
|
|
7038
|
+
}, Dl = ({
|
|
7027
7039
|
className: e,
|
|
7028
7040
|
style: n,
|
|
7029
7041
|
index: i,
|
|
@@ -7041,7 +7053,7 @@ const hr = ({
|
|
|
7041
7053
|
onNavigate: x,
|
|
7042
7054
|
workLabelCacheRef: y
|
|
7043
7055
|
}) => {
|
|
7044
|
-
const { matchStates: b } =
|
|
7056
|
+
const { matchStates: b } = Ol({
|
|
7045
7057
|
workId: o,
|
|
7046
7058
|
transport: c,
|
|
7047
7059
|
files: r,
|
|
@@ -7072,7 +7084,7 @@ const hr = ({
|
|
|
7072
7084
|
}
|
|
7073
7085
|
),
|
|
7074
7086
|
/* @__PURE__ */ t(
|
|
7075
|
-
|
|
7087
|
+
zl,
|
|
7076
7088
|
{
|
|
7077
7089
|
files: r,
|
|
7078
7090
|
groups: i.juan_groups,
|
|
@@ -7091,10 +7103,10 @@ const hr = ({
|
|
|
7091
7103
|
/* @__PURE__ */ t("strong", { style: { color: "var(--bim-fg, #333)" }, children: i.target_source })
|
|
7092
7104
|
] }) }),
|
|
7093
7105
|
i.text_quality && (() => {
|
|
7094
|
-
const m =
|
|
7106
|
+
const m = ml(i.text_quality.grade);
|
|
7095
7107
|
return m ? /* @__PURE__ */ a("div", { style: { fontSize: "12px", display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
7096
7108
|
/* @__PURE__ */ t("span", { children: "文本質量:" }),
|
|
7097
|
-
/* @__PURE__ */ t(
|
|
7109
|
+
/* @__PURE__ */ t(Po, { content: Er[m], children: /* @__PURE__ */ t(
|
|
7098
7110
|
"span",
|
|
7099
7111
|
{
|
|
7100
7112
|
style: {
|
|
@@ -7106,7 +7118,7 @@ const hr = ({
|
|
|
7106
7118
|
fontWeight: 600,
|
|
7107
7119
|
fontSize: "12px",
|
|
7108
7120
|
color: "#fff",
|
|
7109
|
-
background:
|
|
7121
|
+
background: Lr[m],
|
|
7110
7122
|
cursor: "help"
|
|
7111
7123
|
},
|
|
7112
7124
|
children: Ai[m]
|
|
@@ -7120,7 +7132,7 @@ const hr = ({
|
|
|
7120
7132
|
})()
|
|
7121
7133
|
] }),
|
|
7122
7134
|
g ? /* @__PURE__ */ t(et, {}) : p ? l ? /* @__PURE__ */ t(
|
|
7123
|
-
|
|
7135
|
+
Al,
|
|
7124
7136
|
{
|
|
7125
7137
|
juan: p,
|
|
7126
7138
|
searchQuery: h,
|
|
@@ -7129,7 +7141,7 @@ const hr = ({
|
|
|
7129
7141
|
workLabelCache: y
|
|
7130
7142
|
}
|
|
7131
7143
|
) : /* @__PURE__ */ t(
|
|
7132
|
-
|
|
7144
|
+
Ml,
|
|
7133
7145
|
{
|
|
7134
7146
|
juan: p,
|
|
7135
7147
|
rawText: u,
|
|
@@ -7190,14 +7202,14 @@ const hr = ({
|
|
|
7190
7202
|
] }, S))
|
|
7191
7203
|
] })
|
|
7192
7204
|
] }) });
|
|
7193
|
-
},
|
|
7205
|
+
}, Nl = {
|
|
7194
7206
|
bug: { label: "错误反馈", color: "var(--bim-danger, #f44336)" },
|
|
7195
7207
|
resource: { label: "资源建议", color: "var(--bim-primary, #0078d4)" }
|
|
7196
|
-
},
|
|
7208
|
+
}, Fl = {
|
|
7197
7209
|
pending: { label: "待处理", color: "var(--bim-warning, #ff9800)" },
|
|
7198
7210
|
resolved: { label: "已处理", color: "var(--bim-success, #4caf50)" }
|
|
7199
7211
|
};
|
|
7200
|
-
function
|
|
7212
|
+
function Vl(e) {
|
|
7201
7213
|
try {
|
|
7202
7214
|
const n = new Date(e), i = (r) => String(r).padStart(2, "0");
|
|
7203
7215
|
return `${n.getFullYear()}-${i(n.getMonth() + 1)}-${i(n.getDate())} ${i(n.getHours())}:${i(n.getMinutes())}`;
|
|
@@ -7205,40 +7217,40 @@ function Fl(e) {
|
|
|
7205
7217
|
return e;
|
|
7206
7218
|
}
|
|
7207
7219
|
}
|
|
7208
|
-
const
|
|
7220
|
+
const xr = ({ items: e, loading: n }) => {
|
|
7209
7221
|
const i = Ce();
|
|
7210
|
-
return n ? /* @__PURE__ */ t(et, {}) : e.length === 0 ? /* @__PURE__ */ t("div", { style:
|
|
7211
|
-
const l =
|
|
7212
|
-
return /* @__PURE__ */ a("div", { style:
|
|
7213
|
-
/* @__PURE__ */ a("div", { style:
|
|
7222
|
+
return n ? /* @__PURE__ */ t(et, {}) : e.length === 0 ? /* @__PURE__ */ t("div", { style: Gl, children: "暂无反馈" }) : /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: e.map((r) => {
|
|
7223
|
+
const l = Nl[r.type], o = Fl[r.status];
|
|
7224
|
+
return /* @__PURE__ */ a("div", { style: Yl, children: [
|
|
7225
|
+
/* @__PURE__ */ a("div", { style: Ul, children: [
|
|
7214
7226
|
/* @__PURE__ */ a("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
7215
7227
|
/* @__PURE__ */ t("span", { style: { ...ei, background: l.color }, children: l.label }),
|
|
7216
7228
|
/* @__PURE__ */ t("span", { style: { ...ei, background: o.color }, children: o.label })
|
|
7217
7229
|
] }),
|
|
7218
|
-
/* @__PURE__ */ t("span", { style:
|
|
7230
|
+
/* @__PURE__ */ t("span", { style: Kl, children: Vl(r.createdAt) })
|
|
7219
7231
|
] }),
|
|
7220
|
-
(r.resourceId || r.pageUrl) && /* @__PURE__ */ a("div", { style:
|
|
7232
|
+
(r.resourceId || r.pageUrl) && /* @__PURE__ */ a("div", { style: Jl, children: [
|
|
7221
7233
|
r.resourceId && /* @__PURE__ */ t("a", { href: i(r.resourceId), style: ti, children: r.resourceId }),
|
|
7222
7234
|
r.pageUrl && !r.resourceId && /* @__PURE__ */ t("a", { href: r.pageUrl, style: ti, children: r.pageUrl.replace(/^https?:\/\/[^/]+/, "") })
|
|
7223
7235
|
] }),
|
|
7224
|
-
/* @__PURE__ */ t("div", { style:
|
|
7225
|
-
r.reply && /* @__PURE__ */ a("div", { style:
|
|
7226
|
-
/* @__PURE__ */ t("div", { style:
|
|
7236
|
+
/* @__PURE__ */ t("div", { style: ql, children: r.content }),
|
|
7237
|
+
r.reply && /* @__PURE__ */ a("div", { style: Xl, children: [
|
|
7238
|
+
/* @__PURE__ */ t("div", { style: Zl, children: "回复" }),
|
|
7227
7239
|
/* @__PURE__ */ t("div", { children: r.reply })
|
|
7228
7240
|
] })
|
|
7229
7241
|
] }, r.id);
|
|
7230
7242
|
}) });
|
|
7231
|
-
},
|
|
7243
|
+
}, Gl = {
|
|
7232
7244
|
textAlign: "center",
|
|
7233
7245
|
padding: "40px 0",
|
|
7234
7246
|
color: "var(--bim-desc-fg, #999)",
|
|
7235
7247
|
fontSize: "14px"
|
|
7236
|
-
},
|
|
7248
|
+
}, Yl = {
|
|
7237
7249
|
background: "var(--bim-bg, #fff)",
|
|
7238
7250
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
7239
7251
|
borderRadius: "8px",
|
|
7240
7252
|
padding: "16px"
|
|
7241
|
-
},
|
|
7253
|
+
}, Ul = {
|
|
7242
7254
|
display: "flex",
|
|
7243
7255
|
justifyContent: "space-between",
|
|
7244
7256
|
alignItems: "center",
|
|
@@ -7251,22 +7263,22 @@ const mr = ({ items: e, loading: n }) => {
|
|
|
7251
7263
|
padding: "2px 8px",
|
|
7252
7264
|
borderRadius: "4px",
|
|
7253
7265
|
fontWeight: 500
|
|
7254
|
-
},
|
|
7266
|
+
}, Kl = {
|
|
7255
7267
|
fontSize: "12px",
|
|
7256
7268
|
color: "var(--bim-desc-fg, #999)"
|
|
7257
|
-
},
|
|
7269
|
+
}, Jl = {
|
|
7258
7270
|
fontSize: "12px",
|
|
7259
7271
|
marginBottom: "6px"
|
|
7260
7272
|
}, ti = {
|
|
7261
7273
|
color: "var(--bim-primary, #0078d4)",
|
|
7262
7274
|
textDecoration: "none",
|
|
7263
7275
|
borderBottom: "1px dashed var(--bim-primary, #0078d4)"
|
|
7264
|
-
},
|
|
7276
|
+
}, ql = {
|
|
7265
7277
|
fontSize: "14px",
|
|
7266
7278
|
lineHeight: "1.6",
|
|
7267
7279
|
color: "var(--bim-fg, #333)",
|
|
7268
7280
|
whiteSpace: "pre-wrap"
|
|
7269
|
-
},
|
|
7281
|
+
}, Xl = {
|
|
7270
7282
|
marginTop: "12px",
|
|
7271
7283
|
padding: "10px 12px",
|
|
7272
7284
|
background: "var(--bim-input-bg, #f5f5f5)",
|
|
@@ -7274,7 +7286,7 @@ const mr = ({ items: e, loading: n }) => {
|
|
|
7274
7286
|
fontSize: "13px",
|
|
7275
7287
|
lineHeight: "1.6",
|
|
7276
7288
|
color: "var(--bim-fg, #333)"
|
|
7277
|
-
},
|
|
7289
|
+
}, Zl = {
|
|
7278
7290
|
fontSize: "12px",
|
|
7279
7291
|
fontWeight: 600,
|
|
7280
7292
|
marginBottom: "4px",
|
|
@@ -7358,7 +7370,7 @@ const mr = ({ items: e, loading: n }) => {
|
|
|
7358
7370
|
return {
|
|
7359
7371
|
id: A.id,
|
|
7360
7372
|
title: A.title,
|
|
7361
|
-
type:
|
|
7373
|
+
type: Ir(A.id),
|
|
7362
7374
|
group: A.group,
|
|
7363
7375
|
fallbackDescription: A.description
|
|
7364
7376
|
};
|
|
@@ -7486,7 +7498,7 @@ const mr = ({ items: e, loading: n }) => {
|
|
|
7486
7498
|
)
|
|
7487
7499
|
] }),
|
|
7488
7500
|
k === "recommend" && /* @__PURE__ */ t(
|
|
7489
|
-
|
|
7501
|
+
Ql,
|
|
7490
7502
|
{
|
|
7491
7503
|
recommended: p,
|
|
7492
7504
|
loading: S,
|
|
@@ -7497,8 +7509,8 @@ const mr = ({ items: e, loading: n }) => {
|
|
|
7497
7509
|
),
|
|
7498
7510
|
k === "catalog" && /* @__PURE__ */ t(ii, { progress: w, t: c, onNavigate: n }),
|
|
7499
7511
|
k === "collection" && /* @__PURE__ */ t(ii, { progress: T, t: c, onNavigate: n }),
|
|
7500
|
-
k === "site" && /* @__PURE__ */ t(
|
|
7501
|
-
k === "feedback" && o && /* @__PURE__ */ t(
|
|
7512
|
+
k === "site" && /* @__PURE__ */ t(ta, { progress: B, t: c, totalWorks: (d == null ? void 0 : d.works) ?? 0 }),
|
|
7513
|
+
k === "feedback" && o && /* @__PURE__ */ t(xr, { items: f, loading: y })
|
|
7502
7514
|
] }) });
|
|
7503
7515
|
}, ht = ({ label: e, active: n, onClick: i }) => /* @__PURE__ */ t(
|
|
7504
7516
|
"button",
|
|
@@ -7517,7 +7529,7 @@ const mr = ({ items: e, loading: n }) => {
|
|
|
7517
7529
|
},
|
|
7518
7530
|
children: e
|
|
7519
7531
|
}
|
|
7520
|
-
),
|
|
7532
|
+
), Ql = ({ recommended: e, loading: n, onNavigate: i, getIcon: r, t: l }) => {
|
|
7521
7533
|
const o = Ce();
|
|
7522
7534
|
if (n)
|
|
7523
7535
|
return /* @__PURE__ */ t(et, {});
|
|
@@ -7610,10 +7622,10 @@ const mr = ({ items: e, loading: n }) => {
|
|
|
7610
7622
|
s.length,
|
|
7611
7623
|
")"
|
|
7612
7624
|
] }),
|
|
7613
|
-
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: s.map((p) => /* @__PURE__ */ t(
|
|
7625
|
+
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: s.map((p) => /* @__PURE__ */ t(ea, { item: p, t: n, statusColor: c[d], onNavigate: i }, p.id)) })
|
|
7614
7626
|
] }, d);
|
|
7615
7627
|
}) });
|
|
7616
|
-
},
|
|
7628
|
+
}, ea = ({ item: e, t: n, statusColor: i, onNavigate: r }) => {
|
|
7617
7629
|
const l = Ce(), o = e.total > 0 ? Math.round(e.imported / e.total * 100) : 0, c = e.type === "catalog" ? n.home.typeCatalog : n.home.typeCollection;
|
|
7618
7630
|
return /* @__PURE__ */ a("div", { style: {
|
|
7619
7631
|
padding: "12px 16px",
|
|
@@ -7665,7 +7677,7 @@ const mr = ({ items: e, loading: n }) => {
|
|
|
7665
7677
|
} }) }),
|
|
7666
7678
|
e.description && /* @__PURE__ */ t("div", { style: { fontSize: "12px", color: "var(--bim-desc-fg, #717171)", marginTop: "4px" }, children: e.description })
|
|
7667
7679
|
] });
|
|
7668
|
-
},
|
|
7680
|
+
}, ta = ({ progress: e, t: n, totalWorks: i }) => {
|
|
7669
7681
|
if (!e)
|
|
7670
7682
|
return /* @__PURE__ */ t(et, {});
|
|
7671
7683
|
const r = [...e.resources].sort((s, p) => s.priority - p.priority), l = r.filter((s) => s.imported > 0), o = r.filter((s) => s.imported === 0), c = l.reduce((s, p) => Math.max(s, p.imported), 0), d = i > 0 ? Math.round(c / i * 100) : 0;
|
|
@@ -7754,14 +7766,14 @@ const mr = ({ items: e, loading: n }) => {
|
|
|
7754
7766
|
e.description && /* @__PURE__ */ t("div", { style: { fontSize: "12px", color: "var(--bim-desc-fg, #717171)", marginTop: "4px" }, children: e.description })
|
|
7755
7767
|
] });
|
|
7756
7768
|
}, oi = "(max-width: 768px)";
|
|
7757
|
-
function
|
|
7769
|
+
function na() {
|
|
7758
7770
|
const [e, n] = R(() => typeof window > "u" ? !1 : window.matchMedia(oi).matches);
|
|
7759
7771
|
return M(() => {
|
|
7760
7772
|
const i = window.matchMedia(oi), r = (l) => n(l.matches);
|
|
7761
7773
|
return i.addEventListener("change", r), () => i.removeEventListener("change", r);
|
|
7762
7774
|
}, []), e;
|
|
7763
7775
|
}
|
|
7764
|
-
const
|
|
7776
|
+
const fc = ({
|
|
7765
7777
|
transport: e,
|
|
7766
7778
|
hideModeIndicator: n = !0,
|
|
7767
7779
|
onEntryClick: i,
|
|
@@ -7769,7 +7781,7 @@ const uc = ({
|
|
|
7769
7781
|
headerRight: l
|
|
7770
7782
|
}) => {
|
|
7771
7783
|
var V;
|
|
7772
|
-
const o = Y(), { convert: c } = N(), d =
|
|
7784
|
+
const o = Y(), { convert: c } = N(), d = na(), [s, p] = R(null), [u, g] = R(null), [h, f] = R(!1), [x, y] = R("detail"), [b, k] = R([]), [m, S] = R(!1), [_, w] = R(null), [C, T] = R(!1), I = U(async (H) => {
|
|
7773
7785
|
if (!e.getCollatedEditionIndex) {
|
|
7774
7786
|
w(null);
|
|
7775
7787
|
return;
|
|
@@ -7900,7 +7912,7 @@ const uc = ({
|
|
|
7900
7912
|
onNavigate: v
|
|
7901
7913
|
}
|
|
7902
7914
|
) : x === "collated" ? /* @__PURE__ */ t(
|
|
7903
|
-
|
|
7915
|
+
br,
|
|
7904
7916
|
{
|
|
7905
7917
|
index: _ || void 0,
|
|
7906
7918
|
workId: u.id,
|
|
@@ -8007,7 +8019,7 @@ function Bt(e) {
|
|
|
8007
8019
|
function Ye(e) {
|
|
8008
8020
|
return e.replace(/\.md$/, "");
|
|
8009
8021
|
}
|
|
8010
|
-
const
|
|
8022
|
+
const ia = ({
|
|
8011
8023
|
index: e,
|
|
8012
8024
|
bookId: n,
|
|
8013
8025
|
transport: i,
|
|
@@ -8126,7 +8138,7 @@ const na = ({
|
|
|
8126
8138
|
}, children: g.replace(/^##\s+[^\n]+\n+/, "") }),
|
|
8127
8139
|
!f && !g && /* @__PURE__ */ t("div", { style: { color: "var(--bim-desc-fg, #999)" }, children: "无法加载章节内容" })
|
|
8128
8140
|
] }) });
|
|
8129
|
-
},
|
|
8141
|
+
}, gc = ({
|
|
8130
8142
|
data: e,
|
|
8131
8143
|
onNavigate: n,
|
|
8132
8144
|
className: i,
|
|
@@ -8164,7 +8176,7 @@ const na = ({
|
|
|
8164
8176
|
] })
|
|
8165
8177
|
] }),
|
|
8166
8178
|
/* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: e.divisions.map((g) => /* @__PURE__ */ t(
|
|
8167
|
-
|
|
8179
|
+
ra,
|
|
8168
8180
|
{
|
|
8169
8181
|
division: g,
|
|
8170
8182
|
expanded: c === g.name,
|
|
@@ -8176,7 +8188,7 @@ const na = ({
|
|
|
8176
8188
|
g.name
|
|
8177
8189
|
)) })
|
|
8178
8190
|
] });
|
|
8179
|
-
},
|
|
8191
|
+
}, ra = ({ division: e, expanded: n, onToggle: i, expandedCat: r, onCatToggle: l, onNavigate: o }) => {
|
|
8180
8192
|
const { convert: c } = N(), d = e.categories.reduce((s, p) => {
|
|
8181
8193
|
const u = p.stats || { zhulu: 0, cunmu: 0 };
|
|
8182
8194
|
return s + (u.zhulu || 0) + (u.cunmu || 0);
|
|
@@ -8219,7 +8231,7 @@ const na = ({
|
|
|
8219
8231
|
n && /* @__PURE__ */ t("div", { style: { padding: "4px 0" }, children: e.categories.map((s) => {
|
|
8220
8232
|
const p = `${e.name}/${s.name}`;
|
|
8221
8233
|
return /* @__PURE__ */ t(
|
|
8222
|
-
|
|
8234
|
+
oa,
|
|
8223
8235
|
{
|
|
8224
8236
|
category: s,
|
|
8225
8237
|
expanded: r === p,
|
|
@@ -8230,7 +8242,7 @@ const na = ({
|
|
|
8230
8242
|
);
|
|
8231
8243
|
}) })
|
|
8232
8244
|
] });
|
|
8233
|
-
},
|
|
8245
|
+
}, oa = ({ category: e, expanded: n, onToggle: i, onNavigate: r }) => {
|
|
8234
8246
|
var s, p, u, g;
|
|
8235
8247
|
const { convert: l } = N(), o = ((s = e.books) == null ? void 0 : s.zhulu) || [], c = ((p = e.books) == null ? void 0 : p.cunmu) || [], d = (((u = e.stats) == null ? void 0 : u.zhulu) || o.length) + (((g = e.stats) == null ? void 0 : g.cunmu) || c.length);
|
|
8236
8248
|
return /* @__PURE__ */ a("div", { children: [
|
|
@@ -8338,13 +8350,13 @@ const na = ({
|
|
|
8338
8350
|
/* @__PURE__ */ t("div", { style: { fontSize: "14px", fontWeight: 600, color: "var(--bim-fg, #333)" }, children: e }),
|
|
8339
8351
|
/* @__PURE__ */ a("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
8340
8352
|
r,
|
|
8341
|
-
i && /* @__PURE__ */ t("button", { onClick: i, style:
|
|
8342
|
-
n && /* @__PURE__ */ t("button", { onClick: n, style:
|
|
8353
|
+
i && /* @__PURE__ */ t("button", { onClick: i, style: aa, children: "AI" }),
|
|
8354
|
+
n && /* @__PURE__ */ t("button", { onClick: n, style: la, children: o.action.save })
|
|
8343
8355
|
] })
|
|
8344
8356
|
] }),
|
|
8345
8357
|
l
|
|
8346
8358
|
] });
|
|
8347
|
-
},
|
|
8359
|
+
}, la = {
|
|
8348
8360
|
padding: "4px 12px",
|
|
8349
8361
|
fontSize: "12px",
|
|
8350
8362
|
border: "none",
|
|
@@ -8352,7 +8364,7 @@ const na = ({
|
|
|
8352
8364
|
background: "var(--bim-primary, #0078d4)",
|
|
8353
8365
|
color: "var(--bim-primary-fg, #fff)",
|
|
8354
8366
|
cursor: "pointer"
|
|
8355
|
-
},
|
|
8367
|
+
}, aa = {
|
|
8356
8368
|
padding: "4px 12px",
|
|
8357
8369
|
fontSize: "12px",
|
|
8358
8370
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
@@ -8429,12 +8441,12 @@ const na = ({
|
|
|
8429
8441
|
color: n ? "#fff" : "var(--bim-fg, #333)",
|
|
8430
8442
|
...i
|
|
8431
8443
|
}, children: e });
|
|
8432
|
-
function
|
|
8444
|
+
function sa(e) {
|
|
8433
8445
|
const n = e.match(/^\[(.+?)\]\(bid:(.+?)\)$/);
|
|
8434
8446
|
return n ? { name: n[1], id: n[2] } : null;
|
|
8435
8447
|
}
|
|
8436
8448
|
const Zt = ({ value: e, onChange: n, label: i }) => {
|
|
8437
|
-
const [r, l] = R(!1), o = de(null), c =
|
|
8449
|
+
const [r, l] = R(!1), o = de(null), c = sa(e || "");
|
|
8438
8450
|
return M(() => {
|
|
8439
8451
|
r && o.current && o.current.focus();
|
|
8440
8452
|
}, [r]), !r && c ? /* @__PURE__ */ a("div", { style: { marginBottom: "16px" }, children: [
|
|
@@ -8491,7 +8503,7 @@ const Zt = ({ value: e, onChange: n, label: i }) => {
|
|
|
8491
8503
|
marginBottom: "4px",
|
|
8492
8504
|
fontWeight: 500
|
|
8493
8505
|
};
|
|
8494
|
-
function
|
|
8506
|
+
function ca(e) {
|
|
8495
8507
|
switch (e) {
|
|
8496
8508
|
case "url":
|
|
8497
8509
|
return "var(--bim-source-url, #2196f3)";
|
|
@@ -8501,7 +8513,7 @@ function sa(e) {
|
|
|
8501
8513
|
return "var(--bim-desc-fg, #717171)";
|
|
8502
8514
|
}
|
|
8503
8515
|
}
|
|
8504
|
-
function
|
|
8516
|
+
function da(e) {
|
|
8505
8517
|
switch (e) {
|
|
8506
8518
|
case "url":
|
|
8507
8519
|
return "URL";
|
|
@@ -8511,7 +8523,7 @@ function ca(e) {
|
|
|
8511
8523
|
return "未选择";
|
|
8512
8524
|
}
|
|
8513
8525
|
}
|
|
8514
|
-
const
|
|
8526
|
+
const pa = ({ items: e, onChange: n, onOpenEntityPicker: i }) => {
|
|
8515
8527
|
const r = Y(), [l, o] = R(null), c = () => {
|
|
8516
8528
|
n([...e, { id: "", name: "", type: "", details: "", position: "", version: "", processor_version: "" }]), o(e.length);
|
|
8517
8529
|
}, d = (g) => {
|
|
@@ -8546,7 +8558,7 @@ const da = ({ items: e, onChange: n, onOpenEntityPicker: i }) => {
|
|
|
8546
8558
|
children: [
|
|
8547
8559
|
/* @__PURE__ */ t("span", { style: { opacity: 0.6, fontSize: "12px" }, children: l === h ? "▼" : "▶" }),
|
|
8548
8560
|
/* @__PURE__ */ t("span", { style: { flex: 1, fontSize: "13px", fontWeight: 500, color: "var(--bim-fg, #333)" }, children: g.name || `${r.editor.sourcePlaceholder} ${h + 1}` }),
|
|
8549
|
-
g.type && /* @__PURE__ */ t("span", { style: { fontSize: "11px", padding: "2px 8px", background:
|
|
8561
|
+
g.type && /* @__PURE__ */ t("span", { style: { fontSize: "11px", padding: "2px 8px", background: ca(g.type), color: "white", borderRadius: "3px", fontWeight: 500 }, children: da(g.type) }),
|
|
8550
8562
|
/* @__PURE__ */ t(
|
|
8551
8563
|
"button",
|
|
8552
8564
|
{
|
|
@@ -8693,7 +8705,7 @@ const da = ({ items: e, onChange: n, onOpenEntityPicker: i }) => {
|
|
|
8693
8705
|
fontSize: "11px",
|
|
8694
8706
|
padding: 0
|
|
8695
8707
|
};
|
|
8696
|
-
function
|
|
8708
|
+
function ua(e) {
|
|
8697
8709
|
if (!e || !e.trim()) return [];
|
|
8698
8710
|
try {
|
|
8699
8711
|
const n = JSON.parse(e);
|
|
@@ -8711,10 +8723,10 @@ function pa(e) {
|
|
|
8711
8723
|
}
|
|
8712
8724
|
return [];
|
|
8713
8725
|
}
|
|
8714
|
-
function
|
|
8726
|
+
function fa(e) {
|
|
8715
8727
|
return !e || e.length === 0 ? "" : JSON.stringify(e);
|
|
8716
8728
|
}
|
|
8717
|
-
const
|
|
8729
|
+
const ga = ({
|
|
8718
8730
|
entityType: e,
|
|
8719
8731
|
entityId: n,
|
|
8720
8732
|
entityTitle: i,
|
|
@@ -8754,7 +8766,7 @@ const fa = ({
|
|
|
8754
8766
|
/* @__PURE__ */ t("span", { children: "🔗" }),
|
|
8755
8767
|
/* @__PURE__ */ t("span", { children: b.section.relations })
|
|
8756
8768
|
] }),
|
|
8757
|
-
y && /* @__PURE__ */ t("button", { onClick: y, style:
|
|
8769
|
+
y && /* @__PURE__ */ t("button", { onClick: y, style: ha, children: b.action.save })
|
|
8758
8770
|
] }),
|
|
8759
8771
|
/* @__PURE__ */ a("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
8760
8772
|
e === "book" && /* @__PURE__ */ a(P, { children: [
|
|
@@ -8935,7 +8947,7 @@ const fa = ({
|
|
|
8935
8947
|
] }),
|
|
8936
8948
|
i ? /* @__PURE__ */ a("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", padding: "8px", background: "var(--bim-bg, #fff)", borderRadius: "4px" }, children: [
|
|
8937
8949
|
/* @__PURE__ */ a("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
8938
|
-
/* @__PURE__ */ t("span", { children:
|
|
8950
|
+
/* @__PURE__ */ t("span", { children: yr(i.type) }),
|
|
8939
8951
|
/* @__PURE__ */ t("span", { style: { fontWeight: 500 }, children: i.title }),
|
|
8940
8952
|
/* @__PURE__ */ t("span", { style: { fontSize: "11px", opacity: 0.6 }, children: i.id })
|
|
8941
8953
|
] }),
|
|
@@ -8957,7 +8969,7 @@ const fa = ({
|
|
|
8957
8969
|
] }),
|
|
8958
8970
|
i.length > 0 ? /* @__PURE__ */ a("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
8959
8971
|
h.map((f) => /* @__PURE__ */ a("div", { onClick: () => r(f), style: { display: "flex", alignItems: "center", gap: "8px", padding: "6px 8px", background: "var(--bim-bg, #fff)", borderRadius: "4px", cursor: "pointer", fontSize: "13px" }, children: [
|
|
8960
|
-
/* @__PURE__ */ t("span", { children:
|
|
8972
|
+
/* @__PURE__ */ t("span", { children: yr(f.type) }),
|
|
8961
8973
|
/* @__PURE__ */ t("span", { children: f.title })
|
|
8962
8974
|
] }, f.id)),
|
|
8963
8975
|
i.length > 5 && !s && /* @__PURE__ */ a("div", { onClick: () => p(!0), style: { padding: "4px 8px", textAlign: "center", fontSize: "12px", color: "var(--bim-link-fg, #0066cc)", cursor: "pointer" }, children: [
|
|
@@ -8991,7 +9003,7 @@ const fa = ({
|
|
|
8991
9003
|
color: n ? "var(--bim-primary-fg, #fff)" : "inherit",
|
|
8992
9004
|
cursor: "pointer"
|
|
8993
9005
|
}, children: i });
|
|
8994
|
-
function
|
|
9006
|
+
function yr(e) {
|
|
8995
9007
|
switch (e) {
|
|
8996
9008
|
case "work":
|
|
8997
9009
|
return "📜";
|
|
@@ -9001,7 +9013,7 @@ function br(e) {
|
|
|
9001
9013
|
return "📚";
|
|
9002
9014
|
}
|
|
9003
9015
|
}
|
|
9004
|
-
const
|
|
9016
|
+
const ha = {
|
|
9005
9017
|
padding: "4px 12px",
|
|
9006
9018
|
fontSize: "12px",
|
|
9007
9019
|
border: "none",
|
|
@@ -9012,7 +9024,7 @@ const ga = {
|
|
|
9012
9024
|
display: "flex",
|
|
9013
9025
|
alignItems: "center",
|
|
9014
9026
|
gap: "4px"
|
|
9015
|
-
},
|
|
9027
|
+
}, ma = ({
|
|
9016
9028
|
isOpen: e,
|
|
9017
9029
|
entityType: n,
|
|
9018
9030
|
title: i,
|
|
@@ -9033,10 +9045,10 @@ const ga = {
|
|
|
9033
9045
|
};
|
|
9034
9046
|
if (!e) return null;
|
|
9035
9047
|
const x = n === "work" ? "作品" : n === "book" ? "书籍" : "丛编", y = n === "work" ? "📜" : n === "book" ? "📖" : "📚";
|
|
9036
|
-
return /* @__PURE__ */ t("div", { style:
|
|
9048
|
+
return /* @__PURE__ */ t("div", { style: ba, children: /* @__PURE__ */ a("div", { style: xa, children: [
|
|
9037
9049
|
/* @__PURE__ */ a("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", padding: "16px", borderBottom: "1px solid var(--bim-widget-border, #e0e0e0)" }, children: [
|
|
9038
9050
|
/* @__PURE__ */ t("div", { style: { fontSize: "14px", fontWeight: 600 }, children: i }),
|
|
9039
|
-
/* @__PURE__ */ t("button", { onClick: l, style:
|
|
9051
|
+
/* @__PURE__ */ t("button", { onClick: l, style: ya, children: "✕" })
|
|
9040
9052
|
] }),
|
|
9041
9053
|
/* @__PURE__ */ t("div", { style: { padding: "12px 16px" }, children: /* @__PURE__ */ t(
|
|
9042
9054
|
"input",
|
|
@@ -9046,10 +9058,10 @@ const ga = {
|
|
|
9046
9058
|
onChange: (b) => f(b.target.value),
|
|
9047
9059
|
placeholder: `搜索${x}名称或 ID...`,
|
|
9048
9060
|
autoFocus: !0,
|
|
9049
|
-
style:
|
|
9061
|
+
style: va
|
|
9050
9062
|
}
|
|
9051
9063
|
) }),
|
|
9052
|
-
/* @__PURE__ */ t("div", { style: { flex: 1, overflowY: "auto", padding: "0 16px" }, children: s ? /* @__PURE__ */ t("div", { style: Qt, children: "搜索中..." }) : h.length > 0 ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: h.map((b) => /* @__PURE__ */ a("div", { onClick: () => r(b), style:
|
|
9064
|
+
/* @__PURE__ */ t("div", { style: { flex: 1, overflowY: "auto", padding: "0 16px" }, children: s ? /* @__PURE__ */ t("div", { style: Qt, children: "搜索中..." }) : h.length > 0 ? /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: h.map((b) => /* @__PURE__ */ a("div", { onClick: () => r(b), style: Sa, children: [
|
|
9053
9065
|
/* @__PURE__ */ t("span", { style: { fontSize: "16px" }, children: y }),
|
|
9054
9066
|
/* @__PURE__ */ a("div", { style: { flex: 1 }, children: [
|
|
9055
9067
|
/* @__PURE__ */ a("div", { style: { fontWeight: 500 }, children: [
|
|
@@ -9071,14 +9083,14 @@ const ga = {
|
|
|
9071
9083
|
] }) }),
|
|
9072
9084
|
/* @__PURE__ */ a("div", { style: { padding: "12px 16px", borderTop: "1px solid var(--bim-widget-border, #e0e0e0)", display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
9073
9085
|
/* @__PURE__ */ t("span", { style: { fontSize: "12px", opacity: 0.7 }, children: "找不到?" }),
|
|
9074
|
-
/* @__PURE__ */ a("button", { onClick: o, style:
|
|
9086
|
+
/* @__PURE__ */ a("button", { onClick: o, style: ka, children: [
|
|
9075
9087
|
"创建新",
|
|
9076
9088
|
x,
|
|
9077
9089
|
"并关联"
|
|
9078
9090
|
] })
|
|
9079
9091
|
] })
|
|
9080
9092
|
] }) });
|
|
9081
|
-
},
|
|
9093
|
+
}, ba = {
|
|
9082
9094
|
position: "fixed",
|
|
9083
9095
|
top: 0,
|
|
9084
9096
|
left: 0,
|
|
@@ -9089,7 +9101,7 @@ const ga = {
|
|
|
9089
9101
|
alignItems: "center",
|
|
9090
9102
|
justifyContent: "center",
|
|
9091
9103
|
zIndex: 1e3
|
|
9092
|
-
},
|
|
9104
|
+
}, xa = {
|
|
9093
9105
|
background: "var(--bim-bg, #fff)",
|
|
9094
9106
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
9095
9107
|
borderRadius: "8px",
|
|
@@ -9099,14 +9111,14 @@ const ga = {
|
|
|
9099
9111
|
display: "flex",
|
|
9100
9112
|
flexDirection: "column",
|
|
9101
9113
|
boxShadow: "0 4px 20px rgba(0,0,0,0.3)"
|
|
9102
|
-
},
|
|
9114
|
+
}, ya = {
|
|
9103
9115
|
background: "transparent",
|
|
9104
9116
|
border: "none",
|
|
9105
9117
|
fontSize: "18px",
|
|
9106
9118
|
cursor: "pointer",
|
|
9107
9119
|
opacity: 0.7,
|
|
9108
9120
|
color: "inherit"
|
|
9109
|
-
},
|
|
9121
|
+
}, va = {
|
|
9110
9122
|
width: "100%",
|
|
9111
9123
|
padding: "10px 12px",
|
|
9112
9124
|
border: "1px solid var(--bim-input-border, #ccc)",
|
|
@@ -9115,7 +9127,7 @@ const ga = {
|
|
|
9115
9127
|
color: "var(--bim-input-fg, #333)",
|
|
9116
9128
|
fontSize: "13px",
|
|
9117
9129
|
boxSizing: "border-box"
|
|
9118
|
-
},
|
|
9130
|
+
}, Sa = {
|
|
9119
9131
|
display: "flex",
|
|
9120
9132
|
alignItems: "center",
|
|
9121
9133
|
gap: "10px",
|
|
@@ -9127,7 +9139,7 @@ const ga = {
|
|
|
9127
9139
|
padding: "20px",
|
|
9128
9140
|
textAlign: "center",
|
|
9129
9141
|
color: "var(--bim-desc-fg, #717171)"
|
|
9130
|
-
},
|
|
9142
|
+
}, ka = {
|
|
9131
9143
|
padding: "6px 12px",
|
|
9132
9144
|
fontSize: "12px",
|
|
9133
9145
|
border: "none",
|
|
@@ -9135,7 +9147,7 @@ const ga = {
|
|
|
9135
9147
|
background: "var(--bim-primary, #0078d4)",
|
|
9136
9148
|
color: "var(--bim-primary-fg, #fff)",
|
|
9137
9149
|
cursor: "pointer"
|
|
9138
|
-
}, pi = { work: "作品", book: "书籍", collection: "丛编", entity: "人物" },
|
|
9150
|
+
}, pi = { work: "作品", book: "书籍", collection: "丛编", entity: "人物" }, wa = { work: "📜", book: "📖", collection: "📚", entity: "👤" }, _a = ({
|
|
9139
9151
|
isOpen: e,
|
|
9140
9152
|
entityType: n,
|
|
9141
9153
|
relationField: i,
|
|
@@ -9177,11 +9189,11 @@ const ga = {
|
|
|
9177
9189
|
return `创建新${pi[n]}`;
|
|
9178
9190
|
}
|
|
9179
9191
|
};
|
|
9180
|
-
return /* @__PURE__ */ t("div", { style:
|
|
9192
|
+
return /* @__PURE__ */ t("div", { style: Ia, onClick: (h) => {
|
|
9181
9193
|
h.target === h.currentTarget && o();
|
|
9182
|
-
}, children: /* @__PURE__ */ a("div", { style:
|
|
9194
|
+
}, children: /* @__PURE__ */ a("div", { style: Ca, onClick: (h) => h.stopPropagation(), children: [
|
|
9183
9195
|
/* @__PURE__ */ a("div", { style: { fontSize: "16px", fontWeight: 600, marginBottom: "16px", display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
9184
|
-
/* @__PURE__ */ t("span", { children:
|
|
9196
|
+
/* @__PURE__ */ t("span", { children: wa[n] }),
|
|
9185
9197
|
/* @__PURE__ */ t("span", { children: g() })
|
|
9186
9198
|
] }),
|
|
9187
9199
|
/* @__PURE__ */ a("div", { style: { marginBottom: "16px" }, children: [
|
|
@@ -9198,7 +9210,7 @@ const ga = {
|
|
|
9198
9210
|
onChange: (h) => d(h.target.value),
|
|
9199
9211
|
onKeyDown: p,
|
|
9200
9212
|
placeholder: `请输入${pi[n]}名称...`,
|
|
9201
|
-
style:
|
|
9213
|
+
style: za
|
|
9202
9214
|
}
|
|
9203
9215
|
)
|
|
9204
9216
|
] }),
|
|
@@ -9214,15 +9226,15 @@ const ga = {
|
|
|
9214
9226
|
] })
|
|
9215
9227
|
] }),
|
|
9216
9228
|
/* @__PURE__ */ a("div", { style: { display: "flex", justifyContent: "flex-end", gap: "8px" }, children: [
|
|
9217
|
-
/* @__PURE__ */ t("button", { onClick: o, style:
|
|
9229
|
+
/* @__PURE__ */ t("button", { onClick: o, style: Ta, children: "取消" }),
|
|
9218
9230
|
/* @__PURE__ */ t("button", { onClick: u, disabled: !c.trim(), style: {
|
|
9219
|
-
...
|
|
9231
|
+
...Ra,
|
|
9220
9232
|
opacity: c.trim() ? 1 : 0.6,
|
|
9221
9233
|
cursor: c.trim() ? "pointer" : "not-allowed"
|
|
9222
9234
|
}, children: "创建" })
|
|
9223
9235
|
] })
|
|
9224
9236
|
] }) });
|
|
9225
|
-
},
|
|
9237
|
+
}, Ia = {
|
|
9226
9238
|
position: "fixed",
|
|
9227
9239
|
top: 0,
|
|
9228
9240
|
left: 0,
|
|
@@ -9233,7 +9245,7 @@ const ga = {
|
|
|
9233
9245
|
alignItems: "center",
|
|
9234
9246
|
justifyContent: "center",
|
|
9235
9247
|
zIndex: 1e3
|
|
9236
|
-
},
|
|
9248
|
+
}, Ca = {
|
|
9237
9249
|
background: "var(--bim-bg, #fff)",
|
|
9238
9250
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
9239
9251
|
borderRadius: "8px",
|
|
@@ -9241,7 +9253,7 @@ const ga = {
|
|
|
9241
9253
|
width: "100%",
|
|
9242
9254
|
maxWidth: "min(500px, calc(100vw - 32px))",
|
|
9243
9255
|
boxShadow: "0 4px 20px rgba(0,0,0,0.3)"
|
|
9244
|
-
},
|
|
9256
|
+
}, za = {
|
|
9245
9257
|
width: "100%",
|
|
9246
9258
|
padding: "8px 12px",
|
|
9247
9259
|
fontSize: "14px",
|
|
@@ -9251,7 +9263,7 @@ const ga = {
|
|
|
9251
9263
|
color: "var(--bim-input-fg, #333)",
|
|
9252
9264
|
outline: "none",
|
|
9253
9265
|
boxSizing: "border-box"
|
|
9254
|
-
},
|
|
9266
|
+
}, Ta = {
|
|
9255
9267
|
padding: "8px 16px",
|
|
9256
9268
|
fontSize: "13px",
|
|
9257
9269
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
@@ -9259,7 +9271,7 @@ const ga = {
|
|
|
9259
9271
|
background: "transparent",
|
|
9260
9272
|
color: "var(--bim-fg, #333)",
|
|
9261
9273
|
cursor: "pointer"
|
|
9262
|
-
},
|
|
9274
|
+
}, Ra = {
|
|
9263
9275
|
padding: "8px 16px",
|
|
9264
9276
|
fontSize: "13px",
|
|
9265
9277
|
border: "none",
|
|
@@ -9267,7 +9279,7 @@ const ga = {
|
|
|
9267
9279
|
background: "var(--bim-primary, #0078d4)",
|
|
9268
9280
|
color: "var(--bim-primary-fg, #fff)"
|
|
9269
9281
|
};
|
|
9270
|
-
function
|
|
9282
|
+
function Ba(e) {
|
|
9271
9283
|
switch (e) {
|
|
9272
9284
|
case "work":
|
|
9273
9285
|
return "📜";
|
|
@@ -9279,7 +9291,7 @@ function Ra(e) {
|
|
|
9279
9291
|
return "📄";
|
|
9280
9292
|
}
|
|
9281
9293
|
}
|
|
9282
|
-
function
|
|
9294
|
+
function vr(e) {
|
|
9283
9295
|
switch (e) {
|
|
9284
9296
|
case "work":
|
|
9285
9297
|
return "作品";
|
|
@@ -9291,7 +9303,7 @@ function xr(e) {
|
|
|
9291
9303
|
return "实体";
|
|
9292
9304
|
}
|
|
9293
9305
|
}
|
|
9294
|
-
function
|
|
9306
|
+
function Ea(e) {
|
|
9295
9307
|
switch (e) {
|
|
9296
9308
|
case "work":
|
|
9297
9309
|
return "var(--bim-editor-type-work, #4caf50)";
|
|
@@ -9303,7 +9315,7 @@ function Ba(e) {
|
|
|
9303
9315
|
return "var(--bim-desc-fg, #717171)";
|
|
9304
9316
|
}
|
|
9305
9317
|
}
|
|
9306
|
-
const
|
|
9318
|
+
const La = ({
|
|
9307
9319
|
isOpen: e,
|
|
9308
9320
|
title: n,
|
|
9309
9321
|
filterType: i = "all",
|
|
@@ -9340,11 +9352,11 @@ const Ea = ({
|
|
|
9340
9352
|
h(I.target.value), I.target.value.trim() && m("search");
|
|
9341
9353
|
}, []), _ = U((I) => l ? I.filter((B) => B.id !== l) : I, [l]);
|
|
9342
9354
|
if (!e) return null;
|
|
9343
|
-
const w = n || (i === "all" ? "选择实体" : `选择${
|
|
9344
|
-
return /* @__PURE__ */ t("div", { style:
|
|
9355
|
+
const w = n || (i === "all" ? "选择实体" : `选择${vr(i)}`), C = _(r), T = _(f);
|
|
9356
|
+
return /* @__PURE__ */ t("div", { style: $a, children: /* @__PURE__ */ a("div", { style: Aa, children: [
|
|
9345
9357
|
/* @__PURE__ */ a("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", padding: "16px 20px", borderBottom: "1px solid var(--bim-widget-border, #e0e0e0)" }, children: [
|
|
9346
9358
|
/* @__PURE__ */ t("div", { style: { fontSize: "15px", fontWeight: 600 }, children: w }),
|
|
9347
|
-
/* @__PURE__ */ t("button", { onClick: s, style:
|
|
9359
|
+
/* @__PURE__ */ t("button", { onClick: s, style: Pa, children: "✕" })
|
|
9348
9360
|
] }),
|
|
9349
9361
|
/* @__PURE__ */ t("div", { style: { padding: "16px 20px 12px" }, children: /* @__PURE__ */ a("div", { style: { position: "relative" }, children: [
|
|
9350
9362
|
/* @__PURE__ */ t(
|
|
@@ -9355,7 +9367,7 @@ const Ea = ({
|
|
|
9355
9367
|
onChange: S,
|
|
9356
9368
|
placeholder: "输入名称或 ID 搜索...",
|
|
9357
9369
|
autoFocus: !0,
|
|
9358
|
-
style:
|
|
9370
|
+
style: ja
|
|
9359
9371
|
}
|
|
9360
9372
|
),
|
|
9361
9373
|
/* @__PURE__ */ t("span", { style: { position: "absolute", left: "14px", top: "50%", transform: "translateY(-50%)", opacity: 0.5, fontSize: "14px" }, children: "🔍" }),
|
|
@@ -9375,7 +9387,7 @@ const Ea = ({
|
|
|
9375
9387
|
/* @__PURE__ */ t("div", { style: { flex: 1, overflowY: "auto", padding: "12px 20px", minHeight: "200px", maxHeight: "400px" }, children: k === "recent" && C.length > 0 ? /* @__PURE__ */ t(fi, { entities: C, onSelect: d }) : g.trim() ? y ? /* @__PURE__ */ t(en, { message: "搜索中..." }) : T.length > 0 ? /* @__PURE__ */ t(fi, { entities: T, onSelect: d }) : /* @__PURE__ */ t(en, { message: "未找到匹配的结果" }) : /* @__PURE__ */ t(en, { message: "输入关键词开始搜索" }) }),
|
|
9376
9388
|
o && p && /* @__PURE__ */ a("div", { style: { padding: "12px 20px", borderTop: "1px solid var(--bim-widget-border, #e0e0e0)", display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
9377
9389
|
/* @__PURE__ */ t("span", { style: { fontSize: "12px", opacity: 0.7 }, children: "找不到?" }),
|
|
9378
|
-
/* @__PURE__ */ t("button", { onClick: p, style:
|
|
9390
|
+
/* @__PURE__ */ t("button", { onClick: p, style: Ma, children: c || "创建新实体" })
|
|
9379
9391
|
] })
|
|
9380
9392
|
] }) });
|
|
9381
9393
|
}, ui = ({ active: e, onClick: n, children: i }) => /* @__PURE__ */ t("button", { onClick: n, style: {
|
|
@@ -9388,7 +9400,7 @@ const Ea = ({
|
|
|
9388
9400
|
fontSize: "12px",
|
|
9389
9401
|
fontWeight: e ? 600 : 400,
|
|
9390
9402
|
marginBottom: "-1px"
|
|
9391
|
-
}, children: i }), fi = ({ entities: e, onSelect: n }) => /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: e.map((i) => /* @__PURE__ */ t(
|
|
9403
|
+
}, children: i }), fi = ({ entities: e, onSelect: n }) => /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: e.map((i) => /* @__PURE__ */ t(Wa, { entity: i, onClick: () => n(i) }, i.id)) }), Wa = ({ entity: e, onClick: n }) => {
|
|
9392
9404
|
const [i, r] = R(!1);
|
|
9393
9405
|
return /* @__PURE__ */ a(
|
|
9394
9406
|
"div",
|
|
@@ -9407,7 +9419,7 @@ const Ea = ({
|
|
|
9407
9419
|
transition: "background 0.1s"
|
|
9408
9420
|
},
|
|
9409
9421
|
children: [
|
|
9410
|
-
/* @__PURE__ */ t("span", { style: { fontSize: "18px" }, children:
|
|
9422
|
+
/* @__PURE__ */ t("span", { style: { fontSize: "18px" }, children: Ba(e.type) }),
|
|
9411
9423
|
/* @__PURE__ */ a("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
9412
9424
|
/* @__PURE__ */ a("div", { style: { fontWeight: 500, fontSize: "13px", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: [
|
|
9413
9425
|
e.title,
|
|
@@ -9419,11 +9431,11 @@ const Ea = ({
|
|
|
9419
9431
|
e.dynasty && /* @__PURE__ */ t("span", { children: e.dynasty })
|
|
9420
9432
|
] })
|
|
9421
9433
|
] }),
|
|
9422
|
-
/* @__PURE__ */ t("span", { style: { fontSize: "10px", padding: "3px 8px", background:
|
|
9434
|
+
/* @__PURE__ */ t("span", { style: { fontSize: "10px", padding: "3px 8px", background: Ea(e.type), color: "white", borderRadius: "4px", fontWeight: 500, flexShrink: 0 }, children: vr(e.type) })
|
|
9423
9435
|
]
|
|
9424
9436
|
}
|
|
9425
9437
|
);
|
|
9426
|
-
}, en = ({ message: e }) => /* @__PURE__ */ t("div", { style: { padding: "40px 20px", textAlign: "center", color: "var(--bim-desc-fg, #717171)", fontSize: "13px" }, children: e }),
|
|
9438
|
+
}, en = ({ message: e }) => /* @__PURE__ */ t("div", { style: { padding: "40px 20px", textAlign: "center", color: "var(--bim-desc-fg, #717171)", fontSize: "13px" }, children: e }), $a = {
|
|
9427
9439
|
position: "fixed",
|
|
9428
9440
|
top: 0,
|
|
9429
9441
|
left: 0,
|
|
@@ -9434,7 +9446,7 @@ const Ea = ({
|
|
|
9434
9446
|
alignItems: "center",
|
|
9435
9447
|
justifyContent: "center",
|
|
9436
9448
|
zIndex: 1e3
|
|
9437
|
-
},
|
|
9449
|
+
}, Aa = {
|
|
9438
9450
|
background: "var(--bim-bg, #fff)",
|
|
9439
9451
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
9440
9452
|
borderRadius: "8px",
|
|
@@ -9444,7 +9456,7 @@ const Ea = ({
|
|
|
9444
9456
|
display: "flex",
|
|
9445
9457
|
flexDirection: "column",
|
|
9446
9458
|
boxShadow: "0 4px 20px rgba(0,0,0,0.3)"
|
|
9447
|
-
},
|
|
9459
|
+
}, Pa = {
|
|
9448
9460
|
background: "transparent",
|
|
9449
9461
|
border: "none",
|
|
9450
9462
|
fontSize: "18px",
|
|
@@ -9452,7 +9464,7 @@ const Ea = ({
|
|
|
9452
9464
|
opacity: 0.7,
|
|
9453
9465
|
color: "inherit",
|
|
9454
9466
|
padding: "4px 8px"
|
|
9455
|
-
},
|
|
9467
|
+
}, ja = {
|
|
9456
9468
|
width: "100%",
|
|
9457
9469
|
padding: "12px 16px",
|
|
9458
9470
|
paddingLeft: "40px",
|
|
@@ -9462,7 +9474,7 @@ const Ea = ({
|
|
|
9462
9474
|
color: "var(--bim-input-fg, #333)",
|
|
9463
9475
|
fontSize: "13px",
|
|
9464
9476
|
boxSizing: "border-box"
|
|
9465
|
-
},
|
|
9477
|
+
}, Ma = {
|
|
9466
9478
|
padding: "6px 14px",
|
|
9467
9479
|
fontSize: "12px",
|
|
9468
9480
|
border: "none",
|
|
@@ -9470,12 +9482,12 @@ const Ea = ({
|
|
|
9470
9482
|
background: "var(--bim-primary, #0078d4)",
|
|
9471
9483
|
color: "var(--bim-primary-fg, #fff)",
|
|
9472
9484
|
cursor: "pointer"
|
|
9473
|
-
},
|
|
9485
|
+
}, Ha = {
|
|
9474
9486
|
work: "var(--bim-editor-type-work, #4caf50)",
|
|
9475
9487
|
collection: "var(--bim-editor-type-collection, #2196f3)",
|
|
9476
9488
|
book: "var(--bim-editor-type-book, #ff9800)",
|
|
9477
9489
|
entity: "var(--bim-editor-type-entity, #9c27b0)"
|
|
9478
|
-
},
|
|
9490
|
+
}, Oa = { work: "📜", collection: "📚", book: "📖", entity: "👤" }, Da = ({
|
|
9479
9491
|
data: e,
|
|
9480
9492
|
onChange: n,
|
|
9481
9493
|
onSave: i,
|
|
@@ -9535,10 +9547,10 @@ const Ea = ({
|
|
|
9535
9547
|
borderBottom: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
9536
9548
|
paddingBottom: "16px"
|
|
9537
9549
|
}, children: /* @__PURE__ */ a("h1", { style: { fontSize: "20px", fontWeight: 600, margin: 0, display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
9538
|
-
/* @__PURE__ */ t("span", { children:
|
|
9550
|
+
/* @__PURE__ */ t("span", { children: Oa[$] }),
|
|
9539
9551
|
/* @__PURE__ */ t("span", { children: e.title || f.editor.untitled }),
|
|
9540
9552
|
/* @__PURE__ */ t(cn, { children: e.id }),
|
|
9541
|
-
/* @__PURE__ */ t(cn, { color:
|
|
9553
|
+
/* @__PURE__ */ t(cn, { color: Ha[$], children: f.indexType[$] })
|
|
9542
9554
|
] }) }),
|
|
9543
9555
|
/* @__PURE__ */ t(
|
|
9544
9556
|
Ae,
|
|
@@ -9568,21 +9580,21 @@ const Ea = ({
|
|
|
9568
9580
|
),
|
|
9569
9581
|
/* @__PURE__ */ t(Ae, { title: f.section.description, onSave: i, onAskAI: d ? () => d("介绍") : void 0, children: /* @__PURE__ */ t(rt, { value: e.description || "", onChange: (W) => J("description", W), placeholder: f.editor.descriptionPlaceholder }) }),
|
|
9570
9582
|
(((le = e.additional_works) == null ? void 0 : le.length) || 0) > 0 && /* @__PURE__ */ t(Ae, { title: f.section.additionalWorks, onSave: i, children: /* @__PURE__ */ t(
|
|
9571
|
-
|
|
9583
|
+
Na,
|
|
9572
9584
|
{
|
|
9573
9585
|
items: e.additional_works || [],
|
|
9574
9586
|
onChange: (W) => J("additional_works", W)
|
|
9575
9587
|
}
|
|
9576
9588
|
) }),
|
|
9577
9589
|
/* @__PURE__ */ t(Ae, { title: f.section.indexedBy, onSave: i, onAskAI: d ? () => d("收录于") : void 0, children: /* @__PURE__ */ t(
|
|
9578
|
-
|
|
9590
|
+
Fa,
|
|
9579
9591
|
{
|
|
9580
9592
|
items: e.indexed_by || [],
|
|
9581
9593
|
onChange: (W) => J("indexed_by", W)
|
|
9582
9594
|
}
|
|
9583
9595
|
) }),
|
|
9584
9596
|
/* @__PURE__ */ t(Ae, { title: f.section.emendatedBy, onSave: i, onAskAI: d ? () => d("考证") : void 0, children: /* @__PURE__ */ t(
|
|
9585
|
-
|
|
9597
|
+
Va,
|
|
9586
9598
|
{
|
|
9587
9599
|
items: e.emendated_by || [],
|
|
9588
9600
|
onChange: (W) => J("emendated_by", W)
|
|
@@ -9609,17 +9621,17 @@ const Ea = ({
|
|
|
9609
9621
|
}
|
|
9610
9622
|
) }),
|
|
9611
9623
|
/* @__PURE__ */ t(Ae, { title: f.section.sources, onSave: i, onAskAI: d ? () => d("资料来源") : void 0, children: /* @__PURE__ */ t(
|
|
9612
|
-
|
|
9624
|
+
pa,
|
|
9613
9625
|
{
|
|
9614
|
-
items:
|
|
9615
|
-
onChange: (W) => J("sources",
|
|
9626
|
+
items: ua(e.sources || ""),
|
|
9627
|
+
onChange: (W) => J("sources", fa(W)),
|
|
9616
9628
|
onOpenEntityPicker: pt
|
|
9617
9629
|
}
|
|
9618
9630
|
) }),
|
|
9619
9631
|
(K || te) && /* @__PURE__ */ t(Ae, { title: f.section.provenance, onSave: i, onAskAI: d ? () => d("收藏历史") : void 0, children: /* @__PURE__ */ t(rt, { value: e.provenance || "", onChange: (W) => J("provenance", W), placeholder: f.editor.provenancePlaceholder }) }),
|
|
9620
9632
|
K && /* @__PURE__ */ t(Ae, { title: f.section.otherEditions, onSave: i, onAskAI: d ? () => d("其他版本") : void 0, children: /* @__PURE__ */ t(rt, { value: e.otherEditions || "", onChange: (W) => J("otherEditions", W), placeholder: f.editor.otherEditionsPlaceholder }) }),
|
|
9621
9633
|
/* @__PURE__ */ t(
|
|
9622
|
-
|
|
9634
|
+
ga,
|
|
9623
9635
|
{
|
|
9624
9636
|
entityType: $,
|
|
9625
9637
|
entityId: e.id,
|
|
@@ -9659,7 +9671,7 @@ const Ea = ({
|
|
|
9659
9671
|
}, children: f.editor.deleteEntity })
|
|
9660
9672
|
] }),
|
|
9661
9673
|
/* @__PURE__ */ t(
|
|
9662
|
-
|
|
9674
|
+
ma,
|
|
9663
9675
|
{
|
|
9664
9676
|
isOpen: x,
|
|
9665
9677
|
entityType: b,
|
|
@@ -9676,7 +9688,7 @@ const Ea = ({
|
|
|
9676
9688
|
}
|
|
9677
9689
|
),
|
|
9678
9690
|
/* @__PURE__ */ t(
|
|
9679
|
-
|
|
9691
|
+
_a,
|
|
9680
9692
|
{
|
|
9681
9693
|
isOpen: z,
|
|
9682
9694
|
entityType: L,
|
|
@@ -9687,7 +9699,7 @@ const Ea = ({
|
|
|
9687
9699
|
}
|
|
9688
9700
|
),
|
|
9689
9701
|
/* @__PURE__ */ t(
|
|
9690
|
-
|
|
9702
|
+
La,
|
|
9691
9703
|
{
|
|
9692
9704
|
isOpen: O,
|
|
9693
9705
|
title: f.action.selectBookOrWork,
|
|
@@ -9703,7 +9715,7 @@ const Ea = ({
|
|
|
9703
9715
|
)
|
|
9704
9716
|
] });
|
|
9705
9717
|
};
|
|
9706
|
-
function
|
|
9718
|
+
function Na({ items: e, onChange: n }) {
|
|
9707
9719
|
const i = Y(), r = (c, d, s) => {
|
|
9708
9720
|
const p = e.map((u, g) => g === c ? { ...u, [d]: s } : u);
|
|
9709
9721
|
n(p);
|
|
@@ -9735,7 +9747,7 @@ function Da({ items: e, onChange: n }) {
|
|
|
9735
9747
|
}, children: i.action.addAdditionalWork })
|
|
9736
9748
|
] });
|
|
9737
9749
|
}
|
|
9738
|
-
function
|
|
9750
|
+
function Sr({ items: e, onChange: n, showMeta: i, addLabel: r }) {
|
|
9739
9751
|
const l = Y(), [o, c] = Xe.useState(null), d = (u, g, h) => {
|
|
9740
9752
|
const f = e.map((x, y) => y === u ? { ...x, [g]: h || void 0 } : x);
|
|
9741
9753
|
n(f);
|
|
@@ -9815,15 +9827,15 @@ function yr({ items: e, onChange: n, showMeta: i, addLabel: r }) {
|
|
|
9815
9827
|
}, children: r })
|
|
9816
9828
|
] });
|
|
9817
9829
|
}
|
|
9818
|
-
function
|
|
9830
|
+
function Fa({ items: e, onChange: n }) {
|
|
9819
9831
|
const i = Y();
|
|
9820
|
-
return /* @__PURE__ */ t(
|
|
9832
|
+
return /* @__PURE__ */ t(Sr, { items: e, onChange: n, showMeta: !0, addLabel: i.action.addIndexedBy });
|
|
9821
9833
|
}
|
|
9822
|
-
function
|
|
9834
|
+
function Va({ items: e, onChange: n }) {
|
|
9823
9835
|
const i = Y();
|
|
9824
|
-
return /* @__PURE__ */ t(
|
|
9836
|
+
return /* @__PURE__ */ t(Sr, { items: e, onChange: n, addLabel: i.action.addEmendatedBy });
|
|
9825
9837
|
}
|
|
9826
|
-
function
|
|
9838
|
+
function Ga(e) {
|
|
9827
9839
|
var d, s, p, u, g, h, f;
|
|
9828
9840
|
const n = ((s = (d = e.authors) == null ? void 0 : d[0]) == null ? void 0 : s.name) || "", i = ((p = e.publication_info) == null ? void 0 : p.year) || "", r = ((u = e.current_location) == null ? void 0 : u.name) || "", l = (g = e.page_count) != null && g.number ? String(e.page_count.number) : ((h = e.page_count) == null ? void 0 : h.description) || "", o = typeof e.description == "object" && e.description !== null && e.description.text || "", c = {
|
|
9829
9841
|
id: e.id,
|
|
@@ -9852,7 +9864,7 @@ function Va(e) {
|
|
|
9852
9864
|
}
|
|
9853
9865
|
return c;
|
|
9854
9866
|
}
|
|
9855
|
-
function
|
|
9867
|
+
function hc(e) {
|
|
9856
9868
|
const n = {
|
|
9857
9869
|
id: e.id,
|
|
9858
9870
|
title: e.title,
|
|
@@ -9869,7 +9881,7 @@ function gc(e) {
|
|
|
9869
9881
|
};
|
|
9870
9882
|
return e.type === "work" && e.parentWorkId && (n.related_works = [{ id: e.parentWorkId, title: e.parentWorkName || "", relation: "part_of" }]), e.type === "book" && (n.work_id = e.workId, e.collectionId && (n.contained_in = [{ id: e.collectionId }])), n;
|
|
9871
9883
|
}
|
|
9872
|
-
const
|
|
9884
|
+
const mc = (e) => {
|
|
9873
9885
|
const {
|
|
9874
9886
|
data: n,
|
|
9875
9887
|
id: i,
|
|
@@ -9905,7 +9917,7 @@ const hc = (e) => {
|
|
|
9905
9917
|
D && B(D);
|
|
9906
9918
|
});
|
|
9907
9919
|
}, [i, r]);
|
|
9908
|
-
const z = n || I, v = q(() => z ?
|
|
9920
|
+
const z = n || I, v = q(() => z ? Ga(z) : null, [z]), E = /* @__PURE__ */ a(P, { children: [
|
|
9909
9921
|
o || !n ? /* @__PURE__ */ t(
|
|
9910
9922
|
"button",
|
|
9911
9923
|
{
|
|
@@ -9942,7 +9954,7 @@ const hc = (e) => {
|
|
|
9942
9954
|
) : v ? /* @__PURE__ */ a("div", { className: m, style: S, children: [
|
|
9943
9955
|
E && /* @__PURE__ */ t("div", { style: { display: "flex", justifyContent: "flex-end", padding: "8px 0", gap: "8px" }, children: E }),
|
|
9944
9956
|
/* @__PURE__ */ t(
|
|
9945
|
-
|
|
9957
|
+
Da,
|
|
9946
9958
|
{
|
|
9947
9959
|
data: v,
|
|
9948
9960
|
onChange: c || (() => {
|
|
@@ -9965,7 +9977,7 @@ const hc = (e) => {
|
|
|
9965
9977
|
}, gi = [
|
|
9966
9978
|
{ value: "bug", label: "反馈错误", icon: "🐛", placeholder: "请描述您发现的错误,包括页面位置和具体内容" },
|
|
9967
9979
|
{ value: "resource", label: "添加资源", icon: "📚", placeholder: "请提供完整资源链接和简要版本说明" }
|
|
9968
|
-
],
|
|
9980
|
+
], Ya = ({ isOpen: e, onClose: n, onSubmit: i, feedbackListUrl: r }) => {
|
|
9969
9981
|
const [l, o] = R(null), [c, d] = R(""), [s, p] = R(""), [u, g] = R("idle"), [h, f] = R(""), x = de(null);
|
|
9970
9982
|
M(() => {
|
|
9971
9983
|
e && (o(null), d(""), p(""), g("idle"), f(""));
|
|
@@ -9998,14 +10010,14 @@ const hc = (e) => {
|
|
|
9998
10010
|
};
|
|
9999
10011
|
if (!e) return null;
|
|
10000
10012
|
const b = l && c.trim() && u !== "submitting", k = gi.find((m) => m.value === l);
|
|
10001
|
-
return /* @__PURE__ */ t("div", { style:
|
|
10013
|
+
return /* @__PURE__ */ t("div", { style: Ua, onClick: (m) => {
|
|
10002
10014
|
m.target === m.currentTarget && n();
|
|
10003
|
-
}, children: /* @__PURE__ */ a("div", { style:
|
|
10004
|
-
/* @__PURE__ */ a("div", { style:
|
|
10015
|
+
}, children: /* @__PURE__ */ a("div", { style: Ka, onClick: (m) => m.stopPropagation(), children: [
|
|
10016
|
+
/* @__PURE__ */ a("div", { style: Ja, children: [
|
|
10005
10017
|
/* @__PURE__ */ t("span", { style: { fontSize: "16px", fontWeight: 600 }, children: "反馈" }),
|
|
10006
|
-
/* @__PURE__ */ t("button", { onClick: n, style:
|
|
10018
|
+
/* @__PURE__ */ t("button", { onClick: n, style: qa, "aria-label": "关闭", children: "✕" })
|
|
10007
10019
|
] }),
|
|
10008
|
-
u === "success" ? /* @__PURE__ */ a("div", { style:
|
|
10020
|
+
u === "success" ? /* @__PURE__ */ a("div", { style: ts, children: [
|
|
10009
10021
|
/* @__PURE__ */ t("span", { style: { fontSize: "32px" }, children: "✓" }),
|
|
10010
10022
|
/* @__PURE__ */ t("div", { style: { fontSize: "15px", fontWeight: 500 }, children: "感谢您的反馈!" }),
|
|
10011
10023
|
r && /* @__PURE__ */ t("a", { href: r, style: { fontSize: "13px", color: "var(--bim-primary, #2563eb)", marginTop: "8px" }, children: "查看反馈列表 →" })
|
|
@@ -10015,8 +10027,8 @@ const hc = (e) => {
|
|
|
10015
10027
|
{
|
|
10016
10028
|
onClick: () => o(m.value),
|
|
10017
10029
|
style: {
|
|
10018
|
-
...
|
|
10019
|
-
...l === m.value ?
|
|
10030
|
+
...Xa,
|
|
10031
|
+
...l === m.value ? Za : {}
|
|
10020
10032
|
},
|
|
10021
10033
|
children: [
|
|
10022
10034
|
/* @__PURE__ */ t("span", { children: m.icon }),
|
|
@@ -10036,7 +10048,7 @@ const hc = (e) => {
|
|
|
10036
10048
|
maxLength: 2e3,
|
|
10037
10049
|
disabled: !l || u === "submitting",
|
|
10038
10050
|
style: {
|
|
10039
|
-
...
|
|
10051
|
+
...Qa,
|
|
10040
10052
|
opacity: l ? 1 : 0.6
|
|
10041
10053
|
}
|
|
10042
10054
|
}
|
|
@@ -10051,21 +10063,21 @@ const hc = (e) => {
|
|
|
10051
10063
|
maxLength: 200,
|
|
10052
10064
|
disabled: !l || u === "submitting",
|
|
10053
10065
|
"aria-label": "联系方式(选填)",
|
|
10054
|
-
style:
|
|
10066
|
+
style: is
|
|
10055
10067
|
}
|
|
10056
10068
|
),
|
|
10057
10069
|
/* @__PURE__ */ a("div", { style: { fontSize: "12px", color: "var(--bim-desc-fg, #999)", textAlign: "right", marginBottom: "12px" }, children: [
|
|
10058
10070
|
c.length,
|
|
10059
10071
|
" / 2000"
|
|
10060
10072
|
] }),
|
|
10061
|
-
u === "error" && /* @__PURE__ */ t("div", { style:
|
|
10073
|
+
u === "error" && /* @__PURE__ */ t("div", { style: ns, children: h }),
|
|
10062
10074
|
/* @__PURE__ */ t("div", { style: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ t(
|
|
10063
10075
|
"button",
|
|
10064
10076
|
{
|
|
10065
10077
|
onClick: y,
|
|
10066
10078
|
disabled: !b,
|
|
10067
10079
|
style: {
|
|
10068
|
-
...
|
|
10080
|
+
...es,
|
|
10069
10081
|
opacity: b ? 1 : 0.6,
|
|
10070
10082
|
cursor: b ? "pointer" : "not-allowed"
|
|
10071
10083
|
},
|
|
@@ -10074,7 +10086,7 @@ const hc = (e) => {
|
|
|
10074
10086
|
) })
|
|
10075
10087
|
] })
|
|
10076
10088
|
] }) });
|
|
10077
|
-
},
|
|
10089
|
+
}, Ua = {
|
|
10078
10090
|
position: "fixed",
|
|
10079
10091
|
top: 0,
|
|
10080
10092
|
left: 0,
|
|
@@ -10085,7 +10097,7 @@ const hc = (e) => {
|
|
|
10085
10097
|
alignItems: "center",
|
|
10086
10098
|
justifyContent: "center",
|
|
10087
10099
|
zIndex: 1e3
|
|
10088
|
-
},
|
|
10100
|
+
}, Ka = {
|
|
10089
10101
|
background: "var(--bim-bg, #fff)",
|
|
10090
10102
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
10091
10103
|
borderRadius: "8px",
|
|
@@ -10093,12 +10105,12 @@ const hc = (e) => {
|
|
|
10093
10105
|
width: "450px",
|
|
10094
10106
|
maxWidth: "90vw",
|
|
10095
10107
|
boxShadow: "0 4px 20px rgba(0,0,0,0.3)"
|
|
10096
|
-
},
|
|
10108
|
+
}, Ja = {
|
|
10097
10109
|
display: "flex",
|
|
10098
10110
|
justifyContent: "space-between",
|
|
10099
10111
|
alignItems: "center",
|
|
10100
10112
|
marginBottom: "16px"
|
|
10101
|
-
},
|
|
10113
|
+
}, qa = {
|
|
10102
10114
|
background: "none",
|
|
10103
10115
|
border: "none",
|
|
10104
10116
|
fontSize: "16px",
|
|
@@ -10106,7 +10118,7 @@ const hc = (e) => {
|
|
|
10106
10118
|
color: "var(--bim-desc-fg, #999)",
|
|
10107
10119
|
padding: "4px 8px",
|
|
10108
10120
|
borderRadius: "4px"
|
|
10109
|
-
},
|
|
10121
|
+
}, Xa = {
|
|
10110
10122
|
flex: 1,
|
|
10111
10123
|
padding: "10px 12px",
|
|
10112
10124
|
fontSize: "13px",
|
|
@@ -10120,12 +10132,12 @@ const hc = (e) => {
|
|
|
10120
10132
|
justifyContent: "center",
|
|
10121
10133
|
gap: "6px",
|
|
10122
10134
|
transition: "border-color 0.2s, background 0.2s"
|
|
10123
|
-
},
|
|
10135
|
+
}, Za = {
|
|
10124
10136
|
borderColor: "var(--bim-primary, #0078d4)",
|
|
10125
10137
|
background: "var(--bim-list-active-bg, #e8f0fe)",
|
|
10126
10138
|
color: "var(--bim-primary, #0078d4)",
|
|
10127
10139
|
fontWeight: 500
|
|
10128
|
-
},
|
|
10140
|
+
}, Qa = {
|
|
10129
10141
|
width: "100%",
|
|
10130
10142
|
minHeight: "120px",
|
|
10131
10143
|
padding: "10px 12px",
|
|
@@ -10139,7 +10151,7 @@ const hc = (e) => {
|
|
|
10139
10151
|
boxSizing: "border-box",
|
|
10140
10152
|
resize: "vertical",
|
|
10141
10153
|
fontFamily: "inherit"
|
|
10142
|
-
},
|
|
10154
|
+
}, es = {
|
|
10143
10155
|
padding: "8px 24px",
|
|
10144
10156
|
fontSize: "14px",
|
|
10145
10157
|
border: "none",
|
|
@@ -10147,21 +10159,21 @@ const hc = (e) => {
|
|
|
10147
10159
|
background: "var(--bim-primary, #0078d4)",
|
|
10148
10160
|
color: "var(--bim-primary-fg, #fff)",
|
|
10149
10161
|
fontWeight: 500
|
|
10150
|
-
},
|
|
10162
|
+
}, ts = {
|
|
10151
10163
|
display: "flex",
|
|
10152
10164
|
flexDirection: "column",
|
|
10153
10165
|
alignItems: "center",
|
|
10154
10166
|
gap: "12px",
|
|
10155
10167
|
padding: "32px 0",
|
|
10156
10168
|
color: "var(--bim-success, #4caf50)"
|
|
10157
|
-
},
|
|
10169
|
+
}, ns = {
|
|
10158
10170
|
fontSize: "13px",
|
|
10159
10171
|
color: "var(--bim-danger, #f44336)",
|
|
10160
10172
|
padding: "8px 12px",
|
|
10161
10173
|
background: "rgba(244,67,54,0.08)",
|
|
10162
10174
|
borderRadius: "4px",
|
|
10163
10175
|
marginBottom: "12px"
|
|
10164
|
-
},
|
|
10176
|
+
}, is = {
|
|
10165
10177
|
width: "100%",
|
|
10166
10178
|
marginTop: "8px",
|
|
10167
10179
|
padding: "8px 12px",
|
|
@@ -10173,7 +10185,7 @@ const hc = (e) => {
|
|
|
10173
10185
|
outline: "none",
|
|
10174
10186
|
boxSizing: "border-box",
|
|
10175
10187
|
fontFamily: "inherit"
|
|
10176
|
-
},
|
|
10188
|
+
}, bc = ({
|
|
10177
10189
|
onSubmit: e,
|
|
10178
10190
|
position: n = { bottom: 24, right: 24 },
|
|
10179
10191
|
feedbackListUrl: i
|
|
@@ -10185,7 +10197,7 @@ const hc = (e) => {
|
|
|
10185
10197
|
{
|
|
10186
10198
|
onClick: () => l(!0),
|
|
10187
10199
|
style: {
|
|
10188
|
-
...
|
|
10200
|
+
...rs,
|
|
10189
10201
|
bottom: n.bottom,
|
|
10190
10202
|
right: n.right
|
|
10191
10203
|
},
|
|
@@ -10194,9 +10206,9 @@ const hc = (e) => {
|
|
|
10194
10206
|
children: /* @__PURE__ */ t("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ t("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) })
|
|
10195
10207
|
}
|
|
10196
10208
|
),
|
|
10197
|
-
/* @__PURE__ */ t(
|
|
10209
|
+
/* @__PURE__ */ t(Ya, { isOpen: r, onClose: () => l(!1), onSubmit: e, feedbackListUrl: i })
|
|
10198
10210
|
] });
|
|
10199
|
-
},
|
|
10211
|
+
}, rs = {
|
|
10200
10212
|
position: "fixed",
|
|
10201
10213
|
zIndex: 900,
|
|
10202
10214
|
width: "48px",
|
|
@@ -10214,7 +10226,7 @@ const hc = (e) => {
|
|
|
10214
10226
|
}, hi = [
|
|
10215
10227
|
{ value: "bug", label: "反馈错误", icon: "🐛", placeholder: "请描述您发现的错误,包括页面位置和具体内容" },
|
|
10216
10228
|
{ value: "resource", label: "添加资源", icon: "📚", placeholder: "请提供完整资源链接和简要版本说明" }
|
|
10217
|
-
],
|
|
10229
|
+
], os = ({ onSubmit: e }) => {
|
|
10218
10230
|
const [n, i] = R("bug"), [r, l] = R(""), [o, c] = R(""), [d, s] = R("idle"), [p, u] = R(""), g = de(null);
|
|
10219
10231
|
M(() => {
|
|
10220
10232
|
n && setTimeout(() => {
|
|
@@ -10232,17 +10244,17 @@ const hc = (e) => {
|
|
|
10232
10244
|
}
|
|
10233
10245
|
}
|
|
10234
10246
|
}, f = n && r.trim() && d !== "submitting", x = hi.find((y) => y.value === n);
|
|
10235
|
-
return d === "success" ? /* @__PURE__ */ t("div", { style: mi, children: /* @__PURE__ */ a("div", { style:
|
|
10247
|
+
return d === "success" ? /* @__PURE__ */ t("div", { style: mi, children: /* @__PURE__ */ a("div", { style: ds, children: [
|
|
10236
10248
|
/* @__PURE__ */ t("span", { children: "✓ 感谢您的反馈!" }),
|
|
10237
|
-
/* @__PURE__ */ t("button", { onClick: () => s("idle"), style:
|
|
10249
|
+
/* @__PURE__ */ t("button", { onClick: () => s("idle"), style: ps, children: "继续提交" })
|
|
10238
10250
|
] }) }) : /* @__PURE__ */ a("div", { style: mi, children: [
|
|
10239
10251
|
/* @__PURE__ */ t("div", { style: { display: "flex", gap: "8px", marginBottom: "12px" }, children: hi.map((y) => /* @__PURE__ */ a(
|
|
10240
10252
|
"button",
|
|
10241
10253
|
{
|
|
10242
10254
|
onClick: () => i(y.value),
|
|
10243
10255
|
style: {
|
|
10244
|
-
...
|
|
10245
|
-
...n === y.value ?
|
|
10256
|
+
...ls,
|
|
10257
|
+
...n === y.value ? as : {}
|
|
10246
10258
|
},
|
|
10247
10259
|
children: [
|
|
10248
10260
|
/* @__PURE__ */ t("span", { children: y.icon }),
|
|
@@ -10262,7 +10274,7 @@ const hc = (e) => {
|
|
|
10262
10274
|
maxLength: 2e3,
|
|
10263
10275
|
disabled: d === "submitting",
|
|
10264
10276
|
style: {
|
|
10265
|
-
...
|
|
10277
|
+
...ss
|
|
10266
10278
|
}
|
|
10267
10279
|
}
|
|
10268
10280
|
),
|
|
@@ -10276,7 +10288,7 @@ const hc = (e) => {
|
|
|
10276
10288
|
maxLength: 200,
|
|
10277
10289
|
disabled: d === "submitting",
|
|
10278
10290
|
"aria-label": "联系方式(选填)",
|
|
10279
|
-
style:
|
|
10291
|
+
style: fs
|
|
10280
10292
|
}
|
|
10281
10293
|
),
|
|
10282
10294
|
/* @__PURE__ */ a("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginTop: "8px" }, children: [
|
|
@@ -10290,7 +10302,7 @@ const hc = (e) => {
|
|
|
10290
10302
|
onClick: h,
|
|
10291
10303
|
disabled: !f,
|
|
10292
10304
|
style: {
|
|
10293
|
-
...
|
|
10305
|
+
...cs,
|
|
10294
10306
|
opacity: f ? 1 : 0.6,
|
|
10295
10307
|
cursor: f ? "pointer" : "not-allowed"
|
|
10296
10308
|
},
|
|
@@ -10298,14 +10310,14 @@ const hc = (e) => {
|
|
|
10298
10310
|
}
|
|
10299
10311
|
)
|
|
10300
10312
|
] }),
|
|
10301
|
-
d === "error" && /* @__PURE__ */ t("div", { style:
|
|
10313
|
+
d === "error" && /* @__PURE__ */ t("div", { style: us, children: p })
|
|
10302
10314
|
] });
|
|
10303
10315
|
}, mi = {
|
|
10304
10316
|
padding: "16px",
|
|
10305
10317
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
10306
10318
|
borderRadius: "8px",
|
|
10307
10319
|
background: "var(--bim-input-bg, #fff)"
|
|
10308
|
-
},
|
|
10320
|
+
}, ls = {
|
|
10309
10321
|
padding: "8px 16px",
|
|
10310
10322
|
fontSize: "13px",
|
|
10311
10323
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
@@ -10317,12 +10329,12 @@ const hc = (e) => {
|
|
|
10317
10329
|
alignItems: "center",
|
|
10318
10330
|
gap: "6px",
|
|
10319
10331
|
transition: "border-color 0.2s, background 0.2s"
|
|
10320
|
-
},
|
|
10332
|
+
}, as = {
|
|
10321
10333
|
borderColor: "var(--bim-primary, #0078d4)",
|
|
10322
10334
|
background: "var(--bim-list-active-bg, #e8f0fe)",
|
|
10323
10335
|
color: "var(--bim-primary, #0078d4)",
|
|
10324
10336
|
fontWeight: 500
|
|
10325
|
-
},
|
|
10337
|
+
}, ss = {
|
|
10326
10338
|
width: "100%",
|
|
10327
10339
|
minHeight: "100px",
|
|
10328
10340
|
padding: "10px 12px",
|
|
@@ -10336,7 +10348,7 @@ const hc = (e) => {
|
|
|
10336
10348
|
boxSizing: "border-box",
|
|
10337
10349
|
resize: "vertical",
|
|
10338
10350
|
fontFamily: "inherit"
|
|
10339
|
-
},
|
|
10351
|
+
}, cs = {
|
|
10340
10352
|
padding: "6px 20px",
|
|
10341
10353
|
fontSize: "13px",
|
|
10342
10354
|
border: "none",
|
|
@@ -10344,27 +10356,27 @@ const hc = (e) => {
|
|
|
10344
10356
|
background: "var(--bim-primary, #0078d4)",
|
|
10345
10357
|
color: "var(--bim-primary-fg, #fff)",
|
|
10346
10358
|
fontWeight: 500
|
|
10347
|
-
},
|
|
10359
|
+
}, ds = {
|
|
10348
10360
|
display: "flex",
|
|
10349
10361
|
alignItems: "center",
|
|
10350
10362
|
gap: "12px",
|
|
10351
10363
|
color: "var(--bim-success, #4caf50)",
|
|
10352
10364
|
fontSize: "14px"
|
|
10353
|
-
},
|
|
10365
|
+
}, ps = {
|
|
10354
10366
|
background: "none",
|
|
10355
10367
|
border: "none",
|
|
10356
10368
|
color: "var(--bim-primary, #0078d4)",
|
|
10357
10369
|
cursor: "pointer",
|
|
10358
10370
|
fontSize: "13px",
|
|
10359
10371
|
textDecoration: "underline"
|
|
10360
|
-
},
|
|
10372
|
+
}, us = {
|
|
10361
10373
|
fontSize: "13px",
|
|
10362
10374
|
color: "var(--bim-danger, #f44336)",
|
|
10363
10375
|
padding: "8px 12px",
|
|
10364
10376
|
background: "rgba(244,67,54,0.08)",
|
|
10365
10377
|
borderRadius: "4px",
|
|
10366
10378
|
marginTop: "8px"
|
|
10367
|
-
},
|
|
10379
|
+
}, fs = {
|
|
10368
10380
|
width: "100%",
|
|
10369
10381
|
marginTop: "8px",
|
|
10370
10382
|
padding: "8px 12px",
|
|
@@ -10380,7 +10392,7 @@ const hc = (e) => {
|
|
|
10380
10392
|
function bi(e) {
|
|
10381
10393
|
return typeof e == "function" ? e() : e ?? "/api/feedback";
|
|
10382
10394
|
}
|
|
10383
|
-
const
|
|
10395
|
+
const gs = ({ resourceId: e, apiUrl: n }) => {
|
|
10384
10396
|
const [i, r] = R([]), [l, o] = R(!0), c = U(async () => {
|
|
10385
10397
|
const s = bi(n);
|
|
10386
10398
|
o(!0);
|
|
@@ -10395,8 +10407,8 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10395
10407
|
return M(() => {
|
|
10396
10408
|
c();
|
|
10397
10409
|
}, [c]), /* @__PURE__ */ a("div", { children: [
|
|
10398
|
-
/* @__PURE__ */ t(
|
|
10399
|
-
/* @__PURE__ */ t("div", { style: { marginTop: "24px" }, children: /* @__PURE__ */ t(
|
|
10410
|
+
/* @__PURE__ */ t(xr, { items: i, loading: l }),
|
|
10411
|
+
/* @__PURE__ */ t("div", { style: { marginTop: "24px" }, children: /* @__PURE__ */ t(os, { onSubmit: async (s) => {
|
|
10400
10412
|
const p = bi(n), u = await fetch(p, {
|
|
10401
10413
|
method: "POST",
|
|
10402
10414
|
headers: { "Content-Type": "application/json" },
|
|
@@ -10413,7 +10425,7 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10413
10425
|
setTimeout(() => c(), 500);
|
|
10414
10426
|
} }) })
|
|
10415
10427
|
] });
|
|
10416
|
-
}, xt = { versions: 12, catalogs: 8, chips: 12 },
|
|
10428
|
+
}, xt = { versions: 12, catalogs: 8, chips: 12 }, kr = {
|
|
10417
10429
|
leadWidth: 22,
|
|
10418
10430
|
metaWidth: 424,
|
|
10419
10431
|
mainLabel: "版本名稱",
|
|
@@ -10422,7 +10434,7 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10422
10434
|
{ label: "影印圖源", width: "156px" },
|
|
10423
10435
|
{ label: "收藏機構", width: "138px" }
|
|
10424
10436
|
]
|
|
10425
|
-
},
|
|
10437
|
+
}, hs = ({
|
|
10426
10438
|
data: e,
|
|
10427
10439
|
transport: n,
|
|
10428
10440
|
onNavigate: i,
|
|
@@ -10470,13 +10482,13 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10470
10482
|
() => s.map(($) => p.get($) ?? { id: $ }),
|
|
10471
10483
|
[s, p]
|
|
10472
10484
|
), C = q(
|
|
10473
|
-
() =>
|
|
10485
|
+
() => qo(w, e.version_graph, { era: f, scanOnly: y, sort: k }),
|
|
10474
10486
|
[w, e.version_graph, f, y, k]
|
|
10475
10487
|
), T = g ? C.rows : C.rows.slice(0, xt.versions), I = q(
|
|
10476
10488
|
() => gn(e.resources, e.resource_groups),
|
|
10477
10489
|
[e.resources, e.resource_groups]
|
|
10478
10490
|
), B = q(
|
|
10479
|
-
() =>
|
|
10491
|
+
() => Yo(
|
|
10480
10492
|
(e.related_works || []).map(($) => ({ id: $.id, title: $.title, relation: $.relation }))
|
|
10481
10493
|
),
|
|
10482
10494
|
[e.related_works]
|
|
@@ -10511,7 +10523,7 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10511
10523
|
/* @__PURE__ */ a(Dt, { facts: z.length ? /* @__PURE__ */ t(Nt, { items: z }) : void 0, children: [
|
|
10512
10524
|
((j = e.description) == null ? void 0 : j.text) && /* @__PURE__ */ a(P, { children: [
|
|
10513
10525
|
/* @__PURE__ */ t(
|
|
10514
|
-
|
|
10526
|
+
Fe,
|
|
10515
10527
|
{
|
|
10516
10528
|
text: e.description.text,
|
|
10517
10529
|
style: {
|
|
@@ -10526,7 +10538,7 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10526
10538
|
marginTop: 8,
|
|
10527
10539
|
fontSize: 11.5,
|
|
10528
10540
|
color: "var(--bim-label-fg, #a3937b)"
|
|
10529
|
-
}, children: e.description.sources.map(($) => d(
|
|
10541
|
+
}, children: e.description.sources.map(($) => d(il($))).filter(Boolean).join(" · ") }) : null
|
|
10530
10542
|
] }),
|
|
10531
10543
|
(H = e.appendix) == null ? void 0 : H.map(($, Z) => /* @__PURE__ */ a("details", { style: { marginTop: 12 }, children: [
|
|
10532
10544
|
/* @__PURE__ */ t("summary", { className: "bim-d-ui", style: {
|
|
@@ -10537,7 +10549,7 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10537
10549
|
display: "inline-block"
|
|
10538
10550
|
}, children: d($.title) }),
|
|
10539
10551
|
/* @__PURE__ */ t(
|
|
10540
|
-
|
|
10552
|
+
Fe,
|
|
10541
10553
|
{
|
|
10542
10554
|
text: $.text,
|
|
10543
10555
|
plainStrong: !0,
|
|
@@ -10550,7 +10562,7 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10550
10562
|
}
|
|
10551
10563
|
)
|
|
10552
10564
|
] }, Z)),
|
|
10553
|
-
/* @__PURE__ */ t(
|
|
10565
|
+
/* @__PURE__ */ t(gl, { rows: [
|
|
10554
10566
|
{ label: c.section.aliases, items: Wt(e.additional_titles) },
|
|
10555
10567
|
{ label: c.section.attachedTexts, items: Wt(e.attached_texts) },
|
|
10556
10568
|
{
|
|
@@ -10614,9 +10626,9 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10614
10626
|
))
|
|
10615
10627
|
] }),
|
|
10616
10628
|
/* @__PURE__ */ a(st, { children: [
|
|
10617
|
-
/* @__PURE__ */ t(bn, { spec:
|
|
10629
|
+
/* @__PURE__ */ t(bn, { spec: kr }),
|
|
10618
10630
|
T.map(($, Z) => /* @__PURE__ */ t(
|
|
10619
|
-
|
|
10631
|
+
xs,
|
|
10620
10632
|
{
|
|
10621
10633
|
row: $,
|
|
10622
10634
|
no: Z,
|
|
@@ -10658,8 +10670,8 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10658
10670
|
I.buckets.map(($) => /* @__PURE__ */ t(
|
|
10659
10671
|
qn,
|
|
10660
10672
|
{
|
|
10661
|
-
title:
|
|
10662
|
-
tag:
|
|
10673
|
+
title: ms[$.key],
|
|
10674
|
+
tag: bs[$.key],
|
|
10663
10675
|
children: $.items.map((Z, te) => /* @__PURE__ */ t(
|
|
10664
10676
|
_t,
|
|
10665
10677
|
{
|
|
@@ -10714,7 +10726,7 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10714
10726
|
}
|
|
10715
10727
|
) : null,
|
|
10716
10728
|
B.map(($) => /* @__PURE__ */ t(
|
|
10717
|
-
|
|
10729
|
+
ys,
|
|
10718
10730
|
{
|
|
10719
10731
|
glyph: $.key === "derivative" ? "續" : "叢",
|
|
10720
10732
|
title: c.section[$.labelKey] ?? c.section.relatedWorks,
|
|
@@ -10730,24 +10742,24 @@ const fs = ({ resourceId: e, apiUrl: n }) => {
|
|
|
10730
10742
|
/* @__PURE__ */ t(st, { children: /* @__PURE__ */ t(It, { children: "尚未著錄該作品的版本、資源與書目收錄。" }) })
|
|
10731
10743
|
] })
|
|
10732
10744
|
] });
|
|
10733
|
-
},
|
|
10745
|
+
}, ms = {
|
|
10734
10746
|
text: "文字全文庫",
|
|
10735
10747
|
image: "影印資源",
|
|
10736
10748
|
textImage: "圖文對照",
|
|
10737
10749
|
physical: "館藏"
|
|
10738
|
-
},
|
|
10750
|
+
}, bs = {
|
|
10739
10751
|
text: "純文本",
|
|
10740
10752
|
image: "原卷掃描",
|
|
10741
10753
|
textImage: "圖文對照",
|
|
10742
10754
|
physical: "實體"
|
|
10743
10755
|
};
|
|
10744
|
-
function
|
|
10756
|
+
function xs({ row: e, no: n, onNavigate: i, renderLink: r }) {
|
|
10745
10757
|
const { convert: l } = N(), o = [e.era.era, e.era.reign].filter(Boolean).join(" · "), c = e.era.source === "edition";
|
|
10746
10758
|
return /* @__PURE__ */ t(
|
|
10747
10759
|
xn,
|
|
10748
10760
|
{
|
|
10749
10761
|
no: yn(n),
|
|
10750
|
-
spec:
|
|
10762
|
+
spec: kr,
|
|
10751
10763
|
main: /* @__PURE__ */ t(
|
|
10752
10764
|
Re,
|
|
10753
10765
|
{
|
|
@@ -10824,7 +10836,7 @@ function yi({
|
|
|
10824
10836
|
/* @__PURE__ */ t(st, { children: k.map((m, S) => {
|
|
10825
10837
|
const _ = m;
|
|
10826
10838
|
return /* @__PURE__ */ a(
|
|
10827
|
-
|
|
10839
|
+
pl,
|
|
10828
10840
|
{
|
|
10829
10841
|
open: !!g[S],
|
|
10830
10842
|
onToggle: () => h((w) => ({ ...w, [S]: !w[S] })),
|
|
@@ -10885,9 +10897,9 @@ function yi({
|
|
|
10885
10897
|
s(_.edition)
|
|
10886
10898
|
] })
|
|
10887
10899
|
] }),
|
|
10888
|
-
_.summary && /* @__PURE__ */ t(Xt, { children:
|
|
10889
|
-
_.comment && /* @__PURE__ */ t(Xt, { label: d.section.comment, children:
|
|
10890
|
-
_.additional_comment && /* @__PURE__ */ t(Xt, { label: d.section.additionalComment, children:
|
|
10900
|
+
_.summary && /* @__PURE__ */ t(Xt, { children: Ne(s(_.summary)) }),
|
|
10901
|
+
_.comment && /* @__PURE__ */ t(Xt, { label: d.section.comment, children: Ne(s(_.comment)) }),
|
|
10902
|
+
_.additional_comment && /* @__PURE__ */ t(Xt, { label: d.section.additionalComment, children: Ne(s(_.additional_comment)) }),
|
|
10891
10903
|
c && _.page && /* @__PURE__ */ t("div", { className: "bim-d-ui", style: {
|
|
10892
10904
|
fontSize: 11,
|
|
10893
10905
|
color: "var(--bim-hint-fg, #b3a385)"
|
|
@@ -10906,7 +10918,7 @@ function yi({
|
|
|
10906
10918
|
)
|
|
10907
10919
|
] });
|
|
10908
10920
|
}
|
|
10909
|
-
function
|
|
10921
|
+
function ys({ glyph: e, title: n, items: i, convert: r, onNavigate: l, renderLink: o }) {
|
|
10910
10922
|
const [c, d] = R(!1), s = c ? i : i.slice(0, xt.chips);
|
|
10911
10923
|
return /* @__PURE__ */ a(Be, { style: { marginBottom: 44 }, children: [
|
|
10912
10924
|
/* @__PURE__ */ t(ye, { glyph: e, tone: "ink", title: n, count: `${i.length} 種` }),
|
|
@@ -10933,7 +10945,7 @@ function xs({ glyph: e, title: n, items: i, convert: r, onNavigate: l, renderLin
|
|
|
10933
10945
|
] })
|
|
10934
10946
|
] });
|
|
10935
10947
|
}
|
|
10936
|
-
const
|
|
10948
|
+
const vs = 8, Ss = ({
|
|
10937
10949
|
data: e,
|
|
10938
10950
|
transport: n,
|
|
10939
10951
|
onNavigate: i,
|
|
@@ -10982,7 +10994,7 @@ const ys = 8, vs = ({
|
|
|
10982
10994
|
h([]);
|
|
10983
10995
|
return;
|
|
10984
10996
|
}
|
|
10985
|
-
const I = f ? y : y.slice(0,
|
|
10997
|
+
const I = f ? y : y.slice(0, vs);
|
|
10986
10998
|
let B = !1;
|
|
10987
10999
|
return Promise.all(I.map(
|
|
10988
11000
|
(z) => n.getItem(z).then((v) => ({
|
|
@@ -11001,7 +11013,7 @@ const ys = 8, vs = ({
|
|
|
11001
11013
|
[e.resources, e.resource_groups]
|
|
11002
11014
|
), k = q(() => {
|
|
11003
11015
|
var D, j, V;
|
|
11004
|
-
const I = [], B = Ot(e), z =
|
|
11016
|
+
const I = [], B = Ot(e), z = rl(e);
|
|
11005
11017
|
z && I.push({
|
|
11006
11018
|
label: "版本類型",
|
|
11007
11019
|
value: z,
|
|
@@ -11023,7 +11035,7 @@ const ys = 8, vs = ({
|
|
|
11023
11035
|
}, [e, c, o]), m = !!((_ = e.description) != null && _.text), S = (e.contained_in || []).some((I) => typeof I != "string" && Et(I.volume_index).length > 0);
|
|
11024
11036
|
return /* @__PURE__ */ a(P, { children: [
|
|
11025
11037
|
/* @__PURE__ */ t(Dt, { facts: k.length ? /* @__PURE__ */ t(Nt, { items: k, horizontal: !m }) : void 0, children: m ? /* @__PURE__ */ t(
|
|
11026
|
-
|
|
11038
|
+
Fe,
|
|
11027
11039
|
{
|
|
11028
11040
|
text: e.description.text,
|
|
11029
11041
|
style: {
|
|
@@ -11074,7 +11086,7 @@ const ys = 8, vs = ({
|
|
|
11074
11086
|
v.length > 0 && `本書佔 ${v.length} ${o.unit.volume}`
|
|
11075
11087
|
] })
|
|
11076
11088
|
] }),
|
|
11077
|
-
v.length > 0 && /* @__PURE__ */ t(
|
|
11089
|
+
v.length > 0 && /* @__PURE__ */ t(dl, { volumes: v, unit: o.unit.volume })
|
|
11078
11090
|
] }, `${z}-${B}`);
|
|
11079
11091
|
}) })
|
|
11080
11092
|
] }),
|
|
@@ -11110,7 +11122,7 @@ const ys = 8, vs = ({
|
|
|
11110
11122
|
].filter(Boolean).join(" · ") })
|
|
11111
11123
|
] }),
|
|
11112
11124
|
((C = d.description) == null ? void 0 : C.text) && /* @__PURE__ */ t(
|
|
11113
|
-
|
|
11125
|
+
Fe,
|
|
11114
11126
|
{
|
|
11115
11127
|
text: d.description.text,
|
|
11116
11128
|
style: {
|
|
@@ -11122,7 +11134,7 @@ const ys = 8, vs = ({
|
|
|
11122
11134
|
}
|
|
11123
11135
|
),
|
|
11124
11136
|
/* @__PURE__ */ t("div", { style: { marginTop: 14 }, children: /* @__PURE__ */ t(
|
|
11125
|
-
|
|
11137
|
+
dr,
|
|
11126
11138
|
{
|
|
11127
11139
|
label: o.section.aliases,
|
|
11128
11140
|
items: [
|
|
@@ -11222,7 +11234,7 @@ const ys = 8, vs = ({
|
|
|
11222
11234
|
] })
|
|
11223
11235
|
] })
|
|
11224
11236
|
] });
|
|
11225
|
-
}, vi = { titles: 16, works: 16 },
|
|
11237
|
+
}, vi = { titles: 16, works: 16 }, ks = ({
|
|
11226
11238
|
data: e,
|
|
11227
11239
|
catalog: n,
|
|
11228
11240
|
onNavigate: i,
|
|
@@ -11231,7 +11243,7 @@ const ys = 8, vs = ({
|
|
|
11231
11243
|
}) => {
|
|
11232
11244
|
var B, z;
|
|
11233
11245
|
const o = Y(), { convert: c } = N(), [d, s] = R(""), [p, u] = R(!1), [g, h] = R(!1), f = q(
|
|
11234
|
-
() =>
|
|
11246
|
+
() => el(e, n),
|
|
11235
11247
|
[e, n]
|
|
11236
11248
|
), x = q(
|
|
11237
11249
|
() => d ? f.rows.filter((v) => v.section === d) : f.rows,
|
|
@@ -11270,7 +11282,7 @@ const ys = 8, vs = ({
|
|
|
11270
11282
|
return /* @__PURE__ */ a(P, { children: [
|
|
11271
11283
|
/* @__PURE__ */ a(Dt, { facts: I.length ? /* @__PURE__ */ t(Nt, { items: I }) : void 0, children: [
|
|
11272
11284
|
((B = e.description) == null ? void 0 : B.text) && /* @__PURE__ */ t(
|
|
11273
|
-
|
|
11285
|
+
Fe,
|
|
11274
11286
|
{
|
|
11275
11287
|
text: e.description.text,
|
|
11276
11288
|
style: {
|
|
@@ -11429,7 +11441,7 @@ const ys = 8, vs = ({
|
|
|
11429
11441
|
] })
|
|
11430
11442
|
] })
|
|
11431
11443
|
] });
|
|
11432
|
-
},
|
|
11444
|
+
}, ws = 16, Si = {
|
|
11433
11445
|
leadWidth: 26,
|
|
11434
11446
|
metaWidth: 300,
|
|
11435
11447
|
mainLabel: "作品名稱",
|
|
@@ -11474,7 +11486,7 @@ function ki(e) {
|
|
|
11474
11486
|
const n = tn.indexOf(e);
|
|
11475
11487
|
return n === -1 ? tn.length : n;
|
|
11476
11488
|
}
|
|
11477
|
-
const
|
|
11489
|
+
const _s = ({
|
|
11478
11490
|
data: e,
|
|
11479
11491
|
transport: n,
|
|
11480
11492
|
onNavigate: i,
|
|
@@ -11492,12 +11504,12 @@ const ws = ({
|
|
|
11492
11504
|
loaded: !!(L != null && L.loaded)
|
|
11493
11505
|
};
|
|
11494
11506
|
}), [e.works, h]), y = q(
|
|
11495
|
-
() =>
|
|
11507
|
+
() => Qo((e.works || []).map((z) => z.role)),
|
|
11496
11508
|
[e.works]
|
|
11497
11509
|
), b = q(() => {
|
|
11498
11510
|
const z = c === "全部" ? x : x.filter((v) => v.cls === c);
|
|
11499
11511
|
return u === "versions" ? [...z].sort((v, L) => (L.versionCount ?? -1) - (v.versionCount ?? -1)) : z;
|
|
11500
|
-
}, [x, c, u]), k = s ? b : b.slice(0,
|
|
11512
|
+
}, [x, c, u]), k = s ? b : b.slice(0, ws), m = q(
|
|
11501
11513
|
() => k.filter((z) => !h.has(z.id)).map((z) => z.id),
|
|
11502
11514
|
[k, h]
|
|
11503
11515
|
);
|
|
@@ -11560,7 +11572,7 @@ const ws = ({
|
|
|
11560
11572
|
/* @__PURE__ */ t("span", { style: { color: "var(--bim-ink, #2a231c)" }, children: z.names.map((v) => o(v)).join(" · ") })
|
|
11561
11573
|
] }, z.label)) }),
|
|
11562
11574
|
C && /* @__PURE__ */ t(
|
|
11563
|
-
|
|
11575
|
+
Fe,
|
|
11564
11576
|
{
|
|
11565
11577
|
text: e.description.text,
|
|
11566
11578
|
style: {
|
|
@@ -11655,7 +11667,7 @@ const ws = ({
|
|
|
11655
11667
|
] })
|
|
11656
11668
|
] });
|
|
11657
11669
|
};
|
|
11658
|
-
function
|
|
11670
|
+
function Is(e) {
|
|
11659
11671
|
var n;
|
|
11660
11672
|
return {
|
|
11661
11673
|
id: e.id,
|
|
@@ -11669,7 +11681,7 @@ function _s(e) {
|
|
|
11669
11681
|
description: e.description
|
|
11670
11682
|
};
|
|
11671
11683
|
}
|
|
11672
|
-
function
|
|
11684
|
+
function Cs(e, n) {
|
|
11673
11685
|
if (!e.lineage) return null;
|
|
11674
11686
|
const i = e.lineage;
|
|
11675
11687
|
return {
|
|
@@ -11698,7 +11710,7 @@ function wi(e, n, i) {
|
|
|
11698
11710
|
note: n.note
|
|
11699
11711
|
};
|
|
11700
11712
|
}
|
|
11701
|
-
function
|
|
11713
|
+
function zs(e, n, i) {
|
|
11702
11714
|
const [r, l] = [e, n.book_id].sort();
|
|
11703
11715
|
return {
|
|
11704
11716
|
id: `sibling:${r}-${l}:${i}`,
|
|
@@ -11711,7 +11723,7 @@ function Cs(e, n, i) {
|
|
|
11711
11723
|
note: n.note
|
|
11712
11724
|
};
|
|
11713
11725
|
}
|
|
11714
|
-
function
|
|
11726
|
+
function Ts(e, n) {
|
|
11715
11727
|
var p;
|
|
11716
11728
|
if (n === "all") return null;
|
|
11717
11729
|
const i = (p = e.collections) == null ? void 0 : p[n], r = Array.isArray(i == null ? void 0 : i.groups) && i.groups.length > 0, l = Array.isArray(i == null ? void 0 : i.book_ids) && i.book_ids.length > 0, o = r || l || !!(i != null && i.hypothetical_ids);
|
|
@@ -11742,7 +11754,7 @@ function nn(e, n, i) {
|
|
|
11742
11754
|
excluded: []
|
|
11743
11755
|
};
|
|
11744
11756
|
if (!r || !r.enabled) return l;
|
|
11745
|
-
const o = new Set(r.excluded_books ?? []), c = r.node_groups ?? {}, d =
|
|
11757
|
+
const o = new Set(r.excluded_books ?? []), c = r.node_groups ?? {}, d = Ts(r, i ?? r.default_collection ?? "all"), s = d !== null, p = (d == null ? void 0 : d.books) ?? null, u = (d == null ? void 0 : d.hypos) ?? null, g = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set();
|
|
11746
11758
|
if (s) {
|
|
11747
11759
|
const _ = new Map(n.map((z) => [z.id, z])), w = new Map(
|
|
11748
11760
|
(r.hypothetical_nodes ?? []).map((z) => [z.id, z])
|
|
@@ -11765,10 +11777,10 @@ function nn(e, n, i) {
|
|
|
11765
11777
|
u && u.has(z.id) && B(z.id);
|
|
11766
11778
|
}
|
|
11767
11779
|
const f = n.filter((_) => !o.has(_.id)).filter((_) => !p || p.has(_.id) || g.has(_.id)).map((_) => {
|
|
11768
|
-
const w =
|
|
11780
|
+
const w = Cs(_, c);
|
|
11769
11781
|
return w && g.has(_.id) && (w.bridge = !0), w;
|
|
11770
11782
|
}).filter((_) => _ !== null), x = (r.hypothetical_nodes ?? []).filter((_) => !u || u.has(_.id) || h.has(_.id)).map((_) => {
|
|
11771
|
-
const w =
|
|
11783
|
+
const w = Is(_);
|
|
11772
11784
|
return h.has(_.id) && (w.bridge = !0), w;
|
|
11773
11785
|
}), y = [...f, ...x], b = new Set(y.map((_) => _.id)), k = /* @__PURE__ */ new Set(), m = [], S = (_) => {
|
|
11774
11786
|
k.has(_.id) || !b.has(_.source) || !b.has(_.target) || (k.add(_.id), m.push(_));
|
|
@@ -11777,7 +11789,7 @@ function nn(e, n, i) {
|
|
|
11777
11789
|
o.has(_.id) || !_.lineage || p && !p.has(_.id) && !g.has(_.id) || ((_.lineage.derived_from ?? []).forEach((w, C) => {
|
|
11778
11790
|
S(wi(_.id, w, C));
|
|
11779
11791
|
}), (_.lineage.related_to ?? []).forEach((w, C) => {
|
|
11780
|
-
S(
|
|
11792
|
+
S(zs(_.id, w, C));
|
|
11781
11793
|
}));
|
|
11782
11794
|
for (const _ of r.hypothetical_nodes ?? [])
|
|
11783
11795
|
u && !u.has(_.id) && !h.has(_.id) || (_.derived_from ?? []).forEach((w, C) => {
|
|
@@ -11793,11 +11805,11 @@ function nn(e, n, i) {
|
|
|
11793
11805
|
excluded: Array.from(o)
|
|
11794
11806
|
};
|
|
11795
11807
|
}
|
|
11796
|
-
function
|
|
11808
|
+
function wr(e, n, i) {
|
|
11797
11809
|
const r = (e ?? (n != null ? String(n) : "")).trim();
|
|
11798
11810
|
return r ? !i || /约|約|推定|大约|大約|学界估计|學界估計|不確|不确|前后|前後|疑/.test(r) ? r : `约 ${r}` : "";
|
|
11799
11811
|
}
|
|
11800
|
-
function
|
|
11812
|
+
function xc(e, n) {
|
|
11801
11813
|
const i = [], r = e.version_graph;
|
|
11802
11814
|
if (!r) return i;
|
|
11803
11815
|
const l = new Set(n.map((s) => s.id)), o = new Set((r.hypothetical_nodes ?? []).map((s) => s.id)), c = /* @__PURE__ */ new Set([...l, ...o]), d = (s, p) => {
|
|
@@ -11816,7 +11828,7 @@ function bc(e, n) {
|
|
|
11816
11828
|
}
|
|
11817
11829
|
return i;
|
|
11818
11830
|
}
|
|
11819
|
-
const
|
|
11831
|
+
const Rs = ({
|
|
11820
11832
|
graph: e,
|
|
11821
11833
|
renderLink: n,
|
|
11822
11834
|
className: i,
|
|
@@ -11824,7 +11836,7 @@ const Ts = ({
|
|
|
11824
11836
|
}) => {
|
|
11825
11837
|
const { convert: l } = N();
|
|
11826
11838
|
if (!e.nodes.length)
|
|
11827
|
-
return /* @__PURE__ */ t("div", { style: { ...
|
|
11839
|
+
return /* @__PURE__ */ t("div", { style: { ...Fs, ...r }, className: i, children: "暂无版本图数据" });
|
|
11828
11840
|
const o = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
11829
11841
|
for (const h of e.edges)
|
|
11830
11842
|
if (h.kind === "derive") {
|
|
@@ -11845,9 +11857,9 @@ const Ts = ({
|
|
|
11845
11857
|
const u = (h, f) => (h.year ?? 9999) - (f.year ?? 9999);
|
|
11846
11858
|
s.forEach((h) => h.sort(u)), p.sort(u);
|
|
11847
11859
|
const g = e.groups.filter((h) => s.has(h.id));
|
|
11848
|
-
return /* @__PURE__ */ a("div", { className: i, style: { ...
|
|
11849
|
-
e.title && /* @__PURE__ */ t("div", { style:
|
|
11850
|
-
e.description && /* @__PURE__ */ t("div", { style:
|
|
11860
|
+
return /* @__PURE__ */ a("div", { className: i, style: { ...Es, ...r }, children: [
|
|
11861
|
+
e.title && /* @__PURE__ */ t("div", { style: Ls, children: l(e.title) }),
|
|
11862
|
+
e.description && /* @__PURE__ */ t("div", { style: Ws, children: l(e.description) }),
|
|
11851
11863
|
g.map((h) => /* @__PURE__ */ t(
|
|
11852
11864
|
_i,
|
|
11853
11865
|
{
|
|
@@ -11883,10 +11895,10 @@ const Ts = ({
|
|
|
11883
11895
|
renderLink: c
|
|
11884
11896
|
}) => {
|
|
11885
11897
|
const { convert: d } = N();
|
|
11886
|
-
return /* @__PURE__ */ a("div", { style:
|
|
11887
|
-
/* @__PURE__ */ t("div", { style: {
|
|
11898
|
+
return /* @__PURE__ */ a("div", { style: $s, children: [
|
|
11899
|
+
/* @__PURE__ */ t("div", { style: { ...As, borderLeftColor: n ?? "var(--bim-widget-border, #ddd)" }, children: d(e) }),
|
|
11888
11900
|
i.map((s) => /* @__PURE__ */ t(
|
|
11889
|
-
|
|
11901
|
+
Bs,
|
|
11890
11902
|
{
|
|
11891
11903
|
node: s,
|
|
11892
11904
|
incoming: r.get(s.id) ?? [],
|
|
@@ -11897,35 +11909,35 @@ const Ts = ({
|
|
|
11897
11909
|
s.id
|
|
11898
11910
|
))
|
|
11899
11911
|
] });
|
|
11900
|
-
},
|
|
11912
|
+
}, Bs = ({ node: e, incoming: n, siblings: i, nodeMap: r, renderLink: l }) => {
|
|
11901
11913
|
const o = e.kind === "hypothetical", c = e.bridge, { convert: d } = N();
|
|
11902
11914
|
return /* @__PURE__ */ a(
|
|
11903
11915
|
"div",
|
|
11904
11916
|
{
|
|
11905
11917
|
style: {
|
|
11906
|
-
...
|
|
11918
|
+
...Ps,
|
|
11907
11919
|
borderStyle: o || c ? "dashed" : "solid",
|
|
11908
11920
|
opacity: c ? 0.55 : e.status === "lost" ? 0.7 : 1,
|
|
11909
11921
|
background: c ? "var(--bim-bg-subtle, #fafafa)" : void 0
|
|
11910
11922
|
},
|
|
11911
11923
|
title: c ? "桥接节点:本身不在核心集,为保持派生链完整而显示" : void 0,
|
|
11912
11924
|
children: [
|
|
11913
|
-
/* @__PURE__ */ a("div", { style:
|
|
11914
|
-
/* @__PURE__ */ t("span", { style:
|
|
11915
|
-
(e.year_text || e.year != null) && /* @__PURE__ */ t("span", { style:
|
|
11925
|
+
/* @__PURE__ */ a("div", { style: js, children: [
|
|
11926
|
+
/* @__PURE__ */ t("span", { style: Ms, children: o || !l ? d(e.label) : l(e.id, d(e.label)) }),
|
|
11927
|
+
(e.year_text || e.year != null) && /* @__PURE__ */ t("span", { style: Hs, children: wr(d(e.year_text), e.year, e.year_uncertain) })
|
|
11916
11928
|
] }),
|
|
11917
|
-
/* @__PURE__ */ a("div", { style:
|
|
11929
|
+
/* @__PURE__ */ a("div", { style: Os, children: [
|
|
11918
11930
|
e.category && /* @__PURE__ */ t(bt, { children: d(e.category) }),
|
|
11919
11931
|
e.status === "lost" && /* @__PURE__ */ t(bt, { tone: "warn", children: "已佚" }),
|
|
11920
11932
|
e.status === "fragment" && /* @__PURE__ */ t(bt, { tone: "warn", children: "残本" }),
|
|
11921
11933
|
o && /* @__PURE__ */ t(bt, { tone: "info", children: "假想祖本" }),
|
|
11922
11934
|
c && /* @__PURE__ */ t(bt, { tone: "info", children: "桥接" })
|
|
11923
11935
|
] }),
|
|
11924
|
-
e.extant_juan && /* @__PURE__ */ a("div", { style:
|
|
11936
|
+
e.extant_juan && /* @__PURE__ */ a("div", { style: Ds, children: [
|
|
11925
11937
|
"现存:",
|
|
11926
11938
|
d(e.extant_juan)
|
|
11927
11939
|
] }),
|
|
11928
|
-
e.note && /* @__PURE__ */ t("div", { style:
|
|
11940
|
+
e.note && /* @__PURE__ */ t("div", { style: Ns, children: d(e.note) }),
|
|
11929
11941
|
n.length > 0 && /* @__PURE__ */ a("div", { style: Ci, children: [
|
|
11930
11942
|
/* @__PURE__ */ t("div", { style: zi, children: "来源:" }),
|
|
11931
11943
|
n.map((s) => {
|
|
@@ -11990,51 +12002,51 @@ const Ts = ({
|
|
|
11990
12002
|
borderRadius: "8px",
|
|
11991
12003
|
marginLeft: "4px"
|
|
11992
12004
|
}, children: i.label }) : null;
|
|
11993
|
-
},
|
|
12005
|
+
}, Es = {
|
|
11994
12006
|
fontSize: "14px",
|
|
11995
12007
|
color: "var(--bim-fg, #333)"
|
|
11996
|
-
},
|
|
12008
|
+
}, Ls = {
|
|
11997
12009
|
fontSize: "16px",
|
|
11998
12010
|
fontWeight: 600,
|
|
11999
12011
|
marginBottom: "8px"
|
|
12000
|
-
},
|
|
12012
|
+
}, Ws = {
|
|
12001
12013
|
fontSize: "13px",
|
|
12002
12014
|
color: "var(--bim-muted, #666)",
|
|
12003
12015
|
marginBottom: "16px",
|
|
12004
12016
|
lineHeight: 1.6
|
|
12005
|
-
}, Ws = {
|
|
12006
|
-
marginBottom: "16px"
|
|
12007
12017
|
}, $s = {
|
|
12018
|
+
marginBottom: "16px"
|
|
12019
|
+
}, As = {
|
|
12008
12020
|
fontSize: "13px",
|
|
12009
12021
|
fontWeight: 600,
|
|
12010
12022
|
padding: "4px 12px",
|
|
12011
12023
|
borderLeft: "4px solid",
|
|
12012
12024
|
marginBottom: "8px",
|
|
12013
12025
|
color: "var(--bim-fg, #333)"
|
|
12014
|
-
},
|
|
12026
|
+
}, Ps = {
|
|
12015
12027
|
border: "1px solid var(--bim-widget-border, #e0e0e0)",
|
|
12016
12028
|
borderRadius: "6px",
|
|
12017
12029
|
padding: "10px 12px",
|
|
12018
12030
|
marginBottom: "8px",
|
|
12019
12031
|
background: "var(--bim-bg, #fff)"
|
|
12020
|
-
},
|
|
12032
|
+
}, js = {
|
|
12021
12033
|
display: "flex",
|
|
12022
12034
|
justifyContent: "space-between",
|
|
12023
12035
|
alignItems: "baseline",
|
|
12024
12036
|
marginBottom: "4px"
|
|
12025
|
-
},
|
|
12037
|
+
}, Ms = {
|
|
12026
12038
|
fontSize: "15px",
|
|
12027
12039
|
fontWeight: 600
|
|
12028
|
-
},
|
|
12040
|
+
}, Hs = {
|
|
12029
12041
|
fontSize: "12px",
|
|
12030
12042
|
color: "var(--bim-muted, #777)"
|
|
12031
|
-
}, Hs = {
|
|
12032
|
-
marginBottom: "6px"
|
|
12033
12043
|
}, Os = {
|
|
12044
|
+
marginBottom: "6px"
|
|
12045
|
+
}, Ds = {
|
|
12034
12046
|
fontSize: "12px",
|
|
12035
12047
|
color: "var(--bim-muted, #666)",
|
|
12036
12048
|
margin: "2px 0"
|
|
12037
|
-
},
|
|
12049
|
+
}, Ns = {
|
|
12038
12050
|
fontSize: "12px",
|
|
12039
12051
|
color: "var(--bim-muted, #888)",
|
|
12040
12052
|
fontStyle: "italic",
|
|
@@ -12062,16 +12074,16 @@ const Ts = ({
|
|
|
12062
12074
|
}, Bi = {
|
|
12063
12075
|
fontSize: "11px",
|
|
12064
12076
|
color: "var(--bim-muted, #888)"
|
|
12065
|
-
},
|
|
12077
|
+
}, Fs = {
|
|
12066
12078
|
padding: "20px",
|
|
12067
12079
|
textAlign: "center",
|
|
12068
12080
|
color: "var(--bim-muted, #999)",
|
|
12069
12081
|
fontSize: "13px"
|
|
12070
|
-
},
|
|
12082
|
+
}, Vs = ({ selectedNodeId: e, ...n }) => {
|
|
12071
12083
|
const [i, r] = R("loading"), [l, o] = R(null);
|
|
12072
12084
|
return M(() => {
|
|
12073
12085
|
let c = !1;
|
|
12074
|
-
return
|
|
12086
|
+
return Gs().then((d) => {
|
|
12075
12087
|
c || (d ? (o(d), r("ready")) : r("missing"));
|
|
12076
12088
|
}), () => {
|
|
12077
12089
|
c = !0;
|
|
@@ -12089,9 +12101,9 @@ const Ts = ({
|
|
|
12089
12101
|
/* @__PURE__ */ t("code", { children: "VersionLineageList" }),
|
|
12090
12102
|
" 列表视图。"
|
|
12091
12103
|
] })
|
|
12092
|
-
] }) : /* @__PURE__ */ t(
|
|
12104
|
+
] }) : /* @__PURE__ */ t(Ys, { modules: l, selectedNodeId: e, ...n });
|
|
12093
12105
|
};
|
|
12094
|
-
async function
|
|
12106
|
+
async function Gs() {
|
|
12095
12107
|
try {
|
|
12096
12108
|
const [e, n] = await Promise.all([
|
|
12097
12109
|
import("@xyflow/react"),
|
|
@@ -12119,7 +12131,7 @@ async function Vs() {
|
|
|
12119
12131
|
return null;
|
|
12120
12132
|
}
|
|
12121
12133
|
}
|
|
12122
|
-
const
|
|
12134
|
+
const Ys = ({ graph: e, renderLink: n, height: i = 600, className: r, style: l, selectedNodeId: o, modules: c }) => {
|
|
12123
12135
|
const { ReactFlow: d, Background: s, Controls: p, Handle: u, Position: g, BaseEdge: h, EdgeLabelRenderer: f, getSmoothStepPath: x, dagre: y } = c, b = q(() => ({ lineage: (C) => {
|
|
12124
12136
|
var V, H, O, ee;
|
|
12125
12137
|
const T = ((V = C.data) == null ? void 0 : V.stepPosition) ?? 0.85, [I, B, z] = x({
|
|
@@ -12187,14 +12199,14 @@ const Gs = ({ graph: e, renderLink: n, height: i = 600, className: r, style: l,
|
|
|
12187
12199
|
/* @__PURE__ */ t(u, { type: "target", position: g.Left, style: { visibility: "hidden" } }),
|
|
12188
12200
|
/* @__PURE__ */ t("div", { style: { fontSize: 12, fontWeight: 600, marginBottom: 1, lineHeight: 1.3 }, children: I || !T.renderLink ? T.label : T.renderLink(T.bookId, T.label) }),
|
|
12189
12201
|
T.description && /* @__PURE__ */ t("div", { style: { fontSize: 10, color: "var(--bim-muted, #777)", lineHeight: 1.25, marginTop: 1 }, children: T.description }),
|
|
12190
|
-
T.yearText && /* @__PURE__ */ t("div", { style: { fontSize: 10, color: "var(--bim-muted, #777)", lineHeight: 1.2 }, children:
|
|
12202
|
+
T.yearText && /* @__PURE__ */ t("div", { style: { fontSize: 10, color: "var(--bim-muted, #777)", lineHeight: 1.2 }, children: wr(T.yearText, void 0, T.uncertain) }),
|
|
12191
12203
|
B && /* @__PURE__ */ t("div", { style: { fontSize: 9, color: "var(--bim-lost-fg, #c62828)", marginTop: 1 }, children: "已佚" }),
|
|
12192
12204
|
/* @__PURE__ */ t(u, { type: "source", position: g.Right, style: { visibility: "hidden" } })
|
|
12193
12205
|
]
|
|
12194
12206
|
}
|
|
12195
12207
|
);
|
|
12196
12208
|
} }), [u, g]), { convert: m } = N(), { rfNodes: S, rfEdges: _ } = q(
|
|
12197
|
-
() =>
|
|
12209
|
+
() => Us(e, y, n, o, m),
|
|
12198
12210
|
[e, y, n, o, m]
|
|
12199
12211
|
);
|
|
12200
12212
|
return /* @__PURE__ */ t("div", { style: { width: "100%", height: i, ...l }, className: r, children: /* @__PURE__ */ a(
|
|
@@ -12219,7 +12231,7 @@ const Gs = ({ graph: e, renderLink: n, height: i = 600, className: r, style: l,
|
|
|
12219
12231
|
}
|
|
12220
12232
|
) });
|
|
12221
12233
|
};
|
|
12222
|
-
function
|
|
12234
|
+
function Us(e, n, i, r, l = (o) => o ?? "") {
|
|
12223
12235
|
const d = e.layout === "LR" || !e.layout, s = new n.graphlib.Graph();
|
|
12224
12236
|
s.setGraph({
|
|
12225
12237
|
rankdir: d ? "LR" : "TB",
|
|
@@ -12248,7 +12260,7 @@ function Ys(e, n, i, r, l = (o) => o ?? "") {
|
|
|
12248
12260
|
kind: k.kind,
|
|
12249
12261
|
label: l(k.label),
|
|
12250
12262
|
bookId: k.kind === "book" ? k.id : void 0,
|
|
12251
|
-
yearText: l(k.year_text ??
|
|
12263
|
+
yearText: l(k.year_text ?? Js(k)),
|
|
12252
12264
|
uncertain: k.year_uncertain,
|
|
12253
12265
|
category: k.category,
|
|
12254
12266
|
status: k.status,
|
|
@@ -12282,11 +12294,11 @@ function Ys(e, n, i, r, l = (o) => o ?? "") {
|
|
|
12282
12294
|
y.set(w.id, h + T);
|
|
12283
12295
|
});
|
|
12284
12296
|
}
|
|
12285
|
-
const b = e.edges.map((k) =>
|
|
12297
|
+
const b = e.edges.map((k) => Ks(k, y.get(k.id), l));
|
|
12286
12298
|
return { rfNodes: g, rfEdges: b };
|
|
12287
12299
|
}
|
|
12288
|
-
function
|
|
12289
|
-
const r = e.confidence === "probable" || e.confidence === "disputed", l = e.kind === "sibling", o =
|
|
12300
|
+
function Ks(e, n, i = (r) => r ?? "") {
|
|
12301
|
+
const r = e.confidence === "probable" || e.confidence === "disputed", l = e.kind === "sibling", o = qs(e.confidence), c = {
|
|
12290
12302
|
type: "arrowclosed",
|
|
12291
12303
|
color: o,
|
|
12292
12304
|
width: 14,
|
|
@@ -12322,11 +12334,11 @@ function Us(e, n, i = (r) => r ?? "") {
|
|
|
12322
12334
|
// 让边及其标签显示在节点之上
|
|
12323
12335
|
};
|
|
12324
12336
|
}
|
|
12325
|
-
function
|
|
12337
|
+
function Js(e) {
|
|
12326
12338
|
if (e.year_range) return `~${e.year_range[0]}–${e.year_range[1]}`;
|
|
12327
12339
|
if (typeof e.year == "number") return String(e.year);
|
|
12328
12340
|
}
|
|
12329
|
-
function
|
|
12341
|
+
function qs(e) {
|
|
12330
12342
|
switch (e) {
|
|
12331
12343
|
case "certain":
|
|
12332
12344
|
return "var(--bim-confidence-certain, #2e7d32)";
|
|
@@ -12350,7 +12362,7 @@ const Ei = {
|
|
|
12350
12362
|
border: "1px dashed var(--bim-widget-border, #ddd)",
|
|
12351
12363
|
borderRadius: 8,
|
|
12352
12364
|
background: "var(--bim-bg, #fafafa)"
|
|
12353
|
-
},
|
|
12365
|
+
}, Xs = ({
|
|
12354
12366
|
graph: e,
|
|
12355
12367
|
defaultMode: n = "list",
|
|
12356
12368
|
renderLink: i,
|
|
@@ -12379,7 +12391,7 @@ const Ei = {
|
|
|
12379
12391
|
return /* @__PURE__ */ t("div", { style: { padding: 24, color: "var(--bim-muted, #999)", textAlign: "center" }, children: "暂无版本传承数据" });
|
|
12380
12392
|
const k = c ? (m = s == null ? void 0 : s[c]) == null ? void 0 : m.description : void 0;
|
|
12381
12393
|
return /* @__PURE__ */ a("div", { className: u, style: g, children: [
|
|
12382
|
-
/* @__PURE__ */ a("div", { style:
|
|
12394
|
+
/* @__PURE__ */ a("div", { style: Zs, children: [
|
|
12383
12395
|
/* @__PURE__ */ t(
|
|
12384
12396
|
"button",
|
|
12385
12397
|
{
|
|
@@ -12417,8 +12429,8 @@ const Ei = {
|
|
|
12417
12429
|
] })
|
|
12418
12430
|
] }),
|
|
12419
12431
|
b && k && /* @__PURE__ */ t("div", { style: { fontSize: 12, color: "var(--bim-muted, #888)", marginBottom: 8, padding: "4px 8px", background: "var(--bim-bg-subtle, #fafafa)", borderRadius: 4 }, children: k }),
|
|
12420
|
-
h === "list" ? /* @__PURE__ */ t(
|
|
12421
|
-
|
|
12432
|
+
h === "list" ? /* @__PURE__ */ t(Rs, { graph: e, renderLink: i }) : /* @__PURE__ */ t(
|
|
12433
|
+
Vs,
|
|
12422
12434
|
{
|
|
12423
12435
|
graph: e,
|
|
12424
12436
|
renderLink: i,
|
|
@@ -12427,7 +12439,7 @@ const Ei = {
|
|
|
12427
12439
|
}
|
|
12428
12440
|
)
|
|
12429
12441
|
] });
|
|
12430
|
-
},
|
|
12442
|
+
}, Zs = {
|
|
12431
12443
|
display: "flex",
|
|
12432
12444
|
gap: 4,
|
|
12433
12445
|
marginBottom: 12,
|
|
@@ -12443,7 +12455,7 @@ const Ei = {
|
|
|
12443
12455
|
background: e ? "var(--bim-primary, #0078d4)" : "transparent",
|
|
12444
12456
|
color: e ? "var(--bim-primary-fg, #fff)" : "var(--bim-fg, #333)",
|
|
12445
12457
|
cursor: "pointer"
|
|
12446
|
-
}),
|
|
12458
|
+
}), Qs = ({ style: e }) => {
|
|
12447
12459
|
const n = At(Pt);
|
|
12448
12460
|
if (!n) return null;
|
|
12449
12461
|
const { locale: i, setLocale: r } = n, l = i === "zh-Hant";
|
|
@@ -12482,7 +12494,7 @@ const Ei = {
|
|
|
12482
12494
|
]
|
|
12483
12495
|
}
|
|
12484
12496
|
);
|
|
12485
|
-
},
|
|
12497
|
+
}, ec = ({
|
|
12486
12498
|
href: e,
|
|
12487
12499
|
label: n = "在 GitHub 查看本条目源文件",
|
|
12488
12500
|
size: i = 16,
|
|
@@ -12527,7 +12539,7 @@ const Ei = {
|
|
|
12527
12539
|
}
|
|
12528
12540
|
)
|
|
12529
12541
|
}
|
|
12530
|
-
),
|
|
12542
|
+
), yc = ({
|
|
12531
12543
|
id: e,
|
|
12532
12544
|
transport: n,
|
|
12533
12545
|
activeTab: i,
|
|
@@ -12695,7 +12707,7 @@ const Ei = {
|
|
|
12695
12707
|
}, 100);
|
|
12696
12708
|
return () => clearTimeout(F);
|
|
12697
12709
|
}, [i, E, r]);
|
|
12698
|
-
const
|
|
12710
|
+
const Ge = v && E && k ? k({ activeTab: i, activeJuan: G, entry: v, detail: E }) : null, we = q(() => {
|
|
12699
12711
|
var oe;
|
|
12700
12712
|
if (!E) return null;
|
|
12701
12713
|
const se = (E.authors ?? []).map((ie) => {
|
|
@@ -12747,7 +12759,7 @@ const Ei = {
|
|
|
12747
12759
|
aside: [
|
|
12748
12760
|
// subtype 是英文枚举(article/poem/chapter/book),直出会在标题旁
|
|
12749
12761
|
// 露出一个 `chapter`。全库 2,980 条 Work 有此字段。
|
|
12750
|
-
|
|
12762
|
+
nc(B, E.subtype),
|
|
12751
12763
|
fe ? B.status.draft : ""
|
|
12752
12764
|
].filter(Boolean).join(" · ") || void 0,
|
|
12753
12765
|
secondLine: void 0
|
|
@@ -12755,7 +12767,7 @@ const Ei = {
|
|
|
12755
12767
|
}, [E, z, B]), ve = () => {
|
|
12756
12768
|
var F, se;
|
|
12757
12769
|
return E ? E.type === "work" ? /* @__PURE__ */ t(
|
|
12758
|
-
|
|
12770
|
+
hs,
|
|
12759
12771
|
{
|
|
12760
12772
|
data: E,
|
|
12761
12773
|
transport: n,
|
|
@@ -12795,7 +12807,7 @@ const Ei = {
|
|
|
12795
12807
|
) : null
|
|
12796
12808
|
}
|
|
12797
12809
|
) : E.type === "book" ? /* @__PURE__ */ t(
|
|
12798
|
-
|
|
12810
|
+
Ss,
|
|
12799
12811
|
{
|
|
12800
12812
|
data: E,
|
|
12801
12813
|
transport: n,
|
|
@@ -12816,7 +12828,7 @@ const Ei = {
|
|
|
12816
12828
|
) : null
|
|
12817
12829
|
}
|
|
12818
12830
|
) : E.type === "collection" ? /* @__PURE__ */ t(
|
|
12819
|
-
|
|
12831
|
+
ks,
|
|
12820
12832
|
{
|
|
12821
12833
|
data: E,
|
|
12822
12834
|
catalog: (se = ee[0]) == null ? void 0 : se.data,
|
|
@@ -12847,7 +12859,7 @@ const Ei = {
|
|
|
12847
12859
|
) : null
|
|
12848
12860
|
}
|
|
12849
12861
|
) : /* @__PURE__ */ t(
|
|
12850
|
-
|
|
12862
|
+
_s,
|
|
12851
12863
|
{
|
|
12852
12864
|
data: E,
|
|
12853
12865
|
transport: n,
|
|
@@ -12865,7 +12877,7 @@ const Ei = {
|
|
|
12865
12877
|
}
|
|
12866
12878
|
if (i === "collated")
|
|
12867
12879
|
return /* @__PURE__ */ t(
|
|
12868
|
-
|
|
12880
|
+
br,
|
|
12869
12881
|
{
|
|
12870
12882
|
index: Q || void 0,
|
|
12871
12883
|
workId: e,
|
|
@@ -12877,7 +12889,7 @@ const Ei = {
|
|
|
12877
12889
|
);
|
|
12878
12890
|
if (i === "fulltext")
|
|
12879
12891
|
return /* @__PURE__ */ t(
|
|
12880
|
-
|
|
12892
|
+
ia,
|
|
12881
12893
|
{
|
|
12882
12894
|
index: K || void 0,
|
|
12883
12895
|
bookId: e,
|
|
@@ -12891,7 +12903,7 @@ const Ei = {
|
|
|
12891
12903
|
return /* @__PURE__ */ t("div", { style: { color: "var(--bim-label-fg, #a3937b)", padding: "24px 0" }, children: ke ? "加載中…" : "暫無版本圖數據" });
|
|
12892
12904
|
const oe = E.type === "work" ? E : null;
|
|
12893
12905
|
return /* @__PURE__ */ t(
|
|
12894
|
-
|
|
12906
|
+
Xs,
|
|
12895
12907
|
{
|
|
12896
12908
|
graph: Se,
|
|
12897
12909
|
renderLink: y,
|
|
@@ -12917,7 +12929,7 @@ const Ei = {
|
|
|
12917
12929
|
);
|
|
12918
12930
|
}
|
|
12919
12931
|
if (i === "feedback" && S)
|
|
12920
|
-
return /* @__PURE__ */ t(
|
|
12932
|
+
return /* @__PURE__ */ t(gs, { resourceId: e, apiUrl: _ });
|
|
12921
12933
|
const F = m.find((oe) => oe.key === i);
|
|
12922
12934
|
return F ? F.render({ detail: E, entry: v, transport: n, onNavigate: h }) : null;
|
|
12923
12935
|
};
|
|
@@ -12935,7 +12947,7 @@ const Ei = {
|
|
|
12935
12947
|
color: "var(--bim-label-fg, #a3937b)",
|
|
12936
12948
|
fontSize: 14
|
|
12937
12949
|
}, children: "找不到該條目,可能已被刪除或 ID 不正確" }) });
|
|
12938
|
-
const
|
|
12950
|
+
const _r = i === "basic" || i === "emendated", Vt = [
|
|
12939
12951
|
{ label: x ?? B.detailTab.backToIndex, onClick: f }
|
|
12940
12952
|
];
|
|
12941
12953
|
if (E.type === "book" && E.work_id) {
|
|
@@ -12946,14 +12958,14 @@ const Ei = {
|
|
|
12946
12958
|
const Ct = i === "collated" || i === "fulltext";
|
|
12947
12959
|
return /* @__PURE__ */ t("div", { className: T, children: /* @__PURE__ */ a(qt, { wide: Ct, style: { minHeight: w, ...I }, children: [
|
|
12948
12960
|
/* @__PURE__ */ t(
|
|
12949
|
-
|
|
12961
|
+
al,
|
|
12950
12962
|
{
|
|
12951
12963
|
breadcrumb: /* @__PURE__ */ a(P, { children: [
|
|
12952
12964
|
/* @__PURE__ */ t(ar, { char: "籍" }),
|
|
12953
|
-
/* @__PURE__ */ t(
|
|
12965
|
+
/* @__PURE__ */ t(sl, { items: Vt })
|
|
12954
12966
|
] }),
|
|
12955
12967
|
actions: /* @__PURE__ */ a(P, { children: [
|
|
12956
|
-
/* @__PURE__ */ t(
|
|
12968
|
+
/* @__PURE__ */ t(Qs, {}),
|
|
12957
12969
|
S && /* @__PURE__ */ t(
|
|
12958
12970
|
"button",
|
|
12959
12971
|
{
|
|
@@ -12972,12 +12984,12 @@ const Ei = {
|
|
|
12972
12984
|
children: B.detailTab.feedback
|
|
12973
12985
|
}
|
|
12974
12986
|
),
|
|
12975
|
-
|
|
12987
|
+
Ge && /* @__PURE__ */ t(ec, { ...Ge })
|
|
12976
12988
|
] })
|
|
12977
12989
|
}
|
|
12978
12990
|
),
|
|
12979
12991
|
/* @__PURE__ */ t(
|
|
12980
|
-
|
|
12992
|
+
cl,
|
|
12981
12993
|
{
|
|
12982
12994
|
...we,
|
|
12983
12995
|
aside: Ct ? /* @__PURE__ */ a(
|
|
@@ -13014,19 +13026,19 @@ const Ei = {
|
|
|
13014
13026
|
qe,
|
|
13015
13027
|
{
|
|
13016
13028
|
label: F.label,
|
|
13017
|
-
active: F.key === i ||
|
|
13029
|
+
active: F.key === i || _r && F.key === "basic",
|
|
13018
13030
|
onClick: () => r(F.key)
|
|
13019
13031
|
},
|
|
13020
13032
|
F.key
|
|
13021
13033
|
)) }),
|
|
13022
13034
|
/* @__PURE__ */ t("div", { style: { marginTop: !Ct && ne.length > 1 ? 8 : 0 }, children: ut() }),
|
|
13023
13035
|
/* @__PURE__ */ t(
|
|
13024
|
-
|
|
13036
|
+
hl,
|
|
13025
13037
|
{
|
|
13026
13038
|
left: /* @__PURE__ */ a(P, { children: [
|
|
13027
13039
|
C,
|
|
13028
13040
|
C ? " · " : "",
|
|
13029
|
-
/* @__PURE__ */ t(
|
|
13041
|
+
/* @__PURE__ */ t(tc, { id: E.id, label: B.label.id, copied: B.action.copied })
|
|
13030
13042
|
] }),
|
|
13031
13043
|
right: /* @__PURE__ */ a(P, { children: [
|
|
13032
13044
|
S && /* @__PURE__ */ t(
|
|
@@ -13046,10 +13058,10 @@ const Ei = {
|
|
|
13046
13058
|
children: B.detailTab.submitVersion
|
|
13047
13059
|
}
|
|
13048
13060
|
),
|
|
13049
|
-
|
|
13061
|
+
Ge && /* @__PURE__ */ t(
|
|
13050
13062
|
"a",
|
|
13051
13063
|
{
|
|
13052
|
-
href:
|
|
13064
|
+
href: Ge.href,
|
|
13053
13065
|
target: "_blank",
|
|
13054
13066
|
rel: "noopener noreferrer",
|
|
13055
13067
|
style: { color: "var(--bim-meta-fg, #7b6a54)" },
|
|
@@ -13061,7 +13073,7 @@ const Ei = {
|
|
|
13061
13073
|
)
|
|
13062
13074
|
] }) });
|
|
13063
13075
|
};
|
|
13064
|
-
function
|
|
13076
|
+
function tc({ id: e, label: n, copied: i }) {
|
|
13065
13077
|
const [r, l] = R(!1);
|
|
13066
13078
|
return /* @__PURE__ */ a("span", { style: { display: "inline-flex", alignItems: "center", gap: 4 }, children: [
|
|
13067
13079
|
/* @__PURE__ */ a("span", { children: [
|
|
@@ -13095,7 +13107,7 @@ function ec({ id: e, label: n, copied: i }) {
|
|
|
13095
13107
|
)
|
|
13096
13108
|
] });
|
|
13097
13109
|
}
|
|
13098
|
-
function
|
|
13110
|
+
function nc(e, n) {
|
|
13099
13111
|
return n ? e.workSubtype[n] ?? n : "";
|
|
13100
13112
|
}
|
|
13101
13113
|
function Li({ title: e, measure: n, onOpen: i }) {
|
|
@@ -13187,151 +13199,151 @@ function Li({ title: e, measure: n, onOpen: i }) {
|
|
|
13187
13199
|
}
|
|
13188
13200
|
export {
|
|
13189
13201
|
cn as Badge,
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
|
|
13202
|
+
kc as BidLink,
|
|
13203
|
+
cc as BidUrlProvider,
|
|
13204
|
+
yc as BookDetailLayout,
|
|
13205
|
+
ia as BookFullText,
|
|
13206
|
+
wc as BookIndexError,
|
|
13207
|
+
_c as BookIndexManager,
|
|
13208
|
+
Ic as BookIndexStorage,
|
|
13209
|
+
Ss as BookPage,
|
|
13210
|
+
sl as Breadcrumb,
|
|
13211
|
+
Cc as BundleStorage,
|
|
13200
13212
|
Ft as Chip,
|
|
13201
13213
|
mn as ChipWall,
|
|
13202
|
-
|
|
13214
|
+
br as CollatedEdition,
|
|
13203
13215
|
Zi as CollectionCatalog,
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
|
|
13216
|
+
ks as CollectionPage,
|
|
13217
|
+
zc as ConfigError,
|
|
13218
|
+
_a as CreateEntityDialog,
|
|
13219
|
+
ll as DETAIL_CSS,
|
|
13208
13220
|
wt as Dash,
|
|
13209
13221
|
st as DataTable,
|
|
13210
|
-
|
|
13211
|
-
|
|
13212
|
-
|
|
13222
|
+
hl as DetailFooter,
|
|
13223
|
+
cl as DetailHeader,
|
|
13224
|
+
ko as EmendatedBySection,
|
|
13213
13225
|
It as EmptyNote,
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13226
|
+
fo as EntityDetail,
|
|
13227
|
+
_s as EntityPage,
|
|
13228
|
+
La as EntityPickerDialog,
|
|
13229
|
+
ma as EntitySelector,
|
|
13230
|
+
pl as ExpandRow,
|
|
13219
13231
|
Xn as ExtLink,
|
|
13220
13232
|
Nt as FactList,
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13233
|
+
bc as FeedbackButton,
|
|
13234
|
+
Ya as FeedbackDialog,
|
|
13235
|
+
os as FeedbackForm,
|
|
13236
|
+
xr as FeedbackList,
|
|
13237
|
+
gs as FeedbackTab,
|
|
13226
13238
|
qe as FilterChip,
|
|
13227
13239
|
Ie as FormInput,
|
|
13228
13240
|
rt as FormTextArea,
|
|
13229
|
-
|
|
13241
|
+
Tc as GithubStorage,
|
|
13230
13242
|
ar as GlyphBadge,
|
|
13231
13243
|
ni as HomePage,
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13244
|
+
Rc as IdGenerationError,
|
|
13245
|
+
Bc as IdGenerator,
|
|
13246
|
+
fc as IndexApp,
|
|
13235
13247
|
Mn as IndexBrowser,
|
|
13236
13248
|
Xi as IndexDetail,
|
|
13237
|
-
|
|
13238
|
-
|
|
13249
|
+
Da as IndexEditor,
|
|
13250
|
+
mc as IndexView,
|
|
13239
13251
|
Dt as IntroGrid,
|
|
13240
|
-
|
|
13252
|
+
Ec as LocalStorage,
|
|
13241
13253
|
Pt as LocaleContext,
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13254
|
+
dc as LocaleProvider,
|
|
13255
|
+
Qs as LocaleToggle,
|
|
13256
|
+
Lc as MigrationError,
|
|
13257
|
+
Kr as ModeIndicator,
|
|
13246
13258
|
Qe as MoreButton,
|
|
13247
13259
|
Tt as PAGE_MAX_WIDTH,
|
|
13248
13260
|
qt as PageFrame,
|
|
13249
13261
|
Xt as Quote,
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13262
|
+
Xo as ROLE_CLASS_ORDER,
|
|
13263
|
+
ga as RelationPanel,
|
|
13264
|
+
ec as RepoSourceLink,
|
|
13253
13265
|
En as ResourceEditor,
|
|
13254
13266
|
qn as ResourceGroup,
|
|
13255
13267
|
_t as ResourceLine,
|
|
13256
13268
|
Vi as ResourceList,
|
|
13257
|
-
|
|
13258
|
-
|
|
13269
|
+
ul as ResourceRow,
|
|
13270
|
+
Zr as SearchInput,
|
|
13259
13271
|
Ae as Section,
|
|
13260
13272
|
ye as SectionHead,
|
|
13261
13273
|
Zt as SmartBidInput,
|
|
13262
|
-
|
|
13263
|
-
|
|
13274
|
+
pa as SourceEditor,
|
|
13275
|
+
Wc as StorageError,
|
|
13264
13276
|
bn as TableHead,
|
|
13265
13277
|
xn as TableRow,
|
|
13266
|
-
|
|
13267
|
-
|
|
13278
|
+
dr as TagRow,
|
|
13279
|
+
gl as TagRows,
|
|
13268
13280
|
hn as TextButton,
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
|
|
13279
|
-
|
|
13281
|
+
al as TopStrip,
|
|
13282
|
+
Vs as VersionLineageGraph,
|
|
13283
|
+
Rs as VersionLineageList,
|
|
13284
|
+
Xs as VersionLineageView,
|
|
13285
|
+
dl as VolumeChips,
|
|
13286
|
+
fl as VolumeLinks,
|
|
13287
|
+
gc as WorkCatalog,
|
|
13288
|
+
hs as WorkPage,
|
|
13289
|
+
$c as base36Decode,
|
|
13290
|
+
Ac as base36Encode,
|
|
13291
|
+
Pc as base58Decode,
|
|
13280
13292
|
gn as bucketResources,
|
|
13281
|
-
|
|
13282
|
-
|
|
13293
|
+
el as buildCollectionTable,
|
|
13294
|
+
jc as buildId,
|
|
13283
13295
|
nn as buildLineageGraph,
|
|
13284
13296
|
Fi as buildPageUrl,
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13297
|
+
Mc as buildPromotionMap,
|
|
13298
|
+
Ko as buildVersionRow,
|
|
13299
|
+
qo as buildVersionTable,
|
|
13300
|
+
Hc as cleanName,
|
|
13301
|
+
uc as computeVersionPartition,
|
|
13302
|
+
Oc as decodeId,
|
|
13303
|
+
Dc as decodeIdString,
|
|
13304
|
+
pc as deriveDating,
|
|
13305
|
+
rl as deriveEditionType,
|
|
13294
13306
|
Ot as deriveEra,
|
|
13295
13307
|
fn as deriveYear,
|
|
13296
13308
|
tr as deriveYearRange,
|
|
13297
|
-
|
|
13309
|
+
Ga as detailToEditor,
|
|
13298
13310
|
rr as displayAuthorRole,
|
|
13299
|
-
|
|
13300
|
-
|
|
13311
|
+
hc as editorToDetail,
|
|
13312
|
+
Nc as encodeId,
|
|
13301
13313
|
Kn as eraRank,
|
|
13302
|
-
|
|
13314
|
+
Fc as extractIdFromUrl,
|
|
13303
13315
|
pn as extractStatus,
|
|
13304
|
-
|
|
13316
|
+
Ir as extractType,
|
|
13305
13317
|
Wt as flattenTitles,
|
|
13306
13318
|
jt as formatTemplate,
|
|
13307
13319
|
or as formatVolumeRange,
|
|
13308
13320
|
Lt as getDisplayNameFromUrl,
|
|
13309
13321
|
Ni as getStartPage,
|
|
13310
13322
|
Mi as getTypeGroupKey,
|
|
13311
|
-
|
|
13323
|
+
Yo as groupRelatedWorks,
|
|
13312
13324
|
at as measureText,
|
|
13313
13325
|
Hi as mergeVolumeResources,
|
|
13314
|
-
|
|
13326
|
+
Vc as normalizeCatalog,
|
|
13315
13327
|
me as normalizeEra,
|
|
13316
13328
|
ir as normalizeRole,
|
|
13317
13329
|
Et as normalizeVolumeIndex,
|
|
13318
|
-
|
|
13319
|
-
|
|
13330
|
+
Gr as normalizeVolumes,
|
|
13331
|
+
nl as numberToChinese,
|
|
13320
13332
|
ln as parseChineseNumber,
|
|
13321
|
-
|
|
13322
|
-
|
|
13333
|
+
Gc as parseId,
|
|
13334
|
+
ua as parseSourceString,
|
|
13323
13335
|
on as resourceHref,
|
|
13324
13336
|
nr as resourceNote,
|
|
13325
|
-
|
|
13337
|
+
Qo as roleFacets,
|
|
13326
13338
|
yn as rowNo,
|
|
13327
|
-
|
|
13328
|
-
|
|
13329
|
-
|
|
13330
|
-
|
|
13339
|
+
Yc as shardOf,
|
|
13340
|
+
Uc as smartDecode,
|
|
13341
|
+
Go as sortYear,
|
|
13342
|
+
fa as stringifySources,
|
|
13331
13343
|
Ce as useBidUrl,
|
|
13332
13344
|
N as useConvert,
|
|
13333
13345
|
Y as useT,
|
|
13334
|
-
|
|
13335
|
-
|
|
13346
|
+
xc as validateLineageGraph,
|
|
13347
|
+
Kc as validateResource,
|
|
13336
13348
|
Di as volumeStats
|
|
13337
13349
|
};
|