@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.
Files changed (150) hide show
  1. package/README.md +14 -5
  2. package/dist/ExcelBindingWizard-CnjjpYxD.cjs +1 -0
  3. package/dist/{ExcelBindingWizard-Bzndrp_z.js → ExcelBindingWizard-DAprCgn-.js} +4 -4
  4. package/dist/{ParamEditor-BrUrInJH.js → ParamEditor-CY9d8QZD.js} +3 -3
  5. package/dist/ParamEditor-CiVjpbc-.cjs +1 -0
  6. package/dist/ReportBatchPanel-0-Oymcdm.cjs +1 -0
  7. package/dist/{ReportBatchPanel-2mXS1uol.js → ReportBatchPanel-CDp7xRHp.js} +4 -4
  8. package/dist/ReportLabelStudio-CsyHqBco.cjs +1 -0
  9. package/dist/{ReportLabelStudio-BUKNmYUY.js → ReportLabelStudio-DtKxk9n0.js} +4 -4
  10. package/dist/ReportParamPanel-CoKcXzSy.cjs +1 -0
  11. package/dist/{ReportParamPanel-Czm3OPo_.js → ReportParamPanel-jKDJVar2.js} +2 -2
  12. package/dist/{ReportPreview-C9c0Rp7Y.js → ReportPreview-DJqt40zA.js} +2863 -2836
  13. package/dist/ReportPreview-s7c2nrfo.cjs +6 -0
  14. package/dist/ReportTemplateLibrary-CsUm6edm.cjs +1 -0
  15. package/dist/{ReportTemplateLibrary-ovj03u0F.js → ReportTemplateLibrary-qPQX0Dt_.js} +2 -2
  16. package/dist/RuleEditor-CJBibiLY.cjs +1 -0
  17. package/dist/{RuleEditor-4JTKq_N7.js → RuleEditor-Di-JZ2Lb.js} +6 -6
  18. package/dist/{TemplateOutlinePanel-DfFRc91I.js → TemplateOutlinePanel-D0mKfVWf.js} +3 -3
  19. package/dist/TemplateOutlinePanel-RiRgXnnH.cjs +1 -0
  20. package/dist/TemplateReusePanel-BdK91T7z.cjs +1 -0
  21. package/dist/{TemplateReusePanel-CmX1rq69.js → TemplateReusePanel-J6PvD2Sf.js} +3 -3
  22. package/dist/TemplateReviewPanel-B5yUgOgb.cjs +1 -0
  23. package/dist/{TemplateReviewPanel-BKMo7Qd7.js → TemplateReviewPanel-BlUbD2GY.js} +3 -3
  24. package/dist/analytics.cjs +1 -1
  25. package/dist/analytics.js +5 -5
  26. package/dist/artifact-integrity.json +112 -114
  27. package/dist/assets-CylgPA6P.cjs +1 -0
  28. package/dist/assets-Vt10jCtl.js +136 -0
  29. package/dist/auto-D3UNXBrM.cjs +1 -0
  30. package/dist/{auto-C7udkeAa.js → auto-Hq-xgrvS.js} +28 -25
  31. package/dist/{batch-DGCt44XM.js → batch-Be_NbW7U.js} +1 -1
  32. package/dist/{batch-DYcokH4v.cjs → batch-CI4ZpuoX.cjs} +1 -1
  33. package/dist/{charts-D-Vg-ak9.cjs → charts-Cy7muNWi.cjs} +1 -1
  34. package/dist/{charts-D48XCefN.js → charts-DLTz0OEG.js} +1 -1
  35. package/dist/{computed-BQgBrma-.cjs → computed-8nFyVnok.cjs} +1 -1
  36. package/dist/{computed-CH3NYPOW.js → computed-BR_O8uAv.js} +14 -20
  37. package/dist/{data-bar-DzceAVeR.cjs → data-bar--_aPWr-W.cjs} +1 -1
  38. package/dist/{data-bar-DjOgTLqu.js → data-bar-BVnzVbE9.js} +1 -1
  39. package/dist/designer-Bc5AXS38.cjs +2 -0
  40. package/dist/designer-CZqnLTyE.js +8350 -0
  41. package/dist/designer.cjs +1 -1
  42. package/dist/designer.d.cts +108 -1
  43. package/dist/designer.d.ts +108 -1
  44. package/dist/designer.js +1 -1
  45. package/dist/{diagnostic-collector-C-JBA016.js → diagnostic-collector-CZ8DV6wA.js} +208 -186
  46. package/dist/diagnostic-collector-DwMJWEHo.cjs +1 -0
  47. package/dist/{dom-DgWc-DY1.js → dom-CbOWY7KE.js} +5 -5
  48. package/dist/dom-VuLh_fhL.cjs +1 -0
  49. package/dist/{encoding-tWc2Wn89.cjs → encoding-D0ITsCCp.cjs} +1 -1
  50. package/dist/{encoding-D480EM2r.js → encoding-TbA3oQLr.js} +2 -2
  51. package/dist/{execution-result-Ba65gieT.js → execution-result-BUPPNlaS.js} +3 -3
  52. package/dist/{execution-result-7sG_mdcD.cjs → execution-result-BgZtqlOT.cjs} +1 -1
  53. package/dist/{font-loader-CHmEwkHl.js → font-loader-BSRR-a0C.js} +1 -1
  54. package/dist/{font-loader-BIxme_9g.cjs → font-loader-BZ4CRPys.cjs} +1 -1
  55. package/dist/{grid-strokes-DsoICRjZ.js → grid-strokes-CovSH3A2.js} +1 -1
  56. package/dist/{grid-strokes-RFMR91jn.cjs → grid-strokes-G5omPT3s.cjs} +1 -1
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.js +23 -23
  59. package/dist/{json-snapshot-BZ0CIQln.js → json-snapshot-DRQmh_k5.js} +718 -683
  60. package/dist/json-snapshot-HR8bez8j.cjs +2 -0
  61. package/dist/{matrix-CB9TqTEy.js → matrix-6wjFVN0Z.js} +149 -142
  62. package/dist/matrix-DeA6__cd.cjs +1 -0
  63. package/dist/media-IV_r4Sp7.cjs +1 -0
  64. package/dist/media-jiLdCn3i.js +208 -0
  65. package/dist/{pdf-DTR7fAIr.js → pdf-BqnoP1L_.js} +14 -15
  66. package/dist/{pdf-d9oJ6V0P.cjs → pdf-Ddm0HCuT.cjs} +48 -48
  67. package/dist/pdf.cjs +1 -1
  68. package/dist/pdf.js +2 -2
  69. package/dist/{plugin-B7Bi-1te.cjs → plugin-BFBLxfsq.cjs} +1 -1
  70. package/dist/{plugin-OKDFQFS4.js → plugin-BnRcXQzg.js} +1 -1
  71. package/dist/{prefill-C8fF91JB.js → prefill-BqbuktRt.js} +3 -3
  72. package/dist/{prefill-C_Bf_AMo.cjs → prefill-DPLV68I7.cjs} +1 -1
  73. package/dist/prepared-Cl7C69N7.cjs +1 -0
  74. package/dist/{prepared-DhgQ0d-h.js → prepared-V7tYf1qj.js} +68 -64
  75. package/dist/{protocol-CZ-BILne.cjs → protocol-BVhKnBmX.cjs} +1 -1
  76. package/dist/{protocol-DHO91-Jt.js → protocol-Bf33Gu9J.js} +3 -3
  77. package/dist/{record-bindings-KEs-DKCS.cjs → record-bindings-DVs_g_No.cjs} +1 -1
  78. package/dist/{record-bindings-DBrCu6zO.js → record-bindings-hxJqcLSK.js} +3 -3
  79. package/dist/{region-binding-workflow-ikpY1Kbw.cjs → region-binding-workflow-Bu31bqCr.cjs} +1 -1
  80. package/dist/{region-binding-workflow-FSyIZge8.js → region-binding-workflow-DRvX25XH.js} +2 -2
  81. package/dist/report-encoding-worker.cjs +1 -1
  82. package/dist/report-encoding-worker.js +1 -1
  83. package/dist/{rich-text-layout-BYbIc3eJ.cjs → rich-text-layout-6VphrIcj.cjs} +1 -1
  84. package/dist/{rich-text-layout-BtygMWZC.js → rich-text-layout-BCdxMT4m.js} +1 -1
  85. package/dist/{runtime-BsvAqz4a.js → runtime-ChdUbPvs.js} +9 -9
  86. package/dist/{runtime-B5HG8poy.cjs → runtime-D2noLfgC.cjs} +1 -1
  87. package/dist/sbom.cdx.json +1 -1
  88. package/dist/server-node.cjs +5 -5
  89. package/dist/server-node.js +2099 -1959
  90. package/dist/server.cjs +1 -1
  91. package/dist/server.js +17 -13
  92. package/dist/sha256-C26wdjDi.cjs +1 -0
  93. package/dist/sha256-D-msitGX.js +166 -0
  94. package/dist/style.css +1 -1
  95. package/dist/{template-catalog-BbrN9dgu.js → template-catalog-CZfnMXKc.js} +4 -4
  96. package/dist/template-catalog-Dv4sOYaB.cjs +1 -0
  97. package/dist/{template-fragments-CUTE8-_I.js → template-fragments-BO6i19kt.js} +3 -3
  98. package/dist/{template-fragments-cyAQu7aw.cjs → template-fragments-CTfJeHoM.cjs} +1 -1
  99. package/dist/{template-registry-PSuLsnyq.js → template-registry-CIaC6qBW.js} +168 -171
  100. package/dist/template-registry-CKo-bogM.cjs +1 -0
  101. package/dist/template-serialization-Cb1ospyK.js +367 -0
  102. package/dist/template-serialization-D4Fofl9c.cjs +1 -0
  103. package/dist/{textwrap-LhJkHWb1.cjs → textwrap-BYSqmGGV.cjs} +1 -1
  104. package/dist/{textwrap-Bt_tnI6V.js → textwrap-CGjFy7gf.js} +1 -1
  105. package/dist/usePopoverBounds-C3hn7F1s.js +84 -0
  106. package/dist/usePopoverBounds-mJhJ-VqG.cjs +1 -0
  107. package/dist/vue-async.cjs +1 -1
  108. package/dist/vue-async.js +3 -3
  109. package/dist/vue.cjs +1 -1
  110. package/dist/vue.js +13 -10
  111. package/dist/{workbook-session-BJfZVp4q.cjs → workbook-session-DL3uBAl8.cjs} +1 -1
  112. package/dist/{workbook-session-DRnMjIFK.js → workbook-session-nkvroJUE.js} +2 -2
  113. package/dist/worker.cjs +1 -1
  114. package/dist/worker.js +4 -4
  115. package/dist/xlsx.cjs +4 -4
  116. package/dist/xlsx.js +28 -29
  117. package/package.json +1 -1
  118. package/dist/ExcelBindingWizard-D1LZxm93.cjs +0 -1
  119. package/dist/ParamEditor-BTIx9UDt.cjs +0 -1
  120. package/dist/ReportBatchPanel-CU2BbpBg.cjs +0 -1
  121. package/dist/ReportLabelStudio-BXKE0GVs.cjs +0 -1
  122. package/dist/ReportParamPanel-Chxu4MTx.cjs +0 -1
  123. package/dist/ReportPreview-CIMR4ERo.cjs +0 -6
  124. package/dist/ReportTemplateLibrary-tv1sNa78.cjs +0 -1
  125. package/dist/RuleEditor-CvyjPyR6.cjs +0 -1
  126. package/dist/TemplateOutlinePanel-hb8cKkKR.cjs +0 -1
  127. package/dist/TemplateReusePanel-CR5jF00y.cjs +0 -1
  128. package/dist/TemplateReviewPanel-BU35FHwG.cjs +0 -1
  129. package/dist/_plugin-vue_export-helper-8SL1F89S.js +0 -53
  130. package/dist/_plugin-vue_export-helper-BLmdZLlg.cjs +0 -1
  131. package/dist/assets-BFTP-0WR.js +0 -137
  132. package/dist/assets-CZiZhTf2.cjs +0 -1
  133. package/dist/auto-CXd2E2aZ.cjs +0 -1
  134. package/dist/capabilities-D8UU2clQ.cjs +0 -1
  135. package/dist/capabilities-g0a2j9Yy.js +0 -125
  136. package/dist/designer-CEMTZomv.cjs +0 -2
  137. package/dist/designer-_IKm_n5N.js +0 -8002
  138. package/dist/diagnostic-collector-wASg6Fzs.cjs +0 -1
  139. package/dist/dom-Fk4NF-gN.cjs +0 -1
  140. package/dist/json-snapshot-DGFeI30h.cjs +0 -2
  141. package/dist/matrix-CcqYOuq_.cjs +0 -1
  142. package/dist/media-B7vnpD8k.cjs +0 -1
  143. package/dist/media-Y90dHK9z.js +0 -70
  144. package/dist/prepared-BLhV7vdE.cjs +0 -1
  145. package/dist/sha256-BDQ1Qk7A.js +0 -158
  146. package/dist/sha256-DgZAKXqI.cjs +0 -1
  147. package/dist/template-catalog-DDH-5J57.cjs +0 -1
  148. package/dist/template-registry-D24Z8aQf.cjs +0 -1
  149. package/dist/template-serialization-BOUidUlh.cjs +0 -1
  150. package/dist/template-serialization-BgGWYV_1.js +0 -307
