@guodun/antdv 1.7.12 → 1.7.14
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/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +373 -295
- package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +219 -202
- package/dist/es/components/contract-signing-location/src/ContractSigningTemplatePage.vue.mjs +18 -18
- package/dist/es/components/contract-signing-location/src/template-source.mjs +62 -49
- package/dist/es/components/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/index.mjs +1 -0
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.mjs +37 -42
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.mjs +69 -55
- package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.mjs +278 -270
- package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +344 -343
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1025 -964
- package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +120 -74
- package/dist/es/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.mjs +72 -59
- package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +133 -132
- package/dist/es/components/pro-contract-template-designer/src/utils/contract-layout-check.mjs +239 -0
- package/dist/es/components/pro-contract-template-designer/src/utils/contract-print-document.mjs +95 -71
- package/dist/es/components/pro-contract-template-designer/src/utils/page-decorations.mjs +67 -76
- package/dist/es/components/pro-contract-template-designer/src/utils/signing-layout-presets.mjs +77 -61
- package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +96 -83
- package/dist/es/components/pro-contract-template-designer/src/utils/template-variable-render.mjs +23 -15
- package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/es/contract-print-css/index.mjs +134 -30
- package/dist/es/contract-print.mjs +2 -0
- package/dist/es/index.mjs +21 -20
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/ContractSigningTemplatePage.vue.cjs +1 -1
- package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
- package/dist/lib/components/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/index.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplatePreviewPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateRendererPage.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/SigningLayoutCustomModal.vue.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
- package/dist/lib/components/pro-contract-template-designer/src/utils/contract-layout-check.cjs +1 -0
- package/dist/lib/components/pro-contract-template-designer/src/utils/contract-print-document.cjs +50 -28
- package/dist/lib/components/pro-contract-template-designer/src/utils/page-decorations.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/signing-layout-presets.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +5 -5
- package/dist/lib/components/pro-contract-template-designer/src/utils/template-variable-render.cjs +1 -1
- package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
- package/dist/lib/contract-print-css/index.cjs +74 -23
- package/dist/lib/contract-print.cjs +1 -0
- package/dist/lib/index.cjs +1 -1
- package/dist/theme/icon.css +1 -1
- package/dist/theme/index.css +1 -1
- package/dist/types/components/contract-signing-location/src/ContractSigningLocation.vue.d.ts +9 -0
- package/dist/types/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.d.ts +7 -0
- package/dist/types/components/contract-signing-location/src/template-source.d.ts +6 -0
- package/dist/types/components/pro-contract-template-designer/index.d.ts +1 -0
- package/dist/types/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.d.ts +2 -0
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +5 -1
- package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +7 -2
- package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +2 -2
- package/dist/types/components/pro-contract-template-designer/src/types.d.ts +36 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/contract-layout-check.d.ts +104 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/contract-print-document.d.ts +4 -1
- package/dist/types/components/pro-contract-template-designer/src/utils/page-decorations.d.ts +2 -8
- package/dist/types/components/pro-contract-template-designer/src/utils/signing-layout-presets.d.ts +9 -0
- package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +6 -1
- package/dist/types/contract-print-css/index.d.ts +70 -0
- package/dist/types/contract-print.d.ts +2 -0
- package/package.json +14 -2
|
@@ -1,18 +1,68 @@
|
|
|
1
1
|
//#region src/contract-print-css/index.ts
|
|
2
|
-
var e =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var e = {
|
|
3
|
+
top: 54,
|
|
4
|
+
right: 64,
|
|
5
|
+
bottom: 54,
|
|
6
|
+
left: 64
|
|
7
|
+
}, t = 80, n = 1, r = "contract-render-css-1.1.0";
|
|
8
|
+
function i(e, t = 1) {
|
|
9
|
+
return e?.enabled ? Object.values(e.slots).some((e) => e.trim()) && (t !== 1 || e.showOnFirstPage) : !1;
|
|
10
|
+
}
|
|
11
|
+
function a(e) {
|
|
12
|
+
return Math.max(80, e.offset + Math.ceil(e.fontSize * 1.5) + 20);
|
|
13
|
+
}
|
|
14
|
+
function o(t, n = 1) {
|
|
15
|
+
let r = t?.header, o = t?.footer;
|
|
16
|
+
return {
|
|
17
|
+
top: r && i(r, n) ? Math.max(e.top, a(r)) : e.top,
|
|
18
|
+
right: e.right,
|
|
19
|
+
bottom: o && i(o, n) ? Math.max(e.bottom, a(o)) : e.bottom,
|
|
20
|
+
left: e.left
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function s(e, t) {
|
|
24
|
+
let n = e.ownerDocument.defaultView, r = n.getComputedStyle(e), i = e.getBoundingClientRect(), a = i.width / (e.offsetWidth || t.width) || 1, o = Number.parseFloat(r.paddingTop) || 0, s = Number.parseFloat(r.paddingBottom) || 0, c = Number.parseFloat(r.paddingLeft) || 0, l = Number.parseFloat(r.paddingRight) || 0, u = Number.parseFloat(r.borderTopWidth) || 0, d = Number.parseFloat(r.borderLeftWidth) || 0, f = ".gd-contract-template-page__header, .gd-contract-template-page__footer, .gd-contract-template-page__watermark", p = e.querySelector(t.contentSelector || ".gd-contract-template-page__content") || e, m = c + d, h = o + u, g = t.width - l, _ = t.height - s, v = m, y = h, b = m, x = h, S = (e) => {
|
|
25
|
+
e.width > 0 && e.height > 0 && (v = Math.min(v, (e.left - i.left) / a), y = Math.min(y, (e.top - i.top) / a), b = Math.max(b, (e.right - i.left) / a), x = Math.max(x, (e.bottom - i.top) / a));
|
|
26
|
+
}, C = (e) => {
|
|
27
|
+
let t = n.getComputedStyle(e);
|
|
28
|
+
return t.display !== "none" && t.visibility !== "hidden";
|
|
29
|
+
}, w = "[data-template-variable=\"true\"], .gd-contract-template-variable";
|
|
30
|
+
for (let e of Array.from(p.querySelectorAll("*"))) e.closest(f) !== null || !C(e) || e.closest(w) !== null && !e.matches(w) || S(e.getBoundingClientRect());
|
|
31
|
+
let T = e.ownerDocument.createTreeWalker(p, 4), E;
|
|
32
|
+
for (; E = T.nextNode();) {
|
|
33
|
+
let t = E.parentElement;
|
|
34
|
+
if (!E.textContent?.trim() || !t || t.closest(f) !== null || !C(t) || t.closest(w) !== null) continue;
|
|
35
|
+
let n = e.ownerDocument.createRange();
|
|
36
|
+
n.selectNodeContents(E);
|
|
37
|
+
for (let e of Array.from(n.getClientRects())) S(e);
|
|
38
|
+
n.detach();
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
pageWidth: e.offsetWidth,
|
|
42
|
+
pageHeight: e.offsetHeight,
|
|
43
|
+
contentHeight: Math.max(t.height, x + s),
|
|
44
|
+
overflowHeight: Math.max(0, h - y, x - _),
|
|
45
|
+
overflowWidth: Math.max(0, m - v, b - g),
|
|
46
|
+
paddingTop: o,
|
|
47
|
+
paddingBottom: s,
|
|
48
|
+
paddingLeft: c,
|
|
49
|
+
paddingRight: l
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
var c = "data-contract-render-style=\"true\"", l = "\"GD Contract Latin\", \"Songti SC\", SimSun, \"Noto Serif CJK SC\", \"Source Han Serif SC\", serif", u = "\"GD Contract Latin Sans\", \"PingFang SC\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", sans-serif", d = 8e3, f = "text-spacing-trim: space-all;\n font-kerning: none;\n font-variant-ligatures: none;\n font-variant-east-asian: normal;\n font-synthesis: none;\n font-feature-settings: \"palt\" 0, \"halt\" 0;\n font-optical-sizing: none;";
|
|
53
|
+
function p(t) {
|
|
54
|
+
let n = v(t.width, "width"), r = v(t.height, "height"), i = t.pages.map((e) => {
|
|
55
|
+
let t = _(e.pageSize?.width) ? e.pageSize.width : n, i = _(e.pageSize?.height) ? e.pageSize.height : r;
|
|
56
|
+
return `.gd-contract-template-page[data-page-id="${g(e.id)}"] { width: ${t}px; min-height: ${i}px; }`;
|
|
7
57
|
}).join("\n");
|
|
8
|
-
return `${
|
|
9
|
-
@page { size: ${
|
|
58
|
+
return `${h()}
|
|
59
|
+
@page { size: ${n}px ${r}px; margin: 0; }
|
|
10
60
|
* { box-sizing: border-box; }
|
|
11
61
|
html, body { margin: 0; padding: 0; background: #fff; }
|
|
12
62
|
body {
|
|
13
63
|
color: #262a33;
|
|
14
64
|
font-size: 16px;
|
|
15
|
-
font-family: ${
|
|
65
|
+
font-family: ${l};
|
|
16
66
|
line-height: 1.75;
|
|
17
67
|
-webkit-print-color-adjust: exact;
|
|
18
68
|
print-color-adjust: exact;
|
|
@@ -20,25 +70,26 @@ body {
|
|
|
20
70
|
.gd-contract-template-page {
|
|
21
71
|
position: relative;
|
|
22
72
|
box-sizing: border-box;
|
|
23
|
-
width: ${
|
|
24
|
-
min-height: ${
|
|
25
|
-
padding:
|
|
73
|
+
width: ${n}px;
|
|
74
|
+
min-height: ${r}px;
|
|
75
|
+
padding: ${e.top}px ${e.right}px ${e.bottom}px ${e.left}px;
|
|
26
76
|
overflow: hidden;
|
|
27
77
|
color: #262a33;
|
|
28
78
|
font-size: 16px;
|
|
29
|
-
font-family: ${
|
|
79
|
+
font-family: ${l};
|
|
30
80
|
line-height: 1.75;
|
|
31
|
-
${
|
|
81
|
+
${f}
|
|
32
82
|
break-after: page;
|
|
33
83
|
page-break-after: always;
|
|
34
84
|
}
|
|
35
85
|
.gd-contract-template-page *,
|
|
36
86
|
.gd-contract-template-page *::before,
|
|
37
87
|
.gd-contract-template-page *::after { box-sizing: border-box; }
|
|
38
|
-
|
|
88
|
+
/* 安全区用 :where 压到基础页规则同级(0,1,0):晚于基础规则生效,但仍低于模板类级 padding(0,2,0)与内联样式。 */
|
|
89
|
+
.gd-contract-template-page:where(.has-contract-header) {
|
|
39
90
|
padding-top: var(--gd-contract-header-safe-padding, 80px);
|
|
40
91
|
}
|
|
41
|
-
.gd-contract-template-page.has-contract-footer {
|
|
92
|
+
.gd-contract-template-page:where(.has-contract-footer) {
|
|
42
93
|
padding-bottom: var(--gd-contract-footer-safe-padding, 80px);
|
|
43
94
|
}
|
|
44
95
|
.gd-contract-template-page__content { position: relative; z-index: 1; }
|
|
@@ -97,23 +148,28 @@ body {
|
|
|
97
148
|
white-space: nowrap;
|
|
98
149
|
transform-origin: center;
|
|
99
150
|
}
|
|
100
|
-
${
|
|
151
|
+
${i}
|
|
101
152
|
.gd-contract-template-page:last-child { break-after: auto; page-break-after: auto; }
|
|
102
153
|
.gd-contract-template-page p { margin: 0 0 10px; }
|
|
103
154
|
.gd-contract-template-page table { width: 100%; border-collapse: collapse; }
|
|
104
155
|
.gd-contract-template-page th,
|
|
105
156
|
.gd-contract-template-page td { min-width: 80px; padding: 6px 8px; border: 1px solid #d9dce0; }
|
|
106
|
-
|
|
107
|
-
|
|
157
|
+
/* 全部签署版式统一:固定表格布局,单元格水平内边距 20px,列宽由表格宽度均分。纵向几何保持修复前的打印值,避免已生成合同的页高变化:双方并排 16px 外边距 / 8px 内边距;其余版式无外边距、6px 内边距。其余版式的灰色边框改为透明 1px,仍占位但不可见(与设计器「正式签署区无边框」一致)。 */
|
|
158
|
+
.gd-contract-template-page table[data-signing-layout] {
|
|
159
|
+
table-layout: fixed;
|
|
108
160
|
border: 0;
|
|
109
161
|
}
|
|
162
|
+
.gd-contract-template-page table[data-signing-layout="dual-party"] { margin: 16px 0; }
|
|
163
|
+
.gd-contract-template-page table[data-signing-layout] th,
|
|
164
|
+
.gd-contract-template-page table[data-signing-layout] td {
|
|
165
|
+
padding: 6px 20px;
|
|
166
|
+
border: 1px solid transparent;
|
|
167
|
+
vertical-align: top;
|
|
168
|
+
}
|
|
110
169
|
.gd-contract-template-page table[data-signing-layout="dual-party"] td {
|
|
111
|
-
width: 50%;
|
|
112
170
|
padding: 8px 20px;
|
|
113
171
|
border: 0;
|
|
114
|
-
vertical-align: top;
|
|
115
172
|
}
|
|
116
|
-
.gd-contract-template-page table[data-signing-layout="dual-party"] td + td { padding-left: 28px; }
|
|
117
173
|
.gd-contract-template-page img {
|
|
118
174
|
display: inline-block;
|
|
119
175
|
max-width: 100%;
|
|
@@ -164,7 +220,7 @@ ${u}
|
|
|
164
220
|
}
|
|
165
221
|
.gd-contract-template-page code,
|
|
166
222
|
.gd-contract-template-page kbd,
|
|
167
|
-
.gd-contract-template-page samp { font-family: ${
|
|
223
|
+
.gd-contract-template-page samp { font-family: ${u}; }
|
|
168
224
|
.gd-contract-template-page hr {
|
|
169
225
|
display: block;
|
|
170
226
|
margin: 0.5em auto;
|
|
@@ -287,9 +343,34 @@ ${u}
|
|
|
287
343
|
min-width: 0;
|
|
288
344
|
padding: 0 6px;
|
|
289
345
|
}
|
|
346
|
+
/* 单选:宽度随选项换行,不能沿用单行 nowrap 的固定宽。浏览器渲染器(…__choice-*)与 Node 填值(gd-contract-choice-*)两套类名都要覆盖,否则度量与 PDF 盒模型不一致。 */
|
|
347
|
+
.gd-contract-template-page .gd-contract-template-variable.is-radio,
|
|
348
|
+
.gd-contract-template-page [data-template-variable="true"][data-variable-type="radio"]:not(.gd-contract-template-page__variable) {
|
|
349
|
+
flex-wrap: wrap;
|
|
350
|
+
width: auto;
|
|
351
|
+
max-width: 100%;
|
|
352
|
+
white-space: normal;
|
|
353
|
+
gap: 12px;
|
|
354
|
+
}
|
|
355
|
+
.gd-contract-template-page .gd-contract-choice-option,
|
|
356
|
+
.gd-contract-template-page .gd-contract-template-variable__choice-option {
|
|
357
|
+
display: inline-flex;
|
|
358
|
+
align-items: center;
|
|
359
|
+
gap: 4px;
|
|
360
|
+
white-space: nowrap;
|
|
361
|
+
}
|
|
362
|
+
.gd-contract-template-page .gd-contract-choice-mark,
|
|
363
|
+
.gd-contract-template-page .gd-contract-template-variable__choice-mark {
|
|
364
|
+
display: inline-block;
|
|
365
|
+
width: 1em;
|
|
366
|
+
flex: 0 0 1em;
|
|
367
|
+
text-align: center;
|
|
368
|
+
}
|
|
290
369
|
.gd-contract-template-page .gd-contract-template-signing-mark,
|
|
291
370
|
.gd-contract-template-page [data-signing-mark="true"] {
|
|
292
371
|
display: inline-flex;
|
|
372
|
+
/* 与签署表格 fixed 布局配合;扣除左右各 2px margin,正文标记也不会留下 2px 的横向溢出。 */
|
|
373
|
+
max-width: calc(100% - 4px);
|
|
293
374
|
align-items: center;
|
|
294
375
|
justify-content: center;
|
|
295
376
|
box-sizing: border-box;
|
|
@@ -338,11 +419,31 @@ ${u}
|
|
|
338
419
|
.gd-contract-template-page [data-signing-mark="true"] .gd-contract-template-signing-mark__label {
|
|
339
420
|
display: none !important;
|
|
340
421
|
}
|
|
422
|
+
/* 页眉、页脚与水印里的变量只是文字:重置为文字盒,不套用正文控件的固定宽、边框与内边距(与 Node 装饰样式一致)。必须位于变量规则之后,同为 0,3,0 时靠源码顺序覆盖。 */
|
|
423
|
+
.gd-contract-template-page > .gd-contract-template-page__header [data-template-variable="true"],
|
|
424
|
+
.gd-contract-template-page > .gd-contract-template-page__footer [data-template-variable="true"],
|
|
425
|
+
.gd-contract-template-page > .gd-contract-template-page__watermark [data-template-variable="true"] {
|
|
426
|
+
position: static;
|
|
427
|
+
display: inline;
|
|
428
|
+
width: auto;
|
|
429
|
+
min-height: 0;
|
|
430
|
+
margin: 0;
|
|
431
|
+
padding: 0;
|
|
432
|
+
border: 0;
|
|
433
|
+
border-radius: 0;
|
|
434
|
+
background: none;
|
|
435
|
+
color: inherit;
|
|
436
|
+
font: inherit;
|
|
437
|
+
line-height: inherit;
|
|
438
|
+
text-align: inherit;
|
|
439
|
+
vertical-align: baseline;
|
|
440
|
+
white-space: inherit;
|
|
441
|
+
}
|
|
341
442
|
/* 历史模板可能写入仅某个操作系统存在的字体;保留原数据,打印时收敛到合同标准栈。 */
|
|
342
443
|
.gd-contract-template-page [style*="font-family" i],
|
|
343
444
|
.gd-contract-template-page [data-font-family],
|
|
344
445
|
.gd-contract-template-page [face] {
|
|
345
|
-
font-family: ${
|
|
446
|
+
font-family: ${l} !important;
|
|
346
447
|
}
|
|
347
448
|
.gd-contract-template-page [style*="GD Contract Latin Sans" i],
|
|
348
449
|
.gd-contract-template-page [style*="PingFang SC" i],
|
|
@@ -356,21 +457,24 @@ ${u}
|
|
|
356
457
|
.gd-contract-template-page [face*="PingFang SC" i],
|
|
357
458
|
.gd-contract-template-page [face*="Microsoft YaHei" i],
|
|
358
459
|
.gd-contract-template-page [face*="Noto Sans CJK SC" i] {
|
|
359
|
-
font-family: ${
|
|
460
|
+
font-family: ${u} !important;
|
|
360
461
|
}`;
|
|
361
462
|
}
|
|
362
|
-
function
|
|
463
|
+
function m(e) {
|
|
464
|
+
return `<style ${c}>\n${p(e)}\n</style>`;
|
|
465
|
+
}
|
|
466
|
+
function h() {
|
|
363
467
|
return "@font-face {\n font-family: \"GD Contract Latin\";\n src: local(\"Times New Roman\"), local(\"Liberation Serif\"), local(\"Tinos\");\n unicode-range: U+0000-024F, U+2000-206F, U+2190-21FF, U+2200-22FF;\n}\n@font-face {\n font-family: \"GD Contract Latin Sans\";\n src: local(\"Arial\"), local(\"Helvetica Neue\"), local(\"Liberation Sans\");\n unicode-range: U+0000-024F, U+2000-206F, U+2190-21FF, U+2200-22FF;\n}";
|
|
364
468
|
}
|
|
365
|
-
function
|
|
469
|
+
function g(e) {
|
|
366
470
|
return String(e).replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/[\r\n\f]/g, " ");
|
|
367
471
|
}
|
|
368
|
-
function
|
|
472
|
+
function _(e) {
|
|
369
473
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
370
474
|
}
|
|
371
|
-
function
|
|
372
|
-
if (!
|
|
475
|
+
function v(e, t) {
|
|
476
|
+
if (!_(e)) throw TypeError(`${t} 必须是有限正数`);
|
|
373
477
|
return e;
|
|
374
478
|
}
|
|
375
479
|
//#endregion
|
|
376
|
-
export { e as
|
|
480
|
+
export { e as CONTRACT_PAGE_BASE_PADDING, t as CONTRACT_PAGE_DECORATED_SAFE_PADDING, n as CONTRACT_PAGE_LAYOUT_TOLERANCE, l as CONTRACT_PRINT_FONT_FAMILY, d as CONTRACT_PRINT_FONT_TIMEOUT_MS, f as CONTRACT_PRINT_METRIC_NORMALIZE_CSS, u as CONTRACT_PRINT_SANS_FONT_FAMILY, r as CONTRACT_PRINT_STYLE_VERSION, c as CONTRACT_RENDER_STYLE_MARKER, h as buildContractLatinFontFaceCss, p as buildContractPrintCss, m as buildContractRenderStyle, i as isContractPageDecorationVisible, s as measureContractPageLayout, a as resolveContractDecorationSafePadding, o as resolveContractPagePadding };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { CONTRACT_PAGE_BASE_PADDING as e, CONTRACT_PAGE_DECORATED_SAFE_PADDING as t, CONTRACT_PAGE_LAYOUT_TOLERANCE as n, CONTRACT_PRINT_FONT_FAMILY as r, CONTRACT_PRINT_FONT_TIMEOUT_MS as i, CONTRACT_PRINT_METRIC_NORMALIZE_CSS as a, CONTRACT_PRINT_SANS_FONT_FAMILY as o, CONTRACT_PRINT_STYLE_VERSION as s, CONTRACT_RENDER_STYLE_MARKER as c, buildContractLatinFontFaceCss as l, buildContractPrintCss as u, buildContractRenderStyle as d, isContractPageDecorationVisible as f, measureContractPageLayout as p, resolveContractDecorationSafePadding as m, resolveContractPagePadding as h } from "./contract-print-css/index.mjs";
|
|
2
|
+
export { e as CONTRACT_PAGE_BASE_PADDING, t as CONTRACT_PAGE_DECORATED_SAFE_PADDING, n as CONTRACT_PAGE_LAYOUT_TOLERANCE, r as CONTRACT_PRINT_FONT_FAMILY, i as CONTRACT_PRINT_FONT_TIMEOUT_MS, a as CONTRACT_PRINT_METRIC_NORMALIZE_CSS, o as CONTRACT_PRINT_SANS_FONT_FAMILY, s as CONTRACT_PRINT_STYLE_VERSION, c as CONTRACT_RENDER_STYLE_MARKER, l as buildContractLatinFontFaceCss, u as buildContractPrintCss, d as buildContractRenderStyle, f as isContractPageDecorationVisible, p as measureContractPageLayout, m as resolveContractDecorationSafePadding, h as resolveContractPagePadding };
|
package/dist/es/index.mjs
CHANGED
|
@@ -61,24 +61,25 @@ import { CONTRACT_TEXT_STYLE_PRESETS as st, CONTRACT_TEXT_STYLE_PRESET_COMMANDS
|
|
|
61
61
|
import { CONTRACT_SIGNING_RENDER_ORIGIN_OFFSET as _t, CONTRACT_SIGNING_SNAP_THRESHOLD_PX as vt, canResizeContractSigningPlacement as yt, clampContractSigningPlacement as bt, clampContractSigningZoom as xt, displayPointToContractPoint as St, getContractSigningPlacementDistances as Ct, getContractSigningPlacementSize as wt, getContractSigningRuleGeometry as Tt, moveContractSigningPlacementByDisplayDelta as Et, normalizeContractSigningCoordinateDimension as Dt, normalizeContractSigningCoordinateScale as Ot, resizeContractSigningSealGeometry as kt, resolveContractSigningSealSizeLimit as At, resolveContractSigningSizeProfile as jt, snapContractSigningPlacement as Mt } from "./components/contract-signing-location/src/coordinates.mjs";
|
|
62
62
|
import { isContractTemplateAdvancedChoiceFieldType as Nt, isContractTemplateBuiltinSelectorFieldType as Pt, isContractTemplateFieldType as Ft } from "./components/pro-contract-template-designer/src/types.mjs";
|
|
63
63
|
import { buildRadioOptionNodes as It, buildRadioOptionsHtml as Lt, decodeContractTemplateJsonAttribute as Rt, encodeContractTemplateJsonAttribute as zt, formatContractTemplateRenderValue as Bt, isAllowedContractTemplateRemoteUrl as Vt, isContractTemplateSelectionValue as Ht, normalizeContractTemplateControlOptions as Ut, normalizeContractTemplateJsonObject as Wt, normalizeContractTemplateRequestTimeout as Gt, normalizeContractTemplateSelectionValue as Kt, normalizeContractTemplateSelectionValues as qt, readContractTemplateControlOptions as Jt } from "./components/pro-contract-template-designer/src/utils/advanced-controls.mjs";
|
|
64
|
-
import { ALL_DEFAULT_FIELD_TYPES as Yt, CONTRACT_TEMPLATE_RENDERER_VERSION as Xt, CONTRACT_TEMPLATE_RESERVED_VARIABLE_KEYS as Zt, CONTRACT_TEMPLATE_STYLE_VERSION as Qt, CONTRACT_TEMPLATE_VARIABLE_KEY_PATTERN as $t, ContractTemplatePageDecorationValidationError as en, DEFAULT_ADVANCED_CHOICE_FIELD_TYPES as tn, DEFAULT_BUILTIN_SELECTOR_FIELD_TYPES as nn, DEFAULT_CHECKBOX_FIELD_TYPE as rn, DEFAULT_CUSTOM_FIELD_TYPES as an, DEFAULT_FIELD_STYLE as on, DEFAULT_FIELD_TYPES as sn, DEFAULT_IMAGE_FIELD_TYPE as cn, DEFAULT_MULTILINE_LINE_HEIGHT as ln, DEFAULT_MULTILINE_ROWS as un, DEFAULT_PAGE_SIZE as dn, PAGE_SIZE_OPTIONS as fn, buildTemplateExpressionHtml as pn, buildTemplateHtml as mn, buildTemplatePreviewHtml as hn, buildTemplatePreviewPages as gn, cloneTemplateValue as _n, collectTemplateValueVariableKeys as vn, collectTemplateVariableKeys as yn, constrainTemplatePageSizes as bn, createBlankPage as xn, createBlankTemplate as Sn, createDefaultPage as Cn, createDefaultTemplate as wn, createDesignerId as Tn, createTemplateBodySync as En, createTemplateVariable as Dn, exportTemplateValue as On, findPageSizeOption as kn, getFieldOption as An, getPageSizeKey as jn, getPageSizeOption as
|
|
64
|
+
import { ALL_DEFAULT_FIELD_TYPES as Yt, CONTRACT_TEMPLATE_RENDERER_VERSION as Xt, CONTRACT_TEMPLATE_RESERVED_VARIABLE_KEYS as Zt, CONTRACT_TEMPLATE_STYLE_VERSION as Qt, CONTRACT_TEMPLATE_VARIABLE_KEY_PATTERN as $t, ContractTemplatePageDecorationValidationError as en, DEFAULT_ADVANCED_CHOICE_FIELD_TYPES as tn, DEFAULT_BUILTIN_SELECTOR_FIELD_TYPES as nn, DEFAULT_CHECKBOX_FIELD_TYPE as rn, DEFAULT_CUSTOM_FIELD_TYPES as an, DEFAULT_FIELD_STYLE as on, DEFAULT_FIELD_TYPES as sn, DEFAULT_IMAGE_FIELD_TYPE as cn, DEFAULT_MULTILINE_LINE_HEIGHT as ln, DEFAULT_MULTILINE_ROWS as un, DEFAULT_PAGE_SIZE as dn, PAGE_SIZE_OPTIONS as fn, buildTemplateExpressionHtml as pn, buildTemplateHtml as mn, buildTemplatePreviewHtml as hn, buildTemplatePreviewPages as gn, cloneTemplateValue as _n, collectTemplateValueVariableKeys as vn, collectTemplateVariableKeys as yn, constrainTemplatePageSizes as bn, createBlankPage as xn, createBlankTemplate as Sn, createDefaultPage as Cn, createDefaultTemplate as wn, createDesignerId as Tn, createTemplateBodySync as En, createTemplateVariable as Dn, exportTemplateValue as On, findPageSizeOption as kn, getFieldOption as An, getPageSizeKey as jn, getPageSizeOption as Mn, inferPageFormat as Nn, normalizeContractTemplateMaxPages as Pn, normalizePageSizeOptions as Fn, normalizeTemplateValue as $, resolvePageSize as In, splitPageContentByMeasurements as Ln, syncTemplateVariablesWithPages as Rn, validateContractTemplateVariableKey as zn, validateTemplateValue as Bn } from "./components/pro-contract-template-designer/src/composables/use-template-designer.mjs";
|
|
65
65
|
import { isSafeContractImageUrl as Vn } from "./components/pro-contract-template-designer/src/utils/image-url.mjs";
|
|
66
|
-
import { buildInitialRenderValues as Hn, buildTemplateRenderHtml as Un, buildTemplateRenderPages as Wn, buildTemplateVariableData as Gn, isEmptyRenderValue as Kn, normalizeRenderValues as qn,
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import Wr from "./components/contract-signing-location/
|
|
72
|
-
import
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import qi,
|
|
77
|
-
import
|
|
78
|
-
import {
|
|
79
|
-
import _a from "./components/pro-contract-signing-flow/
|
|
80
|
-
import
|
|
81
|
-
import {
|
|
82
|
-
import
|
|
83
|
-
import {
|
|
84
|
-
export { Yt as ALL_DEFAULT_FIELD_TYPES, we as CONTRACT_PRINT_FONT_UNCONFIGURED_MESSAGE, Oe as CONTRACT_SIGNING_AUTO_SCROLL_EDGE_PX, ke as CONTRACT_SIGNING_CSS_PX_PER_POINT, yr as CONTRACT_SIGNING_FALLBACK_PAGE_SIZE, Yi as CONTRACT_SIGNING_FLOW_ACTION_LABELS, Xi as CONTRACT_SIGNING_FLOW_IDENTITY_OPTIONS, Zi as CONTRACT_SIGNING_FLOW_MAX_ZOOM, Qi as CONTRACT_SIGNING_FLOW_MIN_ZOOM, $i as CONTRACT_SIGNING_FLOW_SEAL_TYPES, ea as CONTRACT_SIGNING_FLOW_SIGN_ACTIONS, ta as CONTRACT_SIGNING_FLOW_ZOOM_STEP, Ae as CONTRACT_SIGNING_MIN_PLACEMENT_SIZE, br as CONTRACT_SIGNING_PAGE_GAP, je as CONTRACT_SIGNING_PLACEMENT_LABELS, Me as CONTRACT_SIGNING_PLACEMENT_MIME, Ne as CONTRACT_SIGNING_PREVIEW_CONCURRENCY, Pe as CONTRACT_SIGNING_PX_PER_MM, _t as CONTRACT_SIGNING_RENDER_ORIGIN_OFFSET, Fe as CONTRACT_SIGNING_SEAL_MAX_SIZE, Ie as CONTRACT_SIGNING_SEAL_MIN_SIZE, Le as CONTRACT_SIGNING_SEAL_TYPE_OPTIONS, Re as CONTRACT_SIGNING_SEAL_TYPE_PRESETS, ze as CONTRACT_SIGNING_SIZE_PROFILES, vt as CONTRACT_SIGNING_SNAP_THRESHOLD_PX, xr as CONTRACT_SIGNING_VIRTUAL_BUFFER_PAGES, Be as CONTRACT_SIGNING_VISIBLE_PAGES_DEBOUNCE_MS, xi as CONTRACT_TEMPLATE_DRAFT_CACHE_VERSION, Si as CONTRACT_TEMPLATE_FILES_DRAFT_CACHE_VERSION, Xt as CONTRACT_TEMPLATE_RENDERER_VERSION, Zt as CONTRACT_TEMPLATE_RESERVED_VARIABLE_KEYS, Qt as CONTRACT_TEMPLATE_STYLE_VERSION, $t as CONTRACT_TEMPLATE_VARIABLE_KEY_PATTERN, st as CONTRACT_TEXT_STYLE_PRESETS, ct as CONTRACT_TEXT_STYLE_PRESET_COMMANDS, ti as CUSTOM_SIGNING_LAYOUT, ir as ContractSigningLocationBuildError, en as ContractTemplatePageDecorationValidationError, u as CoverScrollbarProps, tn as DEFAULT_ADVANCED_CHOICE_FIELD_TYPES, nn as DEFAULT_BUILTIN_SELECTOR_FIELD_TYPES, rn as DEFAULT_CHECKBOX_FIELD_TYPE, lt as DEFAULT_CONTRACT_FONT_FAMILY, Gr as DEFAULT_CONTRACT_IMAGE_COMPRESSION, an as DEFAULT_CUSTOM_FIELD_TYPES, Ci as DEFAULT_DRAFT_CACHE_INTERVAL, wi as DEFAULT_DRAFT_CACHE_KEY, Ti as DEFAULT_DRAFT_CACHE_MAX_BYTES, on as DEFAULT_FIELD_STYLE, sn as DEFAULT_FIELD_TYPES, ut as DEFAULT_FONT_FAMILY_OPTIONS, dt as DEFAULT_FONT_SIZE_PRESETS, cn as DEFAULT_IMAGE_FIELD_TYPE, ln as DEFAULT_MULTILINE_LINE_HEIGHT, un as DEFAULT_MULTILINE_ROWS, dn as DEFAULT_PAGE_SIZE, ft as DEFAULT_TEXT_ALIGN_OPTIONS, Se as DRAWER_SIZE_WIDTH, ni as DUAL_PARTY_SIGNING_LAYOUT, fe as FORM_RENDER_CONTEXT_KEY, pe as FormItemProps, me as FormRenderProps, ne as GET_DEPT_TREE_URL, J as GTE_OPTIONS_URL, M as GTE_ORGTREE_URL, t as GdAntCollapseTranstion, Wr as GdAntContractSigningLocation, d as GdAntCoverScrollBar, ae as GdAntDeptSelector, T as GdAntIcon, A as GdAntPlusUpload, b as GdAntProArea, _e as GdAntProCell, ve as GdAntProCellGroup, _a as GdAntProContractSigningFlow, xa as GdAntProContractTemplateAgentPanel, Sa as GdAntProContractTemplateAgentPreview, ba as GdAntProContractTemplateAgentWorkbench, qi as GdAntProContractTemplateDesigner, Ji as GdAntProContractTemplateRenderer, Ce as GdAntProDrawer, xe as GdAntProDynamicTags, he as GdAntProFormRender, k as GdAntProLoading, le as GdAntProMenuTree, a as GdAntProModal, j as GdAntProOverlay, _ as GdAntProPicker, Q as GdAntProRoleSelector, V as GdAntProSelector, be as GdAntProSelectorGroup, S as GdAntProSignature, w as GdAntProTable, m as GdAntProTag, de as GdAntProTagGroup, s as GdAntProTitle, O as GdAntProUpload, q as GdAntProUserAvatar, k as GdAntProloading, Z as GdAntRoleSelector, f as GdAntScaleVirtualList, l as GdAntScrollBar, K as GdAntUserAvatar, H as GdAntUserSelector, U as GdAntUserSelectorCheckbox, W as GdAntUserSelectorDirectory, G as GdAntUserSelectorDrilldown, Kr as MAX_CONTRACT_IMAGE_BYTES, qr as MAX_CONTRACT_IMAGE_DIMENSION, ri as MAX_SIGNING_LAYOUT_PARTY_COUNT, qe as MAX_SIGNING_MARK_DIMENSION, oe as MENU_TREE_URL, Jr as MIN_CONTRACT_IMAGE_DIMENSION, ii as MIN_SIGNING_LAYOUT_PARTY_COUNT, Je as MIN_SIGNING_MARK_DIMENSION, fn as PAGE_SIZE_OPTIONS, ge as PRO_CELL_GROUP_KEY, h as PickerApiEnum, v as ProAreaProps, g as ProPickerProps, x as ProSignatureProps, ue as ProTagGroupProps, L as ProUserSelector, z as ProUserSelectorCheckbox, R as ProUserSelectorDrilldown, ai as SIGNING_LAYOUT_ARRANGEMENTS, oi as SIGNING_LAYOUT_ARRANGEMENT_LABELS, si as SIGNING_LAYOUT_ATTRIBUTE_VALUES, ci as SIGNING_LAYOUT_FIELD_KEYS, li as SIGNING_LAYOUT_FIELD_LABELS, ui as SIGNING_LAYOUT_PRESETS, di as SIGNING_LAYOUT_PRESET_KEYS, Ye as SIGNING_MARK_DEFAULT_LABELS, Xe as SIGNING_MARK_DEFAULT_SIZES, Ze as SIGNING_MARK_TYPE_LABELS, o as TitleProps, E as UploadContextKey, N as UserSelectorProps, ya as adaptContractTemplateAgentSpec, oa as buildConnectList, ar as buildContractSigningLocationOutput, or as buildContractSigningLocationRules, $n as buildContractSigningTemplateRenderPages, fi as buildDualPartySigningLayoutPreset, Hn as buildInitialRenderValues, Sr as buildPageLayouts, It as buildRadioOptionNodes, Lt as buildRadioOptionsHtml, pi as buildSigningLayoutContent, mi as buildSigningLayoutPresetContent, hi as buildSigningLayoutPreviewModel, Qe as buildSigningMarkAttrs, pn as buildTemplateExpressionHtml, mn as buildTemplateHtml, hn as buildTemplatePreviewHtml, gn as buildTemplatePreviewPages, Un as buildTemplateRenderHtml, Wn as buildTemplateRenderPages, Gn as buildTemplateVariableData, yt as canResizeContractSigningPlacement, bt as clampContractSigningPlacement, xt as clampContractSigningZoom, Ei as clearTemplateDraftCache, sr as cloneContractSigningLocationValue, Li as cloneContractTemplateFiles, _n as cloneTemplateValue, e as collapseProps, vn as collectTemplateValueVariableKeys, yn as collectTemplateVariableKeys, Yr as compressContractImage, Te as configureContractPrintFonts, Ri as constrainContractTemplateFiles, bn as constrainTemplatePageSizes, Cr as contentPointToPagePoint, xn as createBlankPage, Sn as createBlankTemplate, cr as createContractSigningLocationValue, lr as createContractSigningPlacement, zi as createContractTemplateFile, Cn as createDefaultPage, sa as createDefaultSignRule, wn as createDefaultTemplate, Tn as createDesignerId, Di as createDraftCacheStatus, ca as createEndNode, la as createId, ua as createInitialFlow, da as createSignNode, fa as createStartNode, En as createTemplateBodySync, Dn as createTemplateVariable, Rt as decodeContractTemplateJsonAttribute, re as deptSelectorEmits, ie as deptSelectorProps, gi as describeSigningLayoutOptions, St as displayPointToContractPoint, zt as encodeContractTemplateJsonAttribute, Oi as estimateDraftCacheBytes, Bi as exportContractTemplateFiles, On as exportTemplateValue, ur as findContractSigningPage, wr as findPageAtOffset, kn as findPageSizeOption, kr as formatContractSigningDate, Bt as formatContractTemplateRenderValue, ki as formatDraftCacheSavedAt, ee as generatePalette, Ai as getBrowserDraftCacheStorage, Tr as getContractSigningAutoScrollDelta, Ar as getContractSigningDateDataUrl, jr as getContractSigningDateSvgDataUrl, dr as getContractSigningHomePage, Mr as getContractSigningPlacementDataUrl, Ct as getContractSigningPlacementDistances, wt as getContractSigningPlacementSize, Nr as getContractSigningPlacementVisual, Tt as getContractSigningRuleGeometry, Pr as getContractSigningSealDataUrl, Fr as getContractSigningSealLabel, Ir as getContractSigningSealSvgDataUrl, Lr as getContractSigningSignatureDataUrl, Rr as getContractSigningSignaturePngDataUrl, zr as getContractSigningSignatureSvgDataUrl, er as getContractSigningTemplateDisplayError, pt as getContractTextStylePreset, An as getFieldOption, Er as getPageLayoutScrollTop, Dr as getPageLayoutsContentSize, jn as getPageSizeKey, $ as getPageSizeOption, $e as getSigningMarkDefaultLabel, et as getSigningMarkDefaultSize, Or as getVisibleRange, Mn as inferPageFormat, Vt as isAllowedContractTemplateRemoteUrl, ji as isBlankTemplateDraftValue, Mi as isBlankTemplateFilesDraftValue, na as isContractSigningFlowInteractiveTarget, fr as isContractSigningPageUsable, tr as isContractSigningTemplateFile, nr as isContractSigningTemplateSource, Br as isContractSigningVisualDataUrl, Nt as isContractTemplateAdvancedChoiceFieldType, Pt as isContractTemplateBuiltinSelectorFieldType, Ft as isContractTemplateFieldType, Ht as isContractTemplateSelectionValue, tt as isContractTemplateSigningMarkType, Kn as isEmptyRenderValue, Vn as isSafeContractImageUrl, Vr as isSafeContractSigningVisualDataUrl, _i as isSigningLayoutAttributeValue, vi as isSigningLayoutPresetKey, Ni as loadTemplateDraftCache, Pi as loadTemplateFilesDraftCache, Ve as millimetersToContractSigningCssPixels, He as millimetersToContractSigningPixels, Et as moveContractSigningPlacementByDisplayDelta, Vi as moveContractTemplateFile, Xr as normalizeContractImageCompression, Zr as normalizeContractImageDimension, Dt as normalizeContractSigningCoordinateDimension, Ot as normalizeContractSigningCoordinateScale, pa as normalizeContractSigningFlow, ra as normalizeContractSigningFlowZoom, pr as normalizeContractSigningLocationValue, mr as normalizeContractSigningProviderValue, Ut as normalizeContractTemplateControlOptions, Hi as normalizeContractTemplateFiles, Wt as normalizeContractTemplateJsonObject, Nn as normalizeContractTemplateMaxPages, Gt as normalizeContractTemplateRequestTimeout, Kt as normalizeContractTemplateSelectionValue, qt as normalizeContractTemplateSelectionValues, mt as normalizeFontFamilyValue, Pn as normalizePageSizeOptions, qn as normalizeRenderValues, ma as normalizeSignRule, yi as normalizeSigningLayoutOptions, nt as normalizeSigningMarkDimension, Fn as normalizeTemplateValue, hr as patchContractSigningPlacement, se as proMenuTreeEmits, ce as proMenuTreeProps, n as proModalEmits, p as proTagProps, Qr as processContractImageFile, $r as readContractImageFileAsDataUrl, Jt as readContractTemplateControlOptions, Ui as removeContractTemplateFile, Wi as renameContractTemplateFile, Gi as replaceContractTemplateFile, kt as resizeContractSigningSealGeometry, Ee as resolveContractFontBaseUrl, ei as resolveContractImageResizeDimensions, gr as resolveContractSigningDefaultSealTypes, ia as resolveContractSigningFlowZoomShortcut, aa as resolveContractSigningFlowZoomShortcutForTarget, _r as resolveContractSigningPreviewPageSize, Hr as resolveContractSigningSealLabel, Ue as resolveContractSigningSealSizeInCssPixels, We as resolveContractSigningSealSizeInPixels, At as resolveContractSigningSealSizeLimit, Ge as resolveContractSigningSealTypeOption, jt as resolveContractSigningSizeProfile, Ki as resolveContractTemplateActiveFileId, ht as resolveContractTextStylePresetCommands, gt as resolveFontFamilyOptions, In as resolvePageSize, bi as resolvePartyName, rt as resolveSigningMarkPresentation, it as resolveSigningMarkResizeDimensions, at as resolveSigningMarkResizeHandles, ot as resolveSigningMarkSealAspectRatio, Jn as resolveTemplateRenderSubmitErrors, P as resolveUserSelectorMaxCount, Y as roleSelectorEmits, X as roleSelectorProps, Yn as sanitizeContractRendererHtml, Fi as saveTemplateDraftCache, Ii as saveTemplateFilesDraftCache, c as scrollbarProps, ye as selectContextKey, F as selectUserContextKey, Ca as setupAppConfig, te as setupTheme, Mt as snapContractSigningPlacement, Ln as splitPageContentByMeasurements, Rn as syncTemplateVariablesWithPages, De as toAbsoluteContractFontBaseUrl, Ke as toContractSigningRulePageSize, Ur as toContractSigningSvgDataUrl, wa as useBasicAppConfig, ha as useContractSigningFlow, va as useContractTemplateAgent, y as useProArea, r as useProModal, i as useProModalInit, C as useProTable, D as useUpload, B as useUserSelector, I as userSelectorEmits, ga as validateContractSigningFlow, vr as validateContractSigningLocationValue, rr as validateContractSigningTemplateFile, zn as validateContractTemplateVariableKey, Xn as validateTemplateRenderStructure, Zn as validateTemplateRenderValues, Qn as validateTemplateTextOverflow, Bn as validateTemplateValue };
|
|
66
|
+
import { buildInitialRenderValues as Hn, buildTemplateRenderHtml as Un, buildTemplateRenderPages as Wn, buildTemplateVariableData as Gn, isEmptyRenderValue as Kn, normalizeRenderValues as qn, resolveTemplateDisplayValues as Jn, resolveTemplateRenderSubmitErrors as Yn, sanitizeContractRendererHtml as Xn, validateTemplateRenderStructure as Zn, validateTemplateRenderValues as Qn, validateTemplateTextOverflow as $n } from "./components/pro-contract-template-designer/src/utils/template-renderer.mjs";
|
|
67
|
+
import { checkContractTemplateLayout as er, createContractTemplateLayoutChecker as tr, describeContractTemplateLayoutIssue as nr, isContractTemplateLayoutAbortError as rr } from "./components/pro-contract-template-designer/src/utils/contract-layout-check.mjs";
|
|
68
|
+
import { buildContractSigningLayoutPages as ir, buildContractSigningTemplateRenderPages as ar, getContractSigningTemplateDisplayError as or, isContractSigningTemplateFile as sr, isContractSigningTemplateSource as cr, validateContractSigningTemplateFile as lr } from "./components/contract-signing-location/src/template-source.mjs";
|
|
69
|
+
import { ContractSigningLocationBuildError as ur, buildContractSigningLocationOutput as dr, buildContractSigningLocationRules as fr, cloneContractSigningLocationValue as pr, createContractSigningLocationValue as mr, createContractSigningPlacement as hr, findContractSigningPage as gr, getContractSigningHomePage as _r, isContractSigningPageUsable as vr, normalizeContractSigningLocationValue as yr, normalizeContractSigningProviderValue as br, patchContractSigningPlacement as xr, resolveContractSigningDefaultSealTypes as Sr, resolveContractSigningPreviewPageSize as Cr, validateContractSigningLocationValue as wr } from "./components/contract-signing-location/src/location-rules.mjs";
|
|
70
|
+
import { CONTRACT_SIGNING_FALLBACK_PAGE_SIZE as Tr, CONTRACT_SIGNING_PAGE_GAP as Er, CONTRACT_SIGNING_VIRTUAL_BUFFER_PAGES as Dr, buildPageLayouts as Or, contentPointToPagePoint as kr, findPageAtOffset as Ar, getContractSigningAutoScrollDelta as jr, getPageLayoutScrollTop as Mr, getPageLayoutsContentSize as Nr, getVisibleRange as Pr } from "./components/contract-signing-location/src/page-layout.mjs";
|
|
71
|
+
import { formatContractSigningDate as Fr, getContractSigningDateDataUrl as Ir, getContractSigningDateSvgDataUrl as Lr, getContractSigningPlacementDataUrl as Rr, getContractSigningPlacementVisual as zr, getContractSigningSealDataUrl as Br, getContractSigningSealLabel as Vr, getContractSigningSealSvgDataUrl as Hr, getContractSigningSignatureDataUrl as Ur, getContractSigningSignaturePngDataUrl as Wr, getContractSigningSignatureSvgDataUrl as Gr, isContractSigningVisualDataUrl as Kr, isSafeContractSigningVisualDataUrl as qr, resolveContractSigningSealLabel as Jr, toContractSigningSvgDataUrl as Yr } from "./components/contract-signing-location/src/signing-visuals.mjs";
|
|
72
|
+
import Xr from "./components/contract-signing-location/index.mjs";
|
|
73
|
+
import { DEFAULT_CONTRACT_IMAGE_COMPRESSION as Zr, MAX_CONTRACT_IMAGE_BYTES as Qr, MAX_CONTRACT_IMAGE_DIMENSION as $r, MIN_CONTRACT_IMAGE_DIMENSION as ei, compressContractImage as ti, normalizeContractImageCompression as ni, normalizeContractImageDimension as ri, processContractImageFile as ii, readContractImageFileAsDataUrl as ai, resolveContractImageResizeDimensions as oi } from "./components/pro-contract-template-designer/src/utils/content-image.mjs";
|
|
74
|
+
import { CUSTOM_SIGNING_LAYOUT as si, DUAL_PARTY_SIGNING_LAYOUT as ci, MAX_SIDE_BY_SIDE_SIGNING_LAYOUT_PARTY_COUNT as li, MAX_SIGNING_LAYOUT_PARTY_COUNT as ui, MIN_SIGNING_LAYOUT_PARTY_COUNT as di, SIGNING_LAYOUT_ARRANGEMENTS as fi, SIGNING_LAYOUT_ARRANGEMENT_LABELS as pi, SIGNING_LAYOUT_ATTRIBUTE_VALUES as mi, SIGNING_LAYOUT_FIELD_KEYS as hi, SIGNING_LAYOUT_FIELD_LABELS as gi, SIGNING_LAYOUT_PRESETS as _i, SIGNING_LAYOUT_PRESET_KEYS as vi, buildDualPartySigningLayoutPreset as yi, buildSigningLayoutContent as bi, buildSigningLayoutPresetContent as xi, buildSigningLayoutPreviewModel as Si, describeSigningLayoutOptions as Ci, isSigningLayoutAttributeValue as wi, isSigningLayoutPresetKey as Ti, isSingleRowSigningLayoutArrangement as Ei, normalizeSigningLayoutOptions as Di, resolvePartyName as Oi, resolveSingleRowSignatureLineWidth as ki } from "./components/pro-contract-template-designer/src/utils/signing-layout-presets.mjs";
|
|
75
|
+
import { CONTRACT_TEMPLATE_DRAFT_CACHE_VERSION as Ai, CONTRACT_TEMPLATE_FILES_DRAFT_CACHE_VERSION as ji, DEFAULT_DRAFT_CACHE_INTERVAL as Mi, DEFAULT_DRAFT_CACHE_KEY as Ni, DEFAULT_DRAFT_CACHE_MAX_BYTES as Pi, clearTemplateDraftCache as Fi, createDraftCacheStatus as Ii, estimateDraftCacheBytes as Li, formatDraftCacheSavedAt as Ri, getBrowserDraftCacheStorage as zi, isBlankTemplateDraftValue as Bi, isBlankTemplateFilesDraftValue as Vi, loadTemplateDraftCache as Hi, loadTemplateFilesDraftCache as Ui, saveTemplateDraftCache as Wi, saveTemplateFilesDraftCache as Gi } from "./components/pro-contract-template-designer/src/composables/use-template-draft-cache.mjs";
|
|
76
|
+
import { cloneContractTemplateFiles as Ki, constrainContractTemplateFiles as qi, createContractTemplateFile as Ji, exportContractTemplateFiles as Yi, moveContractTemplateFile as Xi, normalizeContractTemplateFiles as Zi, removeContractTemplateFile as Qi, renameContractTemplateFile as $i, replaceContractTemplateFile as ea, resolveContractTemplateActiveFileId as ta } from "./components/pro-contract-template-designer/src/composables/use-template-files.mjs";
|
|
77
|
+
import na, { GdAntProContractTemplateRenderer as ra } from "./components/pro-contract-template-designer/index.mjs";
|
|
78
|
+
import { CONTRACT_SIGNING_FLOW_ACTION_LABELS as ia, CONTRACT_SIGNING_FLOW_IDENTITY_OPTIONS as aa, CONTRACT_SIGNING_FLOW_MAX_ZOOM as oa, CONTRACT_SIGNING_FLOW_MIN_ZOOM as sa, CONTRACT_SIGNING_FLOW_SEAL_TYPES as ca, CONTRACT_SIGNING_FLOW_SIGN_ACTIONS as la, CONTRACT_SIGNING_FLOW_ZOOM_STEP as ua, isContractSigningFlowInteractiveTarget as da, normalizeContractSigningFlowZoom as fa, resolveContractSigningFlowZoomShortcut as pa, resolveContractSigningFlowZoomShortcutForTarget as ma } from "./components/pro-contract-signing-flow/src/constants.mjs";
|
|
79
|
+
import { buildConnectList as ha, createDefaultSignRule as ga, createEndNode as _a, createId as va, createInitialFlow as ya, createSignNode as ba, createStartNode as xa, normalizeContractSigningFlow as Sa, normalizeSignRule as Ca, useContractSigningFlow as wa, validateContractSigningFlow as Ta } from "./components/pro-contract-signing-flow/src/composables/use-contract-signing-flow.mjs";
|
|
80
|
+
import Ea from "./components/pro-contract-signing-flow/index.mjs";
|
|
81
|
+
import { useContractTemplateAgent as Da } from "./components/pro-contract-template-agent/src/composables/use-contract-template-agent.mjs";
|
|
82
|
+
import { adaptContractTemplateAgentSpec as Oa } from "./components/pro-contract-template-agent/src/utils/contract-template-agent-adapter.mjs";
|
|
83
|
+
import ka, { GdAntProContractTemplateAgentPanel as Aa, GdAntProContractTemplateAgentPreview as ja } from "./components/pro-contract-template-agent/index.mjs";
|
|
84
|
+
import { setupAppConfig as Ma, useBasicAppConfig as Na } from "./components/hooks/use-basic-app-config.mjs";
|
|
85
|
+
export { Yt as ALL_DEFAULT_FIELD_TYPES, we as CONTRACT_PRINT_FONT_UNCONFIGURED_MESSAGE, Oe as CONTRACT_SIGNING_AUTO_SCROLL_EDGE_PX, ke as CONTRACT_SIGNING_CSS_PX_PER_POINT, Tr as CONTRACT_SIGNING_FALLBACK_PAGE_SIZE, ia as CONTRACT_SIGNING_FLOW_ACTION_LABELS, aa as CONTRACT_SIGNING_FLOW_IDENTITY_OPTIONS, oa as CONTRACT_SIGNING_FLOW_MAX_ZOOM, sa as CONTRACT_SIGNING_FLOW_MIN_ZOOM, ca as CONTRACT_SIGNING_FLOW_SEAL_TYPES, la as CONTRACT_SIGNING_FLOW_SIGN_ACTIONS, ua as CONTRACT_SIGNING_FLOW_ZOOM_STEP, Ae as CONTRACT_SIGNING_MIN_PLACEMENT_SIZE, Er as CONTRACT_SIGNING_PAGE_GAP, je as CONTRACT_SIGNING_PLACEMENT_LABELS, Me as CONTRACT_SIGNING_PLACEMENT_MIME, Ne as CONTRACT_SIGNING_PREVIEW_CONCURRENCY, Pe as CONTRACT_SIGNING_PX_PER_MM, _t as CONTRACT_SIGNING_RENDER_ORIGIN_OFFSET, Fe as CONTRACT_SIGNING_SEAL_MAX_SIZE, Ie as CONTRACT_SIGNING_SEAL_MIN_SIZE, Le as CONTRACT_SIGNING_SEAL_TYPE_OPTIONS, Re as CONTRACT_SIGNING_SEAL_TYPE_PRESETS, ze as CONTRACT_SIGNING_SIZE_PROFILES, vt as CONTRACT_SIGNING_SNAP_THRESHOLD_PX, Dr as CONTRACT_SIGNING_VIRTUAL_BUFFER_PAGES, Be as CONTRACT_SIGNING_VISIBLE_PAGES_DEBOUNCE_MS, Ai as CONTRACT_TEMPLATE_DRAFT_CACHE_VERSION, ji as CONTRACT_TEMPLATE_FILES_DRAFT_CACHE_VERSION, Xt as CONTRACT_TEMPLATE_RENDERER_VERSION, Zt as CONTRACT_TEMPLATE_RESERVED_VARIABLE_KEYS, Qt as CONTRACT_TEMPLATE_STYLE_VERSION, $t as CONTRACT_TEMPLATE_VARIABLE_KEY_PATTERN, st as CONTRACT_TEXT_STYLE_PRESETS, ct as CONTRACT_TEXT_STYLE_PRESET_COMMANDS, si as CUSTOM_SIGNING_LAYOUT, ur as ContractSigningLocationBuildError, en as ContractTemplatePageDecorationValidationError, u as CoverScrollbarProps, tn as DEFAULT_ADVANCED_CHOICE_FIELD_TYPES, nn as DEFAULT_BUILTIN_SELECTOR_FIELD_TYPES, rn as DEFAULT_CHECKBOX_FIELD_TYPE, lt as DEFAULT_CONTRACT_FONT_FAMILY, Zr as DEFAULT_CONTRACT_IMAGE_COMPRESSION, an as DEFAULT_CUSTOM_FIELD_TYPES, Mi as DEFAULT_DRAFT_CACHE_INTERVAL, Ni as DEFAULT_DRAFT_CACHE_KEY, Pi as DEFAULT_DRAFT_CACHE_MAX_BYTES, on as DEFAULT_FIELD_STYLE, sn as DEFAULT_FIELD_TYPES, ut as DEFAULT_FONT_FAMILY_OPTIONS, dt as DEFAULT_FONT_SIZE_PRESETS, cn as DEFAULT_IMAGE_FIELD_TYPE, ln as DEFAULT_MULTILINE_LINE_HEIGHT, un as DEFAULT_MULTILINE_ROWS, dn as DEFAULT_PAGE_SIZE, ft as DEFAULT_TEXT_ALIGN_OPTIONS, Se as DRAWER_SIZE_WIDTH, ci as DUAL_PARTY_SIGNING_LAYOUT, fe as FORM_RENDER_CONTEXT_KEY, pe as FormItemProps, me as FormRenderProps, ne as GET_DEPT_TREE_URL, J as GTE_OPTIONS_URL, M as GTE_ORGTREE_URL, t as GdAntCollapseTranstion, Xr as GdAntContractSigningLocation, d as GdAntCoverScrollBar, ae as GdAntDeptSelector, T as GdAntIcon, A as GdAntPlusUpload, b as GdAntProArea, _e as GdAntProCell, ve as GdAntProCellGroup, Ea as GdAntProContractSigningFlow, Aa as GdAntProContractTemplateAgentPanel, ja as GdAntProContractTemplateAgentPreview, ka as GdAntProContractTemplateAgentWorkbench, na as GdAntProContractTemplateDesigner, ra as GdAntProContractTemplateRenderer, Ce as GdAntProDrawer, xe as GdAntProDynamicTags, he as GdAntProFormRender, k as GdAntProLoading, le as GdAntProMenuTree, a as GdAntProModal, j as GdAntProOverlay, _ as GdAntProPicker, Q as GdAntProRoleSelector, V as GdAntProSelector, be as GdAntProSelectorGroup, S as GdAntProSignature, w as GdAntProTable, m as GdAntProTag, de as GdAntProTagGroup, s as GdAntProTitle, O as GdAntProUpload, q as GdAntProUserAvatar, k as GdAntProloading, Z as GdAntRoleSelector, f as GdAntScaleVirtualList, l as GdAntScrollBar, K as GdAntUserAvatar, H as GdAntUserSelector, U as GdAntUserSelectorCheckbox, W as GdAntUserSelectorDirectory, G as GdAntUserSelectorDrilldown, Qr as MAX_CONTRACT_IMAGE_BYTES, $r as MAX_CONTRACT_IMAGE_DIMENSION, li as MAX_SIDE_BY_SIDE_SIGNING_LAYOUT_PARTY_COUNT, ui as MAX_SIGNING_LAYOUT_PARTY_COUNT, qe as MAX_SIGNING_MARK_DIMENSION, oe as MENU_TREE_URL, ei as MIN_CONTRACT_IMAGE_DIMENSION, di as MIN_SIGNING_LAYOUT_PARTY_COUNT, Je as MIN_SIGNING_MARK_DIMENSION, fn as PAGE_SIZE_OPTIONS, ge as PRO_CELL_GROUP_KEY, h as PickerApiEnum, v as ProAreaProps, g as ProPickerProps, x as ProSignatureProps, ue as ProTagGroupProps, L as ProUserSelector, z as ProUserSelectorCheckbox, R as ProUserSelectorDrilldown, fi as SIGNING_LAYOUT_ARRANGEMENTS, pi as SIGNING_LAYOUT_ARRANGEMENT_LABELS, mi as SIGNING_LAYOUT_ATTRIBUTE_VALUES, hi as SIGNING_LAYOUT_FIELD_KEYS, gi as SIGNING_LAYOUT_FIELD_LABELS, _i as SIGNING_LAYOUT_PRESETS, vi as SIGNING_LAYOUT_PRESET_KEYS, Ye as SIGNING_MARK_DEFAULT_LABELS, Xe as SIGNING_MARK_DEFAULT_SIZES, Ze as SIGNING_MARK_TYPE_LABELS, o as TitleProps, E as UploadContextKey, N as UserSelectorProps, Oa as adaptContractTemplateAgentSpec, ha as buildConnectList, ir as buildContractSigningLayoutPages, dr as buildContractSigningLocationOutput, fr as buildContractSigningLocationRules, ar as buildContractSigningTemplateRenderPages, yi as buildDualPartySigningLayoutPreset, Hn as buildInitialRenderValues, Or as buildPageLayouts, It as buildRadioOptionNodes, Lt as buildRadioOptionsHtml, bi as buildSigningLayoutContent, xi as buildSigningLayoutPresetContent, Si as buildSigningLayoutPreviewModel, Qe as buildSigningMarkAttrs, pn as buildTemplateExpressionHtml, mn as buildTemplateHtml, hn as buildTemplatePreviewHtml, gn as buildTemplatePreviewPages, Un as buildTemplateRenderHtml, Wn as buildTemplateRenderPages, Gn as buildTemplateVariableData, yt as canResizeContractSigningPlacement, er as checkContractTemplateLayout, bt as clampContractSigningPlacement, xt as clampContractSigningZoom, Fi as clearTemplateDraftCache, pr as cloneContractSigningLocationValue, Ki as cloneContractTemplateFiles, _n as cloneTemplateValue, e as collapseProps, vn as collectTemplateValueVariableKeys, yn as collectTemplateVariableKeys, ti as compressContractImage, Te as configureContractPrintFonts, qi as constrainContractTemplateFiles, bn as constrainTemplatePageSizes, kr as contentPointToPagePoint, xn as createBlankPage, Sn as createBlankTemplate, mr as createContractSigningLocationValue, hr as createContractSigningPlacement, Ji as createContractTemplateFile, tr as createContractTemplateLayoutChecker, Cn as createDefaultPage, ga as createDefaultSignRule, wn as createDefaultTemplate, Tn as createDesignerId, Ii as createDraftCacheStatus, _a as createEndNode, va as createId, ya as createInitialFlow, ba as createSignNode, xa as createStartNode, En as createTemplateBodySync, Dn as createTemplateVariable, Rt as decodeContractTemplateJsonAttribute, re as deptSelectorEmits, ie as deptSelectorProps, nr as describeContractTemplateLayoutIssue, Ci as describeSigningLayoutOptions, St as displayPointToContractPoint, zt as encodeContractTemplateJsonAttribute, Li as estimateDraftCacheBytes, Yi as exportContractTemplateFiles, On as exportTemplateValue, gr as findContractSigningPage, Ar as findPageAtOffset, kn as findPageSizeOption, Fr as formatContractSigningDate, Bt as formatContractTemplateRenderValue, Ri as formatDraftCacheSavedAt, ee as generatePalette, zi as getBrowserDraftCacheStorage, jr as getContractSigningAutoScrollDelta, Ir as getContractSigningDateDataUrl, Lr as getContractSigningDateSvgDataUrl, _r as getContractSigningHomePage, Rr as getContractSigningPlacementDataUrl, Ct as getContractSigningPlacementDistances, wt as getContractSigningPlacementSize, zr as getContractSigningPlacementVisual, Tt as getContractSigningRuleGeometry, Br as getContractSigningSealDataUrl, Vr as getContractSigningSealLabel, Hr as getContractSigningSealSvgDataUrl, Ur as getContractSigningSignatureDataUrl, Wr as getContractSigningSignaturePngDataUrl, Gr as getContractSigningSignatureSvgDataUrl, or as getContractSigningTemplateDisplayError, pt as getContractTextStylePreset, An as getFieldOption, Mr as getPageLayoutScrollTop, Nr as getPageLayoutsContentSize, jn as getPageSizeKey, Mn as getPageSizeOption, $e as getSigningMarkDefaultLabel, et as getSigningMarkDefaultSize, Pr as getVisibleRange, Nn as inferPageFormat, Vt as isAllowedContractTemplateRemoteUrl, Bi as isBlankTemplateDraftValue, Vi as isBlankTemplateFilesDraftValue, da as isContractSigningFlowInteractiveTarget, vr as isContractSigningPageUsable, sr as isContractSigningTemplateFile, cr as isContractSigningTemplateSource, Kr as isContractSigningVisualDataUrl, Nt as isContractTemplateAdvancedChoiceFieldType, Pt as isContractTemplateBuiltinSelectorFieldType, Ft as isContractTemplateFieldType, rr as isContractTemplateLayoutAbortError, Ht as isContractTemplateSelectionValue, tt as isContractTemplateSigningMarkType, Kn as isEmptyRenderValue, Vn as isSafeContractImageUrl, qr as isSafeContractSigningVisualDataUrl, wi as isSigningLayoutAttributeValue, Ti as isSigningLayoutPresetKey, Ei as isSingleRowSigningLayoutArrangement, Hi as loadTemplateDraftCache, Ui as loadTemplateFilesDraftCache, Ve as millimetersToContractSigningCssPixels, He as millimetersToContractSigningPixels, Et as moveContractSigningPlacementByDisplayDelta, Xi as moveContractTemplateFile, ni as normalizeContractImageCompression, ri as normalizeContractImageDimension, Dt as normalizeContractSigningCoordinateDimension, Ot as normalizeContractSigningCoordinateScale, Sa as normalizeContractSigningFlow, fa as normalizeContractSigningFlowZoom, yr as normalizeContractSigningLocationValue, br as normalizeContractSigningProviderValue, Ut as normalizeContractTemplateControlOptions, Zi as normalizeContractTemplateFiles, Wt as normalizeContractTemplateJsonObject, Pn as normalizeContractTemplateMaxPages, Gt as normalizeContractTemplateRequestTimeout, Kt as normalizeContractTemplateSelectionValue, qt as normalizeContractTemplateSelectionValues, mt as normalizeFontFamilyValue, Fn as normalizePageSizeOptions, qn as normalizeRenderValues, Ca as normalizeSignRule, Di as normalizeSigningLayoutOptions, nt as normalizeSigningMarkDimension, $ as normalizeTemplateValue, xr as patchContractSigningPlacement, se as proMenuTreeEmits, ce as proMenuTreeProps, n as proModalEmits, p as proTagProps, ii as processContractImageFile, ai as readContractImageFileAsDataUrl, Jt as readContractTemplateControlOptions, Qi as removeContractTemplateFile, $i as renameContractTemplateFile, ea as replaceContractTemplateFile, kt as resizeContractSigningSealGeometry, Ee as resolveContractFontBaseUrl, oi as resolveContractImageResizeDimensions, Sr as resolveContractSigningDefaultSealTypes, pa as resolveContractSigningFlowZoomShortcut, ma as resolveContractSigningFlowZoomShortcutForTarget, Cr as resolveContractSigningPreviewPageSize, Jr as resolveContractSigningSealLabel, Ue as resolveContractSigningSealSizeInCssPixels, We as resolveContractSigningSealSizeInPixels, At as resolveContractSigningSealSizeLimit, Ge as resolveContractSigningSealTypeOption, jt as resolveContractSigningSizeProfile, ta as resolveContractTemplateActiveFileId, ht as resolveContractTextStylePresetCommands, gt as resolveFontFamilyOptions, In as resolvePageSize, Oi as resolvePartyName, rt as resolveSigningMarkPresentation, it as resolveSigningMarkResizeDimensions, at as resolveSigningMarkResizeHandles, ot as resolveSigningMarkSealAspectRatio, ki as resolveSingleRowSignatureLineWidth, Jn as resolveTemplateDisplayValues, Yn as resolveTemplateRenderSubmitErrors, P as resolveUserSelectorMaxCount, Y as roleSelectorEmits, X as roleSelectorProps, Xn as sanitizeContractRendererHtml, Wi as saveTemplateDraftCache, Gi as saveTemplateFilesDraftCache, c as scrollbarProps, ye as selectContextKey, F as selectUserContextKey, Ma as setupAppConfig, te as setupTheme, Mt as snapContractSigningPlacement, Ln as splitPageContentByMeasurements, Rn as syncTemplateVariablesWithPages, De as toAbsoluteContractFontBaseUrl, Ke as toContractSigningRulePageSize, Yr as toContractSigningSvgDataUrl, Na as useBasicAppConfig, wa as useContractSigningFlow, Da as useContractTemplateAgent, y as useProArea, r as useProModal, i as useProModalInit, C as useProTable, D as useUpload, B as useUserSelector, I as userSelectorEmits, Ta as validateContractSigningFlow, wr as validateContractSigningLocationValue, lr as validateContractSigningTemplateFile, zn as validateContractTemplateVariableKey, Zn as validateTemplateRenderStructure, Qn as validateTemplateRenderValues, $n as validateTemplateTextOverflow, Bn as validateTemplateValue };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../_virtual/_rolldown/runtime.cjs`),require(`../../pro-contract-template-designer/src/utils/contract-print-document.cjs`);const e=require(`./constants.cjs`),t=require(`./coordinates.cjs`),n=require(`./template-source.cjs`),r=require(`./location-rules.cjs`),i=require(`./ContractSigningLocationCanvas.cjs`),a=require(`./ContractSigningLocationInspector.cjs`),o=require(`./ContractSigningLocationNavigator.cjs`),s=require(`./preview-requests.cjs`);let c=require(`vue`),l=require(`ant-design-vue`),u=require(`@ant-design/icons-vue`);var ee={class:`gd-ant-contract-signing-location__header`},te={class:`gd-ant-contract-signing-location__title`},ne={class:`gd-ant-contract-signing-location__header-actions`},re={class:`gd-ant-contract-signing-location__placement-count`},ie={key:0,class:`gd-ant-contract-signing-location__error`,role:`alert`},ae=[`aria-label`,`aria-expanded`],oe={class:`gd-ant-contract-signing-location__panel-stack`},se=[`aria-label`,`aria-expanded`],ce={class:`gd-ant-contract-signing-location__panel-stack`},le=(0,c.defineComponent)({name:`ContractSigningLocation`,__name:`ContractSigningLocation`,props:{modelValue:{default:void 0},mode:{default:`placement`},contractId:{default:``},dataProvider:{default:void 0},sealTypeOptions:{default:()=>e.CONTRACT_SIGNING_SEAL_TYPE_OPTIONS.map(e=>({...e}))},defaultSealTypes:{default:void 0},referencePlacements:{default:()=>[]},allowedPlacementTypes:{default:()=>[`seal`,`signature`,`date`]},sizeProfile:{default:`default`},autoLoad:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},minZoom:{default:.5},maxZoom:{default:1.5},zoom:{default:1},resizable:{type:Boolean,default:!1},sealMinSize:{default:8},sealMaxSize:{default:640},height:{default:void 0},showSubmitButton:{type:Boolean,default:!0},showInspector:{type:Boolean,default:void 0},contractFontBaseUrl:{default:void 0}},emits:[`update:modelValue`,`update:zoom`,`change`,`ready`,`file-change`,`page-change`,`submit`,`error`],setup(e,{expose:le,emit:ue}){let d=e,f=ue,p=(0,c.computed)(()=>t.resolveContractSigningSealSizeLimit(d.sealMinSize,d.sealMaxSize)),m=r.normalizeContractSigningLocationValue(d.modelValue??r.createContractSigningLocationValue(d.contractId),{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions}),h=(0,c.shallowRef)(m),g=(0,c.shallowRef)(r.cloneContractSigningLocationValue(m)),_=(0,c.shallowRef)(m.files[0]?.fileId??``),v=(0,c.shallowRef)(m.files[0]?.pages[0]?.pageIndex??0),y=(0,c.shallowRef)(``),b=(0,c.shallowRef)(!1),x=(0,c.shallowRef)(``),S=(0,c.ref)([]),C=(0,c.ref)({}),w=(0,c.shallowRef)(U(d.zoom)),T=(0,c.ref)(null),E=(0,c.ref)(!1),D=(0,c.ref)(!1),O=(0,c.shallowRef)(`loading`),k=(0,c.shallowRef)(``),A=0,j=!1,M,N=[],P=0,F=new s.ContractSigningPreviewRequests,I=(0,c.computed)(()=>d.mode===`preview`),de=(0,c.computed)(()=>I.value||d.readonly||d.disabled),fe=(0,c.computed)(()=>d.showInspector??!I.value),pe=(0,c.computed)(()=>!I.value&&d.showSubmitButton),me=(0,c.computed)(()=>h.value.files.length<=1),he=(0,c.computed)(()=>Qe(d.height)),L=(0,c.computed)(()=>h.value.files.find(e=>e.fileId===_.value)??h.value.files[0]),R=(0,c.computed)(()=>n.isContractSigningTemplateFile(L.value)&&O.value!==`ready`),z=(0,c.computed)(()=>!R.value||I.value?``:O.value===`loading`?`合同排版校验中,暂不可指定签署位置`:He(k.value)),ge=(0,c.computed)(()=>O.value===`error`&&z.value?z.value:x.value||z.value),_e=(0,c.computed)(()=>!!(x.value&&d.dataProvider&&d.contractId)&&!(O.value===`error`&&z.value)),B=(0,c.computed)(()=>de.value||R.value),V=(0,c.computed)(()=>L.value?.pages.find(e=>e.pageIndex===v.value)??L.value?.pages[0]),ve=(0,c.computed)(()=>{let e=L.value;return e?h.value.placements.filter(t=>t.fileId===e.fileId):[]}),ye=(0,c.computed)(()=>{let e=L.value;return e?d.referencePlacements.filter(t=>t.fileId===e.fileId):[]}),H=(0,c.computed)(()=>h.value.placements.find(e=>e.id===y.value)),be=(0,c.computed)(()=>{let e=H.value;return e?r.findContractSigningPage(h.value,e.fileId,e.pageIndex)??V.value:V.value}),xe=(0,c.computed)(()=>S.value.filter(e=>e.endsWith(`:thumbnail`)).map(e=>e.slice(0,-10))),Se=(0,c.computed)(()=>Object.keys(C.value).filter(e=>e.endsWith(`:thumbnail`)).map(e=>e.slice(0,-10))),Ce=(0,c.computed)(()=>S.value.filter(e=>e.endsWith(`:preview`)).map(e=>e.slice(0,-8))),we=(0,c.computed)(()=>{let e={};return Object.entries(C.value).forEach(([t,n])=>{t.endsWith(`:preview`)&&(e[t.slice(0,-8)]=n)}),e});(0,c.watch)(()=>d.modelValue,e=>{if(!e)return;let t=r.normalizeContractSigningLocationValue(e,{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions});$(t)!==$(h.value)&&(Q(),h.value=t,g.value=r.cloneContractSigningLocationValue(t),X(),(0,c.nextTick)(()=>T.value?.scrollToPage(v.value)))},{deep:!0}),(0,c.watch)(p,()=>{$(r.normalizeContractSigningLocationValue(h.value,{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions}))!==$(h.value)&&W(h.value)}),(0,c.watch)(()=>d.zoom,e=>{w.value=U(e)}),(0,c.watch)(()=>L.value?.fileId,()=>{O.value=n.isContractSigningTemplateFile(L.value)?`loading`:`ready`,k.value=``}),(0,c.watch)(()=>[d.contractId,d.dataProvider,d.autoLoad],([e,t,n],r)=>{!n||!t||!e||(!r||e!==r[0]||t!==r[1])&&G()},{immediate:!0}),(0,c.onBeforeUnmount)(()=>{j=!0,A+=1,qe(),Q()});function U(e){let n=Math.min(d.minZoom,d.maxZoom),r=Math.max(d.minZoom,d.maxZoom);return t.clampContractSigningZoom(e,n,r)}function Te(e){let t=U(e);w.value=t,f(`update:zoom`,t)}function Ee(){return T.value?.fitWidth()??w.value}function W(e,t={}){h.value=r.normalizeContractSigningLocationValue(e,{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions}),t.clearError!==!1&&(x.value=``),X();let n=r.cloneContractSigningLocationValue(h.value);return f(`update:modelValue`,n),f(`change`,n),n}async function G(){let e=String(d.contractId||h.value.contractId||``).trim();if(!d.dataProvider)return Z({code:`CONTRACT_PROVIDER_MISSING`,message:`未配置合同数据提供器,请由宿主传入文件数据`}),!1;if(!e)return Z({code:`CONTRACT_ID_MISSING`,message:`缺少用于加载合同的 PaaS contractId`}),!1;let n=++A;Q(),b.value=!0,x.value=``;try{let i=await d.dataProvider.loadContract({contractId:e});if(j||n!==A)return!1;let a=r.normalizeContractSigningProviderValue(i,t.normalizeContractSigningCoordinateScale(d.dataProvider.coordinateScale)),o=r.normalizeContractSigningLocationValue({...a,contractId:e,placements:a.placements.length?a.placements:h.value.contractId===e?h.value.placements:[]},{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions});h.value=o,g.value=r.cloneContractSigningLocationValue(o),y.value=``,X();let s=r.cloneContractSigningLocationValue(o);return f(`update:modelValue`,s),f(`change`,s),f(`ready`,s),De(),(0,c.nextTick)(()=>T.value?.scrollToPage(v.value)),s}catch(e){return j||n!==A||Z(We(e,`CONTRACT_LOAD_FAILED`,`合同加载失败,请检查授权后重试`)),!1}finally{!j&&n===A&&(b.value=!1)}}async function De(){d.dataProvider?.loadPagePreview&&await Promise.allSettled(h.value.files.map(e=>{if(n.isContractSigningTemplateFile(e))return Promise.resolve();let t=r.getContractSigningHomePage(e.pages);return t&&!t.thumbnailUrl?K(e.fileId,t.pageIndex,!0):Promise.resolve()}))}async function K(e,i,a){let o=d.dataProvider?.loadPagePreview,s=h.value.files.find(t=>t.fileId===e),c=r.findContractSigningPage(h.value,e,i),l=Ge(e,i,a);if(!o||n.isContractSigningTemplateFile(s)||!c||S.value.includes(l))return;Ke(l),S.value=[...S.value,l];let u=F.start(l);try{let n=await o({contractId:h.value.contractId||d.contractId,fileId:e,pageIndex:i,thumbnail:a,signal:u.signal});if(j||!F.isCurrent(l,u)||!r.findContractSigningPage(h.value,e,i))return;let s=r.findContractSigningPage(h.value,e,i),c=r.resolveContractSigningPreviewPageSize(s,n,t.normalizeContractSigningCoordinateScale(d.dataProvider?.coordinateScale),a),ee=h.value.files.map(t=>t.fileId===e?{...t,pages:t.pages.map(e=>e.pageIndex===i?{...e,...c||{},...a?{thumbnailUrl:n.url}:{previewUrl:n.url}}:e)}:t);W({...h.value,files:ee},{clearError:!1})}catch(t){if(!F.isCurrent(l,u)||Je(t))return;let n=We(t,`CONTRACT_PREVIEW_FAILED`,`合同页面预览加载失败,可切换页面或重试`,{fileId:e,pageIndex:i});f(`error`,n),C.value={...C.value,[l]:n.message}}finally{F.finish(l,u)&&(S.value=S.value.filter(e=>e!==l))}}function Oe(e){if(e===_.value)return;let t=_.value;qe(),t&&(Q(e=>e.startsWith(`${t}:`)&&e.endsWith(`:preview`)),N=N.filter(t=>t.fileId===e)),_.value=e;let n=h.value.files.find(t=>t.fileId===e);v.value=r.getContractSigningHomePage(n?.pages)?.pageIndex??0,y.value=``,f(`file-change`,e),f(`page-change`,e,v.value),(0,c.nextTick)(()=>T.value?.scrollToPage(v.value))}function ke(e){v.value=e}function Ae(e){v.value!==e&&(v.value=e),f(`page-change`,_.value,e)}function je(e){qe();let t=_.value;M=setTimeout(()=>{M=void 0,_.value===t&&Me(t,e)},150)}function Me(e,t){let r=h.value.files.find(t=>t.fileId===e);!r||n.isContractSigningTemplateFile(r)||e!==_.value||(t.forEach(e=>{let t=r.pages.find(t=>t.pageIndex===e);!t||t.previewUrl||S.value.includes(Ge(r.fileId,e,!1))||N.some(t=>t.fileId===r.fileId&&t.pageIndex===e)||N.push({fileId:r.fileId,pageIndex:e})}),Ne())}async function Ne(){let e=_.value;for(N=N.filter(t=>t.fileId===e);P<3&&N.length;){let t=N.shift();if(!t||t.fileId!==e)continue;let i=r.findContractSigningPage(h.value,t.fileId,t.pageIndex),a=h.value.files.find(e=>e.fileId===t.fileId);!i||n.isContractSigningTemplateFile(a)||i.previewUrl||S.value.includes(Ge(t.fileId,t.pageIndex,!1))||(P+=1,K(t.fileId,t.pageIndex,!1).finally(()=>{P=Math.max(0,P-1),Ne()}))}}function Pe(e){let t=h.value.placements.find(t=>t.id===e);t&&(t.fileId!==_.value&&Oe(t.fileId),y.value=e,(0,c.nextTick)(()=>T.value?.scrollToPlacement(e)))}function q(e,t={}){if(B.value||!d.allowedPlacementTypes.includes(e))return;let n=t.fileId??L.value?.fileId,i=t.pageIndex??V.value?.pageIndex;if(!n||i===void 0)return;let a=r.findContractSigningPage(h.value,n,i);if(!a||!r.isContractSigningPageUsable(a)){Z({code:`CONTRACT_PAGE_SIZE_INVALID`,message:`当前页面缺少有效的原始宽高,暂时不能添加签署位置`,fileId:n,pageIndex:i});return}let o=r.resolveContractSigningDefaultSealTypes(d.defaultSealTypes,d.sealTypeOptions);if(e===`seal`&&!o.length){Z({code:`CONTRACT_SEAL_TYPES_MISSING`,message:`当前未配置可用的印章类型,暂时不能添加印章位置`,fileId:n,pageIndex:i});return}let s=r.createContractSigningPlacement(e,n,a,{signLeft:t.signLeft,signTop:t.signTop,sizeProfile:d.sizeProfile,sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions,...e===`seal`?{sealType:o}:{}});return W({...h.value,placements:[...h.value.placements,s]}),_.value=n,v.value=i,y.value=s.id,Xe(s)}function Fe(e,t){B.value||W({...h.value,placements:h.value.placements.map(n=>{if(n.id!==e)return n;let i=t.pageIndex===void 0?n.pageIndex:t.pageIndex,a=r.findContractSigningPage(h.value,n.fileId,i);return r.patchContractSigningPlacement(n,t,a,{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions})})})}function Ie(){let e=H.value;if(!e||B.value)return;let n=r.findContractSigningPage(h.value,e.fileId,e.pageIndex);if(!n)return;let i=t.clampContractSigningPlacement({...Xe(e),id:Ze(),signLeft:e.signLeft+16,signTop:e.signTop+16},n,{sealSizeLimit:p.value});W({...h.value,placements:[...h.value.placements,i]}),y.value=i.id}function J(e){B.value||(W({...h.value,placements:h.value.placements.filter(t=>t.id!==e)}),y.value===e&&(y.value=``))}function Le(){let e=r.validateContractSigningLocationValue(h.value,{allowedSealTypes:d.sealTypeOptions.map(e=>e.value)});return R.value?[...e,{code:`CONTRACT_TEMPLATE_FONT_UNAVAILABLE`,message:Y()}]:e}function Re(){return r.cloneContractSigningLocationValue(h.value)}function ze(){if(R.value)throw new r.ContractSigningLocationBuildError([{code:`CONTRACT_TEMPLATE_FONT_UNAVAILABLE`,message:Y()}]);return r.buildContractSigningLocationOutput(Re(),{allowedSealTypes:d.sealTypeOptions.map(e=>e.value)})}function Be(){if(R.value){let e=Y();return console.error(`[GD-SIGN-COORD]`,e),Z({code:`CONTRACT_TEMPLATE_FONT_UNAVAILABLE`,message:z.value||e}),!1}try{let e=ze();return x.value=``,f(`submit`,e),e}catch(e){return Z(e instanceof r.ContractSigningLocationBuildError?{...e.errors[0],cause:e}:We(e,`CONTRACT_SIGNING_LOCATION_INVALID`,`指定签署位置数据不完整`)),!1}}function Ve(e,t){O.value=e,k.value=e===`error`?t||`合同排版度量校验失败`:``}function He(e){let t=e.match(/第\s*(\d+)\s*页正文超出纸张/);return t?`第 ${t[1]} 页正文超出纸张,请回模板设计器调整后重试`:e.includes(`合同排版度量不一致`)?`当前浏览器的字体宽度与签署坐标要求不一致。请把缩放调回 100%,使用 Chrome 或 Edge,并确认已安装宋体和 Times New Roman(或 Liberation Serif)后刷新。缩放和字体都正常时,请联系管理员核对本机字体度量。`:e.includes(`超时`)?`合同排版校验超时。请刷新后重试;仍失败时请关闭拦截字体的扩展,或改用 Chrome、Edge。`:e.includes(`合同打印页节点不存在`)?`合同底图没有加载完整。请刷新后重新打开这份模板。`:`合同排版校验未通过。请刷新后重试;若反复出现,请让管理员查看控制台中以 [GD-SIGN-COORD] 开头的记录。`}function Y(){return O.value===`error`?k.value||`合同排版度量校验失败,禁止生成签署坐标`:`合同排版度量校验中,请稍后再保存签署坐标`}function Ue(){if(B.value)return r.cloneContractSigningLocationValue(h.value);let e=W(r.cloneContractSigningLocationValue(g.value));return y.value=``,X(!0),(0,c.nextTick)(()=>T.value?.scrollToPage(v.value)),e}function X(e=!1){let t=(e?void 0:h.value.files.find(e=>e.fileId===_.value))??h.value.files[0];_.value=t?.fileId??``,v.value=((e?void 0:t?.pages.find(e=>e.pageIndex===v.value))??t?.pages[0])?.pageIndex??0,h.value.placements.some(e=>e.id===y.value)||(y.value=``)}function Z(e){x.value=e.message,f(`error`,e)}function We(e,t,n,r={}){let i=typeof e==`object`&&e&&`status`in e?Number(e.status):void 0;return{code:t,message:i===401||i===403?`授权已失效,请重新获取签署凭证`:e instanceof Error&&e.message?e.message:n,...r,cause:e}}function Ge(e,t,n){return`${e}:${t}:${n?`thumbnail`:`preview`}`}function Ke(e){if(!(e in C.value))return;let t={...C.value};delete t[e],C.value=t}function qe(){M&&=(clearTimeout(M),void 0)}function Q(e){let t=e??(()=>!0),n=new Set(F.abort(t));n.size&&(S.value=S.value.filter(e=>!n.has(e))),e||(N=[])}function Je(e){return!!(e&&typeof e==`object`&&`cancelled`in e&&e.cancelled)||e instanceof DOMException&&e.name===`AbortError`}function Ye(e){let t=L.value;t&&K(t.fileId,e,!1)}function Xe(e){return{...e,sealType:e.sealType?[...e.sealType]:void 0}}function $(e){return JSON.stringify(e)}function Ze(){return typeof crypto<`u`&&`randomUUID`in crypto?`contract-signing-placement-${crypto.randomUUID()}`:`contract-signing-placement-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function Qe(e){if(typeof e==`number`&&Number.isFinite(e)&&e>0)return{"--gd-ant-contract-signing-location-height":`${e}px`};if(typeof e==`string`&&e.trim())return{"--gd-ant-contract-signing-location-height":e.trim()}}return le({load:G,validate:Le,getValue:Re,getOutput:ze,submit:Be,reset:Ue,addPlacement:q,removePlacement:J,fitWidth:Ee}),(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`section`,{class:(0,c.normalizeClass)([`gd-ant-contract-signing-location`,{"is-readonly":de.value,"is-disabled":e.disabled,"is-preview":I.value}]),style:(0,c.normalizeStyle)(he.value)},[(0,c.createElementVNode)(`header`,ee,[(0,c.createElementVNode)(`div`,te,[n[6]||=(0,c.createElementVNode)(`span`,{class:`gd-ant-contract-signing-location__title-bar`,"aria-hidden":`true`},null,-1),(0,c.createElementVNode)(`div`,null,[(0,c.createElementVNode)(`strong`,null,(0,c.toDisplayString)(I.value?`合同预览`:`指定合同签署位置`),1)])]),(0,c.createElementVNode)(`div`,ne,[(0,c.createElementVNode)(`span`,re,(0,c.toDisplayString)(h.value.placements.length)+` 个位置`,1),e.dataProvider?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.Button),{key:0,loading:b.value,onClick:G},{default:(0,c.withCtx)(()=>[(0,c.createVNode)((0,c.unref)(u.ReloadOutlined),{"aria-hidden":`true`}),n[7]||=(0,c.createTextVNode)(` 重新加载 `,-1)]),_:1},8,[`loading`])):(0,c.createCommentVNode)(``,!0),I.value?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.Button),{key:1,disabled:B.value,onClick:Ue},{default:(0,c.withCtx)(()=>[...n[8]||=[(0,c.createTextVNode)(`重置`,-1)]]),_:1},8,[`disabled`])),pe.value?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.Button),{key:2,type:`primary`,loading:b.value,disabled:e.disabled||R.value,onClick:Be},{default:(0,c.withCtx)(()=>[...n[9]||=[(0,c.createTextVNode)(`确认并生成规则`,-1)]]),_:1},8,[`loading`,`disabled`])):(0,c.createCommentVNode)(``,!0)])]),ge.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,ie,[(0,c.createElementVNode)(`span`,null,(0,c.toDisplayString)(ge.value),1),_e.value?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.Button),{key:0,type:`link`,size:`small`,onClick:G},{default:(0,c.withCtx)(()=>[...n[10]||=[(0,c.createTextVNode)(`重试`,-1)]]),_:1})):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`gd-ant-contract-signing-location__body`,{"is-single-file":me.value,"is-inspector-hidden":!fe.value}])},[me.value?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,class:(0,c.normalizeClass)([`gd-ant-contract-signing-location__navigator-wrap`,{"is-collapsed":D.value}])},[(0,c.createVNode)((0,c.unref)(l.Tooltip),{title:D.value?`展开页面栏`:`收起页面栏`},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`button`,{type:`button`,class:`gd-ant-contract-signing-location__panel-handle`,"aria-label":D.value?`展开页面栏`:`收起页面栏`,"aria-expanded":!D.value,onClick:n[0]||=e=>D.value=!D.value},[D.value?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(u.RightOutlined),{key:0,"aria-hidden":`true`})):((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(u.LeftOutlined),{key:1,"aria-hidden":`true`}))],8,ae)]),_:1},8,[`title`]),(0,c.createElementVNode)(`div`,oe,[(0,c.createVNode)(o.default,{files:h.value.files,"active-file-id":_.value,"loading-preview-keys":xe.value,"error-preview-keys":Se.value,onSelect:Oe},null,8,[`files`,`active-file-id`,`loading-preview-keys`,`error-preview-keys`])])],2)),(0,c.createVNode)(i.default,{ref_key:`canvasRef`,ref:T,file:L.value,pages:L.value?.pages??[],placements:ve.value,"reference-placements":ye.value,"selected-placement-id":y.value,readonly:B.value,resizable:e.resizable,"seal-size-limit":p.value,"seal-type-options":e.sealTypeOptions,zoom:w.value,"preview-loading-keys":Ce.value,"preview-error-map":we.value,"active-page-index":v.value,"min-zoom":e.minZoom,"max-zoom":e.maxZoom,"font-base-url":e.contractFontBaseUrl,onSelect:n[1]||=e=>y.value=e,onRetry:Ye,onAdd:n[2]||=(e,t,n,r)=>q(e,{signLeft:t,signTop:n,pageIndex:r}),onUpdate:n[3]||=e=>Fe(e.id,e),onRemove:J,onVisiblePages:je,onViewPage:ke,onPageChange:Ae,onZoomChange:Te,onTemplateStatus:Ve},null,8,[`file`,`pages`,`placements`,`reference-placements`,`selected-placement-id`,`readonly`,`resizable`,`seal-size-limit`,`seal-type-options`,`zoom`,`preview-loading-keys`,`preview-error-map`,`active-page-index`,`min-zoom`,`max-zoom`,`font-base-url`]),fe.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:1,class:(0,c.normalizeClass)([`gd-ant-contract-signing-location__inspector-wrap`,{"is-collapsed":E.value}])},[(0,c.createVNode)((0,c.unref)(l.Tooltip),{title:E.value?`展开属性栏`:`收起属性栏`},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`button`,{type:`button`,class:`gd-ant-contract-signing-location__panel-handle`,"aria-label":E.value?`展开属性栏`:`收起属性栏`,"aria-expanded":!E.value,onClick:n[4]||=e=>E.value=!E.value},[E.value?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(u.LeftOutlined),{key:0,"aria-hidden":`true`})):((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(u.RightOutlined),{key:1,"aria-hidden":`true`}))],8,se)]),_:1},8,[`title`]),(0,c.createElementVNode)(`div`,ce,[(0,c.createVNode)(a.default,{placement:H.value,page:be.value,pages:L.value?.pages??[],placements:ve.value,readonly:B.value,resizable:e.resizable,"seal-size-limit":p.value,"seal-type-options":e.sealTypeOptions,"allowed-placement-types":e.allowedPlacementTypes,"size-profile":e.sizeProfile,onAdd:q,onUpdate:n[5]||=e=>H.value&&Fe(H.value.id,e),onDuplicate:Ie,onRemove:J,onLocate:Pe},null,8,[`placement`,`page`,`pages`,`placements`,`readonly`,`resizable`,`seal-size-limit`,`seal-type-options`,`allowed-placement-types`,`size-profile`])])],2)):(0,c.createCommentVNode)(``,!0)],2)],6))}});exports.default=le;
|
|
1
|
+
require(`../../../_virtual/_rolldown/runtime.cjs`),require(`../../pro-contract-template-designer/src/utils/contract-print-document.cjs`);const e=require(`./constants.cjs`),t=require(`./coordinates.cjs`),n=require(`../../pro-contract-template-designer/src/utils/contract-layout-check.cjs`),r=require(`./template-source.cjs`),i=require(`./location-rules.cjs`),a=require(`./ContractSigningLocationCanvas.cjs`),o=require(`./ContractSigningLocationInspector.cjs`),s=require(`./ContractSigningLocationNavigator.cjs`),ee=require(`./preview-requests.cjs`);let c=require(`vue`),l=require(`ant-design-vue`),u=require(`@ant-design/icons-vue`);var te={class:`gd-ant-contract-signing-location__header`},ne={class:`gd-ant-contract-signing-location__title`},re={class:`gd-ant-contract-signing-location__header-actions`},ie={class:`gd-ant-contract-signing-location__placement-count`},ae={key:0,class:`gd-ant-contract-signing-location__error`,role:`alert`},oe=[`aria-label`,`aria-expanded`],se={class:`gd-ant-contract-signing-location__panel-stack`},ce=[`aria-label`,`aria-expanded`],le={class:`gd-ant-contract-signing-location__panel-stack`},ue=`正在校验排版,请稍后再确认签署位置`,de=(0,c.defineComponent)({name:`ContractSigningLocation`,__name:`ContractSigningLocation`,props:{modelValue:{default:void 0},mode:{default:`placement`},contractId:{default:``},dataProvider:{default:void 0},sealTypeOptions:{default:()=>e.CONTRACT_SIGNING_SEAL_TYPE_OPTIONS.map(e=>({...e}))},defaultSealTypes:{default:void 0},referencePlacements:{default:()=>[]},allowedPlacementTypes:{default:()=>[`seal`,`signature`,`date`]},sizeProfile:{default:`default`},autoLoad:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},minZoom:{default:.5},maxZoom:{default:1.5},zoom:{default:1},resizable:{type:Boolean,default:!1},sealMinSize:{default:8},sealMaxSize:{default:640},height:{default:void 0},showSubmitButton:{type:Boolean,default:!0},showInspector:{type:Boolean,default:void 0},contractFontBaseUrl:{default:void 0}},emits:[`update:modelValue`,`update:zoom`,`change`,`ready`,`file-change`,`page-change`,`submit`,`error`],setup(e,{expose:de,emit:fe}){let d=e,f=fe,p=(0,c.computed)(()=>t.resolveContractSigningSealSizeLimit(d.sealMinSize,d.sealMaxSize)),m=i.normalizeContractSigningLocationValue(d.modelValue??i.createContractSigningLocationValue(d.contractId),{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions}),h=(0,c.shallowRef)(m),g=(0,c.shallowRef)(i.cloneContractSigningLocationValue(m)),_=(0,c.shallowRef)(m.files[0]?.fileId??``),v=(0,c.shallowRef)(m.files[0]?.pages[0]?.pageIndex??0),y=(0,c.shallowRef)(``),b=(0,c.shallowRef)(!1),x=(0,c.shallowRef)(``),S=(0,c.ref)([]),C=(0,c.ref)({}),w=(0,c.shallowRef)(Me(d.zoom)),T=(0,c.ref)(null),E=(0,c.ref)(!1),D=(0,c.ref)(!1),O=(0,c.shallowRef)(`loading`),k=(0,c.shallowRef)(``),pe=n.createContractTemplateLayoutChecker(),A=(0,c.shallowRef)({status:`ready`,issues:[],messages:[]}),j,me=0,M=0,N=!1,P,F=[],I=0,L=new ee.ContractSigningPreviewRequests,R=(0,c.computed)(()=>d.mode===`preview`),he=(0,c.computed)(()=>R.value||d.readonly||d.disabled),ge=(0,c.computed)(()=>d.showInspector??!R.value),_e=(0,c.computed)(()=>!R.value&&d.showSubmitButton),ve=(0,c.computed)(()=>h.value.files.length<=1),ye=(0,c.computed)(()=>ut(d.height)),z=(0,c.computed)(()=>h.value.files.find(e=>e.fileId===_.value)??h.value.files[0]),B=(0,c.computed)(()=>r.isContractSigningTemplateFile(z.value)&&O.value!==`ready`),V=(0,c.computed)(()=>A.value.status===`checking`),be=(0,c.computed)(()=>{let e=z.value?.fileId;return A.value.issues.filter(t=>t.fileId===e)}),H=(0,c.computed)(()=>{let e=A.value;return e.status===`ready`?[]:e.status===`checking`?[{code:`CONTRACT_LAYOUT_CHECKING`,message:ue}]:e.issues.length?e.issues.map(e=>({code:e.kind===`measure-failed`?`CONTRACT_PAGE_LAYOUT_UNVERIFIED`:`CONTRACT_PAGE_LAYOUT_OVERFLOW`,message:Je(e),...e.fileId===void 0?{}:{fileId:e.fileId},pageIndex:e.pageIndex})):[{code:`CONTRACT_PAGE_LAYOUT_UNVERIFIED`,message:`合同排版校验失败,请刷新后重试`}]}),xe=(0,c.computed)(()=>A.value.status===`error`?A.value.messages[0]??``:``),U=(0,c.computed)(()=>!B.value||R.value?``:O.value===`loading`?`合同排版校验中,暂不可指定签署位置`:et(k.value)),Se=(0,c.computed)(()=>O.value===`error`&&U.value?U.value:x.value||U.value||xe.value),Ce=(0,c.computed)(()=>!!(x.value&&d.dataProvider&&d.contractId)&&!(O.value===`error`&&U.value)),W=(0,c.computed)(()=>he.value||B.value),we=(0,c.computed)(()=>z.value?.pages.find(e=>e.pageIndex===v.value)??z.value?.pages[0]),Te=(0,c.computed)(()=>{let e=z.value;return e?h.value.placements.filter(t=>t.fileId===e.fileId):[]}),Ee=(0,c.computed)(()=>{let e=z.value;return e?d.referencePlacements.filter(t=>t.fileId===e.fileId):[]}),G=(0,c.computed)(()=>h.value.placements.find(e=>e.id===y.value)),De=(0,c.computed)(()=>{let e=G.value;return e?i.findContractSigningPage(h.value,e.fileId,e.pageIndex)??we.value:we.value}),Oe=(0,c.computed)(()=>S.value.filter(e=>e.endsWith(`:thumbnail`)).map(e=>e.slice(0,-10))),ke=(0,c.computed)(()=>Object.keys(C.value).filter(e=>e.endsWith(`:thumbnail`)).map(e=>e.slice(0,-10))),Ae=(0,c.computed)(()=>S.value.filter(e=>e.endsWith(`:preview`)).map(e=>e.slice(0,-8))),je=(0,c.computed)(()=>{let e={};return Object.entries(C.value).forEach(([t,n])=>{t.endsWith(`:preview`)&&(e[t.slice(0,-8)]=n)}),e});(0,c.watch)(()=>d.modelValue,e=>{if(!e)return;let t=i.normalizeContractSigningLocationValue(e,{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions});$(t)!==$(h.value)&&(Q(),h.value=t,g.value=i.cloneContractSigningLocationValue(t),Y(),J(),(0,c.nextTick)(()=>T.value?.scrollToPage(v.value)))},{deep:!0}),(0,c.watch)(p,()=>{$(i.normalizeContractSigningLocationValue(h.value,{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions}))!==$(h.value)&&K(h.value)}),(0,c.watch)(()=>d.zoom,e=>{w.value=Me(e)}),(0,c.watch)(()=>z.value?.fileId,()=>{O.value=r.isContractSigningTemplateFile(z.value)?`loading`:`ready`,k.value=``}),J(),(0,c.watch)(()=>[d.contractId,d.dataProvider,d.autoLoad],([e,t,n],r)=>{!n||!t||!e||(!r||e!==r[0]||t!==r[1])&&q()},{immediate:!0}),(0,c.onBeforeUnmount)(()=>{N=!0,M+=1,at(),Q(),j?.abort(),pe.dispose()});function Me(e){let n=Math.min(d.minZoom,d.maxZoom),r=Math.max(d.minZoom,d.maxZoom);return t.clampContractSigningZoom(e,n,r)}function Ne(e){let t=Me(e);w.value=t,f(`update:zoom`,t)}function Pe(){return T.value?.fitWidth()??w.value}function K(e,t={}){let n=e.files!==h.value.files;h.value=i.normalizeContractSigningLocationValue(e,{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions}),t.clearError!==!1&&(x.value=``),Y(),n&&J();let r=i.cloneContractSigningLocationValue(h.value);return f(`update:modelValue`,r),f(`change`,r),r}async function q(){let e=String(d.contractId||h.value.contractId||``).trim();if(!d.dataProvider)return X({code:`CONTRACT_PROVIDER_MISSING`,message:`未配置合同数据提供器,请由宿主传入文件数据`}),!1;if(!e)return X({code:`CONTRACT_ID_MISSING`,message:`缺少用于加载合同的 PaaS contractId`}),!1;let n=++M;Q(),b.value=!0,x.value=``;try{let r=await d.dataProvider.loadContract({contractId:e});if(N||n!==M)return!1;let a=i.normalizeContractSigningProviderValue(r,t.normalizeContractSigningCoordinateScale(d.dataProvider.coordinateScale)),o=i.normalizeContractSigningLocationValue({...a,contractId:e,placements:a.placements.length?a.placements:h.value.contractId===e?h.value.placements:[]},{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions});h.value=o,g.value=i.cloneContractSigningLocationValue(o),y.value=``,Y(),J();let s=i.cloneContractSigningLocationValue(o);return f(`update:modelValue`,s),f(`change`,s),f(`ready`,s),Fe(),(0,c.nextTick)(()=>T.value?.scrollToPage(v.value)),s}catch(e){return N||n!==M||X(Z(e,`CONTRACT_LOAD_FAILED`,`合同加载失败,请检查授权后重试`)),!1}finally{!N&&n===M&&(b.value=!1)}}async function Fe(){d.dataProvider?.loadPagePreview&&await Promise.allSettled(h.value.files.map(e=>{if(r.isContractSigningTemplateFile(e))return Promise.resolve();let t=i.getContractSigningHomePage(e.pages);return t&&!t.thumbnailUrl?Ie(e.fileId,t.pageIndex,!0):Promise.resolve()}))}async function Ie(e,n,a){let o=d.dataProvider?.loadPagePreview,s=h.value.files.find(t=>t.fileId===e),ee=i.findContractSigningPage(h.value,e,n),c=rt(e,n,a);if(!o||r.isContractSigningTemplateFile(s)||!ee||S.value.includes(c))return;it(c),S.value=[...S.value,c];let l=L.start(c);try{let r=await o({contractId:h.value.contractId||d.contractId,fileId:e,pageIndex:n,thumbnail:a,signal:l.signal});if(N||!L.isCurrent(c,l)||!i.findContractSigningPage(h.value,e,n))return;let s=i.findContractSigningPage(h.value,e,n),ee=i.resolveContractSigningPreviewPageSize(s,r,t.normalizeContractSigningCoordinateScale(d.dataProvider?.coordinateScale),a),u=h.value.files.map(t=>t.fileId===e?{...t,pages:t.pages.map(e=>e.pageIndex===n?{...e,...ee||{},...a?{thumbnailUrl:r.url}:{previewUrl:r.url}}:e)}:t);K({...h.value,files:u},{clearError:!1})}catch(t){if(!L.isCurrent(c,l)||ot(t))return;let r=Z(t,`CONTRACT_PREVIEW_FAILED`,`合同页面预览加载失败,可切换页面或重试`,{fileId:e,pageIndex:n});f(`error`,r),C.value={...C.value,[c]:r.message}}finally{L.finish(c,l)&&(S.value=S.value.filter(e=>e!==c))}}function Le(e){if(e===_.value)return;let t=_.value;at(),t&&(Q(e=>e.startsWith(`${t}:`)&&e.endsWith(`:preview`)),F=F.filter(t=>t.fileId===e)),_.value=e;let n=h.value.files.find(t=>t.fileId===e);v.value=i.getContractSigningHomePage(n?.pages)?.pageIndex??0,y.value=``,f(`file-change`,e),f(`page-change`,e,v.value),(0,c.nextTick)(()=>T.value?.scrollToPage(v.value))}function Re(e){v.value=e}function ze(e){v.value!==e&&(v.value=e),f(`page-change`,_.value,e)}function Be(e){at();let t=_.value;P=setTimeout(()=>{P=void 0,_.value===t&&Ve(t,e)},150)}function Ve(e,t){let n=h.value.files.find(t=>t.fileId===e);!n||r.isContractSigningTemplateFile(n)||e!==_.value||(t.forEach(e=>{let t=n.pages.find(t=>t.pageIndex===e);!t||t.previewUrl||S.value.includes(rt(n.fileId,e,!1))||F.some(t=>t.fileId===n.fileId&&t.pageIndex===e)||F.push({fileId:n.fileId,pageIndex:e})}),He())}async function He(){let e=_.value;for(F=F.filter(t=>t.fileId===e);I<3&&F.length;){let t=F.shift();if(!t||t.fileId!==e)continue;let n=i.findContractSigningPage(h.value,t.fileId,t.pageIndex),a=h.value.files.find(e=>e.fileId===t.fileId);!n||r.isContractSigningTemplateFile(a)||n.previewUrl||S.value.includes(rt(t.fileId,t.pageIndex,!1))||(I+=1,Ie(t.fileId,t.pageIndex,!1).finally(()=>{I=Math.max(0,I-1),He()}))}}function Ue(e){let t=h.value.placements.find(t=>t.id===e);t&&(t.fileId!==_.value&&Le(t.fileId),y.value=e,(0,c.nextTick)(()=>T.value?.scrollToPlacement(e)))}function We(e,t={}){if(W.value||!d.allowedPlacementTypes.includes(e))return;let n=t.fileId??z.value?.fileId,r=t.pageIndex??we.value?.pageIndex;if(!n||r===void 0)return;let a=i.findContractSigningPage(h.value,n,r);if(!a||!i.isContractSigningPageUsable(a)){X({code:`CONTRACT_PAGE_SIZE_INVALID`,message:`当前页面缺少有效的原始宽高,暂时不能添加签署位置`,fileId:n,pageIndex:r});return}let o=i.resolveContractSigningDefaultSealTypes(d.defaultSealTypes,d.sealTypeOptions);if(e===`seal`&&!o.length){X({code:`CONTRACT_SEAL_TYPES_MISSING`,message:`当前未配置可用的印章类型,暂时不能添加印章位置`,fileId:n,pageIndex:r});return}let s=i.createContractSigningPlacement(e,n,a,{signLeft:t.signLeft,signTop:t.signTop,sizeProfile:d.sizeProfile,sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions,...e===`seal`?{sealType:o}:{}});return K({...h.value,placements:[...h.value.placements,s]}),_.value=n,v.value=r,y.value=s.id,ct(s)}function Ge(e,t){W.value||K({...h.value,placements:h.value.placements.map(n=>{if(n.id!==e)return n;let r=t.pageIndex===void 0?n.pageIndex:t.pageIndex,a=i.findContractSigningPage(h.value,n.fileId,r);return i.patchContractSigningPlacement(n,t,a,{sealSizeLimit:p.value,sealTypeOptions:d.sealTypeOptions})})})}function Ke(){let e=G.value;if(!e||W.value)return;let n=i.findContractSigningPage(h.value,e.fileId,e.pageIndex);if(!n)return;let r=t.clampContractSigningPlacement({...ct(e),id:lt(),signLeft:e.signLeft+16,signTop:e.signTop+16},n,{sealSizeLimit:p.value});K({...h.value,placements:[...h.value.placements,r]}),y.value=r.id}function qe(e){W.value||(K({...h.value,placements:h.value.placements.filter(t=>t.id!==e)}),y.value===e&&(y.value=``))}function Je(e){let t=h.value.files.find(t=>t.fileId===e.fileId)?.fileName,r=n.describeContractTemplateLayoutIssue(e,`generate`)[0]??`合同排版校验未通过`;return t?`${t}:${r}`:r}function J(){j?.abort();let e=++me,t=[];for(let e of h.value.files)r.isContractSigningTemplateSource(e.source)&&t.push({fileId:e.fileId,template:e.source.template,...e.source.values?{values:e.source.values}:{},layoutPages:r.buildContractSigningLayoutPages(e.fileId,e.source)});if(!t.length){j=void 0,A.value={status:`ready`,issues:[],messages:[]};return}let i=new AbortController;j=i,A.value={status:`checking`,issues:[],messages:[]},pe.check(t,{signal:i.signal}).then(t=>{N||e!==me||(A.value=t.length?{status:`error`,issues:t,messages:t.map(e=>Je(e))}:{status:`ready`,issues:[],messages:[]})},t=>{N||e!==me||n.isContractTemplateLayoutAbortError(t)||(A.value={status:`error`,issues:[],messages:[`合同排版校验失败,请刷新后重试`]})})}function Ye(){let e=i.validateContractSigningLocationValue(h.value,{allowedSealTypes:d.sealTypeOptions.map(e=>e.value)});return[...B.value&&!V.value?[...e,{code:`CONTRACT_TEMPLATE_FONT_UNAVAILABLE`,message:tt()}]:e,...H.value]}function Xe(){return i.cloneContractSigningLocationValue(h.value)}function Ze(){if(V.value)throw new i.ContractSigningLocationBuildError(H.value);if(B.value)throw new i.ContractSigningLocationBuildError([{code:`CONTRACT_TEMPLATE_FONT_UNAVAILABLE`,message:tt()}]);if(H.value.length)throw new i.ContractSigningLocationBuildError(H.value);return i.buildContractSigningLocationOutput(Xe(),{allowedSealTypes:d.sealTypeOptions.map(e=>e.value)})}function Qe(){if(V.value)return X(H.value[0]),!1;if(B.value){let e=tt();return console.error(`[GD-SIGN-COORD]`,e),X({code:`CONTRACT_TEMPLATE_FONT_UNAVAILABLE`,message:U.value||e}),!1}let e=H.value;if(e.length)return e[0].code!==`CONTRACT_LAYOUT_CHECKING`&&console.error(`[GD-SIGN-COORD]`,e.map(e=>e.message).join(`;`)),X(e[0]),!1;try{let e=Ze();return x.value=``,f(`submit`,e),e}catch(e){return X(e instanceof i.ContractSigningLocationBuildError?{...e.errors[0],cause:e}:Z(e,`CONTRACT_SIGNING_LOCATION_INVALID`,`指定签署位置数据不完整`)),!1}}function $e(e,t){O.value=e,k.value=e===`error`?t||`合同排版度量校验失败`:``}function et(e){let t=e.match(/第\s*(\d+)\s*页正文超出纸张宽度\s*(\d+(?:\.\d+)?)\s*px/);if(t)return`第 ${t[1]} 页正文超出纸张宽度 ${t[2]}px,请回模板设计器调整后重试`;let n=e.match(/第\s*(\d+)\s*页正文超出纸张/);return n?`第 ${n[1]} 页正文超出纸张,请回模板设计器调整后重试`:e.includes(`合同排版度量不一致`)?`当前浏览器的字体宽度与签署坐标要求不一致。请把缩放调回 100%,使用 Chrome 或 Edge,并确认已安装宋体和 Times New Roman(或 Liberation Serif)后刷新。缩放和字体都正常时,请联系管理员核对本机字体度量。`:e.includes(`超时`)?`合同排版校验超时。请刷新后重试;仍失败时请关闭拦截字体的扩展,或改用 Chrome、Edge。`:e.includes(`合同打印页节点不存在`)?`合同底图没有加载完整。请刷新后重新打开这份模板。`:e.includes(`合同图片加载失败`)?`合同底图中有图片未能加载。请确认图片地址可以正常访问,刷新后重新打开这份模板。`:e.includes(`无法确认排版`)?`${e}。请刷新后重试;仍失败时请让管理员查看控制台中以 [GD-SIGN-COORD] 开头的记录。`:`合同排版校验未通过。请刷新后重试;若反复出现,请让管理员查看控制台中以 [GD-SIGN-COORD] 开头的记录。`}function tt(){return O.value===`error`?k.value||`合同排版度量校验失败,禁止生成签署坐标`:`合同排版度量校验中,请稍后再保存签署坐标`}function nt(){if(W.value)return i.cloneContractSigningLocationValue(h.value);let e=K(i.cloneContractSigningLocationValue(g.value));return y.value=``,Y(!0),(0,c.nextTick)(()=>T.value?.scrollToPage(v.value)),e}function Y(e=!1){let t=(e?void 0:h.value.files.find(e=>e.fileId===_.value))??h.value.files[0];_.value=t?.fileId??``,v.value=((e?void 0:t?.pages.find(e=>e.pageIndex===v.value))??t?.pages[0])?.pageIndex??0,h.value.placements.some(e=>e.id===y.value)||(y.value=``)}function X(e){x.value=e.message,f(`error`,e)}function Z(e,t,n,r={}){let i=typeof e==`object`&&e&&`status`in e?Number(e.status):void 0;return{code:t,message:i===401||i===403?`授权已失效,请重新获取签署凭证`:e instanceof Error&&e.message?e.message:n,...r,cause:e}}function rt(e,t,n){return`${e}:${t}:${n?`thumbnail`:`preview`}`}function it(e){if(!(e in C.value))return;let t={...C.value};delete t[e],C.value=t}function at(){P&&=(clearTimeout(P),void 0)}function Q(e){let t=e??(()=>!0),n=new Set(L.abort(t));n.size&&(S.value=S.value.filter(e=>!n.has(e))),e||(F=[])}function ot(e){return!!(e&&typeof e==`object`&&`cancelled`in e&&e.cancelled)||e instanceof DOMException&&e.name===`AbortError`}function st(e){let t=z.value;t&&Ie(t.fileId,e,!1)}function ct(e){return{...e,sealType:e.sealType?[...e.sealType]:void 0}}function $(e){return JSON.stringify(e)}function lt(){return typeof crypto<`u`&&`randomUUID`in crypto?`contract-signing-placement-${crypto.randomUUID()}`:`contract-signing-placement-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function ut(e){if(typeof e==`number`&&Number.isFinite(e)&&e>0)return{"--gd-ant-contract-signing-location-height":`${e}px`};if(typeof e==`string`&&e.trim())return{"--gd-ant-contract-signing-location-height":e.trim()}}return de({load:q,validate:Ye,getValue:Xe,getOutput:Ze,submit:Qe,reset:nt,addPlacement:We,removePlacement:qe,fitWidth:Pe}),(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`section`,{class:(0,c.normalizeClass)([`gd-ant-contract-signing-location`,{"is-readonly":he.value,"is-disabled":e.disabled,"is-preview":R.value}]),style:(0,c.normalizeStyle)(ye.value)},[(0,c.createElementVNode)(`header`,te,[(0,c.createElementVNode)(`div`,ne,[n[6]||=(0,c.createElementVNode)(`span`,{class:`gd-ant-contract-signing-location__title-bar`,"aria-hidden":`true`},null,-1),(0,c.createElementVNode)(`div`,null,[(0,c.createElementVNode)(`strong`,null,(0,c.toDisplayString)(R.value?`合同预览`:`指定合同签署位置`),1)])]),(0,c.createElementVNode)(`div`,re,[(0,c.createElementVNode)(`span`,ie,(0,c.toDisplayString)(h.value.placements.length)+` 个位置`,1),e.dataProvider?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.Button),{key:0,loading:b.value,onClick:q},{default:(0,c.withCtx)(()=>[(0,c.createVNode)((0,c.unref)(u.ReloadOutlined),{"aria-hidden":`true`}),n[7]||=(0,c.createTextVNode)(` 重新加载 `,-1)]),_:1},8,[`loading`])):(0,c.createCommentVNode)(``,!0),R.value?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.Button),{key:1,disabled:W.value,onClick:nt},{default:(0,c.withCtx)(()=>[...n[8]||=[(0,c.createTextVNode)(`重置`,-1)]]),_:1},8,[`disabled`])),_e.value?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.Button),{key:2,type:`primary`,loading:b.value||V.value,disabled:e.disabled||B.value||V.value,onClick:Qe},{default:(0,c.withCtx)(()=>[...n[9]||=[(0,c.createTextVNode)(`确认并生成规则`,-1)]]),_:1},8,[`loading`,`disabled`])):(0,c.createCommentVNode)(``,!0)])]),Se.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,ae,[(0,c.createElementVNode)(`span`,null,(0,c.toDisplayString)(Se.value),1),Ce.value?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(l.Button),{key:0,type:`link`,size:`small`,onClick:q},{default:(0,c.withCtx)(()=>[...n[10]||=[(0,c.createTextVNode)(`重试`,-1)]]),_:1})):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`gd-ant-contract-signing-location__body`,{"is-single-file":ve.value,"is-inspector-hidden":!ge.value}])},[ve.value?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,class:(0,c.normalizeClass)([`gd-ant-contract-signing-location__navigator-wrap`,{"is-collapsed":D.value}])},[(0,c.createVNode)((0,c.unref)(l.Tooltip),{title:D.value?`展开页面栏`:`收起页面栏`},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`button`,{type:`button`,class:`gd-ant-contract-signing-location__panel-handle`,"aria-label":D.value?`展开页面栏`:`收起页面栏`,"aria-expanded":!D.value,onClick:n[0]||=e=>D.value=!D.value},[D.value?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(u.RightOutlined),{key:0,"aria-hidden":`true`})):((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(u.LeftOutlined),{key:1,"aria-hidden":`true`}))],8,oe)]),_:1},8,[`title`]),(0,c.createElementVNode)(`div`,se,[(0,c.createVNode)(s.default,{files:h.value.files,"active-file-id":_.value,"loading-preview-keys":Oe.value,"error-preview-keys":ke.value,onSelect:Le},null,8,[`files`,`active-file-id`,`loading-preview-keys`,`error-preview-keys`])])],2)),(0,c.createVNode)(a.default,{ref_key:`canvasRef`,ref:T,file:z.value,pages:z.value?.pages??[],placements:Te.value,"reference-placements":Ee.value,"selected-placement-id":y.value,readonly:W.value,resizable:e.resizable,"seal-size-limit":p.value,"seal-type-options":e.sealTypeOptions,zoom:w.value,"preview-loading-keys":Ae.value,"preview-error-map":je.value,"active-page-index":v.value,"min-zoom":e.minZoom,"max-zoom":e.maxZoom,"font-base-url":e.contractFontBaseUrl,"layout-issues":be.value,"layout-checking":V.value,onSelect:n[1]||=e=>y.value=e,onRetry:st,onAdd:n[2]||=(e,t,n,r)=>We(e,{signLeft:t,signTop:n,pageIndex:r}),onUpdate:n[3]||=e=>Ge(e.id,e),onRemove:qe,onVisiblePages:Be,onViewPage:Re,onPageChange:ze,onZoomChange:Ne,onTemplateStatus:$e},null,8,[`file`,`pages`,`placements`,`reference-placements`,`selected-placement-id`,`readonly`,`resizable`,`seal-size-limit`,`seal-type-options`,`zoom`,`preview-loading-keys`,`preview-error-map`,`active-page-index`,`min-zoom`,`max-zoom`,`font-base-url`,`layout-issues`,`layout-checking`]),ge.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:1,class:(0,c.normalizeClass)([`gd-ant-contract-signing-location__inspector-wrap`,{"is-collapsed":E.value}])},[(0,c.createVNode)((0,c.unref)(l.Tooltip),{title:E.value?`展开属性栏`:`收起属性栏`},{default:(0,c.withCtx)(()=>[(0,c.createElementVNode)(`button`,{type:`button`,class:`gd-ant-contract-signing-location__panel-handle`,"aria-label":E.value?`展开属性栏`:`收起属性栏`,"aria-expanded":!E.value,onClick:n[4]||=e=>E.value=!E.value},[E.value?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(u.LeftOutlined),{key:0,"aria-hidden":`true`})):((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(u.RightOutlined),{key:1,"aria-hidden":`true`}))],8,ce)]),_:1},8,[`title`]),(0,c.createElementVNode)(`div`,le,[(0,c.createVNode)(o.default,{placement:G.value,page:De.value,pages:z.value?.pages??[],placements:Te.value,readonly:W.value,resizable:e.resizable,"seal-size-limit":p.value,"seal-type-options":e.sealTypeOptions,"allowed-placement-types":e.allowedPlacementTypes,"size-profile":e.sizeProfile,onAdd:We,onUpdate:n[5]||=e=>G.value&&Ge(G.value.id,e),onDuplicate:Ke,onRemove:qe,onLocate:Ue},null,8,[`placement`,`page`,`pages`,`placements`,`readonly`,`resizable`,`seal-size-limit`,`seal-type-options`,`allowed-placement-types`,`size-profile`])])],2)):(0,c.createCommentVNode)(``,!0)],2)],6))}});exports.default=de;
|