@agile-team/mach-report 2.14.0 → 2.16.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.
Files changed (282) hide show
  1. package/README.md +26 -16
  2. package/THIRD_PARTY_NOTICES.md +3 -1
  3. package/dist/{ExcelBindingWizard-CLT2p7P3.cjs → ExcelBindingWizard-CP6h2x1f.cjs} +1 -1
  4. package/dist/{ExcelBindingWizard-CvsWR8Ga.js → ExcelBindingWizard-HhB3hAJE.js} +3 -3
  5. package/dist/ParamEditor-CUQLgoxa.cjs +1 -0
  6. package/dist/ParamEditor-OKesP_nO.js +594 -0
  7. package/dist/{ReportBatchPanel-DkxTzBkD.cjs → ReportBatchPanel-cZCAMAwH.cjs} +1 -1
  8. package/dist/{ReportBatchPanel-LqVgiqp7.js → ReportBatchPanel-ruxcbfY6.js} +39 -39
  9. package/dist/ReportPreview-BcDKCLiK.js +4834 -0
  10. package/dist/ReportPreview-Bk9nLfO9.cjs +6 -0
  11. package/dist/{ReportTemplateLibrary-cQ1sqNYo.cjs → ReportTemplateLibrary-BDlNT8JN.cjs} +1 -1
  12. package/dist/{ReportTemplateLibrary-MjWEtc7X.js → ReportTemplateLibrary-DcwrH-63.js} +1 -1
  13. package/dist/{RuleEditor-BaR6xUiI.cjs → RuleEditor-BX5S8RSF.cjs} +1 -1
  14. package/dist/{RuleEditor-ChuXMlei.js → RuleEditor-CGl9XY2s.js} +5 -5
  15. package/dist/{TemplateOutlinePanel-BHKP89Xz.cjs → TemplateOutlinePanel-CGrT5DFN.cjs} +1 -1
  16. package/dist/{TemplateOutlinePanel-Dci6aRn1.js → TemplateOutlinePanel-SXCjaPKR.js} +2 -2
  17. package/dist/{TemplateReusePanel-CY5eO2Sh.cjs → TemplateReusePanel-6Z3wRFz8.cjs} +1 -1
  18. package/dist/{TemplateReusePanel-B7Gmyc1z.js → TemplateReusePanel-lHLOS9Wn.js} +2 -2
  19. package/dist/{TemplateReviewPanel-DjlX3xpt.js → TemplateReviewPanel-CJ9PLc48.js} +2 -2
  20. package/dist/{TemplateReviewPanel-JvZe9_4G.cjs → TemplateReviewPanel-Dpk7sLcF.cjs} +1 -1
  21. package/dist/analytics.cjs +1 -1
  22. package/dist/analytics.d.cts +5 -1
  23. package/dist/analytics.d.ts +5 -1
  24. package/dist/analytics.js +154 -60
  25. package/dist/artifact-integrity.json +143 -0
  26. package/dist/assets-CqIbfbTr.js +126 -0
  27. package/dist/assets-e4YSke8n.cjs +1 -0
  28. package/dist/auto-YR7a4BtF.js +240 -0
  29. package/dist/auto-uVBjX1j5.cjs +1 -0
  30. package/dist/batch-WzDIXJAt.js +220 -0
  31. package/dist/batch-z6Aw5GEY.cjs +1 -0
  32. package/dist/capabilities-DDwXr_cA.js +103 -0
  33. package/dist/capabilities-DNLyZdNw.cjs +1 -0
  34. package/dist/codes.d.cts +4 -0
  35. package/dist/codes.d.ts +4 -0
  36. package/dist/component-tree-Ca6YYfHq.js +61 -0
  37. package/dist/component-tree-DkGLEfZC.cjs +1 -0
  38. package/dist/{computed-Bvk0W15F.js → computed-C-4C2S5h.js} +3 -3
  39. package/dist/config-Dg_o8e7m.cjs +1 -0
  40. package/dist/config-XQ4qrQ7Q.js +844 -0
  41. package/dist/designer-BfQSahxq.js +5163 -0
  42. package/dist/designer-CPPdeM5_.cjs +2 -0
  43. package/dist/designer.cjs +1 -1
  44. package/dist/designer.d.cts +197 -16
  45. package/dist/designer.d.ts +197 -16
  46. package/dist/designer.js +1 -1
  47. package/dist/diagnostic-notification-B9K9We3h.cjs +1 -0
  48. package/dist/diagnostic-notification-qGAYZdkB.js +7 -0
  49. package/dist/drill-CsdjgkRM.cjs +1 -0
  50. package/dist/drill-DIGsZfyB.js +145 -0
  51. package/dist/encoding-BOGq4qYL.js +21 -0
  52. package/dist/encoding-BYF9ZTl9.cjs +1 -0
  53. package/dist/{font-loader-DHto6Lra.js → font-loader-CzI1GuBc.js} +1 -1
  54. package/dist/{font-loader-vhCT8znW.cjs → font-loader-EKLzOJxf.cjs} +1 -1
  55. package/dist/index.cjs +8 -9
  56. package/dist/index.d.cts +84 -4
  57. package/dist/index.d.ts +84 -4
  58. package/dist/index.js +829 -833
  59. package/dist/json-snapshot-D6ioHth9.js +1702 -0
  60. package/dist/json-snapshot-DknkjvxP.cjs +2 -0
  61. package/dist/licenses/_bwip-js_generic-4.11.4.txt +24 -0
  62. package/dist/licenses/_fast-csv_format-4.3.5.txt +22 -0
  63. package/dist/licenses/_fast-csv_parse-4.3.6.txt +22 -0
  64. package/dist/licenses/_pdf-lib_fontkit-1.1.1.txt +326 -0
  65. package/dist/licenses/_pdf-lib_standard-fonts-1.0.0.txt +22 -0
  66. package/dist/licenses/_pdf-lib_upng-1.0.1.txt +22 -0
  67. package/dist/licenses/_types_node-14.18.63.txt +22 -0
  68. package/dist/licenses/_types_pako-2.0.3.txt +22 -0
  69. package/dist/licenses/_types_pegjs-0.10.6.txt +22 -0
  70. package/dist/licenses/archiver-5.3.2.txt +23 -0
  71. package/dist/licenses/archiver-utils-2.1.0.txt +23 -0
  72. package/dist/licenses/archiver-utils-3.0.4.txt +23 -0
  73. package/dist/licenses/async-3.2.6.txt +20 -0
  74. package/dist/licenses/balanced-match-1.0.2.txt +22 -0
  75. package/dist/licenses/base64-js-1.5.1.txt +22 -0
  76. package/dist/licenses/big-integer-1.6.52.txt +25 -0
  77. package/dist/licenses/binary-0.3.0.txt +178 -0
  78. package/dist/licenses/bl-4.1.0.txt +14 -0
  79. package/dist/licenses/bluebird-3.4.7.txt +22 -0
  80. package/dist/licenses/brace-expansion-1.1.21.txt +22 -0
  81. package/dist/licenses/brace-expansion-2.1.7.txt +22 -0
  82. package/dist/licenses/buffer-5.7.1.txt +22 -0
  83. package/dist/licenses/buffer-crc32-0.2.13.txt +20 -0
  84. package/dist/licenses/buffer-indexof-polyfill-1.0.2.txt +23 -0
  85. package/dist/licenses/buffers-0.1.1.txt +140 -0
  86. package/dist/licenses/chainsaw-0.1.0.txt +184 -0
  87. package/dist/licenses/compress-commons-4.1.2.txt +23 -0
  88. package/dist/licenses/concat-map-0.0.1.txt +19 -0
  89. package/dist/licenses/core-util-is-1.0.3.txt +20 -0
  90. package/dist/licenses/crc-32-1.2.2.txt +202 -0
  91. package/dist/licenses/crc32-stream-4.0.3.txt +23 -0
  92. package/dist/licenses/dayjs-1.11.23.txt +22 -0
  93. package/dist/licenses/duplexer2-0.1.4.txt +27 -0
  94. package/dist/licenses/end-of-stream-1.4.5.txt +22 -0
  95. package/dist/licenses/exceljs-4.4.0.txt +23 -0
  96. package/dist/licenses/fast-csv-4.3.6.txt +22 -0
  97. package/dist/licenses/fast-png-6.4.0.txt +22 -0
  98. package/dist/licenses/fs-constants-1.0.0.txt +22 -0
  99. package/dist/licenses/fs.realpath-1.0.0.txt +44 -0
  100. package/dist/licenses/fstream-1.0.12.txt +16 -0
  101. package/dist/licenses/glob-7.2.3.txt +22 -0
  102. package/dist/licenses/graceful-fs-4.2.11.txt +16 -0
  103. package/dist/licenses/ieee754-1.2.1.txt +12 -0
  104. package/dist/licenses/immediate-3.0.6.txt +21 -0
  105. package/dist/licenses/inflight-1.0.6.txt +16 -0
  106. package/dist/licenses/inherits-2.0.4.txt +17 -0
  107. package/dist/licenses/iobuffer-5.4.0.txt +23 -0
  108. package/dist/licenses/isarray-1.0.0.txt +61 -0
  109. package/dist/licenses/jszip-3.10.2.txt +652 -0
  110. package/dist/licenses/lazystream-1.0.1.txt +24 -0
  111. package/dist/licenses/lie-3.3.0.txt +8 -0
  112. package/dist/licenses/listenercount-1.0.1.txt +6 -0
  113. package/dist/licenses/lodash.defaults-4.2.0.txt +48 -0
  114. package/dist/licenses/lodash.difference-4.5.0.txt +48 -0
  115. package/dist/licenses/lodash.escaperegexp-4.1.2.txt +48 -0
  116. package/dist/licenses/lodash.flatten-4.4.0.txt +48 -0
  117. package/dist/licenses/lodash.groupby-4.6.0.txt +48 -0
  118. package/dist/licenses/lodash.isboolean-3.0.3.txt +23 -0
  119. package/dist/licenses/lodash.isequal-4.5.0.txt +48 -0
  120. package/dist/licenses/lodash.isfunction-3.0.9.txt +48 -0
  121. package/dist/licenses/lodash.isnil-4.0.0.txt +23 -0
  122. package/dist/licenses/lodash.isplainobject-4.0.6.txt +48 -0
  123. package/dist/licenses/lodash.isundefined-3.0.1.txt +23 -0
  124. package/dist/licenses/lodash.union-4.6.0.txt +48 -0
  125. package/dist/licenses/lodash.uniq-4.5.0.txt +48 -0
  126. package/dist/licenses/minimatch-3.1.5.txt +16 -0
  127. package/dist/licenses/minimatch-5.1.9.txt +16 -0
  128. package/dist/licenses/minimist-1.2.8.txt +19 -0
  129. package/dist/licenses/mkdirp-0.5.6.txt +22 -0
  130. package/dist/licenses/node-sql-parser-5.4.0.txt +202 -0
  131. package/dist/licenses/normalize-path-3.0.0.txt +22 -0
  132. package/dist/licenses/once-1.4.0.txt +16 -0
  133. package/dist/licenses/pako-1.0.11.txt +22 -0
  134. package/dist/licenses/pako-2.2.0.txt +22 -0
  135. package/dist/licenses/path-is-absolute-1.0.1.txt +22 -0
  136. package/dist/licenses/pdf-lib-1.17.1.txt +22 -0
  137. package/dist/licenses/process-nextick-args-2.0.1.txt +20 -0
  138. package/dist/licenses/readable-stream-2.3.8.txt +48 -0
  139. package/dist/licenses/readable-stream-3.6.2.txt +48 -0
  140. package/dist/licenses/readdir-glob-1.1.3.txt +202 -0
  141. package/dist/licenses/rimraf-2.7.1.txt +16 -0
  142. package/dist/licenses/safe-buffer-5.1.2.txt +22 -0
  143. package/dist/licenses/safe-buffer-5.2.1.txt +22 -0
  144. package/dist/licenses/saxes-5.0.1.txt +397 -0
  145. package/dist/licenses/setimmediate-1.0.5.txt +21 -0
  146. package/dist/licenses/string_decoder-1.1.1.txt +49 -0
  147. package/dist/licenses/string_decoder-1.3.0.txt +49 -0
  148. package/dist/licenses/tar-stream-2.2.0.txt +22 -0
  149. package/dist/licenses/tmp-0.2.7.txt +22 -0
  150. package/dist/licenses/traverse-0.3.9.txt +25 -0
  151. package/dist/licenses/tslib-1.14.1.txt +13 -0
  152. package/dist/licenses/unzipper-0.10.14.txt +26 -0
  153. package/dist/licenses/util-deprecate-1.0.2.txt +25 -0
  154. package/dist/licenses/uuid-11.1.1.txt +10 -0
  155. package/dist/licenses/wrappy-1.0.2.txt +16 -0
  156. package/dist/licenses/xmlchars-2.2.0.txt +19 -0
  157. package/dist/licenses/zip-stream-4.1.1.txt +23 -0
  158. package/dist/matrix-CGRGkn5s.js +112 -0
  159. package/dist/matrix-gEO7ZM_u.cjs +1 -0
  160. package/dist/media-B7vnpD8k.cjs +1 -0
  161. package/dist/media-Y90dHK9z.js +70 -0
  162. package/dist/param-validation-C3HlcLLO.cjs +1 -0
  163. package/dist/param-validation-Do7Eg8Zv.js +181 -0
  164. package/dist/{pdf-AyJGb22z.cjs → pdf-ByVCb1i6.cjs} +49 -49
  165. package/dist/{pdf-8UPQebOE.js → pdf-DJ5S6ukC.js} +4924 -4872
  166. package/dist/pdf.cjs +1 -1
  167. package/dist/pdf.d.cts +20 -3
  168. package/dist/pdf.d.ts +20 -3
  169. package/dist/pdf.js +2 -2
  170. package/dist/{plugin-BGKf-Tqg.js → plugin-C2j5_mhx.js} +2 -2
  171. package/dist/{plugin-CktLH_Iy.cjs → plugin-Dr39GBRG.cjs} +1 -1
  172. package/dist/prepared-DdrjLC7L.cjs +1 -0
  173. package/dist/prepared-DqtpvRTn.js +87 -0
  174. package/dist/progress-B0ctFpKf.cjs +1 -0
  175. package/dist/progress-BXzlVbIp.js +29 -0
  176. package/dist/progress-DJBd9Rb9.cjs +1 -0
  177. package/dist/progress-Hc2vxoCs.js +52 -0
  178. package/dist/protocol-BzwMP4Vw.cjs +1 -0
  179. package/dist/protocol-kt4Iy6-3.js +90 -0
  180. package/dist/record-bindings-CZWBJ1fU.js +195 -0
  181. package/dist/record-bindings-DUX1VMlR.cjs +1 -0
  182. package/dist/{region-binding-workflow-DEJbhpCv.js → region-binding-workflow-CWNvIjkV.js} +1 -1
  183. package/dist/{region-binding-workflow-BzfbxRiR.cjs → region-binding-workflow-CqSMxQ4p.cjs} +1 -1
  184. package/dist/report-encoding-worker.cjs +1 -0
  185. package/dist/report-encoding-worker.d.ts +1 -0
  186. package/dist/report-encoding-worker.js +2 -0
  187. package/dist/{report-params-B44imUd4.js → report-params-B1RzkhJj.js} +1 -1
  188. package/dist/{report-params-SJfhKgaX.cjs → report-params-WDGrA4oP.cjs} +1 -1
  189. package/dist/rich-text-layout-ALlMoYOG.cjs +3 -0
  190. package/dist/rich-text-layout-Ct5WrY1g.js +102 -0
  191. package/dist/runtime-BjKBI530.js +168 -0
  192. package/dist/runtime-CBFEPKEs.cjs +1 -0
  193. package/dist/sbom.cdx.json +3982 -0
  194. package/dist/server/node.d.cts +106 -2
  195. package/dist/server/node.d.ts +106 -2
  196. package/dist/server-node.cjs +5 -1
  197. package/dist/server-node.js +4634 -539
  198. package/dist/server.cjs +1 -1
  199. package/dist/server.d.cts +780 -5
  200. package/dist/server.d.ts +780 -5
  201. package/dist/server.js +773 -691
  202. package/dist/sha256-BshdOkCC.cjs +1 -0
  203. package/dist/sha256-DTG-Gq8i.js +157 -0
  204. package/dist/style-67OqfNed.js +73 -0
  205. package/dist/style-C22Pbv3T.cjs +1 -0
  206. package/dist/style.css +1 -1
  207. package/dist/template-bindings-C2SpvsMU.js +58 -0
  208. package/dist/template-bindings-CEtWyiLX.cjs +1 -0
  209. package/dist/template-catalog-BtR2JmCL.js +414 -0
  210. package/dist/template-catalog-C2NLdrwB.cjs +1 -0
  211. package/dist/{template-fragments-DFUpq5QM.cjs → template-fragments-BVsbxs4a.cjs} +1 -1
  212. package/dist/{template-fragments-CLkGo6To.js → template-fragments-By0aZC1D.js} +21 -21
  213. package/dist/{template-outline-B3xVkzSv.cjs → template-outline-BwRV_eRo.cjs} +1 -1
  214. package/dist/{template-outline-CFenM1PV.js → template-outline-cnWfT_LK.js} +3 -3
  215. package/dist/template-registry-C62vpv4a.cjs +1 -0
  216. package/dist/template-registry-Cw3vRTX2.js +801 -0
  217. package/dist/textwrap-BEIg2w8y.js +110 -0
  218. package/dist/textwrap-BI-yJ6Wt.cjs +4 -0
  219. package/dist/{tree-CqcQ99NM.js → tree-CjVZLRw7.js} +1 -1
  220. package/dist/vue/async.d.cts +189 -14
  221. package/dist/vue/async.d.ts +189 -14
  222. package/dist/vue/index.d.cts +246 -22
  223. package/dist/vue/index.d.ts +246 -22
  224. package/dist/vue-async.cjs +1 -1
  225. package/dist/vue-async.js +3 -3
  226. package/dist/vue.cjs +1 -1
  227. package/dist/vue.js +80 -78
  228. package/dist/{workbook-session-BfK1yHOO.js → workbook-session-BeSO8PFB.js} +5460 -5295
  229. package/dist/{workbook-session-DNa2RHNG.cjs → workbook-session-Cbts-22R.cjs} +19 -19
  230. package/dist/worker.cjs +1 -1
  231. package/dist/worker.d.cts +104 -2
  232. package/dist/worker.d.ts +104 -2
  233. package/dist/worker.js +12 -156
  234. package/dist/xlsx-node.cjs +35 -35
  235. package/dist/xlsx-node.js +2138 -2137
  236. package/dist/xlsx.cjs +4 -4
  237. package/dist/xlsx.d.cts +24 -10
  238. package/dist/xlsx.d.ts +24 -10
  239. package/dist/xlsx.js +303 -277
  240. package/package.json +7 -4
  241. package/dist/ParamEditor-CflQV3eQ.js +0 -526
  242. package/dist/ParamEditor-vIDzvpPV.cjs +0 -1
  243. package/dist/ReportPreview-CvbqLUzM.cjs +0 -6
  244. package/dist/ReportPreview-D_ywJ_-H.js +0 -4533
  245. package/dist/assets-C2U-e-Sz.cjs +0 -4
  246. package/dist/assets-Q0wUwNrV.js +0 -217
  247. package/dist/batch-DzaTNLWI.js +0 -371
  248. package/dist/batch-xMkqYiTr.cjs +0 -1
  249. package/dist/capabilities-CK_7hizc.js +0 -63
  250. package/dist/capabilities-CsZ-pNHR.cjs +0 -1
  251. package/dist/config-0UIohTS7.cjs +0 -1
  252. package/dist/config-Dt9NtCPl.js +0 -566
  253. package/dist/data-explanation-BktvER5B.cjs +0 -1
  254. package/dist/data-explanation-C_J6jYNi.js +0 -16
  255. package/dist/defaults-DXhiM1ZD.js +0 -10
  256. package/dist/defaults-xhmcLLrf.cjs +0 -1
  257. package/dist/designer-Ci1LizA9.js +0 -5020
  258. package/dist/designer-rtmVIIdN.cjs +0 -2
  259. package/dist/grid-strokes-Cr7DwUux.cjs +0 -1
  260. package/dist/grid-strokes-DyyG1q_o.js +0 -53
  261. package/dist/json-snapshot-BeFT3Tso.js +0 -1952
  262. package/dist/json-snapshot-D1NTP2oI.cjs +0 -2
  263. package/dist/matrix-DVyWiYsd.cjs +0 -1
  264. package/dist/matrix-yZsGnldA.js +0 -227
  265. package/dist/page-window-index-CIuT4BAv.js +0 -43
  266. package/dist/page-window-index-DEjnM6IB.cjs +0 -1
  267. package/dist/param-validation-BlHHXs6u.js +0 -153
  268. package/dist/param-validation-DCK039V1.cjs +0 -1
  269. package/dist/progress-7OSZbFok.js +0 -39
  270. package/dist/progress-BnLiS5eH.cjs +0 -1
  271. package/dist/render-plan-7xpGrCEl.cjs +0 -1
  272. package/dist/render-plan-Ck6koX9L.js +0 -13
  273. package/dist/style-CQ1PK8ZB.js +0 -67
  274. package/dist/style-UgIJSA1F.cjs +0 -1
  275. package/dist/task-events-DQ276fn2.cjs +0 -1
  276. package/dist/task-events-Dpsvf_t2.js +0 -47
  277. package/dist/template-bindings-BJR4k7qZ.cjs +0 -1
  278. package/dist/template-bindings-Daui7hLF.js +0 -252
  279. package/dist/template-registry-COXDEJEM.js +0 -570
  280. package/dist/template-registry-D3SjENi6.cjs +0 -1
  281. package/dist/validate-BJ5HIWY8.cjs +0 -1
  282. package/dist/validate-CkQBWCeg.js +0 -163
