@rhc-office/sdk 6.6.264 → 6.6.268

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +3 -4
  2. package/dist/api/callbacks.d.ts +0 -1
  3. package/dist/api/callbacks.d.ts.map +1 -1
  4. package/dist/api/crypto-tool.d.ts +12 -1
  5. package/dist/api/crypto-tool.d.ts.map +1 -1
  6. package/dist/api/document-sdk.d.ts +0 -6
  7. package/dist/api/document-sdk.d.ts.map +1 -1
  8. package/dist/api/sign-tool.d.ts +43 -1
  9. package/dist/api/sign-tool.d.ts.map +1 -1
  10. package/dist/browser/document-viewer.js +1 -1
  11. package/dist/browser/document-viewer.js.map +1 -1
  12. package/dist/index.d.ts +1 -3
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +670 -556
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.umd.cjs +1 -1
  17. package/dist/index.umd.cjs.map +1 -1
  18. package/dist/tools/AnnotationToolImpl.d.ts +47 -0
  19. package/dist/tools/AnnotationToolImpl.d.ts.map +1 -0
  20. package/dist/tools/CryptoToolImpl.d.ts +9 -0
  21. package/dist/tools/CryptoToolImpl.d.ts.map +1 -0
  22. package/dist/tools/DigitalSignToolImpl.d.ts +27 -0
  23. package/dist/tools/DigitalSignToolImpl.d.ts.map +1 -0
  24. package/dist/tools/DocumentToolImpl.d.ts +1 -0
  25. package/dist/tools/DocumentToolImpl.d.ts.map +1 -1
  26. package/dist/tools/SignServerToolImpl.d.ts +19 -0
  27. package/dist/tools/SignServerToolImpl.d.ts.map +1 -0
  28. package/dist/tools/SymbologyToolImpl.d.ts +8 -0
  29. package/dist/tools/SymbologyToolImpl.d.ts.map +1 -0
  30. package/dist/tools/TemplateSignToolImpl.d.ts +13 -0
  31. package/dist/tools/TemplateSignToolImpl.d.ts.map +1 -0
  32. package/dist/tools/index.d.ts +6 -0
  33. package/dist/tools/index.d.ts.map +1 -1
  34. package/dist/viewer/DocumentSDK.d.ts +0 -8
  35. package/dist/viewer/DocumentSDK.d.ts.map +1 -1
  36. package/dist/viewer/ReaderStateStore.d.ts +0 -1
  37. package/dist/viewer/ReaderStateStore.d.ts.map +1 -1
  38. package/dist/viewer/SdkCallbackRegistry.d.ts +4 -2
  39. package/dist/viewer/SdkCallbackRegistry.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/api/callbacks.ts +4 -17
  42. package/src/api/crypto-tool.ts +13 -1
  43. package/src/api/document-sdk.ts +0 -9
  44. package/src/api/sign-tool.ts +62 -1
  45. package/src/index.ts +1 -3
  46. package/src/tools/AnnotationToolImpl.ts +263 -0
  47. package/src/tools/CryptoToolImpl.ts +27 -0
  48. package/src/tools/DigitalSignToolImpl.ts +155 -0
  49. package/src/tools/DocumentToolImpl.ts +24 -2
  50. package/src/tools/SignServerToolImpl.ts +92 -0
  51. package/src/tools/SymbologyToolImpl.ts +34 -0
  52. package/src/tools/TemplateSignToolImpl.ts +51 -0
  53. package/src/tools/index.ts +6 -0
  54. package/src/viewer/DocumentSDK.ts +13 -157
  55. package/src/viewer/ReaderBridgeClient.ts +1 -1
  56. package/src/viewer/ReaderStateStore.ts +0 -2
  57. package/src/viewer/SdkCallbackRegistry.ts +8 -8
  58. package/dist/api/ekey-tool.d.ts +0 -8
  59. package/dist/api/ekey-tool.d.ts.map +0 -1
  60. package/dist/api/extension-tool.d.ts +0 -5
  61. package/dist/api/extension-tool.d.ts.map +0 -1
  62. package/dist/api/review-tool.d.ts +0 -71
  63. package/dist/api/review-tool.d.ts.map +0 -1
  64. package/src/api/ekey-tool.ts +0 -11
  65. package/src/api/extension-tool.ts +0 -5
  66. package/src/api/review-tool.ts +0 -105
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- var K = /* @__PURE__ */ ((n) => (n.DEFAULT = "default", n.COMPACT = "compact", n.HIDE = "none", n))(K || {});
2
- const w = "RIGHT_CENTER", _ = "REGULAR_ESM", F = "auto", f = "__RHC_OFFICE_DIGITAL_SIGN_ENVIRONMENT__", y = {
1
+ var K = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.COMPACT = "compact", t.HIDE = "none", t))(K || {});
2
+ const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGITAL_SIGN_ENVIRONMENT__", A = {
3
3
  defaults: {
4
4
  bjca: {
5
5
  pin: ""
@@ -17,8 +17,8 @@ const w = "RIGHT_CENTER", _ = "REGULAR_ESM", F = "auto", f = "__RHC_OFFICE_DIGIT
17
17
  pin: "",
18
18
  usbKeyType: 14
19
19
  },
20
- rsaMode: F,
21
- signatureType: _
20
+ rsaMode: O,
21
+ signatureType: M
22
22
  },
23
23
  signServer: {
24
24
  authSource: "Password",
@@ -38,216 +38,343 @@ const w = "RIGHT_CENTER", _ = "REGULAR_ESM", F = "auto", f = "__RHC_OFFICE_DIGIT
38
38
  usbKeyType: 14
39
39
  }
40
40
  }
