@agile-team/mach-report 2.23.1 → 2.24.0
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 +8 -2
- package/dist/{ExcelBindingWizard-BrTmdo7f.cjs → ExcelBindingWizard-BV12hGiK.cjs} +1 -1
- package/dist/{ExcelBindingWizard-CcDMLO8Q.js → ExcelBindingWizard-Cy_lPjWV.js} +3 -3
- package/dist/ParamEditor-DenKjvKu.cjs +1 -0
- package/dist/ParamEditor-PyOqHzzw.js +750 -0
- package/dist/{ReportBatchPanel-CJB67WNd.js → ReportBatchPanel-8EFtMrKk.js} +2 -2
- package/dist/{ReportBatchPanel-CHxBtG9R.cjs → ReportBatchPanel-pQ6d0yqJ.cjs} +1 -1
- package/dist/ReportLabelStudio-B_KF3Zc_.cjs +1 -0
- package/dist/{ReportLabelStudio-Tplc1TLJ.js → ReportLabelStudio-HUeo2TsU.js} +68 -68
- package/dist/ReportParamPanel-8xR85nz-.cjs +1 -0
- package/dist/{ReportParamPanel-GI43aGa0.js → ReportParamPanel-DA-YpkvC.js} +328 -298
- package/dist/ReportPreview-CyUXJSVX.cjs +6 -0
- package/dist/ReportPreview-_wTJnsG1.js +7120 -0
- package/dist/{ReportTemplateLibrary-BFQIX0sg.cjs → ReportTemplateLibrary-CjArKxRG.cjs} +1 -1
- package/dist/{ReportTemplateLibrary-KqX4E2sN.js → ReportTemplateLibrary-DH8jl9IF.js} +28 -28
- package/dist/RuleEditor-Bmj98oC4.cjs +1 -0
- package/dist/{RuleEditor-OPX1awrH.js → RuleEditor-GDydlEHz.js} +846 -834
- package/dist/{TemplateOutlinePanel-CVYKVLv_.cjs → TemplateOutlinePanel-B554_qk1.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-DQS-eOs6.js → TemplateOutlinePanel-DjPqzU9h.js} +10 -10
- package/dist/{TemplateReusePanel-CY6O93Zk.cjs → TemplateReusePanel-D0628OYc.cjs} +1 -1
- package/dist/{TemplateReusePanel-DKXiFTyB.js → TemplateReusePanel-DtYbCN7U.js} +2 -2
- package/dist/TemplateReviewPanel-CSwvCz3f.cjs +1 -0
- package/dist/TemplateReviewPanel-D_FR4ISq.js +602 -0
- package/dist/artifact-integrity.json +94 -94
- package/dist/assets-B4AJIOTB.cjs +1 -0
- package/dist/assets-D0FbszhB.js +137 -0
- package/dist/{auto-BB99S802.js → auto-BksreoKc.js} +5 -5
- package/dist/auto-C3mGqzJ8.cjs +1 -0
- package/dist/capabilities-CTwlcl8q.cjs +1 -0
- package/dist/capabilities-lqDEZSq5.js +121 -0
- package/dist/data-bar-2NLRzOCQ.cjs +1 -0
- package/dist/{data-bar-IkI6VvMQ.js → data-bar-BnGtnJ82.js} +1 -1
- package/dist/designer-BNf7NWd6.js +7589 -0
- package/dist/designer-DWnZZ_ej.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +137 -4
- package/dist/designer.d.ts +137 -4
- package/dist/designer.js +5 -5
- package/dist/diagnostic-collector-1sqd7DQP.js +355 -0
- package/dist/diagnostic-collector-D3rlvxm3.cjs +1 -0
- package/dist/{dom-JWrchIre.js → dom-C90cTM6Y.js} +4 -4
- package/dist/dom-CxOkm_Sy.cjs +1 -0
- package/dist/{encoding-7lquyj0w.cjs → encoding-CkziAnZI.cjs} +1 -1
- package/dist/{encoding-CEd-dq9A.js → encoding-DSc9zv2F.js} +2 -2
- package/dist/{font-loader-D8pI87fL.cjs → font-loader-D-znWNWS.cjs} +1 -1
- package/dist/{font-loader-CNWXomuV.js → font-loader-i7lZbqH_.js} +1 -1
- package/dist/{grid-strokes-EoY66L2f.js → grid-strokes-BPiV1WHe.js} +1 -1
- package/dist/grid-strokes-DYf-6DMl.cjs +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +46 -7
- package/dist/index.d.ts +46 -7
- package/dist/index.js +69 -68
- package/dist/{json-snapshot-BRnzKudk.js → json-snapshot-BJWZNryO.js} +919 -791
- package/dist/json-snapshot-C7QZrRBf.cjs +2 -0
- package/dist/{pdf-CJToa81Z.js → pdf-0_5XiTCx.js} +2499 -2492
- package/dist/{pdf-DpMkW72B.cjs → pdf-DWuq6uxx.cjs} +31 -31
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +18 -0
- package/dist/pdf.d.ts +18 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-_BkUVc2z.js → plugin-B1ydqEmS.js} +1 -1
- package/dist/{plugin-BWTp-X7b.cjs → plugin-BQBz2vLG.cjs} +1 -1
- package/dist/prefill-2p9wrpn9.cjs +1 -0
- package/dist/{prefill-CWGdnqQd.js → prefill-Cuzh1wxf.js} +13 -13
- package/dist/prepared-CVbgO9KR.js +128 -0
- package/dist/prepared-DAwe8Il2.cjs +1 -0
- package/dist/protocol-BOri9qJL.js +105 -0
- package/dist/protocol-DD5dHSz-.cjs +1 -0
- package/dist/record-bindings-CAyM5tGg.cjs +1 -0
- package/dist/{record-bindings-DatJZv_e.js → record-bindings-fhav-NLG.js} +1 -1
- package/dist/{region-binding-workflow-DjrXuR1q.js → region-binding-workflow-Cm4mqhih.js} +2 -2
- package/dist/{region-binding-workflow-l7NGfagJ.cjs → region-binding-workflow-DWCUgjZl.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/rich-text-layout-X9YOz1JD.cjs +3 -0
- package/dist/{rich-text-layout-Ciwa6D2o.js → rich-text-layout-YJHtCWQI.js} +1 -1
- package/dist/runtime-BpSAgOw1.js +201 -0
- package/dist/runtime-Cd2UTnwe.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +55 -7
- package/dist/server/node.d.ts +55 -7
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +2721 -2430
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +47 -12
- package/dist/server.d.ts +47 -12
- package/dist/server.js +8 -8
- package/dist/style.css +1 -1
- package/dist/{template-catalog-DtrtT1FY.cjs → template-catalog--yBX169M.cjs} +1 -1
- package/dist/{template-catalog-CRuZL3pi.js → template-catalog-Bu7s7ReF.js} +3 -3
- package/dist/template-fragments-5EzVn7bm.cjs +1 -0
- package/dist/{template-fragments-CPpGpQoz.js → template-fragments-Di2vDFnx.js} +2 -2
- package/dist/{template-registry-O0hNIOfB.js → template-registry-BCBF2b8j.js} +10 -10
- package/dist/template-registry-Bnh5aEYf.cjs +1 -0
- package/dist/textwrap-BPFxhpOw.cjs +4 -0
- package/dist/{textwrap-D4ZksyMK.js → textwrap-CmVkhMhx.js} +1 -1
- package/dist/vue/async.d.cts +97 -18
- package/dist/vue/async.d.ts +97 -18
- package/dist/vue/index.d.cts +127 -28
- package/dist/vue/index.d.ts +127 -28
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +192 -162
- package/dist/{workbook-session-C9ZmCBwY.js → workbook-session-B6P_-5a4.js} +2 -2
- package/dist/{workbook-session-C6-SrnCT.cjs → workbook-session-BnPK3T58.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +55 -7
- package/dist/worker.d.ts +55 -7
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +18 -1
- package/dist/xlsx.d.ts +18 -1
- package/dist/xlsx.js +279 -272
- package/package.json +1 -1
- package/dist/ParamEditor-BGjovFUe.js +0 -737
- package/dist/ParamEditor-CeNp4_zQ.cjs +0 -1
- package/dist/ReportLabelStudio-g8PkqJWn.cjs +0 -1
- package/dist/ReportParamPanel-C7fZTllk.cjs +0 -1
- package/dist/ReportPreview-BoGBGyRr.cjs +0 -6
- package/dist/ReportPreview-QLONCyci.js +0 -6257
- package/dist/RuleEditor-BZUP9yvL.cjs +0 -1
- package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +0 -1
- package/dist/TemplateReviewPanel-Dijwm9YE.js +0 -593
- package/dist/assets-D2gHc4Mz.cjs +0 -1
- package/dist/assets-T_gDeFaz.js +0 -132
- package/dist/auto-BrPWo7Xm.cjs +0 -1
- package/dist/capabilities-DiBj4Qgl.cjs +0 -1
- package/dist/capabilities-pg7j7VLT.js +0 -106
- package/dist/data-bar-CeZuFmYl.cjs +0 -1
- package/dist/designer-BZoVWTgl.js +0 -7172
- package/dist/designer-zS2uKJmY.cjs +0 -2
- package/dist/dom-ChE5D-L-.cjs +0 -1
- package/dist/grid-strokes-Be24LGuV.cjs +0 -1
- package/dist/json-snapshot-DNiIbpOr.cjs +0 -2
- package/dist/prefill-PaAy6wLk.cjs +0 -1
- package/dist/prepared-CJy_qk7d.js +0 -94
- package/dist/prepared-D0yCSxSO.cjs +0 -1
- package/dist/progress-ByiOxUD3.js +0 -250
- package/dist/progress-WomPRP3B.cjs +0 -1
- package/dist/protocol-BG16rz6D.js +0 -90
- package/dist/protocol-wzhl1Fim.cjs +0 -1
- package/dist/record-bindings-MBxbeBsi.cjs +0 -1
- package/dist/rich-text-layout-DK7A_a5r.cjs +0 -3
- package/dist/runtime-DYMOS_gz.cjs +0 -1
- package/dist/runtime-PiCax9zQ.js +0 -171
- package/dist/template-fragments-GVjpew_q.cjs +0 -1
- package/dist/template-registry-DI59PXVK.cjs +0 -1
- package/dist/textwrap-DEHqAjKZ.cjs +0 -4
package/dist/assets-T_gDeFaz.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { v as b, E as I, w as v } from "./progress-ByiOxUD3.js";
|
|
2
|
-
import { n as w, O as E } from "./capabilities-pg7j7VLT.js";
|
|
3
|
-
import { c as A, I as y } from "./media-Y90dHK9z.js";
|
|
4
|
-
class p extends Error {
|
|
5
|
-
constructor(n, r) {
|
|
6
|
-
super(n.message), this.name = "OutputAssetError", this.diagnostic = n, this.cause = r;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
function h(e) {
|
|
10
|
-
if (e.aborted) throw e.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
11
|
-
}
|
|
12
|
-
function O(e) {
|
|
13
|
-
const n = { maxAssets: 1e3, maxImageBytes: 33554432, maxTotalImageBytes: 134217728, maxDurationMs: 3e4, ...e.assetBudget };
|
|
14
|
-
for (const [r, a] of Object.entries(n))
|
|
15
|
-
if (!Number.isSafeInteger(a) || a <= 0 || a > 2147483647) throw new RangeError(`${r} must be a positive safe integer at most 2147483647.`);
|
|
16
|
-
return n;
|
|
17
|
-
}
|
|
18
|
-
function D(e) {
|
|
19
|
-
const n = /^data:image\/[a-z0-9.+-]+(;base64)?,(.*)$/is.exec(e);
|
|
20
|
-
if (!n) throw new TypeError("Asset renderers must return an image data URL.");
|
|
21
|
-
return n[1] ? Math.ceil(n[2].length * 3 / 4) : new TextEncoder().encode(decodeURIComponent(n[2])).byteLength;
|
|
22
|
-
}
|
|
23
|
-
function l(e, n, r, a, i) {
|
|
24
|
-
const t = { code: r, message: a, severity: "warning", format: e.options.format ?? "dom", pageIndex: n.pageIndex, componentIndex: n.componentIndex, componentPath: n.componentPath, kind: n.component.kind, nid: n.component.nid };
|
|
25
|
-
if (e.diagnostics.push(t), w(t, { ...e.options, signal: e.signal }), e.options.assetFailure !== "placeholder") throw new p(t, i);
|
|
26
|
-
}
|
|
27
|
-
async function M(e, n, r) {
|
|
28
|
-
const a = e.options.assetRegistry?.rendererFor(n) ?? e.options.assetRenderers?.[n.kind];
|
|
29
|
-
if (n.imageData || !a) return n.imageData;
|
|
30
|
-
if (++e.rendered > e.budget.maxAssets) return l(e, r, "asset-budget-exceeded", "Output exceeded the asset count budget.");
|
|
31
|
-
let i;
|
|
32
|
-
try {
|
|
33
|
-
if (e.active = r, i = await v(a({ ...r, signal: e.signal }), e.signal), h(e.signal), i.length > e.budget.maxImageBytes * 4 + 1024) return l(e, r, "asset-budget-exceeded", "Output exceeded the image payload byte budget.");
|
|
34
|
-
const t = D(i);
|
|
35
|
-
if (t > e.budget.maxImageBytes || e.bytes + t > e.budget.maxTotalImageBytes) return l(e, r, "asset-budget-exceeded", "Output exceeded the encoded image byte budget.");
|
|
36
|
-
/^data:image\/(png|jpe?g);base64,/i.test(i) && e.inspectImage(i), e.bytes += t;
|
|
37
|
-
} catch (t) {
|
|
38
|
-
if (e.signal.aborted || t instanceof p || t instanceof y && t.code === "image-budget-exceeded") throw t;
|
|
39
|
-
return l(e, r, "asset-render-failed", `Asset renderer failed for ${n.kind}; output was not silently omitted.`, t);
|
|
40
|
-
}
|
|
41
|
-
return i;
|
|
42
|
-
}
|
|
43
|
-
function T(e, n) {
|
|
44
|
-
const r = e.active;
|
|
45
|
-
if (!r) {
|
|
46
|
-
n.abort(new Error("Asset rendering exceeded maxDurationMs."));
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const a = { code: "asset-budget-exceeded", message: "Asset rendering exceeded maxDurationMs.", severity: "warning", format: e.options.format ?? "dom", pageIndex: r.pageIndex, componentIndex: r.componentIndex, componentPath: r.componentPath, kind: r.component.kind, nid: r.component.nid };
|
|
50
|
-
e.diagnostics.push(a);
|
|
51
|
-
try {
|
|
52
|
-
w(a, { ...e.options, signal: e.signal });
|
|
53
|
-
} catch (i) {
|
|
54
|
-
n.abort(i);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
n.abort(new p(a));
|
|
58
|
-
}
|
|
59
|
-
async function k(e, n, r, a, i) {
|
|
60
|
-
if (!n?.children?.length) return n;
|
|
61
|
-
const t = [];
|
|
62
|
-
for (const [s, c] of n.children.entries())
|
|
63
|
-
t.push(await x(e, c, { ...r, component: c, componentPath: [...a, s] }, i));
|
|
64
|
-
return t.some((s, c) => s !== n.children[c]) ? { ...n, children: t } : n;
|
|
65
|
-
}
|
|
66
|
-
async function x(e, n, r, a) {
|
|
67
|
-
if (h(e.signal), a.has(n)) throw new TypeError("Cyclic grid children cannot be rendered.");
|
|
68
|
-
let i = e.cache.get(n);
|
|
69
|
-
i || (i = M(e, n, r), e.cache.set(n, i));
|
|
70
|
-
const t = await i;
|
|
71
|
-
h(e.signal);
|
|
72
|
-
let s = n.grid;
|
|
73
|
-
if (s) {
|
|
74
|
-
const c = new Set(a).add(n), d = [];
|
|
75
|
-
for (const [u, o] of s.cells.entries()) {
|
|
76
|
-
if (!o.some((m) => m?.children?.length)) {
|
|
77
|
-
d.push(o);
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
const f = [];
|
|
81
|
-
for (const [m, g] of o.entries()) f.push(g?.children?.length ? await k(e, g, r, [...r.componentPath, u, m], c) : g);
|
|
82
|
-
d.push(f.some((m, g) => m !== o[g]) ? f : o);
|
|
83
|
-
}
|
|
84
|
-
d.some((u, o) => u !== s.cells[o]) && (s = { ...s, cells: d });
|
|
85
|
-
}
|
|
86
|
-
return t !== n.imageData || s !== n.grid ? { ...n, imageData: t, grid: s } : n;
|
|
87
|
-
}
|
|
88
|
-
function B(e, n, r) {
|
|
89
|
-
const a = /* @__PURE__ */ new Set(), i = (t) => {
|
|
90
|
-
if (b(r), !a.has(t)) {
|
|
91
|
-
if (a.add(t), t.imageData && /^data:image\/(png|jpe?g);base64,/i.test(t.imageData))
|
|
92
|
-
try {
|
|
93
|
-
n(t.imageData);
|
|
94
|
-
} catch (s) {
|
|
95
|
-
if (!(s instanceof y) || s.code === "image-budget-exceeded") throw s;
|
|
96
|
-
}
|
|
97
|
-
for (const s of t.grid?.cells ?? []) for (const c of s) for (const d of c?.children ?? []) i(d);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
for (const t of e.pages) for (const s of t.components) i(s);
|
|
101
|
-
}
|
|
102
|
-
function R(e) {
|
|
103
|
-
if (e.options.fidelity === "strict" && e.diagnostics.length) throw new E(e.diagnostics);
|
|
104
|
-
}
|
|
105
|
-
async function L(e, n = {}) {
|
|
106
|
-
b(n.signal), I(e);
|
|
107
|
-
const r = O(n), a = A(n);
|
|
108
|
-
if (B(e, a, n.signal), n.signal?.aborted) throw n.signal.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
109
|
-
const i = new AbortController(), t = () => i.abort(n.signal?.reason);
|
|
110
|
-
if (n.signal?.addEventListener("abort", t, { once: !0 }), !n.assetRegistry && (!n.assetRenderers || !Object.keys(n.assetRenderers).length))
|
|
111
|
-
return n.signal?.removeEventListener("abort", t), { plan: e, diagnostics: [] };
|
|
112
|
-
const s = { options: n, signal: i.signal, diagnostics: [], rendered: 0, bytes: 0, budget: r, cache: /* @__PURE__ */ new WeakMap(), inspectImage: a }, c = setTimeout(() => T(s, i), r.maxDurationMs);
|
|
113
|
-
try {
|
|
114
|
-
const d = [];
|
|
115
|
-
for (const [u, o] of e.pages.entries()) {
|
|
116
|
-
if (u < (n.start ?? 0) || u > (n.end ?? e.pages.length - 1)) {
|
|
117
|
-
d.push(o);
|
|
118
|
-
continue;
|
|
119
|
-
}
|
|
120
|
-
const f = [];
|
|
121
|
-
for (const [m, g] of o.components.entries()) f.push(await x(s, g, { component: g, pageIndex: u, componentIndex: m, componentPath: [] }, /* @__PURE__ */ new Set()));
|
|
122
|
-
d.push(f.some((m, g) => m !== o.components[g]) ? { ...o, components: f } : o);
|
|
123
|
-
}
|
|
124
|
-
return h(s.signal), R(s), { plan: d.some((u, o) => u !== e.pages[o]) ? { ...e, pages: d } : e, diagnostics: s.diagnostics };
|
|
125
|
-
} finally {
|
|
126
|
-
clearTimeout(c), n.signal?.removeEventListener("abort", t);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
export {
|
|
130
|
-
p as O,
|
|
131
|
-
L as r
|
|
132
|
-
};
|
package/dist/auto-BrPWo7Xm.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const O=require("./prepared-D0yCSxSO.cjs"),I=require("./json-snapshot-DNiIbpOr.cjs"),P=require("./protocol-wzhl1Fim.cjs"),j=require("./progress-WomPRP3B.cjs"),W=require("./runtime-DYMOS_gz.cjs"),l=require("./sha256-DgZAKXqI.cjs");class M extends Error{constructor(r){super("报表 Worker 无法启动"),this.cause=r,this.name="ReportWorkerStartError"}}let C=0;function F(e){const r=new Error("报表 Worker 任务已取消");return r.name="AbortError",Object.defineProperty(r,"cause",{value:e}),r}function U(e,r){if(!e||typeof e!="object")return;const t=e;return t.protocol===P.REPORT_WORKER_PROTOCOL&&t.id===r?t:void 0}function z(e,r={}){const t=r.timeoutMs??12e4;if(!Number.isFinite(t)||t<=0||t>2147483647)throw new RangeError("Worker timeoutMs 应为正有限数字,且不能超过 2147483647");const n=(o,s,a,d)=>a?.aborted?Promise.reject(F(a.reason)):new Promise((v,i)=>{let g;try{g=e()}catch(f){i(new M(f));return}const h=`mach-report-${Date.now()}-${++C}`;let b=!1,p=()=>{},R;const u=(f,c)=>{if(b)return;b=!0,R&&clearTimeout(R);let w;try{p()}catch(y){w=y}a?.removeEventListener("abort",k),f??=w,Promise.resolve().then(()=>g.terminate()).then(()=>f===void 0?v(c):i(f),y=>i(f??y))},k=()=>u(F(a?.reason)),m=f=>{const c=U(f,h);if(!(!c||b)){if("type"in c&&c.type==="event"){const w="event"in c?c.event:void 0;P.validReportWorkerEvent(w,s)?I.notifyReportTaskEvent(d,w,a):u(new Error("报表 Worker 返回无效阶段事件"));return}c.error&&typeof c.error.name=="string"&&typeof c.error.message=="string"?u(new P.ReportWorkerError(c.error)):P.validReportWorkerResult(c.result,o)&&(o==="prepare"||"format"in c.result&&"format"in s&&c.result.format===s.format)?u(void 0,c.result):u(new Error("报表 Worker 返回无效响应"))}};try{if(p=g.subscribe(m,f=>u(f??new Error("报表 Worker 执行失败"))),b){p();return}if(a?.addEventListener("abort",k,{once:!0}),R=setTimeout(()=>u(new P.ReportWorkerError({name:"ReportRuntimeError",code:"timeout",message:`报表 Worker 执行超过 ${t}ms`})),t),a?.aborted)k();else{const{onEvent:f,signal:c,...w}=s,y=N(w);g.postMessage({protocol:P.REPORT_WORKER_PROTOCOL,id:h,operation:o,input:w,...r.budget?{budget:r.budget}:{}},y)}}catch(f){u(f)}});return{exportPrepared:(o,s,a)=>n("exportPrepared",o,s,a),prepare:(o,s,a)=>n("prepare",o,s,a),export:(o,s,a)=>n("export",o,s,a)}}function N(e){return e.pdf?(e.pdf=O.snapshotPdfFonts(e.pdf),(e.pdf?.customFontFaces?Object.values(e.pdf.customFontFaces):[e.pdf?.customFontBytes]).filter(t=>t instanceof Uint8Array).map(t=>t.buffer)):[]}function _(e,r={}){return z(()=>{const t=e();return{postMessage:(n,o)=>t.postMessage(n,o),terminate:()=>t.terminate(),subscribe:(n,o)=>{const s=d=>n(d.data),a=d=>o(d instanceof ErrorEvent?new Error(d.message):new Error("报表 Worker 消息无法解码"));return t.addEventListener("message",s),t.addEventListener("error",a),t.addEventListener("messageerror",a),()=>{t.removeEventListener("message",s),t.removeEventListener("error",a),t.removeEventListener("messageerror",a)}}}},r)}const $={cells:2e4,pages:20,bytes:2e6};function T(e){return e.cells>=e.limits.cells||e.pages>=e.limits.pages||e.bytes>=e.limits.bytes||e.capped}function x(e){return++e.visits>=1e5&&(e.capped=!0),!T(e)}function E(e){return typeof e=="string"?e.length*2:0}function L(e,r){for(const t of e??[]){if(!x(r))return;for(const n of t.segments){if(!x(r))return;r.bytes+=E(n.text)}}}function S(e,r,t){if(t>32){r.capped=!0;return}if(x(r)){r.bytes+=E(e.text)+E(e.rawText)+E(e.imageData),L(e.richParagraphs,r);for(const n of e.lines??[]){if(!x(r))return;r.bytes+=E(n)}for(const n of e.grid?.cells??[]){if(!x(r))return;for(const o of n){if(!x(r))return;if(o){r.cells++,r.bytes+=E(o.text)+E(o.rawText)+E(o.value),L(o.richParagraphs,r);for(const s of o.children??[]){if(T(r))return;S(s,r,t+1)}}}}}}function H(e,r){if(e.format==="xlsx")for(const t of e.xlsx?.additionalSheets??[]){if(!x(r))return;r.bytes+=E(t?.name);for(const n of t?.rows??[]){if(!x(r))return;for(const o of n??[]){if(!x(r))return;r.cells++,r.bytes+=E(o)}}}}function G(e){const r={...$,...e.thresholds};for(const t of Object.values(r))if(!Number.isSafeInteger(t)||t<=0)throw new RangeError("导出隔离阈值应为正安全整数");return r}function K(e,r){const t=G(r),n=e.pdf?.customFontFaces?Object.values(e.pdf.customFontFaces):[e.pdf?.customFontBytes],o={pages:e.prepared.plan.pages.length,cells:0,bytes:n.reduce((d,v)=>d+(v?.byteLength??0),0),visits:0,capped:!1,limits:t};for(const d of e.prepared.plan.pages){if(T(o))break;for(const v of d.components){if(T(o))break;S(v,o,0)}}H(e,o);let s=T(o)?"worker":"local",a=o.capped?"scan-limit":s==="worker"?"threshold":"small-task";return r.mode==="local"&&(s="local",a="explicit-local"),r.mode==="worker"&&(s="worker",a="explicit-worker"),Object.values(e.xlsx??{}).some(d=>typeof d=="function")&&(s="local",a="nonserializable-options"),{mode:s,reason:a,estimate:{pages:o.pages,cells:o.cells,bytes:o.bytes},hardCancellation:s==="worker"}}function X(e){if(e.mode!==void 0&&!["auto","local","worker"].includes(e.mode))throw new TypeError("无效的导出执行模式");if(e.fallback!==void 0&&!["local","error"].includes(e.fallback))throw new TypeError("无效的导出回退策略");l.validateBudget({...e.budget,maxDurationMs:e.timeoutMs??e.budget?.maxDurationMs??12e4})}function A(e,r){j.observeOutput(()=>e.onDecision?.({...r,estimate:{...r.estimate}}))}function B(e,r){return{...e,mode:"local",reason:r,hardCancellation:!1}}function D(e,r,t){l.assertBudget(t,"maxRows",e.stats.rows),l.assertBudget(t,"maxPages",e.stats.pages),l.assertBudget(t,"maxCells",e.stats.cells),l.assertBudget(t,"maxOutputBytes",e.bytes.byteLength),O.assertPreparedOutputBudget({...r,prepared:{...r.prepared,stats:e.stats}},t)}function J(e,r){const t={...l.DEFAULT_REPORT_RUNTIME_BUDGET,...r.budget},n=O.capturePreparedHandoff(e.prepared,t.maxPreparedBytes,e.signal),o={...e,prepared:n.prepared,pdf:O.snapshotPdfFonts(e.pdf),xlsx:O.snapshotXlsxOptions(e.xlsx)};return{request:o,forward:()=>({...o,prepared:n.forward()})}}function Q(e,r){X(e);const t={...e,thresholds:{...e.thresholds},budget:{...l.DEFAULT_REPORT_RUNTIME_BUDGET,...e.budget}},n=t.timeoutMs??t.budget.maxDurationMs??12e4,o=W.createReportRuntime({reports:{},budget:{...t.budget,maxDurationMs:n}}),s=new Set;let a=!1;const d=t.mode!=="worker"&&t.fallback!=="error";async function v(i,g){const h=Date.now(),b=()=>{const m=n-(Date.now()-h);if(m<=0)throw new l.ReportRuntimeError("timeout",`报表执行超过 ${n}ms`);return m};let p=K(i,t);if(p.reason==="nonserializable-options"&&t.mode==="worker")throw new TypeError("Worker 模式不接受函数选项;请使用本地模式或可序列化配置");if(p.mode==="worker"&&!r){if(!d)throw new M(new Error("未配置 workerFactory"));p=B(p,"worker-unavailable")}const R=J(i,t),u=R.request;if(A(t,p),l.throwIfAborted(i.signal),p.mode==="worker")try{const m=r(b());if(!m.exportPrepared)throw new TypeError("隔离执行器缺少 exportPrepared");const{signal:f,onEvent:c,...w}=u,y=await m.exportPrepared(w,f,c);return l.throwIfAborted(f),D(y,u,t.budget),{...y,execution:p}}catch(m){if(!(m instanceof M)||!d)throw m;l.throwIfAborted(i.signal),p=B(p,"worker-start-failed"),A(t,p)}g&&(u.prepared=W.enforcePrepared(u.prepared,t.budget),O.assertPreparedOutputBudget(u,t.budget));const k=g?await l.controlled(i.signal,b(),m=>g({...u,signal:m})):await l.controlled(i.signal,b(),m=>o.exportPrepared({...R.forward(),signal:m}));return l.throwIfAborted(i.signal),D(k,u,t.budget),{...k,execution:p}}return{async exportPrepared(i,g){if(a)throw new l.ReportRuntimeError("closed","导出执行器已释放");if(l.throwIfAborted(i.signal),s.size>=2)throw new l.ReportRuntimeError("queue-full","同时导出的任务已达 2 个,请等待完成后重试");const h=new AbortController;s.add(h);const b=()=>h.abort(i.signal?.reason);i.signal?.addEventListener("abort",b,{once:!0});try{return await v({...i,signal:h.signal},g)}finally{i.signal?.removeEventListener("abort",b),s.delete(h)}},cancel(){for(const i of s)i.abort()},dispose(){a=!0;for(const i of s)i.abort()}}}function q(e={}){const r=e.workerFactory,t={timeoutMs:e.timeoutMs??e.budget?.maxDurationMs,budget:{...e.budget}};return Q(e,r?n=>_(r,{...t,timeoutMs:n}):void 0)}const V=Object.freeze(Object.defineProperty({__proto__:null,createAutoReportExporter:q},Symbol.toStringTag,{value:"Module"}));exports.ReportWorkerStartError=M;exports.auto=V;exports.createAutoReportExporter=q;exports.createBrowserReportExecutor=_;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("./progress-WomPRP3B.cjs");function M(e,t){c.assertOutputActive(t.signal),c.observeOutput(()=>t.onDiagnostic?.(e)),c.assertOutputActive(t.signal)}class b extends Error{constructor(t){super(`Output contains ${t.length} known fidelity issue(s): ${t[0]?.code}`),this.diagnostics=t,this.code="output-fidelity",this.name="OutputFidelityError"}}const $=new Set(["text","rect","line","ellipse"]),k=new Set(["image","chart","barcode","qrcode"]);function m(e,t){if(!e.grid){if(c.isImageBackedComponent(e))return(t==="pdf"||t==="xlsx")&&!/^data:image\/(png|jpe?g);base64,/i.test(e.imageData)?{code:"unsupported-image-format",message:`${t.toUpperCase()} accepts PNG or JPEG data URLs; convert this image before exporting.`}:void 0;if(k.has(e.kind))return{code:"missing-image",message:`${e.kind} requires imageData or a renderer adapter before output.`};if(!$.has(e.kind))return{code:"unsupported-component",message:`Unsupported component kind: ${e.kind}.`};if(t==="xlsx"&&e.kind!=="text")return{code:"unsupported-component",message:`XLSX data export omits ${e.kind} geometry.`}}}function p(e,t,i,s,r){const o=Object.getOwnPropertyDescriptor(e,"meta")?.value,u=o&&Object.getOwnPropertyDescriptor(o,"componentExtension")?.value,n=u&&Object.getOwnPropertyDescriptor(u,"id")?.value,a=u&&Object.getOwnPropertyDescriptor(u,"version")?.value,d=typeof n=="string"&&n.length<=128&&typeof a=="string"&&a.length<=64?{id:n,version:a}:void 0;return{...r,severity:"warning",format:t,pageIndex:i,componentIndex:s,kind:e.kind,nid:e.nid,...d?{extension:d}:{}}}function h(e,t){if(!e||t==="dom")return;const i=[];return e.rotateDeg&&i.push("rotateDeg"),e.opacity!==void 0&&e.opacity!==1&&i.push("opacity"),t!=="xlsx"&&e.align==="justify"&&i.push("justify"),t==="xlsx"&&e.letterSpacing&&i.push("letterSpacing"),i.length?`${t} does not preserve these styles: ${i.join(", ")}.`:void 0}function x(e){if(!e)return;const t=["backgroundColor","align","verticalAlign","lineHeight","borderTop","borderRight","borderBottom","borderLeft","borderColor","lineColor","lineWidthPt"].filter(i=>e[i]!==void 0);return t.length?`XLSX rich text does not retain independent run styles: ${t.join(", ")}.`:void 0}function X(e){if(e.kind!=="text")return;const t=x(e.style);if(e.leftMm||e.topMm||t)return{code:"unsupported-style",message:`Nested XLSX text is retained as rich text in component order; absolute child offsets and independent paragraph styles are not retained.${t?` ${t}`:""}`}}function w(e,t,i,s,r,o){const u=n=>{r.push({...p(e,t,i,s,{code:"unsupported-style",message:n}),componentPath:o})};for(const n of e.richParagraphs??[]){t==="xlsx"&&(n.spaceBeforeMm||n.spaceAfterMm||n.indentMm||n.align||n.lineHeight)&&u("XLSX rich text preserves fonts and paragraph newlines; paragraph spacing, indentation and alignment are not retained.");const a=h({align:n.align},t);a&&u(a);for(const d of n.segments){const l=h(d.style,t)??(t==="xlsx"?x(d.style):void 0);l&&u(l)}}}function D(e,t,i,s,r,o,u){if(u.has(e))return;const n=new Set(u).add(e),a=m(e,t);a&&o.push({...p(e,t,i,s,a),componentPath:r});const d=h(e.style,t);d&&o.push({...p(e,t,i,s,{code:"unsupported-style",message:d}),componentPath:r}),w(e,t,i,s,o,r),j(e,t,i,s,r,o,n)}function B(e,t,i){if(e.grid)return{code:"nested-components-omitted",message:"XLSX cannot place a nested grid inside a single cell; the nested grid is omitted."};const s=X(e);if(s)return s;if(c.isImageBackedComponent(e)&&(e.leftMm<0||e.topMm<0||e.leftMm+e.widthMm>t+.001||e.topMm+e.heightMm>i+.001))return{code:"unsupported-style",message:"XLSX cannot clip a child image to a cell; it retains the original image dimensions."}}function C(e){let t;return(i,s,r,o)=>{t??=new Map(c.resolveGridLayout(e.grid,e.widthMm,e.heightMm).cells.map(a=>[`${a.ri}:${a.ci}`,a]));const u=t.get(`${s}:${r}`),n=2*(e.grid?.paddingMm??.5);return B(i,(u?.widthMm??0)-n-(o?.indentMm??0),(u?.heightMm??0)-n)}}function j(e,t,i,s,r,o,u){const n=C(e);for(const[a,d]of(e.grid?.cells??[]).entries())for(const[l,g]of d.entries()){g?.dataBar!==void 0&&!c.validDataBar(g.dataBar)&&o.push({...p(e,t,i,s,{code:"unsupported-style",message:"Invalid resolved data-bar geometry or color; visual data bars require ordered 0–1 ratios and #RRGGBB colors."}),componentPath:[...r,a,l]});const y=h(g?.style,t);y&&o.push({...p(e,t,i,s,{code:"unsupported-style",message:y}),componentPath:[...r,a,l]}),g?.richParagraphs?.length&&w({...e,richParagraphs:g.richParagraphs},t,i,s,o,[...r,a,l]);for(const[E,f]of(g?.children??[]).entries()){const v=[...r,a,l,E];if(t==="xlsx"){const O=n(f,a,l,g);if(O&&o.push({...p(f,t,i,s,O),componentPath:v}),f.grid)continue}D(f,t,i,s,v,o,u)}}}function S(e,t){c.assertBoundedRenderTree(e);const i=[];return e.pages.forEach((s,r)=>s.components.forEach((o,u)=>D(o,t,r,u,[],i,new Set))),i}function L(e,t,i){c.assertOutputActive(i.signal);const s=S(e,t);if(s.forEach(r=>M(r,i)),i.fidelity==="strict"&&s.length)throw new b(s);return s}exports.OutputFidelityError=b;exports.inspectOutputCapabilities=S;exports.notifyOutputDiagnostic=M;exports.reportOutputDiagnostics=L;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { v as h, u as D, E, i as M, y as $, r as k } from "./progress-ByiOxUD3.js";
|
|
2
|
-
function m(e, t) {
|
|
3
|
-
h(t.signal), D(() => t.onDiagnostic?.(e)), h(t.signal);
|
|
4
|
-
}
|
|
5
|
-
class X extends Error {
|
|
6
|
-
constructor(t) {
|
|
7
|
-
super(`Output contains ${t.length} known fidelity issue(s): ${t[0]?.code}`), this.diagnostics = t, this.code = "output-fidelity", this.name = "OutputFidelityError";
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
const j = /* @__PURE__ */ new Set(["text", "rect", "line", "ellipse"]), B = /* @__PURE__ */ new Set(["image", "chart", "barcode", "qrcode"]);
|
|
11
|
-
function L(e, t) {
|
|
12
|
-
if (!e.grid) {
|
|
13
|
-
if (M(e))
|
|
14
|
-
return (t === "pdf" || t === "xlsx") && !/^data:image\/(png|jpe?g);base64,/i.test(e.imageData) ? { code: "unsupported-image-format", message: `${t.toUpperCase()} accepts PNG or JPEG data URLs; convert this image before exporting.` } : void 0;
|
|
15
|
-
if (B.has(e.kind)) return { code: "missing-image", message: `${e.kind} requires imageData or a renderer adapter before output.` };
|
|
16
|
-
if (!j.has(e.kind)) return { code: "unsupported-component", message: `Unsupported component kind: ${e.kind}.` };
|
|
17
|
-
if (t === "xlsx" && e.kind !== "text") return { code: "unsupported-component", message: `XLSX data export omits ${e.kind} geometry.` };
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function g(e, t, s, i, r) {
|
|
21
|
-
const o = Object.getOwnPropertyDescriptor(e, "meta")?.value, u = o && Object.getOwnPropertyDescriptor(o, "componentExtension")?.value, n = u && Object.getOwnPropertyDescriptor(u, "id")?.value, a = u && Object.getOwnPropertyDescriptor(u, "version")?.value, d = typeof n == "string" && n.length <= 128 && typeof a == "string" && a.length <= 64 ? { id: n, version: a } : void 0;
|
|
22
|
-
return { ...r, severity: "warning", format: t, pageIndex: s, componentIndex: i, kind: e.kind, nid: e.nid, ...d ? { extension: d } : {} };
|
|
23
|
-
}
|
|
24
|
-
function f(e, t) {
|
|
25
|
-
if (!e || t === "dom") return;
|
|
26
|
-
const s = [];
|
|
27
|
-
return e.rotateDeg && s.push("rotateDeg"), e.opacity !== void 0 && e.opacity !== 1 && s.push("opacity"), t !== "xlsx" && e.align === "justify" && s.push("justify"), t === "xlsx" && e.letterSpacing && s.push("letterSpacing"), s.length ? `${t} does not preserve these styles: ${s.join(", ")}.` : void 0;
|
|
28
|
-
}
|
|
29
|
-
function b(e) {
|
|
30
|
-
if (!e) return;
|
|
31
|
-
const t = ["backgroundColor", "align", "verticalAlign", "lineHeight", "borderTop", "borderRight", "borderBottom", "borderLeft", "borderColor", "lineColor", "lineWidthPt"].filter((s) => e[s] !== void 0);
|
|
32
|
-
return t.length ? `XLSX rich text does not retain independent run styles: ${t.join(", ")}.` : void 0;
|
|
33
|
-
}
|
|
34
|
-
function C(e) {
|
|
35
|
-
if (e.kind !== "text") return;
|
|
36
|
-
const t = b(e.style);
|
|
37
|
-
if (e.leftMm || e.topMm || t) return { code: "unsupported-style", message: `Nested XLSX text is retained as rich text in component order; absolute child offsets and independent paragraph styles are not retained.${t ? ` ${t}` : ""}` };
|
|
38
|
-
}
|
|
39
|
-
function w(e, t, s, i, r, o) {
|
|
40
|
-
const u = (n) => {
|
|
41
|
-
r.push({ ...g(e, t, s, i, { code: "unsupported-style", message: n }), componentPath: o });
|
|
42
|
-
};
|
|
43
|
-
for (const n of e.richParagraphs ?? []) {
|
|
44
|
-
t === "xlsx" && (n.spaceBeforeMm || n.spaceAfterMm || n.indentMm || n.align || n.lineHeight) && u("XLSX rich text preserves fonts and paragraph newlines; paragraph spacing, indentation and alignment are not retained.");
|
|
45
|
-
const a = f({ align: n.align }, t);
|
|
46
|
-
a && u(a);
|
|
47
|
-
for (const d of n.segments) {
|
|
48
|
-
const l = f(d.style, t) ?? (t === "xlsx" ? b(d.style) : void 0);
|
|
49
|
-
l && u(l);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function O(e, t, s, i, r, o, u) {
|
|
54
|
-
if (u.has(e)) return;
|
|
55
|
-
const n = new Set(u).add(e), a = L(e, t);
|
|
56
|
-
a && o.push({ ...g(e, t, s, i, a), componentPath: r });
|
|
57
|
-
const d = f(e.style, t);
|
|
58
|
-
d && o.push({ ...g(e, t, s, i, { code: "unsupported-style", message: d }), componentPath: r }), w(e, t, s, i, o, r), R(e, t, s, i, r, o, n);
|
|
59
|
-
}
|
|
60
|
-
function P(e, t, s) {
|
|
61
|
-
if (e.grid) return { code: "nested-components-omitted", message: "XLSX cannot place a nested grid inside a single cell; the nested grid is omitted." };
|
|
62
|
-
const i = C(e);
|
|
63
|
-
if (i) return i;
|
|
64
|
-
if (M(e) && (e.leftMm < 0 || e.topMm < 0 || e.leftMm + e.widthMm > t + 1e-3 || e.topMm + e.heightMm > s + 1e-3)) return { code: "unsupported-style", message: "XLSX cannot clip a child image to a cell; it retains the original image dimensions." };
|
|
65
|
-
}
|
|
66
|
-
function G(e) {
|
|
67
|
-
let t;
|
|
68
|
-
return (s, i, r, o) => {
|
|
69
|
-
t ??= new Map(k(e.grid, e.widthMm, e.heightMm).cells.map((a) => [`${a.ri}:${a.ci}`, a]));
|
|
70
|
-
const u = t.get(`${i}:${r}`), n = 2 * (e.grid?.paddingMm ?? 0.5);
|
|
71
|
-
return P(s, (u?.widthMm ?? 0) - n - (o?.indentMm ?? 0), (u?.heightMm ?? 0) - n);
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
function R(e, t, s, i, r, o, u) {
|
|
75
|
-
const n = G(e);
|
|
76
|
-
for (const [a, d] of (e.grid?.cells ?? []).entries()) for (const [l, c] of d.entries()) {
|
|
77
|
-
c?.dataBar !== void 0 && !$(c.dataBar) && o.push({ ...g(e, t, s, i, { code: "unsupported-style", message: "Invalid resolved data-bar geometry or color; visual data bars require ordered 0–1 ratios and #RRGGBB colors." }), componentPath: [...r, a, l] });
|
|
78
|
-
const y = f(c?.style, t);
|
|
79
|
-
y && o.push({ ...g(e, t, s, i, { code: "unsupported-style", message: y }), componentPath: [...r, a, l] }), c?.richParagraphs?.length && w({ ...e, richParagraphs: c.richParagraphs }, t, s, i, o, [...r, a, l]);
|
|
80
|
-
for (const [S, p] of (c?.children ?? []).entries()) {
|
|
81
|
-
const v = [...r, a, l, S];
|
|
82
|
-
if (t === "xlsx") {
|
|
83
|
-
const x = n(p, a, l, c);
|
|
84
|
-
if (x && o.push({ ...g(p, t, s, i, x), componentPath: v }), p.grid) continue;
|
|
85
|
-
}
|
|
86
|
-
O(p, t, s, i, v, o, u);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
function N(e, t) {
|
|
91
|
-
E(e);
|
|
92
|
-
const s = [];
|
|
93
|
-
return e.pages.forEach((i, r) => i.components.forEach((o, u) => O(o, t, r, u, [], s, /* @__PURE__ */ new Set()))), s;
|
|
94
|
-
}
|
|
95
|
-
function T(e, t, s) {
|
|
96
|
-
h(s.signal);
|
|
97
|
-
const i = N(e, t);
|
|
98
|
-
if (i.forEach((r) => m(r, s)), s.fidelity === "strict" && i.length) throw new X(i);
|
|
99
|
-
return i;
|
|
100
|
-
}
|
|
101
|
-
export {
|
|
102
|
-
X as O,
|
|
103
|
-
N as i,
|
|
104
|
-
m as n,
|
|
105
|
-
T as r
|
|
106
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./progress-WomPRP3B.cjs");function n(t,o,d,r){if(!e.validDataBar(t)||t.start===t.end)return;const a=Math.max(0,o-2*r);return{x:r+a*t.start,y:r,width:a*(t.end-t.start),height:Math.max(0,d-2*r),color:t.color}}exports.dataBarBox=n;
|