@guodun/antdv 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ import { isContractSigningPageUsable as d } from "./location-rules.mjs";
6
6
  import { CONTRACT_SIGNING_FALLBACK_PAGE_SIZE as f, buildPageLayouts as p, contentPointToPagePoint as m, findPageAtOffset as h, getContractSigningAutoScrollDelta as g, getPageLayoutScrollTop as _, getPageLayoutsContentSize as ee, getVisibleRange as te } from "./page-layout.mjs";
7
7
  import { useFitWidthZoom as ne } from "../../pro-contract-template-designer/src/composables/use-fit-width-zoom.mjs";
8
8
  import { getContractSigningPlacementVisual as re } from "./signing-visuals.mjs";
9
- import { Fragment as v, computed as y, createBlock as ie, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as ae, createVNode as C, defineComponent as w, nextTick as oe, normalizeClass as se, normalizeStyle as T, onBeforeUnmount as ce, onMounted as le, openBlock as E, ref as ue, renderList as D, shallowRef as O, toDisplayString as k, unref as A, watch as de, withCtx as j, withKeys as fe, withModifiers as M } from "vue";
9
+ import { Fragment as v, computed as y, createBlock as ie, createCommentVNode as ae, createElementBlock as b, createElementVNode as x, createTextVNode as oe, createVNode as S, defineComponent as C, nextTick as se, normalizeClass as w, normalizeStyle as T, onBeforeUnmount as ce, onMounted as le, openBlock as E, ref as ue, renderList as D, shallowRef as O, toDisplayString as k, unref as A, watch as de, withCtx as j, withKeys as fe, withModifiers as M } from "vue";
10
10
  import { Button as N } from "ant-design-vue";
11
11
  import { useElementSize as pe } from "@vueuse/core";
12
12
  import { ColumnWidthOutlined as me, LeftOutlined as he, RightOutlined as ge, ZoomInOutlined as _e, ZoomOutOutlined as ve } from "@ant-design/icons-vue";