41
- }, O = (n) => ({
41
+ }, _ = (t) => ({
42
42
  bjca: {
43
- pin: n.bjca.pin
43
+ pin: t.bjca.pin
44
44
  },
45
- deviceType: n.deviceType,
46
- edgePosition: n.edgePosition,
45
+ deviceType: t.deviceType,
46
+ edgePosition: t.edgePosition,
47
47
  kol: {
48
- appId: n.kol.appId,
49
- appName: n.kol.appName,
50
- pin: n.kol.pin,
51
- serviceUrl: n.kol.serviceUrl,
52
- token: n.kol.token
48
+ appId: t.kol.appId,
49
+ appName: t.kol.appName,
50
+ pin: t.kol.pin,
51
+ serviceUrl: t.kol.serviceUrl,
52
+ token: t.kol.token
53
53
  },
54
54
  plugin: {
55
- pin: n.plugin.pin,
56
- usbKeyType: n.plugin.usbKeyType
55
+ pin: t.plugin.pin,
56
+ usbKeyType: t.plugin.usbKeyType
57
57
  },
58
- rsaMode: n.rsaMode,
59
- signatureType: n.signatureType
60
- }), L = (n) => ({
61
- authSource: n.authSource,
62
- defaultLogin: n.defaultLogin,
63
- defaultPassword: n.defaultPassword,
64
- defaultServer: n.defaultServer,
58
+ rsaMode: t.rsaMode,
59
+ signatureType: t.signatureType
60
+ }), F = (t) => ({
61
+ authSource: t.authSource,
62
+ defaultLogin: t.defaultLogin,
63
+ defaultPassword: t.defaultPassword,
64
+ defaultServer: t.defaultServer,
65
65
  kol: {
66
- appId: n.kol.appId,
67
- appName: n.kol.appName,
68
- serviceUrl: n.kol.serviceUrl,
69
- token: n.kol.token
66
+ appId: t.kol.appId,
67
+ appName: t.kol.appName,
68
+ serviceUrl: t.kol.serviceUrl,
69
+ token: t.kol.token
70
70
  },
71
- macAddress: n.macAddress,
72
- token: n.token,
71
+ macAddress: t.macAddress,
72
+ token: t.token,
73
73
  usbKey: {
74
- checkCertificateBinding: n.usbKey.checkCertificateBinding,
75
- usbKeyType: n.usbKey.usbKeyType
74
+ checkCertificateBinding: t.usbKey.checkCertificateBinding,
75
+ usbKeyType: t.usbKey.usbKeyType
76
76
  }
77
- }), m = (n) => ({
78
- defaults: O(n.defaults),
79
- signServer: L(n.signServer)
80
- }), U = (n) => ({
81
- defaults: n.defaults ? {
82
- ...n.defaults,
83
- bjca: n.defaults.bjca ? { ...n.defaults.bjca } : void 0,
84
- kol: n.defaults.kol ? { ...n.defaults.kol } : void 0,
85
- plugin: n.defaults.plugin ? { ...n.defaults.plugin } : void 0
77
+ }), h = (t) => ({
78
+ defaults: _(t.defaults),
79
+ signServer: F(t.signServer)
80
+ }), L = (t) => ({
81
+ defaults: t.defaults ? {
82
+ ...t.defaults,
83
+ bjca: t.defaults.bjca ? { ...t.defaults.bjca } : void 0,
84
+ kol: t.defaults.kol ? { ...t.defaults.kol } : void 0,
85
+ plugin: t.defaults.plugin ? { ...t.defaults.plugin } : void 0
86
86
  } : void 0,
87
- signServer: n.signServer ? {
88
- ...n.signServer,
89
- kol: n.signServer.kol ? { ...n.signServer.kol } : void 0,
90
- usbKey: n.signServer.usbKey ? { ...n.signServer.usbKey } : void 0
87
+ signServer: t.signServer ? {
88
+ ...t.signServer,
89
+ kol: t.signServer.kol ? { ...t.signServer.kol } : void 0,
90
+ usbKey: t.signServer.usbKey ? { ...t.signServer.usbKey } : void 0
91
91
  } : void 0
92
- }), G = (n, t) => t ? {
92
+ }), G = (t, n) => n ? {
93
93
  bjca: {
94
- pin: t.bjca?.pin ?? n.bjca.pin
94
+ pin: n.bjca?.pin ?? t.bjca.pin
95
95
  },
96
- deviceType: t.deviceType ?? n.deviceType,
97
- edgePosition: t.edgePosition ?? n.edgePosition,
96
+ deviceType: n.deviceType ?? t.deviceType,
97
+ edgePosition: n.edgePosition ?? t.edgePosition,
98
98
  kol: {
99
- appId: t.kol?.appId ?? n.kol.appId,
100
- appName: t.kol?.appName ?? n.kol.appName,
101
- pin: t.kol?.pin ?? n.kol.pin,
102
- serviceUrl: t.kol?.serviceUrl ?? n.kol.serviceUrl,
103
- token: t.kol?.token ?? n.kol.token
99
+ appId: n.kol?.appId ?? t.kol.appId,
100
+ appName: n.kol?.appName ?? t.kol.appName,
101
+ pin: n.kol?.pin ?? t.kol.pin,
102
+ serviceUrl: n.kol?.serviceUrl ?? t.kol.serviceUrl,
103
+ token: n.kol?.token ?? t.kol.token
104
104
  },
105
105
  plugin: {
106
- pin: t.plugin?.pin ?? n.plugin.pin,
107
- usbKeyType: t.plugin?.usbKeyType ?? n.plugin.usbKeyType
106
+ pin: n.plugin?.pin ?? t.plugin.pin,
107
+ usbKeyType: n.plugin?.usbKeyType ?? t.plugin.usbKeyType
108
108
  },
109
- rsaMode: t.rsaMode ?? n.rsaMode,
110
- signatureType: t.signatureType ?? n.signatureType
111
- } : O(n), H = (n, t) => t ? {
112
- authSource: t.authSource ?? n.authSource,
113
- defaultLogin: t.defaultLogin ?? n.defaultLogin,
114
- defaultPassword: t.defaultPassword ?? n.defaultPassword,
115
- defaultServer: t.defaultServer ?? n.defaultServer,
109
+ rsaMode: n.rsaMode ?? t.rsaMode,
110
+ signatureType: n.signatureType ?? t.signatureType
111
+ } : _(t), H = (t, n) => n ? {
112
+ authSource: n.authSource ?? t.authSource,
113
+ defaultLogin: n.defaultLogin ?? t.defaultLogin,
114
+ defaultPassword: n.defaultPassword ?? t.defaultPassword,
115
+ defaultServer: n.defaultServer ?? t.defaultServer,
116
116
  kol: {
117
- appId: t.kol?.appId ?? n.kol.appId,
118
- appName: t.kol?.appName ?? n.kol.appName,
119
- serviceUrl: t.kol?.serviceUrl ?? n.kol.serviceUrl,
120
- token: t.kol?.token ?? n.kol.token
117
+ appId: n.kol?.appId ?? t.kol.appId,
118
+ appName: n.kol?.appName ?? t.kol.appName,
119
+ serviceUrl: n.kol?.serviceUrl ?? t.kol.serviceUrl,
120
+ token: n.kol?.token ?? t.kol.token
121
121
  },
122
- macAddress: t.macAddress ?? n.macAddress,
123
- token: t.token ?? n.token,
122
+ macAddress: n.macAddress ?? t.macAddress,
123
+ token: n.token ?? t.token,
124
124
  usbKey: {
125
- checkCertificateBinding: t.usbKey?.checkCertificateBinding ?? n.usbKey.checkCertificateBinding,
126
- usbKeyType: t.usbKey?.usbKeyType ?? n.usbKey.usbKeyType
125
+ checkCertificateBinding: n.usbKey?.checkCertificateBinding ?? t.usbKey.checkCertificateBinding,
126
+ usbKeyType: n.usbKey?.usbKeyType ?? t.usbKey.usbKeyType
127
127
  }
128
- } : L(n), N = (n, t) => ({
129
- defaults: G(n.defaults, t.defaults),
130
- signServer: H(n.signServer, t.signServer)
131
- }), q = (n, t) => ({
132
- defaults: n.defaults || t.defaults ? {
133
- ...n.defaults,
128
+ } : F(t), U = (t, n) => ({
129
+ defaults: G(t.defaults, n.defaults),
130
+ signServer: H(t.signServer, n.signServer)
131
+ }), q = (t, n) => ({
132
+ defaults: t.defaults || n.defaults ? {
134
133
  ...t.defaults,
134
+ ...n.defaults,
135
135
  bjca: {
136
- ...n.defaults?.bjca ?? {},
137
- ...t.defaults?.bjca ?? {}
136
+ ...t.defaults?.bjca ?? {},
137
+ ...n.defaults?.bjca ?? {}
138
138
  },
139
139
  kol: {
140
- ...n.defaults?.kol ?? {},
141
- ...t.defaults?.kol ?? {}
140
+ ...t.defaults?.kol ?? {},
141
+ ...n.defaults?.kol ?? {}
142
142
  },
143
143
  plugin: {
144
- ...n.defaults?.plugin ?? {},
145
- ...t.defaults?.plugin ?? {}
144
+ ...t.defaults?.plugin ?? {},
145
+ ...n.defaults?.plugin ?? {}
146
146
  }
147
147
  } : void 0,
148
- signServer: n.signServer || t.signServer ? {
149
- ...n.signServer,
148
+ signServer: t.signServer || n.signServer ? {
150
149
  ...t.signServer,
150
+ ...n.signServer,
151
151
  kol: {
152
- ...n.signServer?.kol ?? {},
153
- ...t.signServer?.kol ?? {}
152
+ ...t.signServer?.kol ?? {},
153
+ ...n.signServer?.kol ?? {}
154
154
  },
155
155
  usbKey: {
156
- ...n.signServer?.usbKey ?? {},
157
- ...t.signServer?.usbKey ?? {}
156
+ ...t.signServer?.usbKey ?? {},
157
+ ...n.signServer?.usbKey ?? {}
158
158
  }
159
159
  } : void 0
160
- }), Q = () => globalThis, k = () => {
161
- const n = Q();
162
- return n[f] || (n[f] = {
163
- current: m(y),
164
- defaults: m(y),
160
+ }), Q = () => globalThis, p = () => {
161
+ const t = Q();
162
+ return t[S] || (t[S] = {
163
+ current: h(A),
164
+ defaults: h(A),
165
165
  overrides: {}
166
- }), n[f];
167
- }, Ne = () => k().current, xe = (n) => {
168
- const t = k();
169
- return t.defaults = m(n), t.current = N(t.defaults, t.overrides), t.current;
170
- }, Ve = (n) => {
171
- const t = k();
172
- return t.current = m(n), t.overrides = U(n), t.current;
173
- }, Be = (n) => {
174
- const t = k();
175
- return t.overrides = q(t.overrides, U(n)), t.current = N(t.current, n), t.current;
176
- }, Ke = (n) => {
177
- const t = k();
178
- return n && (t.defaults = m(n)), t.overrides = {}, t.current = m(t.defaults), t.current;
179
- }, Ge = {
166
+ }), t[S];
167
+ }, je = () => p().current, Xe = (t) => {
168
+ const n = p();
169
+ return n.defaults = h(t), n.current = U(n.defaults, n.overrides), n.current;
170
+ }, Je = (t) => {
171
+ const n = p();
172
+ return n.current = h(t), n.overrides = L(t), n.current;
173
+ }, Ze = (t) => {
174
+ const n = p();
175
+ return n.overrides = q(n.overrides, L(t)), n.current = U(n.current, t), n.current;
176
+ }, et = (t) => {
177
+ const n = p();
178
+ return t && (n.defaults = h(t)), n.overrides = {}, n.current = h(n.defaults), n.current;
179
+ }, tt = {
180
180
  EDGE_POSITION: w,
181
- RSA_MODE: F,
182
- SIGNATURE_TYPE: _
183
- }, T = (n) => {
184
- if (n.length !== 0)
185
- return n.length === 1 ? n[0] : n;
186
- }, c = (n, t, e) => new Proxy(
181
+ RSA_MODE: O,
182
+ SIGNATURE_TYPE: M
183
+ }, f = (t) => {
184
+ if (t.length !== 0)
185
+ return t.length === 1 ? t[0] : t;
186
+ }, c = (t, n, e) => new Proxy(
187
187
  {},
188
188
  {
189
- get: (i, r) => {
190
- if (r === "then")
189
+ get: (i, a) => {
190
+ if (a === "then")
191
191
  return;
192
- if (typeof r == "symbol")
193
- return r === Symbol.toStringTag ? n : void 0;
194
- const o = t[r];
195
- return o ? (...a) => {
196
- if (o.kind === "callbackRegister") {
197
- o.callback?.(e.callbacks, a);
192
+ if (typeof a == "symbol")
193
+ return a === Symbol.toStringTag ? t : void 0;
194
+ const r = n[a];
195
+ return r ? (...s) => {
196
+ if (r.kind === "callbackRegister") {
197
+ r.callback?.(e.callbacks, s);
198
198
  return;
199
199
  }
200
- if (o.kind === "stateGetter")
201
- return o.state?.(e.state.snapshot(), a);
202
- const s = o.adapterMethod ?? r;
203
- if (o.kind === "query")
204
- return e.bridge.request(n, s, T(a));
205
- if (o.kind === "callbackQuery") {
206
- const l = a.find((d) => typeof d == "function"), p = a.filter((d) => typeof d != "function");
207
- e.bridge.request(n, s, T(p)).then((d) => {
208
- const b = o.mapCallbackResult?.(d) ?? [d];
209
- l?.(...b);
200
+ if (r.kind === "stateGetter")
201
+ return r.state?.(e.state.snapshot(), s);
202
+ const o = r.adapterMethod ?? a;
203
+ if (r.kind === "query")
204
+ return e.bridge.request(t, o, f(s));
205
+ if (r.kind === "callbackQuery") {
206
+ const l = s.find((d) => typeof d == "function"), m = s.filter((d) => typeof d != "function");
207
+ e.bridge.request(t, o, f(m)).then((d) => {
208
+ const k = r.mapCallbackResult?.(d) ?? [d];
209
+ l?.(...k);
210
210
  }).catch(e.onAsyncError);
211
211
  return;
212
212
  }
213
- e.bridge.request(n, s, T(a)).catch(e.onAsyncError);
214
- } : (...a) => {
215
- const s = new Error(`${n}.${r} is not implemented by the SDK adapter.`);
216
- e.onAsyncError(s);
213
+ e.bridge.request(t, o, f(s)).catch(e.onAsyncError);
214
+ } : (...s) => {
215
+ const o = new Error(`${t}.${a} is not implemented by the SDK adapter.`);
216
+ e.onAsyncError(o);
217
217
  };
218
218
  }
219
219
  }
220
- ), u = (n, t) => new Proxy(
221
- {},
222
- {
223
- get: (e, i) => {
224
- if (i !== "then" && typeof i != "symbol")
225
- return (...r) => {
226
- const o = `${n}.${i} is not implemented by the SDK adapter.`;
227
- t.onAsyncError(new Error(o));
228
- };
220
+ ), z = {
221
+ addAnnotationEventCallback: {
222
+ kind: "callbackRegister",
223
+ callback: (t, n) => {
224
+ const e = n[0];
225
+ typeof e == "function" && t.annotationEvents.push(e);
226
+ }
227
+ },
228
+ addAnnotationPersistCallback: {
229
+ kind: "callbackRegister",
230
+ callback: (t, n) => {
231
+ const e = n[0];
232
+ typeof e == "function" && t.annotationPersist.push(e);
233
+ }
234
+ },
235
+ addAnnotationRetrieveCallback: {
236
+ kind: "callbackRegister",
237
+ callback: (t, n) => {
238
+ const e = n[0];
239
+ typeof e == "function" && t.annotationRetrieve.push(e);
240
+ }
241
+ },
242
+ addDigitalAnnotationRetrieveCallback: {
243
+ kind: "callbackRegister",
244
+ callback: (t, n) => {
245
+ const e = n[0];
246
+ typeof e == "function" && t.digitalAnnotationRetrieve.push(
247
+ e
248
+ );
249
+ }
250
+ },
251
+ isInAnnotationMode: {
252
+ kind: "stateGetter",
253
+ state: (t) => t.annotationEnabled
254
+ },
255
+ getAnnotations: { kind: "stateGetter", state: () => [] },
256
+ getAnnotationsCount: { kind: "stateGetter", state: () => 0 },
257
+ queryAnnotationsBy: { kind: "stateGetter", state: () => [] },
258
+ setToolSource: { kind: "command" },
259
+ openAnnotationView: { kind: "command" },
260
+ closeAnnotationView: { kind: "command" },
261
+ openTextAnnotationView: { kind: "command" },
262
+ setTextAnnotationFontColor: { kind: "command" },
263
+ setTextAnnotationFontSize: { kind: "command" },
264
+ closeTextAnnotationView: { kind: "command" },
265
+ createTextAnnotation: { kind: "command" },
266
+ setPersistToDocument: { kind: "command" },
267
+ saveAnnotations: { kind: "callbackQuery" },
268
+ saveTextAnnotations: { kind: "command" },
269
+ clearAnnotations: { kind: "command" },
270
+ clearTextAnnotations: { kind: "command" },
271
+ undoAnnotation: { kind: "command" },
272
+ redoAnnotation: { kind: "command" },
273
+ selectAnnotationTool: { kind: "command" },
274
+ showAnnotationColorPicker: { kind: "command" },
275
+ setAnnotationPenType: { kind: "command" },
276
+ appendAnnotations: { kind: "callbackQuery" },
277
+ batchAppendAnnotations: { kind: "callbackQuery" },
278
+ setAnnotationPenColor: { kind: "command" },
279
+ setAnnotationPenWidth: { kind: "command" },
280
+ setAnnotationPenThickness: { kind: "command" },
281
+ enableAnnotationsInfoView: { kind: "command" },
282
+ enableAnnotationsDeletion: { kind: "command" },
283
+ enableAnnotationsDeletionOnlyByAuthor: { kind: "command" },
284
+ listDigitalStamps: { kind: "command" },
285
+ listAnnotations: { kind: "command" },
286
+ deleteAnnotationsBy: { kind: "command" },
287
+ deleteAnnotationsById: { kind: "command" },
288
+ addDigitalAnnotation: { kind: "command" },
289
+ addInkAnnotationCallback: { kind: "callbackRegister" }
290
+ };
291
+ class W {
292
+ constructor(n) {
293
+ this.setToolSource = (e) => this.adapter.setToolSource(e), this.openAnnotationView = (e) => this.adapter.openAnnotationView(e), this.closeAnnotationView = (e) => this.adapter.closeAnnotationView(e), this.openTextAnnotationView = () => this.adapter.openTextAnnotationView(), this.setTextAnnotationFontColor = (e) => this.adapter.setTextAnnotationFontColor(e), this.setTextAnnotationFontSize = (e) => this.adapter.setTextAnnotationFontSize(e), this.closeTextAnnotationView = (e) => this.adapter.closeTextAnnotationView(e), this.createTextAnnotation = (e) => this.adapter.createTextAnnotation(e), this.setPersistToDocument = (e) => this.adapter.setPersistToDocument(e), this.saveAnnotations = (e) => this.adapter.saveAnnotations(e), this.saveTextAnnotations = () => this.adapter.saveTextAnnotations(), this.clearAnnotations = () => this.adapter.clearAnnotations(), this.clearTextAnnotations = () => this.adapter.clearTextAnnotations(), this.undoAnnotation = () => this.adapter.undoAnnotation(), this.redoAnnotation = () => this.adapter.redoAnnotation(), this.selectAnnotationTool = (e) => this.adapter.selectAnnotationTool(e), this.showAnnotationColorPicker = () => this.adapter.showAnnotationColorPicker(), this.setAnnotationPenType = (e) => this.adapter.setAnnotationPenType(e), this.appendAnnotations = (e, i) => this.adapter.appendAnnotations(e, i), this.batchAppendAnnotations = (e, i) => this.adapter.batchAppendAnnotations(e, i), this.setAnnotationPenColor = (e) => this.adapter.setAnnotationPenColor(e), this.setAnnotationPenWidth = (e) => this.adapter.setAnnotationPenWidth(e), this.setAnnotationPenThickness = (e) => this.adapter.setAnnotationPenThickness(e), this.enableAnnotationsInfoView = (e) => this.adapter.enableAnnotationsInfoView(e), this.enableAnnotationsDeletion = (e) => this.adapter.enableAnnotationsDeletion(e), this.enableAnnotationsDeletionOnlyByAuthor = (e) => this.adapter.enableAnnotationsDeletionOnlyByAuthor(e), this.listDigitalStamps = () => this.adapter.listDigitalStamps(), this.isInAnnotationMode = () => this.adapter.isInAnnotationMode(), this.listAnnotations = (e) => this.adapter.listAnnotations(e), this.getAnnotations = () => this.adapter.getAnnotations(), this.getAnnotationsCount = () => this.adapter.getAnnotationsCount(), this.queryAnnotationsBy = (e) => this.adapter.queryAnnotationsBy(e), this.deleteAnnotationsBy = (e, i) => this.adapter.deleteAnnotationsBy(e, i), this.deleteAnnotationsById = (e, i) => this.adapter.deleteAnnotationsById(e, i), this.addDigitalAnnotation = (e) => this.adapter.addDigitalAnnotation(e), this.addInkAnnotationCallback = (e) => this.adapter.addInkAnnotationCallback(e), this.addAnnotationEventCallback = (e) => this.adapter.addAnnotationEventCallback(e), this.addAnnotationPersistCallback = (e) => this.adapter.addAnnotationPersistCallback(e), this.addAnnotationRetrieveCallback = (e) => this.adapter.addAnnotationRetrieveCallback(e), this.addDigitalAnnotationRetrieveCallback = (e) => this.adapter.addDigitalAnnotationRetrieveCallback(e), this.adapter = c(
294
+ "annotation",
295
+ z,
296
+ n
297
+ );
298
+ }
299
+ }
300
+ const $ = {
301
+ configSecurityProvider: { kind: "command" },
302
+ getSecurityProviders: { kind: "query" }
303
+ };
304
+ class Y {
305
+ constructor(n) {
306
+ this.configSecurityProvider = (e) => this.adapter.configSecurityProvider(e), this.getSecurityProviders = () => this.adapter.getSecurityProviders(), this.adapter = c("crypto", $, n);
307
+ }
308
+ }
309
+ const j = {
310
+ addDigitalSignatureRetrieveCallback: {
311
+ kind: "callbackRegister",
312
+ callback: (t, n) => {
313
+ const e = n[0];
314
+ typeof e == "function" && t.digitalSignatureRetrieve.push(e);
315
+ }
316
+ },
317
+ addDigitalSignatureParseCallback: {
318
+ kind: "callbackRegister",
319
+ callback: (t, n) => {
320
+ const e = n[0];
321
+ typeof e == "function" && t.digitalSignatureParse.push(e);
229
322
  }
323
+ },
324
+ addDigitalSignCallback: {
325
+ kind: "callbackRegister",
326
+ callback: (t, n) => {
327
+ const e = n[0];
328
+ typeof e == "function" && t.digitalSign.push(e);
329
+ }
330
+ },
331
+ setCryptoProvider: { kind: "command" },
332
+ setSealSource: { kind: "command" },
333
+ setDefaultStampPassword: { kind: "command" },
334
+ setDefaultSealPassword: { kind: "command" },
335
+ setDefaultKeystorePassword: { kind: "command" },
336
+ setDefaultUSBKeyPassword: { kind: "command" },
337
+ setupExternalSealServer: { kind: "command" },
338
+ setDigitalSignOptions: { kind: "command" },
339
+ setExternalDigitalSignOptions: { kind: "command" },
340
+ setPDFDigitalSignCaptionOptions: { kind: "command" },
341
+ addDigitalSignature: { kind: "callbackQuery" },
342
+ addDigitalSignatureBySelectedSearchHighlight: { kind: "command" },
343
+ listDigitalSignatures: { kind: "callbackQuery" },
344
+ getDigitalSignatures: { kind: "stateGetter", state: () => [] },
345
+ getDigitalSignaturesCount: { kind: "stateGetter", state: () => 0 },
346
+ enableDigitalSignatureInfoView: { kind: "command" },
347
+ enableDigitalSignatureRevocation: { kind: "command" }
348
+ };
349
+ class X {
350
+ constructor(n) {
351
+ this.addDigitalSignatureRetrieveCallback = (e) => this.adapter.addDigitalSignatureRetrieveCallback(e), this.addDigitalSignatureParseCallback = (e) => this.adapter.addDigitalSignatureParseCallback(e), this.setCryptoProvider = (e, i, a) => this.adapter.setCryptoProvider(e, i, a), this.setSealSource = (e) => this.adapter.setSealSource(e), this.setDefaultStampPassword = (e) => this.adapter.setDefaultStampPassword(e), this.setDefaultSealPassword = (e) => this.adapter.setDefaultSealPassword(e), this.setDefaultKeystorePassword = (e) => this.adapter.setDefaultKeystorePassword(e), this.setDefaultUSBKeyPassword = (e) => this.adapter.setDefaultUSBKeyPassword(e), this.addDigitalSignCallback = (e) => this.adapter.addDigitalSignCallback(e), this.setupExternalSealServer = (e) => this.adapter.setupExternalSealServer(e), this.setDigitalSignOptions = (e) => this.adapter.setDigitalSignOptions(e), this.setExternalDigitalSignOptions = (e) => this.adapter.setExternalDigitalSignOptions(e), this.setPDFDigitalSignCaptionOptions = (e) => this.adapter.setPDFDigitalSignCaptionOptions(e), this.addDigitalSignature = (e, i) => this.adapter.addDigitalSignature(e, i), this.addDigitalSignatureBySelectedSearchHighlight = (e) => this.adapter.addDigitalSignatureBySelectedSearchHighlight(e), this.listDigitalSignatures = (e) => this.adapter.listDigitalSignatures(e), this.getDigitalSignatures = () => this.adapter.getDigitalSignatures(), this.getDigitalSignaturesCount = () => this.adapter.getDigitalSignaturesCount(), this.enableDigitalSignatureInfoView = (e) => this.adapter.enableDigitalSignatureInfoView(e), this.enableDigitalSignatureRevocation = (e) => this.adapter.enableDigitalSignatureRevocation(e), this.adapter = c(
352
+ "digitalSign",
353
+ j,
354
+ n
355
+ );
230
356
  }
231
- ), z = {
357
+ }
358
+ const J = "rhc-office.editor-adapter", Z = 1, ee = "__RHC_OFFICE_EDITOR_ADAPTER__", R = "rhcOfficeAdapterReady", E = "rhcOfficeAdapterEvent", N = "data-rhc-office-reader-id", te = {
232
359
  addDocumentOpenedCallback: {
233
360
  kind: "callbackRegister",
234
- callback: (n, t) => {
235
- const e = t[0];
236
- typeof e == "function" && n.documentOpened.push(e);
361
+ callback: (t, n) => {
362
+ const e = n[0];
363
+ typeof e == "function" && t.documentOpened.push(e);
237
364
  }
238
365
  },
239
366
  addDocumentSavedCallback: {
240
367
  kind: "callbackRegister",
241
- callback: (n, t) => {
242
- const e = t[0];
243
- typeof e == "function" && n.documentSaved.push(e);
368
+ callback: (t, n) => {
369
+ const e = n[0];
370
+ typeof e == "function" && t.documentSaved.push(e);
244
371
  }
245
372
  },
246
373
  addDocumentClosedCallback: {
247
374
  kind: "callbackRegister",
248
- callback: (n, t) => {
249
- const e = t[0];
250
- typeof e == "function" && n.documentClosed.push(e);
375
+ callback: (t, n) => {
376
+ const e = n[0];
377
+ typeof e == "function" && t.documentClosed.push(e);
251
378
  }
252
379
  },
253
380
  openPDFDocument: { kind: "callbackQuery", adapterMethod: "open" },
@@ -263,83 +390,96 @@ const w = "RIGHT_CENTER", _ = "REGULAR_ESM", F = "auto", f = "__RHC_OFFICE_DIGIT
263
390
  saveAs: { kind: "query" },
264
391
  getDocumentContent: {
265
392
  kind: "callbackQuery",
266
- mapCallbackResult: (n) => {
267
- const t = n;
268
- return [t?.fileCacheId, t?.fileBuffer];
393
+ mapCallbackResult: (t) => {
394
+ const n = t;
395
+ return [n?.fileCacheId, n?.fileBuffer];
269
396
  }
270
397
  },
271
398
  closeDocument: { kind: "callbackQuery" },
272
399
  isDocumentOpened: {
273
400
  kind: "stateGetter",
274
- state: (n) => n.documentOpened
401
+ state: (t) => t.documentOpened
275
402
  },
276
403
  isDocumentModified: {
277
404
  kind: "stateGetter",
278
- state: (n) => n.documentModified
405
+ state: (t) => t.documentModified
279
406
  },
280
407
  print: { kind: "command" },
281
408
  createPreview: { kind: "command" }
282
409
  };
283
- class W {
284
- constructor(t) {
285
- this.addDocumentOpenedCallback = (e) => this.adapter.addDocumentOpenedCallback(e), this.addDocumentSavedCallback = (e) => this.adapter.addDocumentSavedCallback(e), this.addDocumentClosedCallback = (e) => this.adapter.addDocumentClosedCallback(e), this.openPDFDocument = (e, i) => this.adapter.openPDFDocument(e, i), this.openPdfDocument = (e, i) => this.adapter.openPdfDocument(e, i), this.openOFDDocument = (e, i) => this.adapter.openOFDDocument(e, i), this.openOfdDocument = (e, i) => this.adapter.openOfdDocument(e, i), this.openOfficeDocument = (e, i) => this.adapter.openOfficeDocument(e, i), this.openImageDocument = (e, i) => this.adapter.openImageDocument(e, i), this.openTextDocument = (e, i) => this.adapter.openTextDocument(e, i), this.openFromLocalStorage = () => this.adapter.openFromLocalStorage(), this.setUploadUrl = (e) => this.adapter.setUploadUrl(e), this.save = (e, i, r) => this.adapter.save(e, i, r), this.saveAs = (e) => this.adapter.saveAs(e), this.getDocumentContent = (e) => this.adapter.getDocumentContent(e), this.closeDocument = (e, i, r) => this.adapter.closeDocument(e, i, r), this.isDocumentOpened = () => this.adapter.isDocumentOpened(), this.isDocumentModified = () => this.adapter.isDocumentModified(), this.print = () => this.adapter.print(), this.createPreview = (e, i) => this.adapter.createPreview(e, i), this.adapter = c(
410
+ class ne {
411
+ constructor(n) {
412
+ this.context = n, this.addDocumentOpenedCallback = (e) => this.adapter.addDocumentOpenedCallback(e), this.addDocumentSavedCallback = (e) => this.adapter.addDocumentSavedCallback(e), this.addDocumentClosedCallback = (e) => this.adapter.addDocumentClosedCallback(e), this.openPDFDocument = (e, i) => this.adapter.openPDFDocument(e, i), this.openPdfDocument = (e, i) => this.adapter.openPdfDocument(e, i), this.openOFDDocument = (e, i) => this.adapter.openOFDDocument(e, i), this.openOfdDocument = (e, i) => this.adapter.openOfdDocument(e, i), this.openOfficeDocument = (e, i) => this.adapter.openOfficeDocument(e, i), this.openImageDocument = (e, i) => this.adapter.openImageDocument(e, i), this.openTextDocument = (e, i) => this.adapter.openTextDocument(e, i), this.openFromLocalStorage = () => this.adapter.openFromLocalStorage(), this.setUploadUrl = (e) => this.adapter.setUploadUrl(e), this.save = (e, i, a) => this.adapter.save(e, i, a), this.saveAs = (e) => {
413
+ const i = this.context.bridge.getReaderId();
414
+ if (!i)
415
+ return Promise.resolve({
416
+ success: !1,
417
+ action: "save-as",
418
+ filename: e?.filename,
419
+ error: "Reader is not mounted or does not expose saveAs."
420
+ });
421
+ const a = document.querySelector(
422
+ `[${N}="${i}"]`
423
+ );
424
+ return typeof a?.saveAs == "function" ? a.saveAs(e) : this.adapter.saveAs(e);
425
+ }, this.getDocumentContent = (e) => this.adapter.getDocumentContent(e), this.closeDocument = (e, i, a) => this.adapter.closeDocument(e, i, a), this.isDocumentOpened = () => this.adapter.isDocumentOpened(), this.isDocumentModified = () => this.adapter.isDocumentModified(), this.print = () => this.adapter.print(), this.createPreview = (e, i) => this.adapter.createPreview(e, i), this.adapter = c(
286
426
  "document",
287
- z,
288
- t
427
+ te,
428
+ n
289
429
  );
290
430
  }
291
431
  }
292
- const $ = {
432
+ const ie = {
293
433
  clearFind: { kind: "command" },
294
434
  findNext: { kind: "command" },
295
435
  findPrevious: { kind: "command" }
296
436
  };
297
- class j {
298
- constructor(t) {
299
- this.clearFind = () => this.adapter.clearFind(), this.findNext = (e) => this.adapter.findNext(e), this.findPrevious = (e) => this.adapter.findPrevious(e), this.adapter = c("find", $, t);
437
+ class ae {
438
+ constructor(n) {
439
+ this.clearFind = () => this.adapter.clearFind(), this.findNext = (e) => this.adapter.findNext(e), this.findPrevious = (e) => this.adapter.findPrevious(e), this.adapter = c("find", ie, n);
300
440
  }
301
441
  }
302
- const Y = {
442
+ const re = {
303
443
  configFileUpload: { kind: "command" },
304
444
  setHttpHeaders: { kind: "command" },
305
445
  setHttpFormFields: { kind: "command" }
306
446
  };
307
- class X {
308
- constructor(t) {
447
+ class se {
448
+ constructor(n) {
309
449
  this.configFileUpload = (e) => this.adapter.configFileUpload(e), this.setHttpHeaders = (e) => this.adapter.setHttpHeaders(e), this.setHttpFormFields = (e) => this.adapter.setHttpFormFields(e), this.adapter = c(
310
450
  "networking",
311
- Y,
312
- t
451
+ re,
452
+ n
313
453
  );
314
454
  }
315
455
  }
316
- const J = (n) => ({
456
+ const oe = (t) => ({
317
457
  addPageChangeCallback: {
318
458
  kind: "callbackRegister",
319
- callback: (t, e) => {
459
+ callback: (n, e) => {
320
460
  const i = e[0];
321
- typeof i == "function" && t.pageChange.push(i);
461
+ typeof i == "function" && n.pageChange.push(i);
322
462
  }
323
463
  },
324
464
  addPageModeChangeCallback: {
325
465
  kind: "callbackRegister",
326
- callback: (t, e) => {
466
+ callback: (n, e) => {
327
467
  const i = e[0];
328
- typeof i == "function" && t.pageModeChange.push(i);
468
+ typeof i == "function" && n.pageModeChange.push(i);
329
469
  }
330
470
  },
331
471
  getPageCount: {
332
472
  kind: "callbackRegister",
333
- callback: (t, e) => {
473
+ callback: (n, e) => {
334
474
  const i = e[0];
335
- typeof i == "function" && i(n.state.snapshot().pageCount);
475
+ typeof i == "function" && i(t.state.snapshot().pageCount);
336
476
  }
337
477
  },
338
478
  getPageIndex: {
339
479
  kind: "callbackRegister",
340
- callback: (t, e) => {
480
+ callback: (n, e) => {
341
481
  const i = e[0];
342
- typeof i == "function" && i(n.state.snapshot().pageIndex);
482
+ typeof i == "function" && i(t.state.snapshot().pageIndex);
343
483
  }
344
484
  },
345
485
  setSinglePageViewMode: { kind: "command" },
@@ -363,16 +503,16 @@ const J = (n) => ({
363
503
  gotoPreviousPage: { kind: "command" },
364
504
  rotatePage: { kind: "command" }
365
505
  });
366
- class Z {
367
- constructor(t) {
368
- this.addPageChangeCallback = (e) => this.adapter.addPageChangeCallback(e), this.addPageModeChangeCallback = (e) => this.adapter.addPageModeChangeCallback(e), this.getPageCount = (e) => this.adapter.getPageCount(e), this.getPageIndex = (e) => this.adapter.getPageIndex(e), this.setSinglePageViewMode = () => this.adapter.setSinglePageViewMode(), this.setTwoPagesViewMode = () => this.adapter.setTwoPagesViewMode(), this.setPageScrollVertical = () => this.adapter.setPageScrollVertical(), this.setPageScrollHorizontal = () => this.adapter.setPageScrollHorizontal(), this.setPageCursorPanDrag = () => this.adapter.setPageCursorPanDrag(), this.setPageCursorTextSelect = () => this.adapter.setPageCursorTextSelect(), this.rotateCW = () => this.adapter.rotateCW(), this.rotateCCW = () => this.adapter.rotateCCW(), this.autoFitPage = () => this.adapter.autoFitPage(), this.fitPageSize = () => this.adapter.fitPageSize(), this.fitPageWidth = () => this.adapter.fitPageWidth(), this.fitPageHeight = () => this.adapter.fitPageHeight(), this.increasePageScale = () => this.adapter.increasePageScale(), this.decreasePageScale = () => this.adapter.decreasePageScale(), this.setPageScale = (e) => this.adapter.setPageScale(e), this.setPageBlendColor = (e, i, r, o) => this.adapter.setPageBlendColor(e, i, r, o), this.gotoPage = (e, i, r) => this.adapter.gotoPage(e, i, r), this.gotoNextPage = () => this.adapter.gotoNextPage(), this.gotoPreviousPage = () => this.adapter.gotoPreviousPage(), this.rotatePage = (e) => this.adapter.rotatePage(e), this.adapter = c(
506
+ class de {
507
+ constructor(n) {
508
+ this.addPageChangeCallback = (e) => this.adapter.addPageChangeCallback(e), this.addPageModeChangeCallback = (e) => this.adapter.addPageModeChangeCallback(e), this.getPageCount = (e) => this.adapter.getPageCount(e), this.getPageIndex = (e) => this.adapter.getPageIndex(e), this.setSinglePageViewMode = () => this.adapter.setSinglePageViewMode(), this.setTwoPagesViewMode = () => this.adapter.setTwoPagesViewMode(), this.setPageScrollVertical = () => this.adapter.setPageScrollVertical(), this.setPageScrollHorizontal = () => this.adapter.setPageScrollHorizontal(), this.setPageCursorPanDrag = () => this.adapter.setPageCursorPanDrag(), this.setPageCursorTextSelect = () => this.adapter.setPageCursorTextSelect(), this.rotateCW = () => this.adapter.rotateCW(), this.rotateCCW = () => this.adapter.rotateCCW(), this.autoFitPage = () => this.adapter.autoFitPage(), this.fitPageSize = () => this.adapter.fitPageSize(), this.fitPageWidth = () => this.adapter.fitPageWidth(), this.fitPageHeight = () => this.adapter.fitPageHeight(), this.increasePageScale = () => this.adapter.increasePageScale(), this.decreasePageScale = () => this.adapter.decreasePageScale(), this.setPageScale = (e) => this.adapter.setPageScale(e), this.setPageBlendColor = (e, i, a, r) => this.adapter.setPageBlendColor(e, i, a, r), this.gotoPage = (e, i, a) => this.adapter.gotoPage(e, i, a), this.gotoNextPage = () => this.adapter.gotoNextPage(), this.gotoPreviousPage = () => this.adapter.gotoPreviousPage(), this.rotatePage = (e) => this.adapter.rotatePage(e), this.adapter = c(
369
509
  "page",
370
- J(t),
371
- t
510
+ oe(n),
511
+ n
372
512
  );
373
513
  }
374
514
  }
375
- const ee = {
515
+ const le = {
376
516
  open: { kind: "command" },
377
517
  setFormFieldValue: { kind: "command" },
378
518
  setFormFieldReadonly: { kind: "command" },
@@ -386,65 +526,138 @@ const ee = {
386
526
  },
387
527
  toKeyValue: {
388
528
  kind: "callbackQuery",
389
- mapCallbackResult: (n) => [Array.isArray(n) ? n : []]
529
+ mapCallbackResult: (t) => [Array.isArray(t) ? t : []]
390
530
  }
391
531
  };
392
- class te {
393
- constructor(t) {
532
+ class ce {
533
+ constructor(n) {
394
534
  this.open = () => this.adapter.open(), this.setFormFieldValue = (e, i) => this.adapter.setFormFieldValue(e, i), this.setFormFieldReadonly = (e, i) => this.adapter.setFormFieldReadonly(e, i), this.commit = (e) => this.adapter.commit(e), this.clear = (e) => this.adapter.clear(e), this.toKeyValue = (e) => this.adapter.toKeyValue(e), this.adapter = c(
395
535
  "pdfFormFiller",
396
- ee,
397
- t
536
+ le,
537
+ n
398
538
  );
399
539
  }
400
540
  }
401
- const ne = /\s*,\s*/, ie = /\s*-\s*/, E = (n) => {
402
- const t = Number.parseInt(n.trim(), 10);
403
- return !Number.isFinite(t) || t <= 0 ? null : t;
404
- }, re = (n) => {
405
- const t = n.split(ie);
406
- if (t.length === 1) {
407
- const r = E(t[0] ?? "");
408
- return r ? [r] : [];
541
+ class ue extends Error {
542
+ constructor(n, e) {
543
+ super(`[Phase 1] ${n}.${e} is not implemented yet.`), this.name = "SDKPhase1NotImplementedError";
409
544
  }
410
- const e = E(t[0] ?? ""), i = E(t[1] ?? "");
411
- return !e || !i || i < e ? [] : Array.from({ length: i - e + 1 }, (r, o) => e + o);
412
- }, oe = (n) => n ? n.split(ne).flatMap((e) => re(e)).filter((e, i, r) => r.indexOf(e) === i) : [];
413
- class ae {
414
- constructor(t, e, i) {
415
- this.setFieldName = (r) => {
416
- this.key = r;
417
- }, this.setFieldValue = (r) => {
418
- this.value = r;
419
- }, this.setDescription = (r) => {
420
- this.description = r;
421
- }, this.key = t, this.value = e, this.description = i;
545
+ }
546
+ const he = (t, n) => () => {
547
+ throw new ue(t, n);
548
+ }, nt = (t) => new Proxy(
549
+ {},
550
+ {
551
+ get: (n, e) => {
552
+ if (e !== "then")
553
+ return typeof e == "symbol" ? e === Symbol.toStringTag ? t : void 0 : he(t, e);
554
+ }
555
+ }
556
+ ), me = /\s*,\s*/, ge = /\s*-\s*/, b = (t) => {
557
+ const n = Number.parseInt(t.trim(), 10);
558
+ return !Number.isFinite(n) || n <= 0 ? null : n;
559
+ }, pe = (t) => {
560
+ const n = t.split(ge);
561
+ if (n.length === 1) {
562
+ const a = b(n[0] ?? "");
563
+ return a ? [a] : [];
564
+ }
565
+ const e = b(n[0] ?? ""), i = b(n[1] ?? "");
566
+ return !e || !i || i < e ? [] : Array.from({ length: i - e + 1 }, (a, r) => e + r);
567
+ }, ke = (t) => t ? t.split(me).flatMap((e) => pe(e)).filter((e, i, a) => a.indexOf(e) === i) : [];
568
+ class Se {
569
+ constructor(n, e, i) {
570
+ this.setFieldName = (a) => {
571
+ this.key = a;
572
+ }, this.setFieldValue = (a) => {
573
+ this.value = a;
574
+ }, this.setDescription = (a) => {
575
+ this.description = a;
576
+ }, this.key = n, this.value = e, this.description = i;
422
577
  }
423
578
  }
424
- class se {
579
+ class fe {
425
580
  constructor() {
426
- this.fields = [], this.keywordTextFixedPositions = void 0, this.keywordOffsetX = 0, this.keywordOffsetY = 0, this.bookmarkOffsetX = 0, this.bookmarkOffsetY = 0, this.printMargin = 0, this.grayscaleSealImage = !1, this.signType = 0, this.sealPosition = 0, this.getSignType = () => this.signType, this.setSignType = (t) => {
427
- this.signType = t;
428
- }, this.isCrossPageSideSign = () => this.signType === 2 || this.signType === 3, this.getSealPosition = () => this.sealPosition, this.setSignOnPageSides = (t) => {
429
- t >= 0 && t <= 3 && (this.signType = t);
430
- }, this.setSignPositionOnPageSides = (t) => {
431
- this.sealPosition = t;
432
- }, this.setPageRange = (t) => {
433
- this.pageRange = t;
434
- }, this.getPageRange = () => this.pageRange, this.getPageRanges = () => oe(this.pageRange), this.setSignUserData = (t) => {
435
- this.signUserData = t;
436
- }, this.setPrintMargin = (t) => {
437
- this.printMargin = t;
438
- }, this.getPrintMargin = () => this.printMargin ?? 0, this.setSignReason = (t) => {
439
- this.signReason = t;
440
- }, this.getSignReason = () => this.signReason, this.setSignLocation = (t) => {
441
- this.signLocation = t;
442
- }, this.getSignLocation = () => this.signLocation, this.setDefaultStampPassword = (t) => {
443
- this.defaultStampPassword = t;
581
+ this.fields = [], this.keywordTextFixedPositions = void 0, this.keywordOffsetX = 0, this.keywordOffsetY = 0, this.bookmarkOffsetX = 0, this.bookmarkOffsetY = 0, this.printMargin = 0, this.grayscaleSealImage = !1, this.signType = 0, this.sealPosition = 0, this.getSignType = () => this.signType, this.setSignType = (n) => {
582
+ this.signType = n;
583
+ }, this.isCrossPageSideSign = () => this.signType === 2 || this.signType === 3, this.getSealPosition = () => this.sealPosition, this.setSignOnPageSides = (n) => {
584
+ n >= 0 && n <= 3 && (this.signType = n);
585
+ }, this.setSignPositionOnPageSides = (n) => {
586
+ this.sealPosition = n;
587
+ }, this.setPageRange = (n) => {
588
+ this.pageRange = n;
589
+ }, this.getPageRange = () => this.pageRange, this.getPageRanges = () => ke(this.pageRange), this.setSignUserData = (n) => {
590
+ this.signUserData = n;
591
+ }, this.setPrintMargin = (n) => {
592
+ this.printMargin = n;
593
+ }, this.getPrintMargin = () => this.printMargin ?? 0, this.setSignReason = (n) => {
594
+ this.signReason = n;
595
+ }, this.getSignReason = () => this.signReason, this.setSignLocation = (n) => {
596
+ this.signLocation = n;
597
+ }, this.getSignLocation = () => this.signLocation, this.setDefaultStampPassword = (n) => {
598
+ this.defaultStampPassword = n;
444
599
  };
445
600
  }
446
601
  }
447
- const de = /* @__PURE__ */ new Set([2, 5]), le = (n) => ({
602
+ const be = {
603
+ setSignServer: { kind: "command" },
604
+ addSignServerAuthCallback: {
605
+ kind: "callbackRegister",
606
+ callback: (t, n) => {
607
+ const e = n[0];
608
+ typeof e == "function" && t.signServerAuth.push(e);
609
+ }
610
+ },
611
+ setSignServerDefaultLogin: { kind: "command" },
612
+ setDefaultSignServerLogin: { kind: "command" },
613
+ setSignServerDefaultPassword: { kind: "command" },
614
+ setDefaultSignServerPassword: { kind: "command" },
615
+ loginNTKOSignServer: { kind: "command" },
616
+ loginSignServer: { kind: "callbackQuery" },
617
+ signOutSignServer: { kind: "command" },
618
+ isAuthenticatedOnSignServer: { kind: "stateGetter", state: () => !1 },
619
+ setSignServerLoginFromUSBKey: { kind: "command" },
620
+ setUserAuthSource: { kind: "command" }
621
+ };
622
+ class Te {
623
+ constructor(n) {
624
+ this.setSignServer = (e) => this.adapter.setSignServer(e), this.addSignServerAuthCallback = (e) => this.adapter.addSignServerAuthCallback(e), this.setSignServerDefaultLogin = (e) => this.adapter.setSignServerDefaultLogin(e), this.setDefaultSignServerLogin = (e) => this.adapter.setDefaultSignServerLogin(e), this.setSignServerDefaultPassword = (e) => this.adapter.setSignServerDefaultPassword(e), this.setDefaultSignServerPassword = (e) => this.adapter.setDefaultSignServerPassword(e), this.loginNTKOSignServer = (e, i, a) => this.adapter.loginNTKOSignServer(e, i, a), this.loginSignServer = (e, i, a, r) => this.adapter.loginSignServer(e, i, a, r), this.signOutSignServer = () => this.adapter.signOutSignServer(), this.isAuthenticatedOnSignServer = () => this.adapter.isAuthenticatedOnSignServer(), this.setSignServerLoginFromUSBKey = (e, i) => this.adapter.setSignServerLoginFromUSBKey(e, i), this.setUserAuthSource = (e) => this.adapter.setUserAuthSource(e), this.adapter = c(
625
+ "signServer",
626
+ be,
627
+ n
628
+ );
629
+ }
630
+ }
631
+ const ve = {
632
+ createPDF417Barcode: { kind: "command" }
633
+ };
634
+ class Ae {
635
+ constructor(n) {
636
+ this.createPDF417Barcode = (e, i, a, r, s, o, l) => this.adapter.createPDF417Barcode(e, i, a, r, s, o, l), this.adapter = c(
637
+ "symbology",
638
+ ve,
639
+ n
640
+ );
641
+ }
642
+ }
643
+ const Re = {
644
+ setup: { kind: "command" },
645
+ create: { kind: "command" },
646
+ getMarkups: { kind: "callbackQuery" },
647
+ removeMarkup: { kind: "command" },
648
+ removeAllMarkups: { kind: "command" },
649
+ sign: { kind: "callbackQuery" }
650
+ };
651
+ class Ee {
652
+ constructor(n) {
653
+ this.setup = (e) => this.adapter.setup(e), this.create = (e) => this.adapter.create(e), this.getMarkups = (e) => this.adapter.getMarkups(e), this.removeMarkup = (e, i) => this.adapter.removeMarkup(e, i), this.removeAllMarkups = (e) => this.adapter.removeAllMarkups(e), this.sign = (e) => this.adapter.sign(e), this.adapter = c(
654
+ "templateSign",
655
+ Re,
656
+ n
657
+ );
658
+ }
659
+ }
660
+ const ye = /* @__PURE__ */ new Set([2, 5]), Pe = (t) => ({
448
661
  showToolbarMenu: { kind: "command" },
449
662
  hideToolbarMenu: { kind: "command" },
450
663
  setupToolbarMenu: { kind: "command" },
@@ -470,133 +683,133 @@ const de = /* @__PURE__ */ new Set([2, 5]), le = (n) => ({
470
683
  exitBookViewMode: { kind: "command" },
471
684
  isBookViewActivated: {
472
685
  kind: "stateGetter",
473
- state: () => de.has(n.state.snapshot().pageMode)
686
+ state: () => ye.has(t.state.snapshot().pageMode)
474
687
  },
475
688
  requestFullScreen: { kind: "command" },
476
689
  exitFullScreen: { kind: "command" },
477
690
  invalidateView: { kind: "command" }
478
691
  });
479
- class ce {
480
- constructor(t) {
481
- this.showToolbarMenu = () => this.adapter.showToolbarMenu(), this.hideToolbarMenu = () => this.adapter.hideToolbarMenu(), this.setupToolbarMenu = (e) => this.adapter.setupToolbarMenu(e), this.showToolbarMenuItem = (e) => this.adapter.showToolbarMenuItem(e), this.hideToolbarMenuItem = (e) => this.adapter.hideToolbarMenuItem(e), this.setupRibbonMenu = (e) => this.adapter.setupRibbonMenu(e), this.setupRibbonMenuItem = (e, i, r) => this.adapter.setupRibbonMenuItem(e, i, r), this.setupRibbonTitleBar = (e) => this.adapter.setupRibbonTitleBar(e), this.showRibbonMenu = () => this.adapter.showRibbonMenu(), this.hideRibbonMenu = () => this.adapter.hideRibbonMenu(), this.showRibbonMenuItem = (e, i) => this.adapter.showRibbonMenuItem(e, i), this.hideRibbonMenuItem = (e, i) => this.adapter.hideRibbonMenuItem(e, i), this.showRibbonTitleBar = () => this.adapter.showRibbonTitleBar(), this.hideRibbonTitleBar = () => this.adapter.hideRibbonTitleBar(), this.selectRibbonMenu = (e) => this.adapter.selectRibbonMenu(e), this.setRibbonMenuButtonStyle = (e, i) => this.adapter.setRibbonMenuButtonStyle(e, i), this.setWatermark = (e) => this.adapter.setWatermark(e), this.setCompactMode = (e) => this.adapter.setCompactMode(e), this.enterBookViewMode = (e) => this.adapter.enterBookViewMode(e), this.exitBookViewMode = () => this.adapter.exitBookViewMode(), this.isBookViewActivated = () => this.adapter.isBookViewActivated(), this.requestFullScreen = () => this.adapter.requestFullScreen(), this.exitFullScreen = () => this.adapter.exitFullScreen(), this.invalidateView = () => this.adapter.invalidateView(), this.adapter = c("ui", le(t), t);
692
+ class De {
693
+ constructor(n) {
694
+ this.showToolbarMenu = () => this.adapter.showToolbarMenu(), this.hideToolbarMenu = () => this.adapter.hideToolbarMenu(), this.setupToolbarMenu = (e) => this.adapter.setupToolbarMenu(e), this.showToolbarMenuItem = (e) => this.adapter.showToolbarMenuItem(e), this.hideToolbarMenuItem = (e) => this.adapter.hideToolbarMenuItem(e), this.setupRibbonMenu = (e) => this.adapter.setupRibbonMenu(e), this.setupRibbonMenuItem = (e, i, a) => this.adapter.setupRibbonMenuItem(e, i, a), this.setupRibbonTitleBar = (e) => this.adapter.setupRibbonTitleBar(e), this.showRibbonMenu = () => this.adapter.showRibbonMenu(), this.hideRibbonMenu = () => this.adapter.hideRibbonMenu(), this.showRibbonMenuItem = (e, i) => this.adapter.showRibbonMenuItem(e, i), this.hideRibbonMenuItem = (e, i) => this.adapter.hideRibbonMenuItem(e, i), this.showRibbonTitleBar = () => this.adapter.showRibbonTitleBar(), this.hideRibbonTitleBar = () => this.adapter.hideRibbonTitleBar(), this.selectRibbonMenu = (e) => this.adapter.selectRibbonMenu(e), this.setRibbonMenuButtonStyle = (e, i) => this.adapter.setRibbonMenuButtonStyle(e, i), this.setWatermark = (e) => this.adapter.setWatermark(e), this.setCompactMode = (e) => this.adapter.setCompactMode(e), this.enterBookViewMode = (e) => this.adapter.enterBookViewMode(e), this.exitBookViewMode = () => this.adapter.exitBookViewMode(), this.isBookViewActivated = () => this.adapter.isBookViewActivated(), this.requestFullScreen = () => this.adapter.requestFullScreen(), this.exitFullScreen = () => this.adapter.exitFullScreen(), this.invalidateView = () => this.adapter.invalidateView(), this.adapter = c("ui", Pe(n), n);
482
695
  }
483
696
  }
484
- const ue = (n) => {
485
- if (!n)
697
+ const Ce = (t) => {
698
+ if (!t)
486
699
  return;
487
- const t = n.trim().toLowerCase();
488
- if (t === "application")
700
+ const n = t.trim().toLowerCase();
701
+ if (n === "application")
489
702
  return "auto";
490
- if (t === "light" || t === "dark" || t === "high-contrast" || t === "auto")
491
- return t;
492
- }, x = (n) => {
493
- const t = new URL(n, globalThis.location?.href ?? "http://localhost/");
494
- return t.hash = "", t.pathname.endsWith("/") || (t.pathname = `${t.pathname}/`), t.toString();
495
- }, he = (n) => new URL("editors.bootstrap.js", n).toString(), me = (n, t) => {
496
- const e = x(n);
703
+ if (n === "light" || n === "dark" || n === "high-contrast" || n === "auto")
704
+ return n;
705
+ }, x = (t) => {
706
+ const n = new URL(t, globalThis.location?.href ?? "http://localhost/");
707
+ return n.hash = "", n.pathname.endsWith("/") || (n.pathname = `${n.pathname}/`), n.toString();
708
+ }, Ie = (t) => new URL("editors.bootstrap.js", t).toString(), we = (t, n) => {
709
+ const e = x(t);
497
710
  return {
498
- ...t,
711
+ ...n,
499
712
  appUrl: e,
500
- scrollIntoView: t.scrollIntoView ?? !0,
501
- theme: ue(t.theme)
713
+ scrollIntoView: n.scrollIntoView ?? !0,
714
+ theme: Ce(n.theme)
502
715
  };
503
- }, h = "rhc-office-editor", R = "__RHC_OFFICE_SDK_READER_LOADER__", V = () => {
504
- const n = globalThis;
505
- return n[R] || (n[R] = {
716
+ }, u = "rhc-office-editor", T = "__RHC_OFFICE_SDK_READER_LOADER__", B = () => {
717
+ const t = globalThis;
718
+ return t[T] || (t[T] = {
506
719
  activeAppUrl: null,
507
720
  loadPromises: /* @__PURE__ */ new Map()
508
- }), n[R];
509
- }, pe = (n) => Array.from(document.querySelectorAll("script")).find((t) => t.src === n) ?? null;
510
- class S extends Error {
511
- constructor(t) {
512
- super(`Failed to load reader bootstrap script: ${t}`), this.name = "ReaderScriptLoadError";
721
+ }), t[T];
722
+ }, Me = (t) => Array.from(document.querySelectorAll("script")).find((n) => n.src === t) ?? null;
723
+ class y extends Error {
724
+ constructor(n) {
725
+ super(`Failed to load reader bootstrap script: ${n}`), this.name = "ReaderScriptLoadError";
513
726
  }
514
727
  }
515
- class ge extends Error {
516
- constructor(t, e) {
728
+ class Oe extends Error {
729
+ constructor(n, e) {
517
730
  super(
518
- `Reader Web Component "${h}" is already bound to ${t} and cannot be reloaded from ${e}.`
731
+ `Reader Web Component "${u}" is already bound to ${n} and cannot be reloaded from ${e}.`
519
732
  ), this.name = "ReaderSourceConflictError";
520
733
  }
521
734
  }
522
- const B = (n) => {
523
- const t = V();
524
- if (t.activeAppUrl && t.activeAppUrl !== n)
525
- throw new ge(t.activeAppUrl, n);
526
- }, ke = (n) => {
527
- const t = V();
528
- B(n);
529
- const e = t.loadPromises.get(n);
735
+ const V = (t) => {
736
+ const n = B();
737
+ if (n.activeAppUrl && n.activeAppUrl !== t)
738
+ throw new Oe(n.activeAppUrl, t);
739
+ }, _e = (t) => {
740
+ const n = B();
741
+ V(t);
742
+ const e = n.loadPromises.get(t);
530
743
  if (e)
531
744
  return e;
532
- if (globalThis.customElements?.get(h)) {
533
- t.activeAppUrl = n;
534
- const a = Promise.resolve();
535
- return t.loadPromises.set(n, a), a;
745
+ if (globalThis.customElements?.get(u)) {
746
+ n.activeAppUrl = t;
747
+ const s = Promise.resolve();
748
+ return n.loadPromises.set(t, s), s;
536
749
  }
537
- const i = he(n), r = pe(i);
538
- t.activeAppUrl = n;
539
- const o = new Promise((a, s) => {
540
- const l = (b) => {
541
- b?.remove(), s(new S(i));
542
- }, p = () => {
543
- globalThis.customElements.whenDefined(h).then(() => {
544
- a();
545
- }).catch(s);
750
+ const i = Ie(t), a = Me(i);
751
+ n.activeAppUrl = t;
752
+ const r = new Promise((s, o) => {
753
+ const l = (k) => {
754
+ k?.remove(), o(new y(i));
755
+ }, m = () => {
756
+ globalThis.customElements.whenDefined(u).then(() => {
757
+ s();
758
+ }).catch(o);
546
759
  };
547
- if (r) {
548
- if (globalThis.customElements?.get(h)) {
549
- a();
760
+ if (a) {
761
+ if (globalThis.customElements?.get(u)) {
762
+ s();
550
763
  return;
551
764
  }
552
- r.addEventListener(
765
+ a.addEventListener(
553
766
  "error",
554
- () => s(new S(i)),
767
+ () => o(new y(i)),
555
768
  {
556
769
  once: !0
557
770
  }
558
- ), p();
771
+ ), m();
559
772
  return;
560
773
  }
561
774
  const d = document.createElement("script");
562
- d.src = i, d.async = !0, d.dataset.rhcOfficeSdkReader = n, d.addEventListener("load", p, { once: !0 }), d.addEventListener("error", () => l(d), { once: !0 }), document.head.appendChild(d);
563
- }).catch((a) => {
564
- throw t.loadPromises.delete(n), !globalThis.customElements?.get(h) && t.activeAppUrl === n && (t.activeAppUrl = null), a;
775
+ d.src = i, d.async = !0, d.dataset.rhcOfficeSdkReader = t, d.addEventListener("load", m, { once: !0 }), d.addEventListener("error", () => l(d), { once: !0 }), document.head.appendChild(d);
776
+ }).catch((s) => {
777
+ throw n.loadPromises.delete(t), !globalThis.customElements?.get(u) && n.activeAppUrl === t && (n.activeAppUrl = null), s;
565
778
  });
566
- return t.loadPromises.set(n, o), o;
567
- }, be = "rhc-office.editor-adapter", fe = 1, Te = "__RHC_OFFICE_EDITOR_ADAPTER__", C = "rhcOfficeAdapterReady", P = "rhcOfficeAdapterEvent", Ee = "data-rhc-office-reader-id", Re = 5e3, ve = 5e3, ye = () => {
568
- const n = globalThis.crypto;
569
- return typeof n?.randomUUID == "function" ? n.randomUUID() : `adapter-${Date.now()}-${Math.random().toString(36).slice(2)}`;
570
- }, g = () => globalThis[Te];
571
- class Se extends Error {
572
- constructor(t, e, i) {
573
- super(e), this.name = "ReaderBridgeError", this.code = t, this.details = i;
779
+ return n.loadPromises.set(t, r), r;
780
+ }, Fe = 5e3, Le = 5e3, Ue = () => {
781
+ const t = globalThis.crypto;
782
+ return typeof t?.randomUUID == "function" ? t.randomUUID() : `adapter-${Date.now()}-${Math.random().toString(36).slice(2)}`;
783
+ }, g = () => globalThis[ee];
784
+ class Ne extends Error {
785
+ constructor(n, e, i) {
786
+ super(e), this.name = "ReaderBridgeError", this.code = n, this.details = i;
574
787
  }
575
788
  }
576
- class Ce {
577
- constructor(t) {
578
- this.readerId = null, this.readyTimeoutMs = t?.readyTimeoutMs ?? ve, this.requestTimeoutMs = t?.requestTimeoutMs ?? Re;
789
+ class xe {
790
+ constructor(n) {
791
+ this.readerId = null, this.readyTimeoutMs = n?.readyTimeoutMs ?? Le, this.requestTimeoutMs = n?.requestTimeoutMs ?? Fe;
579
792
  }
580
- configureTimeouts(t) {
581
- this.readyTimeoutMs = t?.readyTimeoutMs ?? this.readyTimeoutMs, this.requestTimeoutMs = t?.requestTimeoutMs ?? this.requestTimeoutMs;
793
+ configureTimeouts(n) {
794
+ this.readyTimeoutMs = n?.readyTimeoutMs ?? this.readyTimeoutMs, this.requestTimeoutMs = n?.requestTimeoutMs ?? this.requestTimeoutMs;
582
795
  }
583
- setReaderId(t) {
584
- this.readerId = t;
796
+ setReaderId(n) {
797
+ this.readerId = n;
585
798
  }
586
799
  getReaderId() {
587
800
  return this.readerId;
588
801
  }
589
- async request(t, e, i, r) {
590
- const o = await this.requestRaw(t, e, i, r);
591
- if (o.ok)
592
- return o.result;
593
- throw new Se(
594
- o.error.code,
595
- o.error.message,
596
- o.error.details
802
+ async request(n, e, i, a) {
803
+ const r = await this.requestRaw(n, e, i, a);
804
+ if (r.ok)
805
+ return r.result;
806
+ throw new Ne(
807
+ r.error.code,
808
+ r.error.message,
809
+ r.error.details
597
810
  );
598
811
  }
599
- async requestRaw(t, e, i, r) {
812
+ async requestRaw(n, e, i, a) {
600
813
  if (!this.readerId)
601
814
  return {
602
815
  ok: !1,
@@ -606,8 +819,8 @@ class Ce {
606
819
  message: "Reader is not mounted."
607
820
  }
608
821
  };
609
- const o = await this.waitForAdapter(this.readerId, r?.timeoutMs);
610
- if (!o)
822
+ const r = await this.waitForAdapter(this.readerId, a?.timeoutMs);
823
+ if (!r)
611
824
  return {
612
825
  ok: !1,
613
826
  requestId: "",
@@ -616,45 +829,45 @@ class Ce {
616
829
  message: "Editor adapter is not available."
617
830
  }
618
831
  };
619
- const a = {
620
- protocol: be,
621
- version: fe,
622
- requestId: ye(),
832
+ const s = {
833
+ protocol: J,
834
+ version: Z,
835
+ requestId: Ue(),
623
836
  readerId: this.readerId,
624
- tool: t,
837
+ tool: n,
625
838
  method: e,
626
839
  params: i
627
840
  };
628
841
  return this.withTimeout(
629
- o.request(a),
630
- a.requestId,
631
- r?.timeoutMs ?? this.requestTimeoutMs
842
+ r.request(s),
843
+ s.requestId,
844
+ a?.timeoutMs ?? this.requestTimeoutMs
632
845
  );
633
846
  }
634
847
  getCapabilities() {
635
848
  return this.readerId ? g()?.getCapabilities(this.readerId) ?? null : null;
636
849
  }
637
- async waitForAdapter(t, e = this.readyTimeoutMs) {
850
+ async waitForAdapter(n, e = this.readyTimeoutMs) {
638
851
  const i = g();
639
- return i?.getCapabilities(t) ? i : new Promise((r) => {
640
- let o;
641
- const a = () => {
642
- o && clearTimeout(o), globalThis.removeEventListener(C, s);
643
- }, s = (l) => {
644
- if ((l instanceof CustomEvent ? l.detail : void 0)?.readerId !== t)
852
+ return i?.getCapabilities(n) ? i : new Promise((a) => {
853
+ let r;
854
+ const s = () => {
855
+ r && clearTimeout(r), globalThis.removeEventListener(R, o);
856
+ }, o = (l) => {
857
+ if ((l instanceof CustomEvent ? l.detail : void 0)?.readerId !== n)
645
858
  return;
646
859
  const d = g();
647
- a(), r(d ?? null);
860
+ s(), a(d ?? null);
648
861
  };
649
- globalThis.addEventListener(C, s), o = setTimeout(() => {
650
- a(), r(g()?.getCapabilities(t) ? g() : null);
862
+ globalThis.addEventListener(R, o), r = setTimeout(() => {
863
+ s(), a(g()?.getCapabilities(n) ? g() : null);
651
864
  }, e);
652
865
  });
653
866
  }
654
- async withTimeout(t, e, i) {
655
- return new Promise((r) => {
656
- const o = setTimeout(() => {
657
- r({
867
+ async withTimeout(n, e, i) {
868
+ return new Promise((a) => {
869
+ const r = setTimeout(() => {
870
+ a({
658
871
  ok: !1,
659
872
  requestId: e,
660
873
  error: {
@@ -663,60 +876,59 @@ class Ce {
663
876
  }
664
877
  });
665
878
  }, i);
666
- t.then((a) => r(a)).catch((a) => {
667
- r({
879
+ n.then((s) => a(s)).catch((s) => {
880
+ a({
668
881
  ok: !1,
669
882
  requestId: e,
670
883
  error: {
671
884
  code: "EXECUTION_FAILED",
672
- message: a instanceof Error ? a.message : String(a)
885
+ message: s instanceof Error ? s.message : String(s)
673
886
  }
674
887
  });
675
888
  }).finally(() => {
676
- clearTimeout(o);
889
+ clearTimeout(r);
677
890
  });
678
891
  });
679
892
  }
680
893
  }
681
- const A = {
894
+ const P = {
682
895
  annotationEnabled: !1,
683
896
  documentModified: !1,
684
897
  documentOpened: !1,
685
- extensionState: "disconnected",
686
898
  pageCount: 0,
687
899
  pageIndex: 1,
688
900
  pageMode: 0,
689
901
  zoomLevel: 100
690
902
  };
691
- class Pe {
903
+ class Be {
692
904
  constructor() {
693
- this.state = { ...A };
905
+ this.state = { ...P };
694
906
  }
695
907
  reset() {
696
- this.state = { ...A };
908
+ this.state = { ...P };
697
909
  }
698
- update(t) {
699
- t && (this.state = {
910
+ update(n) {
911
+ n && (this.state = {
700
912
  ...this.state,
701
- ...t
913
+ ...n
702
914
  });
703
915
  }
704
- setDocumentOpened(t) {
916
+ setDocumentOpened(n) {
705
917
  this.state = {
706
918
  ...this.state,
707
- documentOpened: t
919
+ documentOpened: n
708
920
  };
709
921
  }
710
922
  snapshot() {
711
923
  return { ...this.state };
712
924
  }
713
925
  }
714
- class Ae {
926
+ class Ve {
715
927
  constructor() {
716
- this.annotationEvents = [], this.annotationPersist = [], this.annotationRetrieve = [], this.digitalAnnotationRetrieve = [], this.digitalSignatureParse = [], this.digitalSignatureRetrieve = [], this.documentClosed = [], this.documentOpened = [], this.documentSaved = [], this.extensionStateChanged = [], this.pageChange = [], this.pageModeChange = [];
928
+ this.annotationEvents = [], this.annotationPersist = [], this.annotationRetrieve = [], this.digitalAnnotationRetrieve = [], this.digitalSign = [], this.digitalSignatureParse = [], this.digitalSignatureRetrieve = [], this.documentClosed = [], this.documentOpened = [], this.documentSaved = [], this.pageChange = [], this.pageModeChange = [], this.signServerAuth = [];
717
929
  }
718
- emit(t, e) {
719
- switch (t) {
930
+ emit(n, e) {
931
+ switch (n) {
720
932
  case "documentOpened":
721
933
  case "documentLoaded":
722
934
  this.documentOpened.forEach((i) => i("ok", ""));
@@ -730,19 +942,19 @@ class Ae {
730
942
  case "pageChange": {
731
943
  const i = e;
732
944
  this.pageChange.forEach(
733
- (r) => r(i.pageIndex ?? 1, i.pageCount ?? 0)
945
+ (a) => a(i.pageIndex ?? 1, i.pageCount ?? 0)
734
946
  );
735
947
  return;
736
948
  }
737
949
  case "pageModeChange": {
738
950
  const i = e;
739
- this.pageModeChange.forEach((r) => r(i.pageMode ?? 0));
951
+ this.pageModeChange.forEach((a) => a(i.pageMode ?? 0));
740
952
  return;
741
953
  }
742
954
  case "annotationEvent": {
743
955
  const i = e;
744
956
  this.annotationEvents.forEach(
745
- (r) => r(i.event ?? "annotationEvent", i.payload)
957
+ (a) => a(i.event ?? "annotationEvent", i.payload)
746
958
  );
747
959
  return;
748
960
  }
@@ -757,6 +969,9 @@ class Ae {
757
969
  (i) => i(Array.isArray(e) ? e : [])
758
970
  );
759
971
  return;
972
+ case "digitalSign":
973
+ this.digitalSign.forEach((i) => i(e));
974
+ return;
760
975
  case "digitalSignatureRetrieve":
761
976
  this.digitalSignatureRetrieve.forEach(
762
977
  (i) => i(Array.isArray(e) ? e : [])
@@ -767,105 +982,80 @@ class Ae {
767
982
  (i) => i(Array.isArray(e) ? e : [])
768
983
  );
769
984
  return;
770
- case "extensionStateChanged": {
771
- const i = e;
772
- this.extensionStateChanged.forEach(
773
- (r) => r(i.state ?? "disconnected")
774
- );
985
+ case "signServerAuth":
986
+ this.signServerAuth.forEach((i) => i(e));
775
987
  return;
776
- }
777
988
  default:
778
989
  return;
779
990
  }
780
991
  }
781
992
  }
782
- const De = [
993
+ const Ke = [
783
994
  "documentLoaded",
784
995
  "documentStateChange",
785
996
  "documentError"
786
- ], Me = "readerReady", Ie = "readerUnload", v = "readerError", we = () => typeof globalThis.crypto?.randomUUID == "function" ? globalThis.crypto.randomUUID() : `rhc-reader-${Date.now()}-${Math.random().toString(36).slice(2)}`, D = (n, t) => ({
787
- appUrl: t?.appUrl ?? null,
788
- configuration: t,
789
- element: n
790
- }), _e = (n) => {
791
- if (typeof n == "string") {
792
- const t = document.getElementById(n);
793
- if (!t)
794
- throw new Error(`Reader container "${n}" was not found.`);
795
- if (!(t instanceof HTMLDivElement))
796
- throw new Error(`Reader container "${n}" must be a div element.`);
797
- return t;
997
+ ], Ge = "readerReady", He = "readerUnload", v = "readerError", qe = () => typeof globalThis.crypto?.randomUUID == "function" ? globalThis.crypto.randomUUID() : `rhc-reader-${Date.now()}-${Math.random().toString(36).slice(2)}`, D = (t, n) => ({
998
+ appUrl: n?.appUrl ?? null,
999
+ configuration: n,
1000
+ element: t
1001
+ }), Qe = (t) => {
1002
+ if (typeof t == "string") {
1003
+ const n = document.getElementById(t);
1004
+ if (!n)
1005
+ throw new Error(`Reader container "${t}" was not found.`);
1006
+ if (!(n instanceof HTMLDivElement))
1007
+ throw new Error(`Reader container "${t}" must be a div element.`);
1008
+ return n;
798
1009
  }
799
- if (!(n instanceof HTMLDivElement))
1010
+ if (!(t instanceof HTMLDivElement))
800
1011
  throw new Error("Reader container must be a div element.");
801
- return n;
802
- }, Fe = () => {
803
- const n = typeof globalThis.matchMedia == "function";
804
- return (n ? globalThis.matchMedia("(prefers-contrast: more)").matches : !1) ? "high-contrast" : (n ? globalThis.matchMedia("(prefers-color-scheme: dark)").matches : !1) ? "dark" : "light";
805
- }, M = (n, t) => {
806
- const e = n;
1012
+ return t;
1013
+ }, ze = () => {
1014
+ const t = typeof globalThis.matchMedia == "function";
1015
+ return (t ? globalThis.matchMedia("(prefers-contrast: more)").matches : !1) ? "high-contrast" : (t ? globalThis.matchMedia("(prefers-color-scheme: dark)").matches : !1) ? "dark" : "light";
1016
+ }, C = (t, n) => {
1017
+ const e = t;
807
1018
  if (typeof e.addEventListener == "function") {
808
- e.addEventListener("change", t);
1019
+ e.addEventListener("change", n);
809
1020
  return;
810
1021
  }
811
- typeof e.addListener == "function" && e.addListener(t);
812
- }, I = (n, t) => {
813
- const e = n;
1022
+ typeof e.addListener == "function" && e.addListener(n);
1023
+ }, I = (t, n) => {
1024
+ const e = t;
814
1025
  if (typeof e.removeEventListener == "function") {
815
- e.removeEventListener("change", t);
1026
+ e.removeEventListener("change", n);
816
1027
  return;
817
1028
  }
818
- typeof e.removeListener == "function" && e.removeListener(t);
819
- }, Oe = (n, t) => {
820
- t.style && (n.style.cssText = t.style), n.style.display || (n.style.display = "block"), n.style.width ? t.width && (n.style.width = t.width) : n.style.width = t.width ?? "100%", n.style.height ? t.height && (n.style.height = t.height) : n.style.height = t.height ?? "100%";
821
- }, Le = (n, t) => {
822
- const e = t.theme;
1029
+ typeof e.removeListener == "function" && e.removeListener(n);
1030
+ }, We = (t, n) => {
1031
+ n.style && (t.style.cssText = n.style), t.style.display || (t.style.display = "block"), t.style.width ? n.width && (t.style.width = n.width) : t.style.width = n.width ?? "100%", t.style.height ? n.height && (t.style.height = n.height) : t.style.height = n.height ?? "100%";
1032
+ }, $e = (t, n) => {
1033
+ const e = n.theme;
823
1034
  if (!e)
824
- return n.removeAttribute("theme"), null;
1035
+ return t.removeAttribute("theme"), null;
825
1036
  if (e !== "auto")
826
- return n.setAttribute("theme", e), null;
1037
+ return t.setAttribute("theme", e), null;
827
1038
  const i = () => {
828
- n.setAttribute("theme", Fe());
1039
+ t.setAttribute("theme", ze());
829
1040
  };
830
1041
  if (i(), typeof globalThis.matchMedia != "function")
831
1042
  return null;
832
- const r = globalThis.matchMedia("(prefers-color-scheme: dark)"), o = globalThis.matchMedia("(prefers-contrast: more)"), a = () => {
1043
+ const a = globalThis.matchMedia("(prefers-color-scheme: dark)"), r = globalThis.matchMedia("(prefers-contrast: more)"), s = () => {
833
1044
  i();
834
1045
  };
835
- return M(r, a), M(o, a), () => {
836
- I(r, a), I(o, a);
1046
+ return C(a, s), C(r, s), () => {
1047
+ I(a, s), I(r, s);
837
1048
  };
838
1049
  };
839
- class Ue {
840
- constructor(t) {
841
- this.bridge = new Ce(), this.callbacks = new Ae(), this.readerState = new Pe(), this.bridgeToolContext = {
1050
+ class Ye {
1051
+ constructor(n) {
1052
+ this.bridge = new xe(), this.callbacks = new Ve(), this.readerState = new Be(), this.bridgeToolContext = {
842
1053
  bridge: this.bridge,
843
1054
  callbacks: this.callbacks,
844
1055
  debug: () => this.debugEnabled,
845
1056
  onAsyncError: (e) => this.reportAdapterError(e),
846
1057
  state: this.readerState
847
- }, this.documentTool = new W(this.bridgeToolContext), this.uiTool = new ce(this.bridgeToolContext), this.pageTool = new Z(this.bridgeToolContext), this.findTool = new j(this.bridgeToolContext), this.signServerTool = u(
848
- "signServer",
849
- this.bridgeToolContext
850
- ), this.digitalSignTool = u(
851
- "digitalSign",
852
- this.bridgeToolContext
853
- ), this.reviewTool = u(
854
- "review",
855
- this.bridgeToolContext
856
- ), this.ekeyTool = u(
857
- "ekey",
858
- this.bridgeToolContext
859
- ), this.symbologyTool = u(
860
- "symbology",
861
- this.bridgeToolContext
862
- ), this.annotationTool = this.createAnnotationTool(), this.templateSignTool = u(
863
- "templateSign",
864
- this.bridgeToolContext
865
- ), this.pdfFormFiller = new te(this.bridgeToolContext), this.extensionTool = this.createExtensionTool(), this.networkingTool = new X(this.bridgeToolContext), this.cryptoTool = u(
866
- "crypto",
867
- this.bridgeToolContext
868
- ), this.readyCallbacks = [], this.unloadCallbacks = [], this.debugEnabled = !1, this.isReady = !1, this.removed = !1, this.mountToken = 0, this.hostContainer = null, this.readerElement = null, this.readerId = null, this.normalizedConfiguration = null, this.nativeEventCleanupCallbacks = [], this.themeCleanup = null, this.enableDebug = (e) => {
1058
+ }, this.documentTool = new ne(this.bridgeToolContext), this.uiTool = new De(this.bridgeToolContext), this.pageTool = new de(this.bridgeToolContext), this.findTool = new ae(this.bridgeToolContext), this.signServerTool = new Te(this.bridgeToolContext), this.digitalSignTool = new X(this.bridgeToolContext), this.symbologyTool = new Ae(this.bridgeToolContext), this.annotationTool = new W(this.bridgeToolContext), this.templateSignTool = new Ee(this.bridgeToolContext), this.pdfFormFiller = new ce(this.bridgeToolContext), this.networkingTool = new se(this.bridgeToolContext), this.cryptoTool = new Y(this.bridgeToolContext), this.readyCallbacks = [], this.unloadCallbacks = [], this.debugEnabled = !1, this.isReady = !1, this.removed = !1, this.mountToken = 0, this.hostContainer = null, this.readerElement = null, this.readerId = null, this.normalizedConfiguration = null, this.nativeEventCleanupCallbacks = [], this.themeCleanup = null, this.enableDebug = (e) => {
869
1059
  this.debugEnabled = e;
870
1060
  }, this.changeLanguage = () => {
871
1061
  }, this.setLicense = (e, i) => {
@@ -892,50 +1082,50 @@ class Ue {
892
1082
  this.unloadCallbacks.push(e);
893
1083
  }, this.setReaderEventListener = (e) => {
894
1084
  this.readerEventListener = e;
895
- }, this.embedReader = (e, i, r) => {
896
- const o = _e(e), a = x(i);
897
- B(a);
898
- const s = me(a, r), l = this.mountToken + 1;
899
- this.removeReader(), this.mountToken = l, this.removed = !1, this.hostContainer = o, this.normalizedConfiguration = s, this.mountReader(o, s, l);
1085
+ }, this.embedReader = (e, i, a) => {
1086
+ const r = Qe(e), s = x(i);
1087
+ V(s);
1088
+ const o = we(s, a), l = this.mountToken + 1;
1089
+ this.removeReader(), this.mountToken = l, this.removed = !1, this.hostContainer = r, this.normalizedConfiguration = o, this.mountReader(r, o, l);
900
1090
  }, this.removeReader = () => {
901
1091
  const e = !!(this.readerElement || this.hostContainer);
902
1092
  if (this.mountToken += 1, this.cleanupNativeEventForwarders(), this.cleanupThemeBinding(), this.readerElement?.parentNode && this.readerElement.parentNode.removeChild(this.readerElement), this.readerElement = null, this.readerId = null, this.bridge.setReaderId(null), this.readerState.reset(), this.hostContainer = null, this.normalizedConfiguration = null, this.isReady = !1, this.removed = !0, !e)
903
1093
  return;
904
1094
  const i = D(null, null);
905
- this.emitReaderEvent(Ie, i), this.unloadCallbacks.forEach((r) => r());
906
- }, this.getDocumentTool = () => this.documentTool, this.getUITool = () => this.uiTool, this.getPageTool = () => this.pageTool, this.getFindTool = () => this.findTool, this.getSignServerTool = () => this.signServerTool, this.getDigitalSignTool = () => this.digitalSignTool, this.getReviewTool = () => this.reviewTool, this.getEkeyTool = () => this.ekeyTool, this.getSymbologyTool = () => this.symbologyTool, this.getAnnotationTool = () => this.annotationTool, this.getTemplateSignTool = () => this.templateSignTool, this.getPdfFormFiller = () => this.pdfFormFiller, this.getExtensionTool = () => this.extensionTool, this.getNetworkingTool = () => this.networkingTool, this.getCryptoTool = () => this.cryptoTool, this.createDigitalSignOptions = () => new se(), this.createKVField = (e, i, r) => new ae(e, i, r), this.mountReader = async (e, i, r) => {
1095
+ this.emitReaderEvent(He, i), this.unloadCallbacks.forEach((a) => a());
1096
+ }, this.getDocumentTool = () => this.documentTool, this.getUITool = () => this.uiTool, this.getPageTool = () => this.pageTool, this.getFindTool = () => this.findTool, this.getSignServerTool = () => this.signServerTool, this.getDigitalSignTool = () => this.digitalSignTool, this.getSymbologyTool = () => this.symbologyTool, this.getAnnotationTool = () => this.annotationTool, this.getTemplateSignTool = () => this.templateSignTool, this.getPdfFormFiller = () => this.pdfFormFiller, this.getNetworkingTool = () => this.networkingTool, this.getCryptoTool = () => this.cryptoTool, this.createDigitalSignOptions = () => new fe(), this.createKVField = (e, i, a) => new Se(e, i, a), this.mountReader = async (e, i, a) => {
907
1097
  try {
908
- if (await ke(i.appUrl), this.mountToken !== r)
1098
+ if (await _e(i.appUrl), this.mountToken !== a)
909
1099
  return;
910
- const o = document.createElement(h), a = we();
911
- if (o.setAttribute(Ee, a), this.readerId = a, this.bridge.setReaderId(a), Oe(o, i), this.themeCleanup = Le(o, i), this.bindNativeReaderEvents(o), e.replaceChildren(o), this.readerElement = o, await Promise.resolve(), this.mountToken !== r)
1100
+ const r = document.createElement(u), s = qe();
1101
+ if (r.setAttribute(N, s), this.readerId = s, this.bridge.setReaderId(s), We(r, i), this.themeCleanup = $e(r, i), this.bindNativeReaderEvents(r), e.replaceChildren(r), this.readerElement = r, await Promise.resolve(), this.mountToken !== a)
912
1102
  return;
913
1103
  i.scrollIntoView && typeof e.scrollIntoView == "function" && e.scrollIntoView({ behavior: "smooth", block: "nearest" }), this.isReady = !0;
914
- const s = D(o, i);
915
- this.emitReaderEvent(Me, s), this.readyCallbacks.forEach((l) => l());
916
- } catch (o) {
917
- if (this.mountToken !== r)
1104
+ const o = D(r, i);
1105
+ this.emitReaderEvent(Ge, o), this.readyCallbacks.forEach((l) => l());
1106
+ } catch (r) {
1107
+ if (this.mountToken !== a)
918
1108
  return;
919
- this.reportReaderError(o);
1109
+ this.reportReaderError(r);
920
1110
  }
921
1111
  }, this.bindNativeReaderEvents = (e) => {
922
1112
  this.cleanupNativeEventForwarders();
923
- const i = (r) => {
924
- const o = r instanceof CustomEvent ? r.detail : null;
925
- !o || o.readerId !== this.readerId || (this.readerState.update(o.statePatch), this.callbacks.emit(o.event, o.payload), this.emitReaderEvent(o.event, o.payload));
1113
+ const i = (a) => {
1114
+ const r = a instanceof CustomEvent ? a.detail : null;
1115
+ !r || r.readerId !== this.readerId || (this.readerState.update(r.statePatch), this.callbacks.emit(r.event, r.payload), this.emitReaderEvent(r.event, r.payload));
926
1116
  };
927
- e.addEventListener(P, i), this.nativeEventCleanupCallbacks.push(() => {
1117
+ e.addEventListener(E, i), this.nativeEventCleanupCallbacks.push(() => {
928
1118
  e.removeEventListener(
929
- P,
1119
+ E,
930
1120
  i
931
1121
  );
932
- }), De.forEach((r) => {
933
- const o = (a) => {
934
- const s = a instanceof CustomEvent ? a.detail : a;
935
- r === "documentLoaded" && this.readerState.setDocumentOpened(!0), this.emitReaderEvent(r, s), r === "documentError" && this.emitReaderEvent(v, s);
1122
+ }), Ke.forEach((a) => {
1123
+ const r = (s) => {
1124
+ const o = s instanceof CustomEvent ? s.detail : s;
1125
+ a === "documentLoaded" && this.readerState.setDocumentOpened(!0), this.emitReaderEvent(a, o), a === "documentError" && this.emitReaderEvent(v, o);
936
1126
  };
937
- e.addEventListener(r, o), this.nativeEventCleanupCallbacks.push(() => {
938
- e.removeEventListener(r, o);
1127
+ e.addEventListener(a, r), this.nativeEventCleanupCallbacks.push(() => {
1128
+ e.removeEventListener(a, r);
939
1129
  });
940
1130
  });
941
1131
  }, this.cleanupNativeEventForwarders = () => {
@@ -949,113 +1139,37 @@ class Ue {
949
1139
  }, this.reportAdapterError = (e) => {
950
1140
  this.debugEnabled && console.error("[RHC Office SDK] Adapter command failed", e), this.emitReaderEvent(v, e);
951
1141
  }, this.bridge.configureTimeouts({
952
- readyTimeoutMs: t?.adapterReadyTimeoutMs,
953
- requestTimeoutMs: t?.adapterRequestTimeoutMs
1142
+ readyTimeoutMs: n?.adapterReadyTimeoutMs,
1143
+ requestTimeoutMs: n?.adapterRequestTimeoutMs
954
1144
  });
955
1145
  }
956
- createAnnotationTool() {
957
- return c(
958
- "annotation",
959
- {
960
- addAnnotationEventCallback: {
961
- kind: "callbackRegister",
962
- callback: (t, e) => {
963
- const i = e[0];
964
- typeof i == "function" && t.annotationEvents.push(i);
965
- }
966
- },
967
- addAnnotationPersistCallback: {
968
- kind: "callbackRegister",
969
- callback: (t, e) => {
970
- const i = e[0];
971
- typeof i == "function" && t.annotationPersist.push(i);
972
- }
973
- },
974
- addAnnotationRetrieveCallback: {
975
- kind: "callbackRegister",
976
- callback: (t, e) => {
977
- const i = e[0];
978
- typeof i == "function" && t.annotationRetrieve.push(i);
979
- }
980
- },
981
- addDigitalAnnotationRetrieveCallback: {
982
- kind: "callbackRegister",
983
- callback: (t, e) => {
984
- const i = e[0];
985
- typeof i == "function" && t.digitalAnnotationRetrieve.push(
986
- i
987
- );
988
- }
989
- },
990
- isInAnnotationMode: {
991
- kind: "stateGetter",
992
- state: (t) => t.annotationEnabled
993
- },
994
- getAnnotations: { kind: "stateGetter", state: () => [] },
995
- getAnnotationsCount: { kind: "stateGetter", state: () => 0 },
996
- queryAnnotationsBy: { kind: "stateGetter", state: () => [] },
997
- setToolSource: { kind: "command" },
998
- openAnnotationView: { kind: "command" },
999
- closeAnnotationView: { kind: "command" },
1000
- openTextAnnotationView: { kind: "command" },
1001
- setTextAnnotationFontColor: { kind: "command" },
1002
- setTextAnnotationFontSize: { kind: "command" },
1003
- closeTextAnnotationView: { kind: "command" },
1004
- createTextAnnotation: { kind: "command" },
1005
- setPersistToDocument: { kind: "command" },
1006
- saveAnnotations: { kind: "callbackQuery" },
1007
- saveTextAnnotations: { kind: "command" },
1008
- clearAnnotations: { kind: "command" },
1009
- clearTextAnnotations: { kind: "command" },
1010
- undoAnnotation: { kind: "command" },
1011
- redoAnnotation: { kind: "command" },
1012
- selectAnnotationTool: { kind: "command" },
1013
- showAnnotationColorPicker: { kind: "command" },
1014
- setAnnotationPenType: { kind: "command" },
1015
- appendAnnotations: { kind: "callbackQuery" },
1016
- batchAppendAnnotations: { kind: "callbackQuery" },
1017
- setAnnotationPenColor: { kind: "command" },
1018
- setAnnotationPenWidth: { kind: "command" },
1019
- setAnnotationPenThickness: { kind: "command" },
1020
- enableAnnotationsInfoView: { kind: "command" },
1021
- enableAnnotationsDeletion: { kind: "command" },
1022
- enableAnnotationsDeletionOnlyByAuthor: { kind: "command" },
1023
- listDigitalStamps: { kind: "command" },
1024
- listAnnotations: { kind: "command" },
1025
- deleteAnnotationsBy: { kind: "command" },
1026
- deleteAnnotationsById: { kind: "command" },
1027
- addDigitalAnnotation: { kind: "command" },
1028
- addInkAnnotationCallback: { kind: "callbackRegister" }
1029
- },
1030
- this.bridgeToolContext
1031
- );
1032
- }
1033
- createExtensionTool() {
1034
- return c(
1035
- "extension",
1036
- {
1037
- addExtensionStateChangedCallback: {
1038
- kind: "callbackRegister",
1039
- callback: (t, e) => {
1040
- const i = e[0];
1041
- typeof i == "function" && t.extensionStateChanged.push(i);
1042
- }
1043
- }
1044
- },
1045
- this.bridgeToolContext
1046
- );
1047
- }
1048
1146
  }
1049
- const He = (n) => new Ue(n);
1147
+ const it = (t) => new Ye(t);
1050
1148
  export {
1051
- Ge as DIGITAL_SIGN_DEFAULTS,
1052
- Ue as DocumentSDK,
1149
+ W as AnnotationToolImpl,
1150
+ Y as CryptoToolImpl,
1151
+ tt as DIGITAL_SIGN_DEFAULTS,
1152
+ fe as DigitalSignOptions,
1153
+ X as DigitalSignToolImpl,
1154
+ Ye as DocumentSDK,
1155
+ ne as DocumentToolImpl,
1156
+ ae as FindToolImpl,
1157
+ Se as KVField,
1158
+ se as NetworkingToolImpl,
1159
+ de as PageToolImpl,
1160
+ ce as PdfFormFillerImpl,
1161
+ ue as SDKPhase1NotImplementedError,
1162
+ Te as SignServerToolImpl,
1163
+ Ae as SymbologyToolImpl,
1164
+ Ee as TemplateSignToolImpl,
1165
+ De as UIToolImpl,
1053
1166
  K as WatermarkDisplay,
1054
- He as createNewDocumentSdk,
1055
- Ne as getDigitalSignEnvironment,
1056
- xe as initializeDigitalSignEnvironment,
1057
- Be as patchDigitalSignEnvironment,
1058
- Ke as resetDigitalSignEnvironment,
1059
- Ve as setDigitalSignEnvironment
1167
+ it as createNewDocumentSdk,
1168
+ nt as createPhase1ToolPlaceholder,
1169
+ je as getDigitalSignEnvironment,
1170
+ Xe as initializeDigitalSignEnvironment,
1171
+ Ze as patchDigitalSignEnvironment,
1172
+ et as resetDigitalSignEnvironment,
1173
+ Je as setDigitalSignEnvironment
1060
1174
  };
1061
1175
  //# sourceMappingURL=index.js.map