@@ -0,0 +1,208 @@
1
+ import { z as m, A as j, G as B, x as M, N, i as S, E as A, r as T } from "./diagnostic-collector-CZ8DV6wA.js";
2
+ function X(e, t) {
3
+ m(t.signal), j(() => t.onDiagnostic?.(e)), m(t.signal);
4
+ }
5
+ class U extends Error {
6
+ constructor(t, n) {
7
+ super(`Output contains ${n?.total ?? t.length} known fidelity issue(s): ${t[0]?.code ?? Object.keys(n?.counts ?? {})[0] ?? "unknown"}`), this.diagnostics = t, this.diagnosticSummary = n, this.code = "output-fidelity", this.name = "OutputFidelityError";
8
+ }
9
+ }
10
+ const R = /* @__PURE__ */ new Set(["text", "rect", "line", "ellipse"]), J = /* @__PURE__ */ new Set(["image", "chart", "barcode", "qrcode"]);
11
+ function F(e, t) {
12
+ if (!e.grid) {
13
+ if (S(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 (J.has(e.kind)) return { code: "missing-image", message: `${e.kind} requires imageData or a renderer adapter before output.` };
16
+ if (!R.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 p(e, t, n, i, r) {
21
+ const a = Object.getOwnPropertyDescriptor(e, "meta")?.value, o = a && Object.getOwnPropertyDescriptor(a, "componentExtension")?.value, c = o && Object.getOwnPropertyDescriptor(o, "id")?.value, s = o && Object.getOwnPropertyDescriptor(o, "version")?.value, d = typeof c == "string" && c.length <= 128 && typeof s == "string" && s.length <= 64 ? { id: c, version: s } : void 0;
22
+ return { ...r, severity: "warning", format: t, pageIndex: n, componentIndex: i, kind: e.kind, nid: e.nid, ...d ? { extension: d } : {} };
23
+ }
24
+ function _(e, t) {
25
+ const n = [];
26
+ return e.rotateDeg && (t || !Number.isFinite(e.rotateDeg)) && n.push("rotateDeg"), e.opacity !== void 0 && e.opacity !== 1 && (t || !Number.isFinite(e.opacity) || e.opacity < 0 || e.opacity > 1) && n.push("opacity"), n;
27
+ }
28
+ function x(e, t, n = !1) {
29
+ if (!e || t === "dom") return;
30
+ const i = t === "pdf" ? _(e, n) : [];
31
+ return t !== "pdf" && (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;
32
+ }
33
+ function I(e) {
34
+ if (!e) return;
35
+ const t = ["backgroundColor", "align", "verticalAlign", "lineHeight", "borderTop", "borderRight", "borderBottom", "borderLeft", "borderColor", "lineColor", "lineWidthPt"].filter((n) => e[n] !== void 0);
36
+ return t.length ? `XLSX rich text does not retain independent run styles: ${t.join(", ")}.` : void 0;
37
+ }
38
+ function z(e) {
39
+ if (e.kind !== "text") return;
40
+ const t = I(e.style);
41
+ 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}` : ""}` };
42
+ }
43
+ function O(e, t, n, i, r, a) {
44
+ const o = (c) => {
45
+ r.push({ ...p(e, t, n, i, { code: "unsupported-style", message: c }), componentPath: a });
46
+ };
47
+ for (const c of e.richParagraphs ?? []) {
48
+ t === "xlsx" && (c.spaceBeforeMm || c.spaceAfterMm || c.indentMm || c.align || c.lineHeight) && o("XLSX rich text preserves fonts and paragraph newlines; paragraph spacing, indentation and alignment are not retained.");
49
+ const s = x({ align: c.align }, t);
50
+ s && o(s);
51
+ for (const d of c.segments) {
52
+ const u = x(d.style, t, !0) ?? (t === "xlsx" ? I(d.style) : void 0);
53
+ u && o(u);
54
+ }
55
+ }
56
+ }
57
+ function P(e, t, n, i, r, a, o) {
58
+ if (o.has(e)) return;
59
+ const c = new Set(o).add(e), s = F(e, t);
60
+ s && a.push({ ...p(e, t, n, i, s), componentPath: r });
61
+ const d = x(e.style, t);
62
+ d && a.push({ ...p(e, t, n, i, { code: "unsupported-style", message: d }), componentPath: r }), O(e, t, n, i, a, r), q(e, t, n, i, r, a, c);
63
+ }
64
+ function H(e) {
65
+ return e.grid ? { code: "nested-components-omitted", message: "XLSX cannot place a nested grid inside a single cell; the nested grid is omitted." } : z(e);
66
+ }
67
+ function W(e) {
68
+ let t;
69
+ return (n, i, r, a) => {
70
+ const o = H(n);
71
+ if (o || !S(n)) return o;
72
+ t ??= new Map(T(e.grid, e.widthMm, e.heightMm).cells.map((g) => [`${g.ri}:${g.ci}`, g]));
73
+ const c = t.get(`${i}:${r}`), s = 2 * (e.grid?.paddingMm ?? 0.5), d = (c?.widthMm ?? 0) - s - (a?.indentMm ?? 0), u = (c?.heightMm ?? 0) - s;
74
+ if (n.leftMm < 0 || n.topMm < 0 || n.leftMm + n.widthMm > d + 1e-3 || n.topMm + n.heightMm > u + 1e-3) return { code: "unsupported-style", message: "XLSX cannot clip a child image to a cell; it retains the original image dimensions." };
75
+ };
76
+ }
77
+ function q(e, t, n, i, r, a, o) {
78
+ const c = W(e);
79
+ for (const [s, d] of (e.grid?.cells ?? []).entries()) for (const [u, g] of d.entries()) {
80
+ g?.dataBar !== void 0 && !A(g.dataBar) && a.push({ ...p(e, t, n, 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, s, u] });
81
+ const b = x(g?.style, t);
82
+ b && a.push({ ...p(e, t, n, i, { code: "unsupported-style", message: b }), componentPath: [...r, s, u] }), g?.richParagraphs?.length && O({ ...e, richParagraphs: g.richParagraphs }, t, n, i, a, [...r, s, u]);
83
+ for (const [C, f] of (g?.children ?? []).entries()) {
84
+ const E = [...r, s, u, C];
85
+ if (t === "xlsx") {
86
+ const D = c(f, s, u, g);
87
+ if (D && a.push({ ...p(f, t, n, i, D), componentPath: E }), f.grid) continue;
88
+ }
89
+ P(f, t, n, i, E, a, o);
90
+ }
91
+ }
92
+ }
93
+ function v(e, t, n) {
94
+ N(e), e.pages.forEach((i, r) => i.components.forEach((a, o) => P(a, t, r, o, [], n, /* @__PURE__ */ new Set())));
95
+ }
96
+ function te(e, t) {
97
+ const n = [];
98
+ return v(e, t, n), n;
99
+ }
100
+ function ne(e, t, n = B) {
101
+ const i = M(n);
102
+ return v(e, t, i), i.snapshot();
103
+ }
104
+ function K(e, t, n, i) {
105
+ m(n.signal);
106
+ const r = M(n.diagnosticLimit);
107
+ i?.diagnosticSummary ? r.merge(i.diagnosticSummary) : i?.diagnostics.forEach((s) => r.push(s));
108
+ const a = r.entries.length, o = n.diagnosticLimit === void 0 ? void 0 : new Set(r.entries);
109
+ if (v(e, t, { push: (s) => {
110
+ m(n.signal), r.push(s);
111
+ } }), (o ? r.entries.filter((s) => !o.has(s)) : r.entries.slice(a)).forEach((s) => X(s, n)), n.fidelity === "strict" && r.total) throw new U(r.entries, n.diagnosticLimit === void 0 ? void 0 : r.snapshot());
112
+ return r;
113
+ }
114
+ function ie(e, t, n) {
115
+ return K(e, t, n).entries;
116
+ }
117
+ class G extends Error {
118
+ constructor(t, n) {
119
+ super(n), this.code = t, this.name = "ImageMediaError";
120
+ }
121
+ }
122
+ const w = { maxImageBytes: 16 * 1024 * 1024, maxTotalImageBytes: 32 * 1024 * 1024, maxImages: 1e3, maxImagePixels: 16e6, maxTotalImagePixels: 64e6, maxImageDimension: 16384 };
123
+ function l(e) {
124
+ throw new G("invalid-image-data", e);
125
+ }
126
+ function h(e) {
127
+ throw new G("image-budget-exceeded", e);
128
+ }
129
+ function $(e) {
130
+ const t = { ...w };
131
+ for (const n of Object.keys(w)) {
132
+ const i = e[n] ?? w[n];
133
+ if (!Number.isSafeInteger(i) || i <= 0 || i > 2147483647) throw new RangeError(`${n} 图片预算须为1至2147483647的整数。`);
134
+ t[n] = i;
135
+ }
136
+ return t;
137
+ }
138
+ function V(e) {
139
+ if (e.length < 33 || ![137, 80, 78, 71, 13, 10, 26, 10].every((n, i) => e[i] === n)) return l("图片内容与 PNG/JPEG 类型不一致。");
140
+ const t = new DataView(e.buffer, e.byteOffset, e.byteLength);
141
+ return t.getUint32(8) !== 13 || String.fromCharCode(...e.subarray(12, 16)) !== "IHDR" ? l("PNG must begin with an IHDR header.") : [t.getUint32(16), t.getUint32(20)];
142
+ }
143
+ const Z = /* @__PURE__ */ new Set([192, 193, 194, 195, 197, 198, 199, 201, 202, 203, 205, 206, 207]);
144
+ function Q(e) {
145
+ if (e[0] !== 255 || e[1] !== 216) return l("图片内容与 PNG/JPEG 类型不一致。");
146
+ let t = 2;
147
+ for (; t + 3 < e.length; ) {
148
+ if (e[t++] !== 255) return l("JPEG marker is malformed.");
149
+ for (; e[t] === 255; ) t++;
150
+ const n = e[t++];
151
+ if (n === 217 || n === 218) break;
152
+ if (n === 1 || n >= 208 && n <= 215) continue;
153
+ const i = e[t] * 256 + e[t + 1];
154
+ if (i < 2 || t + i > e.length) return l("JPEG segment exceeds its data boundary.");
155
+ if (Z.has(n))
156
+ return i < 8 ? l("JPEG frame header is incomplete.") : [e[t + 5] * 256 + e[t + 6], e[t + 3] * 256 + e[t + 4]];
157
+ t += i;
158
+ }
159
+ return l("JPEG has no supported dimension header.");
160
+ }
161
+ function k(e, t) {
162
+ if (e.length > Math.ceil(t.maxImageBytes / 3) * 4 + 64) return h("单张图片超过字节预算。");
163
+ const n = /^data:image\/(png|jpe?g);base64,([A-Za-z0-9+/]+={0,2})$/i.exec(e);
164
+ if (!n || n[2].length % 4) return l("Image must contain valid PNG/JPEG base64 data.");
165
+ const i = n[2], r = i.length / 4 * 3 - (i.endsWith("==") ? 2 : i.endsWith("=") ? 1 : 0);
166
+ if (r > t.maxImageBytes) return h("单张图片超过字节预算。");
167
+ const a = n[1].toLowerCase() === "png" ? "png" : "jpeg";
168
+ return { encoded: i, byteLength: r, extension: a };
169
+ }
170
+ function y(e, t) {
171
+ const n = atob(e), i = new Uint8Array(t);
172
+ for (let r = 0; r < t; r++) i[r] = n.charCodeAt(r);
173
+ return i;
174
+ }
175
+ function L(e, t, n) {
176
+ const [i, r] = t === "png" ? V(e) : Q(e);
177
+ return !i || !r ? l("Image dimensions must be positive.") : i > n.maxImageDimension || r > n.maxImageDimension || i * r > n.maxImagePixels ? h("Image exceeds its decoded dimension or pixel budget.") : [i, r];
178
+ }
179
+ function Y(e, t) {
180
+ const { encoded: n, byteLength: i, extension: r } = k(e, t), a = y(n, i), [o, c] = L(a, r, t);
181
+ return { dataUrl: `data:image/${r};base64,${n}`, bytes: a, extension: r, width: o, height: c };
182
+ }
183
+ function re(e) {
184
+ const t = $({}), { encoded: n, byteLength: i, extension: r } = k(e, t), a = r === "png" ? y(n.slice(0, 44), Math.min(i, 33)) : y(n, i), [o, c] = L(a, r, t);
185
+ return { dataUrl: `data:image/${r};base64,${n}`, extension: r, width: o, height: c, byteLength: i };
186
+ }
187
+ function se(e = {}) {
188
+ const t = $(e), n = /* @__PURE__ */ new Map();
189
+ let i = 0, r = 0;
190
+ return (a) => {
191
+ const o = a.replace(/^data:image\/(png|jpe?g);base64,/i, (d, u) => `data:image/${u.toLowerCase() === "png" ? "png" : "jpeg"};base64,`), c = n.get(o);
192
+ if (c) return c;
193
+ if (n.size >= t.maxImages) return h("唯一图片数量超过预算。");
194
+ const s = Y(a, t);
195
+ return i + s.bytes.length > t.maxTotalImageBytes || r + s.width * s.height > t.maxTotalImagePixels ? h("图片总字节或总像素超过预算。") : (i += s.bytes.length, r += s.width * s.height, n.set(o, s), s);
196
+ };
197
+ }
198
+ export {
199
+ G as I,
200
+ U as O,
201
+ te as a,
202
+ ne as b,
203
+ K as c,
204
+ se as d,
205
+ re as i,
206
+ X as n,
207
+ ie as r
208
+ };
@@ -1,13 +1,12 @@
1
- import "./font-loader-CHmEwkHl.js";
1
+ import "./font-loader-BSRR-a0C.js";
2
2
  import { g as Q1 } from "./_commonjsHelpers-DaMA6jEr.js";
3
- import { h as Ld, w as _1 } from "./textwrap-Bt_tnI6V.js";
4
- import { d as $1, j as eg } from "./rich-text-layout-BtygMWZC.js";
5
- import { v as Nd, x as tg, o as rg, y as ng, i as ig, r as ag, e as Ud, b as og, g as sg, a as Mn, c as us, f as ug } from "./diagnostic-collector-C-JBA016.js";
6
- import { d as fg } from "./data-bar-DjOgTLqu.js";
7
- import { c as cg, n as lg, O as hg } from "./capabilities-g0a2j9Yy.js";
8
- import { I as xl, c as dg } from "./media-Y90dHK9z.js";
9
- import { r as vg } from "./assets-BFTP-0WR.js";
10
- import { r as pg } from "./grid-strokes-DsoICRjZ.js";
3
+ import { h as Ld, w as _1 } from "./textwrap-CGjFy7gf.js";
4
+ import { d as $1, j as eg } from "./rich-text-layout-BCdxMT4m.js";
5
+ import { v as Nd, x as tg, o as rg, y as ng, i as ig, r as ag, e as Ud, b as og, g as sg, a as Mn, c as us, f as ug } from "./diagnostic-collector-CZ8DV6wA.js";
6
+ import { d as fg } from "./data-bar-BVnzVbE9.js";
7
+ import { c as cg, I as xl, n as lg, O as hg, d as dg } from "./media-jiLdCn3i.js";
8
+ import { r as vg } from "./assets-Vt10jCtl.js";
9
+ import { r as pg } from "./grid-strokes-CovSH3A2.js";
11
10
  var Ef = function(t, e) {
12
11
  return Ef = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
13
12
  r.__proto__ = n;
@@ -35948,7 +35947,7 @@ wn.registerFormat(hC);
35948
35947
  wn.registerFormat(IE);
35949
35948
  wn.registerFormat(WE);
35950
35949
  wn.registerFormat(QE);
35951
- const IT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
35950
+ const kT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
35952
35951
  __proto__: null,
35953
35952
  default: wn
35954
35953
  }, Symbol.toStringTag, { value: "Module" }));
@@ -36349,7 +36348,7 @@ function wT(t, e, r, n) {
36349
36348
  ...n === void 0 ? {} : { fidelityWarningCount: t.fidelityWarnings.total, pageErrorCount: e.total, diagnosticSummary: r.snapshot() }
36350
36349
  };
36351
36350
  }
36352
- async function BT(t, e = {}) {
36351
+ async function IT(t, e = {}) {
36353
36352
  const r = await vg(t, { ...e, format: "pdf" });
36354
36353
  t = r.plan;
36355
36354
  const n = cg(t, "pdf", e, r), i = n.entries.length, a = e.diagnosticLimit === void 0 ? void 0 : new Set(n.entries), o = await Hn.create();
@@ -36402,7 +36401,7 @@ function Yo(t) {
36402
36401
  function xT(t, e) {
36403
36402
  return e.bold && e.italic ? t.boldItalic ?? t.bold ?? t.italic ?? t.regular : e.bold ? t.bold ?? t.regular : e.italic ? t.italic ?? t.regular : t.regular;
36404
36403
  }
36405
- function RT(t) {
36404
+ function BT(t) {
36406
36405
  const e = {
36407
36406
  regular: Yo(t.regular),
36408
36407
  bold: t.bold ? Yo(t.bold) : void 0,
@@ -36419,7 +36418,7 @@ function RT(t) {
36419
36418
  };
36420
36419
  }
36421
36420
  export {
36422
- RT as c,
36423
- IT as f,
36424
- BT as r
36421
+ BT as c,
36422
+ kT as f,
36423
+ IT as r
36425
36424
  };