@agile-team/mach-report 2.16.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -12
- package/dist/{ExcelBindingWizard-CP6h2x1f.cjs → ExcelBindingWizard-Czn3C2yE.cjs} +1 -1
- package/dist/{ExcelBindingWizard-HhB3hAJE.js → ExcelBindingWizard-DMGZj6I6.js} +3 -3
- package/dist/ParamEditor-KzDQvbHY.js +732 -0
- package/dist/ParamEditor-oDfD8LgE.cjs +1 -0
- package/dist/{ReportBatchPanel-ruxcbfY6.js → ReportBatchPanel-BJK7PvZ4.js} +39 -39
- package/dist/ReportBatchPanel-DnmNRssu.cjs +1 -0
- package/dist/ReportParamPanel-mQkeN70Q.js +1020 -0
- package/dist/ReportParamPanel-sOANVRz-.cjs +1 -0
- package/dist/ReportPreview-BxWWTUL5.js +5583 -0
- package/dist/ReportPreview-Yf99omi3.cjs +6 -0
- package/dist/{ReportTemplateLibrary-DcwrH-63.js → ReportTemplateLibrary-BFjB08Wu.js} +1 -1
- package/dist/{ReportTemplateLibrary-BDlNT8JN.cjs → ReportTemplateLibrary-BO42QnWd.cjs} +1 -1
- package/dist/RuleEditor-CqxT1a-W.js +2337 -0
- package/dist/RuleEditor-D7YWigD9.cjs +1 -0
- package/dist/{TemplateOutlinePanel-CGrT5DFN.cjs → TemplateOutlinePanel-B0XX350V.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-SXCjaPKR.js → TemplateOutlinePanel-zG0DrsIB.js} +2 -2
- package/dist/{TemplateReusePanel-6Z3wRFz8.cjs → TemplateReusePanel-BD0HSKp_.cjs} +1 -1
- package/dist/{TemplateReusePanel-lHLOS9Wn.js → TemplateReusePanel-Czwe5GbC.js} +2 -2
- package/dist/{TemplateReviewPanel-Dpk7sLcF.cjs → TemplateReviewPanel-CA5sdffM.cjs} +1 -1
- package/dist/{TemplateReviewPanel-CJ9PLc48.js → TemplateReviewPanel-NhmQI65C.js} +2 -2
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +163 -42
- package/dist/analytics.d.ts +163 -42
- package/dist/analytics.js +76 -141
- package/dist/artifact-integrity.json +110 -108
- package/dist/assets-2eC3mOcV.js +232 -0
- package/dist/assets-B0Hxn4l6.cjs +1 -0
- package/dist/{auto-uVBjX1j5.cjs → auto-B0EZFIK1.cjs} +1 -1
- package/dist/{auto-YR7a4BtF.js → auto-BlchZ1b8.js} +10 -10
- package/dist/{batch-WzDIXJAt.js → batch-DGCt44XM.js} +1 -1
- package/dist/{batch-z6Aw5GEY.cjs → batch-DYcokH4v.cjs} +1 -1
- package/dist/charts-Dlv8j2AG.js +141 -0
- package/dist/charts-aCtoswXq.cjs +1 -0
- package/dist/codes.cjs +9 -9
- package/dist/codes.d.cts +54 -0
- package/dist/codes.d.ts +54 -0
- package/dist/codes.js +12097 -13668
- package/dist/column-visual-BpgQVWwT.js +238 -0
- package/dist/column-visual-CtYxnBCP.cjs +1 -0
- package/dist/component-tree-6TV7W6Yj.cjs +1 -0
- package/dist/component-tree-CvW4lzpv.js +67 -0
- package/dist/computed-4TnxzgIh.cjs +1 -0
- package/dist/computed-C8NRZQss.js +739 -0
- package/dist/data-bar-Ce38juRZ.cjs +1 -0
- package/dist/data-bar-PtjXhMgN.js +9 -0
- package/dist/dataset-DL83majE.js +161 -0
- package/dist/dataset-IrlXbUvh.cjs +1 -0
- package/dist/designer--TKECSEc.cjs +2 -0
- package/dist/designer-d6hJS41w.js +5683 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +835 -45
- package/dist/designer.d.ts +835 -45
- package/dist/designer.js +23 -20
- package/dist/{encoding-BYF9ZTl9.cjs → encoding-B--eZpp1.cjs} +1 -1
- package/dist/{encoding-BOGq4qYL.js → encoding-mctOLocI.js} +2 -2
- package/dist/{font-loader-EKLzOJxf.cjs → font-loader-DBBJ5KE9.cjs} +1 -1
- package/dist/{font-loader-CzI1GuBc.js → font-loader-DW8tIaNp.js} +1 -1
- package/dist/index-CPh6tqge.js +1575 -0
- package/dist/index-CUNw7dL9.cjs +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +534 -16
- package/dist/index.d.ts +534 -16
- package/dist/index.js +1393 -955
- package/dist/json-snapshot-By4ZVVUt.js +1967 -0
- package/dist/json-snapshot-jiXff4lc.cjs +2 -0
- package/dist/matrix-0hywp0-F.cjs +1 -0
- package/dist/matrix-Dy-tyY7E.js +381 -0
- package/dist/param-validation-C-8sRJLq.cjs +1 -0
- package/dist/param-validation-CnDEd2l-.js +333 -0
- package/dist/{pdf-DJ5S6ukC.js → pdf-CKROKygt.js} +1845 -1845
- package/dist/{pdf-ByVCb1i6.cjs → pdf-DqyxJ96U.cjs} +47 -47
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +66 -0
- package/dist/pdf.d.ts +66 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-C2j5_mhx.js → plugin-ByjF2kiV.js} +5 -5
- package/dist/{plugin-Dr39GBRG.cjs → plugin-DM1M2wlI.cjs} +1 -1
- package/dist/prefill-B8H9qwE4.js +371 -0
- package/dist/prefill-D7EswyTI.cjs +1 -0
- package/dist/{prepared-DqtpvRTn.js → prepared-BE-4jfX5.js} +2 -2
- package/dist/{prepared-DdrjLC7L.cjs → prepared-CGVphji3.cjs} +1 -1
- package/dist/{protocol-BzwMP4Vw.cjs → protocol-ByRVzzQG.cjs} +1 -1
- package/dist/{protocol-kt4Iy6-3.js → protocol-Cr81vFSQ.js} +3 -3
- package/dist/{record-bindings-CZWBJ1fU.js → record-bindings-DEJtmo3p.js} +67 -107
- package/dist/record-bindings-ehjnCDHt.cjs +1 -0
- package/dist/{region-binding-workflow-CWNvIjkV.js → region-binding-workflow-CBg0l_tj.js} +2 -2
- package/dist/{region-binding-workflow-CqSMxQ4p.cjs → region-binding-workflow-D05tOYn3.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{report-params-B1RzkhJj.js → report-params-D9tBuM9B.js} +1 -1
- package/dist/{report-params-WDGrA4oP.cjs → report-params-VTg8MoCp.cjs} +1 -1
- package/dist/runtime-CDA6d263.cjs +1 -0
- package/dist/runtime-CEMvybO7.js +170 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +121 -7
- package/dist/server/node.d.ts +121 -7
- package/dist/server-node.cjs +4 -4
- package/dist/server-node.js +3446 -2115
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +417 -29
- package/dist/server.d.ts +417 -29
- package/dist/server.js +787 -544
- package/dist/sha256-BDQ1Qk7A.js +158 -0
- package/dist/sha256-DgZAKXqI.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/template-bindings-Cg5oBLFT.cjs +1 -0
- package/dist/template-bindings-TKnXM7ll.js +62 -0
- package/dist/{template-catalog-BtR2JmCL.js → template-catalog-CmbWOJqy.js} +16 -16
- package/dist/template-catalog-Utu4GP09.cjs +1 -0
- package/dist/{template-fragments-BVsbxs4a.cjs → template-fragments-C_zSHJAa.cjs} +1 -1
- package/dist/{template-fragments-By0aZC1D.js → template-fragments-DWgo9tlZ.js} +2 -2
- package/dist/{template-outline-BwRV_eRo.cjs → template-outline-DWkzZXVC.cjs} +1 -1
- package/dist/{template-outline-cnWfT_LK.js → template-outline-DiADphlq.js} +1 -1
- package/dist/{template-registry-Cw3vRTX2.js → template-registry-BIhIHOab.js} +319 -314
- package/dist/template-registry-DzWswQI5.cjs +1 -0
- package/dist/vue/async.d.cts +636 -35
- package/dist/vue/async.d.ts +636 -35
- package/dist/vue/index.d.cts +746 -67
- package/dist/vue/index.d.ts +746 -67
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +94 -89
- package/dist/{workbook-session-Cbts-22R.cjs → workbook-session-B94EwVa_.cjs} +1 -1
- package/dist/{workbook-session-BeSO8PFB.js → workbook-session-BoScoOg-.js} +2 -2
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +75 -7
- package/dist/worker.d.ts +75 -7
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +208 -15
- package/dist/xlsx.d.ts +208 -15
- package/dist/xlsx.js +288 -252
- package/package.json +1 -1
- package/dist/ParamEditor-CUQLgoxa.cjs +0 -1
- package/dist/ParamEditor-OKesP_nO.js +0 -594
- package/dist/ReportBatchPanel-cZCAMAwH.cjs +0 -1
- package/dist/ReportPreview-BcDKCLiK.js +0 -4834
- package/dist/ReportPreview-Bk9nLfO9.cjs +0 -6
- package/dist/RuleEditor-BX5S8RSF.cjs +0 -1
- package/dist/RuleEditor-CGl9XY2s.js +0 -2037
- package/dist/assets-CqIbfbTr.js +0 -126
- package/dist/assets-e4YSke8n.cjs +0 -1
- package/dist/capabilities-DDwXr_cA.js +0 -103
- package/dist/capabilities-DNLyZdNw.cjs +0 -1
- package/dist/component-tree-Ca6YYfHq.js +0 -61
- package/dist/component-tree-DkGLEfZC.cjs +0 -1
- package/dist/computed-C-4C2S5h.js +0 -521
- package/dist/computed-CGV2a809.cjs +0 -1
- package/dist/config-Dg_o8e7m.cjs +0 -1
- package/dist/config-XQ4qrQ7Q.js +0 -844
- package/dist/dataset-BkRmwgeJ.cjs +0 -1
- package/dist/dataset-H5pFuQGU.js +0 -121
- package/dist/designer-BfQSahxq.js +0 -5163
- package/dist/designer-CPPdeM5_.cjs +0 -2
- package/dist/diagnostic-notification-B9K9We3h.cjs +0 -1
- package/dist/diagnostic-notification-qGAYZdkB.js +0 -7
- package/dist/drill-CsdjgkRM.cjs +0 -1
- package/dist/drill-DIGsZfyB.js +0 -145
- package/dist/json-snapshot-D6ioHth9.js +0 -1702
- package/dist/json-snapshot-DknkjvxP.cjs +0 -2
- package/dist/matrix-CGRGkn5s.js +0 -112
- package/dist/matrix-gEO7ZM_u.cjs +0 -1
- package/dist/param-validation-C3HlcLLO.cjs +0 -1
- package/dist/param-validation-Do7Eg8Zv.js +0 -181
- package/dist/record-bindings-DUX1VMlR.cjs +0 -1
- package/dist/runtime-BjKBI530.js +0 -168
- package/dist/runtime-CBFEPKEs.cjs +0 -1
- package/dist/sha256-BshdOkCC.cjs +0 -1
- package/dist/sha256-DTG-Gq8i.js +0 -157
- package/dist/template-bindings-C2SpvsMU.js +0 -58
- package/dist/template-bindings-CEtWyiLX.cjs +0 -1
- package/dist/template-catalog-C2NLdrwB.cjs +0 -1
- package/dist/template-registry-C62vpv4a.cjs +0 -1
- package/dist/tree-BX380Rr7.cjs +0 -1
- package/dist/tree-CjVZLRw7.js +0 -172
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
const U = Object.freeze({ maxRows: 1e5, maxPages: 1e4, maxCells: 2e6, maxChartComponents: 5e4, maxOutputBytes: 1e8, maxPreparedBytes: 64e6, maxDurationMs: 12e4 });
|
|
2
|
+
class f extends Error {
|
|
3
|
+
constructor(t, n, r) {
|
|
4
|
+
super(n), this.code = t, this.path = r, this.name = "ReportRuntimeError";
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
function h(e) {
|
|
8
|
+
if (!e?.aborted) return;
|
|
9
|
+
if (e.reason instanceof f) throw e.reason;
|
|
10
|
+
const t = new Error("报表执行已取消");
|
|
11
|
+
throw t.name = "AbortError", Object.defineProperty(t, "cause", { value: e.reason }), t;
|
|
12
|
+
}
|
|
13
|
+
function C(e, t, n) {
|
|
14
|
+
if (!Number.isFinite(n) || n < 0) throw new f("budget", `${t} 的执行统计无效`, `$.budget.${t}`);
|
|
15
|
+
const r = e[t];
|
|
16
|
+
if (r !== void 0 && n > r) throw new f("budget", `${t} 超出预算 ${r}(实际 ${n})`, `$.budget.${t}`);
|
|
17
|
+
}
|
|
18
|
+
function R(e) {
|
|
19
|
+
for (const [t, n] of Object.entries(e)) {
|
|
20
|
+
if (n !== void 0 && (!Number.isFinite(n) || n <= 0)) throw new f("budget", `${t} 应为正有限数字`, `$.budget.${t}`);
|
|
21
|
+
if (t !== "maxDurationMs" && n !== void 0 && !Number.isSafeInteger(n)) throw new f("budget", `${t} 应为正安全整数`, `$.budget.${t}`);
|
|
22
|
+
if (t === "maxDurationMs" && n !== void 0 && n > 2147483647) throw new f("budget", "maxDurationMs 不能超过 2147483647", `$.budget.${t}`);
|
|
23
|
+
if (t === "maxChartComponents" && n !== void 0 && n > 1e6) throw new f("budget", "maxChartComponents 不能超过 1000000", "$.budget.maxChartComponents");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async function L(e, t, n) {
|
|
27
|
+
const r = new AbortController(), o = () => r.abort(e?.reason);
|
|
28
|
+
e?.addEventListener("abort", o, { once: !0 }), e?.aborted && o();
|
|
29
|
+
const a = Date.now(), i = t === void 0 ? void 0 : setTimeout(() => r.abort(new f("timeout", `报表执行超过 ${t}ms`)), t);
|
|
30
|
+
let s;
|
|
31
|
+
try {
|
|
32
|
+
h(r.signal);
|
|
33
|
+
const d = new Promise((m, u) => {
|
|
34
|
+
s = () => {
|
|
35
|
+
try {
|
|
36
|
+
h(r.signal);
|
|
37
|
+
} catch (w) {
|
|
38
|
+
u(w);
|
|
39
|
+
}
|
|
40
|
+
}, r.signal.addEventListener("abort", s, { once: !0 });
|
|
41
|
+
}), b = await Promise.race([n(r.signal), d]);
|
|
42
|
+
if (h(r.signal), t !== void 0 && Date.now() - a > t) throw new f("timeout", `报表执行超过 ${t}ms`);
|
|
43
|
+
return b;
|
|
44
|
+
} finally {
|
|
45
|
+
i !== void 0 && clearTimeout(i), s && r.signal.removeEventListener("abort", s), e?.removeEventListener("abort", o);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const D = new Uint32Array([
|
|
49
|
+
1116352408,
|
|
50
|
+
1899447441,
|
|
51
|
+
3049323471,
|
|
52
|
+
3921009573,
|
|
53
|
+
961987163,
|
|
54
|
+
1508970993,
|
|
55
|
+
2453635748,
|
|
56
|
+
2870763221,
|
|
57
|
+
3624381080,
|
|
58
|
+
310598401,
|
|
59
|
+
607225278,
|
|
60
|
+
1426881987,
|
|
61
|
+
1925078388,
|
|
62
|
+
2162078206,
|
|
63
|
+
2614888103,
|
|
64
|
+
3248222580,
|
|
65
|
+
3835390401,
|
|
66
|
+
4022224774,
|
|
67
|
+
264347078,
|
|
68
|
+
604807628,
|
|
69
|
+
770255983,
|
|
70
|
+
1249150122,
|
|
71
|
+
1555081692,
|
|
72
|
+
1996064986,
|
|
73
|
+
2554220882,
|
|
74
|
+
2821834349,
|
|
75
|
+
2952996808,
|
|
76
|
+
3210313671,
|
|
77
|
+
3336571891,
|
|
78
|
+
3584528711,
|
|
79
|
+
113926993,
|
|
80
|
+
338241895,
|
|
81
|
+
666307205,
|
|
82
|
+
773529912,
|
|
83
|
+
1294757372,
|
|
84
|
+
1396182291,
|
|
85
|
+
1695183700,
|
|
86
|
+
1986661051,
|
|
87
|
+
2177026350,
|
|
88
|
+
2456956037,
|
|
89
|
+
2730485921,
|
|
90
|
+
2820302411,
|
|
91
|
+
3259730800,
|
|
92
|
+
3345764771,
|
|
93
|
+
3516065817,
|
|
94
|
+
3600352804,
|
|
95
|
+
4094571909,
|
|
96
|
+
275423344,
|
|
97
|
+
430227734,
|
|
98
|
+
506948616,
|
|
99
|
+
659060556,
|
|
100
|
+
883997877,
|
|
101
|
+
958139571,
|
|
102
|
+
1322822218,
|
|
103
|
+
1537002063,
|
|
104
|
+
1747873779,
|
|
105
|
+
1955562222,
|
|
106
|
+
2024104815,
|
|
107
|
+
2227730452,
|
|
108
|
+
2361852424,
|
|
109
|
+
2428436474,
|
|
110
|
+
2756734187,
|
|
111
|
+
3204031479,
|
|
112
|
+
3329325298
|
|
113
|
+
]), c = (e, t) => e >>> t | e << 32 - t;
|
|
114
|
+
function l(e, t, n) {
|
|
115
|
+
const r = new DataView(e.buffer, e.byteOffset + t, 64);
|
|
116
|
+
for (let o = 0; o < 16; o++) n[o] = r.getUint32(o * 4);
|
|
117
|
+
for (let o = 16; o < 64; o++) {
|
|
118
|
+
const a = n[o - 15], i = n[o - 2], s = c(a, 7) ^ c(a, 18) ^ a >>> 3, d = c(i, 17) ^ c(i, 19) ^ i >>> 10;
|
|
119
|
+
n[o] = n[o - 16] + s + n[o - 7] + d;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function v(e, t) {
|
|
123
|
+
let n = e[0], r = e[1], o = e[2], a = e[3], i = e[4], s = e[5], d = e[6], b = e[7];
|
|
124
|
+
for (let m = 0; m < 64; m++) {
|
|
125
|
+
const u = c(i, 6) ^ c(i, 11) ^ c(i, 25), w = i & s ^ ~i & d, g = b + u + w + D[m] + t[m] >>> 0, p = c(n, 2) ^ c(n, 13) ^ c(n, 22), A = n & r ^ n & o ^ r & o, E = p + A >>> 0;
|
|
126
|
+
b = d, d = s, s = i, i = a + g >>> 0, a = o, o = r, r = n, n = g + E >>> 0;
|
|
127
|
+
}
|
|
128
|
+
e[0] = e[0] + n, e[1] = e[1] + r, e[2] = e[2] + o, e[3] = e[3] + a, e[4] = e[4] + i, e[5] = e[5] + s, e[6] = e[6] + d, e[7] = e[7] + b;
|
|
129
|
+
}
|
|
130
|
+
function x(e) {
|
|
131
|
+
const t = new Uint8Array(Math.ceil((e.byteLength + 9) / 64) * 64);
|
|
132
|
+
t.set(e), t[e.byteLength] = 128;
|
|
133
|
+
const n = new DataView(t.buffer);
|
|
134
|
+
return n.setUint32(t.length - 8, Math.floor(e.byteLength / 536870912)), n.setUint32(t.length - 4, e.byteLength * 8 >>> 0), t;
|
|
135
|
+
}
|
|
136
|
+
const y = () => new Uint32Array([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]), $ = (e) => Array.from(e, (t) => t.toString(16).padStart(8, "0")).join("");
|
|
137
|
+
function O(e) {
|
|
138
|
+
const t = x(e), n = y(), r = new Uint32Array(64);
|
|
139
|
+
for (let o = 0; o < t.length; o += 64)
|
|
140
|
+
l(t, o, r), v(n, r);
|
|
141
|
+
return $(n);
|
|
142
|
+
}
|
|
143
|
+
async function P(e) {
|
|
144
|
+
const t = x(e), n = y(), r = new Uint32Array(64);
|
|
145
|
+
for (let o = 0; o < t.length; o += 64)
|
|
146
|
+
o > 0 && o % 262144 === 0 && await new Promise((a) => setTimeout(a, 0)), l(t, o, r), v(n, r);
|
|
147
|
+
return $(n);
|
|
148
|
+
}
|
|
149
|
+
export {
|
|
150
|
+
U as D,
|
|
151
|
+
f as R,
|
|
152
|
+
P as a,
|
|
153
|
+
C as b,
|
|
154
|
+
L as c,
|
|
155
|
+
O as p,
|
|
156
|
+
h as t,
|
|
157
|
+
R as v
|
|
158
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const U=Object.freeze({maxRows:1e5,maxPages:1e4,maxCells:2e6,maxChartComponents:5e4,maxOutputBytes:1e8,maxPreparedBytes:64e6,maxDurationMs:12e4});class d extends Error{constructor(t,r,n){super(r),this.code=t,this.path=n,this.name="ReportRuntimeError"}}function m(e){if(!e?.aborted)return;if(e.reason instanceof d)throw e.reason;const t=new Error("报表执行已取消");throw t.name="AbortError",Object.defineProperty(t,"cause",{value:e.reason}),t}function R(e,t,r){if(!Number.isFinite(r)||r<0)throw new d("budget",`${t} 的执行统计无效`,`$.budget.${t}`);const n=e[t];if(n!==void 0&&r>n)throw new d("budget",`${t} 超出预算 ${n}(实际 ${r})`,`$.budget.${t}`)}function D(e){for(const[t,r]of Object.entries(e)){if(r!==void 0&&(!Number.isFinite(r)||r<=0))throw new d("budget",`${t} 应为正有限数字`,`$.budget.${t}`);if(t!=="maxDurationMs"&&r!==void 0&&!Number.isSafeInteger(r))throw new d("budget",`${t} 应为正安全整数`,`$.budget.${t}`);if(t==="maxDurationMs"&&r!==void 0&&r>2147483647)throw new d("budget","maxDurationMs 不能超过 2147483647",`$.budget.${t}`);if(t==="maxChartComponents"&&r!==void 0&&r>1e6)throw new d("budget","maxChartComponents 不能超过 1000000","$.budget.maxChartComponents")}}async function T(e,t,r){const n=new AbortController,o=()=>n.abort(e?.reason);e?.addEventListener("abort",o,{once:!0}),e?.aborted&&o();const a=Date.now(),i=t===void 0?void 0:setTimeout(()=>n.abort(new d("timeout",`报表执行超过 ${t}ms`)),t);let s;try{m(n.signal);const f=new Promise((u,l)=>{s=()=>{try{m(n.signal)}catch(h){l(h)}},n.signal.addEventListener("abort",s,{once:!0})}),b=await Promise.race([r(n.signal),f]);if(m(n.signal),t!==void 0&&Date.now()-a>t)throw new d("timeout",`报表执行超过 ${t}ms`);return b}finally{i!==void 0&&clearTimeout(i),s&&n.signal.removeEventListener("abort",s),e?.removeEventListener("abort",o)}}const C=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),c=(e,t)=>e>>>t|e<<32-t;function g(e,t,r){const n=new DataView(e.buffer,e.byteOffset+t,64);for(let o=0;o<16;o++)r[o]=n.getUint32(o*4);for(let o=16;o<64;o++){const a=r[o-15],i=r[o-2],s=c(a,7)^c(a,18)^a>>>3,f=c(i,17)^c(i,19)^i>>>10;r[o]=r[o-16]+s+r[o-7]+f}}function v(e,t){let r=e[0],n=e[1],o=e[2],a=e[3],i=e[4],s=e[5],f=e[6],b=e[7];for(let u=0;u<64;u++){const l=c(i,6)^c(i,11)^c(i,25),h=i&s^~i&f,w=b+l+h+C[u]+t[u]>>>0,E=c(r,2)^c(r,13)^c(r,22),A=r&n^r&o^n&o,p=E+A>>>0;b=f,f=s,s=i,i=a+w>>>0,a=o,o=n,n=r,r=w+p>>>0}e[0]=e[0]+r,e[1]=e[1]+n,e[2]=e[2]+o,e[3]=e[3]+a,e[4]=e[4]+i,e[5]=e[5]+s,e[6]=e[6]+f,e[7]=e[7]+b}function x(e){const t=new Uint8Array(Math.ceil((e.byteLength+9)/64)*64);t.set(e),t[e.byteLength]=128;const r=new DataView(t.buffer);return r.setUint32(t.length-8,Math.floor(e.byteLength/536870912)),r.setUint32(t.length-4,e.byteLength*8>>>0),t}const y=()=>new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$=e=>Array.from(e,t=>t.toString(16).padStart(8,"0")).join("");function L(e){const t=x(e),r=y(),n=new Uint32Array(64);for(let o=0;o<t.length;o+=64)g(t,o,n),v(r,n);return $(r)}async function B(e){const t=x(e),r=y(),n=new Uint32Array(64);for(let o=0;o<t.length;o+=64)o>0&&o%262144===0&&await new Promise(a=>setTimeout(a,0)),g(t,o,n),v(r,n);return $(r)}exports.DEFAULT_REPORT_RUNTIME_BUDGET=U;exports.ReportRuntimeError=d;exports.assertBudget=R;exports.controlled=T;exports.portableSha256Hex=L;exports.portableSha256HexAsync=B;exports.throwIfAborted=m;exports.validateBudget=D;
|