@signosoft/signpad-js 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/dist/index.d.ts +6 -2
- package/dist/signosoft-signpad.js +97 -92
- package/dist/signosoft-signpad.umd.cjs +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -680,6 +680,8 @@ The complete list of keys that can be translated is maintained in `src/i18n/en.j
|
|
|
680
680
|
| `INVALID_LICENSE_KEY` | Invalid license key. |
|
|
681
681
|
| `READY_TO_CONNECT` | Ready to connect. |
|
|
682
682
|
| `SIGNPAD_DETECTED` | Signpad detected. Click 'Connect Signpad' to begin. |
|
|
683
|
+
| `READY_TO_SIGN_MOUSE` | Ready to sign. Use your mouse. |
|
|
684
|
+
| `READY_TO_SIGN_PHYSICAL` | Ready to sign. Use the device pen. |
|
|
683
685
|
|
|
684
686
|
If you add any new keys, mirror them in every language file you provide to guarantee they fall back gracefully to English.
|
|
685
687
|
|
|
@@ -704,6 +706,7 @@ Standard event listeners triggered _after_ specific actions. Useful for observin
|
|
|
704
706
|
| Callback | Payload | Description |
|
|
705
707
|
| :------------- | :----------------------------------------------- | :------------------------------------------------------------------------------------------------- |
|
|
706
708
|
| `onPen` | `event: CustomEvent<IPenData>` | Dispatched when a device or mouse fallback are in contact with component or signature pad display. |
|
|
709
|
+
| `onConnecting` | `event: CustomEvent<void>` | Dispatched when a device is in loading state. |
|
|
707
710
|
| `onConnect` | `event: CustomEvent<{ deviceInfo: any }>` | Dispatched when a device or mouse fallback connects. |
|
|
708
711
|
| `onDisconnect` | `event: CustomEvent<void>` | Dispatched when the hardware connection is closed. |
|
|
709
712
|
| `onOk` | `event: CustomEvent<ISignatureConfirmationData>` | Dispatched when signature is confirmed. |
|
|
@@ -745,7 +748,7 @@ The following methods are available on the component instance to control the sig
|
|
|
745
748
|
|
|
746
749
|
| Method | Returns | Description |
|
|
747
750
|
| :--------------- | :------------------------------------------------- | :------------------------------------------------------------------------------- |
|
|
748
|
-
| `connect()` | `Promise<
|
|
751
|
+
| `connect()` | `Promise<void>` | Connects device to component |
|
|
749
752
|
| `disconnect()` | `Promise<void>` | Disconnects device from component |
|
|
750
753
|
| `startSigning()` | `Promise<void>` | Initializes a new signing session on the canvas and hardware. |
|
|
751
754
|
| `stopSigning()` | `Promise<any>` | Low-level session stop that returns the raw driver payload. |
|
|
@@ -755,18 +758,15 @@ The following methods are available on the component instance to control the sig
|
|
|
755
758
|
|
|
756
759
|
---
|
|
757
760
|
|
|
758
|
-
#### 📜 `connect(
|
|
761
|
+
#### 📜 `connect()`
|
|
759
762
|
|
|
760
|
-
This is the primary method to start using the Signpad. Because it uses the **WebHID API**,
|
|
763
|
+
This is the primary method to start using the Signpad. Because it uses the **WebHID API**, this must be triggered by a **user gesture** (like a button click) to satisfy browser security requirements.
|
|
761
764
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
- **`autoConnect`** (`boolean`): If set to `true`, the browser will attempt to reconnect to a previously paired and authorized device without opening the device selection dialog from WebHID.
|
|
765
|
-
- **`allowFallback`** (`boolean`): If `true` and no physical device is found or connected, the component will automatically transition to **Mouse/Touch mode**, allowing the user to sign using their cursor.
|
|
765
|
+
The method first attempts to silently reconnect to a previously authorized device. If that fails, it opens the browser's device selection dialog and, if no physical device is selected, falls back to mouse/touch mode automatically.
|
|
766
766
|
|
|
767
767
|
**Returns:**
|
|
768
768
|
|
|
769
|
-
- A `Promise<
|
|
769
|
+
- A `Promise<void>` that resolves once the connection attempt (or fallback) is complete.
|
|
770
770
|
|
|
771
771
|
#### 📜 `disconnect()`
|
|
772
772
|
|
|
@@ -782,8 +782,8 @@ Safely terminates the communication channel with the signature tablet.
|
|
|
782
782
|
|
|
783
783
|
#### 💡 Best Practices
|
|
784
784
|
|
|
785
|
-
- **Initial Connection:** Always call `connect(
|
|
786
|
-
- **Auto-Reconnect:**
|
|
785
|
+
- **Initial Connection:** Always call `connect()` from a click handler so the user can select their device from the browser list.
|
|
786
|
+
- **Auto-Reconnect:** Use `autoconnectOptions.autoConnect: true` in the config to silently reconnect to a previously authorized device on startup without a user gesture.
|
|
787
787
|
- **Cleanup:** It is good practice to call `disconnect()` when the component is being destroyed or the user navigates away from the signing page to free up the USB port.
|
|
788
788
|
|
|
789
789
|
#### 📜 `startSigning(options?: IDrawingOptions)`
|
package/dist/index.d.ts
CHANGED
|
@@ -338,6 +338,7 @@ export declare interface IEventCallbacks {
|
|
|
338
338
|
onConnect?: (event: CustomEvent<{
|
|
339
339
|
deviceInfo: any;
|
|
340
340
|
}>) => void;
|
|
341
|
+
onConnecting?: (event: CustomEvent<void>) => void;
|
|
341
342
|
onDisconnect?: (event: CustomEvent<void>) => void;
|
|
342
343
|
onPen?: (event: CustomEvent<IPenData_2>) => void;
|
|
343
344
|
onOk?: (event: CustomEvent<ISignatureConfirmationData>) => void;
|
|
@@ -825,7 +826,8 @@ export declare enum SignpadEventType {
|
|
|
825
826
|
SIGN_CANCEL = "sign-cancel",
|
|
826
827
|
SIGN_ERROR = "sign-error",
|
|
827
828
|
SIGN_CONNECT = "sign-connect",
|
|
828
|
-
SIGN_DISCONNECT = "sign-disconnect"
|
|
829
|
+
SIGN_DISCONNECT = "sign-disconnect",
|
|
830
|
+
SIGN_CONNECTING = "sign-connecting"
|
|
829
831
|
}
|
|
830
832
|
|
|
831
833
|
export declare enum SignpadMessage {
|
|
@@ -846,7 +848,9 @@ export declare enum SignpadMessage {
|
|
|
846
848
|
SIGNPAD_DISCONNECTED = "SIGNPAD_DISCONNECTED",
|
|
847
849
|
INVALID_LICENSE_KEY = "INVALID_LICENSE_KEY",
|
|
848
850
|
READY_TO_CONNECT = "READY_TO_CONNECT",
|
|
849
|
-
SIGNPAD_DETECTED = "SIGNPAD_DETECTED"
|
|
851
|
+
SIGNPAD_DETECTED = "SIGNPAD_DETECTED",
|
|
852
|
+
READY_TO_SIGN_MOUSE = "READY_TO_SIGN_MOUSE",
|
|
853
|
+
READY_TO_SIGN_PHYSICAL = "READY_TO_SIGN_PHYSICAL"
|
|
850
854
|
}
|
|
851
855
|
|
|
852
856
|
export declare enum SignpadState {
|
|
@@ -282,7 +282,7 @@ function EC(Q, A) {
|
|
|
282
282
|
} });
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
|
-
var h = /* @__PURE__ */ ((Q) => (Q.INITIAL = "initial", Q.DISCONNECTED = "disconnected", Q.CONNECTING = "connecting", Q.WAITING_FOR_DEVICE_SELECTION = "waiting_for_device_selection", Q.CONNECTED_PHYSICAL = "connected_physical", Q.CONNECTED_MOUSE_FALLBACK = "connected_mouse_fallback", Q.SIGNING_ACTIVE = "signing_active", Q.PROCESSING_OK = "processing_ok", Q.PROCESSING_CLEAR = "processing_clear", Q.PROCESSING_CANCEL = "processing_cancel", Q.DISCONNECTING = "disconnecting", Q.ERROR = "error", Q))(h || {}),
|
|
285
|
+
var h = /* @__PURE__ */ ((Q) => (Q.INITIAL = "initial", Q.DISCONNECTED = "disconnected", Q.CONNECTING = "connecting", Q.WAITING_FOR_DEVICE_SELECTION = "waiting_for_device_selection", Q.CONNECTED_PHYSICAL = "connected_physical", Q.CONNECTED_MOUSE_FALLBACK = "connected_mouse_fallback", Q.SIGNING_ACTIVE = "signing_active", Q.PROCESSING_OK = "processing_ok", Q.PROCESSING_CLEAR = "processing_clear", Q.PROCESSING_CANCEL = "processing_cancel", Q.DISCONNECTING = "disconnecting", Q.ERROR = "error", Q))(h || {}), n = /* @__PURE__ */ ((Q) => (Q.SIGN_PEN = "sign-pen", Q.SIGN_OK = "sign-ok", Q.SIGN_CLEAR = "sign-clear", Q.SIGN_CANCEL = "sign-cancel", Q.SIGN_ERROR = "sign-error", Q.SIGN_CONNECT = "sign-connect", Q.SIGN_DISCONNECT = "sign-disconnect", Q.SIGN_CONNECTING = "sign-connecting", Q))(n || {}), iC = /* @__PURE__ */ ((Q) => (Q.OK = "OK", Q.CLEAR = "CLEAR", Q.CANCEL = "CANCEL", Q.CLEAR_SIGNATURE = "CLEAR_SIGNATURE", Q.DISCONNECT = "DISCONNECT", Q.CONNECT_SIGNPAD = "CONNECT_SIGNPAD", Q))(iC || {}), k = /* @__PURE__ */ ((Q) => (Q.AUTO_CONNECTING = "AUTO_CONNECTING", Q.CONNECTING_TO_DEVICE = "CONNECTING_TO_DEVICE", Q.REVERTING_TO_DEFAULT = "REVERTING_TO_DEFAULT", Q.DISCONNECTING_DEVICE = "DISCONNECTING_DEVICE", Q.COMPONENT_INITIALIZED = "COMPONENT_INITIALIZED", Q.TEXT_START_SIGNING = "TEXT_START_SIGNING", Q.TEXT_SIGN_WITH_PHYSICAL = "TEXT_SIGN_WITH_PHYSICAL", Q.TEXT_SIGN_WITH_MOUSE = "TEXT_SIGN_WITH_MOUSE", Q.TEXT_SIGN_GENERIC = "TEXT_SIGN_GENERIC", Q.TEXT_SIGNING_WITH_DEVICE = "TEXT_SIGNING_WITH_DEVICE", Q.NO_DEVICE_FOUND = "NO_DEVICE_FOUND", Q.CONNECTION_ERROR = "CONNECTION_ERROR", Q.ERROR_DISCONNECTION = "ERROR_DISCONNECTION", Q.ERROR_INSTANTIATING_DRIVER = "ERROR_INSTANTIATING_DRIVER", Q.SIGNPAD_DISCONNECTED = "SIGNPAD_DISCONNECTED", Q.INVALID_LICENSE_KEY = "INVALID_LICENSE_KEY", Q.READY_TO_CONNECT = "READY_TO_CONNECT", Q.SIGNPAD_DETECTED = "SIGNPAD_DETECTED", Q.READY_TO_SIGN_MOUSE = "READY_TO_SIGN_MOUSE", Q.READY_TO_SIGN_PHYSICAL = "READY_TO_SIGN_PHYSICAL", Q))(k || {}), P = /* @__PURE__ */ ((Q) => (Q.MOUSE = "MOUSE", Q.CONNECTED_UNKNOWN = "CONNECTED_UNKNOWN_DEVICE", Q))(P || {});
|
|
286
286
|
class oC {
|
|
287
287
|
constructor(A) {
|
|
288
288
|
this.component = A;
|
|
@@ -294,7 +294,7 @@ class oC {
|
|
|
294
294
|
*/
|
|
295
295
|
async handleClear() {
|
|
296
296
|
await this.executeAction(h.PROCESSING_CLEAR, async () => {
|
|
297
|
-
await this.component.connectionManager.clearSignature(), await this.component.config.actionHandlers?.handleClear?.(), this.component.dispatch(
|
|
297
|
+
await this.component.connectionManager.clearSignature(), await this.component.config.actionHandlers?.handleClear?.(), this.component.dispatch(n.SIGN_CLEAR);
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
@@ -304,7 +304,7 @@ class oC {
|
|
|
304
304
|
async handleOk() {
|
|
305
305
|
return await this.executeAction(h.PROCESSING_OK, async () => {
|
|
306
306
|
const A = await this.component.connectionManager.stopSigning();
|
|
307
|
-
return await this.component.config.actionHandlers?.handleOk?.(A), this.component.dispatch(
|
|
307
|
+
return await this.component.config.actionHandlers?.handleOk?.(A), this.component.dispatch(n.SIGN_OK, A), A;
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
310
|
/**
|
|
@@ -313,7 +313,7 @@ class oC {
|
|
|
313
313
|
*/
|
|
314
314
|
async handleCancel() {
|
|
315
315
|
await this.executeAction(h.PROCESSING_CANCEL, async () => {
|
|
316
|
-
await this.component.connectionManager.stopSigning(), await this.component.config.actionHandlers?.handleCancel?.(), this.component.dispatch(
|
|
316
|
+
await this.component.connectionManager.stopSigning(), await this.component.config.actionHandlers?.handleCancel?.(), this.component.dispatch(n.SIGN_CANCEL);
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
319
|
/**
|
|
@@ -499,7 +499,7 @@ const XA = class XA {
|
|
|
499
499
|
return E ? (await this.prepareSigningSession(), this.component.stateManager.transitionTo(
|
|
500
500
|
E.targetState,
|
|
501
501
|
E.statusMessageKey
|
|
502
|
-
), this.component.dispatch(
|
|
502
|
+
), this.component.dispatch(n.SIGN_CONNECT, {
|
|
503
503
|
deviceInfo: g.deviceInfo
|
|
504
504
|
}), !0) : (this.component.stateManager.transitionTo(
|
|
505
505
|
h.DISCONNECTED,
|
|
@@ -651,7 +651,7 @@ const XA = class XA {
|
|
|
651
651
|
this.penDataToDispatch = A;
|
|
652
652
|
const I = performance.now();
|
|
653
653
|
I - this.lastPenDispatchTime > this.throttleDelayMs && (this.component.dispatch(
|
|
654
|
-
|
|
654
|
+
n.SIGN_PEN,
|
|
655
655
|
this.penDataToDispatch
|
|
656
656
|
), this.lastPenDispatchTime = I, this.penDataToDispatch = null);
|
|
657
657
|
}
|
|
@@ -828,7 +828,7 @@ class wC {
|
|
|
828
828
|
*/
|
|
829
829
|
transitionTo(A, I = "", g) {
|
|
830
830
|
const E = this.component.currentState;
|
|
831
|
-
E === A && this.component.statusMessage === I && !g || (this.component.setCurrentState(A), this.component.setStatusMessage(I), this.handleSideEffects(A, E), g && this.component.dispatch(
|
|
831
|
+
E === A && this.component.statusMessage === I && !g || (this.component.setCurrentState(A), this.component.setStatusMessage(I), this.handleSideEffects(A, E), A === h.CONNECTING && this.component.dispatch(n.SIGN_CONNECTING), g && this.component.dispatch(n.SIGN_ERROR, g));
|
|
832
832
|
}
|
|
833
833
|
/**
|
|
834
834
|
* Updates the internal drawing flag. Triggers a UI update if the value changes.
|
|
@@ -964,7 +964,7 @@ class SC {
|
|
|
964
964
|
return Number(I.toFixed(3));
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
|
-
const sC = "OK", aC = "Clear", yC = "Cancel", KC = "Clear signature", hC = "Disconnect", MC = "Connect Signpad", tC = "Mouse", GC = "Connected (Unknown Device)", RC = "Auto-connecting to device...", NC = "Connecting to your device...", kC = "Reverting to default input...", FC = "Disconnecting device...", JC = "Component initialized.", UC = "Connect your device.", cC = "Please sign using the device pen.", LC = "Please sign using your mouse.", eC = "Sign in the area above using mouse or pen.", YC = "Signing with {device}", nC = "No device found.", HC = "Connection error.", rC = "Error during disconnection.", qC = "Error instantiating driver.", lC = "Signpad disconnected.", dC = "Invalid license key.", fC = "Ready to connect.", pC = "Signpad detected. Click 'Connect Signpad' to begin.", xC = {
|
|
967
|
+
const sC = "OK", aC = "Clear", yC = "Cancel", KC = "Clear signature", hC = "Disconnect", MC = "Connect Signpad", tC = "Mouse", GC = "Connected (Unknown Device)", RC = "Auto-connecting to device...", NC = "Connecting to your device...", kC = "Reverting to default input...", FC = "Disconnecting device...", JC = "Component initialized.", UC = "Connect your device.", cC = "Please sign using the device pen.", LC = "Please sign using your mouse.", eC = "Sign in the area above using mouse or pen.", YC = "Signing with {device}", nC = "No device found.", HC = "Connection error.", rC = "Error during disconnection.", qC = "Error instantiating driver.", lC = "Signpad disconnected.", dC = "Invalid license key.", fC = "Ready to connect.", pC = "Signpad detected. Click 'Connect Signpad' to begin.", xC = "Ready to sign. Use your mouse.", OC = "Ready to sign. Use the device pen.", TC = {
|
|
968
968
|
OK: sC,
|
|
969
969
|
CLEAR: aC,
|
|
970
970
|
CANCEL: yC,
|
|
@@ -990,39 +990,43 @@ const sC = "OK", aC = "Clear", yC = "Cancel", KC = "Clear signature", hC = "Disc
|
|
|
990
990
|
SIGNPAD_DISCONNECTED: lC,
|
|
991
991
|
INVALID_LICENSE_KEY: dC,
|
|
992
992
|
READY_TO_CONNECT: fC,
|
|
993
|
-
SIGNPAD_DETECTED: pC
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
993
|
+
SIGNPAD_DETECTED: pC,
|
|
994
|
+
READY_TO_SIGN_MOUSE: xC,
|
|
995
|
+
READY_TO_SIGN_PHYSICAL: OC
|
|
996
|
+
}, jC = "OK", WC = "Smazat", bC = "Zrušit", mC = "Smazat podpis", uC = "Odpojit", ZC = "Připojit Signpad", XC = "Myš", PC = "Připojeno (neznámé zařízení)", VC = "Automatické připojování k zařízení...", zC = "Připojování k vašemu zařízení...", vC = "Přepínání na výchozí vstup...", _C = "Odpojování zařízení...", $C = "Komponenta byla inicializována.", AB = "Připojte své zařízení.", IB = "Podepište se perem zařízení.", gB = "Podepište se pomocí myši.", CB = "Podepište se v oblasti výše pomocí myši nebo pera.", BB = "Podepisování pomocí: {device}", QB = "Zařízení nebylo nalezeno.", EB = "Chyba připojení.", iB = "Chyba při odpojování.", oB = "Chyba při inicializaci ovladače.", DB = "Signpad byl odpojen.", wB = "Neplatný licenční klíč.", SB = "Připraveno k připojení.", sB = "Signpad byl nalezen. Klikněte na 'Připojit Signpad' pro spuštění.", aB = "Připraveno k podpisu. Použijte myš.", yB = "Připraveno k podpisu. Použijte pero zařízení.", KB = {
|
|
997
|
+
OK: jC,
|
|
998
|
+
CLEAR: WC,
|
|
999
|
+
CANCEL: bC,
|
|
1000
|
+
CLEAR_SIGNATURE: mC,
|
|
1001
|
+
DISCONNECT: uC,
|
|
1002
|
+
CONNECT_SIGNPAD: ZC,
|
|
1003
|
+
MOUSE: XC,
|
|
1004
|
+
CONNECTED_UNKNOWN_DEVICE: PC,
|
|
1005
|
+
AUTO_CONNECTING: VC,
|
|
1006
|
+
CONNECTING_TO_DEVICE: zC,
|
|
1007
|
+
REVERTING_TO_DEFAULT: vC,
|
|
1008
|
+
DISCONNECTING_DEVICE: _C,
|
|
1009
|
+
COMPONENT_INITIALIZED: $C,
|
|
1010
|
+
TEXT_START_SIGNING: AB,
|
|
1011
|
+
TEXT_SIGN_WITH_PHYSICAL: IB,
|
|
1012
|
+
TEXT_SIGN_WITH_MOUSE: gB,
|
|
1013
|
+
TEXT_SIGN_GENERIC: CB,
|
|
1014
|
+
TEXT_SIGNING_WITH_DEVICE: BB,
|
|
1015
|
+
NO_DEVICE_FOUND: QB,
|
|
1016
|
+
CONNECTION_ERROR: EB,
|
|
1017
|
+
ERROR_DISCONNECTION: iB,
|
|
1018
|
+
ERROR_INSTANTIATING_DRIVER: oB,
|
|
1019
|
+
SIGNPAD_DISCONNECTED: DB,
|
|
1020
|
+
INVALID_LICENSE_KEY: wB,
|
|
1021
|
+
READY_TO_CONNECT: SB,
|
|
1022
|
+
SIGNPAD_DETECTED: sB,
|
|
1023
|
+
READY_TO_SIGN_MOUSE: aB,
|
|
1024
|
+
READY_TO_SIGN_PHYSICAL: yB
|
|
1021
1025
|
}, pA = {
|
|
1022
|
-
en:
|
|
1023
|
-
cs:
|
|
1026
|
+
en: TC,
|
|
1027
|
+
cs: KB
|
|
1024
1028
|
};
|
|
1025
|
-
class
|
|
1029
|
+
class hB {
|
|
1026
1030
|
/**
|
|
1027
1031
|
* @param component - The LitElement instance that uses this manager.
|
|
1028
1032
|
*/
|
|
@@ -1137,7 +1141,7 @@ class sB {
|
|
|
1137
1141
|
return g.endsWith(".json") ? E = g : E = `${g.replace(/\/+$/, "")}/${A}.json`, E;
|
|
1138
1142
|
}
|
|
1139
1143
|
}
|
|
1140
|
-
class
|
|
1144
|
+
class MB {
|
|
1141
1145
|
/**
|
|
1142
1146
|
* @param component - The host SignosoftSignpad instance.
|
|
1143
1147
|
*/
|
|
@@ -1231,13 +1235,14 @@ class aB {
|
|
|
1231
1235
|
M
|
|
1232
1236
|
), M;
|
|
1233
1237
|
}, g = A.eventCallbacks, E = {
|
|
1234
|
-
[
|
|
1235
|
-
[
|
|
1236
|
-
[
|
|
1237
|
-
[
|
|
1238
|
-
[
|
|
1239
|
-
[
|
|
1240
|
-
[
|
|
1238
|
+
[n.SIGN_CONNECT]: I(g?.onConnect),
|
|
1239
|
+
[n.SIGN_CONNECTING]: I(g?.onConnecting),
|
|
1240
|
+
[n.SIGN_DISCONNECT]: I(g?.onDisconnect),
|
|
1241
|
+
[n.SIGN_PEN]: I(g?.onPen),
|
|
1242
|
+
[n.SIGN_OK]: I(g?.onOk),
|
|
1243
|
+
[n.SIGN_CLEAR]: I(g?.onClear),
|
|
1244
|
+
[n.SIGN_CANCEL]: I(g?.onCancel),
|
|
1245
|
+
[n.SIGN_ERROR]: I(g?.onError)
|
|
1241
1246
|
}, D = /* @__PURE__ */ new Set([
|
|
1242
1247
|
...Object.keys(this.configEventHandlers),
|
|
1243
1248
|
...Object.keys(E)
|
|
@@ -1258,7 +1263,7 @@ class aB {
|
|
|
1258
1263
|
this.configEventHandlers = {};
|
|
1259
1264
|
}
|
|
1260
1265
|
}
|
|
1261
|
-
const
|
|
1266
|
+
const tB = ":host{--primary-color-0: #4e56ea;--primary-color-10: #7178ee;--background-color-0: #f1f2fd;--background-color-10: #e3e4fc;--text-color-0: #333e4a;--white-color: #ffffff;--grey-color: #b5b9be;--min-height: 48px;--spacing-constraints: 16px 24px;--sign-font-family: Arial, Helvetica, sans-serif;--sign-common-border-radius: 8px;--sign-top-bar-bg-base: var(--background-color-10);--sign-top-bar-text-base: var(--primary-color-0);--sign-top-bar-padding: var(--spacing-constraints);--sign-top-bar-min-height: var(--min-height);--sign-top-bar-border-top-left-radius: var(--sign-common-border-radius);--sign-top-bar-border-top-right-radius: var(--sign-common-border-radius);--sign-top-bar-border-bottom-left-radius: 0;--sign-top-bar-border-bottom-right-radius: 0;--sign-canvas-bg-base: var(--background-color-0);--sign-canvas-wrapper-border-top-left-radius: 0;--sign-canvas-wrapper-border-top-right-radius: 0;--sign-canvas-wrapper-border-bottom-left-radius: 0;--sign-canvas-wrapper-border-bottom-right-radius: 0;--sign-line-height: 22px;--sign-line-margin-bottom: 16px;--sign-line-border-base: var(--primary-color-10);--sign-line-additional-text-color: var(--text-color-0);--sign-line-margin: 0px 24px var(--sign-line-margin-bottom) 24px;--sign-canvas-line-text-font-size: 12px;--sign-canvas-height-offset: var(--sign-line-height);--sign-bottom-bar-bg-base: var(--background-color-10);--sign-bottom-bar-padding: var(--spacing-constraints);--sign-bottom-bar-min-height: var(--min-height);--sign-bottom-bar-gap: 12px;--sign-bottom-bar-border-top-left-radius: 0;--sign-bottom-bar-border-top-right-radius: 0;--sign-bottom-bar-border-bottom-left-radius: var(--sign-common-border-radius);--sign-bottom-bar-border-bottom-right-radius: var( --sign-common-border-radius );--sign-button-font-size: 16px;--sign-button-padding: 14px 16px;--sign-button-min-height: var(--min-height);--sign-button-border-radius: var(--sign-common-border-radius);--sign-button-font-weight: 500;--sign-button-primary-bg-base: var(--primary-color-0);--sign-button-primary-bg-hover: var(--primary-color-10);--sign-button-primary-bg-disabled: var(--grey-color);--sign-button-primary-text-base: var(--white-color);--sign-button-primary-text-hover: var(--white-color);--sign-button-primary-text-disabled: var(--white-color);--sign-button-primary-border-base: 1px solid var(--primary-color-0);--sign-button-primary-border-hover: 1px solid var(--primary-color-10);--sign-button-primary-border-disabled: 1px solid var(--grey-color);--sign-button-link-bg-base: transparent;--sign-button-link-bg-hover: var(--background-color-10);--sign-button-link-bg-disabled: transparent;--sign-button-link-text-base: var(--primary-color-0);--sign-button-link-text-hover: var(--primary-color-10);--sign-button-link-text-disabled: var(--grey-color);--sign-button-link-border-base: 1px solid var(--primary-color-0);--sign-button-link-border-hover: 1px solid var(--primary-color-10);--sign-button-link-border-disabled: 1px solid var(--grey-color);--sign-device-state-text-color-connected: green;--sign-device-state-text-color-disconnected: red;--sign-loading-overlay-bg-color: rgba(255, 255, 255, .8);--sign-loading-overlay-text-color: var(--text-color-0);--sign-loading-overlay-spinner-color: var(--primary-color-0);--sign-loading-overlay-spinner-border-color: rgba(78, 86, 234, .1);--sign-loading-overlay-spinner-size: 30px}html{font-family:var(--sign-font-family)!important}.signpad-canvas-container{display:flex;flex-direction:column;width:100%;height:100%;min-width:380px}.signpad-top-bar{display:flex;justify-content:space-between;padding:var(--sign-top-bar-padding);min-height:var(--sign-top-bar-min-height);background-color:var(--sign-top-bar-bg-base);color:var(--sign-top-bar-text-base);align-items:center;border-top-left-radius:var(--sign-top-bar-border-top-left-radius);border-top-right-radius:var(--sign-top-bar-border-top-right-radius);border-bottom-left-radius:var(--sign-top-bar-border-bottom-left-radius);border-bottom-right-radius:var(--sign-top-bar-border-bottom-right-radius)}.signpad-top-left-actions,.signpad-top-right-actions{display:flex;gap:var(--sign-bottom-bar-gap)}.signpad-top-left-actions{justify-content:flex-start}.signpad-top-right-actions{justify-content:flex-end}.signpad-canvas-wrapper{position:relative;width:100%;padding-top:16px;padding-bottom:56.25%;height:0;background-color:var(--sign-canvas-bg-base);box-sizing:border-box;overflow:hidden;border-top-left-radius:var(--sign-canvas-wrapper-border-top-left-radius);border-top-right-radius:var(--sign-canvas-wrapper-border-top-right-radius);border-bottom-left-radius:var( --sign-canvas-wrapper-border-bottom-left-radius );border-bottom-right-radius:var( --sign-canvas-wrapper-border-bottom-right-radius )}.signpad-canvas-container>.signpad-canvas-wrapper:first-child{--sign-canvas-wrapper-border-top-left-radius: var( --sign-common-border-radius );--sign-canvas-wrapper-border-top-right-radius: var( --sign-common-border-radius )}.signpad-canvas-container>.signpad-canvas-wrapper:last-child{--sign-canvas-wrapper-border-bottom-left-radius: var( --sign-common-border-radius );--sign-canvas-wrapper-border-bottom-right-radius: var( --sign-common-border-radius )}.signpad-canvas{position:absolute;width:100%;height:calc(100% - (var(--sign-canvas-height-offset) + var(--sign-line-margin-bottom)));left:0;top:0}.signpad-canvas-line-container{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;height:var(--sign-line-height);border-top:2px solid var(--sign-line-border-base);box-sizing:border-box;padding-top:6px;margin:var(--sign-line-margin)}.signpad-canvas-line-additional-text,.signpad-canvas-line-state,.signpad-canvas-line-state.connected{font-family:var(--sign-font-family);font-size:var(--sign-canvas-line-text-font-size)}.signpad-canvas-line-additional-text{color:var(--sign-line-additional-text-color);margin:0}.signpad-canvas-line-state{color:var(--sign-device-state-text-color-disconnected);margin:0}.signpad-canvas-line-state.connected{color:var(--sign-device-state-text-color-connected)}.signpad-bottom-bar{display:flex;flex-direction:row;gap:var(--sign-bottom-bar-gap);padding:var(--sign-bottom-bar-padding);min-height:var(--sign-bottom-bar-min-height);background-color:var(--sign-bottom-bar-bg-base);border-top-left-radius:var(--sign-bottom-bar-border-top-left-radius);border-top-right-radius:var(--sign-bottom-bar-border-top-right-radius);border-bottom-left-radius:var(--sign-bottom-bar-border-bottom-left-radius);border-bottom-right-radius:var(--sign-bottom-bar-border-bottom-right-radius)}.btn{font-family:var(--sign-font-family);min-height:var(--sign-button-min-height);padding:var(--sign-button-padding);margin:0;font-weight:var(--sign-button-font-weight);width:100%;font-size:var(--sign-button-font-size);border-radius:var(--sign-button-border-radius);transition:background-color .3s ease,color .3s ease,transform .1s ease}.btn:hover:not(:disabled){cursor:pointer}.btn:focus:not(:disabled){outline:none}.btn-primary{background-color:var(--sign-button-primary-bg-base);color:var(--sign-button-primary-text-base);border:var(--sign-button-primary-border-base)}.btn-primary:hover:not(:disabled){background-color:var(--sign-button-primary-bg-hover);color:var(--sign-button-primary-text-hover);border:var(--sign-button-primary-border-hover)}.btn-primary:disabled{background-color:var(--sign-button-primary-bg-disabled);color:var(--sign-button-primary-text-disabled);border:var(--sign-button-primary-border-disabled)}.btn-link{background-color:var(--sign-button-link-bg-base);color:var(--sign-button-link-text-base);border:var(--sign-button-link-border-base)}.btn-link:hover:not(:disabled){background-color:var(--sign-button-link-bg-hover);color:var(--sign-button-link-text-hover);border:var(--sign-button-link-border-hover)}.btn-link:disabled{background-color:var(--sign-button-link-bg-disabled);color:var(--sign-button-link-text-disabled);border:var(--sign-button-link-border-disabled)}.signpad-loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--sign-loading-overlay-bg-color);display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:10;text-align:center;gap:10px}.signpad-loading-overlay .spinner{border:4px solid var(--sign-loading-overlay-spinner-border-color);border-left-color:var(--sign-loading-overlay-spinner-color);border-radius:50%;width:var(--sign-loading-overlay-spinner-size);height:var(--sign-loading-overlay-spinner-size);animation:spin 1s linear infinite}.signpad-loading-overlay-text{font-family:var(--sign-font-family);color:var(--sign-loading-overlay-text-color);font-size:14px;margin:16px 0 0}@keyframes spin{to{transform:rotate(360deg)}}";
|
|
1262
1267
|
let zI = class {
|
|
1263
1268
|
constructor() {
|
|
1264
1269
|
this._device = null, this._isWasmInitialized = !1, this._module = null, this._disconnectHandler = null, this._eventCallbacks = /* @__PURE__ */ new Map(), this._callbackToHandle = /* @__PURE__ */ new Map(), this._masterCallback = null, this._penAspectCorrector = null, this._unexpectedDisconnectCallbacks = /* @__PURE__ */ new Set();
|
|
@@ -1307,10 +1312,10 @@ var vI = (() => {
|
|
|
1307
1312
|
};
|
|
1308
1313
|
}
|
|
1309
1314
|
console.log.bind(console);
|
|
1310
|
-
var V = console.error.bind(console), AA, oA, JA = !1, IA, p, DA, z, gA,
|
|
1315
|
+
var V = console.error.bind(console), AA, oA, JA = !1, IA, p, DA, z, gA, H, aI, VA, yI, KI, UA = (C) => C.startsWith("file://");
|
|
1311
1316
|
function hI() {
|
|
1312
1317
|
var C = oA.buffer;
|
|
1313
|
-
IA = new Int8Array(C), DA = new Int16Array(C), g.HEAPU8 = p = new Uint8Array(C), z = new Uint16Array(C), gA = new Int32Array(C),
|
|
1318
|
+
IA = new Int8Array(C), DA = new Int16Array(C), g.HEAPU8 = p = new Uint8Array(C), z = new Uint16Array(C), gA = new Int32Array(C), H = new Uint32Array(C), aI = new Float32Array(C), KI = new Float64Array(C), VA = new BigInt64Array(C), yI = new BigUint64Array(C);
|
|
1314
1319
|
}
|
|
1315
1320
|
var CA = 0, sA = null;
|
|
1316
1321
|
function MI(C) {
|
|
@@ -1364,7 +1369,7 @@ var vI = (() => {
|
|
|
1364
1369
|
}
|
|
1365
1370
|
};
|
|
1366
1371
|
function aA(C) {
|
|
1367
|
-
return this.fromWireType(
|
|
1372
|
+
return this.fromWireType(H[C >> 2]);
|
|
1368
1373
|
}
|
|
1369
1374
|
var wA = {}, BA = {}, LA = {}, eA = class extends Error {
|
|
1370
1375
|
constructor(C) {
|
|
@@ -1382,7 +1387,7 @@ var vI = (() => {
|
|
|
1382
1387
|
w[R] = BA[K], ++y, y === s.length && o(w);
|
|
1383
1388
|
}));
|
|
1384
1389
|
}), s.length === 0 && o(w);
|
|
1385
|
-
}, kI,
|
|
1390
|
+
}, kI, r = (C) => {
|
|
1386
1391
|
for (var B = ""; p[C]; ) B += kI[p[C++]];
|
|
1387
1392
|
return B;
|
|
1388
1393
|
}, N = class extends Error {
|
|
@@ -1411,7 +1416,7 @@ var vI = (() => {
|
|
|
1411
1416
|
case 2:
|
|
1412
1417
|
return i ? (o) => DA[o >> 1] : (o) => z[o >> 1];
|
|
1413
1418
|
case 4:
|
|
1414
|
-
return i ? (o) => gA[o >> 2] : (o) =>
|
|
1419
|
+
return i ? (o) => gA[o >> 2] : (o) => H[o >> 2];
|
|
1415
1420
|
case 8:
|
|
1416
1421
|
return i ? (o) => VA[o >> 3] : (o) => yI[o >> 3];
|
|
1417
1422
|
default:
|
|
@@ -1537,7 +1542,7 @@ var vI = (() => {
|
|
|
1537
1542
|
if (!g.hasOwnProperty(C)) throw new eA("Replacing nonexistent public symbol");
|
|
1538
1543
|
g[C].ba !== void 0 && i !== void 0 ? g[C].ba[i] = B : (g[C] = B, g[C].la = i);
|
|
1539
1544
|
}, YI = [], nI, Z = (C, B) => {
|
|
1540
|
-
C =
|
|
1545
|
+
C = r(C);
|
|
1541
1546
|
var i;
|
|
1542
1547
|
if ((i = YI[B]) || (YI[B] = i = nI.get(B)), typeof i != "function") throw new N(`unknown function pointer with signature ${C}: ${B}`);
|
|
1543
1548
|
return i;
|
|
@@ -1546,7 +1551,7 @@ var vI = (() => {
|
|
|
1546
1551
|
}
|
|
1547
1552
|
var HI = (C) => {
|
|
1548
1553
|
C = Og(C);
|
|
1549
|
-
var B =
|
|
1554
|
+
var B = r(C);
|
|
1550
1555
|
return EA(C), B;
|
|
1551
1556
|
}, CI = (C, B) => {
|
|
1552
1557
|
function i(s) {
|
|
@@ -1588,7 +1593,7 @@ return ret;
|
|
|
1588
1593
|
return B = new Function(...q, L)(...o), nA(C, B);
|
|
1589
1594
|
}
|
|
1590
1595
|
for (var lI = (C, B) => {
|
|
1591
|
-
for (var i = [], o = 0; o < C; o++) i.push(
|
|
1596
|
+
for (var i = [], o = 0; o < C; o++) i.push(H[B + 4 * o >> 2]);
|
|
1592
1597
|
return i;
|
|
1593
1598
|
}, dI = (C) => {
|
|
1594
1599
|
C = C.trim();
|
|
@@ -1634,7 +1639,7 @@ return ret;
|
|
|
1634
1639
|
return i ? function(o) {
|
|
1635
1640
|
return this.fromWireType(gA[o >> 2]);
|
|
1636
1641
|
} : function(o) {
|
|
1637
|
-
return this.fromWireType(
|
|
1642
|
+
return this.fromWireType(H[o >> 2]);
|
|
1638
1643
|
};
|
|
1639
1644
|
default:
|
|
1640
1645
|
throw new TypeError(`invalid integer width (${B}): ${C}`);
|
|
@@ -1761,15 +1766,15 @@ return ret;
|
|
|
1761
1766
|
return B;
|
|
1762
1767
|
}, TI = (C, B, i) => {
|
|
1763
1768
|
var o = [];
|
|
1764
|
-
return C = C.toWireType(o, i), o.length && (
|
|
1769
|
+
return C = C.toWireType(o, i), o.length && (H[B >> 2] = m(o)), C;
|
|
1765
1770
|
}, lA = [], dg = {}, dA = (C) => {
|
|
1766
1771
|
var B = dg[C];
|
|
1767
|
-
return B === void 0 ?
|
|
1772
|
+
return B === void 0 ? r(C) : B;
|
|
1768
1773
|
}, jI = () => typeof globalThis == "object" ? globalThis : Function("return this")(), fg = (C) => {
|
|
1769
1774
|
var B = lA.length;
|
|
1770
1775
|
return lA.push(C), B;
|
|
1771
1776
|
}, pg = (C, B) => {
|
|
1772
|
-
for (var i = Array(C), o = 0; o < C; ++o) i[o] = qA(
|
|
1777
|
+
for (var i = Array(C), o = 0; o < C; ++o) i[o] = qA(H[B + 4 * o >> 2], `parameter ${o}`);
|
|
1773
1778
|
return i;
|
|
1774
1779
|
}, WI = Array(256), fA = 0; 256 > fA; ++fA) WI[fA] = String.fromCharCode(fA);
|
|
1775
1780
|
kI = WI, (() => {
|
|
@@ -1846,7 +1851,7 @@ return ret;
|
|
|
1846
1851
|
var xg = {
|
|
1847
1852
|
k: (C, B, i) => {
|
|
1848
1853
|
var o = new Kg(C);
|
|
1849
|
-
throw
|
|
1854
|
+
throw H[o.Z + 16 >> 2] = 0, H[o.Z + 4 >> 2] = B, H[o.Z + 8 >> 2] = i, NI = C, NI;
|
|
1850
1855
|
},
|
|
1851
1856
|
F: () => MI(""),
|
|
1852
1857
|
t: (C) => {
|
|
@@ -1874,7 +1879,7 @@ return ret;
|
|
|
1874
1879
|
});
|
|
1875
1880
|
},
|
|
1876
1881
|
x: (C, B, i, o, w) => {
|
|
1877
|
-
B =
|
|
1882
|
+
B = r(B), o = o === 0n;
|
|
1878
1883
|
let s = (y) => y;
|
|
1879
1884
|
if (o) {
|
|
1880
1885
|
const y = 8 * i;
|
|
@@ -1883,7 +1888,7 @@ return ret;
|
|
|
1883
1888
|
b(C, { name: B, fromWireType: s, toWireType: (y, K) => (typeof K == "number" && (K = BigInt(K)), K), ga: 8, readValueFromPointer: FI(B, i, !o), fa: null });
|
|
1884
1889
|
},
|
|
1885
1890
|
K: (C, B, i, o) => {
|
|
1886
|
-
B =
|
|
1891
|
+
B = r(B), b(C, {
|
|
1887
1892
|
name: B,
|
|
1888
1893
|
fromWireType: function(w) {
|
|
1889
1894
|
return !!w;
|
|
@@ -1899,7 +1904,7 @@ return ret;
|
|
|
1899
1904
|
});
|
|
1900
1905
|
},
|
|
1901
1906
|
M: (C, B, i, o, w, s, y, K, R, t, G, U, Y) => {
|
|
1902
|
-
G =
|
|
1907
|
+
G = r(G), s = Z(w, s), K &&= Z(y, K), t &&= Z(R, t), Y = Z(U, Y);
|
|
1903
1908
|
var q = tg(G);
|
|
1904
1909
|
AI(q, function() {
|
|
1905
1910
|
CI(`Cannot construct ${G} due to unbound types`, [o]);
|
|
@@ -1926,7 +1931,7 @@ return ret;
|
|
|
1926
1931
|
},
|
|
1927
1932
|
y: (C, B, i, o, w, s, y, K, R) => {
|
|
1928
1933
|
var t = lI(i, o);
|
|
1929
|
-
B =
|
|
1934
|
+
B = r(B), B = dI(B), s = Z(w, s), yA([], [C], (G) => {
|
|
1930
1935
|
function U() {
|
|
1931
1936
|
CI(`Cannot call ${Y} due to unbound types`, t);
|
|
1932
1937
|
}
|
|
@@ -1941,26 +1946,26 @@ return ret;
|
|
|
1941
1946
|
z: (C, B, i, o) => {
|
|
1942
1947
|
function w() {
|
|
1943
1948
|
}
|
|
1944
|
-
B =
|
|
1949
|
+
B = r(B), w.values = {}, b(C, { name: B, constructor: w, fromWireType: function(s) {
|
|
1945
1950
|
return this.constructor.values[s];
|
|
1946
1951
|
}, toWireType: (s, y) => y.value, ga: 8, readValueFromPointer: Lg(B, i, o), fa: null }), AI(B, w);
|
|
1947
1952
|
},
|
|
1948
1953
|
o: (C, B, i) => {
|
|
1949
1954
|
var o = qA(C, "enum");
|
|
1950
|
-
B =
|
|
1955
|
+
B = r(B), C = o.constructor, o = Object.create(o.constructor.prototype, { value: { value: i }, constructor: { value: nA(`${o.name}_${B}`, function() {
|
|
1951
1956
|
}) } }), C.values[i] = o, C[B] = o;
|
|
1952
1957
|
},
|
|
1953
1958
|
w: (C, B, i) => {
|
|
1954
|
-
B =
|
|
1959
|
+
B = r(B), b(C, { name: B, fromWireType: (o) => o, toWireType: (o, w) => w, ga: 8, readValueFromPointer: eg(B, i), fa: null });
|
|
1955
1960
|
},
|
|
1956
1961
|
h: (C, B, i, o, w, s, y) => {
|
|
1957
1962
|
var K = lI(B, i);
|
|
1958
|
-
C =
|
|
1963
|
+
C = r(C), C = dI(C), w = Z(o, w), AI(C, function() {
|
|
1959
1964
|
CI(`Cannot call ${C} due to unbound types`, K);
|
|
1960
1965
|
}, B - 1), yA([], K, (R) => (R = [R[0], null].concat(R.slice(1)), eI(C, qI(C, R, null, w, s, y), B - 1), []));
|
|
1961
1966
|
},
|
|
1962
1967
|
p: (C, B, i, o, w) => {
|
|
1963
|
-
B =
|
|
1968
|
+
B = r(B);
|
|
1964
1969
|
let s = (K) => K;
|
|
1965
1970
|
if (o === 0) {
|
|
1966
1971
|
var y = 32 - 8 * i;
|
|
@@ -1970,7 +1975,7 @@ return ret;
|
|
|
1970
1975
|
},
|
|
1971
1976
|
f: (C, B, i) => {
|
|
1972
1977
|
function o(s) {
|
|
1973
|
-
return new w(IA.buffer,
|
|
1978
|
+
return new w(IA.buffer, H[s + 4 >> 2], H[s >> 2]);
|
|
1974
1979
|
}
|
|
1975
1980
|
var w = [
|
|
1976
1981
|
Int8Array,
|
|
@@ -1984,11 +1989,11 @@ return ret;
|
|
|
1984
1989
|
BigInt64Array,
|
|
1985
1990
|
BigUint64Array
|
|
1986
1991
|
][B];
|
|
1987
|
-
i =
|
|
1992
|
+
i = r(i), b(C, { name: i, fromWireType: o, ga: 8, readValueFromPointer: o }, { Ga: !0 });
|
|
1988
1993
|
},
|
|
1989
1994
|
J: (C, B) => {
|
|
1990
|
-
B =
|
|
1991
|
-
for (var o =
|
|
1995
|
+
B = r(B), b(C, { name: B, fromWireType: function(i) {
|
|
1996
|
+
for (var o = H[i >> 2], w = i + 4, s, y = w, K = 0; K <= o; ++K) {
|
|
1992
1997
|
var R = w + K;
|
|
1993
1998
|
(K == o || p[R] == 0) && (y = y ? hA(y, R - y) : "", s === void 0 ? s = y : (s += "\0", s += y), y = R + 1);
|
|
1994
1999
|
}
|
|
@@ -1998,17 +2003,17 @@ return ret;
|
|
|
1998
2003
|
var w = typeof o == "string";
|
|
1999
2004
|
if (!(w || ArrayBuffer.isView(o) && o.BYTES_PER_ELEMENT == 1)) throw new N("Cannot pass non-string to std::string");
|
|
2000
2005
|
var s = w ? pI(o) : o.length, y = bI(4 + s + 1), K = y + 4;
|
|
2001
|
-
return
|
|
2006
|
+
return H[y >> 2] = s, w ? SA(o, K, s + 1) : p.set(o, K), i !== null && i.push(EA, y), y;
|
|
2002
2007
|
}, ga: 8, readValueFromPointer: aA, fa(i) {
|
|
2003
2008
|
EA(i);
|
|
2004
2009
|
} });
|
|
2005
2010
|
},
|
|
2006
2011
|
s: (C, B, i) => {
|
|
2007
|
-
if (i =
|
|
2012
|
+
if (i = r(i), B === 2)
|
|
2008
2013
|
var o = Yg, w = ng, s = Hg, y = (K) => z[K >> 1];
|
|
2009
|
-
else B === 4 && (o = rg, w = qg, s = lg, y = (K) =>
|
|
2014
|
+
else B === 4 && (o = rg, w = qg, s = lg, y = (K) => H[K >> 2]);
|
|
2010
2015
|
b(C, { name: i, fromWireType: (K) => {
|
|
2011
|
-
for (var R =
|
|
2016
|
+
for (var R = H[K >> 2], t, G = K + 4, U = 0; U <= R; ++U) {
|
|
2012
2017
|
var Y = K + 4 + U * B;
|
|
2013
2018
|
(U == R || y(Y) == 0) && (G = o(G, Y - G), t === void 0 ? t = G : (t += "\0", t += G), G = Y + B);
|
|
2014
2019
|
}
|
|
@@ -2016,19 +2021,19 @@ return ret;
|
|
|
2016
2021
|
}, toWireType: (K, R) => {
|
|
2017
2022
|
if (typeof R != "string") throw new N(`Cannot pass non-string to C++ string type ${i}`);
|
|
2018
2023
|
var t = s(R), G = bI(4 + t + B);
|
|
2019
|
-
return
|
|
2024
|
+
return H[G >> 2] = t / B, w(R, G + 4, t + B), K !== null && K.push(EA, G), G;
|
|
2020
2025
|
}, ga: 8, readValueFromPointer: aA, fa(K) {
|
|
2021
2026
|
EA(K);
|
|
2022
2027
|
} });
|
|
2023
2028
|
},
|
|
2024
2029
|
u: (C, B, i, o, w, s) => {
|
|
2025
|
-
cA[C] = { name:
|
|
2030
|
+
cA[C] = { name: r(B), sa: Z(i, o), ia: Z(w, s), wa: [] };
|
|
2026
2031
|
},
|
|
2027
2032
|
i: (C, B, i, o, w, s, y, K, R, t) => {
|
|
2028
|
-
cA[C].wa.push({ Aa:
|
|
2033
|
+
cA[C].wa.push({ Aa: r(B), Fa: i, Da: Z(o, w), Ea: s, Ma: y, La: Z(K, R), Na: t });
|
|
2029
2034
|
},
|
|
2030
2035
|
L: (C, B) => {
|
|
2031
|
-
B =
|
|
2036
|
+
B = r(B), b(C, { Ha: !0, name: B, ga: 0, fromWireType: () => {
|
|
2032
2037
|
}, toWireType: () => {
|
|
2033
2038
|
} });
|
|
2034
2039
|
},
|
|
@@ -2070,7 +2075,7 @@ return ret;
|
|
|
2070
2075
|
j: (C, B) => (C = qA(C, "_emval_take_value"), C = C.readValueFromPointer(B), m(C)),
|
|
2071
2076
|
C: (C, B, i, o) => {
|
|
2072
2077
|
var w = (/* @__PURE__ */ new Date()).getFullYear(), s = new Date(w, 0, 1).getTimezoneOffset();
|
|
2073
|
-
w = new Date(w, 6, 1).getTimezoneOffset(),
|
|
2078
|
+
w = new Date(w, 6, 1).getTimezoneOffset(), H[C >> 2] = 60 * Math.max(s, w), gA[B >> 2] = +(s != w), B = (y) => {
|
|
2074
2079
|
var K = Math.abs(y);
|
|
2075
2080
|
return `UTC${0 <= y ? "-" : "+"}${String(Math.floor(K / 60)).padStart(2, "0")}${String(K % 60).padStart(2, "0")}`;
|
|
2076
2081
|
}, C = B(s), B = B(w), w < s ? (SA(C, i, 17), SA(B, o, 17)) : (SA(C, o, 17), SA(B, i, 17));
|
|
@@ -4426,12 +4431,12 @@ window.SignatureDeviceImagesData = {
|
|
|
4426
4431
|
}
|
|
4427
4432
|
}
|
|
4428
4433
|
};
|
|
4429
|
-
var
|
|
4434
|
+
var GB = Object.defineProperty, RB = Object.getOwnPropertyDescriptor, Dg = (Q) => {
|
|
4430
4435
|
throw TypeError(Q);
|
|
4431
4436
|
}, sI = (Q, A, I, g) => {
|
|
4432
|
-
for (var E = g > 1 ? void 0 : g ?
|
|
4437
|
+
for (var E = g > 1 ? void 0 : g ? RB(A, I) : A, D = Q.length - 1, S; D >= 0; D--)
|
|
4433
4438
|
(S = Q[D]) && (E = (g ? S(A, I, E) : S(E)) || E);
|
|
4434
|
-
return g && E &&
|
|
4439
|
+
return g && E && GB(A, I, E), E;
|
|
4435
4440
|
}, wg = (Q, A, I) => A.has(Q) || Dg("Cannot " + I), e = (Q, A, I) => (wg(Q, A, "read from private field"), I ? I.call(Q) : A.get(Q)), O = (Q, A, I) => A.has(Q) ? Dg("Cannot add the same private member more than once") : A instanceof WeakSet ? A.add(Q) : A.set(Q, I), J = (Q, A, I, g) => (wg(Q, A, "write to private field"), A.set(Q, I), I), OA, TA, jA, WA, iA, bA, X, u, RA, mA, _, NA, DI;
|
|
4436
4441
|
let FA = class extends bg {
|
|
4437
4442
|
/**
|
|
@@ -4466,7 +4471,7 @@ let FA = class extends bg {
|
|
|
4466
4471
|
);
|
|
4467
4472
|
return;
|
|
4468
4473
|
}
|
|
4469
|
-
}, this.stateManager = new wC(this), this.connectionManager = new iI(this), this.buttonManager = new oC(this), this.localizationManager = new
|
|
4474
|
+
}, this.stateManager = new wC(this), this.connectionManager = new iI(this), this.buttonManager = new oC(this), this.localizationManager = new hB(this), this.configManager = new MB(this), this.stateManager.transitionTo(
|
|
4470
4475
|
h.INITIAL,
|
|
4471
4476
|
k.COMPONENT_INITIALIZED
|
|
4472
4477
|
), this.clear = this.buttonManager.handleClear.bind(this.buttonManager), this.ok = this.buttonManager.handleOk.bind(this.buttonManager), this.cancel = this.buttonManager.handleCancel.bind(this.buttonManager), this.startSigning = this.buttonManager.startSigning.bind(
|
|
@@ -4698,11 +4703,11 @@ let FA = class extends bg {
|
|
|
4698
4703
|
*/
|
|
4699
4704
|
dispatchPenEventThrottled(Q) {
|
|
4700
4705
|
if (!Q.inContact) {
|
|
4701
|
-
this.dispatch(
|
|
4706
|
+
this.dispatch(n.SIGN_PEN, Q), J(this, NA, 0);
|
|
4702
4707
|
return;
|
|
4703
4708
|
}
|
|
4704
4709
|
const A = performance.now();
|
|
4705
|
-
A - e(this, NA) < e(this, DI) || (J(this, NA, A), this.dispatch(
|
|
4710
|
+
A - e(this, NA) < e(this, DI) || (J(this, NA, A), this.dispatch(n.SIGN_PEN, Q));
|
|
4706
4711
|
}
|
|
4707
4712
|
/**
|
|
4708
4713
|
* Initializes the driver once a lease is provided via config.
|
|
@@ -4780,7 +4785,7 @@ let FA = class extends bg {
|
|
|
4780
4785
|
* Used for smooth mode switching (mouse <-> physical).
|
|
4781
4786
|
*/
|
|
4782
4787
|
async disconnectForSeamlessSwitch(Q) {
|
|
4783
|
-
this.stateManager.transitionTo(h.DISCONNECTING, Q), await this.connectionManager.disconnect(), this.resetDrawingState(), this.dispatch(
|
|
4788
|
+
this.stateManager.transitionTo(h.DISCONNECTING, Q), await this.connectionManager.disconnect(), this.resetDrawingState(), this.dispatch(n.SIGN_DISCONNECT);
|
|
4784
4789
|
}
|
|
4785
4790
|
/**
|
|
4786
4791
|
* Forces the component into mouse fallback mode without re-attempting physical reconnection.
|
|
@@ -4976,7 +4981,7 @@ mA = /* @__PURE__ */ new WeakMap();
|
|
|
4976
4981
|
_ = /* @__PURE__ */ new WeakMap();
|
|
4977
4982
|
NA = /* @__PURE__ */ new WeakMap();
|
|
4978
4983
|
DI = /* @__PURE__ */ new WeakMap();
|
|
4979
|
-
FA.styles = [Wg(
|
|
4984
|
+
FA.styles = [Wg(tB)];
|
|
4980
4985
|
sI([
|
|
4981
4986
|
BC({ type: Object })
|
|
4982
4987
|
], FA.prototype, "config", 2);
|
|
@@ -4989,7 +4994,7 @@ FA = sI([
|
|
|
4989
4994
|
export {
|
|
4990
4995
|
P as DeviceStatusText,
|
|
4991
4996
|
FA as SignosoftSignpad,
|
|
4992
|
-
|
|
4997
|
+
n as SignpadEventType,
|
|
4993
4998
|
k as SignpadMessage,
|
|
4994
4999
|
h as SignpadState,
|
|
4995
5000
|
iC as SignpadUI
|