@@ -0,0 +1,103 @@
1
+ import { r as $ } from "./grid-geometry-BNptEcMm.js";
2
+ import { b, i as M } from "./component-tree-Ca6YYfHq.js";
3
+ import { b as E } from "./progress-Hc2vxoCs.js";
4
+ import { n as k } from "./diagnostic-notification-qGAYZdkB.js";
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 D = /* @__PURE__ */ new Set(["text", "rect", "line", "ellipse"]), L = /* @__PURE__ */ new Set(["image", "chart", "barcode", "qrcode"]);
11
+ function O(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 (L.has(e.kind)) return { code: "missing-image", message: `${e.kind} requires imageData or a renderer adapter before output.` };
16
+ if (!D.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, i, s, n) {
21
+ return { ...n, severity: "warning", format: t, pageIndex: i, componentIndex: s, kind: e.kind, nid: e.nid };
22
+ }
23
+ function f(e, t) {
24
+ if (!e || t === "dom") return;
25
+ const i = [];
26
+ 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;
27
+ }
28
+ function S(e) {
29
+ if (!e) return;
30
+ const t = ["backgroundColor", "align", "verticalAlign", "lineHeight", "borderTop", "borderRight", "borderBottom", "borderLeft", "borderColor", "lineColor", "lineWidthPt"].filter((i) => e[i] !== void 0);
31
+ return t.length ? `XLSX rich text does not retain independent run styles: ${t.join(", ")}.` : void 0;
32
+ }
33
+ function C(e) {
34
+ if (e.kind !== "text") return;
35
+ const t = S(e.style);
36
+ 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}` : ""}` };
37
+ }
38
+ function m(e, t, i, s, n, o) {
39
+ const u = (r) => {
40
+ n.push({ ...g(e, t, i, s, { code: "unsupported-style", message: r }), componentPath: o });
41
+ };
42
+ for (const r of e.richParagraphs ?? []) {
43
+ t === "xlsx" && (r.spaceBeforeMm || r.spaceAfterMm || r.indentMm || r.align || r.lineHeight) && u("XLSX rich text preserves fonts and paragraph newlines; paragraph spacing, indentation and alignment are not retained.");
44
+ const a = f({ align: r.align }, t);
45
+ a && u(a);
46
+ for (const d of r.segments) {
47
+ const l = f(d.style, t) ?? (t === "xlsx" ? S(d.style) : void 0);
48
+ l && u(l);
49
+ }
50
+ }
51
+ }
52
+ function v(e, t, i, s, n, o, u) {
53
+ if (u.has(e)) return;
54
+ const r = new Set(u).add(e), a = O(e, t);
55
+ a && o.push({ ...g(e, t, i, s, a), componentPath: n });
56
+ const d = f(e.style, t);
57
+ d && o.push({ ...g(e, t, i, s, { code: "unsupported-style", message: d }), componentPath: n }), m(e, t, i, s, o, n), N(e, t, i, s, n, o, r);
58
+ }
59
+ function j(e, t, i) {
60
+ if (e.grid) return { code: "nested-components-omitted", message: "XLSX cannot place a nested grid inside a single cell; the nested grid is omitted." };
61
+ const s = C(e);
62
+ if (s) return s;
63
+ if (M(e) && (e.leftMm < 0 || e.topMm < 0 || e.leftMm + e.widthMm > t + 1e-3 || e.topMm + e.heightMm > i + 1e-3)) return { code: "unsupported-style", message: "XLSX cannot clip a child image to a cell; it retains the original image dimensions." };
64
+ }
65
+ function G(e) {
66
+ let t;
67
+ return (i, s, n, o) => {
68
+ t ??= new Map($(e.grid, e.widthMm, e.heightMm).cells.map((a) => [`${a.ri}:${a.ci}`, a]));
69
+ const u = t.get(`${s}:${n}`), r = 2 * (e.grid?.paddingMm ?? 0.5);
70
+ return j(i, (u?.widthMm ?? 0) - r - (o?.indentMm ?? 0), (u?.heightMm ?? 0) - r);
71
+ };
72
+ }
73
+ function N(e, t, i, s, n, o, u) {
74
+ const r = G(e);
75
+ for (const [a, d] of (e.grid?.cells ?? []).entries()) for (const [l, c] of d.entries()) {
76
+ const h = f(c?.style, t);
77
+ h && o.push({ ...g(e, t, i, s, { code: "unsupported-style", message: h }), componentPath: [...n, a, l] }), c?.richParagraphs?.length && m({ ...e, richParagraphs: c.richParagraphs }, t, i, s, o, [...n, a, l]);
78
+ for (const [w, p] of (c?.children ?? []).entries()) {
79
+ const y = [...n, a, l, w];
80
+ if (t === "xlsx") {
81
+ const x = r(p, a, l, c);
82
+ if (x && o.push({ ...g(p, t, i, s, x), componentPath: y }), p.grid) continue;
83
+ }
84
+ v(p, t, i, s, y, o, u);
85
+ }
86
+ }
87
+ }
88
+ function R(e, t) {
89
+ b(e);
90
+ const i = [];
91
+ return e.pages.forEach((s, n) => s.components.forEach((o, u) => v(o, t, n, u, [], i, /* @__PURE__ */ new Set()))), i;
92
+ }
93
+ function U(e, t, i) {
94
+ E(i.signal);
95
+ const s = R(e, t);
96
+ if (s.forEach((n) => k(n, i)), i.fidelity === "strict" && s.length) throw new X(s);
97
+ return s;
98
+ }
99
+ export {
100
+ X as O,
101
+ R as i,
102
+ U as r
103
+ };
@@ -0,0 +1 @@
1
+ "use strict";const b=require("./grid-geometry-CZ_cYB6O.cjs"),h=require("./component-tree-DkGLEfZC.cjs"),m=require("./progress-B0ctFpKf.cjs"),D=require("./diagnostic-notification-B9K9We3h.cjs");class S 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 X=new Set(["text","rect","line","ellipse"]),O=new Set(["image","chart","barcode","qrcode"]);function C(e,t){if(!e.grid){if(h.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(O.has(e.kind))return{code:"missing-image",message:`${e.kind} requires imageData or a renderer adapter before output.`};if(!X.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 g(e,t,i,s,n){return{...n,severity:"warning",format:t,pageIndex:i,componentIndex:s,kind:e.kind,nid:e.nid}}function f(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 v(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 L(e){if(e.kind!=="text")return;const t=v(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,n,o){const a=r=>{n.push({...g(e,t,i,s,{code:"unsupported-style",message:r}),componentPath:o})};for(const r of e.richParagraphs??[]){t==="xlsx"&&(r.spaceBeforeMm||r.spaceAfterMm||r.indentMm||r.align||r.lineHeight)&&a("XLSX rich text preserves fonts and paragraph newlines; paragraph spacing, indentation and alignment are not retained.");const u=f({align:r.align},t);u&&a(u);for(const d of r.segments){const c=f(d.style,t)??(t==="xlsx"?v(d.style):void 0);c&&a(c)}}}function E(e,t,i,s,n,o,a){if(a.has(e))return;const r=new Set(a).add(e),u=C(e,t);u&&o.push({...g(e,t,i,s,u),componentPath:n});const d=f(e.style,t);d&&o.push({...g(e,t,i,s,{code:"unsupported-style",message:d}),componentPath:n}),w(e,t,i,s,o,n),N(e,t,i,s,n,o,r)}function q(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=L(e);if(s)return s;if(h.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 G(e){let t;return(i,s,n,o)=>{t??=new Map(b.resolveGridLayout(e.grid,e.widthMm,e.heightMm).cells.map(u=>[`${u.ri}:${u.ci}`,u]));const a=t.get(`${s}:${n}`),r=2*(e.grid?.paddingMm??.5);return q(i,(a?.widthMm??0)-r-(o?.indentMm??0),(a?.heightMm??0)-r)}}function N(e,t,i,s,n,o,a){const r=G(e);for(const[u,d]of(e.grid?.cells??[]).entries())for(const[c,l]of d.entries()){const y=f(l?.style,t);y&&o.push({...g(e,t,i,s,{code:"unsupported-style",message:y}),componentPath:[...n,u,c]}),l?.richParagraphs?.length&&w({...e,richParagraphs:l.richParagraphs},t,i,s,o,[...n,u,c]);for(const[k,p]of(l?.children??[]).entries()){const M=[...n,u,c,k];if(t==="xlsx"){const x=r(p,u,c,l);if(x&&o.push({...g(p,t,i,s,x),componentPath:M}),p.grid)continue}E(p,t,i,s,M,o,a)}}}function $(e,t){h.assertBoundedRenderTree(e);const i=[];return e.pages.forEach((s,n)=>s.components.forEach((o,a)=>E(o,t,n,a,[],i,new Set))),i}function j(e,t,i){m.assertOutputActive(i.signal);const s=$(e,t);if(s.forEach(n=>D.notifyOutputDiagnostic(n,i)),i.fidelity==="strict"&&s.length)throw new S(s);return s}exports.OutputFidelityError=S;exports.inspectOutputCapabilities=$;exports.reportOutputDiagnostics=j;
package/dist/codes.d.cts CHANGED
@@ -110,6 +110,8 @@ export declare function createCodeAssetRenderers(options?: CodeImageOptions): {
110
110
  };
111
111
 
112
112
  declare interface GridCell {
113
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
114
+ richParagraphs?: RichParagraph[];
113
115
  text?: string;
114
116
  rawText?: string;
115
117
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -194,6 +196,8 @@ export declare function renderCodeImage(component: Readonly<PlanComponent>, opti
194
196
 
195
197
  /** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
196
198
  declare interface ReportCellSource {
199
+ /** Source identity across report occurrences; sharing must be explicitly declared. */
200
+ sourceScope?: string;
197
201
  datasetId: string;
198
202
  rowKey: string | number;
199
203
  field: string;
package/dist/codes.d.ts CHANGED
@@ -110,6 +110,8 @@ export declare function createCodeAssetRenderers(options?: CodeImageOptions): {
110
110
  };
111
111
 
112
112
  declare interface GridCell {
113
+ /** Styled cell content; text remains a plain-text fallback. Imported rich cells are read-only. */
114
+ richParagraphs?: RichParagraph[];
113
115
  text?: string;
114
116
  rawText?: string;
115
117
  /** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
@@ -194,6 +196,8 @@ export declare function renderCodeImage(component: Readonly<PlanComponent>, opti
194
196
 
195
197
  /** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
196
198
  declare interface ReportCellSource {
199
+ /** Source identity across report occurrences; sharing must be explicitly declared. */
200
+ sourceScope?: string;
197
201
  datasetId: string;
198
202
  rowKey: string | number;
199
203
  field: string;
@@ -0,0 +1,61 @@
1
+ import { S as A } from "./style-67OqfNed.js";
2
+ const l = A;
3
+ function k(e) {
4
+ return (e.kind === "image" || e.kind === "barcode" || e.kind === "qrcode" || e.kind === "chart") && !!e.imageData;
5
+ }
6
+ function E(e) {
7
+ return e.kind === "text" && Array.isArray(e.richParagraphs) && e.richParagraphs.length > 0;
8
+ }
9
+ function o(e) {
10
+ return !!e && typeof e == "object";
11
+ }
12
+ function d(e, r, s, n, i) {
13
+ if (++i.nodes > 1e6) return { path: r, message: "组件树超过100万个结构节点预算" };
14
+ if (o(e)) {
15
+ if (s > 64) return { path: r, message: "组件嵌套超过64层预算" };
16
+ if (n.has(e)) return { path: r, message: "组件树包含循环引用" };
17
+ if (!(!o(e.grid) || !Array.isArray(e.grid.cells))) {
18
+ n.add(e);
19
+ try {
20
+ for (const [t, f] of e.grid.cells.entries())
21
+ if (Array.isArray(f))
22
+ for (const [u, c] of f.entries()) {
23
+ if (++i.nodes > 1e6) return { path: r, message: "组件树超过100万个结构节点预算" };
24
+ if (!(!o(c) || !Array.isArray(c.children)))
25
+ for (const [g, y] of c.children.entries()) {
26
+ const a = d(y, `${r}.grid.cells.${t}.${u}.children.${g}`, s + 1, n, i);
27
+ if (a) return a;
28
+ }
29
+ }
30
+ } finally {
31
+ n.delete(e);
32
+ }
33
+ }
34
+ }
35
+ }
36
+ function m(e, r = "$.components", s = { nodes: 0 }) {
37
+ for (const [n, i] of e.entries()) {
38
+ const t = d(i, `${r}.${n}`, 0, /* @__PURE__ */ new Set(), s);
39
+ if (t) return t;
40
+ }
41
+ }
42
+ function $(e) {
43
+ const r = { nodes: 0 };
44
+ for (const [s, n] of e.entries()) {
45
+ if (!o(n) || !Array.isArray(n.components)) continue;
46
+ const i = m(n.components, `$.pages.${s}.components`, r);
47
+ if (i) return i;
48
+ }
49
+ }
50
+ function R(e) {
51
+ const r = $(e.pages);
52
+ if (r) throw new TypeError(`${r.path}: ${r.message}`);
53
+ }
54
+ export {
55
+ l as R,
56
+ E as a,
57
+ R as b,
58
+ m as c,
59
+ k as i,
60
+ $ as r
61
+ };
@@ -0,0 +1 @@
1
+ "use strict";const E=require("./style-C22Pbv3T.cjs"),R=E.SCHEMA_VERSION_MACH;function $(e){return(e.kind==="image"||e.kind==="barcode"||e.kind==="qrcode"||e.kind==="chart")&&!!e.imageData}function h(e){return e.kind==="text"&&Array.isArray(e.richParagraphs)&&e.richParagraphs.length>0}function o(e){return!!e&&typeof e=="object"}function a(e,r,s,n,i){if(++i.nodes>1e6)return{path:r,message:"组件树超过100万个结构节点预算"};if(o(e)){if(s>64)return{path:r,message:"组件嵌套超过64层预算"};if(n.has(e))return{path:r,message:"组件树包含循环引用"};if(!(!o(e.grid)||!Array.isArray(e.grid.cells))){n.add(e);try{for(const[t,d]of e.grid.cells.entries())if(Array.isArray(d))for(const[A,c]of d.entries()){if(++i.nodes>1e6)return{path:r,message:"组件树超过100万个结构节点预算"};if(!(!o(c)||!Array.isArray(c.children)))for(const[y,m]of c.children.entries()){const f=a(m,`${r}.grid.cells.${t}.${A}.children.${y}`,s+1,n,i);if(f)return f}}}finally{n.delete(e)}}}}function u(e,r="$.components",s={nodes:0}){for(const[n,i]of e.entries()){const t=a(i,`${r}.${n}`,0,new Set,s);if(t)return t}}function g(e){const r={nodes:0};for(const[s,n]of e.entries()){if(!o(n)||!Array.isArray(n.components))continue;const i=u(n.components,`$.pages.${s}.components`,r);if(i)return i}}function l(e){const r=g(e.pages);if(r)throw new TypeError(`${r.path}: ${r.message}`)}exports.RENDER_PLAN_SCHEMA_VERSION=R;exports.assertBoundedRenderTree=l;exports.componentTreeIssue=u;exports.isImageBackedComponent=$;exports.isRichText=h;exports.renderTreeIssue=g;
@@ -507,9 +507,9 @@ function nr(r, e) {
507
507
  export {
508
508
  m as a,
509
509
  $ as b,
510
- O as c,
511
- nr as d,
512
- T as e,
510
+ T as c,
511
+ O as d,
512
+ nr as e,
513
513
  p as f,
514
514
  E as g,
515
515
  q as h,
@@ -0,0 +1 @@
1
+ "use strict";const a=require("vue"),D=require("@agile-team/mach-report"),_=require("./progress-B0ctFpKf.cjs"),M=require("./_plugin-vue_export-helper-BLmdZLlg.cjs"),T=require("./injection-keys-Db_DyLkm.cjs"),L={printPrepareTimeout:"打印资源准备超时,请检查字体与图片后重试。",printImageFailed:"第 {index} 张图片未能加载,已停止打印,避免输出缺失内容。",printFontFailed:"打印字体 {family} 未能加载,请检查字体资源后重试。",printPrepareFailed:"打印准备失败,请检查打印配置或改用 PDF。",printCalibration:"打印校准",printOffsetX:"水平偏移(mm)",printOffsetY:"垂直偏移(mm)",printCalibrationTest:"打印校准页",printCalibrationHint:"正值向右/向下移动,负值向左/向上。使用同规格纸张及 100% 比例,先试打一张。系统对话框关闭不代表设备已完成。"};function J(e){const n=e?.calibration?.offsetXmm??0,l=e?.calibration?.offsetYmm??0;if(![n,l].every(r=>Number.isFinite(r)&&Math.abs(r)<=20))throw new RangeError("Print calibration must be within ±20 mm");return{x:n,y:l}}function Y(e={}){if(e.fonts&&(!Array.isArray(e.fonts)||e.fonts.length>8))throw new RangeError("At most eight print font faces are allowed");return{...e,...e.fonts?{fonts:e.fonts.map(n=>({...n}))}:{},...e.calibration?{calibration:{...e.calibration}}:{}}}function V(e={}){const n=a.ref(!1),l=a.ref(null),r=a.ref(null),s=a.ref(null);function u(i=!1){n.value=!1,i&&a.nextTick(()=>r.value?.focus())}function m(i){i.target instanceof Node&&!l.value?.contains(i.target)&&u()}function f(i){i.key!=="Escape"||!n.value||i.isComposing||(i.preventDefault(),i.stopPropagation(),u(!0))}return a.watch(n,i=>{!i||e.focusOnOpen===!1||a.nextTick(()=>(s.value?.querySelector("input")??s.value?.querySelector("button:not(:disabled)"))?.focus())}),a.onMounted(()=>{document.addEventListener("pointerdown",m),document.addEventListener("focusin",m)}),a.onBeforeUnmount(()=>{document.removeEventListener("pointerdown",m),document.removeEventListener("focusin",m)}),{opened:n,root:l,trigger:r,panel:s,close:u,onKeydown:f}}class O extends Error{constructor(n,l,r){super(l),this.name="MachReportError",this.code=n,this.cause=r}}function X(e){return e instanceof O?{code:e.code,cause:e.cause}:{code:"render",cause:e}}function Q(e){if(e instanceof O)return e;if(e instanceof D.ReportParamValidationError)return new O("param",e.message,e);if(e instanceof D.ReportSourceError)return new O(e.code,e.message,e.cause);if(e instanceof Error){const n={params:"param",config:"config",validate:"validate",fetch:"fetch"},l=e.code;if(typeof l=="string"&&Object.prototype.hasOwnProperty.call(n,l))return new O(n[l],e.message,e)}return new O("fetch",e instanceof Error?e.message:"预览加载失败",e)}let Z=0;function ee(){return`mrp-params-${++Z}`}function $(e,n,l){const r=(Array.isArray(n)?n.find(s=>s?.field===e.field)?.label:void 0)??e.field;return e.code==="required"?l.paramRequired.replace("{label}",r):(l.paramInvalid??"{label}:{message}").replace("{label}",r).replace("{message}",e.message)}function ae(e){const n=a.ref({}),l=a.ref(!1);function r(){const f={};for(const i of Array.isArray(e.defs.value)?e.defs.value:[])typeof i?.field=="string"&&Object.defineProperty(f,i.field,{value:e.params()[i.field]??i.defaultValue??"",writable:!0,enumerable:!0,configurable:!0});n.value=f,l.value=!1}r(),a.watch(e.defs,r),a.watch(e.reportIds,r),a.watch(()=>JSON.stringify(e.params()),r);const s=a.computed(()=>D.validateReportParams(e.defs.value,{...e.params(),...n.value})),u=a.computed(()=>!l.value&&s.value.issues.length>0&&s.value.issues.every(f=>f.code==="required"));function m(){const f=s.value;if(!f.ok){const p=f.issues[0];return{quiet:u.value,error:new O(p.code==="definition"?"config":"param",$(p,e.defs.value,e.messages()),{issues:f.issues})}}const i={...f.values},w=new Set(e.defs.value.filter(p=>p.defaultValue!==void 0).map(p=>p.field));for(const[p,b]of Object.entries(i))b===""&&!w.has(p)&&delete i[p];return{params:i,quiet:!1}}return{values:n,attempted:l,validation:s,pendingRequired:u,reset:r,query:m}}const I={paramOptionsLoading:"正在搜索选项…",paramOptionsEmpty:"没有匹配选项",paramOptionsFailed:"选项加载失败,请重试",paramOptionsMissingLoader:"尚未配置选项加载服务",paramOptionsDependencies:"请先选择上级条件",paramOptionsClear:"清除选择"},U=100,te=32,ne=6e4,re=15e3;function le(e){if(!Array.isArray(e)||e.length>U)throw new Error("Invalid option response");const n=new Set;return Object.freeze(e.map(l=>{if(!l||typeof l.value!="string"||!l.value||l.value.length>1024||typeof l.label!="string"||l.label.length>1024||n.has(l.value))throw new Error("Invalid option response");return n.add(l.value),Object.freeze({label:l.label,value:l.value})}))}function oe(e){const n=a.ref(""),l=a.shallowRef([]),r=a.ref(!1),s=a.ref(!1),u=a.computed(()=>Object.fromEntries((Array.isArray(e.def().dependsOn)?e.def().dependsOn:[]).map(y=>[y,e.values()[y]??""]))),m=a.computed(()=>Object.values(u.value).some(y=>!y.trim())),f=a.computed(()=>!e.loader()),i=new Map;let w,p,b=0;function P(){b++,w?.abort(),w=void 0,clearTimeout(p),r.value=!1}async function v(){P(),s.value=!1;const y=e.loader(),h=e.def();if(!y||!h.optionsSource||m.value||e.disabled()||!e.opened())return;const x={source:h.optionsSource,field:h.field,query:n.value.trim().slice(0,256),params:Object.freeze({...u.value}),limit:U},o=JSON.stringify(x),d=i.get(o);if(d&&Date.now()-d.at<ne){i.delete(o),i.set(o,d),l.value=d.options;return}const t=b,c=new AbortController;w=c,r.value=!0;const E=setTimeout(()=>c.abort(),re);try{const k=le(await _.waitForOutput(y(Object.freeze({...x,signal:c.signal})),c.signal));if(t!==b)return;for(l.value=k,i.delete(o),i.set(o,{at:Date.now(),options:k});i.size>te;)i.delete(i.keys().next().value)}catch{t===b&&(s.value=!0)}finally{clearTimeout(E),t===b&&(r.value=!1,w=void 0)}}function S(){P(),l.value=[],s.value=!1,p=setTimeout(()=>{v()},180)}return a.watch(n,S,{flush:"sync"}),a.watch([()=>e.def().field,()=>e.def().optionsSource,()=>JSON.stringify(u.value),e.loader],()=>{i.clear(),n.value="",P(),l.value=[],s.value=!1,e.opened()&&v()},{flush:"sync"}),a.watch([e.opened,e.disabled],()=>{!e.opened()||e.disabled()?P():v()}),a.onBeforeUnmount(()=>{P(),i.clear()}),{query:n,options:l,loading:r,failed:s,waiting:m,missingLoader:f,request:v,cancel:P}}const ie=["id","value","aria-labelledby","aria-invalid","aria-required","aria-describedby","aria-expanded","aria-controls","aria-activedescendant","disabled","placeholder"],se=["aria-label","disabled"],ce=["aria-label","disabled"],de=["id"],ue=["id","aria-label","aria-busy"],fe=["id","aria-selected","disabled","onPointermove","onClick"],pe={key:0},me={key:0,role:"status"},ve=a.defineComponent({__name:"ReportRemoteParamSelect",props:{def:{},value:{},values:{},loadOptions:{type:Function},messages:{},disabled:{type:Boolean},id:{},invalid:{type:Boolean}},emits:["change"],setup(e,{emit:n}){const l=e,r=n,s=V({focusOnOpen:!1}),{root:u,panel:m,opened:f}=s,i=oe({def:()=>l.def,values:()=>l.values,loader:()=>l.loadOptions,opened:()=>f.value,disabled:()=>l.disabled===!0}),{query:w,options:p,loading:b,failed:P,waiting:v,missingLoader:S}=i,y=a.computed(()=>({...I,...l.messages})),h=a.ref(0),x=a.ref(""),o=a.ref(),d=a.computed(()=>`${l.id}-options`),t=a.computed(()=>v.value?y.value.paramOptionsDependencies:S.value?y.value.paramOptionsMissingLoader:P.value?y.value.paramOptionsFailed:b.value?y.value.paramOptionsLoading:p.value.length?"":y.value.paramOptionsEmpty);a.watch(()=>l.value,()=>{x.value=""}),a.watch(p,()=>{h.value=0}),a.watch(f,g=>{g&&a.nextTick(()=>o.value?.focus())});function c(g){l.disabled||v.value||b.value||P.value||(r("change",g.value),s.close(),a.nextTick(()=>{x.value=g.label,o.value?.focus()}))}function E(g){g.isComposing||(f.value=!0,w.value=g.target.value)}function k(){!l.disabled&&!v.value&&!S.value&&(w.value="",f.value=!0)}function z(g){if(!(g.isComposing||g.keyCode===229)){if(g.key==="Escape"){f.value&&(g.preventDefault(),g.stopPropagation(),s.close());return}if(["ArrowUp","ArrowDown","Enter"].includes(g.key)){if(g.preventDefault(),g.stopPropagation(),!f.value){k();return}if(g.key==="Enter"){const B=p.value[h.value];B&&c(B);return}p.value.length&&(h.value=(h.value+(g.key==="ArrowDown"?1:-1)+p.value.length)%p.value.length,a.nextTick(()=>m.value?.querySelector(`[id="${d.value}-${h.value}"]`)?.scrollIntoView?.({block:"nearest"})))}}}function K(){l.disabled||(r("change",""),x.value="",s.close())}return(g,B)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"root",ref:u,class:"mrp-remote-param"},[a.createElementVNode("div",{class:a.normalizeClass(["mrp-remote-control",{"is-invalid":e.invalid}])},[a.createVNode(M._sfc_main,{name:"search",size:14}),a.createElementVNode("input",{id:e.id,ref_key:"input",ref:o,type:"text",role:"combobox",autocomplete:"off",value:a.unref(f)?a.unref(w):x.value||e.value,maxlength:256,"aria-labelledby":`${e.id}-label`,"aria-invalid":e.invalid||void 0,"aria-required":e.def.required||void 0,"aria-describedby":e.invalid?`${e.id}-error`:a.unref(v)||a.unref(S)?`${e.id}-remote-status`:void 0,"aria-autocomplete":"list","aria-expanded":a.unref(f),"aria-controls":a.unref(f)?d.value:void 0,"aria-activedescendant":a.unref(f)&&a.unref(p).length?`${d.value}-${h.value}`:void 0,disabled:e.disabled||a.unref(v)||a.unref(S),placeholder:e.def.placeholder??(e.messages.paramSelectPlaceholder??"请选择{label}").replace("{label}",e.def.label??e.def.field),onClick:k,onInput:E,onCompositionend:E,onKeydown:z},null,40,ie),e.value?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button","aria-label":y.value.paramOptionsClear,disabled:e.disabled,onClick:K},[a.createVNode(M._sfc_main,{name:"close",size:12})],8,se)):(a.openBlock(),a.createElementBlock("button",{key:1,type:"button","aria-label":e.def.label??e.def.field,disabled:e.disabled||a.unref(v)||a.unref(S),onClick:B[0]||(B[0]=C=>a.unref(f)?a.unref(s).close():k())},[a.createVNode(M._sfc_main,{name:"chevron-down",size:12})],8,ce))],2),a.unref(v)||a.unref(S)?(a.openBlock(),a.createElementBlock("small",{key:0,id:`${e.id}-remote-status`,role:"status"},a.toDisplayString(t.value),9,de)):a.createCommentVNode("",!0),a.unref(f)?(a.openBlock(),a.createElementBlock("div",{key:1,ref_key:"panel",ref:m,class:"mrp-remote-options"},[a.createElementVNode("div",{id:d.value,role:"listbox","aria-label":e.def.label??e.def.field,"aria-busy":a.unref(b)},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(p),(C,F)=>(a.openBlock(),a.createElementBlock("button",{id:`${d.value}-${F}`,key:C.value,type:"button",role:"option",tabindex:"-1","aria-selected":e.value===C.value,class:a.normalizeClass({active:F===h.value}),disabled:a.unref(b),onPointermove:W=>h.value=F,onMousedown:B[1]||(B[1]=a.withModifiers(()=>{},["prevent"])),onClick:W=>c(C)},[a.createElementVNode("span",null,a.toDisplayString(C.label),1),C.label!==C.value?(a.openBlock(),a.createElementBlock("small",pe,a.toDisplayString(C.value),1)):a.createCommentVNode("",!0)],42,fe))),128))],8,ue),t.value?(a.openBlock(),a.createElementBlock("p",me,[a.createTextVNode(a.toDisplayString(t.value),1),a.unref(P)?(a.openBlock(),a.createElementBlock("button",{key:0,type:"button",onClick:B[2]||(B[2]=(...C)=>a.unref(i).request&&a.unref(i).request(...C))},a.toDisplayString(e.messages.retry),1)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],512)):a.createCommentVNode("",!0)],512))}}),ge=M._export_sfc(ve,[["__scopeId","data-v-5dbac6ad"]]),be={key:0,class:"mrp-params-title"},ye={class:"mrp-params-grid"},he=["id"],Ee={key:0,class:"mrp-param-star","aria-hidden":"true"},ke=["value","disabled","aria-labelledby","aria-invalid","aria-describedby","aria-required","onChange"],we=["disabled","hidden"],Pe=["value"],Se=["aria-labelledby"],Ce=["value","disabled","min","max","aria-label","aria-invalid","aria-describedby","aria-required","onInput"],xe=["type","inputmode","maxlength","placeholder","value","disabled","min","max","step","aria-labelledby","aria-invalid","aria-describedby","aria-required","onInput"],Be=["id"],Ae={key:1,class:"mrp-params-actions"},Oe=["disabled"],Me=["disabled"],Re=a.defineComponent({__name:"ReportParamPanel",props:{defs:{},modelValue:{},messages:{},attempted:{type:Boolean},issues:{default:void 0},showActions:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},loadOptions:{type:Function,default:void 0}},emits:["update:modelValue","query","reset"],setup(e,{expose:n,emit:l}){const r=e,s=l,u=a.ref({...r.modelValue}),m=a.ref(null),f=ee();a.watch(()=>r.modelValue,o=>{u.value={...o}});const i=a.computed(()=>r.issues??D.validateReportParams(r.defs,u.value).issues),w=a.computed(()=>(Array.isArray(r.defs)?r.defs:[]).filter(o=>o&&typeof o.field=="string").map((o,d)=>({def:o,id:`${f}-${d}`,label:o.label??o.field,value:u.value[o.field]??"",error:r.attempted?i.value.find(t=>t.field===o.field):void 0}))),p=a.computed(()=>{const o=new Map;for(const d of r.defs)for(const t of Array.isArray(d.dependsOn)?d.dependsOn:[]){const c=o.get(t)??[];c.push(d.field),o.set(t,c)}return o});function b(o,d){if(r.disabled||u.value[o]===d)return;u.value={...u.value,[o]:d};const t=new Set([o]),c=[o];for(let E=0;E<c.length;E++)for(const k of p.value.get(c[E])??[])t.has(k)||(u.value[k]="",t.add(k),c.push(k));s("update:modelValue",{...u.value})}function P(o){return o.type==="number"?"number":o.type==="date"||o.type==="month"?o.type:"text"}function v(o,d){return o.split("/")[d]??""}function S(o,d,t){return t?!!v(o,0)!=!!v(o,1)?!v(o,d)||void 0:!0:void 0}function y(o,d,t){const c=[v(u.value[o]??"",0),v(u.value[o]??"",1)];c[d]=t,b(o,c.every(E=>!E)?"":c.join("/"))}function h(o){o.isComposing||s("query")}function x(){m.value?.querySelector('[aria-invalid="true"]')?.focus()}return n({focusInvalid:x}),(o,d)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"root",ref:m,class:"mrp-params"},[e.showTitle!==!1?(a.openBlock(),a.createElementBlock("span",be,a.toDisplayString(e.messages.paramsTitle),1)):a.createCommentVNode("",!0),a.createElementVNode("div",ye,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(w.value,t=>(a.openBlock(),a.createElementBlock("label",{key:t.id,class:a.normalizeClass(["mrp-param",{"mrp-param-missing":!!t.error}])},[a.createElementVNode("span",{id:`${t.id}-label`,class:"mrp-param-label"},[a.createTextVNode(a.toDisplayString(t.label),1),t.def.required?(a.openBlock(),a.createElementBlock("i",Ee,"*")):a.createCommentVNode("",!0)],8,he),t.def.optionsSource?(a.openBlock(),a.createBlock(ge,{key:0,id:t.id,def:t.def,value:t.value,values:u.value,"load-options":e.loadOptions,messages:e.messages,disabled:e.disabled,invalid:!!t.error,onChange:c=>b(t.def.field,c)},null,8,["id","def","value","values","load-options","messages","disabled","invalid","onChange"])):(t.def.type??"text")==="select"?(a.openBlock(),a.createElementBlock("select",{key:1,class:"mrp-param-input",value:t.value,disabled:e.disabled,"aria-labelledby":`${t.id}-label`,"aria-invalid":t.error?!0:void 0,"aria-describedby":t.error?`${t.id}-error`:void 0,"aria-required":t.def.required||void 0,onChange:c=>b(t.def.field,c.target.value),onKeydown:a.withKeys(h,["enter"])},[a.createElementVNode("option",{value:"",disabled:t.def.required,hidden:t.def.required},a.toDisplayString(t.def.placeholder??(e.messages.paramSelectPlaceholder??"请选择{label}").replace("{label}",t.label)),9,we),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.def.options??[],c=>(a.openBlock(),a.createElementBlock("option",{key:c.value,value:c.value},a.toDisplayString(c.label),9,Pe))),128))],40,ke)):t.def.type==="dateRange"?(a.openBlock(),a.createElementBlock("div",{key:2,class:"mrp-param-range",role:"group","aria-labelledby":`${t.id}-label`},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList([e.messages.paramRangeStart??"开始日期",e.messages.paramRangeEnd??"结束日期"],(c,E)=>(a.openBlock(),a.createElementBlock("input",{key:E,class:"mrp-param-input",type:"date",value:v(t.value,E),disabled:e.disabled,min:t.def.min,max:t.def.max,"aria-label":`${t.label} · ${c}`,"aria-invalid":S(t.value,E,t.error),"aria-describedby":t.error?`${t.id}-error`:void 0,"aria-required":t.def.required||void 0,onInput:k=>y(t.def.field,E,k.target.value),onKeydown:a.withKeys(h,["enter"])},null,40,Ce))),128))],8,Se)):(a.openBlock(),a.createElementBlock("input",{key:3,class:"mrp-param-input",type:P(t.def),inputmode:t.def.type==="year"?"numeric":void 0,maxlength:t.def.type==="year"?4:void 0,placeholder:t.def.placeholder??(e.messages.paramTextPlaceholder??"请输入{label}").replace("{label}",t.label),value:t.value,disabled:e.disabled,min:t.def.min,max:t.def.max,step:t.def.type==="number"?"any":void 0,"aria-labelledby":`${t.id}-label`,"aria-invalid":t.error?!0:void 0,"aria-describedby":t.error?`${t.id}-error`:void 0,"aria-required":t.def.required||void 0,onInput:c=>b(t.def.field,c.target.value),onKeydown:a.withKeys(h,["enter"])},null,40,xe)),t.error?(a.openBlock(),a.createElementBlock("small",{key:4,id:`${t.id}-error`,class:"mrp-param-error",role:"status"},a.toDisplayString(a.unref($)(t.error,e.defs,e.messages)),9,Be)):a.createCommentVNode("",!0)],2))),128))]),e.showActions!==!1?(a.openBlock(),a.createElementBlock("div",Ae,[a.createElementVNode("button",{class:"mrp-nav mrp-param-query",type:"button",disabled:e.disabled,onClick:d[0]||(d[0]=t=>o.$emit("query"))},a.toDisplayString(e.messages.query),9,Oe),a.createElementVNode("button",{class:"mrp-nav",type:"button",disabled:e.disabled,onClick:d[1]||(d[1]=t=>o.$emit("reset"))},a.toDisplayString(e.messages.reset),9,Me)])):a.createCommentVNode("",!0)],512))}}),De=M._export_sfc(Re,[["__scopeId","data-v-5fa48e40"]]),N={calculationTitle:"选区计算",calculationLocal:"仅本地分析,不写回实绩、不重算原公式。请选取同一单位与量纲的数值。",calculationHint:"点击起点,Shift + 点击终点或方向键扩选。",calculationFormula:"计算方式",calculationExpression:"组合公式",calculationExpressionHint:"支持 SUM、AVERAGE/AVG、MIN、MAX、COUNT、MEDIAN 及 + - * / 和括号,不执行 Excel 公式;采用浮点数,精度仅用于展示。",calculationPrecision:"展示小数位",calculationRun:"计算选区",calculationCancel:"取消计算",calculationResult:"计算结果",calculationIncluded:"参与数值",calculationExcluded:"排除单元格",calculationEmpty:"选区没有可计算数值,计数为 0,其余结果为空。",calculationNoSelection:"先关闭设置并选择数据,再从底部工具栏打开选区计算。",calculationSum:"求和 SUM",calculationAverage:"平均值 AVERAGE",calculationMin:"最小值 MIN",calculationMax:"最大值 MAX",calculationCount:"数值计数 COUNT",calculationMedian:"中位数 MEDIAN",calculationCustom:"组合公式",calculationErrorSelection:"请选择同一明细区域中的数据。",calculationErrorLimit:"选区超过计算预算,请缩小范围后重试。",calculationErrorExpression:"公式无效,请使用支持的摘要名称、运算符与括号。",calculationErrorDivision:"除数不能为 0。",calculationErrorOverflow:"结果超出有效数值范围。",calculationErrorPrecision:"数值超出安全精度,或展示小数位不是 0 至 12 的整数。"};function Fe(e){const n={...N};for(const l of Object.keys(n)){const r=e[l];typeof r=="string"&&(n[l]=r)}return n}const H={...I,drillActions:"查看关联",drillOpening:"正在打开…",drillMissingValue:"当前单元格缺少关联参数",drillFailed:"关联内容打开失败,请重试",...L,...N,exportMenu:"导出",exportMenuDescription:"选择文件格式",clearSearch:"清除搜索",searchHint:"Enter 下一个 · Shift+Enter 上一个",searchNoMatches:"没有匹配内容",pageJump:"跳至页",pageJumpInvalid:"请输入有效页码",pageJumpHint:"Enter 跳转",pagination:"报表分页",recordNavigation:"标签记录",recordInfo:"记录 {cur} / {total}",prevRecord:"上一条记录",nextRecord:"下一条记录",dataExplanation:"来源数据说明",dataExplanationHint:"按字段查看来源与计算说明",dataExplanationSearch:"搜索说明、字段或记录",dataExplanationEmpty:"没有匹配的数据说明",dataMissingSource:"暂无来源",dataNotApplicable:"业务不适用",dataNotCalculable:"无法计算",columnSearchHint:"输入列名或字段标识",columnSearchShortcut:"↑ ↓ 选择 · Enter 定位",closeColumnDirectory:"关闭字段目录",columnResultsMore:"{count} 个匹配字段,显示前 {limit} 个;继续输入可缩小范围",columnCount:"{count} 个字段",settingsGeneral:"常规",settingsTools:"工具",settingsAdvanced:"高级",settingsAdvancedDescription:"按需开启分析能力,保持日常阅读简洁。",settingsCalculations:"启用选区计算",settingsCalculationsDescription:"选取数值后计算求和、平均值或组合公式,仅用于本地分析。",title:"报表预览",prevPage:"‹ 上一页",nextPage:"下一页 ›",pageInfo:"{cur} / {total}",fitWidth:"适宽",exportHtml:"导出 HTML",exportPdf:"导出 PDF",exportExcel:"导出 Excel",exportImage:"导出图片",exportWord:"导出 Word",exporting:"正在生成 {format}…",print:"打印",pdfWindow:"PDF 窗口",loading:"报表渲染中…",empty:"暂无预览数据",errorPrefix:"",retry:"重试",pdfFontUnavailable:"PDF 字体尚未就绪,请联系管理员检查字体配置;预览及其它导出仍可使用。",searchPlaceholder:"搜索报表内容",matchInfo:"{cur}/{total}",prevMatch:"‹",nextMatch:"›",thumbnails:"缩略图",paramsTitle:"查询条件",query:"查 询",reset:"重 置",paramRequired:"请填写{label}",paramInvalid:"{label}:{message}",paramPrompt:"请先完善查询条件",paramPromptDescription:"填写必填条件后点击查询,即可生成报表。",paramSelectPlaceholder:"请选择{label}",paramTextPlaceholder:"请输入{label}",paramRangeStart:"开始日期",paramRangeEnd:"结束日期",searching:"搜索中…",importExcel:"导入 Excel 模板",importing:"正在导入 Excel…",editCell:"编辑单元格",editingHint:"双击单元格编辑 · Enter 确认 · Esc 取消",saving:"正在保存修改…",editInvalidNumber:"请输入有效数字;清空表示无值",editInvalidBoolean:"请输入 true / false、是 / 否或 1 / 0",editConflict:"该单元格已变化,请重新打开编辑",settings:"设置",settingsDisplay:"阅读工具",settingsExport:"导出与打印",settingsData:"数据操作",settingsUnavailable:"需由接入方配置启用",settingsReset:"恢复默认",settingsClose:"关闭设置",search:"内容搜索",closeSearch:"关闭搜索",prevSearchMatch:"上一个匹配",nextSearchMatch:"下一个匹配",zoom:"缩放工具",settingsLocal:"按需启用工具,仅作用于当前预览。",editingLocal:"修改为本地草稿;不会自动写入业务数据库。",editingSaved:"修改将通过接入方配置的保存回调提交。",importLocal:"导入仅生成本地预览,不自动替换业务数据。",emptyDescription:"当前查询没有明细,请调整查询条件后重试。",undo:"撤销",redo:"重做",restoreChanges:"恢复来源值",changes:"修改明细",changesCount:"{count} 处修改",changesEmpty:"尚无修改",changesBefore:"来源值",changesAfter:"当前值",editAtomicRequired:"批量保存需要接入方提供原子 saveBatch 回调;本次未写入任何单元格。",clipboardLimit:"单次最多粘贴 10000 个单元格,请分批处理。",preferencesError:"偏好存储不可用,设置仍在当前预览中生效。",freezeHeaders:"冻结表头",frozenColumns:"冻结前列",sections:"工作表与章节",locateField:"定位字段",locateFieldPlaceholder:"输入字段标识,Enter 定位",locateFieldMissing:"未找到该字段,请核对字段标识。",importSummary:"Excel 导入摘要",importPreserved:"已导入 {sheets} 个工作表,保留内容、合并和样式。",importWarnings:"兼容性提示",importReadOnly:"公式、日期及受保护单元格保持只读;公式不重算。",conflicts:"保存冲突",editReadOnly:"选区包含只读或无权限单元格,本次修改未应用。",editMissing:"选区超出报表范围或缺少业务来源,请重新选择。",editRecalculationUnavailable:"此报表缺少重算会话或稳定数据来源,暂不支持编辑;请使用 reports/本地数据源重新加载。",editDuplicate:"选区包含同一业务字段的重复单元格,请缩小选区。",clipboardInvalid:"剪贴板内容无法识别,请使用矩形表格文本重新粘贴。",editSaved:"修改已通过保存回调确认",settingsPanes:"冻结窗格",columnDirectory:"字段目录",columnSearch:"搜索列名或字段",columnNoMatches:"未找到匹配字段",columnResults:"匹配字段",columnGroup:"明细区域",discardTitle:"保留当前修改?",discardDescription:"当前报表有尚未保存的输入或本地草稿,继续操作将替换这些内容。",discardKeep:"继续编辑",discardProceed:"放弃修改并继续",taskQuery:"正在获取数据…",taskValidate:"正在校验数据…",taskLayout:"正在生成版式…",taskAssets:"正在准备图片和字体…",taskEncode:"正在生成文件…",taskDownload:"正在准备下载…",taskPrint:"正在准备打印…",taskCancel:"取消任务",taskCancelled:"任务已取消,可重新操作。",diagnosticsSearch:"搜索提示、错误码或位置",diagnosticsMore:"共 {count} 条匹配,当前展示前 100 条;请搜索缩小范围。",diagnosticsTitle:"输出兼容性提示",diagnosticsLocate:"定位",diagnosticsLocation:"第 {page} 页 · 组件 {component}",diagnosticsStrict:"当前格式存在已知内容降级,请查看兼容性提示或选择其他输出格式。",diagnosticsDetails:"查看技术详情",diagnosticMissingImage:"图片或图表资源尚未准备完成,请重试或联系管理员。",diagnosticUnsupported:"当前输出格式会省略此内容,建议选择 PDF 或图片格式。",diagnosticUnsupportedStyle:"当前格式无法保留部分样式,请查看位置并选择适合的输出格式。",diagnosticImageFormat:"当前图片格式无法直接导出,请转换资源后重试。",diagnosticRichText:"文字内容会保留,部分字体与段落样式将简化。",diagnosticNested:"单元格中的嵌套内容会省略,单元格文字会保留。",diagnosticImageAsync:"图片需要完成加载后才能输出。",diagnosticImageDecode:"图片加载失败,请检查资源后重试。",diagnosticAssetFailed:"图表或图片生成失败,请重试或联系管理员。",diagnosticAssetBudget:"图片资源超出处理范围,请减少资源或缩小报表范围。"},G={emptyAccent:"#79a7e8",shellBg:"#f4f7fc",shellFg:"#334155",toolbarBg:"#ffffff",toolbarBorder:"#e4eaf3",toolbarFg:"#334155",btnFg:"#526078",btnBorder:"#dbe3ef",btnHoverBg:"#edf3ff",btnHoverFg:"#315fba",btnActiveBg:"#3569d4"};function j(e={}){return{...e,defaults:e.defaults??{},presets:e.presets??{}}}function Te(e){return e}const A={showExport:!0,showPrint:!0,showPdfWindow:!0,showSettings:!0,showParams:!0,gapPx:18,pdfFontUrl:"/simhei.ttf",logger:console},Ie={warn:()=>{},info:()=>{}};function Ne(e,n){if(!(!e&&!n))return{...e,...n,calibration:{...e?.calibration,...n?.calibration}}}function R(e,n){return{...e,...n,theme:{...e?.theme,...n?.theme},messages:{...e?.messages,...n?.messages},preview:{...e?.preview,...n?.preview},xlsx:{...e?.xlsx,...n?.xlsx},toolbar:{...e?.toolbar,...n?.toolbar},interaction:{...e?.interaction,...n?.interaction},output:{...e?.output,...n?.output},printOptions:Ne(e?.printOptions,n?.printOptions)}}function qe(e){return{showExport:e.showExport??A.showExport,showPrint:e.showPrint??A.showPrint,showPdfWindow:e.showPdfWindow??A.showPdfWindow,showSettings:e.showSettings??A.showSettings,showParams:e.showParams??A.showParams,gapPx:e.gapPx??A.gapPx}}function Le(e,n){const l=n?e?.presets?.[n]:e?.defaultPreset?e?.presets?.[e.defaultPreset]:void 0,r=R(e?.defaults,l);return{drill:r.drill,exportExecution:r.exportExecution,loadParamOptions:r.loadParamOptions,...qe(r),pdfFontUrl:r.pdfFontUrl??A.pdfFontUrl,theme:{...G,...r.theme},messages:{...H,...r.messages},logger:r.logger??A.logger,preview:{overscanPages:q(r.preview?.overscanPages,1,10,!0),searchDebounceMs:q(r.preview?.searchDebounceMs,200,2e3)},xlsx:{...r.xlsx},editable:r.editable??!1,excelImport:r.excelImport??!1,toolbar:{...r.toolbar},interaction:{...r.interaction},preferences:r.preferences,assets:r.assets,guardChanges:r.guardChanges??!0,beforeDiscard:r.beforeDiscard,output:{...r.output},printOptions:r.printOptions}}function q(e,n,l,r=!1){if(e==null||!Number.isFinite(e))return n;const s=Math.max(0,Math.min(l,e));return r?Math.floor(s):s}function Ve(e){const n={};return e.emptyAccent!=null&&(n["--mrp-empty-accent"]=e.emptyAccent),e.shellBg!=null&&(n["--mrp-shell-bg"]=e.shellBg),e.shellFg!=null&&(n["--mrp-shell-fg"]=e.shellFg),e.toolbarBg!=null&&(n["--mrp-toolbar-bg"]=e.toolbarBg),e.toolbarBorder!=null&&(n["--mrp-toolbar-border"]=e.toolbarBorder),e.toolbarFg!=null&&(n["--mrp-toolbar-fg"]=e.toolbarFg),e.btnFg!=null&&(n["--mrp-btn-fg"]=e.btnFg),e.btnBorder!=null&&(n["--mrp-btn-border"]=e.btnBorder),e.btnHoverBg!=null&&(n["--mrp-btn-hover-bg"]=e.btnHoverBg),e.btnHoverFg!=null&&(n["--mrp-btn-hover-fg"]=e.btnHoverFg),e.btnActiveBg!=null&&(n["--mrp-btn-active-bg"]=e.btnActiveBg),n}function $e(e){const n=a.inject(T.MACH_REPORT_CONFIG_KEY,null),l=a.computed(()=>{const r=n?.value??null,s="defaults"in e||"presets"in e||"defaultPreset"in e?j(e):{defaults:e,presets:{}};if(!r)return s;const u={...r.presets,...s.presets};for(const m of Object.keys(u))u[m]=R(R(r.presets[m],s.defaults),s.presets[m]);return{defaults:R(r.defaults,s.defaults),presets:u,defaultPreset:s.defaultPreset??r.defaultPreset}});a.provide(T.MACH_REPORT_CONFIG_KEY,l)}function Ue(){return a.inject(T.MACH_REPORT_CONFIG_KEY,a.computed(()=>null))}exports.DEFAULT_CALCULATION_MESSAGES=N;exports.DEFAULT_MESSAGES=H;exports.DEFAULT_PRINT_MESSAGES=L;exports.DEFAULT_THEME=G;exports.MachReportError=O;exports.PARAM_OPTIONS_MESSAGES=I;exports.ReportParamPanel=De;exports.SILENT_LOGGER=Ie;exports.defineMachReportConfig=j;exports.defineMachReportPreset=Te;exports.normalizeReportLoadError=Q;exports.printCalibration=J;exports.provideMachReportConfig=$e;exports.resolveCalculationMessages=Fe;exports.resolveConfig=Le;exports.snapshotPrintOptions=Y;exports.themeToCssVars=Ve;exports.toErrorDetail=X;exports.useMachReportConfig=Ue;exports.usePopover=V;exports.useReportParams=ae;