@agile-team/mach-report 2.22.0 → 2.23.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 (154) hide show
  1. package/README.md +7 -6
  2. package/dist/{ExcelBindingWizard-CZyppD7I.js → ExcelBindingWizard-D4FLind-.js} +3 -3
  3. package/dist/{ExcelBindingWizard-CW79I6Gl.cjs → ExcelBindingWizard-D4RS5Bpg.cjs} +1 -1
  4. package/dist/{ParamEditor-CiYCJI0b.cjs → ParamEditor-C-6C9rd2.cjs} +1 -1
  5. package/dist/{ParamEditor-DQit-Gdf.js → ParamEditor-CASZt-Ma.js} +2 -2
  6. package/dist/{ReportBatchPanel-DKTpV7MU.js → ReportBatchPanel-Bq7t8a5r.js} +2 -2
  7. package/dist/{ReportBatchPanel-Db6TAfG5.cjs → ReportBatchPanel-YVj5IO5y.cjs} +1 -1
  8. package/dist/ReportLabelStudio-Cqhita1b.cjs +1 -0
  9. package/dist/{ReportLabelStudio-BYnRqmje.js → ReportLabelStudio-Dj7GXhuv.js} +295 -292
  10. package/dist/ReportParamPanel-DZbFVmDL.cjs +1 -0
  11. package/dist/{ReportParamPanel-BHSKVL8k.js → ReportParamPanel-Dgmqro1Y.js} +93 -79
  12. package/dist/ReportPreview-DeWzG8jQ.js +6257 -0
  13. package/dist/ReportPreview-FFIryrIr.cjs +6 -0
  14. package/dist/{ReportTemplateLibrary-DEXH07ND.cjs → ReportTemplateLibrary-BaWodmpm.cjs} +1 -1
  15. package/dist/{ReportTemplateLibrary-BZuKn0YK.js → ReportTemplateLibrary-DdAAAD2I.js} +1 -1
  16. package/dist/{RuleEditor-CIQn547x.js → RuleEditor-D2UwQGF6.js} +59 -59
  17. package/dist/{RuleEditor-zSUmPjKa.cjs → RuleEditor-DcT9xI1v.cjs} +1 -1
  18. package/dist/TemplateOutlinePanel-CUHFFiNM.cjs +1 -0
  19. package/dist/{TemplateOutlinePanel-D0PgOSQE.js → TemplateOutlinePanel-DrT7XN0m.js} +2 -2
  20. package/dist/{TemplateReusePanel-BKlAEF8-.js → TemplateReusePanel-4eejkNqi.js} +2 -2
  21. package/dist/{TemplateReusePanel-DAy_Hwqz.cjs → TemplateReusePanel-DZMyiX5I.cjs} +1 -1
  22. package/dist/{TemplateReviewPanel-div-EH_m.js → TemplateReviewPanel-BIhNLeNw.js} +2 -2
  23. package/dist/{TemplateReviewPanel-CowmHaQQ.cjs → TemplateReviewPanel-DnYImiXu.cjs} +1 -1
  24. package/dist/analytics.cjs +1 -1
  25. package/dist/analytics.js +26 -26
  26. package/dist/artifact-integrity.json +106 -104
  27. package/dist/assets-D2gHc4Mz.cjs +1 -0
  28. package/dist/assets-T_gDeFaz.js +132 -0
  29. package/dist/auto-4pK9HePf.cjs +1 -0
  30. package/dist/auto-CTIJ6PnR.js +257 -0
  31. package/dist/capabilities-DiBj4Qgl.cjs +1 -0
  32. package/dist/capabilities-pg7j7VLT.js +106 -0
  33. package/dist/charts-Cjw5AYkg.cjs +1 -0
  34. package/dist/{charts-Dlv8j2AG.js → charts-CxJZ0XaY.js} +1 -1
  35. package/dist/computed-DK6BruFz.cjs +1 -0
  36. package/dist/{computed-C8NRZQss.js → computed-f3pOqWLX.js} +381 -301
  37. package/dist/data-bar-CeZuFmYl.cjs +1 -0
  38. package/dist/{data-bar-8baGYEZ9.js → data-bar-IkI6VvMQ.js} +1 -1
  39. package/dist/designer-DhrE7jzw.js +7169 -0
  40. package/dist/designer-IAZu6kBX.cjs +2 -0
  41. package/dist/designer.cjs +1 -1
  42. package/dist/designer.d.cts +98 -45
  43. package/dist/designer.d.ts +98 -45
  44. package/dist/designer.js +3 -3
  45. package/dist/dom-ChE5D-L-.cjs +1 -0
  46. package/dist/dom-JWrchIre.js +452 -0
  47. package/dist/dom-cell-address-DLD1mkTB.cjs +1 -0
  48. package/dist/dom-cell-address-Fn-8nk7D.js +11 -0
  49. package/dist/{encoding-ncQAvyOv.cjs → encoding-BefcaHdp.cjs} +1 -1
  50. package/dist/{encoding-DbnhbwI8.js → encoding-CL6rXEkR.js} +2 -2
  51. package/dist/{font-loader-Di0lQKFf.js → font-loader-BT5baV-o.js} +1 -1
  52. package/dist/{font-loader-BB372_XN.cjs → font-loader-Ga51c2VC.cjs} +1 -1
  53. package/dist/grid-strokes-Be24LGuV.cjs +1 -0
  54. package/dist/grid-strokes-EoY66L2f.js +53 -0
  55. package/dist/index.cjs +8 -8
  56. package/dist/index.d.cts +6 -1
  57. package/dist/index.d.ts +6 -1
  58. package/dist/index.js +944 -1259
  59. package/dist/json-snapshot-1tvQNzQE.cjs +2 -0
  60. package/dist/{json-snapshot-DvQbZlD7.js → json-snapshot-OqkPyUk5.js} +763 -776
  61. package/dist/matrix-B8QWbsGM.cjs +1 -0
  62. package/dist/matrix-C6e_r_vp.js +302 -0
  63. package/dist/{pdf-CARdBcuw.cjs → pdf-HiEeXe9H.cjs} +42 -42
  64. package/dist/{pdf-DmlnL5eB.js → pdf-aobetCsy.js} +20 -20
  65. package/dist/pdf.cjs +1 -1
  66. package/dist/pdf.js +2 -2
  67. package/dist/{plugin-AcAQ2m9X.cjs → plugin-BFANt-i8.cjs} +1 -1
  68. package/dist/{plugin-w5Nyt08U.js → plugin-DeYYAL6F.js} +1 -1
  69. package/dist/{prefill-BXBxx5We.js → prefill-Dk4C6S5R.js} +21 -21
  70. package/dist/prefill-DsUD5OoK.cjs +1 -0
  71. package/dist/prepared-DCIxhKFo.js +94 -0
  72. package/dist/prepared-Dv-XM3i1.cjs +1 -0
  73. package/dist/progress-ByiOxUD3.js +250 -0
  74. package/dist/progress-WomPRP3B.cjs +1 -0
  75. package/dist/{protocol-C9ZaylID.cjs → protocol-B9YgfQ_d.cjs} +1 -1
  76. package/dist/{protocol-fjaeKkjf.js → protocol-DxeUKGYG.js} +3 -3
  77. package/dist/record-bindings-DatJZv_e.js +200 -0
  78. package/dist/record-bindings-MBxbeBsi.cjs +1 -0
  79. package/dist/{region-binding-workflow-aA8nxmkZ.js → region-binding-workflow-DjrXuR1q.js} +2 -2
  80. package/dist/{region-binding-workflow-BiJQ7NU6.cjs → region-binding-workflow-l7NGfagJ.cjs} +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-Ciwa6D2o.js +52 -0
  84. package/dist/rich-text-layout-DK7A_a5r.cjs +3 -0
  85. package/dist/{runtime-BTtpjF3D.js → runtime-75Y5Oq5B.js} +52 -51
  86. package/dist/runtime-DKlGd_D4.cjs +1 -0
  87. package/dist/sbom.cdx.json +1 -1
  88. package/dist/server-node.cjs +5 -5
  89. package/dist/server-node.js +1642 -1586
  90. package/dist/server.cjs +1 -1
  91. package/dist/server.js +24 -24
  92. package/dist/style.css +1 -1
  93. package/dist/{template-catalog-JSxSqk5y.js → template-catalog--cjxzgH7.js} +17 -17
  94. package/dist/template-catalog-CoT7jm_6.cjs +1 -0
  95. package/dist/{template-fragments-D2JFj7Du.js → template-fragments-CPpGpQoz.js} +12 -12
  96. package/dist/template-fragments-GVjpew_q.cjs +1 -0
  97. package/dist/template-registry-DI59PXVK.cjs +1 -0
  98. package/dist/{template-registry-Do1Uav2Z.js → template-registry-O0hNIOfB.js} +17 -17
  99. package/dist/{template-serialization-CU4n_Miu.js → template-serialization-CWmHq7lX.js} +1 -1
  100. package/dist/{template-serialization-CgqBo6s-.cjs → template-serialization-CqQY4zDg.cjs} +1 -1
  101. package/dist/{textwrap-CkGjRFT3.js → textwrap-BIjtEWmq.js} +1 -1
  102. package/dist/textwrap-Cy7o1hIR.cjs +4 -0
  103. package/dist/vue/async.d.cts +24 -0
  104. package/dist/vue/async.d.ts +24 -0
  105. package/dist/vue/index.d.cts +25 -1
  106. package/dist/vue/index.d.ts +25 -1
  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 +52 -47
  111. package/dist/{workbook-session-BvEBRRMz.cjs → workbook-session-C6-SrnCT.cjs} +4 -4
  112. package/dist/{workbook-session-f0wVlzst.js → workbook-session-C9ZmCBwY.js} +15 -16
  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 +184 -179
  117. package/package.json +1 -1
  118. package/dist/ReportLabelStudio-B0i9ohQj.cjs +0 -1
  119. package/dist/ReportParamPanel-lngONOEz.cjs +0 -1
  120. package/dist/ReportPreview-BDgKssYR.js +0 -5887
  121. package/dist/ReportPreview-Dw-4icG6.cjs +0 -6
  122. package/dist/TemplateOutlinePanel-B5SfGYVN.cjs +0 -1
  123. package/dist/assets-CxHunY_9.js +0 -232
  124. package/dist/assets-vbjAGgk8.cjs +0 -1
  125. package/dist/auto-DcUHlKob.cjs +0 -1
  126. package/dist/auto-moShblh1.js +0 -240
  127. package/dist/charts-aCtoswXq.cjs +0 -1
  128. package/dist/component-tree-1_QCiQJX.js +0 -67
  129. package/dist/component-tree-BjZIp6w9.cjs +0 -1
  130. package/dist/computed-4TnxzgIh.cjs +0 -1
  131. package/dist/data-bar-YltqGTaC.cjs +0 -1
  132. package/dist/designer-B7jJeAeG.js +0 -6914
  133. package/dist/designer-BWQVpJeN.cjs +0 -2
  134. package/dist/grid-geometry-D3SJgWFv.js +0 -136
  135. package/dist/grid-geometry-D8ReblRV.cjs +0 -1
  136. package/dist/json-snapshot-nyV63AbB.cjs +0 -2
  137. package/dist/matrix-0hywp0-F.cjs +0 -1
  138. package/dist/matrix-Dy-tyY7E.js +0 -381
  139. package/dist/prefill-DUvejVt1.cjs +0 -1
  140. package/dist/prepared-YXy-fVLw.cjs +0 -1
  141. package/dist/prepared-rXCKqdHY.js +0 -88
  142. package/dist/progress-B0ctFpKf.cjs +0 -1
  143. package/dist/progress-Hc2vxoCs.js +0 -52
  144. package/dist/record-bindings-Ct1HkPrc.cjs +0 -1
  145. package/dist/record-bindings-VZGS-Qd8.js +0 -155
  146. package/dist/rich-text-layout-K48VHUoW.cjs +0 -3
  147. package/dist/rich-text-layout-wxBhnAS7.js +0 -102
  148. package/dist/runtime-Dq0LUsyS.cjs +0 -1
  149. package/dist/template-catalog-CLAM4w7H.cjs +0 -1
  150. package/dist/template-fragments-Ca25Jt7e.cjs +0 -1
  151. package/dist/template-outline-CDWXptuj.js +0 -88
  152. package/dist/template-outline-K4jGhATu.cjs +0 -1
  153. package/dist/template-registry-CWnuGqyP.cjs +0 -1
  154. package/dist/textwrap-OTOUMr4f.cjs +0 -4
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),$=require("./injection-keys-Db_DyLkm.cjs"),M=require("@agile-team/mach-report"),ae=require("./progress-WomPRP3B.cjs"),N=require("./_plugin-vue_export-helper-BLmdZLlg.cjs"),z={printPrepareTimeout:"打印资源准备超时,请检查字体与图片后重试。",printImageFailed:"第 {index} 张图片未能加载,已停止打印,避免输出缺失内容。",printFontFailed:"打印字体 {family} 未能加载,请检查字体资源后重试。",printPrepareFailed:"打印准备失败,请检查打印配置或改用 PDF。",printCalibration:"打印校准",printOffsetX:"水平偏移(mm)",printOffsetY:"垂直偏移(mm)",printCalibrationTest:"打印校准页",printCalibrationHint:"正值向右/向下移动,负值向左/向上。使用同规格纸张及 100% 比例,先试打一张。系统对话框关闭不代表设备已完成。"};function te(a){const n=a?.calibration?.offsetXmm??0,l=a?.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 ne(a={}){if(a.fonts&&(!Array.isArray(a.fonts)||a.fonts.length>8))throw new RangeError("At most eight print font faces are allowed");return{...a,...a.fonts?{fonts:a.fonts.map(n=>({...n}))}:{},...a.calibration?{calibration:{...a.calibration}}:{}}}function K(a={}){const n=e.ref(!1),l=e.ref(null),r=e.ref(null),i=e.ref(null);function f(d=!1){n.value=!1,d&&e.nextTick(()=>r.value?.focus())}function v(d){d.target instanceof Node&&!l.value?.contains(d.target)&&f()}function s(d){d.key!=="Escape"||!n.value||d.isComposing||(d.preventDefault(),d.stopPropagation(),f(!0))}return e.watch(n,d=>{!d||a.focusOnOpen===!1||e.nextTick(()=>(i.value?.querySelector("input")??i.value?.querySelector("button:not(:disabled)"))?.focus())}),e.onMounted(()=>{document.addEventListener("pointerdown",v),document.addEventListener("focusin",v)}),e.onBeforeUnmount(()=>{document.removeEventListener("pointerdown",v),document.removeEventListener("focusin",v)}),{opened:n,root:l,trigger:r,panel:i,close:f,onKeydown:s}}const F={paramOptionsLoading:"正在搜索选项…",paramOptionsEmpty:"没有匹配选项",paramOptionsFailed:"选项加载失败,请重试",paramOptionsMissingLoader:"尚未配置选项加载服务",paramOptionsDependencies:"请先选择上级条件",paramOptionsClear:"清除选择",paramNumberRangeStart:"最小值",paramNumberRangeEnd:"最大值"},V={prefillTitle:"安全预填",prefillHint:"按业务主键匹配白名单字段,先核对差异再整批应用;默认只补空白。",prefillCurrent:"当前值",prefillReference:"参考 / 待填值",prefillLoad:"读取参考数据",prefillApply:"应用预填",prefillMatched:"一致",prefillChanged:"可补入",prefillSkipped:"已跳过",prefillConflict:"需处理",prefillUnchanged:"值一致",prefillReadonly:"只读",prefillOccupied:"保留已有值",prefillMissingSource:"来源为空",prefillMissingTarget:"无匹配目标",prefillAmbiguous:"同源值不一致",prefillInvalid:"值格式无效",comparisonTitle:"业务数据对比",comparisonHint:"按稳定业务主键比较参考数据与本次查询,不按显示行号匹配。",comparisonLoad:"读取并对比",comparisonAdded:"新增",comparisonRemoved:"删除",comparisonChanged:"变化",comparisonUnchanged:"一致",reviewCancel:"取消读取",reviewClose:"关闭数据核对",reviewBefore:"参考值",reviewAfter:"当前 / 待填值",reviewField:"字段",reviewKey:"业务主键",reviewDelta:"差额",reviewRatio:"变化比率",reviewLocate:"定位",reviewEmpty:"暂无差异记录",reviewPrevious:"上一页",reviewNext:"下一页",reviewPage:"差异分页"};function le(a){return{...V,...Object.fromEntries(Object.entries(a).filter(([,n])=>n!==void 0))}}const U={calculationTitle:"选区计算",calculationLocal:"仅本地分析,不写回实绩、不重算原公式。请选取同一单位与量纲的数值。",calculationHint:"点击起点,Shift + 点击终点或方向键扩选。",calculationFormula:"计算方式",calculationExpression:"组合公式",calculationExpressionHint:"支持 SUM、AVERAGE/AVG、MIN、MAX、COUNT、MEDIAN 及 + - * / 和括号,不执行 Excel 公式;采用浮点数,精度仅用于展示。",calculationPrecision:"展示小数位",calculationRun:"计算选区",calculationCancel:"取消计算",calculationResult:"计算结果",calculationIncluded:"参与数值",calculationExcluded:"排除单元格",calculationEmpty:"选区没有可计算数值,计数为 0,其余结果为空。",calculationNoSelection:"在旁边报表中点击起点,再 Shift + 点击终点选择数据。",calculationSummary:"选区摘要",calculationAdvanced:"高级计算",calculationClose:"收起选区计算",calculationPending:"正在计算选区…",calculationSummarySum:"求和",calculationSummaryAverage:"均值",calculationSummaryCount:"数值",calculationMixedColumns:"选区跨多列,请确认单位与口径后使用高级计算。",calculationSum:"求和 SUM",calculationAverage:"平均值 AVERAGE",calculationMin:"最小值 MIN",calculationMax:"最大值 MAX",calculationCount:"数值计数 COUNT",calculationMedian:"中位数 MEDIAN",calculationCustom:"组合公式",calculationErrorSelection:"请选择同一明细区域中的数据。",calculationErrorLimit:"选区超过计算预算,请缩小范围后重试。",calculationErrorExpression:"公式无效,请使用支持的摘要名称、运算符与括号。",calculationErrorDivision:"除数不能为 0。",calculationErrorOverflow:"结果超出有效数值范围。",calculationErrorPrecision:"数值超出安全精度,或展示小数位不是 0 至 12 的整数。"};function re(a){const n={...U};for(const l of Object.keys(n)){const r=a[l];typeof r=="string"&&(n[l]=r)}return n}const W={previousSnapshot:"当前保留上次成功结果,刷新成功后恢复编辑和输出。",...F,...V,reviewTools:"数据工具",validationTitle:"数据校验",validationError:"错误",validationWarning:"提示",validationDataset:"全表",validationRow:"行",validationMore:"请缩小范围查看更多问题",drillActions:"查看关联",drillOpening:"正在打开…",drillMissingValue:"当前单元格缺少关联参数",drillFailed:"关联内容打开失败,请重试",...z,...U,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 取消",editCellEditable:"可编辑",editCellReadOnly:"只读",editCellFormula:"公式结果由计算生成,不能直接修改。",editCellProtected:"此单元格已受保护。",editCellComplex:"此单元格包含复合内容,请在模板设计中调整。",editCellStructure:"表头与结构单元格由模板控制。",editCellDerived:"汇总或派生值随来源数据计算。",editCellPermission:"当前业务权限不允许修改此单元格。",editCellBusy:"报表处理中,当前单元格暂时只读。",editHistoryLimited:"较早的撤销记录已释放,当前修改与来源差异仍完整保留。",changesSearch:"搜索字段、行键或数据集",changesAllDatasets:"全部数据集",changesNoMatches:"没有匹配的修改",changesRange:"{start}–{end} / {total}",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:"图片资源超出处理范围,请减少资源或缩小报表范围。"},J={emptyAccent:"#79a7e8",shellBg:"#f4f7fc",shellFg:"#334155",toolbarBg:"#ffffff",toolbarBorder:"#e4eaf3",toolbarFg:"#334155",btnFg:"#526078",btnBorder:"#dbe3ef",btnHoverBg:"#edf3ff",btnHoverFg:"#315fba",btnActiveBg:"#3569d4"};function Y(a={}){return{...a,defaults:a.defaults??{},presets:a.presets??{}}}function oe(a){return a}const O={showExport:!0,showPrint:!0,showPdfWindow:!0,showSettings:!0,showParams:!0,gapPx:18,pdfFontUrl:"/simhei.ttf",logger:console},ie={warn:()=>{},info:()=>{}};function se(a,n){if(!(!a&&!n))return{...a,...n,calibration:{...a?.calibration,...n?.calibration}}}function ce(a={},n={}){const l={...a,...n};return(a.unavailableReasons||n.unavailableReasons)&&(l.unavailableReasons={...a.unavailableReasons,...n.unavailableReasons}),l}function T(a,n){return{...a,...n,theme:{...a?.theme,...n?.theme},messages:{...a?.messages,...n?.messages},preview:{...a?.preview,...n?.preview},xlsx:{...a?.xlsx,...n?.xlsx},toolbar:ce(a?.toolbar,n?.toolbar),interaction:{...a?.interaction,...n?.interaction},refresh:{...a?.refresh,...n?.refresh},output:{...a?.output,...n?.output},printOptions:se(a?.printOptions,n?.printOptions)}}function de(a){return{showExport:a.showExport??O.showExport,showPrint:a.showPrint??O.showPrint,showPdfWindow:a.showPdfWindow??O.showPdfWindow,showSettings:a.showSettings??O.showSettings,showParams:a.showParams??O.showParams,gapPx:a.gapPx??O.gapPx}}function ue(a,n){const l=n?a?.presets?.[n]:a?.defaultPreset?a?.presets?.[a.defaultPreset]:void 0,r=T(a?.defaults,l);return{drill:r.drill,prefill:r.prefill,dataComparison:r.dataComparison,exportExecution:r.exportExecution,loadParamOptions:r.loadParamOptions,...de(r),pdfFontUrl:r.pdfFontUrl??O.pdfFontUrl,theme:{...J,...r.theme},messages:{...W,...r.messages},logger:r.logger??O.logger,preview:{overscanPages:j(r.preview?.overscanPages,1,10,!0),searchDebounceMs:j(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,refresh:r.refresh,assets:r.assets,guardChanges:r.guardChanges??!0,beforeDiscard:r.beforeDiscard,output:{...r.output},printOptions:r.printOptions}}function j(a,n,l,r=!1){if(a==null||!Number.isFinite(a))return n;const i=Math.max(0,Math.min(l,a));return r?Math.floor(i):i}function fe(a){const n={};return a.emptyAccent!=null&&(n["--mrp-empty-accent"]=a.emptyAccent),a.shellBg!=null&&(n["--mrp-shell-bg"]=a.shellBg),a.shellFg!=null&&(n["--mrp-shell-fg"]=a.shellFg),a.toolbarBg!=null&&(n["--mrp-toolbar-bg"]=a.toolbarBg),a.toolbarBorder!=null&&(n["--mrp-toolbar-border"]=a.toolbarBorder),a.toolbarFg!=null&&(n["--mrp-toolbar-fg"]=a.toolbarFg),a.btnFg!=null&&(n["--mrp-btn-fg"]=a.btnFg),a.btnBorder!=null&&(n["--mrp-btn-border"]=a.btnBorder),a.btnHoverBg!=null&&(n["--mrp-btn-hover-bg"]=a.btnHoverBg),a.btnHoverFg!=null&&(n["--mrp-btn-hover-fg"]=a.btnHoverFg),a.btnActiveBg!=null&&(n["--mrp-btn-active-bg"]=a.btnActiveBg),n}function pe(a){const n=e.inject($.MACH_REPORT_CONFIG_KEY,null),l=e.computed(()=>{const r=n?.value??null,i="defaults"in a||"presets"in a||"defaultPreset"in a?Y(a):{defaults:a,presets:{}};if(!r)return i;const f={...r.presets,...i.presets};for(const v of Object.keys(f))f[v]=T(T(r.presets[v],i.defaults),i.presets[v]);return{defaults:T(r.defaults,i.defaults),presets:f,defaultPreset:i.defaultPreset??r.defaultPreset}});e.provide($.MACH_REPORT_CONFIG_KEY,l)}function me(){return e.inject($.MACH_REPORT_CONFIG_KEY,e.computed(()=>null))}class x extends Error{constructor(n,l,r){super(l),this.name="MachReportError",this.code=n,this.cause=r}}function ve(a){return a instanceof x?{code:a.code,cause:a.cause}:{code:"render",cause:a}}function ge(a){if(a instanceof x)return a;if(a instanceof M.ReportParamValidationError)return new x("param",a.message,a);if(a instanceof M.ReportSourceError)return new x(a.code,a.message,a.cause);if(a instanceof Error){const n={params:"param",config:"config",validate:"validate",fetch:"fetch"},l=a.code;if(typeof l=="string"&&Object.prototype.hasOwnProperty.call(n,l))return new x(n[l],a.message,a)}return new x("fetch",a instanceof Error?a.message:"预览加载失败",a)}let be=0;function ye(){return`mrp-params-${++be}`}function X(a,n,l){const r=(Array.isArray(n)?n.find(i=>i?.field===a.field)?.label:void 0)??a.field;return a.code==="required"?l.paramRequired.replace("{label}",r):(l.paramInvalid??"{label}:{message}").replace("{label}",r).replace("{message}",a.message)}function he(a){const n=e.ref({}),l=e.ref(!1);function r(){const s={};for(const d of Array.isArray(a.defs.value)?a.defs.value:[])typeof d?.field=="string"&&Object.defineProperty(s,d.field,{value:a.params()[d.field]??d.defaultValue??"",writable:!0,enumerable:!0,configurable:!0});n.value=s,l.value=!1}r(),e.watch(a.defs,r),e.watch(a.reportIds,r),e.watch(()=>JSON.stringify(a.params()),r);const i=e.computed(()=>M.validateReportParams(a.defs.value,{...a.params(),...n.value})),f=e.computed(()=>!l.value&&i.value.issues.length>0&&i.value.issues.every(s=>s.code==="required"));function v(){const s=i.value;if(!s.ok){const b=s.issues[0];return{quiet:f.value,error:new x(b.code==="definition"?"config":"param",X(b,a.defs.value,a.messages()),{issues:s.issues})}}const d={...s.values},w=new Set(a.defs.value.filter(b=>b.defaultValue!==void 0).map(b=>b.field));for(const[b,u]of Object.entries(d))u===""&&!w.has(b)&&delete d[b];return{params:d,quiet:!1}}return{values:n,attempted:l,validation:i,pendingRequired:f,reset:r,query:v}}const q=100,Ee=32,ke=6e4,Se=15e3;function Ce(a){let n=0;const l=new Set;function r(i,f){if(!Array.isArray(i)||f>16||i.length>q)throw new Error("Invalid option response");const v=new Set;return Object.freeze(i.map(s=>{if(++n>q||!s||l.has(s)||typeof s.value!="string"||!s.value||s.value.length>1024||typeof s.label!="string"||s.label.length>1024||v.has(s.value))throw new Error("Invalid option response");return l.add(s),v.add(s.value),Object.freeze({label:s.label,value:s.value,...s.children===void 0?{}:{children:r(s.children,f+1)}})}))}return r(a,1)}function Q(a){const n=e.ref(""),l=e.shallowRef([]),r=e.ref(!1),i=e.ref(!1),f=e.computed(()=>Object.fromEntries((Array.isArray(a.def().dependsOn)?a.def().dependsOn:[]).map(C=>[C,a.values()[C]??""]))),v=e.computed(()=>Object.values(f.value).some(C=>!C.trim())),s=e.computed(()=>!a.loader()),d=new Map;let w,b,u=0;function y(){u++,w?.abort(),w=void 0,clearTimeout(b),r.value=!1}async function g(){y(),i.value=!1;const C=a.loader(),P=a.def();if(!C||!P.optionsSource||v.value||a.disabled()||!a.opened())return;const R={source:P.optionsSource,field:P.field,query:n.value.trim().slice(0,256),params:Object.freeze({...f.value}),limit:q},o=JSON.stringify(R),p=d.get(o);if(p&&Date.now()-p.at<ke){d.delete(o),d.set(o,p),l.value=p.options;return}const t=u,c=new AbortController;w=c,r.value=!0;const h=setTimeout(()=>c.abort(),Se);try{const S=Ce(await ae.waitForOutput(C(Object.freeze({...R,signal:c.signal})),c.signal));if(t!==u)return;for(l.value=S,d.delete(o),d.set(o,{at:Date.now(),options:S});d.size>Ee;)d.delete(d.keys().next().value)}catch{t===u&&(i.value=!0)}finally{clearTimeout(h),t===u&&(r.value=!1,w=void 0)}}function k(){y(),l.value=[],i.value=!1,b=setTimeout(()=>{g()},180)}return e.watch(n,k,{flush:"sync"}),e.watch([()=>a.def().field,()=>a.def().type,()=>a.def().optionsSource,()=>JSON.stringify(f.value),a.loader],()=>{d.clear(),n.value="",y(),l.value=[],i.value=!1,a.opened()&&g()},{flush:"sync"}),e.watch([a.opened,a.disabled],()=>{!a.opened()||a.disabled()?y():g()},{immediate:!0}),e.onBeforeUnmount(()=>{y(),d.clear()}),{query:n,options:l,loading:r,failed:i,waiting:v,missingLoader:s,request:g,cancel:y}}const we=["aria-labelledby"],Pe=["value","disabled","aria-label","aria-invalid","aria-describedby","aria-required","onChange"],Be={value:""},Re=["value"],Ae=["id"],Oe=e.defineComponent({__name:"ReportCascaderParam",props:{def:{},value:{},values:{},loadOptions:{type:Function},messages:{},disabled:{type:Boolean},id:{},invalid:{type:Boolean}},emits:["change"],setup(a,{emit:n}){const l=a,r=n,i=Q({def:()=>l.def,values:()=>l.values,loader:()=>l.loadOptions,opened:()=>!0,disabled:()=>l.disabled===!0}),f=e.computed(()=>{const b=M.parseReportCascaderPath(l.value);if(b)return b;try{const u=JSON.parse(l.value);return Array.isArray(u)&&u.length<=16&&u[u.length-1]===null&&u.slice(0,-1).every(y=>typeof y=="string")?u.slice(0,-1):[]}catch{return[]}}),v=e.computed(()=>({...F,...l.messages})),s=e.computed(()=>{const b=[];let u=l.def.optionsSource?i.options.value:l.def.options??[];for(let y=0;y<16&&u.length;y++)b.push(u),u=u.find(g=>g.value===f.value[y])?.children??[];return b}),d=e.computed(()=>l.def.optionsSource?i.waiting.value?v.value.paramOptionsDependencies:i.missingLoader.value?v.value.paramOptionsMissingLoader:i.failed.value?v.value.paramOptionsFailed:i.loading.value?v.value.paramOptionsLoading:s.value.length?"":v.value.paramOptionsEmpty:"");function w(b,u){if(l.disabled)return;const y=f.value.slice(0,b);u&&y.push(u);const g=u?s.value[b]?.find(k=>k.value===u)?.children:s.value[b];r("change",y.length?g?.length?JSON.stringify([...y,null]):M.formatReportCascaderPath(y):"")}return(b,u)=>(e.openBlock(),e.createElementBlock("div",{class:"mrp-cascader",role:"group","aria-labelledby":`${a.id}-label`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(y,g)=>(e.openBlock(),e.createElementBlock("select",{key:g,class:"mrp-param-input",value:f.value[g]??"",disabled:a.disabled||e.unref(i).loading.value,"aria-label":`${a.def.label??a.def.field} · ${g+1}`,"aria-invalid":a.invalid||void 0,"aria-describedby":a.invalid?`${a.id}-error`:d.value?`${a.id}-status`:void 0,"aria-required":a.def.required||void 0,onChange:k=>w(g,k.target.value)},[e.createElementVNode("option",Be,e.toDisplayString(a.def.placeholder??(a.messages.paramSelectPlaceholder??"请选择{label}").replace("{label}",a.def.label??a.def.field)),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y,k=>(e.openBlock(),e.createElementBlock("option",{key:k.value,value:k.value},e.toDisplayString(k.label),9,Re))),128))],40,Pe))),128)),d.value?(e.openBlock(),e.createElementBlock("small",{key:0,id:`${a.id}-status`,role:"status"},[e.createTextVNode(e.toDisplayString(d.value),1),e.unref(i).failed.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:u[0]||(u[0]=(...y)=>e.unref(i).request&&e.unref(i).request(...y))},e.toDisplayString(a.messages.retry),1)):e.createCommentVNode("",!0)],8,Ae)):e.createCommentVNode("",!0)],8,we))}}),xe=N._export_sfc(Oe,[["__scopeId","data-v-734dde49"]]),Me=["id","value","aria-labelledby","aria-invalid","aria-required","aria-describedby","aria-expanded","aria-controls","aria-activedescendant","disabled","placeholder"],De=["aria-label","disabled"],Ne=["aria-label","disabled"],Te=["id"],Fe=["id","aria-label","aria-busy","aria-multiselectable"],Le=["id","aria-selected","disabled","onPointermove","onClick"],Ie={key:0,"aria-hidden":"true",class:"mrp-option-check"},$e={key:0},qe={key:0,role:"status"},Ve=e.defineComponent({__name:"ReportRemoteParamSelect",props:{def:{},value:{},values:{},loadOptions:{type:Function},messages:{},disabled:{type:Boolean},id:{},invalid:{type:Boolean}},emits:["change"],setup(a,{emit:n}){const l=a,r=n,i=K({focusOnOpen:!1}),{root:f,panel:v,opened:s}=i,d=Q({def:()=>l.def,values:()=>l.values,loader:()=>l.loadOptions,opened:()=>s.value,disabled:()=>l.disabled===!0}),{query:w,options:b,loading:u,failed:y,waiting:g,missingLoader:k}=d,C=e.computed(()=>({...F,...l.messages})),P=e.computed(()=>l.def.type==="multiSelect"),R=e.computed(()=>P.value?M.parseReportParamSelection(l.value)??[]:[l.value]),o=e.computed(()=>l.def.optionsSource?b.value:(l.def.options??[]).filter(m=>`${m.label} ${m.value}`.toLocaleLowerCase().includes(w.value.toLocaleLowerCase())).slice(0,100)),p=new Map,t=e.computed(()=>P.value?R.value.map(m=>p.get(m)??l.def.options?.find(E=>E.value===m)?.label??m).join("、"):h.value||l.value),c=e.ref(0),h=e.ref(""),S=e.ref(),D=e.computed(()=>`${l.id}-options`),A=e.computed(()=>g.value?C.value.paramOptionsDependencies:l.def.optionsSource&&k.value?C.value.paramOptionsMissingLoader:y.value?C.value.paramOptionsFailed:u.value?C.value.paramOptionsLoading:o.value.length?"":C.value.paramOptionsEmpty);e.watch(()=>l.value,()=>{h.value=""}),e.watch(o,()=>{c.value=0}),e.watch(()=>[l.def.field,l.def.optionsSource,JSON.stringify(l.def.options)],()=>{p.clear(),h.value=""}),e.watch(s,m=>{m&&e.nextTick(()=>S.value?.focus())});function H(m){if(!(l.disabled||g.value||u.value||y.value)){p.set(m.value,m.label);for(const E of p.keys())E!==m.value&&!R.value.includes(E)&&p.delete(E);if(P.value){const E=R.value.includes(m.value)?R.value.filter(B=>B!==m.value):[...R.value,m.value];if(E.length>Math.min(l.def.maxItems??100,100))return;r("change",E.length?M.formatReportParamSelection(E):"")}else r("change",m.value),i.close();e.nextTick(()=>{h.value=m.label,S.value?.focus()})}}function G(m){m.isComposing||(s.value=!0,w.value=m.target.value)}function L(){!l.disabled&&!g.value&&(!l.def.optionsSource||!k.value)&&(w.value="",s.value=!0)}function Z(m){if(!(m.isComposing||m.keyCode===229)){if(m.key==="Escape"){s.value&&(m.preventDefault(),m.stopPropagation(),i.close());return}if(["ArrowUp","ArrowDown","Enter"].includes(m.key)){if(m.preventDefault(),m.stopPropagation(),!s.value){L();return}if(m.key==="Enter"){const E=o.value[c.value];E&&H(E);return}o.value.length&&(c.value=(c.value+(m.key==="ArrowDown"?1:-1)+o.value.length)%o.value.length,e.nextTick(()=>v.value?.querySelector(`[id="${D.value}-${c.value}"]`)?.scrollIntoView?.({block:"nearest"})))}}}function _(){l.disabled||(r("change",""),h.value="",i.close())}return(m,E)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:f,class:"mrp-remote-param"},[e.createElementVNode("div",{class:e.normalizeClass(["mrp-remote-control",{"is-invalid":a.invalid}])},[e.createVNode(N._sfc_main,{name:"search",size:14}),e.createElementVNode("input",{id:a.id,ref_key:"input",ref:S,type:"text",role:"combobox",autocomplete:"off",value:e.unref(s)?e.unref(w):t.value,maxlength:256,"aria-labelledby":`${a.id}-label`,"aria-invalid":a.invalid||void 0,"aria-required":a.def.required||void 0,"aria-describedby":a.invalid?`${a.id}-error`:e.unref(g)||a.def.optionsSource&&e.unref(k)?`${a.id}-remote-status`:void 0,"aria-autocomplete":"list","aria-expanded":e.unref(s),"aria-controls":e.unref(s)?D.value:void 0,"aria-activedescendant":e.unref(s)&&o.value.length?`${D.value}-${c.value}`:void 0,disabled:a.disabled||e.unref(g)||!!a.def.optionsSource&&e.unref(k),placeholder:a.def.placeholder??(a.messages.paramSelectPlaceholder??"请选择{label}").replace("{label}",a.def.label??a.def.field),onClick:L,onInput:G,onCompositionend:G,onKeydown:Z},null,40,Me),a.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button","aria-label":C.value.paramOptionsClear,disabled:a.disabled,onClick:_},[e.createVNode(N._sfc_main,{name:"close",size:12})],8,De)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button","aria-label":a.def.label??a.def.field,disabled:a.disabled||e.unref(g)||!!a.def.optionsSource&&e.unref(k),onClick:E[0]||(E[0]=B=>e.unref(s)?e.unref(i).close():L())},[e.createVNode(N._sfc_main,{name:"chevron-down",size:12})],8,Ne))],2),e.unref(g)||a.def.optionsSource&&e.unref(k)?(e.openBlock(),e.createElementBlock("small",{key:0,id:`${a.id}-remote-status`,role:"status"},e.toDisplayString(A.value),9,Te)):e.createCommentVNode("",!0),e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"panel",ref:v,class:"mrp-remote-options"},[e.createElementVNode("div",{id:D.value,role:"listbox","aria-label":a.def.label??a.def.field,"aria-busy":e.unref(u),"aria-multiselectable":P.value||void 0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(B,I)=>(e.openBlock(),e.createElementBlock("button",{id:`${D.value}-${I}`,key:B.value,type:"button",role:"option",tabindex:"-1","aria-selected":R.value.includes(B.value),class:e.normalizeClass({active:I===c.value}),disabled:e.unref(u),onPointermove:ee=>c.value=I,onMousedown:E[1]||(E[1]=e.withModifiers(()=>{},["prevent"])),onClick:ee=>H(B)},[e.createElementVNode("span",null,[P.value?(e.openBlock(),e.createElementBlock("span",Ie,e.toDisplayString(R.value.includes(B.value)?"✓":""),1)):e.createCommentVNode("",!0),e.createTextVNode(e.toDisplayString(B.label),1)]),B.label!==B.value?(e.openBlock(),e.createElementBlock("small",$e,e.toDisplayString(B.value),1)):e.createCommentVNode("",!0)],42,Le))),128))],8,Fe),A.value?(e.openBlock(),e.createElementBlock("p",qe,[e.createTextVNode(e.toDisplayString(A.value),1),e.unref(y)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:E[2]||(E[2]=(...B)=>e.unref(d).request&&e.unref(d).request(...B))},e.toDisplayString(a.messages.retry),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0)],512))}}),Ue=N._export_sfc(Ve,[["__scopeId","data-v-6ad41cf4"]]),He={key:0,class:"mrp-params-title"},Ge={class:"mrp-params-grid"},je=["id"],ze={key:0,class:"mrp-param-star","aria-hidden":"true"},Ke=["value","disabled","aria-labelledby","aria-invalid","aria-describedby","aria-required","onChange"],We=["disabled","hidden"],Je=["value"],Ye=["aria-labelledby"],Xe=["type","step","value","disabled","min","max","aria-label","aria-invalid","aria-describedby","aria-required","onInput"],Qe=["type","inputmode","maxlength","placeholder","value","disabled","min","max","step","aria-labelledby","aria-invalid","aria-describedby","aria-required","onInput"],Ze=["id"],_e={key:1,class:"mrp-params-actions"},ea=["disabled"],aa=["disabled"],ta=e.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(a,{expose:n,emit:l}){const r=a,i=l,f=e.ref({...r.modelValue}),v=e.ref(null),s=ye();e.watch(()=>r.modelValue,o=>{f.value={...o}});const d=e.computed(()=>r.issues??M.validateReportParams(r.defs,f.value).issues),w=e.computed(()=>(Array.isArray(r.defs)?r.defs:[]).filter(o=>o&&typeof o.field=="string").map((o,p)=>({def:o,id:`${s}-${p}`,label:o.label??o.field,value:f.value[o.field]??"",error:r.attempted?d.value.find(t=>t.field===o.field):void 0}))),b=e.computed(()=>{const o=new Map;for(const p of r.defs)for(const t of Array.isArray(p.dependsOn)?p.dependsOn:[]){const c=o.get(t)??[];c.push(p.field),o.set(t,c)}return o});function u(o,p){if(r.disabled||f.value[o]===p)return;f.value={...f.value,[o]:p};const t=new Set([o]),c=[o];for(let h=0;h<c.length;h++)for(const S of b.value.get(c[h])??[])t.has(S)||(f.value[S]="",t.add(S),c.push(S));i("update:modelValue",{...f.value})}function y(o){return o.type==="number"?"number":o.type==="date"||o.type==="month"?o.type:"text"}function g(o,p,t=!1){if(!t)return o.split("/")[p]??"";try{const c=JSON.parse(o);return Array.isArray(c)&&(typeof c[p]=="number"||typeof c[p]=="string")?String(c[p]):""}catch{return""}}function k(o,p,t){return t?!!g(o,0)!=!!g(o,1)?!g(o,p)||void 0:!0:void 0}function C(o,p,t){const c=o.type==="numberRange",h=f.value[o.field]??"",S=[g(h,0,c),g(h,1,c)];S[p]=t;const D=c?JSON.stringify(S.map(A=>A===""?null:Number(A))):S.join("/");u(o.field,S.every(A=>!A)?"":D)}function P(o){o.isComposing||i("query")}function R(){v.value?.querySelector('[aria-invalid="true"]')?.focus()}return n({focusInvalid:R}),(o,p)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:v,class:"mrp-params"},[a.showTitle!==!1?(e.openBlock(),e.createElementBlock("span",He,e.toDisplayString(a.messages.paramsTitle),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,t=>(e.openBlock(),e.createElementBlock("label",{key:t.id,class:e.normalizeClass(["mrp-param",{"mrp-param-missing":!!t.error}])},[e.createElementVNode("span",{id:`${t.id}-label`,class:"mrp-param-label"},[e.createTextVNode(e.toDisplayString(t.label),1),t.def.required?(e.openBlock(),e.createElementBlock("i",ze,"*")):e.createCommentVNode("",!0)],8,je),t.def.type==="cascader"?(e.openBlock(),e.createBlock(xe,{key:0,id:t.id,def:t.def,value:t.value,values:f.value,"load-options":a.loadOptions,messages:a.messages,disabled:a.disabled,invalid:!!t.error,onChange:c=>u(t.def.field,c)},null,8,["id","def","value","values","load-options","messages","disabled","invalid","onChange"])):t.def.optionsSource||t.def.type==="multiSelect"?(e.openBlock(),e.createBlock(Ue,{key:1,id:t.id,def:t.def,value:t.value,values:f.value,"load-options":a.loadOptions,messages:a.messages,disabled:a.disabled,invalid:!!t.error,onChange:c=>u(t.def.field,c)},null,8,["id","def","value","values","load-options","messages","disabled","invalid","onChange"])):(t.def.type??"text")==="select"?(e.openBlock(),e.createElementBlock("select",{key:2,class:"mrp-param-input",value:t.value,disabled:a.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=>u(t.def.field,c.target.value),onKeydown:e.withKeys(P,["enter"])},[e.createElementVNode("option",{value:"",disabled:t.def.required,hidden:t.def.required},e.toDisplayString(t.def.placeholder??(a.messages.paramSelectPlaceholder??"请选择{label}").replace("{label}",t.label)),9,We),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.def.options??[],c=>(e.openBlock(),e.createElementBlock("option",{key:c.value,value:c.value},e.toDisplayString(c.label),9,Je))),128))],40,Ke)):t.def.type==="dateRange"||t.def.type==="numberRange"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"mrp-param-range",role:"group","aria-labelledby":`${t.id}-label`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.def.type==="numberRange"?[a.messages.paramNumberRangeStart??"最小值",a.messages.paramNumberRangeEnd??"最大值"]:[a.messages.paramRangeStart??"开始日期",a.messages.paramRangeEnd??"结束日期"],(c,h)=>(e.openBlock(),e.createElementBlock("input",{key:h,class:"mrp-param-input",type:t.def.type==="numberRange"?"number":"date",step:t.def.type==="numberRange"?"any":void 0,value:g(t.value,h,t.def.type==="numberRange"),disabled:a.disabled,min:t.def.min,max:t.def.max,"aria-label":`${t.label} · ${c}`,"aria-invalid":t.def.type==="numberRange"?!!t.error||void 0:k(t.value,h,t.error),"aria-describedby":t.error?`${t.id}-error`:void 0,"aria-required":t.def.required||void 0,onInput:S=>C(t.def,h,S.target.value),onKeydown:e.withKeys(P,["enter"])},null,40,Xe))),128))],8,Ye)):(e.openBlock(),e.createElementBlock("input",{key:4,class:"mrp-param-input",type:y(t.def),inputmode:t.def.type==="year"?"numeric":void 0,maxlength:t.def.type==="year"?4:void 0,placeholder:t.def.placeholder??(a.messages.paramTextPlaceholder??"请输入{label}").replace("{label}",t.label),value:t.value,disabled:a.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=>u(t.def.field,c.target.value),onKeydown:e.withKeys(P,["enter"])},null,40,Qe)),t.error?(e.openBlock(),e.createElementBlock("small",{key:5,id:`${t.id}-error`,class:"mrp-param-error",role:"status"},e.toDisplayString(e.unref(X)(t.error,a.defs,a.messages)),9,Ze)):e.createCommentVNode("",!0)],2))),128))]),a.showActions!==!1?(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("button",{class:"mrp-nav mrp-param-query",type:"button",disabled:a.disabled,onClick:p[0]||(p[0]=t=>o.$emit("query"))},e.toDisplayString(a.messages.query),9,ea),e.createElementVNode("button",{class:"mrp-nav",type:"button",disabled:a.disabled,onClick:p[1]||(p[1]=t=>o.$emit("reset"))},e.toDisplayString(a.messages.reset),9,aa)])):e.createCommentVNode("",!0)],512))}}),na=N._export_sfc(ta,[["__scopeId","data-v-e74206d7"]]);exports.DEFAULT_CALCULATION_MESSAGES=U;exports.DEFAULT_DATA_REVIEW_MESSAGES=V;exports.DEFAULT_MESSAGES=W;exports.DEFAULT_PRINT_MESSAGES=z;exports.DEFAULT_THEME=J;exports.MachReportError=x;exports.PARAM_OPTIONS_MESSAGES=F;exports.ReportParamPanel=na;exports.SILENT_LOGGER=ie;exports.defineMachReportConfig=Y;exports.defineMachReportPreset=oe;exports.normalizeReportLoadError=ge;exports.printCalibration=te;exports.provideMachReportConfig=pe;exports.resolveCalculationMessages=re;exports.resolveConfig=ue;exports.resolveDataReviewMessages=le;exports.snapshotPrintOptions=ne;exports.themeToCssVars=fe;exports.toErrorDetail=ve;exports.useMachReportConfig=me;exports.usePopover=K;exports.useReportParams=he;
@@ -1,7 +1,7 @@
1
- import { ref as k, watch as D, nextTick as V, onMounted as ge, onBeforeUnmount as ie, inject as se, computed as E, provide as be, shallowRef as ye, defineComponent as _, openBlock as f, createElementBlock as m, Fragment as U, renderList as H, unref as w, createElementVNode as q, toDisplayString as x, createTextVNode as G, createCommentVNode as I, normalizeClass as Y, createVNode as W, withModifiers as he, createBlock as ne, withKeys as K } from "vue";
1
+ import { ref as k, watch as I, nextTick as V, onMounted as ge, onBeforeUnmount as ie, inject as se, computed as E, provide as be, shallowRef as ye, defineComponent as _, openBlock as f, createElementBlock as m, Fragment as U, renderList as H, unref as w, createElementVNode as q, toDisplayString as x, createTextVNode as G, createCommentVNode as D, normalizeClass as Y, createVNode as W, withModifiers as he, createBlock as ne, withKeys as K } from "vue";
2
2
  import { a as Q } from "./injection-keys-e85udZCp.js";
3
- import { ReportParamValidationError as we, ReportSourceError as Ee, validateReportParams as oe, parseReportCascaderPath as Se, formatReportCascaderPath as Pe, parseReportParamSelection as Ce, formatReportParamSelection as Oe } from "@agile-team/mach-report";
4
- import { w as xe } from "./progress-Hc2vxoCs.js";
3
+ import { ReportParamValidationError as we, ReportSourceError as Ee, validateReportParams as oe, parseReportCascaderPath as Se, formatReportCascaderPath as Ce, parseReportParamSelection as Pe, formatReportParamSelection as Oe } from "@agile-team/mach-report";
4
+ import { w as xe } from "./progress-ByiOxUD3.js";
5
5
  import { _ as ee, a as X } from "./_plugin-vue_export-helper-8SL1F89S.js";
6
6
  const Re = {
7
7
  printPrepareTimeout: "打印资源准备超时,请检查字体与图片后重试。",
@@ -34,7 +34,7 @@ function Ae(e = {}) {
34
34
  function s(d) {
35
35
  d.key !== "Escape" || !t.value || d.isComposing || (d.preventDefault(), d.stopPropagation(), c(!0));
36
36
  }
37
- return D(t, (d) => {
37
+ return I(t, (d) => {
38
38
  !d || e.focusOnOpen === !1 || V(() => (i.value?.querySelector("input") ?? i.value?.querySelector("button:not(:disabled)"))?.focus());
39
39
  }), ge(() => {
40
40
  document.addEventListener("pointerdown", g), document.addEventListener("focusin", g);
@@ -225,6 +225,20 @@ const ke = {
225
225
  importing: "正在导入 Excel…",
226
226
  editCell: "编辑单元格",
227
227
  editingHint: "双击单元格编辑 · Enter 确认 · Esc 取消",
228
+ editCellEditable: "可编辑",
229
+ editCellReadOnly: "只读",
230
+ editCellFormula: "公式结果由计算生成,不能直接修改。",
231
+ editCellProtected: "此单元格已受保护。",
232
+ editCellComplex: "此单元格包含复合内容,请在模板设计中调整。",
233
+ editCellStructure: "表头与结构单元格由模板控制。",
234
+ editCellDerived: "汇总或派生值随来源数据计算。",
235
+ editCellPermission: "当前业务权限不允许修改此单元格。",
236
+ editCellBusy: "报表处理中,当前单元格暂时只读。",
237
+ editHistoryLimited: "较早的撤销记录已释放,当前修改与来源差异仍完整保留。",
238
+ changesSearch: "搜索字段、行键或数据集",
239
+ changesAllDatasets: "全部数据集",
240
+ changesNoMatches: "没有匹配的修改",
241
+ changesRange: "{start}–{end} / {total}",
228
242
  saving: "正在保存修改…",
229
243
  editInvalidNumber: "请输入有效数字;清空表示无值",
230
244
  editInvalidBoolean: "请输入 true / false、是 / 否或 1 / 0",
@@ -329,7 +343,7 @@ function $e(e = {}) {
329
343
  function ka(e) {
330
344
  return e;
331
345
  }
332
- const L = {
346
+ const T = {
333
347
  showExport: !0,
334
348
  showPrint: !0,
335
349
  showPdfWindow: !0,
@@ -345,7 +359,7 @@ function Fe(e, t) {
345
359
  if (!(!e && !t))
346
360
  return { ...e, ...t, calibration: { ...e?.calibration, ...t?.calibration } };
347
361
  }
348
- function Ie(e = {}, t = {}) {
362
+ function De(e = {}, t = {}) {
349
363
  const l = { ...e, ...t };
350
364
  return (e.unavailableReasons || t.unavailableReasons) && (l.unavailableReasons = { ...e.unavailableReasons, ...t.unavailableReasons }), l;
351
365
  }
@@ -357,21 +371,21 @@ function j(e, t) {
357
371
  messages: { ...e?.messages, ...t?.messages },
358
372
  preview: { ...e?.preview, ...t?.preview },
359
373
  xlsx: { ...e?.xlsx, ...t?.xlsx },
360
- toolbar: Ie(e?.toolbar, t?.toolbar),
374
+ toolbar: De(e?.toolbar, t?.toolbar),
361
375
  interaction: { ...e?.interaction, ...t?.interaction },
362
376
  refresh: { ...e?.refresh, ...t?.refresh },
363
377
  output: { ...e?.output, ...t?.output },
364
378
  printOptions: Fe(e?.printOptions, t?.printOptions)
365
379
  };
366
380
  }
367
- function De(e) {
381
+ function Ie(e) {
368
382
  return {
369
- showExport: e.showExport ?? L.showExport,
370
- showPrint: e.showPrint ?? L.showPrint,
371
- showPdfWindow: e.showPdfWindow ?? L.showPdfWindow,
372
- showSettings: e.showSettings ?? L.showSettings,
373
- showParams: e.showParams ?? L.showParams,
374
- gapPx: e.gapPx ?? L.gapPx
383
+ showExport: e.showExport ?? T.showExport,
384
+ showPrint: e.showPrint ?? T.showPrint,
385
+ showPdfWindow: e.showPdfWindow ?? T.showPdfWindow,
386
+ showSettings: e.showSettings ?? T.showSettings,
387
+ showParams: e.showParams ?? T.showParams,
388
+ gapPx: e.gapPx ?? T.gapPx
375
389
  };
376
390
  }
377
391
  function $a(e, t) {
@@ -382,11 +396,11 @@ function $a(e, t) {
382
396
  dataComparison: n.dataComparison,
383
397
  exportExecution: n.exportExecution,
384
398
  loadParamOptions: n.loadParamOptions,
385
- ...De(n),
386
- pdfFontUrl: n.pdfFontUrl ?? L.pdfFontUrl,
399
+ ...Ie(n),
400
+ pdfFontUrl: n.pdfFontUrl ?? T.pdfFontUrl,
387
401
  theme: { ...Me, ...n.theme },
388
402
  messages: { ...ke, ...n.messages },
389
- logger: n.logger ?? L.logger,
403
+ logger: n.logger ?? T.logger,
390
404
  preview: {
391
405
  overscanPages: re(n.preview?.overscanPages, 1, 10, !0),
392
406
  searchDebounceMs: re(n.preview?.searchDebounceMs, 200, 2e3)
@@ -414,7 +428,7 @@ function Fa(e) {
414
428
  const t = {};
415
429
  return e.emptyAccent != null && (t["--mrp-empty-accent"] = e.emptyAccent), e.shellBg != null && (t["--mrp-shell-bg"] = e.shellBg), e.shellFg != null && (t["--mrp-shell-fg"] = e.shellFg), e.toolbarBg != null && (t["--mrp-toolbar-bg"] = e.toolbarBg), e.toolbarBorder != null && (t["--mrp-toolbar-border"] = e.toolbarBorder), e.toolbarFg != null && (t["--mrp-toolbar-fg"] = e.toolbarFg), e.btnFg != null && (t["--mrp-btn-fg"] = e.btnFg), e.btnBorder != null && (t["--mrp-btn-border"] = e.btnBorder), e.btnHoverBg != null && (t["--mrp-btn-hover-bg"] = e.btnHoverBg), e.btnHoverFg != null && (t["--mrp-btn-hover-fg"] = e.btnHoverFg), e.btnActiveBg != null && (t["--mrp-btn-active-bg"] = e.btnActiveBg), t;
416
430
  }
417
- function Ia(e) {
431
+ function Da(e) {
418
432
  const t = se(Q, null), l = E(() => {
419
433
  const n = t?.value ?? null, i = "defaults" in e || "presets" in e || "defaultPreset" in e ? $e(e) : { defaults: e, presets: {} };
420
434
  if (!n) return i;
@@ -432,7 +446,7 @@ function Ia(e) {
432
446
  });
433
447
  be(Q, l);
434
448
  }
435
- function Da() {
449
+ function Ia() {
436
450
  return se(Q, E(() => null));
437
451
  }
438
452
  class B extends Error {
@@ -443,7 +457,7 @@ class B extends Error {
443
457
  function qa(e) {
444
458
  return e instanceof B ? { code: e.code, cause: e.cause } : { code: "render", cause: e };
445
459
  }
446
- function Ta(e) {
460
+ function La(e) {
447
461
  if (e instanceof B) return e;
448
462
  if (e instanceof we) return new B("param", e.message, e);
449
463
  if (e instanceof Ee) return new B(e.code, e.message, e.cause);
@@ -454,14 +468,14 @@ function Ta(e) {
454
468
  return new B("fetch", e instanceof Error ? e.message : "预览加载失败", e);
455
469
  }
456
470
  let qe = 0;
457
- function Te() {
471
+ function Le() {
458
472
  return `mrp-params-${++qe}`;
459
473
  }
460
474
  function ce(e, t, l) {
461
475
  const n = (Array.isArray(t) ? t.find((i) => i?.field === e.field)?.label : void 0) ?? e.field;
462
476
  return e.code === "required" ? l.paramRequired.replace("{label}", n) : (l.paramInvalid ?? "{label}:{message}").replace("{label}", n).replace("{message}", e.message);
463
477
  }
464
- function La(e) {
478
+ function Ta(e) {
465
479
  const t = k({}), l = k(!1);
466
480
  function n() {
467
481
  const s = {};
@@ -469,7 +483,7 @@ function La(e) {
469
483
  typeof d?.field == "string" && Object.defineProperty(s, d.field, { value: e.params()[d.field] ?? d.defaultValue ?? "", writable: !0, enumerable: !0, configurable: !0 });
470
484
  t.value = s, l.value = !1;
471
485
  }
472
- n(), D(e.defs, n), D(e.reportIds, n), D(() => JSON.stringify(e.params()), n);
486
+ n(), I(e.defs, n), I(e.reportIds, n), I(() => JSON.stringify(e.params()), n);
473
487
  const i = E(() => oe(e.defs.value, { ...e.params(), ...t.value })), c = E(() => !l.value && i.value.issues.length > 0 && i.value.issues.every((s) => s.code === "required"));
474
488
  function g() {
475
489
  const s = i.value;
@@ -483,7 +497,7 @@ function La(e) {
483
497
  }
484
498
  return { values: t, attempted: l, validation: i, pendingRequired: c, reset: n, query: g };
485
499
  }
486
- const Z = 100, Le = 32, Ne = 6e4, Be = 15e3;
500
+ const Z = 100, Te = 32, Ne = 6e4, Be = 15e3;
487
501
  function Ue(e) {
488
502
  let t = 0;
489
503
  const l = /* @__PURE__ */ new Set();
@@ -518,21 +532,21 @@ function fe(e) {
518
532
  try {
519
533
  const O = Ue(await xe(R(Object.freeze({ ...F, signal: o.signal })), o.signal));
520
534
  if (a !== u) return;
521
- for (l.value = O, d.delete(r), d.set(r, { at: Date.now(), options: O }); d.size > Le; ) d.delete(d.keys().next().value);
535
+ for (l.value = O, d.delete(r), d.set(r, { at: Date.now(), options: O }); d.size > Te; ) d.delete(d.keys().next().value);
522
536
  } catch {
523
537
  a === u && (i.value = !0);
524
538
  } finally {
525
539
  clearTimeout(S), a === u && (n.value = !1, A = void 0);
526
540
  }
527
541
  }
528
- function C() {
542
+ function P() {
529
543
  h(), l.value = [], i.value = !1, y = setTimeout(() => {
530
544
  b();
531
545
  }, 180);
532
546
  }
533
- return D(t, C, { flush: "sync" }), D([() => e.def().field, () => e.def().type, () => e.def().optionsSource, () => JSON.stringify(c.value), e.loader], () => {
547
+ return I(t, P, { flush: "sync" }), I([() => e.def().field, () => e.def().type, () => e.def().optionsSource, () => JSON.stringify(c.value), e.loader], () => {
534
548
  d.clear(), t.value = "", h(), l.value = [], i.value = !1, e.opened() && b();
535
- }, { flush: "sync" }), D([e.opened, e.disabled], () => {
549
+ }, { flush: "sync" }), I([e.opened, e.disabled], () => {
536
550
  !e.opened() || e.disabled() ? h() : b();
537
551
  }, { immediate: !0 }), ie(() => {
538
552
  h(), d.clear();
@@ -572,8 +586,8 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
572
586
  if (l.disabled) return;
573
587
  const h = c.value.slice(0, y);
574
588
  u && h.push(u);
575
- const b = u ? s.value[y]?.find((C) => C.value === u)?.children : s.value[y];
576
- n("change", h.length ? b?.length ? JSON.stringify([...h, null]) : Pe(h) : "");
589
+ const b = u ? s.value[y]?.find((P) => P.value === u)?.children : s.value[y];
590
+ n("change", h.length ? b?.length ? JSON.stringify([...h, null]) : Ce(h) : "");
577
591
  }
578
592
  return (y, u) => (f(), m("div", {
579
593
  class: "mrp-cascader",
@@ -589,13 +603,13 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
589
603
  "aria-invalid": e.invalid || void 0,
590
604
  "aria-describedby": e.invalid ? `${e.id}-error` : d.value ? `${e.id}-status` : void 0,
591
605
  "aria-required": e.def.required || void 0,
592
- onChange: (C) => A(b, C.target.value)
606
+ onChange: (P) => A(b, P.target.value)
593
607
  }, [
594
608
  q("option", je, x(e.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", e.def.label ?? e.def.field)), 1),
595
- (f(!0), m(U, null, H(h, (C) => (f(), m("option", {
596
- key: C.value,
597
- value: C.value
598
- }, x(C.label), 9, Ge))), 128))
609
+ (f(!0), m(U, null, H(h, (P) => (f(), m("option", {
610
+ key: P.value,
611
+ value: P.value
612
+ }, x(P.label), 9, Ge))), 128))
599
613
  ], 40, Ve))), 128)),
600
614
  d.value ? (f(), m("small", {
601
615
  key: 0,
@@ -608,8 +622,8 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
608
622
  type: "button",
609
623
  onClick: u[0] || (u[0] = //@ts-ignore
610
624
  (...h) => w(i).request && w(i).request(...h))
611
- }, x(e.messages.retry), 1)) : I("", !0)
612
- ], 8, ze)) : I("", !0)
625
+ }, x(e.messages.retry), 1)) : D("", !0)
626
+ ], 8, ze)) : D("", !0)
613
627
  ], 8, He));
614
628
  }
615
629
  }), We = /* @__PURE__ */ ee(Je, [["__scopeId", "data-v-734dde49"]]), Ke = ["id", "value", "aria-labelledby", "aria-invalid", "aria-required", "aria-describedby", "aria-expanded", "aria-controls", "aria-activedescendant", "disabled", "placeholder"], Xe = ["aria-label", "disabled"], Ye = ["aria-label", "disabled"], Qe = ["id"], Ze = ["id", "aria-label", "aria-busy", "aria-multiselectable"], _e = ["id", "aria-selected", "disabled", "onPointermove", "onClick"], ea = {
@@ -633,24 +647,24 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
633
647
  },
634
648
  emits: ["change"],
635
649
  setup(e, { emit: t }) {
636
- const l = e, n = t, i = Ae({ focusOnOpen: !1 }), { root: c, panel: g, opened: s } = i, d = fe({ def: () => l.def, values: () => l.values, loader: () => l.loadOptions, opened: () => s.value, disabled: () => l.disabled === !0 }), { query: A, options: y, loading: u, failed: h, waiting: b, missingLoader: C } = d, R = E(() => ({ ...ae, ...l.messages })), M = E(() => l.def.type === "multiSelect"), F = E(() => M.value ? Ce(l.value) ?? [] : [l.value]), r = E(() => l.def.optionsSource ? y.value : (l.def.options ?? []).filter((v) => `${v.label} ${v.value}`.toLocaleLowerCase().includes(A.value.toLocaleLowerCase())).slice(0, 100)), p = /* @__PURE__ */ new Map(), a = E(() => M.value ? F.value.map((v) => p.get(v) ?? l.def.options?.find((P) => P.value === v)?.label ?? v).join("、") : S.value || l.value), o = k(0), S = k(""), O = k(), N = E(() => `${l.id}-options`), T = E(() => b.value ? R.value.paramOptionsDependencies : l.def.optionsSource && C.value ? R.value.paramOptionsMissingLoader : h.value ? R.value.paramOptionsFailed : u.value ? R.value.paramOptionsLoading : r.value.length ? "" : R.value.paramOptionsEmpty);
637
- D(() => l.value, () => {
650
+ const l = e, n = t, i = Ae({ focusOnOpen: !1 }), { root: c, panel: g, opened: s } = i, d = fe({ def: () => l.def, values: () => l.values, loader: () => l.loadOptions, opened: () => s.value, disabled: () => l.disabled === !0 }), { query: A, options: y, loading: u, failed: h, waiting: b, missingLoader: P } = d, R = E(() => ({ ...ae, ...l.messages })), M = E(() => l.def.type === "multiSelect"), F = E(() => M.value ? Pe(l.value) ?? [] : [l.value]), r = E(() => l.def.optionsSource ? y.value : (l.def.options ?? []).filter((v) => `${v.label} ${v.value}`.toLocaleLowerCase().includes(A.value.toLocaleLowerCase())).slice(0, 100)), p = /* @__PURE__ */ new Map(), a = E(() => M.value ? F.value.map((v) => p.get(v) ?? l.def.options?.find((C) => C.value === v)?.label ?? v).join("、") : S.value || l.value), o = k(0), S = k(""), O = k(), N = E(() => `${l.id}-options`), L = E(() => b.value ? R.value.paramOptionsDependencies : l.def.optionsSource && P.value ? R.value.paramOptionsMissingLoader : h.value ? R.value.paramOptionsFailed : u.value ? R.value.paramOptionsLoading : r.value.length ? "" : R.value.paramOptionsEmpty);
651
+ I(() => l.value, () => {
638
652
  S.value = "";
639
- }), D(r, () => {
653
+ }), I(r, () => {
640
654
  o.value = 0;
641
- }), D(() => [l.def.field, l.def.optionsSource, JSON.stringify(l.def.options)], () => {
655
+ }), I(() => [l.def.field, l.def.optionsSource, JSON.stringify(l.def.options)], () => {
642
656
  p.clear(), S.value = "";
643
- }), D(s, (v) => {
657
+ }), I(s, (v) => {
644
658
  v && V(() => O.value?.focus());
645
659
  });
646
660
  function te(v) {
647
661
  if (!(l.disabled || b.value || u.value || h.value)) {
648
662
  p.set(v.value, v.label);
649
- for (const P of p.keys()) P !== v.value && !F.value.includes(P) && p.delete(P);
663
+ for (const C of p.keys()) C !== v.value && !F.value.includes(C) && p.delete(C);
650
664
  if (M.value) {
651
- const P = F.value.includes(v.value) ? F.value.filter(($) => $ !== v.value) : [...F.value, v.value];
652
- if (P.length > Math.min(l.def.maxItems ?? 100, 100)) return;
653
- n("change", P.length ? Oe(P) : "");
665
+ const C = F.value.includes(v.value) ? F.value.filter(($) => $ !== v.value) : [...F.value, v.value];
666
+ if (C.length > Math.min(l.def.maxItems ?? 100, 100)) return;
667
+ n("change", C.length ? Oe(C) : "");
654
668
  } else
655
669
  n("change", v.value), i.close();
656
670
  V(() => {
@@ -662,7 +676,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
662
676
  v.isComposing || (s.value = !0, A.value = v.target.value);
663
677
  }
664
678
  function z() {
665
- !l.disabled && !b.value && (!l.def.optionsSource || !C.value) && (A.value = "", s.value = !0);
679
+ !l.disabled && !b.value && (!l.def.optionsSource || !P.value) && (A.value = "", s.value = !0);
666
680
  }
667
681
  function pe(v) {
668
682
  if (!(v.isComposing || v.keyCode === 229)) {
@@ -676,8 +690,8 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
676
690
  return;
677
691
  }
678
692
  if (v.key === "Enter") {
679
- const P = r.value[o.value];
680
- P && te(P);
693
+ const C = r.value[o.value];
694
+ C && te(C);
681
695
  return;
682
696
  }
683
697
  r.value.length && (o.value = (o.value + (v.key === "ArrowDown" ? 1 : -1) + r.value.length) % r.value.length, V(() => g.value?.querySelector(`[id="${N.value}-${o.value}"]`)?.scrollIntoView?.({ block: "nearest" })));
@@ -687,7 +701,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
687
701
  function ve() {
688
702
  l.disabled || (n("change", ""), S.value = "", i.close());
689
703
  }
690
- return (v, P) => (f(), m("div", {
704
+ return (v, C) => (f(), m("div", {
691
705
  ref_key: "root",
692
706
  ref: c,
693
707
  class: "mrp-remote-param"
@@ -711,12 +725,12 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
711
725
  "aria-labelledby": `${e.id}-label`,
712
726
  "aria-invalid": e.invalid || void 0,
713
727
  "aria-required": e.def.required || void 0,
714
- "aria-describedby": e.invalid ? `${e.id}-error` : w(b) || e.def.optionsSource && w(C) ? `${e.id}-remote-status` : void 0,
728
+ "aria-describedby": e.invalid ? `${e.id}-error` : w(b) || e.def.optionsSource && w(P) ? `${e.id}-remote-status` : void 0,
715
729
  "aria-autocomplete": "list",
716
730
  "aria-expanded": w(s),
717
731
  "aria-controls": w(s) ? N.value : void 0,
718
732
  "aria-activedescendant": w(s) && r.value.length ? `${N.value}-${o.value}` : void 0,
719
- disabled: e.disabled || w(b) || !!e.def.optionsSource && w(C),
733
+ disabled: e.disabled || w(b) || !!e.def.optionsSource && w(P),
720
734
  placeholder: e.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", e.def.label ?? e.def.field),
721
735
  onClick: z,
722
736
  onInput: le,
@@ -738,8 +752,8 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
738
752
  key: 1,
739
753
  type: "button",
740
754
  "aria-label": e.def.label ?? e.def.field,
741
- disabled: e.disabled || w(b) || !!e.def.optionsSource && w(C),
742
- onClick: P[0] || (P[0] = ($) => w(s) ? w(i).close() : z())
755
+ disabled: e.disabled || w(b) || !!e.def.optionsSource && w(P),
756
+ onClick: C[0] || (C[0] = ($) => w(s) ? w(i).close() : z())
743
757
  }, [
744
758
  W(X, {
745
759
  name: "chevron-down",
@@ -747,11 +761,11 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
747
761
  })
748
762
  ], 8, Ye))
749
763
  ], 2),
750
- w(b) || e.def.optionsSource && w(C) ? (f(), m("small", {
764
+ w(b) || e.def.optionsSource && w(P) ? (f(), m("small", {
751
765
  key: 0,
752
766
  id: `${e.id}-remote-status`,
753
767
  role: "status"
754
- }, x(T.value), 9, Qe)) : I("", !0),
768
+ }, x(L.value), 9, Qe)) : D("", !0),
755
769
  w(s) ? (f(), m("div", {
756
770
  key: 1,
757
771
  ref_key: "panel",
@@ -775,27 +789,27 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
775
789
  class: Y({ active: J === o.value }),
776
790
  disabled: w(u),
777
791
  onPointermove: (me) => o.value = J,
778
- onMousedown: P[1] || (P[1] = he(() => {
792
+ onMousedown: C[1] || (C[1] = he(() => {
779
793
  }, ["prevent"])),
780
794
  onClick: (me) => te($)
781
795
  }, [
782
796
  q("span", null, [
783
- M.value ? (f(), m("span", ea, x(F.value.includes($.value) ? "✓" : ""), 1)) : I("", !0),
797
+ M.value ? (f(), m("span", ea, x(F.value.includes($.value) ? "✓" : ""), 1)) : D("", !0),
784
798
  G(x($.label), 1)
785
799
  ]),
786
- $.label !== $.value ? (f(), m("small", aa, x($.value), 1)) : I("", !0)
800
+ $.label !== $.value ? (f(), m("small", aa, x($.value), 1)) : D("", !0)
787
801
  ], 42, _e))), 128))
788
802
  ], 8, Ze),
789
- T.value ? (f(), m("p", ta, [
790
- G(x(T.value), 1),
803
+ L.value ? (f(), m("p", ta, [
804
+ G(x(L.value), 1),
791
805
  w(h) ? (f(), m("button", {
792
806
  key: 0,
793
807
  type: "button",
794
- onClick: P[2] || (P[2] = //@ts-ignore
808
+ onClick: C[2] || (C[2] = //@ts-ignore
795
809
  (...$) => w(d).request && w(d).request(...$))
796
- }, x(e.messages.retry), 1)) : I("", !0)
797
- ])) : I("", !0)
798
- ], 512)) : I("", !0)
810
+ }, x(e.messages.retry), 1)) : D("", !0)
811
+ ])) : D("", !0)
812
+ ], 512)) : D("", !0)
799
813
  ], 512));
800
814
  }
801
815
  }), na = /* @__PURE__ */ ee(la, [["__scopeId", "data-v-6ad41cf4"]]), ra = {
@@ -823,8 +837,8 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
823
837
  },
824
838
  emits: ["update:modelValue", "query", "reset"],
825
839
  setup(e, { expose: t, emit: l }) {
826
- const n = e, i = l, c = k({ ...n.modelValue }), g = k(null), s = Te();
827
- D(
840
+ const n = e, i = l, c = k({ ...n.modelValue }), g = k(null), s = Le();
841
+ I(
828
842
  () => n.modelValue,
829
843
  (r) => {
830
844
  c.value = { ...r };
@@ -866,14 +880,14 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
866
880
  return "";
867
881
  }
868
882
  }
869
- function C(r, p, a) {
883
+ function P(r, p, a) {
870
884
  return a ? !!b(r, 0) != !!b(r, 1) ? !b(r, p) || void 0 : !0 : void 0;
871
885
  }
872
886
  function R(r, p, a) {
873
887
  const o = r.type === "numberRange", S = c.value[r.field] ?? "", O = [b(S, 0, o), b(S, 1, o)];
874
888
  O[p] = a;
875
- const N = o ? JSON.stringify(O.map((T) => T === "" ? null : Number(T))) : O.join("/");
876
- u(r.field, O.every((T) => !T) ? "" : N);
889
+ const N = o ? JSON.stringify(O.map((L) => L === "" ? null : Number(L))) : O.join("/");
890
+ u(r.field, O.every((L) => !L) ? "" : N);
877
891
  }
878
892
  function M(r) {
879
893
  r.isComposing || i("query");
@@ -886,7 +900,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
886
900
  ref: g,
887
901
  class: "mrp-params"
888
902
  }, [
889
- e.showTitle !== !1 ? (f(), m("span", ra, x(e.messages.paramsTitle), 1)) : I("", !0),
903
+ e.showTitle !== !1 ? (f(), m("span", ra, x(e.messages.paramsTitle), 1)) : D("", !0),
890
904
  q("div", ia, [
891
905
  (f(!0), m(U, null, H(A.value, (a) => (f(), m("label", {
892
906
  key: a.id,
@@ -897,7 +911,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
897
911
  class: "mrp-param-label"
898
912
  }, [
899
913
  G(x(a.label), 1),
900
- a.def.required ? (f(), m("i", oa, "*")) : I("", !0)
914
+ a.def.required ? (f(), m("i", oa, "*")) : D("", !0)
901
915
  ], 8, sa),
902
916
  a.def.type === "cascader" ? (f(), ne(We, {
903
917
  key: 0,
@@ -958,7 +972,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
958
972
  min: a.def.min,
959
973
  max: a.def.max,
960
974
  "aria-label": `${a.label} · ${o}`,
961
- "aria-invalid": a.def.type === "numberRange" ? !!a.error || void 0 : C(a.value, S, a.error),
975
+ "aria-invalid": a.def.type === "numberRange" ? !!a.error || void 0 : P(a.value, S, a.error),
962
976
  "aria-describedby": a.error ? `${a.id}-error` : void 0,
963
977
  "aria-required": a.def.required || void 0,
964
978
  onInput: (O) => R(a.def, S, O.target.value),
@@ -988,7 +1002,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
988
1002
  id: `${a.id}-error`,
989
1003
  class: "mrp-param-error",
990
1004
  role: "status"
991
- }, x(w(ce)(a.error, e.defs, e.messages)), 9, ma)) : I("", !0)
1005
+ }, x(w(ce)(a.error, e.defs, e.messages)), 9, ma)) : D("", !0)
992
1006
  ], 2))), 128))
993
1007
  ]),
994
1008
  e.showActions !== !1 ? (f(), m("div", ga, [
@@ -1004,7 +1018,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
1004
1018
  disabled: e.disabled,
1005
1019
  onClick: p[1] || (p[1] = (a) => r.$emit("reset"))
1006
1020
  }, x(e.messages.reset), 9, ya)
1007
- ])) : I("", !0)
1021
+ ])) : D("", !0)
1008
1022
  ], 512));
1009
1023
  }
1010
1024
  }), Na = /* @__PURE__ */ ee(ha, [["__scopeId", "data-v-e74206d7"]]);
@@ -1020,16 +1034,16 @@ export {
1020
1034
  Me as d,
1021
1035
  $e as e,
1022
1036
  ka as f,
1023
- Ia as g,
1037
+ Da as g,
1024
1038
  $a as h,
1025
1039
  Ra as i,
1026
1040
  qa as j,
1027
1041
  Ae as k,
1028
- La as l,
1029
- Ta as n,
1042
+ Ta as l,
1043
+ La as n,
1030
1044
  Oa as p,
1031
1045
  Aa as r,
1032
1046
  xa as s,
1033
1047
  Fa as t,
1034
- Da as u
1048
+ Ia as u
1035
1049
  };