@agile-team/mach-report 2.26.1 → 2.26.2
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/README.md +14 -5
- package/dist/ExcelBindingWizard-CnjjpYxD.cjs +1 -0
- package/dist/{ExcelBindingWizard-Bzndrp_z.js → ExcelBindingWizard-DAprCgn-.js} +4 -4
- package/dist/{ParamEditor-BrUrInJH.js → ParamEditor-CY9d8QZD.js} +3 -3
- package/dist/ParamEditor-CiVjpbc-.cjs +1 -0
- package/dist/ReportBatchPanel-0-Oymcdm.cjs +1 -0
- package/dist/{ReportBatchPanel-2mXS1uol.js → ReportBatchPanel-CDp7xRHp.js} +4 -4
- package/dist/ReportLabelStudio-CsyHqBco.cjs +1 -0
- package/dist/{ReportLabelStudio-BUKNmYUY.js → ReportLabelStudio-DtKxk9n0.js} +4 -4
- package/dist/ReportParamPanel-CoKcXzSy.cjs +1 -0
- package/dist/{ReportParamPanel-Czm3OPo_.js → ReportParamPanel-jKDJVar2.js} +2 -2
- package/dist/{ReportPreview-C9c0Rp7Y.js → ReportPreview-DJqt40zA.js} +2863 -2836
- package/dist/ReportPreview-s7c2nrfo.cjs +6 -0
- package/dist/ReportTemplateLibrary-CsUm6edm.cjs +1 -0
- package/dist/{ReportTemplateLibrary-ovj03u0F.js → ReportTemplateLibrary-qPQX0Dt_.js} +2 -2
- package/dist/RuleEditor-CJBibiLY.cjs +1 -0
- package/dist/{RuleEditor-4JTKq_N7.js → RuleEditor-Di-JZ2Lb.js} +6 -6
- package/dist/{TemplateOutlinePanel-DfFRc91I.js → TemplateOutlinePanel-D0mKfVWf.js} +3 -3
- package/dist/TemplateOutlinePanel-RiRgXnnH.cjs +1 -0
- package/dist/TemplateReusePanel-BdK91T7z.cjs +1 -0
- package/dist/{TemplateReusePanel-CmX1rq69.js → TemplateReusePanel-J6PvD2Sf.js} +3 -3
- package/dist/TemplateReviewPanel-B5yUgOgb.cjs +1 -0
- package/dist/{TemplateReviewPanel-BKMo7Qd7.js → TemplateReviewPanel-BlUbD2GY.js} +3 -3
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.js +5 -5
- package/dist/artifact-integrity.json +112 -114
- package/dist/assets-CylgPA6P.cjs +1 -0
- package/dist/assets-Vt10jCtl.js +136 -0
- package/dist/auto-D3UNXBrM.cjs +1 -0
- package/dist/{auto-C7udkeAa.js → auto-Hq-xgrvS.js} +28 -25
- package/dist/{batch-DGCt44XM.js → batch-Be_NbW7U.js} +1 -1
- package/dist/{batch-DYcokH4v.cjs → batch-CI4ZpuoX.cjs} +1 -1
- package/dist/{charts-D-Vg-ak9.cjs → charts-Cy7muNWi.cjs} +1 -1
- package/dist/{charts-D48XCefN.js → charts-DLTz0OEG.js} +1 -1
- package/dist/{computed-BQgBrma-.cjs → computed-8nFyVnok.cjs} +1 -1
- package/dist/{computed-CH3NYPOW.js → computed-BR_O8uAv.js} +14 -20
- package/dist/{data-bar-DzceAVeR.cjs → data-bar--_aPWr-W.cjs} +1 -1
- package/dist/{data-bar-DjOgTLqu.js → data-bar-BVnzVbE9.js} +1 -1
- package/dist/designer-Bc5AXS38.cjs +2 -0
- package/dist/designer-CZqnLTyE.js +8350 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +108 -1
- package/dist/designer.d.ts +108 -1
- package/dist/designer.js +1 -1
- package/dist/{diagnostic-collector-C-JBA016.js → diagnostic-collector-CZ8DV6wA.js} +208 -186
- package/dist/diagnostic-collector-DwMJWEHo.cjs +1 -0
- package/dist/{dom-DgWc-DY1.js → dom-CbOWY7KE.js} +5 -5
- package/dist/dom-VuLh_fhL.cjs +1 -0
- package/dist/{encoding-tWc2Wn89.cjs → encoding-D0ITsCCp.cjs} +1 -1
- package/dist/{encoding-D480EM2r.js → encoding-TbA3oQLr.js} +2 -2
- package/dist/{execution-result-Ba65gieT.js → execution-result-BUPPNlaS.js} +3 -3
- package/dist/{execution-result-7sG_mdcD.cjs → execution-result-BgZtqlOT.cjs} +1 -1
- package/dist/{font-loader-CHmEwkHl.js → font-loader-BSRR-a0C.js} +1 -1
- package/dist/{font-loader-BIxme_9g.cjs → font-loader-BZ4CRPys.cjs} +1 -1
- package/dist/{grid-strokes-DsoICRjZ.js → grid-strokes-CovSH3A2.js} +1 -1
- package/dist/{grid-strokes-RFMR91jn.cjs → grid-strokes-G5omPT3s.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +23 -23
- package/dist/{json-snapshot-BZ0CIQln.js → json-snapshot-DRQmh_k5.js} +718 -683
- package/dist/json-snapshot-HR8bez8j.cjs +2 -0
- package/dist/{matrix-CB9TqTEy.js → matrix-6wjFVN0Z.js} +149 -142
- package/dist/matrix-DeA6__cd.cjs +1 -0
- package/dist/media-IV_r4Sp7.cjs +1 -0
- package/dist/media-jiLdCn3i.js +208 -0
- package/dist/{pdf-DTR7fAIr.js → pdf-BqnoP1L_.js} +14 -15
- package/dist/{pdf-d9oJ6V0P.cjs → pdf-Ddm0HCuT.cjs} +48 -48
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.js +2 -2
- package/dist/{plugin-B7Bi-1te.cjs → plugin-BFBLxfsq.cjs} +1 -1
- package/dist/{plugin-OKDFQFS4.js → plugin-BnRcXQzg.js} +1 -1
- package/dist/{prefill-C8fF91JB.js → prefill-BqbuktRt.js} +3 -3
- package/dist/{prefill-C_Bf_AMo.cjs → prefill-DPLV68I7.cjs} +1 -1
- package/dist/prepared-Cl7C69N7.cjs +1 -0
- package/dist/{prepared-DhgQ0d-h.js → prepared-V7tYf1qj.js} +68 -64
- package/dist/{protocol-CZ-BILne.cjs → protocol-BVhKnBmX.cjs} +1 -1
- package/dist/{protocol-DHO91-Jt.js → protocol-Bf33Gu9J.js} +3 -3
- package/dist/{record-bindings-KEs-DKCS.cjs → record-bindings-DVs_g_No.cjs} +1 -1
- package/dist/{record-bindings-DBrCu6zO.js → record-bindings-hxJqcLSK.js} +3 -3
- package/dist/{region-binding-workflow-ikpY1Kbw.cjs → region-binding-workflow-Bu31bqCr.cjs} +1 -1
- package/dist/{region-binding-workflow-FSyIZge8.js → region-binding-workflow-DRvX25XH.js} +2 -2
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{rich-text-layout-BYbIc3eJ.cjs → rich-text-layout-6VphrIcj.cjs} +1 -1
- package/dist/{rich-text-layout-BtygMWZC.js → rich-text-layout-BCdxMT4m.js} +1 -1
- package/dist/{runtime-BsvAqz4a.js → runtime-ChdUbPvs.js} +9 -9
- package/dist/{runtime-B5HG8poy.cjs → runtime-D2noLfgC.cjs} +1 -1
- package/dist/sbom.cdx.json +1 -1
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +2099 -1959
- package/dist/server.cjs +1 -1
- package/dist/server.js +17 -13
- package/dist/sha256-C26wdjDi.cjs +1 -0
- package/dist/sha256-D-msitGX.js +166 -0
- package/dist/style.css +1 -1
- package/dist/{template-catalog-BbrN9dgu.js → template-catalog-CZfnMXKc.js} +4 -4
- package/dist/template-catalog-Dv4sOYaB.cjs +1 -0
- package/dist/{template-fragments-CUTE8-_I.js → template-fragments-BO6i19kt.js} +3 -3
- package/dist/{template-fragments-cyAQu7aw.cjs → template-fragments-CTfJeHoM.cjs} +1 -1
- package/dist/{template-registry-PSuLsnyq.js → template-registry-CIaC6qBW.js} +168 -171
- package/dist/template-registry-CKo-bogM.cjs +1 -0
- package/dist/template-serialization-Cb1ospyK.js +367 -0
- package/dist/template-serialization-D4Fofl9c.cjs +1 -0
- package/dist/{textwrap-LhJkHWb1.cjs → textwrap-BYSqmGGV.cjs} +1 -1
- package/dist/{textwrap-Bt_tnI6V.js → textwrap-CGjFy7gf.js} +1 -1
- package/dist/usePopoverBounds-C3hn7F1s.js +84 -0
- package/dist/usePopoverBounds-mJhJ-VqG.cjs +1 -0
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +13 -10
- package/dist/{workbook-session-BJfZVp4q.cjs → workbook-session-DL3uBAl8.cjs} +1 -1
- package/dist/{workbook-session-DRnMjIFK.js → workbook-session-nkvroJUE.js} +2 -2
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.js +28 -29
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-D1LZxm93.cjs +0 -1
- package/dist/ParamEditor-BTIx9UDt.cjs +0 -1
- package/dist/ReportBatchPanel-CU2BbpBg.cjs +0 -1
- package/dist/ReportLabelStudio-BXKE0GVs.cjs +0 -1
- package/dist/ReportParamPanel-Chxu4MTx.cjs +0 -1
- package/dist/ReportPreview-CIMR4ERo.cjs +0 -6
- package/dist/ReportTemplateLibrary-tv1sNa78.cjs +0 -1
- package/dist/RuleEditor-CvyjPyR6.cjs +0 -1
- package/dist/TemplateOutlinePanel-hb8cKkKR.cjs +0 -1
- package/dist/TemplateReusePanel-CR5jF00y.cjs +0 -1
- package/dist/TemplateReviewPanel-BU35FHwG.cjs +0 -1
- package/dist/_plugin-vue_export-helper-8SL1F89S.js +0 -53
- package/dist/_plugin-vue_export-helper-BLmdZLlg.cjs +0 -1
- package/dist/assets-BFTP-0WR.js +0 -137
- package/dist/assets-CZiZhTf2.cjs +0 -1
- package/dist/auto-CXd2E2aZ.cjs +0 -1
- package/dist/capabilities-D8UU2clQ.cjs +0 -1
- package/dist/capabilities-g0a2j9Yy.js +0 -125
- package/dist/designer-CEMTZomv.cjs +0 -2
- package/dist/designer-_IKm_n5N.js +0 -8002
- package/dist/diagnostic-collector-wASg6Fzs.cjs +0 -1
- package/dist/dom-Fk4NF-gN.cjs +0 -1
- package/dist/json-snapshot-DGFeI30h.cjs +0 -2
- package/dist/matrix-CcqYOuq_.cjs +0 -1
- package/dist/media-B7vnpD8k.cjs +0 -1
- package/dist/media-Y90dHK9z.js +0 -70
- package/dist/prepared-BLhV7vdE.cjs +0 -1
- package/dist/sha256-BDQ1Qk7A.js +0 -158
- package/dist/sha256-DgZAKXqI.cjs +0 -1
- package/dist/template-catalog-DDH-5J57.cjs +0 -1
- package/dist/template-registry-D24Z8aQf.cjs +0 -1
- package/dist/template-serialization-BOUidUlh.cjs +0 -1
- package/dist/template-serialization-BgGWYV_1.js +0 -307
|
@@ -1,232 +1,254 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
1
|
+
const at = 1.35, ut = 10.5, ft = '"Microsoft YaHei", sans-serif', lt = 0.75, K = "#333333", V = "#000000", q = "1.0.0-mach", dt = 25.4, ht = 96;
|
|
2
|
+
function k(t = 96) {
|
|
3
3
|
return t / 25.4;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
return (t || 0) *
|
|
5
|
+
function pt(t, e = 96) {
|
|
6
|
+
return (t || 0) * k(e);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
return t /
|
|
8
|
+
function mt(t, e = 96) {
|
|
9
|
+
return t / k(e);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function W(t, e = 96) {
|
|
12
12
|
return t * e / 72;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function gt(t, e) {
|
|
15
15
|
const n = 10 ** e;
|
|
16
16
|
return Math.round(t * n) / n;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const bt = {
|
|
19
19
|
a3: { widthMm: 297, heightMm: 420 },
|
|
20
20
|
a4: { widthMm: 210, heightMm: 297 },
|
|
21
21
|
a5: { widthMm: 148, heightMm: 210 },
|
|
22
22
|
b4: { widthMm: 250, heightMm: 353 },
|
|
23
23
|
b5: { widthMm: 176, heightMm: 250 }
|
|
24
24
|
};
|
|
25
|
-
function
|
|
25
|
+
function St(t, e = 96, n = 10.5) {
|
|
26
26
|
if (t?.fontSizePx != null)
|
|
27
27
|
return { fontSizePt: t.fontSizePx * 72 / e, fontSizePx: t.fontSizePx };
|
|
28
28
|
const o = t?.fontSize ?? n;
|
|
29
|
-
return { fontSizePt: o, fontSizePx:
|
|
29
|
+
return { fontSizePt: o, fontSizePx: W(o, e) };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function yt(t, e = K) {
|
|
32
32
|
return {
|
|
33
33
|
color: t?.borderColor ?? t?.lineColor ?? e,
|
|
34
34
|
widthPt: t?.lineWidthPt ?? 0.75
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Et(t, e = V) {
|
|
38
38
|
return t?.color ?? e;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function At(t) {
|
|
41
41
|
return t?.lineHeight ?? 1.35;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function wt(t) {
|
|
44
44
|
const e = t?.borderTop !== !1, n = t?.borderRight !== !1, o = t?.borderBottom !== !1, r = t?.borderLeft !== !1;
|
|
45
45
|
return { top: e, right: n, bottom: o, left: r, inner: e || n || o || r };
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function X(t, e) {
|
|
48
48
|
const n = { ...t, ...e };
|
|
49
49
|
return e?.fontSize != null && e.fontSizePx == null && delete n.fontSizePx, e?.fontSizePx != null && e.fontSize == null && delete n.fontSize, n;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Y(t, e = !1) {
|
|
52
52
|
return e || typeof t == "boolean" || t instanceof Date || typeof t == "number" && Number.isFinite(t) ? "center" : "left";
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function J(t) {
|
|
55
55
|
return t !== void 0 && /[0#?]/.test(t.replace(/"[^"]*"|\\.|\[[^\]]*\]/g, ""));
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
return e.style?.align ?? t?.align ??
|
|
57
|
+
function Z(t, e) {
|
|
58
|
+
return e.style?.align ?? t?.align ?? Y(
|
|
59
59
|
e.value,
|
|
60
|
-
e.valueType === "number" || e.valueType === "boolean" || e.value == null &&
|
|
60
|
+
e.valueType === "number" || e.valueType === "boolean" || e.value == null && J(e.numberFormat)
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
const n =
|
|
65
|
-
return n.align =
|
|
63
|
+
function xt(t, e) {
|
|
64
|
+
const n = X(t, e.style);
|
|
65
|
+
return n.align = Z(t, e), n;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Q(t, e) {
|
|
68
68
|
const n = t.length;
|
|
69
69
|
if (n === 0) return [];
|
|
70
|
-
const o = t.reduce((
|
|
70
|
+
const o = t.reduce((f, d) => f + d, 0), r = o > 0 && e > 0 ? e / o : 1, i = [];
|
|
71
71
|
let u = 0;
|
|
72
|
-
for (let
|
|
73
|
-
const d = Math.max(0, t[
|
|
72
|
+
for (let f = 0; f < n; f++) {
|
|
73
|
+
const d = Math.max(0, t[f] * r);
|
|
74
74
|
i.push({ pos: u, size: d }), u += d;
|
|
75
75
|
}
|
|
76
76
|
return i;
|
|
77
77
|
}
|
|
78
78
|
function L(t, e, n) {
|
|
79
|
-
return t?.length ?
|
|
79
|
+
return t?.length ? Q(t, e) : Array.from({ length: n }, (o, r) => ({
|
|
80
80
|
pos: e * r / n,
|
|
81
81
|
size: e / n
|
|
82
82
|
}));
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const o = t.cells ?? [], r = Math.max(o.length, 1), i = t.colWidthsMm?.length ?? o.reduce((s,
|
|
86
|
-
o.forEach((s,
|
|
84
|
+
function Tt(t, e, n) {
|
|
85
|
+
const o = t.cells ?? [], r = Math.max(o.length, 1), i = t.colWidthsMm?.length ?? o.reduce((s, c) => Math.max(s, Array.isArray(c) ? c.length : 0), 1), u = L(t.colWidthsMm, e, i), f = (s) => s <= 0 ? 0 : s >= i ? u[u.length - 1].pos + u[u.length - 1].size : u[s].pos, d = L(t.rowHeightsMm, n, r), g = (s) => s <= 0 ? 0 : s >= r ? d[d.length - 1].pos + d[d.length - 1].size : d[s].pos, y = /* @__PURE__ */ new Set(), E = (s, c) => `${s}:${c}`, A = [], P = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set(), l = (s, c) => `v${s}:${c}`, p = (s, c) => `h${s}:${c}`;
|
|
86
|
+
o.forEach((s, c) => {
|
|
87
87
|
if (!Array.isArray(s)) return;
|
|
88
|
-
let
|
|
88
|
+
let a = 0;
|
|
89
89
|
for (const m of s) {
|
|
90
|
-
for (;
|
|
91
|
-
if (
|
|
92
|
-
const
|
|
93
|
-
for (let
|
|
94
|
-
for (let
|
|
95
|
-
|
|
96
|
-
for (let
|
|
97
|
-
for (let
|
|
98
|
-
for (let
|
|
99
|
-
for (let
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
ri:
|
|
103
|
-
ci:
|
|
90
|
+
for (; a < i && y.has(E(c, a)); ) a++;
|
|
91
|
+
if (a >= i) break;
|
|
92
|
+
const U = Math.max(1, Math.min(m?.colSpan ?? 1, i - a)), G = Math.max(1, m?.rowSpan ?? 1), M = Math.min(r, c + G), w = Math.min(i, a + U);
|
|
93
|
+
for (let b = c; b < M; b++)
|
|
94
|
+
for (let S = a; S < w; S++)
|
|
95
|
+
y.add(E(b, S));
|
|
96
|
+
for (let b = a + 1; b < w; b++)
|
|
97
|
+
for (let S = c; S < M; S++) P.add(l(b, S));
|
|
98
|
+
for (let b = c + 1; b < M; b++)
|
|
99
|
+
for (let S = a; S < w; S++) _.add(p(b, S));
|
|
100
|
+
const $ = f(a), v = g(c);
|
|
101
|
+
A.push({
|
|
102
|
+
ri: c,
|
|
103
|
+
ci: a,
|
|
104
104
|
cell: m ?? {},
|
|
105
|
-
xMm:
|
|
105
|
+
xMm: $,
|
|
106
106
|
yMm: v,
|
|
107
|
-
widthMm:
|
|
108
|
-
heightMm:
|
|
109
|
-
}),
|
|
107
|
+
widthMm: f(w) - $,
|
|
108
|
+
heightMm: g(M) - v
|
|
109
|
+
}), a = w;
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
112
|
const h = [];
|
|
113
113
|
for (let s = 1; s < i; s++) {
|
|
114
|
-
let
|
|
115
|
-
for (let
|
|
116
|
-
const m =
|
|
117
|
-
m &&
|
|
114
|
+
let c = -1;
|
|
115
|
+
for (let a = 0; a <= r; a++) {
|
|
116
|
+
const m = a < r && !P.has(l(s, a));
|
|
117
|
+
m && c < 0 && (c = a), !m && c >= 0 && (h.push({ kind: "v", pos: f(s), from: g(c), to: g(a) }), c = -1);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
for (let s = 1; s < r; s++) {
|
|
121
|
-
let
|
|
122
|
-
for (let
|
|
123
|
-
const m =
|
|
124
|
-
m &&
|
|
121
|
+
let c = -1;
|
|
122
|
+
for (let a = 0; a <= i; a++) {
|
|
123
|
+
const m = a < i && !_.has(p(s, a));
|
|
124
|
+
m && c < 0 && (c = a), !m && c >= 0 && (h.push({ kind: "h", pos: g(s), from: f(c), to: f(a) }), c = -1);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
return { columns: u, rows: d, cells:
|
|
127
|
+
return { columns: u, rows: d, cells: A, edges: h };
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Pt(t) {
|
|
130
130
|
if (!t || typeof t != "object" || Array.isArray(t)) return !1;
|
|
131
131
|
const { start: e, end: n, color: o } = t;
|
|
132
132
|
return typeof e == "number" && typeof n == "number" && Number.isFinite(e) && Number.isFinite(n) && e >= 0 && n <= 1 && e <= n && typeof o == "string" && /^#[0-9a-f]{6}$/i.test(o);
|
|
133
133
|
}
|
|
134
|
-
const
|
|
135
|
-
function
|
|
134
|
+
const _t = q;
|
|
135
|
+
function Mt(t) {
|
|
136
136
|
return (t.kind === "image" || t.kind === "barcode" || t.kind === "qrcode" || t.kind === "chart") && !!t.imageData;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ot(t) {
|
|
139
139
|
return t.kind === "text" && Array.isArray(t.richParagraphs) && t.richParagraphs.length > 0;
|
|
140
140
|
}
|
|
141
141
|
function O(t) {
|
|
142
142
|
return !!t && typeof t == "object";
|
|
143
143
|
}
|
|
144
|
+
function C(t, e) {
|
|
145
|
+
t.collection && (t.collection.invalidContainer ??= e);
|
|
146
|
+
}
|
|
147
|
+
function tt(t, e, n, o, r) {
|
|
148
|
+
for (const [i, u] of t.entries()) {
|
|
149
|
+
if (!Array.isArray(u)) {
|
|
150
|
+
C(r, `${e}.grid.cells.${i}`);
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
for (const [f, d] of u.entries()) {
|
|
154
|
+
if (++r.nodes > 1e6) return { path: e, message: "组件树超过100万个结构节点预算" };
|
|
155
|
+
if (!O(d)) continue;
|
|
156
|
+
const g = d.children;
|
|
157
|
+
if (!Array.isArray(g)) {
|
|
158
|
+
g != null && C(r, `${e}.grid.cells.${i}.${f}.children`);
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
for (const [y, E] of g.entries()) {
|
|
162
|
+
const A = N(E, `${e}.grid.cells.${i}.${f}.children.${y}`, n + 1, o, r);
|
|
163
|
+
if (A) return A;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
144
168
|
function N(t, e, n, o, r) {
|
|
145
169
|
if (++r.nodes > 1e6) return { path: e, message: "组件树超过100万个结构节点预算" };
|
|
146
|
-
if (O(t)) {
|
|
170
|
+
if (r.collection?.components.add(t), !!O(t)) {
|
|
147
171
|
if (n > 64) return { path: e, message: "组件嵌套超过64层预算" };
|
|
148
172
|
if (o.has(t)) return { path: e, message: "组件树包含循环引用" };
|
|
149
|
-
if (
|
|
173
|
+
if (O(t.grid)) {
|
|
174
|
+
if (!Array.isArray(t.grid.cells)) {
|
|
175
|
+
t.grid.cells != null && C(r, `${e}.grid.cells`);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
150
178
|
o.add(t);
|
|
151
179
|
try {
|
|
152
|
-
|
|
153
|
-
if (Array.isArray(u))
|
|
154
|
-
for (const [l, d] of u.entries()) {
|
|
155
|
-
if (++r.nodes > 1e6) return { path: e, message: "组件树超过100万个结构节点预算" };
|
|
156
|
-
if (!(!O(d) || !Array.isArray(d.children)))
|
|
157
|
-
for (const [S, E] of d.children.entries()) {
|
|
158
|
-
const y = N(E, `${e}.grid.cells.${i}.${l}.children.${S}`, n + 1, o, r);
|
|
159
|
-
if (y) return y;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
180
|
+
return tt(t.grid.cells, e, n, o, r);
|
|
162
181
|
} finally {
|
|
163
182
|
o.delete(t);
|
|
164
183
|
}
|
|
165
184
|
}
|
|
166
185
|
}
|
|
167
186
|
}
|
|
168
|
-
function
|
|
187
|
+
function et(t, e = "$.components", n = { nodes: 0 }) {
|
|
169
188
|
for (const [o, r] of t.entries()) {
|
|
170
189
|
const i = N(r, `${e}.${o}`, 0, /* @__PURE__ */ new Set(), n);
|
|
171
190
|
if (i) return i;
|
|
172
191
|
}
|
|
173
192
|
}
|
|
174
|
-
function
|
|
175
|
-
const
|
|
176
|
-
for (const [
|
|
177
|
-
if (!O(
|
|
178
|
-
|
|
179
|
-
|
|
193
|
+
function nt(t, e) {
|
|
194
|
+
const n = { nodes: 0, collection: e };
|
|
195
|
+
for (const [o, r] of t.entries()) {
|
|
196
|
+
if (!O(r) || !Array.isArray(r.components)) {
|
|
197
|
+
C(n, `$.pages.${o}.components`);
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
const i = et(r.components, `$.pages.${o}.components`, n);
|
|
201
|
+
if (i) return i;
|
|
180
202
|
}
|
|
181
203
|
}
|
|
182
|
-
function
|
|
183
|
-
const
|
|
184
|
-
if (
|
|
204
|
+
function Ct(t, e) {
|
|
205
|
+
const n = nt(t.pages, e);
|
|
206
|
+
if (n) throw new TypeError(`${n.path}: ${n.message}`);
|
|
185
207
|
}
|
|
186
|
-
function
|
|
208
|
+
function T(t) {
|
|
187
209
|
if (t?.aborted) throw t.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
188
210
|
}
|
|
189
|
-
function
|
|
211
|
+
function ot(t) {
|
|
190
212
|
try {
|
|
191
213
|
Promise.resolve(t()).catch(() => {
|
|
192
214
|
});
|
|
193
215
|
} catch {
|
|
194
216
|
}
|
|
195
217
|
}
|
|
196
|
-
function
|
|
197
|
-
|
|
218
|
+
function rt(t, e, n) {
|
|
219
|
+
T(t.signal), ot(() => t.onProgress?.(e, n)), T(t.signal);
|
|
198
220
|
}
|
|
199
|
-
function
|
|
221
|
+
function Dt(t, e) {
|
|
200
222
|
const n = Promise.resolve(t);
|
|
201
223
|
return e?.aborted ? (n.catch(() => {
|
|
202
224
|
}), Promise.reject(e.reason ?? new DOMException("The operation was aborted.", "AbortError"))) : e ? new Promise((o, r) => {
|
|
203
225
|
const i = () => e.removeEventListener("abort", u), u = () => {
|
|
204
226
|
i(), r(e.reason ?? new DOMException("The operation was aborted.", "AbortError"));
|
|
205
227
|
};
|
|
206
|
-
e.addEventListener("abort", u, { once: !0 }), n.then((
|
|
207
|
-
i(), o(
|
|
208
|
-
}, (
|
|
209
|
-
i(), r(
|
|
228
|
+
e.addEventListener("abort", u, { once: !0 }), n.then((f) => {
|
|
229
|
+
i(), o(f);
|
|
230
|
+
}, (f) => {
|
|
231
|
+
i(), r(f);
|
|
210
232
|
}), e.aborted && u();
|
|
211
233
|
}) : n;
|
|
212
234
|
}
|
|
213
|
-
function
|
|
235
|
+
function It(t, e) {
|
|
214
236
|
const n = () => e.abort(t?.reason);
|
|
215
237
|
return t?.addEventListener("abort", n, { once: !0 }), t?.aborted && n(), () => t?.removeEventListener("abort", n);
|
|
216
238
|
}
|
|
217
|
-
async function
|
|
218
|
-
|
|
239
|
+
async function $t(t, e, n) {
|
|
240
|
+
rt(t, e, n), (t.signal || t.onProgress) && await new Promise((o) => setTimeout(o, 0)), T(t.signal);
|
|
219
241
|
}
|
|
220
|
-
function
|
|
242
|
+
function vt(t) {
|
|
221
243
|
let e = 0, n = Date.now();
|
|
222
244
|
return (o = 1) => {
|
|
223
|
-
if (
|
|
245
|
+
if (T(t.signal), e += o, !(e < 4096 && Date.now() - n < 8))
|
|
224
246
|
return e = 0, new Promise((r) => setTimeout(r, 0)).then(() => {
|
|
225
|
-
n = Date.now(),
|
|
247
|
+
n = Date.now(), T(t.signal);
|
|
226
248
|
});
|
|
227
249
|
};
|
|
228
250
|
}
|
|
229
|
-
const
|
|
251
|
+
const Lt = 200, F = 1e3, j = 128, x = "other", z = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]), st = {
|
|
230
252
|
"invalid-image-data": !0,
|
|
231
253
|
"image-budget-exceeded": !0,
|
|
232
254
|
"component-render-failed": !0,
|
|
@@ -242,99 +264,99 @@ const vt = 200, $ = 1e3, F = 128, x = "other", j = /* @__PURE__ */ new Set(["__p
|
|
|
242
264
|
"image-decode-failed": !0,
|
|
243
265
|
"asset-render-failed": !0,
|
|
244
266
|
"asset-budget-exceeded": !0
|
|
245
|
-
},
|
|
246
|
-
function
|
|
267
|
+
}, I = /* @__PURE__ */ new Set([...Object.keys(st), "pdf-page", "pdf-font", "pdf-fidelity", "xlsx-fidelity", "xlsx-snapshot", "prepared-layout-preserved", "prepared-font-metrics", "layout"]);
|
|
268
|
+
function B(t) {
|
|
247
269
|
if (t === void 0) return 1 / 0;
|
|
248
|
-
if (!Number.isInteger(t) || t < 0 || t >
|
|
270
|
+
if (!Number.isInteger(t) || t < 0 || t > F) throw new RangeError("diagnosticLimit must be an integer between 0 and 1000");
|
|
249
271
|
return t;
|
|
250
272
|
}
|
|
251
|
-
function
|
|
252
|
-
const e =
|
|
253
|
-
let
|
|
254
|
-
function
|
|
255
|
-
const h =
|
|
256
|
-
return r[h] === void 0 &&
|
|
273
|
+
function Rt(t) {
|
|
274
|
+
const e = B(t), n = [], o = [], r = /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ Object.create(null);
|
|
275
|
+
let f = 0, d = 0, g = 0;
|
|
276
|
+
function y(l, p) {
|
|
277
|
+
const h = l.length <= 128 && !z.has(l) && (r[l] !== void 0 || g < j || I.has(l)) ? l : x;
|
|
278
|
+
return r[h] === void 0 && g++, r[h] = (r[h] ?? 0) + p, h;
|
|
257
279
|
}
|
|
258
|
-
function
|
|
280
|
+
function E(l, p) {
|
|
259
281
|
if (e === 1 / 0) {
|
|
260
|
-
n.push(
|
|
282
|
+
n.push(l);
|
|
261
283
|
return;
|
|
262
284
|
}
|
|
263
|
-
const h = `${D(
|
|
285
|
+
const h = `${D(l) ? "e" : "o"}:${p}`;
|
|
264
286
|
if (n.length < e) {
|
|
265
|
-
n.push(
|
|
287
|
+
n.push(l), o.push(h), i.set(h, (i.get(h) ?? 0) + 1);
|
|
266
288
|
return;
|
|
267
289
|
}
|
|
268
290
|
if (!(!e || i.has(h)))
|
|
269
291
|
for (let s = n.length - 1; s >= 0; s--) {
|
|
270
|
-
const
|
|
271
|
-
if (!(
|
|
272
|
-
n[s] =
|
|
292
|
+
const c = o[s], a = i.get(c) ?? 0;
|
|
293
|
+
if (!(a <= 1)) {
|
|
294
|
+
n[s] = l, o[s] = h, i.set(c, a - 1), i.set(h, 1);
|
|
273
295
|
return;
|
|
274
296
|
}
|
|
275
297
|
}
|
|
276
298
|
}
|
|
277
|
-
function
|
|
299
|
+
function A(l) {
|
|
278
300
|
d++;
|
|
279
|
-
const p =
|
|
280
|
-
D(
|
|
301
|
+
const p = y(l.code, 1);
|
|
302
|
+
D(l) && (f++, u[p] = (u[p] ?? 0) + 1), E(l, p);
|
|
281
303
|
}
|
|
282
|
-
function P(
|
|
283
|
-
d +=
|
|
304
|
+
function P(l) {
|
|
305
|
+
d += l.total;
|
|
284
306
|
const p = /* @__PURE__ */ new Map();
|
|
285
|
-
for (const [s,
|
|
286
|
-
const
|
|
287
|
-
p.set(s,
|
|
307
|
+
for (const [s, c] of Object.entries(l.counts)) {
|
|
308
|
+
const a = y(s, c), m = l.explanations?.counts[s] ?? 0;
|
|
309
|
+
p.set(s, a), m && (f += m, u[a] = (u[a] ?? 0) + m);
|
|
288
310
|
}
|
|
289
311
|
if (e === 1 / 0) {
|
|
290
|
-
for (const s of
|
|
312
|
+
for (const s of l.entries) n.push(s);
|
|
291
313
|
return;
|
|
292
314
|
}
|
|
293
315
|
const h = /* @__PURE__ */ new Map();
|
|
294
|
-
for (const s of
|
|
295
|
-
const
|
|
296
|
-
|
|
316
|
+
for (const s of l.entries) {
|
|
317
|
+
const c = H(l, s, h);
|
|
318
|
+
c !== void 0 && E(s, p.get(c));
|
|
297
319
|
}
|
|
298
320
|
}
|
|
299
321
|
function _() {
|
|
300
|
-
return { total: d, counts: { ...r }, entries: n.slice(), omitted: d - n.length, ...
|
|
322
|
+
return { total: d, counts: { ...r }, entries: n.slice(), omitted: d - n.length, ...f ? { explanations: { total: f, counts: { ...u } } } : {} };
|
|
301
323
|
}
|
|
302
|
-
return { entries: n, push:
|
|
324
|
+
return { entries: n, push: A, merge: P, snapshot: _, get total() {
|
|
303
325
|
return d;
|
|
304
326
|
} };
|
|
305
327
|
}
|
|
306
328
|
function kt(t) {
|
|
307
329
|
if (!t || typeof t != "object" || Array.isArray(t)) return !1;
|
|
308
330
|
const e = t;
|
|
309
|
-
if (!Number.isSafeInteger(e.total) || e.total < 0 || !Number.isSafeInteger(e.omitted) || e.omitted < 0 || !Array.isArray(e.entries) || e.entries.length >
|
|
331
|
+
if (!Number.isSafeInteger(e.total) || e.total < 0 || !Number.isSafeInteger(e.omitted) || e.omitted < 0 || !Array.isArray(e.entries) || e.entries.length > F || e.total !== e.entries.length + e.omitted || !e.counts || typeof e.counts != "object" || Array.isArray(e.counts) || Object.keys(e.counts).some((o) => o.length > 128 || z.has(o))) return !1;
|
|
310
332
|
const n = Object.values(e.counts);
|
|
311
|
-
return n.length >
|
|
333
|
+
return n.length > j + I.size + 1 || n.some((o) => !Number.isSafeInteger(o) || o <= 0) || n.reduce((o, r) => o + r, 0) !== e.total ? !1 : ct(e) && it(e);
|
|
312
334
|
}
|
|
313
|
-
function
|
|
335
|
+
function it(t) {
|
|
314
336
|
const e = /* @__PURE__ */ new Map();
|
|
315
|
-
return t.entries.every((n) =>
|
|
337
|
+
return t.entries.every((n) => H(t, n, e) !== void 0);
|
|
316
338
|
}
|
|
317
|
-
function
|
|
339
|
+
function R(t, e, n, o) {
|
|
318
340
|
const r = `${n ? "e" : "o"}:${e}`, i = (o.get(r) ?? 0) + 1, u = t.explanations?.counts[e] ?? 0;
|
|
319
341
|
return (n ? u : (t.counts[e] ?? 0) - u) < i ? !1 : (o.set(r, i), !0);
|
|
320
342
|
}
|
|
321
|
-
function
|
|
343
|
+
function H(t, e, n) {
|
|
322
344
|
const o = e && typeof e == "object" && typeof e.code == "string" ? e.code : "unknown", r = Object.prototype.hasOwnProperty.call(t.counts, o) ? o : x, i = !!e && typeof e == "object" && D(e);
|
|
323
|
-
if (
|
|
324
|
-
if (r !== x && !
|
|
345
|
+
if (R(t, r, i, n)) return r;
|
|
346
|
+
if (r !== x && !I.has(o) && R(t, x, i, n)) return x;
|
|
325
347
|
}
|
|
326
348
|
function D(t) {
|
|
327
349
|
return t.valueState !== void 0;
|
|
328
350
|
}
|
|
329
|
-
function
|
|
351
|
+
function ct(t) {
|
|
330
352
|
if (t.explanations === void 0) return !0;
|
|
331
353
|
const e = t.explanations;
|
|
332
354
|
if (!e || typeof e != "object" || Array.isArray(e) || !Number.isSafeInteger(e.total) || e.total < 0 || e.total > t.total || !e.counts || typeof e.counts != "object" || Array.isArray(e.counts)) return !1;
|
|
333
355
|
const n = Object.entries(e.counts);
|
|
334
356
|
return n.every(([o, r]) => Number.isSafeInteger(r) && r > 0 && r <= (t.counts[o] ?? 0)) && n.reduce((o, [, r]) => o + r, 0) === e.total;
|
|
335
357
|
}
|
|
336
|
-
function
|
|
337
|
-
const n =
|
|
358
|
+
function Nt(t, e) {
|
|
359
|
+
const n = B(t), o = [];
|
|
338
360
|
let r = 0;
|
|
339
361
|
return { entries: o, get total() {
|
|
340
362
|
return r;
|
|
@@ -345,48 +367,48 @@ function Rt(t, e) {
|
|
|
345
367
|
} };
|
|
346
368
|
}
|
|
347
369
|
export {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
370
|
+
ot as A,
|
|
371
|
+
rt as B,
|
|
372
|
+
ht as C,
|
|
373
|
+
ft as D,
|
|
374
|
+
Pt as E,
|
|
375
|
+
It as F,
|
|
376
|
+
Lt as G,
|
|
355
377
|
kt as H,
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
378
|
+
Y as I,
|
|
379
|
+
et as J,
|
|
380
|
+
nt as K,
|
|
381
|
+
at as L,
|
|
382
|
+
dt as M,
|
|
383
|
+
Ct as N,
|
|
384
|
+
J as O,
|
|
385
|
+
bt as P,
|
|
386
|
+
_t as R,
|
|
387
|
+
q as S,
|
|
388
|
+
St as a,
|
|
389
|
+
xt as b,
|
|
390
|
+
At as c,
|
|
391
|
+
Et as d,
|
|
392
|
+
yt as e,
|
|
393
|
+
wt as f,
|
|
394
|
+
Ot as g,
|
|
395
|
+
V as h,
|
|
396
|
+
Mt as i,
|
|
397
|
+
lt as j,
|
|
398
|
+
ut as k,
|
|
399
|
+
K as l,
|
|
400
|
+
X as m,
|
|
401
|
+
pt as n,
|
|
402
|
+
$t as o,
|
|
403
|
+
W as p,
|
|
404
|
+
k as q,
|
|
405
|
+
Tt as r,
|
|
406
|
+
mt as s,
|
|
407
|
+
gt as t,
|
|
408
|
+
Z as u,
|
|
409
|
+
Nt as v,
|
|
410
|
+
Dt as w,
|
|
411
|
+
Rt as x,
|
|
412
|
+
vt as y,
|
|
413
|
+
T as z
|
|
392
414
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const ot='"Microsoft YaHei", sans-serif';const $="#333333",k="#000000",H="1.0.0-mach";function M(t=96){return t/25.4}function rt(t,e=96){return(t||0)*M(e)}function st(t,e=96){return t/M(e)}function B(t,e=96){return t*e/72}function it(t,e){const n=10**e;return Math.round(t*n)/n}const ct={a3:{widthMm:297,heightMm:420},a4:{widthMm:210,heightMm:297},a5:{widthMm:148,heightMm:210},b4:{widthMm:250,heightMm:353},b5:{widthMm:176,heightMm:250}};function at(t,e=96,n=10.5){if(t?.fontSizePx!=null)return{fontSizePt:t.fontSizePx*72/e,fontSizePx:t.fontSizePx};const o=t?.fontSize??n;return{fontSizePt:o,fontSizePx:B(o,e)}}function ut(t,e=$){return{color:t?.borderColor??t?.lineColor??e,widthPt:t?.lineWidthPt??.75}}function ft(t,e=k){return t?.color??e}function lt(t){return t?.lineHeight??1.35}function dt(t){const e=t?.borderTop!==!1,n=t?.borderRight!==!1,o=t?.borderBottom!==!1,r=t?.borderLeft!==!1;return{top:e,right:n,bottom:o,left:r,inner:e||n||o||r}}function U(t,e){const n={...t,...e};return e?.fontSize!=null&&e.fontSizePx==null&&delete n.fontSizePx,e?.fontSizePx!=null&&e.fontSize==null&&delete n.fontSize,n}function z(t,e=!1){return e||typeof t=="boolean"||t instanceof Date||typeof t=="number"&&Number.isFinite(t)?"center":"left"}function j(t){return t!==void 0&&/[0#?]/.test(t.replace(/"[^"]*"|\\.|\[[^\]]*\]/g,""))}function G(t,e){return e.style?.align??t?.align??z(e.value,e.valueType==="number"||e.valueType==="boolean"||e.value==null&&j(e.numberFormat))}function pt(t,e){const n=U(t,e.style);return n.align=G(t,e),n}function mt(t,e){const n=t.length;if(n===0)return[];const o=t.reduce((f,d)=>f+d,0),r=o>0&&e>0?e/o:1,i=[];let u=0;for(let f=0;f<n;f++){const d=Math.max(0,t[f]*r);i.push({pos:u,size:d}),u+=d}return i}function F(t,e,n){return t?.length?mt(t,e):Array.from({length:n},(o,r)=>({pos:e*r/n,size:e/n}))}function ht(t,e,n){const o=t.cells??[],r=Math.max(o.length,1),i=t.colWidthsMm?.length??o.reduce((s,c)=>Math.max(s,Array.isArray(c)?c.length:0),1),u=F(t.colWidthsMm,e,i),f=s=>s<=0?0:s>=i?u[u.length-1].pos+u[u.length-1].size:u[s].pos,d=F(t.rowHeightsMm,n,r),g=s=>s<=0?0:s>=r?d[d.length-1].pos+d[d.length-1].size:d[s].pos,T=new Set,_=(s,c)=>`${s}:${c}`,A=[],O=new Set,x=new Set,l=(s,c)=>`v${s}:${c}`,m=(s,c)=>`h${s}:${c}`;o.forEach((s,c)=>{if(!Array.isArray(s))return;let a=0;for(const h of s){for(;a<i&&T.has(_(c,a));)a++;if(a>=i)break;const et=Math.max(1,Math.min(h?.colSpan??1,i-a)),nt=Math.max(1,h?.rowSpan??1),C=Math.min(r,c+nt),y=Math.min(i,a+et);for(let S=c;S<C;S++)for(let E=a;E<y;E++)T.add(_(S,E));for(let S=a+1;S<y;S++)for(let E=c;E<C;E++)O.add(l(S,E));for(let S=c+1;S<C;S++)for(let E=a;E<y;E++)x.add(m(S,E));const R=f(a),v=g(c);A.push({ri:c,ci:a,cell:h??{},xMm:R,yMm:v,widthMm:f(y)-R,heightMm:g(C)-v}),a=y}});const p=[];for(let s=1;s<i;s++){let c=-1;for(let a=0;a<=r;a++){const h=a<r&&!O.has(l(s,a));h&&c<0&&(c=a),!h&&c>=0&&(p.push({kind:"v",pos:f(s),from:g(c),to:g(a)}),c=-1)}}for(let s=1;s<r;s++){let c=-1;for(let a=0;a<=i;a++){const h=a<i&&!x.has(m(s,a));h&&c<0&&(c=a),!h&&c>=0&&(p.push({kind:"h",pos:g(s),from:f(c),to:f(a)}),c=-1)}}return{columns:u,rows:d,cells:A,edges:p}}function gt(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{start:e,end:n,color:o}=t;return typeof e=="number"&&typeof n=="number"&&Number.isFinite(e)&&Number.isFinite(n)&&e>=0&&n<=1&&e<=n&&typeof o=="string"&&/^#[0-9a-f]{6}$/i.test(o)}const St=H;function Et(t){return(t.kind==="image"||t.kind==="barcode"||t.kind==="qrcode"||t.kind==="chart")&&!!t.imageData}function Tt(t){return t.kind==="text"&&Array.isArray(t.richParagraphs)&&t.richParagraphs.length>0}function D(t){return!!t&&typeof t=="object"}function I(t,e){t.collection&&(t.collection.invalidContainer??=e)}function _t(t,e,n,o,r){for(const[i,u]of t.entries()){if(!Array.isArray(u)){I(r,`${e}.grid.cells.${i}`);continue}for(const[f,d]of u.entries()){if(++r.nodes>1e6)return{path:e,message:"组件树超过100万个结构节点预算"};if(!D(d))continue;const g=d.children;if(!Array.isArray(g)){g!=null&&I(r,`${e}.grid.cells.${i}.${f}.children`);continue}for(const[T,_]of g.entries()){const A=V(_,`${e}.grid.cells.${i}.${f}.children.${T}`,n+1,o,r);if(A)return A}}}}function V(t,e,n,o,r){if(++r.nodes>1e6)return{path:e,message:"组件树超过100万个结构节点预算"};if(r.collection?.components.add(t),!!D(t)){if(n>64)return{path:e,message:"组件嵌套超过64层预算"};if(o.has(t))return{path:e,message:"组件树包含循环引用"};if(D(t.grid)){if(!Array.isArray(t.grid.cells)){t.grid.cells!=null&&I(r,`${e}.grid.cells`);return}o.add(t);try{return _t(t.grid.cells,e,n,o,r)}finally{o.delete(t)}}}}function K(t,e="$.components",n={nodes:0}){for(const[o,r]of t.entries()){const i=V(r,`${e}.${o}`,0,new Set,n);if(i)return i}}function X(t,e){const n={nodes:0,collection:e};for(const[o,r]of t.entries()){if(!D(r)||!Array.isArray(r.components)){I(n,`$.pages.${o}.components`);continue}const i=K(r.components,`$.pages.${o}.components`,n);if(i)return i}}function At(t,e){const n=X(t.pages,e);if(n)throw new TypeError(`${n.path}: ${n.message}`)}function b(t){if(t?.aborted)throw t.reason??new DOMException("The operation was aborted.","AbortError")}function W(t){try{Promise.resolve(t()).catch(()=>{})}catch{}}function Y(t,e,n){b(t.signal),W(()=>t.onProgress?.(e,n)),b(t.signal)}function bt(t,e){const n=Promise.resolve(t);return e?.aborted?(n.catch(()=>{}),Promise.reject(e.reason??new DOMException("The operation was aborted.","AbortError"))):e?new Promise((o,r)=>{const i=()=>e.removeEventListener("abort",u),u=()=>{i(),r(e.reason??new DOMException("The operation was aborted.","AbortError"))};e.addEventListener("abort",u,{once:!0}),n.then(f=>{i(),o(f)},f=>{i(),r(f)}),e.aborted&&u()}):n}function yt(t,e){const n=()=>e.abort(t?.reason);return t?.addEventListener("abort",n,{once:!0}),t?.aborted&&n(),()=>t?.removeEventListener("abort",n)}async function Pt(t,e,n){Y(t,e,n),(t.signal||t.onProgress)&&await new Promise(o=>setTimeout(o,0)),b(t.signal)}function Ot(t){let e=0,n=Date.now();return(o=1)=>{if(b(t.signal),e+=o,!(e<4096&&Date.now()-n<8))return e=0,new Promise(r=>setTimeout(r,0)).then(()=>{n=Date.now(),b(t.signal)})}}const xt=200,q=1e3,Z=128,P="other",J=new Set(["__proto__","prototype","constructor"]),Ct={"invalid-image-data":!0,"image-budget-exceeded":!0,"component-render-failed":!0,"unsupported-text":!0,"output-degraded":!0,"missing-image":!0,"unsupported-component":!0,"unsupported-image-format":!0,"unsupported-style":!0,"rich-text-flattened":!0,"nested-components-omitted":!0,"async-image-required":!0,"image-decode-failed":!0,"asset-render-failed":!0,"asset-budget-exceeded":!0},L=new Set([...Object.keys(Ct),"pdf-page","pdf-font","pdf-fidelity","xlsx-fidelity","xlsx-snapshot","prepared-layout-preserved","prepared-font-metrics","layout"]);function Q(t){if(t===void 0)return 1/0;if(!Number.isInteger(t)||t<0||t>q)throw new RangeError("diagnosticLimit must be an integer between 0 and 1000");return t}function Dt(t){const e=Q(t),n=[],o=[],r=Object.create(null),i=new Map,u=Object.create(null);let f=0,d=0,g=0;function T(l,m){const p=l.length<=128&&!J.has(l)&&(r[l]!==void 0||g<Z||L.has(l))?l:P;return r[p]===void 0&&g++,r[p]=(r[p]??0)+m,p}function _(l,m){if(e===1/0){n.push(l);return}const p=`${w(l)?"e":"o"}:${m}`;if(n.length<e){n.push(l),o.push(p),i.set(p,(i.get(p)??0)+1);return}if(!(!e||i.has(p)))for(let s=n.length-1;s>=0;s--){const c=o[s],a=i.get(c)??0;if(!(a<=1)){n[s]=l,o[s]=p,i.set(c,a-1),i.set(p,1);return}}}function A(l){d++;const m=T(l.code,1);w(l)&&(f++,u[m]=(u[m]??0)+1),_(l,m)}function O(l){d+=l.total;const m=new Map;for(const[s,c]of Object.entries(l.counts)){const a=T(s,c),h=l.explanations?.counts[s]??0;m.set(s,a),h&&(f+=h,u[a]=(u[a]??0)+h)}if(e===1/0){for(const s of l.entries)n.push(s);return}const p=new Map;for(const s of l.entries){const c=tt(l,s,p);c!==void 0&&_(s,m.get(c))}}function x(){return{total:d,counts:{...r},entries:n.slice(),omitted:d-n.length,...f?{explanations:{total:f,counts:{...u}}}:{}}}return{entries:n,push:A,merge:O,snapshot:x,get total(){return d}}}function It(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t;if(!Number.isSafeInteger(e.total)||e.total<0||!Number.isSafeInteger(e.omitted)||e.omitted<0||!Array.isArray(e.entries)||e.entries.length>q||e.total!==e.entries.length+e.omitted||!e.counts||typeof e.counts!="object"||Array.isArray(e.counts)||Object.keys(e.counts).some(o=>o.length>128||J.has(o)))return!1;const n=Object.values(e.counts);return n.length>Z+L.size+1||n.some(o=>!Number.isSafeInteger(o)||o<=0)||n.reduce((o,r)=>o+r,0)!==e.total?!1:Mt(e)&&wt(e)}function wt(t){const e=new Map;return t.entries.every(n=>tt(t,n,e)!==void 0)}function N(t,e,n,o){const r=`${n?"e":"o"}:${e}`,i=(o.get(r)??0)+1,u=t.explanations?.counts[e]??0;return(n?u:(t.counts[e]??0)-u)<i?!1:(o.set(r,i),!0)}function tt(t,e,n){const o=e&&typeof e=="object"&&typeof e.code=="string"?e.code:"unknown",r=Object.prototype.hasOwnProperty.call(t.counts,o)?o:P,i=!!e&&typeof e=="object"&&w(e);if(N(t,r,i,n))return r;if(r!==P&&!L.has(o)&&N(t,P,i,n))return P}function w(t){return t.valueState!==void 0}function Mt(t){if(t.explanations===void 0)return!0;const e=t.explanations;if(!e||typeof e!="object"||Array.isArray(e)||!Number.isSafeInteger(e.total)||e.total<0||e.total>t.total||!e.counts||typeof e.counts!="object"||Array.isArray(e.counts))return!1;const n=Object.entries(e.counts);return n.every(([o,r])=>Number.isSafeInteger(r)&&r>0&&r<=(t.counts[o]??0))&&n.reduce((o,[,r])=>o+r,0)===e.total}function Lt(t,e){const n=Q(t),o=[];let r=0;return{entries:o,get total(){return r},push(...i){for(const u of i)r++,o.length<n&&o.push(u),e?.(u);return r}}}exports.CSS_DPI=96;exports.DEFAULT_BORDER_PT=.75;exports.DEFAULT_DIAGNOSTIC_LIMIT=xt;exports.DEFAULT_FONT_FAMILY=ot;exports.DEFAULT_FONT_PT=10.5;exports.DEFAULT_STROKE_COLOR=$;exports.DEFAULT_TEXT_COLOR=k;exports.LINE_HEIGHT=1.35;exports.MM_PER_INCH=25.4;exports.PAPER_SIZES=ct;exports.RENDER_PLAN_SCHEMA_VERSION=St;exports.SCHEMA_VERSION_MACH=H;exports.assertBoundedRenderTree=At;exports.assertOutputActive=b;exports.automaticCellAlignment=z;exports.componentTreeIssue=K;exports.createDiagnosticCollector=Dt;exports.createDiagnosticMessages=Lt;exports.createOutputScheduler=Ot;exports.forwardOutputAbort=yt;exports.gridCellAlignment=G;exports.hasNumericCellFormat=j;exports.isImageBackedComponent=Et;exports.isRichText=Tt;exports.mergeComponentStyles=U;exports.mmToPx=rt;exports.mmToPxFactor=M;exports.notifyOutputProgress=Y;exports.observeOutput=W;exports.outputCheckpoint=Pt;exports.ptToPx=B;exports.pxToMm=st;exports.renderTreeIssue=X;exports.resolveBoxBorders=dt;exports.resolveFontSize=at;exports.resolveGridCellStyle=pt;exports.resolveGridLayout=ht;exports.resolveLineHeight=lt;exports.resolveStroke=ut;exports.resolveTextColor=ft;exports.round=it;exports.validDataBar=gt;exports.validDiagnosticSummary=It;exports.waitForOutput=bt;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b as P } from "./template-serialization-
|
|
2
|
-
import { d as U } from "./data-bar-
|
|
1
|
+
import { b as P } from "./template-serialization-Cb1ospyK.js";
|
|
2
|
+
import { d as U } from "./data-bar-BVnzVbE9.js";
|
|
3
3
|
import { s as D } from "./dom-cell-address-Fn-8nk7D.js";
|
|
4
|
-
import { r as B, i as _, e as G, f as W, n as y, t as b, c as F, a as k, g as X, u as Y, b as J, D as q, h as Q } from "./diagnostic-collector-
|
|
5
|
-
import { r as H } from "./grid-strokes-
|
|
6
|
-
import { r as Z } from "./
|
|
4
|
+
import { r as B, i as _, e as G, f as W, n as y, t as b, c as F, a as k, g as X, u as Y, b as J, D as q, h as Q } from "./diagnostic-collector-CZ8DV6wA.js";
|
|
5
|
+
import { r as H } from "./grid-strokes-CovSH3A2.js";
|
|
6
|
+
import { r as Z } from "./media-jiLdCn3i.js";
|
|
7
7
|
function ee(e) {
|
|
8
8
|
const t = /\.pages\[(\d+)\](?:\.components\[(\d+)\])?/.exec(e);
|
|
9
9
|
return t ? {
|