@@ -38,13 +38,14 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
38
38
  ], Be = { class: "gd-ant-contract-signing-location__placement-body" }, Ve = ["src", "alt"], He = {
39
39
  key: 0,
40
40
  class: "gd-ant-contract-signing-location__placement-badge"
41
- }, Ue = ["onPointerdown"], We = /* @__PURE__ */ w({
41
+ }, Ue = ["onPointerdown"], We = ["title", "aria-label"], Ge = { class: "gd-ant-contract-signing-location__placement-body" }, Ke = ["src"], qe = { class: "gd-ant-contract-signing-location__placement-reference-badge" }, Je = /* @__PURE__ */ C({
42
42
  name: "ContractSigningLocationCanvas",
43
43
  __name: "ContractSigningLocationCanvas",
44
44
  props: {
45
45
  file: {},
46
46
  pages: {},
47
47
  placements: {},
48
+ referencePlacements: { default: () => [] },
48
49
  selectedPlacementId: {},
49
50
  readonly: { type: Boolean },
50
51
  resizable: { type: Boolean },
@@ -71,8 +72,8 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
71
72
  "scroll-to-ready",
72
73
  "template-status"
73
74
  ],
74
- setup(w, { expose: We, emit: Ge }) {
75
- let Ke = [
75
+ setup(C, { expose: Je, emit: Ye }) {
76
+ let Xe = [
76
77
  "nw",
77
78
  "n",
78
79
  "ne",
@@ -81,111 +82,113 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
81
82
  "s",
82
83
  "sw",
83
84
  "w"
84
- ], P = w, F = Ge, I = ue(null), L = ue(null), qe = O(1), R = O(P.activePageIndex), Je = O({
85
+ ], P = C, F = Ye, I = ue(null), L = ue(null), Ze = O(1), R = O(P.activePageIndex), Qe = O({
85
86
  start: 0,
86
87
  end: -1
87
- }), { width: Ye } = pe(I), { fitWidth: Xe, markUserAdjusted: Ze } = ne({
88
- viewportWidth: Ye,
88
+ }), { width: $e } = pe(I), { fitWidth: et, markUserAdjusted: tt } = ne({
89
+ viewportWidth: $e,
89
90
  widestPageWidth: y(() => Math.max(...P.pages.map((e) => e.displayWidth || e.width || f.width), f.width)),
90
91
  padding: 48,
91
92
  minZoom: () => P.minZoom,
92
93
  maxZoom: () => P.maxZoom,
93
94
  getZoom: () => P.zoom,
94
95
  applyZoom: (e) => (F("zoom-change", e), e)
95
- }), z = O([]), Qe = O(), B = O(), V, H = 0, U, $e, et, tt, W = y(() => p(P.pages, P.zoom, 16)), nt = y(() => ee(W.value)), G = y(() => u(P.file)), rt = y(() => c(P.file?.source)), it = y(() => new Map(rt.value.map((e) => [e.pageIndex, e]))), at = y(() => l(P.file)), ot = y(() => {
96
- let e = Je.value;
97
- return W.value.length ? e.end < e.start ? W.value.slice(0, 2) : W.value.slice(e.start, e.end + 1) : [];
98
- }), st = y(() => ot.value.flatMap((e) => {
99
- let t = q(e.pageIndex);
96
+ }), nt = O([]), rt = O(), z = O(), B, V = 0, H, it, at, ot, U = y(() => p(P.pages, P.zoom, 16)), st = y(() => ee(U.value)), W = y(() => u(P.file)), ct = y(() => c(P.file?.source)), lt = y(() => new Map(ct.value.map((e) => [e.pageIndex, e]))), ut = y(() => l(P.file)), dt = y(() => {
97
+ let e = Qe.value;
98
+ return U.value.length ? e.end < e.start ? U.value.slice(0, 2) : U.value.slice(e.start, e.end + 1) : [];
99
+ }), ft = y(() => dt.value.flatMap((e) => {
100
+ let t = K(e.pageIndex);
100
101
  return t ? [{
101
102
  layout: e,
102
103
  page: t,
103
- logical: J(t),
104
- templatePage: it.value.get(e.pageIndex)
104
+ logical: q(t),
105
+ templatePage: lt.value.get(e.pageIndex)
105
106
  }] : [];
106
- })), ct = y(() => P.pages.find((e) => e.pageIndex === R.value) ?? P.pages[0]), lt = y(() => Math.min(P.minZoom, P.maxZoom)), ut = y(() => Math.max(P.minZoom, P.maxZoom)), dt = y(() => P.placements.find((e) => e.id === P.selectedPlacementId)), ft = /* @__PURE__ */ new Date(), K = /* @__PURE__ */ new Map(), pt = O({});
107
- function mt(e) {
107
+ })), pt = y(() => P.pages.find((e) => e.pageIndex === R.value) ?? P.pages[0]), mt = y(() => Math.min(P.minZoom, P.maxZoom)), ht = y(() => Math.max(P.minZoom, P.maxZoom)), gt = y(() => P.placements.find((e) => e.id === P.selectedPlacementId)), _t = /* @__PURE__ */ new Date(), G = /* @__PURE__ */ new Map(), vt = O({});
108
+ function yt(e) {
108
109
  return JSON.stringify([
109
110
  e.signType,
110
111
  e.sealType ?? [],
111
112
  P.sealTypeOptions ?? []
112
113
  ]);
113
114
  }
114
- function ht(e) {
115
- let t = mt(e), n = K.get(t);
115
+ function bt(e) {
116
+ let t = yt(e), n = G.get(t);
116
117
  if (n) return n;
117
118
  let r = re(e, {
118
119
  sealTypeOptions: P.sealTypeOptions,
119
- date: ft
120
+ date: _t
120
121
  });
121
- if (K.size >= 128) {
122
- let e = K.keys().next().value;
123
- e !== void 0 && K.delete(e);
122
+ if (G.size >= 128) {
123
+ let e = G.keys().next().value;
124
+ e !== void 0 && G.delete(e);
124
125
  }
125
- return K.set(t, r), r;
126
+ return G.set(t, r), r;
126
127
  }
127
- let gt = y(() => {
128
+ let xt = y(() => {
128
129
  let e = /* @__PURE__ */ new WeakMap();
129
130
  return P.placements.forEach((t) => {
130
- e.set(t, ht(t));
131
+ e.set(t, bt(t));
132
+ }), P.referencePlacements.forEach((t) => {
133
+ e.set(t, bt(t));
131
134
  }), e;
132
135
  });
133
136
  de(() => P.activePageIndex, (e) => {
134
- R.value = e, Nt() || Q(e);
137
+ R.value = e, Rt() || Q(e);
135
138
  }), de(() => P.pages.map((e) => e.pageIndex).join(","), () => {
136
- pt.value = {}, F("template-status", G.value ? "loading" : "ready"), oe(() => {
139
+ vt.value = {}, F("template-status", W.value ? "loading" : "ready"), se(() => {
137
140
  X(), Z(), F("scroll-to-ready");
138
141
  });
139
- }), de(() => st.value.map((e) => e.layout.pageIndex).join(","), () => {
140
- vt();
142
+ }), de(() => ft.value.map((e) => e.layout.pageIndex).join(","), () => {
143
+ Ct();
141
144
  }), de(() => P.zoom, (e, t) => {
142
145
  if (!I.value || t == null || e === t) return;
143
- let n = jt(), r = p(P.pages, t, 16), i = h(r, n.layoutScrollTop + 1) ?? r[0];
146
+ let n = It(), r = p(P.pages, t, 16), i = h(r, n.layoutScrollTop + 1) ?? r[0];
144
147
  if (!i) return;
145
- et = {
148
+ at = {
146
149
  pageIndex: i.pageIndex,
147
150
  offsetInPage: n.layoutScrollTop - i.top
148
151
  };
149
152
  let a = e / Math.max(.01, t);
150
- oe(() => Ft(a));
153
+ se(() => Bt(a));
151
154
  }), le(() => {
152
- X(), Z(), F("scroll-to-ready"), !(typeof ResizeObserver > "u" || !I.value) && (tt = new ResizeObserver(() => {
155
+ X(), Z(), F("scroll-to-ready"), !(typeof ResizeObserver > "u" || !I.value) && (ot = new ResizeObserver(() => {
153
156
  X(), Z();
154
- }), tt.observe(I.value));
157
+ }), ot.observe(I.value));
155
158
  }), ce(() => {
156
- Qt(), Ut(), U && clearTimeout(U), tt?.disconnect(), tt = void 0;
159
+ rn(), Jt(), H && clearTimeout(H), ot?.disconnect(), ot = void 0;
157
160
  });
158
- function q(e) {
161
+ function K(e) {
159
162
  return P.pages.find((t) => t.pageIndex === e);
160
163
  }
161
- function _t(e, t, n) {
162
- pt.value = {
163
- ...pt.value,
164
+ function St(e, t, n) {
165
+ vt.value = {
166
+ ...vt.value,
164
167
  [e]: {
165
168
  status: t,
166
169
  detail: n
167
170
  }
168
- }, vt();
171
+ }, Ct();
169
172
  }
170
- function vt() {
171
- if (!G.value) {
173
+ function Ct() {
174
+ if (!W.value) {
172
175
  F("template-status", "ready");
173
176
  return;
174
177
  }
175
- let e = st.value.filter((e) => e.templatePage).map((e) => pt.value[e.layout.pageIndex]), t = e.find((e) => e?.status === "error");
178
+ let e = ft.value.filter((e) => e.templatePage).map((e) => vt.value[e.layout.pageIndex]), t = e.find((e) => e?.status === "error");
176
179
  if (t) {
177
180
  F("template-status", "error", t.detail);
178
181
  return;
179
182
  }
180
183
  F("template-status", e.length > 0 && e.every((e) => e?.status === "ready") ? "ready" : "loading");
181
184
  }
182
- function J(e) {
185
+ function q(e) {
183
186
  return e && d(e) ? {
184
187
  width: e.width,
185
188
  height: e.height
186
189
  } : { ...f };
187
190
  }
188
- function Y(e) {
191
+ function J(e) {
189
192
  if (!e || !d(e)) return { ...f };
190
193
  let t = Number(e.displayWidth), n = Number(e.displayHeight);
191
194
  return {
@@ -193,24 +196,27 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
193
196
  height: Number.isFinite(n) && n > 0 ? n : e.height
194
197
  };
195
198
  }
196
- function yt(e) {
199
+ function wt(e) {
197
200
  return `${P.file?.fileId ?? ""}:${e}`;
198
201
  }
199
- function bt(e) {
200
- return P.previewLoadingKeys.includes(yt(e));
202
+ function Tt(e) {
203
+ return P.previewLoadingKeys.includes(wt(e));
201
204
  }
202
- function xt(e) {
203
- return P.previewErrorMap[yt(e)] || "";
205
+ function Et(e) {
206
+ return P.previewErrorMap[wt(e)] || "";
204
207
  }
205
- function St(e) {
208
+ function Dt(e) {
206
209
  return P.placements.filter((t) => t.pageIndex === e);
207
210
  }
208
- function Ct(e) {
209
- let t = dt.value;
211
+ function Ot(e) {
212
+ return P.referencePlacements.filter((t) => t.pageIndex === e);
213
+ }
214
+ function kt(e) {
215
+ let t = gt.value;
210
216
  return t && t.pageIndex === e.pageIndex ? r(t, e) : void 0;
211
217
  }
212
- function wt(e) {
213
- let t = i(e), n = q(e.pageIndex), r = Y(n), a = J(n);
218
+ function At(e) {
219
+ let t = i(e), n = K(e.pageIndex), r = J(n), a = q(n);
214
220
  return {
215
221
  left: `${t.signLeft * r.width / Math.max(1, a.width)}px`,
216
222
  top: `${t.signTop * r.height / Math.max(1, a.height)}px`,
@@ -218,8 +224,8 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
218
224
  height: `${t.signHeight * r.height / Math.max(1, a.height)}px`
219
225
  };
220
226
  }
221
- function Tt(e) {
222
- let t = i(e), n = q(e.pageIndex), r = Y(n), a = J(n), o = r.width / Math.max(1, a.width), s = r.height / Math.max(1, a.height);
227
+ function jt(e) {
228
+ let t = i(e), n = K(e.pageIndex), r = J(n), a = q(n), o = r.width / Math.max(1, a.width), s = r.height / Math.max(1, a.height);
223
229
  return {
224
230
  "--gd-contract-sign-left": `${t.signLeft * o}px`,
225
231
  "--gd-contract-sign-top": `${t.signTop * s}px`,
@@ -227,30 +233,30 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
227
233
  "--gd-contract-sign-bottom": `${(t.signTop + t.signHeight) * s}px`
228
234
  };
229
235
  }
230
- function Et(e, t) {
231
- let n = Y(t), r = J(t), i = e.axis === "x" ? n.width / Math.max(1, r.width) : n.height / Math.max(1, r.height);
236
+ function Mt(e, t) {
237
+ let n = J(t), r = q(t), i = e.axis === "x" ? n.width / Math.max(1, r.width) : n.height / Math.max(1, r.height);
232
238
  return e.axis === "x" ? { left: `${e.position * i}px` } : { top: `${e.position * i}px` };
233
239
  }
234
- function Dt(e, t) {
240
+ function Nt(e, t) {
235
241
  return n(e, t, {
236
242
  sealSizeLimit: P.sealSizeLimit,
237
243
  sealTypes: e.sealType,
238
244
  sealTypeOptions: P.sealTypeOptions
239
245
  });
240
246
  }
241
- function Ot(e) {
242
- return gt.value.get(e) ?? ht(e);
247
+ function Y(e) {
248
+ return xt.value.get(e) ?? bt(e);
243
249
  }
244
- function kt(e) {
250
+ function Pt(e) {
245
251
  return t(e, P.resizable, P.readonly) && e.id === P.selectedPlacementId;
246
252
  }
247
- function At(e) {
253
+ function Ft(e) {
248
254
  return {
249
255
  ...e,
250
256
  sealType: e.sealType ? [...e.sealType] : void 0
251
257
  };
252
258
  }
253
- function jt() {
259
+ function It() {
254
260
  let e = I.value, t = L.value;
255
261
  if (!e) return {
256
262
  layoutScrollTop: 0,
@@ -262,7 +268,7 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
262
268
  viewportHeight: e.clientHeight
263
269
  };
264
270
  }
265
- function Mt(e, t) {
271
+ function Lt(e, t) {
266
272
  let n = L.value;
267
273
  if (n) {
268
274
  let r = n.getBoundingClientRect();
@@ -282,147 +288,147 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
282
288
  y: t - i.top + r.scrollTop - o
283
289
  };
284
290
  }
285
- function Nt() {
291
+ function Rt() {
286
292
  return !!(document.activeElement && document.activeElement.tagName === "INPUT");
287
293
  }
288
294
  function X() {
289
- let e = jt();
290
- Je.value = te(W.value, e.layoutScrollTop, e.viewportHeight, 1);
291
- let t = h(W.value, e.layoutScrollTop + 1);
295
+ let e = It();
296
+ Qe.value = te(U.value, e.layoutScrollTop, e.viewportHeight, 1);
297
+ let t = h(U.value, e.layoutScrollTop + 1);
292
298
  if (t) {
293
299
  let e = R.value !== t.pageIndex;
294
- R.value = t.pageIndex, Nt() || Q(t.pageIndex), e && F("view-page", t.pageIndex);
300
+ R.value = t.pageIndex, Rt() || Q(t.pageIndex), e && F("view-page", t.pageIndex);
295
301
  }
296
302
  }
297
303
  function Z() {
298
- let e = Je.value;
299
- F("visible-pages", W.value.slice(Math.max(0, e.start), e.end + 1).map((e) => e.pageIndex));
304
+ let e = Qe.value;
305
+ F("visible-pages", U.value.slice(Math.max(0, e.start), e.end + 1).map((e) => e.pageIndex));
300
306
  }
301
- function Pt() {
302
- X(), U && clearTimeout(U), U = setTimeout(() => {
303
- Z(), R.value !== $e && ($e = R.value, F("page-change", R.value));
307
+ function zt() {
308
+ X(), H && clearTimeout(H), H = setTimeout(() => {
309
+ Z(), R.value !== it && (it = R.value, F("page-change", R.value));
304
310
  }, 80);
305
311
  }
306
- function Ft(e) {
307
- let t = I.value, n = L.value, r = et;
308
- if (et = void 0, !t || !n || !r) return;
309
- let i = W.value.find((e) => e.pageIndex === r.pageIndex);
312
+ function Bt(e) {
313
+ let t = I.value, n = L.value, r = at;
314
+ if (at = void 0, !t || !n || !r) return;
315
+ let i = U.value.find((e) => e.pageIndex === r.pageIndex);
310
316
  i && (t.scrollTop = n.offsetTop + i.top + r.offsetInPage * e, X());
311
317
  }
312
- function It(e) {
318
+ function Vt(e) {
313
319
  let t = I.value, n = L.value;
314
- t && (R.value = e, Q(e), F("page-change", e), $e = e, oe(() => {
315
- let r = _(W.value, e);
320
+ t && (R.value = e, Q(e), F("page-change", e), it = e, se(() => {
321
+ let r = _(U.value, e);
316
322
  t.scrollTop = (n?.offsetTop ?? 0) + r, X(), Z();
317
323
  }));
318
324
  }
319
- function Lt(e) {
325
+ function Ht(e) {
320
326
  let t = P.placements.find((t) => t.id === e), n = I.value, r = L.value;
321
327
  if (!t || !n) return;
322
- let a = W.value.find((e) => e.pageIndex === t.pageIndex);
323
- a && (R.value = t.pageIndex, Q(t.pageIndex), oe(() => {
324
- let e = jt(), o = q(t.pageIndex), s = Y(o), c = J(o), l = a.top + i(t).signTop * s.height / Math.max(1, c.height) * P.zoom, u = l + i(t).signHeight * s.height / Math.max(1, c.height) * P.zoom, d = e.layoutScrollTop, f = d + e.viewportHeight;
328
+ let a = U.value.find((e) => e.pageIndex === t.pageIndex);
329
+ a && (R.value = t.pageIndex, Q(t.pageIndex), se(() => {
330
+ let e = It(), o = K(t.pageIndex), s = J(o), c = q(o), l = a.top + i(t).signTop * s.height / Math.max(1, c.height) * P.zoom, u = l + i(t).signHeight * s.height / Math.max(1, c.height) * P.zoom, d = e.layoutScrollTop, f = d + e.viewportHeight;
325
331
  (l < d || u > f) && (n.scrollTop = (r?.offsetTop ?? 0) + Math.max(0, l - 24)), X(), Z(), F("page-change", t.pageIndex);
326
332
  }));
327
333
  }
328
334
  function Q(e) {
329
335
  let t = P.pages.findIndex((t) => t.pageIndex === e);
330
- qe.value = t >= 0 ? t + 1 : 1;
336
+ Ze.value = t >= 0 ? t + 1 : 1;
331
337
  }
332
- function Rt(e) {
338
+ function Ut(e) {
333
339
  let t = P.pages.findIndex((e) => e.pageIndex === R.value), n = Math.min(P.pages.length - 1, Math.max(0, (t < 0 ? 0 : t) + e)), r = P.pages[n];
334
- r && It(r.pageIndex);
340
+ r && Vt(r.pageIndex);
335
341
  }
336
- function zt(e) {
342
+ function Wt(e) {
337
343
  let t = Number(e.target.value);
338
344
  if (!Number.isFinite(t)) {
339
345
  Q(R.value);
340
346
  return;
341
347
  }
342
348
  let n = Math.min(P.pages.length, Math.max(1, Math.round(t))) - 1, r = P.pages[n];
343
- r ? It(r.pageIndex) : Q(R.value);
349
+ r ? Vt(r.pageIndex) : Q(R.value);
344
350
  }
345
- function Bt(e, t = "user") {
346
- t === "user" && Ze(), F("zoom-change", e);
351
+ function Gt(e, t = "user") {
352
+ t === "user" && tt(), F("zoom-change", e);
347
353
  }
348
- function Vt(e) {
354
+ function Kt(e) {
349
355
  e.target.closest(".gd-ant-contract-signing-location__placement") || F("select", "");
350
356
  }
351
- function Ht() {
352
- window.addEventListener("pointermove", Kt, { passive: !1 }), window.addEventListener("pointerup", $), window.addEventListener("pointercancel", $);
357
+ function qt() {
358
+ window.addEventListener("pointermove", Zt, { passive: !1 }), window.addEventListener("pointerup", $), window.addEventListener("pointercancel", $);
353
359
  }
354
- function Ut() {
355
- window.removeEventListener("pointermove", Kt), window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", $);
360
+ function Jt() {
361
+ window.removeEventListener("pointermove", Zt), window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", $);
356
362
  }
357
- function Wt(e, t, n) {
363
+ function Yt(e, t, n) {
358
364
  e.stopPropagation(), F("select", t.id);
359
- let r = q(t.pageIndex);
365
+ let r = K(t.pageIndex);
360
366
  if (P.readonly || !r || !d(r) || e.button !== 0) return;
361
- let i = Mt(e.clientX, e.clientY), a = m(W.value, P.pages, i.x, i.y), o = e.currentTarget;
362
- o.focus({ preventScroll: !0 }), B.value = {
367
+ let i = Lt(e.clientX, e.clientY), a = m(U.value, P.pages, i.x, i.y), o = e.currentTarget;
368
+ o.focus({ preventScroll: !0 }), z.value = {
363
369
  pointerId: e.pointerId,
364
370
  mode: n ? "resize" : "move",
365
371
  handle: n,
366
372
  placementId: t.id,
367
373
  startX: e.clientX,
368
374
  startY: e.clientY,
369
- origin: At(t),
375
+ origin: Ft(t),
370
376
  grabOffsetX: (a?.x ?? t.signLeft) - t.signLeft,
371
377
  grabOffsetY: (a?.y ?? t.signTop) - t.signTop
372
- }, V = {
378
+ }, B = {
373
379
  clientX: e.clientX,
374
380
  clientY: e.clientY,
375
381
  pointerId: e.pointerId
376
- }, Ht(), Zt();
382
+ }, qt(), nn();
377
383
  try {
378
384
  o.setPointerCapture(e.pointerId);
379
385
  } catch {}
380
386
  }
381
- function Gt(e, t, n) {
382
- Wt(e, t, n);
387
+ function Xt(e, t, n) {
388
+ Yt(e, t, n);
383
389
  }
384
- function Kt(e) {
385
- let t = B.value;
386
- !t || t.pointerId !== e.pointerId || (e.preventDefault(), V = {
390
+ function Zt(e) {
391
+ let t = z.value;
392
+ !t || t.pointerId !== e.pointerId || (e.preventDefault(), B = {
387
393
  clientX: e.clientX,
388
394
  clientY: e.clientY,
389
395
  pointerId: e.pointerId
390
- }, qt(V));
396
+ }, Qt(B));
391
397
  }
392
398
  function $(e) {
393
- B.value?.pointerId === e.pointerId && (B.value = void 0, V = void 0, z.value = [], Qe.value = void 0, Qt(), Ut());
399
+ z.value?.pointerId === e.pointerId && (z.value = void 0, B = void 0, nt.value = [], rt.value = void 0, rn(), Jt());
394
400
  }
395
- function qt(e) {
396
- let t = B.value;
401
+ function Qt(e) {
402
+ let t = z.value;
397
403
  if (!t) return;
398
404
  if (t.mode === "resize") {
399
- Jt(t, e);
405
+ $t(t, e);
400
406
  return;
401
407
  }
402
- let n = Mt(e.clientX, e.clientY), r = m(W.value, P.pages, n.x, n.y);
408
+ let n = Lt(e.clientX, e.clientY), r = m(U.value, P.pages, n.x, n.y);
403
409
  if (!r) return;
404
- let i = Xt(r.pageIndex, t.origin.pageIndex);
410
+ let i = tn(r.pageIndex, t.origin.pageIndex);
405
411
  if (!i || !d(i)) return;
406
- let a = s(Dt({
412
+ let a = s(Nt({
407
413
  ...t.origin,
408
414
  pageIndex: i.pageIndex,
409
415
  signLeft: r.x - t.grabOffsetX,
410
416
  signTop: r.y - t.grabOffsetY
411
- }, i), St(i.pageIndex), P.zoom, void 0, i), o = Dt(a.placement, i);
412
- z.value = a.guides, Qe.value = i.pageIndex, F("update", o);
417
+ }, i), Dt(i.pageIndex), P.zoom, void 0, i), o = Nt(a.placement, i);
418
+ nt.value = a.guides, rt.value = i.pageIndex, F("update", o);
413
419
  }
414
- function Jt(e, t) {
415
- let n = q(e.origin.pageIndex), r = e.handle;
420
+ function $t(e, t) {
421
+ let n = K(e.origin.pageIndex), r = e.handle;
416
422
  if (!n || !r || !d(n)) return;
417
- let a = W.value.find((e) => e.pageIndex === n.pageIndex);
423
+ let a = U.value.find((e) => e.pageIndex === n.pageIndex);
418
424
  if (!a) return;
419
- let o = Mt(t.clientX, t.clientY), s = Y(n), c = n.width / Math.max(1, s.width * P.zoom), l = n.height / Math.max(1, s.height * P.zoom), u = (o.x - a.left) * c, f = (o.y - a.top) * l;
425
+ let o = Lt(t.clientX, t.clientY), s = J(n), c = n.width / Math.max(1, s.width * P.zoom), l = n.height / Math.max(1, s.height * P.zoom), u = (o.x - a.left) * c, f = (o.y - a.top) * l;
420
426
  if (e.origin.signType === "seal") {
421
- Yt(e, n, r, u, f);
427
+ en(e, n, r, u, f);
422
428
  return;
423
429
  }
424
430
  let p = i(e.origin), m = p.signLeft, h = p.signTop, g = p.signLeft + p.signWidth, _ = p.signTop + p.signHeight;
425
- r.includes("w") && (m = u), r.includes("e") && (g = u), r.includes("n") && (h = f), r.includes("s") && (_ = f), g - m < 8 && (r.includes("w") ? m = g - 8 : g = m + 8), _ - h < 8 && (r.includes("n") ? h = _ - 8 : _ = h + 8), F("update", Dt({
431
+ r.includes("w") && (m = u), r.includes("e") && (g = u), r.includes("n") && (h = f), r.includes("s") && (_ = f), g - m < 8 && (r.includes("w") ? m = g - 8 : g = m + 8), _ - h < 8 && (r.includes("n") ? h = _ - 8 : _ = h + 8), F("update", Nt({
426
432
  ...e.origin,
427
433
  signLeft: m,
428
434
  signTop: h,
@@ -430,35 +436,35 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
430
436
  signHeight: _ - h
431
437
  }, n));
432
438
  }
433
- function Yt(e, t, n, r, i) {
439
+ function en(e, t, n, r, i) {
434
440
  let a = o(e.origin, n, r, i, t, P.sealSizeLimit);
435
- F("update", Dt({
441
+ F("update", Nt({
436
442
  ...e.origin,
437
443
  ...a
438
444
  }, t));
439
445
  }
440
- function Xt(e, t) {
441
- let n = q(e);
442
- return n && d(n) ? n : q(t);
446
+ function tn(e, t) {
447
+ let n = K(e);
448
+ return n && d(n) ? n : K(t);
443
449
  }
444
- function Zt() {
445
- Qt();
450
+ function nn() {
451
+ rn();
446
452
  let e = () => {
447
- let t = B.value, n = I.value;
448
- if (!t || !n || !V) {
449
- H = 0;
453
+ let t = z.value, n = I.value;
454
+ if (!t || !n || !B) {
455
+ V = 0;
450
456
  return;
451
457
  }
452
- let r = n.getBoundingClientRect(), i = g(V.clientY, r);
453
- i !== 0 && (n.scrollTop += i, X(), qt(V)), H = requestAnimationFrame(e);
458
+ let r = n.getBoundingClientRect(), i = g(B.clientY, r);
459
+ i !== 0 && (n.scrollTop += i, X(), Qt(B)), V = requestAnimationFrame(e);
454
460
  };
455
- H = requestAnimationFrame(e);
461
+ V = requestAnimationFrame(e);
456
462
  }
457
- function Qt() {
458
- H &&= (cancelAnimationFrame(H), 0);
463
+ function rn() {
464
+ V &&= (cancelAnimationFrame(V), 0);
459
465
  }
460
- function $t(e, t) {
461
- let n = q(t.pageIndex);
466
+ function an(e, t) {
467
+ let n = K(t.pageIndex);
462
468
  if (P.readonly || !n || !d(n)) return;
463
469
  if (e.key === "Delete" || e.key === "Backspace") {
464
470
  e.preventDefault(), F("remove", t.id);
@@ -471,114 +477,114 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
471
477
  else if (e.key === "ArrowDown") o = r;
472
478
  else return;
473
479
  e.preventDefault();
474
- let s = Y(n), c = J(n);
475
- F("update", a(t, i * s.width / Math.max(1, c.width), o * s.height / Math.max(1, c.height), n, Y(n), { sealSizeLimit: P.sealSizeLimit }));
480
+ let s = J(n), c = q(n);
481
+ F("update", a(t, i * s.width / Math.max(1, c.width), o * s.height / Math.max(1, c.height), n, J(n), { sealSizeLimit: P.sealSizeLimit }));
476
482
  }
477
- function en(e) {
483
+ function on(e) {
478
484
  let t = e.dataTransfer?.getData("application/x-gd-contract-signing-location") || e.dataTransfer?.getData("text/plain");
479
485
  if (t) try {
480
486
  let e = JSON.parse(t);
481
- return nn(e.type) ? e.type : void 0;
487
+ return cn(e.type) ? e.type : void 0;
482
488
  } catch {
483
- return nn(t) ? t : void 0;
489
+ return cn(t) ? t : void 0;
484
490
  }
485
491
  }
486
- function tn(e) {
492
+ function sn(e) {
487
493
  if (P.readonly) return;
488
- let t = en(e);
494
+ let t = on(e);
489
495
  if (!t) return;
490
496
  e.preventDefault();
491
- let n = Mt(e.clientX, e.clientY), r = m(W.value, P.pages, n.x, n.y);
497
+ let n = Lt(e.clientX, e.clientY), r = m(U.value, P.pages, n.x, n.y);
492
498
  r && F("add", t, r.x, r.y, r.pageIndex);
493
499
  }
494
- function nn(e) {
500
+ function cn(e) {
495
501
  return e === "seal" || e === "signature" || e === "date";
496
502
  }
497
- return We({
498
- scrollToPage: It,
499
- scrollToPlacement: Lt,
500
- fitWidth: Xe
501
- }), (t, n) => (E(), x("main", ye, [S("header", be, [S("div", null, [S("strong", null, k(w.file?.fileName || "合同页面"), 1), ct.value ? (E(), x("span", xe, "第 " + k(ct.value.displayPageNumber) + " 页 · " + k(G.value ? "HTML" : "PDF") + " " + k(ct.value.width) + " × " + k(ct.value.height), 1)) : b("", !0)]), S("div", Se, [S("div", Ce, [
502
- C(A(N), {
503
+ return Je({
504
+ scrollToPage: Vt,
505
+ scrollToPlacement: Ht,
506
+ fitWidth: et
507
+ }), (t, n) => (E(), b("main", ye, [x("header", be, [x("div", null, [x("strong", null, k(C.file?.fileName || "合同页面"), 1), pt.value ? (E(), b("span", xe, "第 " + k(pt.value.displayPageNumber) + " 页 · " + k(W.value ? "HTML" : "PDF") + " " + k(pt.value.width) + " × " + k(pt.value.height), 1)) : ae("", !0)]), x("div", Se, [x("div", Ce, [
508
+ S(A(N), {
503
509
  size: "small",
504
- disabled: qe.value <= 1,
510
+ disabled: Ze.value <= 1,
505
511
  "aria-label": "上一页",
506
- onClick: n[0] ||= (e) => Rt(-1)
512
+ onClick: n[0] ||= (e) => Ut(-1)
507
513
  }, {
508
- default: j(() => [C(A(he), { "aria-hidden": "true" })]),
514
+ default: j(() => [S(A(he), { "aria-hidden": "true" })]),
509
515
  _: 1
510
516
  }, 8, ["disabled"]),
511
- S("label", null, [
512
- n[6] ||= ae(" 第 ", -1),
513
- S("input", {
514
- value: qe.value,
517
+ x("label", null, [
518
+ n[6] ||= oe(" 第 ", -1),
519
+ x("input", {
520
+ value: Ze.value,
515
521
  type: "number",
516
522
  min: "1",
517
- max: Math.max(1, w.pages.length),
518
- onChange: zt,
519
- onKeydown: fe(zt, ["enter"])
523
+ max: Math.max(1, C.pages.length),
524
+ onChange: Wt,
525
+ onKeydown: fe(Wt, ["enter"])
520
526
  }, null, 40, we),
521
- ae(" / " + k(w.pages.length) + " 页 ", 1)
527
+ oe(" / " + k(C.pages.length) + " 页 ", 1)
522
528
  ]),
523
- C(A(N), {
529
+ S(A(N), {
524
530
  size: "small",
525
- disabled: qe.value >= w.pages.length,
531
+ disabled: Ze.value >= C.pages.length,
526
532
  "aria-label": "下一页",
527
- onClick: n[1] ||= (e) => Rt(1)
533
+ onClick: n[1] ||= (e) => Ut(1)
528
534
  }, {
529
- default: j(() => [C(A(ge), { "aria-hidden": "true" })]),
535
+ default: j(() => [S(A(ge), { "aria-hidden": "true" })]),
530
536
  _: 1
531
537
  }, 8, ["disabled"])
532
- ]), S("div", Te, [
533
- C(A(N), {
538
+ ]), x("div", Te, [
539
+ S(A(N), {
534
540
  size: "small",
535
- disabled: w.zoom <= lt.value,
541
+ disabled: C.zoom <= mt.value,
536
542
  "aria-label": "缩小页面",
537
- onClick: n[2] ||= (e) => Bt(w.zoom - .1)
543
+ onClick: n[2] ||= (e) => Gt(C.zoom - .1)
538
544
  }, {
539
- default: j(() => [C(A(ve), { "aria-hidden": "true" })]),
545
+ default: j(() => [S(A(ve), { "aria-hidden": "true" })]),
540
546
  _: 1
541
547
  }, 8, ["disabled"]),
542
- S("button", {
548
+ x("button", {
543
549
  type: "button",
544
- onClick: n[3] ||= (e) => Bt(1)
545
- }, k(Math.round(w.zoom * 100)) + "%", 1),
546
- C(A(N), {
550
+ onClick: n[3] ||= (e) => Gt(1)
551
+ }, k(Math.round(C.zoom * 100)) + "%", 1),
552
+ S(A(N), {
547
553
  size: "small",
548
- disabled: w.zoom >= ut.value,
554
+ disabled: C.zoom >= ht.value,
549
555
  "aria-label": "放大页面",
550
- onClick: n[4] ||= (e) => Bt(w.zoom + .1)
556
+ onClick: n[4] ||= (e) => Gt(C.zoom + .1)
551
557
  }, {
552
- default: j(() => [C(A(_e), { "aria-hidden": "true" })]),
558
+ default: j(() => [S(A(_e), { "aria-hidden": "true" })]),
553
559
  _: 1
554
560
  }, 8, ["disabled"]),
555
- C(A(N), {
561
+ S(A(N), {
556
562
  size: "small",
557
563
  "aria-label": "适应宽度",
558
564
  title: "适应宽度",
559
- onClick: A(Xe)
565
+ onClick: A(et)
560
566
  }, {
561
- default: j(() => [C(A(me), { "aria-hidden": "true" })]),
567
+ default: j(() => [S(A(me), { "aria-hidden": "true" })]),
562
568
  _: 1
563
569
  }, 8, ["onClick"])
564
- ])])]), S("div", {
570
+ ])])]), x("div", {
565
571
  ref_key: "scrollRef",
566
572
  ref: I,
567
573
  class: "gd-ant-contract-signing-location__canvas-scroll",
568
- onScrollPassive: Pt,
569
- onClick: Vt,
574
+ onScrollPassive: zt,
575
+ onClick: Kt,
570
576
  onDragover: n[5] ||= M(() => {}, ["prevent"]),
571
- onDrop: tn
572
- }, [w.pages.length ? (E(), x("div", {
577
+ onDrop: sn
578
+ }, [C.pages.length ? (E(), b("div", {
573
579
  key: 1,
574
580
  ref_key: "stackRef",
575
581
  ref: L,
576
582
  class: "gd-ant-contract-signing-location__page-stack",
577
583
  style: T({
578
- width: `${nt.value.width}px`,
579
- height: `${nt.value.height}px`
584
+ width: `${st.value.width}px`,
585
+ height: `${st.value.height}px`
580
586
  })
581
- }, [(E(!0), x(v, null, D(st.value, (t) => (E(), x("div", {
587
+ }, [(E(!0), b(v, null, D(ft.value, (t) => (E(), b("div", {
582
588
  key: t.layout.pageIndex,
583
589
  class: "gd-ant-contract-signing-location__page-shell",
584
590
  style: T({
@@ -587,95 +593,108 @@ var ye = { class: "gd-ant-contract-signing-location__workspace" }, be = { class:
587
593
  width: `${t.layout.width}px`,
588
594
  height: `${t.layout.height}px`
589
595
  })
590
- }, [S("div", {
596
+ }, [x("div", {
591
597
  class: "gd-ant-contract-signing-location__page",
592
598
  style: T({
593
- width: `${Y(t.page).width}px`,
594
- height: `${Y(t.page).height}px`,
595
- transform: `scale(${w.zoom})`
599
+ width: `${J(t.page).width}px`,
600
+ height: `${J(t.page).height}px`,
601
+ transform: `scale(${C.zoom})`
596
602
  }),
597
- "aria-label": `${w.file?.fileName || "合同"}第 ${t.page.displayPageNumber} 页`
598
- }, [G.value && t.templatePage ? (E(), ie(e, {
603
+ "aria-label": `${C.file?.fileName || "合同"}第 ${t.page.displayPageNumber} 页`
604
+ }, [W.value && t.templatePage ? (E(), ie(e, {
599
605
  key: 0,
600
606
  page: t.templatePage,
601
- "font-base-url": w.fontBaseUrl,
602
- onStatus: (e, n) => _t(t.layout.pageIndex, e, n)
607
+ "font-base-url": C.fontBaseUrl,
608
+ onStatus: (e, n) => St(t.layout.pageIndex, e, n)
603
609
  }, null, 8, [
604
610
  "page",
605
611
  "font-base-url",
606
612
  "onStatus"
607
- ])) : G.value ? (E(), x("div", De, [n[8] ||= S("strong", null, "模板页面无法渲染", -1), S("span", null, k(at.value || "页面结构无效,请回到模板设计器修复后重试。"), 1)])) : t.page.previewUrl ? (E(), x("img", {
613
+ ])) : W.value ? (E(), b("div", De, [n[8] ||= x("strong", null, "模板页面无法渲染", -1), x("span", null, k(ut.value || "页面结构无效,请回到模板设计器修复后重试。"), 1)])) : t.page.previewUrl ? (E(), b("img", {
608
614
  key: 2,
609
615
  class: "gd-ant-contract-signing-location__page-image",
610
616
  src: t.page.previewUrl,
611
617
  alt: "合同页面预览"
612
- }, null, 8, Oe)) : (E(), x("div", ke, [bt(t.layout.pageIndex) ? (E(), x(v, { key: 0 }, [S("strong", null, "第 " + k(t.page.displayPageNumber) + " 页加载中…", 1), S("span", null, k(t.page.width) + " × " + k(t.page.height), 1)], 64)) : xt(t.layout.pageIndex) ? (E(), x(v, { key: 1 }, [
613
- n[9] ||= S("strong", null, "合同页面预览加载失败", -1),
614
- S("span", null, k(xt(t.layout.pageIndex)), 1),
615
- S("button", {
618
+ }, null, 8, Oe)) : (E(), b("div", ke, [Tt(t.layout.pageIndex) ? (E(), b(v, { key: 0 }, [x("strong", null, "第 " + k(t.page.displayPageNumber) + " 页加载中…", 1), x("span", null, k(t.page.width) + " × " + k(t.page.height), 1)], 64)) : Et(t.layout.pageIndex) ? (E(), b(v, { key: 1 }, [
619
+ n[9] ||= x("strong", null, "合同页面预览加载失败", -1),
620
+ x("span", null, k(Et(t.layout.pageIndex)), 1),
621
+ x("button", {
616
622
  type: "button",
617
623
  onClick: M((e) => F("retry", t.layout.pageIndex), ["stop"])
618
624
  }, "重试当前页", 8, Ae)
619
- ], 64)) : A(d)(t.page) ? (E(), x(v, { key: 3 }, [
620
- S("strong", null, "第 " + k(t.page.displayPageNumber) + " 页", 1),
621
- S("span", null, k(t.page.width) + " × " + k(t.page.height), 1),
622
- n[12] ||= S("small", null, "等待 dataProvider 返回页面预览图", -1)
623
- ], 64)) : (E(), x(v, { key: 2 }, [
624
- n[10] ||= S("strong", null, "页面元数据不完整", -1),
625
- n[11] ||= S("span", null, "缺少有效的原始宽高,无法安全计算签署坐标。", -1),
626
- S("button", {
625
+ ], 64)) : A(d)(t.page) ? (E(), b(v, { key: 3 }, [
626
+ x("strong", null, "第 " + k(t.page.displayPageNumber) + " 页", 1),
627
+ x("span", null, k(t.page.width) + " × " + k(t.page.height), 1),
628
+ n[12] ||= x("small", null, "等待 dataProvider 返回页面预览图", -1)
629
+ ], 64)) : (E(), b(v, { key: 2 }, [
630
+ n[10] ||= x("strong", null, "页面元数据不完整", -1),
631
+ n[11] ||= x("span", null, "缺少有效的原始宽高,无法安全计算签署坐标。", -1),
632
+ x("button", {
627
633
  type: "button",
628
634
  onClick: M((e) => F("retry", t.layout.pageIndex), ["stop"])
629
635
  }, "重新加载页面", 8, je)
630
- ], 64))])), S("div", Me, [S("div", Ne, [
631
- dt.value && dt.value.pageIndex === t.layout.pageIndex ? (E(), x("div", {
636
+ ], 64))])), x("div", Me, [x("div", Ne, [
637
+ gt.value && gt.value.pageIndex === t.layout.pageIndex ? (E(), b("div", {
632
638
  key: 0,
633
639
  class: "gd-ant-contract-signing-location__coordinate-guides",
634
- style: T(Tt(dt.value)),
640
+ style: T(jt(gt.value)),
635
641
  "aria-hidden": "true"
636
642
  }, [
637
- S("span", Pe, [S("small", null, "上 " + k(Ct(t.page)?.top), 1)]),
638
- S("span", Fe, [S("small", null, "下 " + k(Ct(t.page)?.bottom), 1)]),
639
- S("span", Ie, [S("small", null, "左 " + k(Ct(t.page)?.left), 1)]),
640
- S("span", Le, [S("small", null, "右 " + k(Ct(t.page)?.right), 1)])
641
- ], 4)) : b("", !0),
642
- z.value.length && Qe.value === t.layout.pageIndex ? (E(), x("div", Re, [(E(!0), x(v, null, D(z.value, (e, n) => (E(), x("span", {
643
+ x("span", Pe, [x("small", null, "上 " + k(kt(t.page)?.top), 1)]),
644
+ x("span", Fe, [x("small", null, "下 " + k(kt(t.page)?.bottom), 1)]),
645
+ x("span", Ie, [x("small", null, "左 " + k(kt(t.page)?.left), 1)]),
646
+ x("span", Le, [x("small", null, "右 " + k(kt(t.page)?.right), 1)])
647
+ ], 4)) : ae("", !0),
648
+ nt.value.length && rt.value === t.layout.pageIndex ? (E(), b("div", Re, [(E(!0), b(v, null, D(nt.value, (e, n) => (E(), b("span", {
643
649
  key: `${e.axis}-${n}`,
644
- class: se(e.axis === "x" ? "is-vertical" : "is-horizontal"),
645
- style: T(Et(e, t.page))
646
- }, null, 6))), 128))])) : b("", !0),
647
- (E(!0), x(v, null, D(St(t.layout.pageIndex), (e) => (E(), x("button", {
650
+ class: w(e.axis === "x" ? "is-vertical" : "is-horizontal"),
651
+ style: T(Mt(e, t.page))
652
+ }, null, 6))), 128))])) : ae("", !0),
653
+ (E(!0), b(v, null, D(Dt(t.layout.pageIndex), (e) => (E(), b("button", {
648
654
  key: e.id,
649
655
  type: "button",
650
- class: se(["gd-ant-contract-signing-location__placement", [`is-${e.signType}`, { "is-selected": e.id === w.selectedPlacementId }]]),
651
- style: T(wt(e)),
652
- title: Ot(e).alt,
653
- "aria-label": Ot(e).alt,
654
- "aria-pressed": e.id === w.selectedPlacementId,
656
+ class: w(["gd-ant-contract-signing-location__placement", [`is-${e.signType}`, { "is-selected": e.id === C.selectedPlacementId }]]),
657
+ style: T(At(e)),
658
+ title: Y(e).alt,
659
+ "aria-label": Y(e).alt,
660
+ "aria-pressed": e.id === C.selectedPlacementId,
655
661
  onClick: M((t) => F("select", e.id), ["stop"]),
656
- onPointerdown: (t) => Wt(t, e),
662
+ onPointerdown: (t) => Yt(t, e),
657
663
  onLostpointercapture: $,
658
- onKeydown: (t) => $t(t, e)
664
+ onKeydown: (t) => an(t, e)
659
665
  }, [
660
- S("span", Be, [S("img", {
666
+ x("span", Be, [x("img", {
661
667
  class: "gd-ant-contract-signing-location__placement-visual",
662
- src: Ot(e).dataUrl,
663
- alt: Ot(e).alt,
668
+ src: Y(e).dataUrl,
669
+ alt: Y(e).alt,
664
670
  draggable: "false"
665
671
  }, null, 8, Ve)]),
666
- e.mustSign ? (E(), x("span", He, "必签")) : b("", !0),
667
- (E(!0), x(v, null, D(kt(e) ? Ke : [], (t) => (E(), x("i", {
672
+ e.mustSign ? (E(), b("span", He, "必签")) : ae("", !0),
673
+ (E(!0), b(v, null, D(Pt(e) ? Xe : [], (t) => (E(), b("i", {
668
674
  key: t,
669
- class: se(["gd-ant-contract-signing-location__resize-handle", `is-${t}`]),
670
- onPointerdown: M((n) => Gt(n, e, t), ["stop"])
675
+ class: w(["gd-ant-contract-signing-location__resize-handle", `is-${t}`]),
676
+ onPointerdown: M((n) => Xt(n, e, t), ["stop"])
671
677
  }, null, 42, Ue))), 128))
672
- ], 46, ze))), 128))
673
- ])])], 12, Ee)], 4))), 128))], 4)) : (E(), x("div", {
678
+ ], 46, ze))), 128)),
679
+ (E(!0), b(v, null, D(Ot(t.layout.pageIndex), (e) => (E(), b("div", {
680
+ key: `${e.ownerId}:${e.id}`,
681
+ class: w(["gd-ant-contract-signing-location__placement is-reference", `is-${e.signType}`]),
682
+ style: T(At(e)),
683
+ title: `${e.ownerName} · 只读 · ${Y(e).alt}`,
684
+ role: "img",
685
+ "aria-label": `${e.ownerName}的只读${Y(e).alt}`
686
+ }, [x("span", Ge, [x("img", {
687
+ class: "gd-ant-contract-signing-location__placement-visual",
688
+ src: Y(e).dataUrl,
689
+ alt: "",
690
+ draggable: "false"
691
+ }, null, 8, Ke)]), x("span", qe, k(e.ownerName) + " · 只读 ", 1)], 14, We))), 128))
692
+ ])])], 12, Ee)], 4))), 128))], 4)) : (E(), b("div", {
674
693
  key: 0,
675
- class: se(["gd-ant-contract-signing-location__canvas-state", { "is-error": G.value && at.value }]),
694
+ class: w(["gd-ant-contract-signing-location__canvas-state", { "is-error": W.value && ut.value }]),
676
695
  role: "status"
677
- }, [G.value && at.value ? (E(), x(v, { key: 0 }, [n[7] ||= S("strong", null, "合同模板无法渲染", -1), S("span", null, k(at.value), 1)], 64)) : (E(), x(v, { key: 1 }, [ae("请选择可用的合同页面")], 64))], 2))], 544)]));
696
+ }, [W.value && ut.value ? (E(), b(v, { key: 0 }, [n[7] ||= x("strong", null, "合同模板无法渲染", -1), x("span", null, k(ut.value), 1)], 64)) : (E(), b(v, { key: 1 }, [oe("请选择可用的合同页面")], 64))], 2))], 544)]));
678
697
  }
679
698
  });
680
699
  //#endregion
681
- export { We as default };
700
+ export { Je as default };