@verdocs/web-sdk 5.3.2 → 5.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-Be9PlTB7.js +6 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.cjs.js.map +1 -0
- package/dist/cjs/{verdocs-delegate-dialog_4.cjs.entry.js → verdocs-delegate-dialog_5.cjs.entry.js} +23 -3
- package/dist/cjs/verdocs-delegate-dialog_5.cjs.entry.js.map +1 -0
- package/dist/cjs/verdocs-dialog.cjs.entry.js +4 -3
- package/dist/cjs/verdocs-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +6 -6
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +7 -7
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +6 -7
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/dialogs/verdocs-dialog/verdocs-dialog.css +60 -12
- package/dist/collection/components/dialogs/verdocs-dialog/verdocs-dialog.js +3 -2
- package/dist/collection/components/dialogs/verdocs-dialog/verdocs-dialog.js.map +1 -1
- package/dist/collection/components/dialogs/verdocs-disclosure-dialog/verdocs-disclosure-dialog.css +59 -0
- package/dist/collection/components/dialogs/verdocs-disclosure-dialog/verdocs-disclosure-dialog.js +90 -0
- package/dist/collection/components/dialogs/verdocs-disclosure-dialog/verdocs-disclosure-dialog.js.map +1 -0
- package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +1 -1
- package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
- package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +0 -18
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +6 -7
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
- package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
- package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
- package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +7 -7
- package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
- package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-B-sC03p7.js +54 -0
- package/dist/components/p-B-sC03p7.js.map +1 -0
- package/dist/components/{p-DCy6nwED.js → p-B1oNdOdb.js} +3 -3
- package/dist/components/{p-DCy6nwED.js.map → p-B1oNdOdb.js.map} +1 -1
- package/dist/components/{p-DSuGln_n.js → p-BUkor2Zh.js} +3 -3
- package/dist/components/{p-DSuGln_n.js.map → p-BUkor2Zh.js.map} +1 -1
- package/dist/components/{p-CSFCBy3P.js → p-B_qZwg8S.js} +10 -10
- package/dist/components/{p-CSFCBy3P.js.map → p-B_qZwg8S.js.map} +1 -1
- package/dist/components/{p-D8_fPEOD.js → p-BdW7a50T.js} +3 -3
- package/dist/components/{p-D8_fPEOD.js.map → p-BdW7a50T.js.map} +1 -1
- package/dist/components/{p-LNfVhsoj.js → p-BjJWKf-L.js} +10 -10
- package/dist/components/{p-LNfVhsoj.js.map → p-BjJWKf-L.js.map} +1 -1
- package/dist/components/{p-uNT6jl98.js → p-BzoreaCJ.js} +4 -4
- package/dist/components/{p-uNT6jl98.js.map → p-BzoreaCJ.js.map} +1 -1
- package/dist/components/{p-BP9TCpZ6.js → p-CFK7G7AR.js} +9 -9
- package/dist/components/{p-BP9TCpZ6.js.map → p-CFK7G7AR.js.map} +1 -1
- package/dist/components/{p-D13UCp1m.js → p-CFYTe0HU.js} +3 -3
- package/dist/components/{p-D13UCp1m.js.map → p-CFYTe0HU.js.map} +1 -1
- package/dist/components/{p-DNOYDWfH.js → p-CGQDpB88.js} +9 -9
- package/dist/components/{p-DNOYDWfH.js.map → p-CGQDpB88.js.map} +1 -1
- package/dist/components/{p-gCXTKxs5.js → p-CYuh1ogw.js} +3 -3
- package/dist/components/{p-gCXTKxs5.js.map → p-CYuh1ogw.js.map} +1 -1
- package/dist/components/{p-Cf1Xpjup.js → p-CZ5JrIih.js} +3 -3
- package/dist/components/{p-Cf1Xpjup.js.map → p-CZ5JrIih.js.map} +1 -1
- package/dist/components/{p-BN5wpJih.js → p-DQDtYaYV.js} +3 -3
- package/dist/components/{p-BN5wpJih.js.map → p-DQDtYaYV.js.map} +1 -1
- package/dist/components/{p-CUlK6Rs_.js → p-DjgJTYmV.js} +4 -4
- package/dist/components/{p-CUlK6Rs_.js.map → p-DjgJTYmV.js.map} +1 -1
- package/dist/components/{p-BMXdvy4u.js → p-DmVSUzvg.js} +4 -4
- package/dist/components/{p-BMXdvy4u.js.map → p-DmVSUzvg.js.map} +1 -1
- package/dist/components/{p-BBJxuJAR.js → p-Dt1l1CiO.js} +3 -3
- package/dist/components/{p-BBJxuJAR.js.map → p-Dt1l1CiO.js.map} +1 -1
- package/dist/components/p-NepfaUbg.js +42 -0
- package/dist/components/p-NepfaUbg.js.map +1 -0
- package/dist/components/{p-Dsw72vlR.js → p-NtCZcfeU.js} +3 -3
- package/dist/components/{p-Dsw72vlR.js.map → p-NtCZcfeU.js.map} +1 -1
- package/dist/components/{p-Ck25a52V.js → p-OzwT6cW-.js} +3 -3
- package/dist/components/{p-Ck25a52V.js.map → p-OzwT6cW-.js.map} +1 -1
- package/dist/components/{p-BDDzkCIR.js → p-q-sbO54X.js} +4 -4
- package/dist/components/{p-BDDzkCIR.js.map → p-q-sbO54X.js.map} +1 -1
- package/dist/components/verdocs-build.js +13 -13
- package/dist/components/verdocs-dialog.js +1 -36
- package/dist/components/verdocs-dialog.js.map +1 -1
- package/dist/components/verdocs-disclosure-dialog.d.ts +11 -0
- package/dist/components/verdocs-disclosure-dialog.js +9 -0
- package/dist/components/verdocs-disclosure-dialog.js.map +1 -0
- package/dist/components/verdocs-envelope-document-page.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +7 -7
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-initial.js +1 -1
- package/dist/components/verdocs-field-signature.js +1 -1
- package/dist/components/verdocs-initial-dialog.js +1 -1
- package/dist/components/verdocs-ok-dialog.js +1 -1
- package/dist/components/verdocs-otp-dialog.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-quick-functions.js +1 -1
- package/dist/components/verdocs-search-tabs.js +1 -1
- package/dist/components/verdocs-sign.js +29 -18
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-signature-dialog.js +1 -1
- package/dist/components/verdocs-status-indicator.js +1 -1
- package/dist/components/verdocs-template-attachments.js +1 -1
- package/dist/components/verdocs-template-card.js +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-template-role-properties.js +1 -1
- package/dist/components/verdocs-template-roles.js +1 -1
- package/dist/components/verdocs-template-star.js +1 -1
- package/dist/components/verdocs-template-tags.js +1 -1
- package/dist/components/verdocs-templates-list.js +2 -2
- package/dist/components/verdocs-upload-dialog.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/custom-elements.json +13 -0
- package/dist/esm/index-CF7i8guW.js +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.js.map +1 -0
- package/dist/esm/{verdocs-delegate-dialog_4.entry.js → verdocs-delegate-dialog_5.entry.js} +23 -4
- package/dist/{esm-es5/verdocs-delegate-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.js.map → esm/verdocs-delegate-dialog_5.entry.js.map} +1 -1
- package/dist/esm/verdocs-dialog.entry.js +4 -3
- package/dist/esm/verdocs-dialog.entry.js.map +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +6 -6
- package/dist/esm/verdocs-field-attachment_13.entry.js +3 -3
- package/dist/esm/verdocs-menu-panel_2.entry.js +7 -7
- package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm/verdocs-quick-functions.entry.js +1 -1
- package/dist/esm/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +6 -7
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +2 -2
- package/dist/esm/verdocs-template-card.entry.js +1 -1
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-template-tags.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/index-CF7i8guW.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-delegate-dialog_5.entry.js +2 -0
- package/dist/esm-es5/verdocs-delegate-dialog_5.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-dialog.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/dialogs/verdocs-disclosure-dialog/verdocs-disclosure-dialog.d.ts +32 -0
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -1
- package/dist/types/components.d.ts +57 -0
- package/dist/verdocs-web-sdk/{p-b980a35c.entry.js → p-0a1dc128.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-14467744.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-14467744.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-001f340b.entry.js → p-1c4b4425.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2a087f29.entry.js → p-2dab79c8.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-c5b23884.system.entry.js → p-427eaf21.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-4704cf14.entry.js +2 -0
- package/dist/{esm/verdocs-delegate-dialog_4.entry.js.map → verdocs-web-sdk/p-4704cf14.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-2514da1e.system.entry.js → p-48366bb6.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-53fd51ca.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-53fd51ca.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-5cb6d4e0.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-5cb6d4e0.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-352ab9b7.system.entry.js → p-7966d40d.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-655c3035.entry.js → p-79f5ee74.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-fb9bc98b.entry.js → p-7acbd898.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-3a0cc47f.system.entry.js → p-863df983.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-C28cwiJN.system.js.map → p-BAthDv8w.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-BtN2tR0_.system.js.map → p-BMQPYgf_.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-Bo8r8IOt.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-jcVDqxOd.system.js.map → p-CAPHli3W.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-CZ0N9seS.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-CtasYnde.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-CwXSduhy.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-DsSM-GM5.system.js.map → p-D6pYq1ZB.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-DdgLD7ev.system.js.map → p-DAZ_KnJG.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-BDGgiBJR.system.js.map → p-DPRVGzF_.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CqnaEr0M.system.js.map → p-DXKG6_cs.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-B_BNAU2R.system.js.map → p-Dx9QGjeG.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CD2Fdeq7.system.js.map → p-F6cjv9kE.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-963208c6.system.entry.js → p-a95c074c.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-931bf9ec.system.entry.js → p-b7da67bb.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-127c5b10.entry.js → p-b9d72eab.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-1d72e3ab.entry.js → p-ba3df500.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d2a4aedb.system.entry.js → p-bf90e30b.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-fe22a117.system.entry.js → p-c0ec2636.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-76a86430.system.entry.js → p-c1c4603e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-bee95303.system.entry.js → p-cc9e6049.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-d5c66bc3.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-d5c66bc3.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-d907fa45.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-d907fa45.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-8be6c2b0.entry.js → p-e6fd14d5.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-4d563225.entry.js → p-e801f4ac.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6845c12e.system.entry.js → p-f46b9924.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-a1e4b631.entry.js → p-f5677a98.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-42939fbd.entry.js → p-f66b18e0.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-CyniDtbb.system.js.map → p-rPgqdDgT.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CB78zeGU.system.js.map → p-ynZKIneZ.system.js.map} +1 -1
- package/dist/{esm-es5/verdocs-delegate-dialog_4.entry.js.map → verdocs-web-sdk/verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.esm.js.map} +1 -1
- package/dist/verdocs-web-sdk/verdocs-dialog.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/verdocs-delegate-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.cjs.js.map +0 -1
- package/dist/cjs/verdocs-delegate-dialog_4.cjs.entry.js.map +0 -1
- package/dist/esm/verdocs-delegate-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-delegate-dialog_4.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-33691e24.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-33691e24.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-33ce9472.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-33ce9472.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4e28a33a.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-4e28a33a.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4e9d67fe.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-4e9d67fe.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BK8oE7he.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BQneONkc.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BfaNlwpr.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e3414fba.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e3414fba.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-ee5cc2b0.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-ee5cc2b0.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/verdocs-delegate-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-view.entry.esm.js.map +0 -1
- /package/dist/verdocs-web-sdk/{p-b980a35c.entry.js.map → p-0a1dc128.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-001f340b.entry.js.map → p-1c4b4425.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-2a087f29.entry.js.map → p-2dab79c8.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-c5b23884.system.entry.js.map → p-427eaf21.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-2514da1e.system.entry.js.map → p-48366bb6.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-352ab9b7.system.entry.js.map → p-7966d40d.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-655c3035.entry.js.map → p-79f5ee74.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-fb9bc98b.entry.js.map → p-7acbd898.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-3a0cc47f.system.entry.js.map → p-863df983.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-963208c6.system.entry.js.map → p-a95c074c.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-931bf9ec.system.entry.js.map → p-b7da67bb.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-127c5b10.entry.js.map → p-b9d72eab.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-1d72e3ab.entry.js.map → p-ba3df500.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d2a4aedb.system.entry.js.map → p-bf90e30b.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-fe22a117.system.entry.js.map → p-c0ec2636.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-76a86430.system.entry.js.map → p-c1c4603e.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-bee95303.system.entry.js.map → p-cc9e6049.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-8be6c2b0.entry.js.map → p-e6fd14d5.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4d563225.entry.js.map → p-e801f4ac.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6845c12e.system.entry.js.map → p-f46b9924.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-a1e4b631.entry.js.map → p-f5677a98.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-42939fbd.entry.js.map → p-f66b18e0.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
|
|
1
|
-
var __extends=this&&this.__extends||function(){var t=function(e,i){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[i]=e[i]};return t(e,i)};return function(e,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(e,i);function n(){this.constructor=e}e.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++){e=arguments[i];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[s]=e[s]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,i,n){function s(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function u(t){try{o(n.next(t))}catch(t){r(t)}}function a(t){try{o(n["throw"](t))}catch(t){r(t)}}function o(t){t.done?i(t.value):s(t.value).then(u,a)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(t){return function(e){return o([t,e])}}function o(a){if(n)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(i=0)),i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __rest=this&&this.__rest||function(t,e){var i={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0)i[n]=t[n];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++){if(e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s]))i[n[s]]=t[n[s]]}return i};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,s=e.length,r;n<s;n++){if(r||!(n in e)){if(!r)r=Array.prototype.slice.call(e,0,n);r[n]=e[n]}}return t.concat(r||Array.prototype.slice.call(e))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,g as getElement}from"./index-CF7i8guW.js";import{D as DefaultEndpoint}from"./Environment-C_Xku1v2.js";import{verifySigner,VerdocsEndpoint,getEnvelope,getDocumentDownloadLink,cancelEnvelope,userCanCancelEnvelope,integerSequence}from"@verdocs/js-sdk";import{V as VerdocsToast}from"./Toast-CyvDgtoV.js";import{s as saveEnvelopesAsZip}from"./utils-DmfOx9Ey.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-DmsV595e.js";import"./_commonjsHelpers-BFTU3MAI.js";import"./index-dzBXqXlK.js";import"./Types-Dl7Xw8F0.js";var verdocsDelegateDialogCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-delegate-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-delegate-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:10px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-delegate-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-delegate-dialog .step{margin-left:6px;color:#666}verdocs-delegate-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-delegate-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-delegate-dialog .help-icon{width:40px;height:40px}verdocs-delegate-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-delegate-dialog .help-text{font-weight:400}verdocs-delegate-dialog .input{gap:10px;margin:5px 0;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row}verdocs-delegate-dialog .input label{margin:8px 0 0 0;-ms-flex:0 0 100px;flex:0 0 100px;font-size:13px;font-weight:500;line-height:10px;white-space:nowrap}verdocs-delegate-dialog .input input{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #cccccc}verdocs-delegate-dialog .input textarea{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #cccccc;font-family:"Inter", "Barlow", sans-serif}verdocs-delegate-dialog .input.names input{width:80px}verdocs-delegate-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-delegate-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-delegate-dialog .field label{-ms-flex:0 0 120px;flex:0 0 120px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-delegate-dialog .field verdocs-date-input{width:40%;-ms-flex-positive:1;flex-grow:1}verdocs-delegate-dialog .field verdocs-date-input input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-delegate-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-delegate-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-delegate-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-delegate-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-delegate-dialog .buttons verdocs-button{margin-left:16px}';var QuestionIcon$2='<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>';var VerdocsDelegateDialog=function(){function t(t){registerInstance(this,t);this.exit=createEvent(this,"exit");this.next=createEvent(this,"next");this.endpoint=DefaultEndpoint;this.envelope=null;this.first_name="";this.last_name="";this.email="";this.phone="";this.message=""}t.prototype.handleCancel=function(){this.exit.emit()};t.prototype.handleDismiss=function(t){if(t.target.class==="background-overlay"){t.preventDefault();this.handleCancel()}};t.prototype.handleDelegate=function(){this.next.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message})};t.prototype.render=function(){var t=this;return h(Host,{key:"1b273825b9e7829da0e4c2f1e0dd198b99e22778"},h("div",{key:"ee6933619eccc3bd070a39cfe203db31f9e49360",class:"background-overlay",onClick:function(e){return t.handleDismiss(e)}},h("div",{key:"a5dd9c14107423563cd9f125ada09e093a2f339a",class:"dialog"},h("div",{key:"9de61c918546d1c07e6910bf510a86a7b02b3ec4",class:"heading"},'Delegate "',this.envelope.name,'"'),h("div",{key:"4a18099b2af26a5ffacfef8316224ff46d0e6130",class:"help-box"},h("div",{key:"1edddc209d05847359e5899c635a434b84df5cbf",class:"help-icon",innerHTML:QuestionIcon$2}),h("div",{key:"3b88b1a8fe4432a76ecdd7c890af1c62f6e37e15",class:"help-details"},h("div",{key:"c912b3030e38e44f6e99708c70dc914bb8c16d7b",class:"help-title"},"Please verify your email address"),h("div",{key:"743843ee38ee599147c38428794f75433418ad8f",class:"help-text"},"Check your email for a one-time code, and enter it below."))),h("div",{key:"a1c76355c3085882a3a85b2e9d92e7e6fdb52ae0",class:"input names"},h("label",{key:"a67cddd940d0b12e85eb4e838a4ea74763b8114b",htmlFor:"verdocs-delegate-email"},"New Recipient:"),h("input",{key:"119c0d496eed6721e0a75f83f1419a9d5f491bd7",type:"text",id:"verdocs-delegate-first",name:"verdocs-delegate-first",autocomplete:"blocked",placeholder:"First name...",value:this.first_name,onInput:function(e){return t.first_name=e.target.value}}),h("input",{key:"6a63aaf105137ca0e1dac6cf7a19f4b82d8c47d6",type:"text",id:"verdocs-delegate-last",name:"verdocs-delegate-last",autocomplete:"blocked",placeholder:"Last name...",value:this.last_name,onInput:function(e){return t.last_name=e.target.value}})),h("div",{key:"347e2279573063eb892c0b813468d5c09408531a",class:"input"},h("label",{key:"825073c57fd16fbf3e310280f308c43be821965d",htmlFor:"verdocs-delegate-email"},"Email Address:"),h("input",{key:"56838680257dee66d68c0e725caf836ea40ff295",type:"text",id:"verdocs-delegate-email",name:"verdocs-delegate-email",autocomplete:"blocked",placeholder:"New recipient email address...",value:this.email,onInput:function(e){return t.email=e.target.value}})),h("div",{key:"063226a4aed54f801b830c79d8bd09c27538454e",class:"input"},h("label",{key:"19a7c63649de25be50d55441e1c27e80bea5ca0a",htmlFor:"verdocs-delegate-phone"},"Phone:"),h("input",{key:"433ad74b6599db5c29d52948fdd373c3dbe62736",type:"text",id:"verdocs-delegate-phone",name:"verdocs-delegate-phone",autocomplete:"blocked",placeholder:"Optional phone number...",value:this.phone,onInput:function(e){return t.phone=e.target.value}})),h("div",{key:"07a2f3a2f4ba17bd89104f1d0d113650c7415dbd",class:"input"},h("label",{key:"eab9f7cde38d80e75c35b731cb3e1bc8a0f41bab",htmlFor:"verdocs-delegate-email"},"Message:"),h("textarea",{key:"4aceddbcca0ef4b30a7d04fd15509588fabe9732",id:"verdocs-delegate-message",name:"verdocs-delegate-message",rows:3,autocomplete:"blocked",placeholder:"Optional message to include in the invitation...",onInput:function(e){return t.message=e.target.value}},this.message)),h("div",{key:"6c24b31253ca9146f93b6ae17deb984ce4aa5c5a",class:"buttons"},h("verdocs-button",{key:"d17fe7c1c699a49c7fe923ed528b18c8d780ddbb",label:"Cancel",variant:"outline",onClick:function(){return t.handleCancel()}}),h("verdocs-button",{key:"260a127ef6c7c8a6703ad46136233302ed4d0437",label:"Delegate",onClick:function(){return t.handleDelegate()},disabled:!this.first_name||!this.last_name||!this.email})))))};return t}();VerdocsDelegateDialog.style=verdocsDelegateDialogCss;function isString(t){return typeof t==="string"||t instanceof String}function isObject(t){var e;return typeof t==="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function pick(t,e){if(Array.isArray(e))return pick(t,(function(t,i){return e.includes(i)}));return Object.entries(t).reduce((function(t,i){var n=i[0],s=i[1];if(e(s,n))t[n]=s;return t}),{})}var DIRECTION={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function forceDirection(t){switch(t){case DIRECTION.LEFT:return DIRECTION.FORCE_LEFT;case DIRECTION.RIGHT:return DIRECTION.FORCE_RIGHT;default:return t}}function escapeRegExp(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function objectIncludes(t,e){if(e===t)return true;var i=Array.isArray(e),n=Array.isArray(t);var s;if(i&&n){if(e.length!=t.length)return false;for(s=0;s<e.length;s++)if(!objectIncludes(e[s],t[s]))return false;return true}if(i!=n)return false;if(e&&t&&typeof e==="object"&&typeof t==="object"){var r=e instanceof Date,u=t instanceof Date;if(r&&u)return e.getTime()==t.getTime();if(r!=u)return false;var a=e instanceof RegExp,o=t instanceof RegExp;if(a&&o)return e.toString()==t.toString();if(a!=o)return false;var l=Object.keys(e);for(s=0;s<l.length;s++)if(!Object.prototype.hasOwnProperty.call(t,l[s]))return false;for(s=0;s<l.length;s++)if(!objectIncludes(t[l[s]],e[l[s]]))return false;return true}else if(e&&t&&typeof e==="function"&&typeof t==="function"){return e.toString()===t.toString()}return false}var ActionDetails=function(){function t(t){Object.assign(this,t);while(this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos)){--this.oldSelection.start}if(this.insertedCount){while(this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end)){if(this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end)++this.oldSelection.end;else++this.cursorPos}}}Object.defineProperty(t.prototype,"startChangePos",{get:function(){return Math.min(this.cursorPos,this.oldSelection.start)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"insertedCount",{get:function(){return this.cursorPos-this.startChangePos},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"inserted",{get:function(){return this.value.substr(this.startChangePos,this.insertedCount)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"removedCount",{get:function(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"removed",{get:function(){return this.oldValue.substr(this.startChangePos,this.removedCount)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"head",{get:function(){return this.value.substring(0,this.startChangePos)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"tail",{get:function(){return this.value.substring(this.startChangePos+this.insertedCount)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"removeDirection",{get:function(){if(!this.removedCount||this.insertedCount)return DIRECTION.NONE;return(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?DIRECTION.RIGHT:DIRECTION.LEFT},enumerable:false,configurable:true});return t}();function IMask(t,e){return new IMask.InputMask(t,e)}function maskedClass(t){if(t==null)throw new Error("mask property should be defined");if(t instanceof RegExp)return IMask.MaskedRegExp;if(isString(t))return IMask.MaskedPattern;if(t===Date)return IMask.MaskedDate;if(t===Number)return IMask.MaskedNumber;if(Array.isArray(t)||t===Array)return IMask.MaskedDynamic;if(IMask.Masked&&t.prototype instanceof IMask.Masked)return t;if(IMask.Masked&&t instanceof IMask.Masked)return t.constructor;if(t instanceof Function)return IMask.MaskedFunction;console.warn("Mask not found for mask",t);return IMask.Masked}function normalizeOpts(t){if(!t)throw new Error("Options in not defined");if(IMask.Masked){if(t.prototype instanceof IMask.Masked)return{mask:t};var e=t instanceof IMask.Masked?{mask:t}:isObject(t)&&t.mask instanceof IMask.Masked?t:{},i=e.mask,n=i===void 0?undefined:i,s=__rest(e,["mask"]);if(n){var r=n.mask;return __assign(__assign(__assign({},pick(n,(function(t,e){return!e.startsWith("_")}))),{mask:n.constructor,_mask:r}),s)}}if(!isObject(t))return{mask:t};return __assign({},t)}function createMask(t){if(IMask.Masked&&t instanceof IMask.Masked)return t;var e=normalizeOpts(t);var i=maskedClass(e.mask);if(!i)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");if(e.mask===i)delete e.mask;if(e._mask){e.mask=e._mask;delete e._mask}return new i(e)}IMask.createMask=createMask;var MaskElement=function(){function t(){}Object.defineProperty(t.prototype,"selectionStart",{get:function(){var t;try{t=this._unsafeSelectionStart}catch(t){}return t!=null?t:this.value.length},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"selectionEnd",{get:function(){var t;try{t=this._unsafeSelectionEnd}catch(t){}return t!=null?t:this.value.length},enumerable:false,configurable:true});t.prototype.select=function(t,e){if(t==null||e==null||t===this.selectionStart&&e===this.selectionEnd)return;try{this._unsafeSelect(t,e)}catch(t){}};Object.defineProperty(t.prototype,"isActive",{get:function(){return false},enumerable:false,configurable:true});return t}();IMask.MaskElement=MaskElement;var KEY_Z=90;var KEY_Y=89;var HTMLMaskElement=function(t){__extends(e,t);function e(e){var i=t.call(this)||this;i.input=e;i._onKeydown=i._onKeydown.bind(i);i._onInput=i._onInput.bind(i);i._onBeforeinput=i._onBeforeinput.bind(i);i._onCompositionEnd=i._onCompositionEnd.bind(i);return i}Object.defineProperty(e.prototype,"rootElement",{get:function(){var t,e,i;return(t=(e=(i=this.input).getRootNode)==null?void 0:e.call(i))!=null?t:document},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isActive",{get:function(){return this.input===this.rootElement.activeElement},enumerable:false,configurable:true});e.prototype.bindEvents=function(t){this.input.addEventListener("keydown",this._onKeydown);this.input.addEventListener("input",this._onInput);this.input.addEventListener("beforeinput",this._onBeforeinput);this.input.addEventListener("compositionend",this._onCompositionEnd);this.input.addEventListener("drop",t.drop);this.input.addEventListener("click",t.click);this.input.addEventListener("focus",t.focus);this.input.addEventListener("blur",t.commit);this._handlers=t};e.prototype._onKeydown=function(t){if(this._handlers.redo&&(t.keyCode===KEY_Z&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===KEY_Y&&t.ctrlKey)){t.preventDefault();return this._handlers.redo(t)}if(this._handlers.undo&&t.keyCode===KEY_Z&&(t.metaKey||t.ctrlKey)){t.preventDefault();return this._handlers.undo(t)}if(!t.isComposing)this._handlers.selectionChange(t)};e.prototype._onBeforeinput=function(t){if(t.inputType==="historyUndo"&&this._handlers.undo){t.preventDefault();return this._handlers.undo(t)}if(t.inputType==="historyRedo"&&this._handlers.redo){t.preventDefault();return this._handlers.redo(t)}};e.prototype._onCompositionEnd=function(t){this._handlers.input(t)};e.prototype._onInput=function(t){if(!t.isComposing)this._handlers.input(t)};e.prototype.unbindEvents=function(){this.input.removeEventListener("keydown",this._onKeydown);this.input.removeEventListener("input",this._onInput);this.input.removeEventListener("beforeinput",this._onBeforeinput);this.input.removeEventListener("compositionend",this._onCompositionEnd);this.input.removeEventListener("drop",this._handlers.drop);this.input.removeEventListener("click",this._handlers.click);this.input.removeEventListener("focus",this._handlers.focus);this.input.removeEventListener("blur",this._handlers.commit);this._handlers={}};return e}(MaskElement);IMask.HTMLMaskElement=HTMLMaskElement;var HTMLInputMaskElement=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;i.input=e;return i}Object.defineProperty(e.prototype,"_unsafeSelectionStart",{get:function(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"_unsafeSelectionEnd",{get:function(){return this.input.selectionEnd},enumerable:false,configurable:true});e.prototype._unsafeSelect=function(t,e){this.input.setSelectionRange(t,e)};Object.defineProperty(e.prototype,"value",{get:function(){return this.input.value},set:function(t){this.input.value=t},enumerable:false,configurable:true});return e}(HTMLMaskElement);IMask.HTMLMaskElement=HTMLMaskElement;var HTMLContenteditableMaskElement=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}Object.defineProperty(e.prototype,"_unsafeSelectionStart",{get:function(){var t=this.rootElement;var e=t.getSelection&&t.getSelection();var i=e&&e.anchorOffset;var n=e&&e.focusOffset;if(n==null||i==null||i<n){return i}return n},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"_unsafeSelectionEnd",{get:function(){var t=this.rootElement;var e=t.getSelection&&t.getSelection();var i=e&&e.anchorOffset;var n=e&&e.focusOffset;if(n==null||i==null||i>n){return i}return n},enumerable:false,configurable:true});e.prototype._unsafeSelect=function(t,e){if(!this.rootElement.createRange)return;var i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,t);i.setEnd(this.input.lastChild||this.input,e);var n=this.rootElement;var s=n.getSelection&&n.getSelection();if(s){s.removeAllRanges();s.addRange(i)}};Object.defineProperty(e.prototype,"value",{get:function(){return this.input.textContent||""},set:function(t){this.input.textContent=t},enumerable:false,configurable:true});return e}(HTMLMaskElement);IMask.HTMLContenteditableMaskElement=HTMLContenteditableMaskElement;var InputHistory=function(){function t(){this.states=[];this.currentIndex=0}Object.defineProperty(t.prototype,"currentState",{get:function(){return this.states[this.currentIndex]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.states.length===0},enumerable:false,configurable:true});t.prototype.push=function(e){if(this.currentIndex<this.states.length-1)this.states.length=this.currentIndex+1;this.states.push(e);if(this.states.length>t.MAX_LENGTH)this.states.shift();this.currentIndex=this.states.length-1};t.prototype.go=function(t){this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1);return this.currentState};t.prototype.undo=function(){return this.go(-1)};t.prototype.redo=function(){return this.go(1)};t.prototype.clear=function(){this.states.length=0;this.currentIndex=0};return t}();InputHistory.MAX_LENGTH=100;var InputMask=function(){function t(t,e){this.el=t instanceof MaskElement?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new HTMLContenteditableMaskElement(t):new HTMLInputMaskElement(t);this.masked=createMask(e);this._listeners={};this._value="";this._unmaskedValue="";this._rawInputValue="";this.history=new InputHistory;this._saveSelection=this._saveSelection.bind(this);this._onInput=this._onInput.bind(this);this._onChange=this._onChange.bind(this);this._onDrop=this._onDrop.bind(this);this._onFocus=this._onFocus.bind(this);this._onClick=this._onClick.bind(this);this._onUndo=this._onUndo.bind(this);this._onRedo=this._onRedo.bind(this);this.alignCursor=this.alignCursor.bind(this);this.alignCursorFriendly=this.alignCursorFriendly.bind(this);this._bindEvents();this.updateValue();this._onChange()}t.prototype.maskEquals=function(t){var e;return t==null||((e=this.masked)==null?void 0:e.maskEquals(t))};Object.defineProperty(t.prototype,"mask",{get:function(){return this.masked.mask},set:function(t){if(this.maskEquals(t))return;if(!(t instanceof IMask.Masked)&&this.masked.constructor===maskedClass(t)){this.masked.updateOptions({mask:t});return}var e=t instanceof IMask.Masked?t:createMask({mask:t});e.unmaskedValue=this.masked.unmaskedValue;this.masked=e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){if(this.value===t)return;this.masked.value=t;this.updateControl("auto")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"unmaskedValue",{get:function(){return this._unmaskedValue},set:function(t){if(this.unmaskedValue===t)return;this.masked.unmaskedValue=t;this.updateControl("auto")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"rawInputValue",{get:function(){return this._rawInputValue},set:function(t){if(this.rawInputValue===t)return;this.masked.rawInputValue=t;this.updateControl();this.alignCursor()},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"typedValue",{get:function(){return this.masked.typedValue},set:function(t){if(this.masked.typedValueEquals(t))return;this.masked.typedValue=t;this.updateControl("auto")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"displayValue",{get:function(){return this.masked.displayValue},enumerable:false,configurable:true});t.prototype._bindEvents=function(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})};t.prototype._unbindEvents=function(){if(this.el)this.el.unbindEvents()};t.prototype._fireEvent=function(t,e){var i=this._listeners[t];if(!i)return;i.forEach((function(t){return t(e)}))};Object.defineProperty(t.prototype,"selectionStart",{get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"cursorPos",{get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd},set:function(t){if(!this.el||!this.el.isActive)return;this.el.select(t,t);this._saveSelection()},enumerable:false,configurable:true});t.prototype._saveSelection=function(){if(this.displayValue!==this.el.value){console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.")}this._selection={start:this.selectionStart,end:this.cursorPos}};t.prototype.updateValue=function(){this.masked.value=this.el.value;this._value=this.masked.value;this._unmaskedValue=this.masked.unmaskedValue;this._rawInputValue=this.masked.rawInputValue};t.prototype.updateControl=function(t){var e=this.masked.unmaskedValue;var i=this.masked.value;var n=this.masked.rawInputValue;var s=this.displayValue;var r=this.unmaskedValue!==e||this.value!==i||this._rawInputValue!==n;this._unmaskedValue=e;this._value=i;this._rawInputValue=n;if(this.el.value!==s)this.el.value=s;if(t==="auto")this.alignCursor();else if(t!=null)this.cursorPos=t;if(r)this._fireChangeEvents();if(!this._historyChanging&&(r||this.history.isEmpty))this.history.push({unmaskedValue:e,selection:{start:this.selectionStart,end:this.cursorPos}})};t.prototype.updateOptions=function(t){var e=t.mask,i=__rest(t,["mask"]);var n=!this.maskEquals(e);var s=this.masked.optionsIsChanged(i);if(n)this.mask=e;if(s)this.masked.updateOptions(i);if(n||s)this.updateControl()};t.prototype.updateCursor=function(t){if(t==null)return;this.cursorPos=t;this._delayUpdateCursor(t)};t.prototype._delayUpdateCursor=function(t){var e=this;this._abortUpdateCursor();this._changingCursorPos=t;this._cursorChanging=setTimeout((function(){if(!e.el)return;e.cursorPos=e._changingCursorPos;e._abortUpdateCursor()}),10)};t.prototype._fireChangeEvents=function(){this._fireEvent("accept",this._inputEvent);if(this.masked.isComplete)this._fireEvent("complete",this._inputEvent)};t.prototype._abortUpdateCursor=function(){if(this._cursorChanging){clearTimeout(this._cursorChanging);delete this._cursorChanging}};t.prototype.alignCursor=function(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,DIRECTION.LEFT))};t.prototype.alignCursorFriendly=function(){if(this.selectionStart!==this.cursorPos)return;this.alignCursor()};t.prototype.on=function(t,e){if(!this._listeners[t])this._listeners[t]=[];this._listeners[t].push(e);return this};t.prototype.off=function(t,e){if(!this._listeners[t])return this;if(!e){delete this._listeners[t];return this}var i=this._listeners[t].indexOf(e);if(i>=0)this._listeners[t].splice(i,1);return this};t.prototype._onInput=function(t){this._inputEvent=t;this._abortUpdateCursor();var e=new ActionDetails({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection});var i=this.masked.rawInputValue;var n=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:true,raw:true}).offset;var s=i===this.masked.rawInputValue?e.removeDirection:DIRECTION.NONE;var r=this.masked.nearestInputPos(e.startChangePos+n,s);if(s!==DIRECTION.NONE)r=this.masked.nearestInputPos(r,DIRECTION.NONE);this.updateControl(r);delete this._inputEvent};t.prototype._onChange=function(){if(this.displayValue!==this.el.value)this.updateValue();this.masked.doCommit();this.updateControl();this._saveSelection()};t.prototype._onDrop=function(t){t.preventDefault();t.stopPropagation()};t.prototype._onFocus=function(t){this.alignCursorFriendly()};t.prototype._onClick=function(t){this.alignCursorFriendly()};t.prototype._onUndo=function(){this._applyHistoryState(this.history.undo())};t.prototype._onRedo=function(){this._applyHistoryState(this.history.redo())};t.prototype._applyHistoryState=function(t){if(!t)return;this._historyChanging=true;this.unmaskedValue=t.unmaskedValue;this.el.select(t.selection.start,t.selection.end);this._saveSelection();this._historyChanging=false};t.prototype.destroy=function(){this._unbindEvents();this._listeners.length=0;delete this.el};return t}();IMask.InputMask=InputMask;var ChangeDetails=function(){function t(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:false},t)}t.normalize=function(e){return Array.isArray(e)?e:[e,new t]};t.prototype.aggregate=function(t){this.inserted+=t.inserted;this.rawInserted+=t.rawInserted;this.tailShift+=t.tailShift;this.skip=this.skip||t.skip;return this};Object.defineProperty(t.prototype,"offset",{get:function(){return this.tailShift+this.inserted.length},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"consumed",{get:function(){return Boolean(this.rawInserted)||this.skip},enumerable:false,configurable:true});t.prototype.equals=function(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip};return t}();IMask.ChangeDetails=ChangeDetails;var ContinuousTailDetails=function(){function t(t,e,i){if(t===void 0){t=""}if(e===void 0){e=0}this.value=t;this.from=e;this.stop=i}t.prototype.toString=function(){return this.value};t.prototype.extend=function(t){this.value+=String(t)};t.prototype.appendTo=function(t){return t.append(this.toString(),{tail:true}).aggregate(t._appendPlaceholder())};Object.defineProperty(t.prototype,"state",{get:function(){return{value:this.value,from:this.from,stop:this.stop}},set:function(t){Object.assign(this,t)},enumerable:false,configurable:true});t.prototype.unshift=function(t){if(!this.value.length||t!=null&&this.from>=t)return"";var e=this.value[0];this.value=this.value.slice(1);return e};t.prototype.shift=function(){if(!this.value.length)return"";var t=this.value[this.value.length-1];this.value=this.value.slice(0,-1);return t};return t}();var Masked=function(){function t(e){this._value="";this._update(__assign(__assign({},t.DEFAULTS),e));this._initialized=true}t.prototype.updateOptions=function(t){if(!this.optionsIsChanged(t))return;this.withValueRefresh(this._update.bind(this,t))};t.prototype._update=function(t){Object.assign(this,t)};Object.defineProperty(t.prototype,"state",{get:function(){return{_value:this.value,_rawInputValue:this.rawInputValue}},set:function(t){this._value=t._value},enumerable:false,configurable:true});t.prototype.reset=function(){this._value=""};Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this.resolve(t,{input:true})},enumerable:false,configurable:true});t.prototype.resolve=function(t,e){if(e===void 0){e={input:true}}this.reset();this.append(t,e,"");this.doCommit()};Object.defineProperty(t.prototype,"unmaskedValue",{get:function(){return this.value},set:function(t){this.resolve(t,{})},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"typedValue",{get:function(){return this.parse?this.parse(this.value,this):this.unmaskedValue},set:function(t){if(this.format){this.value=this.format(t,this)}else{this.unmaskedValue=String(t)}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"rawInputValue",{get:function(){return this.extractInput(0,this.displayValue.length,{raw:true})},set:function(t){this.resolve(t,{raw:true})},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"displayValue",{get:function(){return this.value},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isComplete",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isFilled",{get:function(){return this.isComplete},enumerable:false,configurable:true});t.prototype.nearestInputPos=function(t,e){return t};t.prototype.totalInputPositions=function(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}return Math.min(this.displayValue.length,e-t)};t.prototype.extractInput=function(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}return this.displayValue.slice(t,e)};t.prototype.extractTail=function(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}return new ContinuousTailDetails(this.extractInput(t,e),t)};t.prototype.appendTail=function(t){if(isString(t))t=new ContinuousTailDetails(String(t));return t.appendTo(this)};t.prototype._appendCharRaw=function(t,e){if(!t)return new ChangeDetails;this._value+=t;return new ChangeDetails({inserted:t,rawInserted:t})};t.prototype._appendChar=function(t,e,i){var n;if(e===void 0){e={}}var s=this.state;var r;n=this.doPrepareChar(t,e),t=n[0],r=n[1];if(t){r=r.aggregate(this._appendCharRaw(t,e));if(!r.rawInserted&&this.autofix==="pad"){var u=this.state;this.state=s;var a=this.pad(e);var o=this._appendCharRaw(t,e);a=a.aggregate(o);if(o.rawInserted||a.equals(r)){r=a}else{this.state=u}}}if(r.inserted){var l=void 0;var h=this.doValidate(e)!==false;if(h&&i!=null){var c=this.state;if(this.overwrite===true){l=i.state;for(var f=0;f<r.rawInserted.length;++f){i.unshift(this.displayValue.length-r.tailShift)}}var d=this.appendTail(i);h=d.rawInserted.length===i.toString().length;if(!(h&&d.inserted)&&this.overwrite==="shift"){this.state=c;l=i.state;for(var f=0;f<r.rawInserted.length;++f){i.shift()}d=this.appendTail(i);h=d.rawInserted.length===i.toString().length}if(h&&d.inserted)this.state=c}if(!h){r=new ChangeDetails;this.state=s;if(i&&l)i.state=l}}return r};t.prototype._appendPlaceholder=function(){return new ChangeDetails};t.prototype._appendEager=function(){return new ChangeDetails};t.prototype.append=function(t,e,i){var n;if(!isString(t))throw new Error("value should be string");var s=isString(i)?new ContinuousTailDetails(String(i)):i;if(e!=null&&e.tail)e._beforeTailState=this.state;var r;n=this.doPrepare(t,e),t=n[0],r=n[1];for(var u=0;u<t.length;++u){var a=this._appendChar(t[u],e,s);if(!a.rawInserted&&!this.doSkipInvalid(t[u],e,s))break;r.aggregate(a)}if((this.eager===true||this.eager==="append")&&e!=null&&e.input&&t){r.aggregate(this._appendEager())}if(s!=null){r.tailShift+=this.appendTail(s).tailShift}return r};t.prototype.remove=function(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e);return new ChangeDetails};t.prototype.withValueRefresh=function(t){if(this._refreshing||!this._initialized)return t();this._refreshing=true;var e=this.rawInputValue;var i=this.value;var n=t();this.rawInputValue=e;if(this.value&&this.value!==i&&i.indexOf(this.value)===0){this.append(i.slice(this.displayValue.length),{},"");this.doCommit()}delete this._refreshing;return n};t.prototype.runIsolated=function(t){if(this._isolated||!this._initialized)return t(this);this._isolated=true;var e=this.state;var i=t(this);this.state=e;delete this._isolated;return i};t.prototype.doSkipInvalid=function(t,e,i){return Boolean(this.skipInvalid)};t.prototype.doPrepare=function(t,e){if(e===void 0){e={}}return ChangeDetails.normalize(this.prepare?this.prepare(t,this,e):t)};t.prototype.doPrepareChar=function(t,e){if(e===void 0){e={}}return ChangeDetails.normalize(this.prepareChar?this.prepareChar(t,this,e):t)};t.prototype.doValidate=function(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))};t.prototype.doCommit=function(){if(this.commit)this.commit(this.value,this)};t.prototype.splice=function(t,e,i,n,s){if(i===void 0){i=""}if(n===void 0){n=DIRECTION.NONE}if(s===void 0){s={input:true}}var r=t+e;var u=this.extractTail(r);var a=this.eager===true||this.eager==="remove";var o;if(a){n=forceDirection(n);o=this.extractInput(0,r,{raw:true})}var l=t;var h=new ChangeDetails;if(n!==DIRECTION.NONE){l=this.nearestInputPos(t,e>1&&t!==0&&!a?DIRECTION.NONE:n);h.tailShift=l-t}h.aggregate(this.remove(l));if(a&&n!==DIRECTION.NONE&&o===this.rawInputValue){if(n===DIRECTION.FORCE_LEFT){var c=void 0;while(o===this.rawInputValue&&(c=this.displayValue.length)){h.aggregate(new ChangeDetails({tailShift:-1})).aggregate(this.remove(c-1))}}else if(n===DIRECTION.FORCE_RIGHT){u.unshift()}}return h.aggregate(this.append(i,s,u))};t.prototype.maskEquals=function(t){return this.mask===t};t.prototype.optionsIsChanged=function(t){return!objectIncludes(this,t)};t.prototype.typedValueEquals=function(e){var i=this.typedValue;return e===i||t.EMPTY_VALUES.includes(e)&&t.EMPTY_VALUES.includes(i)||(this.format?this.format(e,this)===this.format(this.typedValue,this):false)};t.prototype.pad=function(t){return new ChangeDetails};return t}();Masked.DEFAULTS={skipInvalid:true};Masked.EMPTY_VALUES=[undefined,null,""];IMask.Masked=Masked;var ChunksTailDetails=function(){function t(t,e){if(t===void 0){t=[]}if(e===void 0){e=0}this.chunks=t;this.from=e}t.prototype.toString=function(){return this.chunks.map(String).join("")};t.prototype.extend=function(e){if(!String(e))return;e=isString(e)?new ContinuousTailDetails(String(e)):e;var i=this.chunks[this.chunks.length-1];var n=i&&(i.stop===e.stop||e.stop==null)&&e.from===i.from+i.toString().length;if(e instanceof ContinuousTailDetails){if(n){i.extend(e.toString())}else{this.chunks.push(e)}}else if(e instanceof t){if(e.stop==null){var s=void 0;while(e.chunks.length&&e.chunks[0].stop==null){s=e.chunks.shift();s.from+=e.from;this.extend(s)}}if(e.toString()){e.stop=e.blockIndex;this.chunks.push(e)}}};t.prototype.appendTo=function(e){if(!(e instanceof IMask.MaskedPattern)){var i=new ContinuousTailDetails(this.toString());return i.appendTo(e)}var n=new ChangeDetails;for(var s=0;s<this.chunks.length;++s){var r=this.chunks[s];var u=e._mapPosToBlock(e.displayValue.length);var a=r.stop;var o=void 0;if(a!=null&&(!u||u.index<=a)){if(r instanceof t||e._stops.indexOf(a)>=0){n.aggregate(e._appendPlaceholder(a))}o=r instanceof t&&e._blocks[a]}if(o){var l=o.appendTail(r);n.aggregate(l);var h=r.toString().slice(l.rawInserted.length);if(h)n.aggregate(e.append(h,{tail:true}))}else{n.aggregate(e.append(r.toString(),{tail:true}))}}return n};Object.defineProperty(t.prototype,"state",{get:function(){return{chunks:this.chunks.map((function(t){return t.state})),from:this.from,stop:this.stop,blockIndex:this.blockIndex}},set:function(e){var i=e.chunks,n=__rest(e,["chunks"]);Object.assign(this,n);this.chunks=i.map((function(e){var i="chunks"in e?new t:new ContinuousTailDetails;i.state=e;return i}))},enumerable:false,configurable:true});t.prototype.unshift=function(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";var e=t!=null?t-this.from:t;var i=0;while(i<this.chunks.length){var n=this.chunks[i];var s=n.unshift(e);if(n.toString()){if(!s)break;++i}else{this.chunks.splice(i,1)}if(s)return s}return""};t.prototype.shift=function(){if(!this.chunks.length)return"";var t=this.chunks.length-1;while(0<=t){var e=this.chunks[t];var i=e.shift();if(e.toString()){if(!i)break;--t}else{this.chunks.splice(t,1)}if(i)return i}return""};return t}();var PatternCursor=function(){function t(t,e){this.masked=t;this._log=[];var i=t._mapPosToBlock(e)||(e<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0}),n=i.offset,s=i.index;this.offset=n;this.index=s;this.ok=false}Object.defineProperty(t.prototype,"block",{get:function(){return this.masked._blocks[this.index]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"pos",{get:function(){return this.masked._blockStartPos(this.index)+this.offset},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"state",{get:function(){return{index:this.index,offset:this.offset,ok:this.ok}},set:function(t){Object.assign(this,t)},enumerable:false,configurable:true});t.prototype.pushState=function(){this._log.push(this.state)};t.prototype.popState=function(){var t=this._log.pop();if(t)this.state=t;return t};t.prototype.bindBlock=function(){if(this.block)return;if(this.index<0){this.index=0;this.offset=0}if(this.index>=this.masked._blocks.length){this.index=this.masked._blocks.length-1;this.offset=this.block.displayValue.length}};t.prototype._pushLeft=function(t){this.pushState();for(this.bindBlock();0<=this.index;--this.index,this.offset=((e=this.block)==null?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=true}return this.ok=false};t.prototype._pushRight=function(t){this.pushState();for(this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0){if(t())return this.ok=true}return this.ok=false};t.prototype.pushLeftBeforeFilled=function(){var t=this;return this._pushLeft((function(){if(t.block.isFixed||!t.block.value)return;t.offset=t.block.nearestInputPos(t.offset,DIRECTION.FORCE_LEFT);if(t.offset!==0)return true}))};t.prototype.pushLeftBeforeInput=function(){var t=this;return this._pushLeft((function(){if(t.block.isFixed)return;t.offset=t.block.nearestInputPos(t.offset,DIRECTION.LEFT);return true}))};t.prototype.pushLeftBeforeRequired=function(){var t=this;return this._pushLeft((function(){if(t.block.isFixed||t.block.isOptional&&!t.block.value)return;t.offset=t.block.nearestInputPos(t.offset,DIRECTION.LEFT);return true}))};t.prototype.pushRightBeforeFilled=function(){var t=this;return this._pushRight((function(){if(t.block.isFixed||!t.block.value)return;t.offset=t.block.nearestInputPos(t.offset,DIRECTION.FORCE_RIGHT);if(t.offset!==t.block.value.length)return true}))};t.prototype.pushRightBeforeInput=function(){var t=this;return this._pushRight((function(){if(t.block.isFixed)return;t.offset=t.block.nearestInputPos(t.offset,DIRECTION.NONE);return true}))};t.prototype.pushRightBeforeRequired=function(){var t=this;return this._pushRight((function(){if(t.block.isFixed||t.block.isOptional&&!t.block.value)return;t.offset=t.block.nearestInputPos(t.offset,DIRECTION.NONE);return true}))};return t}();var PatternFixedDefinition=function(){function t(t){Object.assign(this,t);this._value="";this.isFixed=true}Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"unmaskedValue",{get:function(){return this.isUnmasking?this.value:""},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"rawInputValue",{get:function(){return this._isRawInput?this.value:""},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"displayValue",{get:function(){return this.value},enumerable:false,configurable:true});t.prototype.reset=function(){this._isRawInput=false;this._value=""};t.prototype.remove=function(t,e){if(t===void 0){t=0}if(e===void 0){e=this._value.length}this._value=this._value.slice(0,t)+this._value.slice(e);if(!this._value)this._isRawInput=false;return new ChangeDetails};t.prototype.nearestInputPos=function(t,e){if(e===void 0){e=DIRECTION.NONE}var i=0;var n=this._value.length;switch(e){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return i;case DIRECTION.NONE:case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:default:return n}};t.prototype.totalInputPositions=function(t,e){if(t===void 0){t=0}if(e===void 0){e=this._value.length}return this._isRawInput?e-t:0};t.prototype.extractInput=function(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this._value.length}if(i===void 0){i={}}return i.raw&&this._isRawInput&&this._value.slice(t,e)||""};Object.defineProperty(t.prototype,"isComplete",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isFilled",{get:function(){return Boolean(this._value)},enumerable:false,configurable:true});t.prototype._appendChar=function(t,e){if(e===void 0){e={}}if(this.isFilled)return new ChangeDetails;var i=this.eager===true||this.eager==="append";var n=this.char===t;var s=n&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!i)&&!e.tail;var r=new ChangeDetails({inserted:this.char,rawInserted:s?this.char:""});this._value=this.char;this._isRawInput=s&&(e.raw||e.input);return r};t.prototype._appendEager=function(){return this._appendChar(this.char,{tail:true})};t.prototype._appendPlaceholder=function(){var t=new ChangeDetails;if(this.isFilled)return t;this._value=t.inserted=this.char;return t};t.prototype.extractTail=function(){return new ContinuousTailDetails("")};t.prototype.appendTail=function(t){if(isString(t))t=new ContinuousTailDetails(String(t));return t.appendTo(this)};t.prototype.append=function(t,e,i){var n=this._appendChar(t[0],e);if(i!=null){n.tailShift+=this.appendTail(i).tailShift}return n};t.prototype.doCommit=function(){};Object.defineProperty(t.prototype,"state",{get:function(){return{_value:this._value,_rawInputValue:this.rawInputValue}},set:function(t){this._value=t._value;this._isRawInput=Boolean(t._rawInputValue)},enumerable:false,configurable:true});t.prototype.pad=function(t){return this._appendPlaceholder()};return t}();var PatternInputDefinition=function(){function t(t){var e=t.parent,i=t.isOptional,n=t.placeholderChar,s=t.displayChar,r=t.lazy,u=t.eager,a=__rest(t,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=createMask(a);Object.assign(this,{parent:e,isOptional:i,placeholderChar:n,displayChar:s,lazy:r,eager:u})}t.prototype.reset=function(){this.isFilled=false;this.masked.reset()};t.prototype.remove=function(t,e){if(t===void 0){t=0}if(e===void 0){e=this.value.length}if(t===0&&e>=1){this.isFilled=false;return this.masked.remove(t,e)}return new ChangeDetails};Object.defineProperty(t.prototype,"value",{get:function(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"unmaskedValue",{get:function(){return this.masked.unmaskedValue},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"rawInputValue",{get:function(){return this.masked.rawInputValue},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"displayValue",{get:function(){return this.masked.value&&this.displayChar||this.value},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isComplete",{get:function(){return Boolean(this.masked.value)||this.isOptional},enumerable:false,configurable:true});t.prototype._appendChar=function(t,e){if(e===void 0){e={}}if(this.isFilled)return new ChangeDetails;var i=this.masked.state;var n=this.masked._appendChar(t,this.currentMaskFlags(e));if(n.inserted&&this.doValidate(e)===false){n=new ChangeDetails;this.masked.state=i}if(!n.inserted&&!this.isOptional&&!this.lazy&&!e.input){n.inserted=this.placeholderChar}n.skip=!n.inserted&&!this.isOptional;this.isFilled=Boolean(n.inserted);return n};t.prototype.append=function(t,e,i){return this.masked.append(t,this.currentMaskFlags(e),i)};t.prototype._appendPlaceholder=function(){if(this.isFilled||this.isOptional)return new ChangeDetails;this.isFilled=true;return new ChangeDetails({inserted:this.placeholderChar})};t.prototype._appendEager=function(){return new ChangeDetails};t.prototype.extractTail=function(t,e){return this.masked.extractTail(t,e)};t.prototype.appendTail=function(t){return this.masked.appendTail(t)};t.prototype.extractInput=function(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.value.length}return this.masked.extractInput(t,e,i)};t.prototype.nearestInputPos=function(t,e){if(e===void 0){e=DIRECTION.NONE}var i=0;var n=this.value.length;var s=Math.min(Math.max(t,i),n);switch(e){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return this.isComplete?s:i;case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:return this.isComplete?s:n;case DIRECTION.NONE:default:return s}};t.prototype.totalInputPositions=function(t,e){if(t===void 0){t=0}if(e===void 0){e=this.value.length}return this.value.slice(t,e).length};t.prototype.doValidate=function(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))};t.prototype.doCommit=function(){this.masked.doCommit()};Object.defineProperty(t.prototype,"state",{get:function(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}},set:function(t){this.masked.state=t.masked;this.isFilled=t.isFilled},enumerable:false,configurable:true});t.prototype.currentMaskFlags=function(t){var e;return __assign(__assign({},t),{_beforeTailState:(t==null||(e=t._beforeTailState)==null?void 0:e.masked)||(t==null?void 0:t._beforeTailState)})};t.prototype.pad=function(t){return new ChangeDetails};return t}();PatternInputDefinition.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};var MaskedRegExp=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype.updateOptions=function(e){t.prototype.updateOptions.call(this,e)};e.prototype._update=function(e){var i=e.mask;if(i)e.validate=function(t){return t.search(i)>=0};t.prototype._update.call(this,e)};return e}(Masked);IMask.MaskedRegExp=MaskedRegExp;var MaskedPattern=function(t){__extends(e,t);function e(i){return t.call(this,__assign(__assign(__assign({},e.DEFAULTS),i),{definitions:Object.assign({},PatternInputDefinition.DEFAULT_DEFINITIONS,i==null?void 0:i.definitions)}))||this}e.prototype.updateOptions=function(e){t.prototype.updateOptions.call(this,e)};e.prototype._update=function(e){e.definitions=Object.assign({},this.definitions,e.definitions);t.prototype._update.call(this,e);this._rebuildMask()};e.prototype._rebuildMask=function(){var t=this.definitions;this._blocks=[];this.exposeBlock=undefined;this._stops=[];this._maskedBlocks={};var i=this.mask;if(!i||!t)return;var n=false;var s=false;var r=function(r){if(u.blocks){var o=i.slice(r);var l=Object.keys(u.blocks).filter((function(t){return o.indexOf(t)===0}));l.sort((function(t,e){return e.length-t.length}));var h=l[0];if(h){var c=normalizeOpts(u.blocks[h]),f=c.expose,d=c.repeat,v=__rest(c,["expose","repeat"]);var g=__assign(__assign({lazy:u.lazy,eager:u.eager,placeholderChar:u.placeholderChar,displayChar:u.displayChar,overwrite:u.overwrite,autofix:u.autofix},v),{repeat:d,parent:u});var b=d!=null?new IMask.RepeatBlock(g):createMask(g);if(b){u._blocks.push(b);if(f)u.exposeBlock=b;if(!u._maskedBlocks[h])u._maskedBlocks[h]=[];u._maskedBlocks[h].push(u._blocks.length-1)}r+=h.length-1;return a=r,"continue"}}var p=i[r];var m=p in t;if(p===e.STOP_CHAR){u._stops.push(u._blocks.length);return a=r,"continue"}if(p==="{"||p==="}"){n=!n;return a=r,"continue"}if(p==="["||p==="]"){s=!s;return a=r,"continue"}if(p===e.ESCAPE_CHAR){++r;p=i[r];if(!p)return a=r,"break";m=false}var x=m?new PatternInputDefinition(__assign(__assign({isOptional:s,lazy:u.lazy,eager:u.eager,placeholderChar:u.placeholderChar,displayChar:u.displayChar},normalizeOpts(t[p])),{parent:u})):new PatternFixedDefinition({char:p,eager:u.eager,isUnmasking:n});u._blocks.push(x);a=r};var u=this,a;for(var o=0;o<i.length;++o){var l=r(o);o=a;if(l==="break")break}};Object.defineProperty(e.prototype,"state",{get:function(){return __assign(__assign({},t.prototype.state),{_blocks:this._blocks.map((function(t){return t.state}))})},set:function(e){if(!e){this.reset();return}var i=e._blocks,n=__rest(e,["_blocks"]);this._blocks.forEach((function(t,e){return t.state=i[e]}));t.prototype.state=n},enumerable:false,configurable:true});e.prototype.reset=function(){t.prototype.reset.call(this);this._blocks.forEach((function(t){return t.reset()}))};Object.defineProperty(e.prototype,"isComplete",{get:function(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((function(t){return t.isComplete}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFilled",{get:function(){return this._blocks.every((function(t){return t.isFilled}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFixed",{get:function(){return this._blocks.every((function(t){return t.isFixed}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isOptional",{get:function(){return this._blocks.every((function(t){return t.isOptional}))},enumerable:false,configurable:true});e.prototype.doCommit=function(){this._blocks.forEach((function(t){return t.doCommit()}));t.prototype.doCommit.call(this)};Object.defineProperty(e.prototype,"unmaskedValue",{get:function(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((function(t,e){return t+=e.unmaskedValue}),"")},set:function(e){if(this.exposeBlock){var i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e;this.appendTail(i);this.doCommit()}else t.prototype.unmaskedValue=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"value",{get:function(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((function(t,e){return t+=e.value}),"")},set:function(e){if(this.exposeBlock){var i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e;this.appendTail(i);this.doCommit()}else t.prototype.value=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"typedValue",{get:function(){return this.exposeBlock?this.exposeBlock.typedValue:t.prototype.typedValue},set:function(e){if(this.exposeBlock){var i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e;this.appendTail(i);this.doCommit()}else t.prototype.typedValue=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"displayValue",{get:function(){return this._blocks.reduce((function(t,e){return t+=e.displayValue}),"")},enumerable:false,configurable:true});e.prototype.appendTail=function(e){return t.prototype.appendTail.call(this,e).aggregate(this._appendPlaceholder())};e.prototype._appendEager=function(){var t;var e=new ChangeDetails;var i=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(i==null)return e;if(this._blocks[i].isFilled)++i;for(var n=i;n<this._blocks.length;++n){var s=this._blocks[n]._appendEager();if(!s.inserted)break;e.aggregate(s)}return e};e.prototype._appendCharRaw=function(t,e){if(e===void 0){e={}}var i=this._mapPosToBlock(this.displayValue.length);var n=new ChangeDetails;if(!i)return n;for(var s=i.index,r=void 0;r=this._blocks[s];++s){var u;var a=r._appendChar(t,__assign(__assign({},e),{_beforeTailState:(u=e._beforeTailState)==null||(u=u._blocks)==null?void 0:u[s]}));n.aggregate(a);if(a.consumed)break}return n};e.prototype.extractTail=function(t,e){var i=this;if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}var n=new ChunksTailDetails;if(t===e)return n;this._forEachBlocksInRange(t,e,(function(t,e,s,r){var u=t.extractTail(s,r);u.stop=i._findStopBefore(e);u.from=i._blockStartPos(e);if(u instanceof ChunksTailDetails)u.blockIndex=e;n.extend(u)}));return n};e.prototype.extractInput=function(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}if(i===void 0){i={}}if(t===e)return"";var n="";this._forEachBlocksInRange(t,e,(function(t,e,s,r){n+=t.extractInput(s,r,i)}));return n};e.prototype._findStopBefore=function(t){var e;for(var i=0;i<this._stops.length;++i){var n=this._stops[i];if(n<=t)e=n;else break}return e};e.prototype._appendPlaceholder=function(t){var e=new ChangeDetails;if(this.lazy&&t==null)return e;var i=this._mapPosToBlock(this.displayValue.length);if(!i)return e;var n=i.index;var s=t!=null?t:this._blocks.length;this._blocks.slice(n,s).forEach((function(i){if(!i.lazy||t!=null){var n;e.aggregate(i._appendPlaceholder((n=i._blocks)==null?void 0:n.length))}}));return e};e.prototype._mapPosToBlock=function(t){var e="";for(var i=0;i<this._blocks.length;++i){var n=this._blocks[i];var s=e.length;e+=n.displayValue;if(t<=e.length){return{index:i,offset:t-s}}}};e.prototype._blockStartPos=function(t){return this._blocks.slice(0,t).reduce((function(t,e){return t+=e.displayValue.length}),0)};e.prototype._forEachBlocksInRange=function(t,e,i){if(e===void 0){e=this.displayValue.length}var n=this._mapPosToBlock(t);if(n){var s=this._mapPosToBlock(e);var r=s&&n.index===s.index;var u=n.offset;var a=s&&r?s.offset:this._blocks[n.index].displayValue.length;i(this._blocks[n.index],n.index,u,a);if(s&&!r){for(var o=n.index+1;o<s.index;++o){i(this._blocks[o],o,0,this._blocks[o].displayValue.length)}i(this._blocks[s.index],s.index,0,s.offset)}}};e.prototype.remove=function(e,i){if(e===void 0){e=0}if(i===void 0){i=this.displayValue.length}var n=t.prototype.remove.call(this,e,i);this._forEachBlocksInRange(e,i,(function(t,e,i,s){n.aggregate(t.remove(i,s))}));return n};e.prototype.nearestInputPos=function(t,e){if(e===void 0){e=DIRECTION.NONE}if(!this._blocks.length)return 0;var i=new PatternCursor(this,t);if(e===DIRECTION.NONE){if(i.pushRightBeforeInput())return i.pos;i.popState();if(i.pushLeftBeforeInput())return i.pos;return this.displayValue.length}if(e===DIRECTION.LEFT||e===DIRECTION.FORCE_LEFT){if(e===DIRECTION.LEFT){i.pushRightBeforeFilled();if(i.ok&&i.pos===t)return t;i.popState()}i.pushLeftBeforeInput();i.pushLeftBeforeRequired();i.pushLeftBeforeFilled();if(e===DIRECTION.LEFT){i.pushRightBeforeInput();i.pushRightBeforeRequired();if(i.ok&&i.pos<=t)return i.pos;i.popState();if(i.ok&&i.pos<=t)return i.pos;i.popState()}if(i.ok)return i.pos;if(e===DIRECTION.FORCE_LEFT)return 0;i.popState();if(i.ok)return i.pos;i.popState();if(i.ok)return i.pos;return 0}if(e===DIRECTION.RIGHT||e===DIRECTION.FORCE_RIGHT){i.pushRightBeforeInput();i.pushRightBeforeRequired();if(i.pushRightBeforeFilled())return i.pos;if(e===DIRECTION.FORCE_RIGHT)return this.displayValue.length;i.popState();if(i.ok)return i.pos;i.popState();if(i.ok)return i.pos;return this.nearestInputPos(t,DIRECTION.LEFT)}return t};e.prototype.totalInputPositions=function(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}var i=0;this._forEachBlocksInRange(t,e,(function(t,e,n,s){i+=t.totalInputPositions(n,s)}));return i};e.prototype.maskedBlock=function(t){return this.maskedBlocks(t)[0]};e.prototype.maskedBlocks=function(t){var e=this;var i=this._maskedBlocks[t];if(!i)return[];return i.map((function(t){return e._blocks[t]}))};e.prototype.pad=function(t){var e=new ChangeDetails;this._forEachBlocksInRange(0,this.displayValue.length,(function(i){return e.aggregate(i.pad(t))}));return e};return e}(Masked);MaskedPattern.DEFAULTS=__assign(__assign({},Masked.DEFAULTS),{lazy:true,placeholderChar:"_"});MaskedPattern.STOP_CHAR="`";MaskedPattern.ESCAPE_CHAR="\\";MaskedPattern.InputDefinition=PatternInputDefinition;MaskedPattern.FixedDefinition=PatternFixedDefinition;IMask.MaskedPattern=MaskedPattern;var MaskedRange=function(t){__extends(e,t);function e(e){return t.call(this,e)||this}Object.defineProperty(e.prototype,"_matchFrom",{get:function(){return this.maxLength-String(this.from).length},enumerable:false,configurable:true});e.prototype.updateOptions=function(e){t.prototype.updateOptions.call(this,e)};e.prototype._update=function(e){var i=e.to,n=i===void 0?this.to||0:i,s=e.from,r=s===void 0?this.from||0:s,u=e.maxLength,a=u===void 0?this.maxLength||0:u,o=e.autofix,l=o===void 0?this.autofix:o,h=__rest(e,["to","from","maxLength","autofix"]);this.to=n;this.from=r;this.maxLength=Math.max(String(n).length,a);this.autofix=l;var c=String(this.from).padStart(this.maxLength,"0");var f=String(this.to).padStart(this.maxLength,"0");var d=0;while(d<f.length&&f[d]===c[d])++d;h.mask=f.slice(0,d).replace(/0/g,"\\0")+"0".repeat(this.maxLength-d);t.prototype._update.call(this,h)};Object.defineProperty(e.prototype,"isComplete",{get:function(){return t.prototype.isComplete&&Boolean(this.value)},enumerable:false,configurable:true});e.prototype.boundaries=function(t){var e="";var i="";var n=t.match(/^(\D*)(\d*)(\D*)/)||[],s=n[1],r=n[2];if(r){e="0".repeat(s.length)+r;i="9".repeat(s.length)+r}e=e.padEnd(this.maxLength,"0");i=i.padEnd(this.maxLength,"9");return[e,i]};e.prototype.doPrepareChar=function(e,i){var n;if(i===void 0){i={}}var s;n=t.prototype.doPrepareChar.call(this,e.replace(/\D/g,""),i),e=n[0],s=n[1];if(!e)s.skip=!this.isComplete;return[e,s]};e.prototype._appendCharRaw=function(e,i){if(i===void 0){i={}}if(!this.autofix||this.value.length+1>this.maxLength)return t.prototype._appendCharRaw.call(this,e,i);var n=String(this.from).padStart(this.maxLength,"0");var s=String(this.to).padStart(this.maxLength,"0");var r=this.boundaries(this.value+e),u=r[0],a=r[1];if(Number(a)<this.from)return t.prototype._appendCharRaw.call(this,n[this.value.length],i);if(Number(u)>this.to){if(!i.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength){return t.prototype._appendCharRaw.call(this,n[this.value.length],i).aggregate(this._appendCharRaw(e,i))}return t.prototype._appendCharRaw.call(this,s[this.value.length],i)}return t.prototype._appendCharRaw.call(this,e,i)};e.prototype.doValidate=function(e){var i=this.value;var n=i.search(/[^0]/);if(n===-1&&i.length<=this._matchFrom)return true;var s=this.boundaries(i),r=s[0],u=s[1];return this.from<=Number(u)&&Number(r)<=this.to&&t.prototype.doValidate.call(this,e)};e.prototype.pad=function(e){var i=this;var n=new ChangeDetails;if(this.value.length===this.maxLength)return n;var s=this.value;var r=this.maxLength-this.value.length;if(r){this.reset();for(var u=0;u<r;++u){n.aggregate(t.prototype._appendCharRaw.call(this,"0",e))}s.split("").forEach((function(t){return i._appendCharRaw(t)}))}return n};return e}(MaskedPattern);IMask.MaskedRange=MaskedRange;var DefaultPattern="d{.}`m{.}`Y";var MaskedDate=function(t){__extends(e,t);function e(i){return t.call(this,e.extractPatternOptions(__assign(__assign({},e.DEFAULTS),i)))||this}e.extractPatternOptions=function(t){var e=t.mask,i=t.pattern,n=__rest(t,["mask","pattern"]);return __assign(__assign({},n),{mask:isString(e)?e:i})};e.prototype.updateOptions=function(e){t.prototype.updateOptions.call(this,e)};e.prototype._update=function(i){var n=__assign(__assign({},e.DEFAULTS),i),s=n.mask,r=n.pattern,u=n.blocks,a=__rest(n,["mask","pattern","blocks"]);var o=Object.assign({},e.GET_DEFAULT_BLOCKS());if(i.min)o.Y.from=i.min.getFullYear();if(i.max)o.Y.to=i.max.getFullYear();if(i.min&&i.max&&o.Y.from===o.Y.to){o.m.from=i.min.getMonth()+1;o.m.to=i.max.getMonth()+1;if(o.m.from===o.m.to){o.d.from=i.min.getDate();o.d.to=i.max.getDate()}}Object.assign(o,this.blocks,u);t.prototype._update.call(this,__assign(__assign({},a),{mask:isString(s)?s:r,blocks:o}))};e.prototype.doValidate=function(e){var i=this.date;return t.prototype.doValidate.call(this,e)&&(!this.isComplete||this.isDateExist(this.value)&&i!=null&&(this.min==null||this.min<=i)&&(this.max==null||i<=this.max))};e.prototype.isDateExist=function(t){return this.format(this.parse(t,this),this).indexOf(t)>=0};Object.defineProperty(e.prototype,"date",{get:function(){return this.typedValue},set:function(t){this.typedValue=t},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"typedValue",{get:function(){return this.isComplete?t.prototype.typedValue:null},set:function(e){t.prototype.typedValue=e},enumerable:false,configurable:true});e.prototype.maskEquals=function(e){return e===Date||t.prototype.maskEquals.call(this,e)};e.prototype.optionsIsChanged=function(i){return t.prototype.optionsIsChanged.call(this,e.extractPatternOptions(i))};return e}(MaskedPattern);MaskedDate.GET_DEFAULT_BLOCKS=function(){return{d:{mask:MaskedRange,from:1,to:31,maxLength:2},m:{mask:MaskedRange,from:1,to:12,maxLength:2},Y:{mask:MaskedRange,from:1900,to:9999}}};MaskedDate.DEFAULTS=__assign(__assign({},MaskedPattern.DEFAULTS),{mask:Date,pattern:DefaultPattern,format:function(t,e){if(!t)return"";var i=String(t.getDate()).padStart(2,"0");var n=String(t.getMonth()+1).padStart(2,"0");var s=t.getFullYear();return[i,n,s].join(".")},parse:function(t,e){var i=t.split(".").map(Number),n=i[0],s=i[1],r=i[2];return new Date(r,s-1,n)}});IMask.MaskedDate=MaskedDate;var MaskedDynamic=function(t){__extends(e,t);function e(i){var n=t.call(this,__assign(__assign({},e.DEFAULTS),i))||this;n.currentMask=undefined;return n}e.prototype.updateOptions=function(e){t.prototype.updateOptions.call(this,e)};e.prototype._update=function(e){var i=this;t.prototype._update.call(this,e);if("mask"in e){this.exposeMask=undefined;this.compiledMasks=Array.isArray(e.mask)?e.mask.map((function(t){var e=normalizeOpts(t),n=e.expose,s=__rest(e,["expose"]);var r=createMask(__assign({overwrite:i._overwrite,eager:i._eager,skipInvalid:i._skipInvalid},s));if(n)i.exposeMask=r;return r})):[]}};e.prototype._appendCharRaw=function(t,e){if(e===void 0){e={}}var i=this._applyDispatch(t,e);if(this.currentMask){i.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e)))}return i};e.prototype._applyDispatch=function(t,e,i){if(t===void 0){t=""}if(e===void 0){e={}}if(i===void 0){i=""}var n=e.tail&&e._beforeTailState!=null?e._beforeTailState._value:this.value;var s=this.rawInputValue;var r=e.tail&&e._beforeTailState!=null?e._beforeTailState._rawInputValue:s;var u=s.slice(r.length);var a=this.currentMask;var o=new ChangeDetails;var l=a==null?void 0:a.state;this.currentMask=this.doDispatch(t,__assign({},e),i);if(this.currentMask){if(this.currentMask!==a){this.currentMask.reset();if(r){this.currentMask.append(r,{raw:true});o.tailShift=this.currentMask.value.length-n.length}if(u){o.tailShift+=this.currentMask.append(u,{raw:true,tail:true}).tailShift}}else if(l){this.currentMask.state=l}}return o};e.prototype._appendPlaceholder=function(){var t=this._applyDispatch();if(this.currentMask){t.aggregate(this.currentMask._appendPlaceholder())}return t};e.prototype._appendEager=function(){var t=this._applyDispatch();if(this.currentMask){t.aggregate(this.currentMask._appendEager())}return t};e.prototype.appendTail=function(e){var i=new ChangeDetails;if(e)i.aggregate(this._applyDispatch("",{},e));return i.aggregate(this.currentMask?this.currentMask.appendTail(e):t.prototype.appendTail.call(this,e))};e.prototype.currentMaskFlags=function(t){var e,i;return __assign(__assign({},t),{_beforeTailState:((e=t._beforeTailState)==null?void 0:e.currentMaskRef)===this.currentMask&&((i=t._beforeTailState)==null?void 0:i.currentMask)||t._beforeTailState})};e.prototype.doDispatch=function(t,e,i){if(e===void 0){e={}}if(i===void 0){i=""}return this.dispatch(t,this,e,i)};e.prototype.doValidate=function(e){return t.prototype.doValidate.call(this,e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))};e.prototype.doPrepare=function(e,i){var n;if(i===void 0){i={}}var s=t.prototype.doPrepare.call(this,e,i),r=s[0],u=s[1];if(this.currentMask){var a=void 0;n=t.prototype.doPrepare.call(this,r,this.currentMaskFlags(i)),r=n[0],a=n[1];u=u.aggregate(a)}return[r,u]};e.prototype.doPrepareChar=function(e,i){var n;if(i===void 0){i={}}var s=t.prototype.doPrepareChar.call(this,e,i),r=s[0],u=s[1];if(this.currentMask){var a=void 0;n=t.prototype.doPrepareChar.call(this,r,this.currentMaskFlags(i)),r=n[0],a=n[1];u=u.aggregate(a)}return[r,u]};e.prototype.reset=function(){var t;(t=this.currentMask)==null||t.reset();this.compiledMasks.forEach((function(t){return t.reset()}))};Object.defineProperty(e.prototype,"value",{get:function(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""},set:function(e){if(this.exposeMask){this.exposeMask.value=e;this.currentMask=this.exposeMask;this._applyDispatch()}else t.prototype.value=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"unmaskedValue",{get:function(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""},set:function(e){if(this.exposeMask){this.exposeMask.unmaskedValue=e;this.currentMask=this.exposeMask;this._applyDispatch()}else t.prototype.unmaskedValue=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"typedValue",{get:function(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""},set:function(t){if(this.exposeMask){this.exposeMask.typedValue=t;this.currentMask=this.exposeMask;this._applyDispatch();return}var e=String(t);if(this.currentMask){this.currentMask.typedValue=t;e=this.currentMask.unmaskedValue}this.unmaskedValue=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"displayValue",{get:function(){return this.currentMask?this.currentMask.displayValue:""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isComplete",{get:function(){var t;return Boolean((t=this.currentMask)==null?void 0:t.isComplete)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFilled",{get:function(){var t;return Boolean((t=this.currentMask)==null?void 0:t.isFilled)},enumerable:false,configurable:true});e.prototype.remove=function(t,e){var i=new ChangeDetails;if(this.currentMask){i.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch())}return i};Object.defineProperty(e.prototype,"state",{get:function(){var e;return __assign(__assign({},t.prototype.state),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((function(t){return t.state})),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state})},set:function(e){var i=e.compiledMasks,n=e.currentMaskRef,s=e.currentMask,r=__rest(e,["compiledMasks","currentMaskRef","currentMask"]);if(i)this.compiledMasks.forEach((function(t,e){return t.state=i[e]}));if(n!=null){this.currentMask=n;this.currentMask.state=s}t.prototype.state=r},enumerable:false,configurable:true});e.prototype.extractInput=function(t,e,i){return this.currentMask?this.currentMask.extractInput(t,e,i):""};e.prototype.extractTail=function(e,i){return this.currentMask?this.currentMask.extractTail(e,i):t.prototype.extractTail.call(this,e,i)};e.prototype.doCommit=function(){if(this.currentMask)this.currentMask.doCommit();t.prototype.doCommit.call(this)};e.prototype.nearestInputPos=function(e,i){return this.currentMask?this.currentMask.nearestInputPos(e,i):t.prototype.nearestInputPos.call(this,e,i)};Object.defineProperty(e.prototype,"overwrite",{get:function(){return this.currentMask?this.currentMask.overwrite:this._overwrite},set:function(t){this._overwrite=t},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"eager",{get:function(){return this.currentMask?this.currentMask.eager:this._eager},set:function(t){this._eager=t},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"skipInvalid",{get:function(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid},set:function(t){this._skipInvalid=t},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"autofix",{get:function(){return this.currentMask?this.currentMask.autofix:this._autofix},set:function(t){this._autofix=t},enumerable:false,configurable:true});e.prototype.maskEquals=function(e){return Array.isArray(e)?this.compiledMasks.every((function(t,i){if(!e[i])return;var n=e[i],s=n.mask,r=__rest(n,["mask"]);return objectIncludes(t,r)&&t.maskEquals(s)})):t.prototype.maskEquals.call(this,e)};e.prototype.typedValueEquals=function(t){var e;return Boolean((e=this.currentMask)==null?void 0:e.typedValueEquals(t))};return e}(Masked);MaskedDynamic.DEFAULTS=__assign(__assign({},Masked.DEFAULTS),{dispatch:function(t,e,i,n){if(!e.compiledMasks.length)return;var s=e.rawInputValue;var r=e.compiledMasks.map((function(r,u){var a=e.currentMask===r;var o=a?r.displayValue.length:r.nearestInputPos(r.displayValue.length,DIRECTION.FORCE_LEFT);if(r.rawInputValue!==s){r.reset();r.append(s,{raw:true})}else if(!a){r.remove(o)}r.append(t,e.currentMaskFlags(i));r.appendTail(n);return{index:u,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(o,r.nearestInputPos(r.displayValue.length,DIRECTION.FORCE_LEFT)))}}));r.sort((function(t,e){return e.weight-t.weight||e.totalInputPositions-t.totalInputPositions}));return e.compiledMasks[r[0].index]}});IMask.MaskedDynamic=MaskedDynamic;var MaskedEnum=function(t){__extends(e,t);function e(i){return t.call(this,__assign(__assign({},e.DEFAULTS),i))||this}e.prototype.updateOptions=function(e){t.prototype.updateOptions.call(this,e)};e.prototype._update=function(e){var i=e.enum,n=__rest(e,["enum"]);if(i){var s=i.map((function(t){return t.length}));var r=Math.min.apply(Math,s);var u=Math.max.apply(Math,s)-r;n.mask="*".repeat(r);if(u)n.mask+="["+"*".repeat(u)+"]";this.enum=i}t.prototype._update.call(this,n)};e.prototype._appendCharRaw=function(e,i){var n=this;if(i===void 0){i={}}var s=Math.min(this.nearestInputPos(0,DIRECTION.FORCE_RIGHT),this.value.length);var r=this.enum.filter((function(t){return n.matchValue(t,n.unmaskedValue+e,s)}));if(r.length){if(r.length===1){this._forEachBlocksInRange(0,this.value.length,(function(t,e){var s=r[0][e];if(e>=n.value.length||s===t.value)return;t.reset();t._appendChar(s,i)}))}var u=t.prototype._appendCharRaw.call(this,r[0][this.value.length],i);if(r.length===1){r[0].slice(this.unmaskedValue.length).split("").forEach((function(e){return u.aggregate(t.prototype._appendCharRaw.call(n,e))}))}return u}return new ChangeDetails({skip:!this.isComplete})};e.prototype.extractTail=function(t,e){if(t===void 0){t=0}return new ContinuousTailDetails("",t)};e.prototype.remove=function(e,i){var n=this;if(e===void 0){e=0}if(i===void 0){i=this.displayValue.length}if(e===i)return new ChangeDetails;var s=Math.min(t.prototype.nearestInputPos.call(this,0,DIRECTION.FORCE_RIGHT),this.value.length);var r;for(r=e;r>=0;--r){var u=this.enum.filter((function(t){return n.matchValue(t,n.value.slice(s,r),s)}));if(u.length>1)break}var a=t.prototype.remove.call(this,r,i);a.tailShift+=r-e;return a};Object.defineProperty(e.prototype,"isComplete",{get:function(){return this.enum.indexOf(this.value)>=0},enumerable:false,configurable:true});return e}(MaskedPattern);MaskedEnum.DEFAULTS=__assign(__assign({},MaskedPattern.DEFAULTS),{matchValue:function(t,e,i){return t.indexOf(e,i)===i}});IMask.MaskedEnum=MaskedEnum;var MaskedFunction=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype.updateOptions=function(e){t.prototype.updateOptions.call(this,e)};e.prototype._update=function(e){t.prototype._update.call(this,__assign(__assign({},e),{validate:e.mask}))};return e}(Masked);IMask.MaskedFunction=MaskedFunction;var _MaskedNumber;var MaskedNumber=function(t){__extends(e,t);function e(i){return t.call(this,__assign(__assign({},e.DEFAULTS),i))||this}e.prototype.updateOptions=function(e){t.prototype.updateOptions.call(this,e)};e.prototype._update=function(e){t.prototype._update.call(this,e);this._updateRegExps()};e.prototype._updateRegExps=function(){var t="^"+(this.allowNegative?"[+|\\-]?":"");var e="\\d*";var i=(this.scale?"("+escapeRegExp(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+e+i);this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(escapeRegExp).join("")+"]","g");this._thousandsSeparatorRegExp=new RegExp(escapeRegExp(this.thousandsSeparator),"g")};e.prototype._removeThousandsSeparators=function(t){return t.replace(this._thousandsSeparatorRegExp,"")};e.prototype._insertThousandsSeparators=function(t){var e=t.split(this.radix);e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator);return e.join(this.radix)};e.prototype.doPrepareChar=function(e,i){if(i===void 0){i={}}var n=t.prototype.doPrepareChar.call(this,this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(i.input&&i.raw||!i.input&&!i.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),i),s=n[0],r=n[1];if(e&&!s)r.skip=true;if(s&&!this.allowPositive&&!this.value&&s!=="-")r.aggregate(this._appendChar("-"));return[s,r]};e.prototype._separatorsCount=function(t,e){if(e===void 0){e=false}var i=0;for(var n=0;n<t;++n){if(this._value.indexOf(this.thousandsSeparator,n)===n){++i;if(e)t+=this.thousandsSeparator.length}}return i};e.prototype._separatorsCountFromSlice=function(t){if(t===void 0){t=this._value}return this._separatorsCount(this._removeThousandsSeparators(t).length,true)};e.prototype.extractInput=function(e,i,n){var s;if(e===void 0){e=0}if(i===void 0){i=this.displayValue.length}s=this._adjustRangeWithSeparators(e,i),e=s[0],i=s[1];return this._removeThousandsSeparators(t.prototype.extractInput.call(this,e,i,n))};e.prototype._appendCharRaw=function(t,i){if(i===void 0){i={}}var n=i.tail&&i._beforeTailState?i._beforeTailState._value:this._value;var s=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);var r=this._value;this._value+=t;var u=this.number;var a=!isNaN(u);var o=false;if(a){var l=void 0;if(this.min!=null&&this.min<0&&this.number<this.min)l=this.min;if(this.max!=null&&this.max>0&&this.number>this.max)l=this.max;if(l!=null){if(this.autofix){this._value=this.format(l,this).replace(e.UNMASKED_RADIX,this.radix);o||(o=r===this._value&&!i.tail)}else{a=false}}a&&(a=Boolean(this._value.match(this._numberRegExp)))}var h;if(!a){this._value=r;h=new ChangeDetails}else{h=new ChangeDetails({inserted:this._value.slice(r.length),rawInserted:o?"":t,skip:o})}this._value=this._insertThousandsSeparators(this._value);var c=i.tail&&i._beforeTailState?i._beforeTailState._value:this._value;var f=this._separatorsCountFromSlice(c);h.tailShift+=(f-s)*this.thousandsSeparator.length;return h};e.prototype._findSeparatorAround=function(t){if(this.thousandsSeparator){var e=t-this.thousandsSeparator.length+1;var i=this.value.indexOf(this.thousandsSeparator,e);if(i<=t)return i}return-1};e.prototype._adjustRangeWithSeparators=function(t,e){var i=this._findSeparatorAround(t);if(i>=0)t=i;var n=this._findSeparatorAround(e);if(n>=0)e=n+this.thousandsSeparator.length;return[t,e]};e.prototype.remove=function(t,e){var i;if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}i=this._adjustRangeWithSeparators(t,e),t=i[0],e=i[1];var n=this.value.slice(0,t);var s=this.value.slice(e);var r=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+s));var u=this._separatorsCountFromSlice(n);return new ChangeDetails({tailShift:(u-r)*this.thousandsSeparator.length})};e.prototype.nearestInputPos=function(t,e){if(!this.thousandsSeparator)return t;switch(e){case DIRECTION.NONE:case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:{var i=this._findSeparatorAround(t-1);if(i>=0){var n=i+this.thousandsSeparator.length;if(t<n||this.value.length<=n||e===DIRECTION.FORCE_LEFT){return i}}break}case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:{var s=this._findSeparatorAround(t);if(s>=0){return s+this.thousandsSeparator.length}}}return t};e.prototype.doCommit=function(){if(this.value){var e=this.number;var i=e;if(this.min!=null)i=Math.max(i,this.min);if(this.max!=null)i=Math.min(i,this.max);if(i!==e)this.unmaskedValue=this.format(i,this);var n=this.value;if(this.normalizeZeros)n=this._normalizeZeros(n);if(this.padFractionalZeros&&this.scale>0)n=this._padFractionalZeros(n);this._value=n}t.prototype.doCommit.call(this)};e.prototype._normalizeZeros=function(t){var e=this._removeThousandsSeparators(t).split(this.radix);e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,(function(t,e,i,n){return e+n}));if(t.length&&!/\d$/.test(e[0]))e[0]=e[0]+"0";if(e.length>1){e[1]=e[1].replace(/0*$/,"");if(!e[1].length)e.length=1}return this._insertThousandsSeparators(e.join(this.radix))};e.prototype._padFractionalZeros=function(t){if(!t)return t;var e=t.split(this.radix);if(e.length<2)e.push("");e[1]=e[1].padEnd(this.scale,"0");return e.join(this.radix)};e.prototype.doSkipInvalid=function(i,n,s){if(n===void 0){n={}}var r=this.scale===0&&i!==this.thousandsSeparator&&(i===this.radix||i===e.UNMASKED_RADIX||this.mapToRadix.includes(i));return t.prototype.doSkipInvalid.call(this,i,n,s)&&!r};Object.defineProperty(e.prototype,"unmaskedValue",{get:function(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,e.UNMASKED_RADIX)},set:function(e){t.prototype.unmaskedValue=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"typedValue",{get:function(){return this.parse(this.unmaskedValue,this)},set:function(t){this.rawInputValue=this.format(t,this).replace(e.UNMASKED_RADIX,this.radix)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"number",{get:function(){return this.typedValue},set:function(t){this.typedValue=t},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allowNegative",{get:function(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allowPositive",{get:function(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0},enumerable:false,configurable:true});e.prototype.typedValueEquals=function(i){return(t.prototype.typedValueEquals.call(this,i)||e.EMPTY_VALUES.includes(i)&&e.EMPTY_VALUES.includes(this.typedValue))&&!(i===0&&this.value==="")};return e}(Masked);_MaskedNumber=MaskedNumber;MaskedNumber.UNMASKED_RADIX=".";MaskedNumber.EMPTY_VALUES=__spreadArray(__spreadArray([],Masked.EMPTY_VALUES,true),[0],false);MaskedNumber.DEFAULTS=__assign(__assign({},Masked.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[_MaskedNumber.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:true,padFractionalZeros:false,parse:Number,format:function(t){return t.toLocaleString("en-US",{useGrouping:false,maximumFractionDigits:20})}});IMask.MaskedNumber=MaskedNumber;var PIPE_TYPE={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function createPipe(t,e,i){if(e===void 0){e=PIPE_TYPE.MASKED}if(i===void 0){i=PIPE_TYPE.MASKED}var n=createMask(t);return function(t){return n.runIsolated((function(n){n[e]=t;return n[i]}))}}function pipe(t,e,i,n){return createPipe(e,i,n)(t)}IMask.PIPE_TYPE=PIPE_TYPE;IMask.createPipe=createPipe;IMask.pipe=pipe;var RepeatBlock=function(t){__extends(e,t);function e(e){return t.call(this,e)||this}Object.defineProperty(e.prototype,"repeatFrom",{get:function(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===Infinity?0:this.repeat)!=null?t:0},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"repeatTo",{get:function(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:Infinity},enumerable:false,configurable:true});e.prototype.updateOptions=function(e){t.prototype.updateOptions.call(this,e)};e.prototype._update=function(e){var i,n,s;var r=normalizeOpts(e),u=r.repeat,a=__rest(r,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,a);var o=createMask(this._blockOpts);this.repeat=(i=(n=u!=null?u:o.repeat)!=null?n:this.repeat)!=null?i:Infinity;t.prototype._update.call(this,{mask:"m".repeat(Math.max(this.repeatTo===Infinity&&((s=this._blocks)==null?void 0:s.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})};e.prototype._allocateBlock=function(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===Infinity||this._blocks.length<this.repeatTo){this._blocks.push(createMask(this._blockOpts));this.mask+="m";return this._blocks[this._blocks.length-1]}};e.prototype._appendCharRaw=function(t,e){if(e===void 0){e={}}var i=new ChangeDetails;for(var n=(u=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?u:Math.max(this._blocks.length-1,0),s=void 0,r=void 0;s=(o=this._blocks[n])!=null?o:r=!r&&this._allocateBlock(n);++n){var u,a,o,l;var h=s._appendChar(t,__assign(__assign({},e),{_beforeTailState:(l=e._beforeTailState)==null||(l=l._blocks)==null?void 0:l[n]}));if(h.skip&&r){this._blocks.pop();this.mask=this.mask.slice(1);break}i.aggregate(h);if(h.consumed)break}return i};e.prototype._trimEmptyTail=function(t,e){var i,n;if(t===void 0){t=0}var s=Math.max(((i=this._mapPosToBlock(t))==null?void 0:i.index)||0,this.repeatFrom,0);var r;if(e!=null)r=(n=this._mapPosToBlock(e))==null?void 0:n.index;if(r==null)r=this._blocks.length-1;var u=0;for(var a=r;s<=a;--a,++u){if(this._blocks[a].unmaskedValue)break}if(u){this._blocks.splice(r-u+1,u);this.mask=this.mask.slice(u)}};e.prototype.reset=function(){t.prototype.reset.call(this);this._trimEmptyTail()};e.prototype.remove=function(e,i){if(e===void 0){e=0}if(i===void 0){i=this.displayValue.length}var n=t.prototype.remove.call(this,e,i);this._trimEmptyTail(e,i);return n};e.prototype.totalInputPositions=function(e,i){if(e===void 0){e=0}if(i==null&&this.repeatTo===Infinity)return Infinity;return t.prototype.totalInputPositions.call(this,e,i)};Object.defineProperty(e.prototype,"state",{get:function(){return t.prototype.state},set:function(e){this._blocks.length=e._blocks.length;this.mask=this.mask.slice(0,this._blocks.length);t.prototype.state=e},enumerable:false,configurable:true});return e}(MaskedPattern);IMask.RepeatBlock=RepeatBlock;try{globalThis.IMask=IMask}catch(t){}var verdocsKbaDialogCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:10px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-kba-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-kba-dialog .field label{margin-top:4px;-ms-flex:0 0 120px;flex:0 0 120px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-kba-dialog .field verdocs-date-input{width:40%;-ms-flex-positive:1;flex-grow:1}verdocs-kba-dialog .field verdocs-date-input input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';var States={AL:"Alabama",AK:"Alaska",AS:"American Samoa",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District Of Columbia",FM:"Federated States Of Micronesia",FL:"Florida",GA:"Georgia",GU:"Guam",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MH:"Marshall Islands",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",MP:"Northern Mariana Islands",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PW:"Palau",PA:"Pennsylvania",PR:"Puerto Rico",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VI:"Virgin Islands",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"};var STATE_OPTIONS=Object.entries(States).map((function(t){var e=t[0],i=t[1];return{value:e,label:i}}));var QuestionIcon$1='<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>';var VerdocsKbaDialog=function(){function t(t){registerInstance(this,t);this.exit=createEvent(this,"exit");this.pinEntered=createEvent(this,"pinEntered");this.next=createEvent(this,"next");this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.recipient=null;this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.agreed=false;this.response="";this.updatedRecipient=null;this.dobContainerId="verdocs-date-input-".concat(Math.random().toString(36).substring(2,11))}t.prototype.componentWillLoad=function(){this.updatedRecipient=__assign({},this.recipient||{})};t.prototype.componentDidRender=function(){IMask(document.getElementById(this.dobContainerId),{mask:Date,min:new Date(1920,0,1),max:new Date(2007,12,31),lazy:false,pattern:"m/d/Y",format:function(t){var e=t.getDate();var i=t.getMonth()+1;var n=t.getFullYear();if(e<10)e="0"+e;if(i<10)i="0"+i;return[i,e,n].join("/")},parse:function(t){var e=t.split("/");return new Date(e[2],e[0]-1,e[1])}})};t.prototype.handleCancel=function(){this.exit.emit()};t.prototype.handleDismiss=function(t){if(t.target.class==="background-overlay"){t.preventDefault();this.handleCancel()}};t.prototype.handleDone=function(){this.next.emit(this.response);this.response=""};t.prototype.handleConfirmID=function(){console.log("Confirm ID",this.updatedRecipient);this.next.emit(this.updatedRecipient)};t.prototype.render=function(){var t=this;var e,i,n,s,r,u,a,o,l,c,f,d,v,g;if(this.mode==="choice"){return h(Host,null,h("div",{class:"background-overlay",onClick:function(e){return t.handleDismiss(e)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon$1}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"choices"},this.choices.map((function(e){return h("div",{class:"choice ".concat(e===t.response?"selected":""),onClick:function(){console.log("Selected",e);t.response=e}},e)}))),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return t.handleCancel()}}),h("verdocs-button",{label:this.step<this.steps?"Next":"Submit",onClick:function(){return t.handleDone()},disabled:!this.response})))))}if(this.mode==="identity"){return h(Host,null,h("div",{class:"background-overlay",onClick:function(e){return t.handleDismiss(e)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Confirm Your Identity"),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-first"},"Your Name:",h("span",{class:"required"},"*")),h("input",{required:true,type:"text",id:"verdocs-kba-first",name:"verdocs-kba-first",placeholder:"First name...",value:(e=this.updatedRecipient)===null||e===void 0?void 0:e.first_name,onInput:function(e){return t.updatedRecipient=__assign(__assign({},t.updatedRecipient),{first_name:e.target.value})}}),h("input",{type:"text",id:"verdocs-kba-last",name:"verdocs-kba-last",placeholder:"Last name...",required:true,value:(i=this.updatedRecipient)===null||i===void 0?void 0:i.last_name,onInput:function(e){return t.updatedRecipient=__assign(__assign({},t.updatedRecipient),{last_name:e.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-address"},"Address:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-address",name:"verdocs-kba-address",placeholder:"Address...",value:(n=this.updatedRecipient)===null||n===void 0?void 0:n.address,onInput:function(e){return t.updatedRecipient=__assign(__assign({},t.updatedRecipient),{address:e.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-city"},"City:"),h("input",{type:"text",id:"verdocs-kba-city",name:"verdocs-kba-city",placeholder:"City...",value:(s=this.updatedRecipient)===null||s===void 0?void 0:s.city,onInput:function(e){return t.updatedRecipient=__assign(__assign({},t.updatedRecipient),{city:e.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-state"},"State:"),h("verdocs-select-input",{options:STATE_OPTIONS,value:(r=this.updatedRecipient)===null||r===void 0?void 0:r.state,onInput:function(e){return t.updatedRecipient=__assign(__assign({},t.updatedRecipient),{state:e.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-zip"},"Zip Code:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-zip",name:"verdocs-kba-zip",placeholder:"Zip Code...",required:true,value:(u=this.updatedRecipient)===null||u===void 0?void 0:u.zip,onInput:function(e){return t.updatedRecipient=__assign(__assign({},t.updatedRecipient),{zip:e.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-ssn"},"SSN Last 4:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-ssn",name:"verdocs-kba-ssn",placeholder:"Last 4 digits of your Social Security Number...",required:true,value:(a=this.updatedRecipient)===null||a===void 0?void 0:a.ssn_last_4,onInput:function(e){return t.updatedRecipient=__assign(__assign({},t.updatedRecipient),{ssn_last_4:e.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:this.dobContainerId},"Date of Birth:",h("span",{class:"required"},"*")),h("input",{type:"text",value:((o=this.updatedRecipient)===null||o===void 0?void 0:o.dob)||"",id:this.dobContainerId,placeholder:"DOB...",onInput:function(e){return t.updatedRecipient=__assign(__assign({},t.updatedRecipient),{dob:e.target.value})}})),h("div",{class:"field"},h("label",null),h("verdocs-checkbox",{id:"verdocs-kba-agree",name:"verdocs-kba-agree",checked:this.agreed,onInput:function(e){return t.agreed=e.target.checked}}),h("span",null,"I agree to provide my personal information in order to validate my identity.")),h("div",{class:"buttons"},h("verdocs-button",{label:"Submit",onClick:function(){return t.handleConfirmID()},disabled:!this.agreed||!((l=this.updatedRecipient)===null||l===void 0?void 0:l.first_name)||!((c=this.updatedRecipient)===null||c===void 0?void 0:c.last_name)||!((f=this.updatedRecipient)===null||f===void 0?void 0:f.address)||!((d=this.updatedRecipient)===null||d===void 0?void 0:d.zip)||!((v=this.updatedRecipient)===null||v===void 0?void 0:v.ssn_last_4)||!((g=this.updatedRecipient)===null||g===void 0?void 0:g.dob)})))))}return h(Host,null,h("div",{class:"background-overlay",onClick:function(e){return t.handleDismiss(e)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon$1}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"input"},h("label",{htmlFor:"verdocs-kba-input"},this.label),h("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:function(e){return t.response=e.target.value}})),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return t.handleCancel()}}),h("verdocs-button",{label:"Submit",onClick:function(){return t.handleDone()},disabled:!this.response})))))};return t}();VerdocsKbaDialog.style=verdocsKbaDialogCss;var verdocsOtpDialogCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-otp-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-otp-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:10px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-otp-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-otp-dialog .step{margin-left:6px;color:#666}verdocs-otp-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-otp-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-otp-dialog .help-icon{width:40px;height:40px}verdocs-otp-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-otp-dialog .help-text{font-weight:400}verdocs-otp-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-otp-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-otp-dialog .input input{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-otp-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-otp-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-otp-dialog .field label{-ms-flex:0 0 120px;flex:0 0 120px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-otp-dialog .field verdocs-date-input{width:40%;-ms-flex-positive:1;flex-grow:1}verdocs-otp-dialog .field verdocs-date-input input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-otp-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-otp-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-otp-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-otp-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-otp-dialog .buttons verdocs-button{margin-left:16px}';var QuestionIcon='<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>';var VerdocsOtpDialog=function(){function t(t){registerInstance(this,t);this.exit=createEvent(this,"exit");this.next=createEvent(this,"next");this.resendTimeout=null;this.endpoint=DefaultEndpoint;this.method="email";this.recipient=null;this.resendDisabled=true;this.response=""}t.prototype.componentDidLoad=function(){var t=this;this.startResendTimeout();setTimeout((function(){verifySigner(t.endpoint,{auth_method:t.method,code:"",resend:true}).then((function(e){console.log("Resend result",e);t.response=""})).catch((function(t){return console.log("Error resending code",t)}))}),1e3)};t.prototype.disconnectedCallback=function(){if(this.resendTimeout){clearTimeout(this.resendTimeout);this.resendTimeout=null}};t.prototype.handleCancel=function(){this.exit.emit()};t.prototype.handleDismiss=function(t){if(t.target.class==="background-overlay"){t.preventDefault();this.handleCancel()}};t.prototype.startResendTimeout=function(){var t=this;this.resendDisabled=true;if(this.resendTimeout){clearTimeout(this.resendTimeout)}this.resendTimeout=setTimeout((function(){t.resendDisabled=false}),3e4)};t.prototype.handleResend=function(){var t=this;this.startResendTimeout();verifySigner(this.endpoint,{auth_method:this.method,code:"",resend:true}).then((function(e){console.log("Resend result",e);t.response="";VerdocsToast("A new code has been sent.")})).catch((function(t){return console.log("Error resending code",t)}))};t.prototype.handleSubmit=function(){var t=this;this.startResendTimeout();verifySigner(this.endpoint,{auth_method:this.method,code:this.response}).then((function(e){console.log("Verification completed",e);t.next.emit({response:e});VerdocsToast("Thank you. Your verification was successful.")})).catch((function(t){VerdocsToast("Invalid verification code. Please try again.");console.log("Invalid code",t)}));this.response=""};t.prototype.render=function(){var t=this;return h(Host,{key:"10cd6b556024b97acda5e4877322565e0118fea1"},h("div",{key:"9ea09e34c90f9cdde76ad5bbb0540d85c6db5de3",class:"background-overlay",onClick:function(e){return t.handleDismiss(e)}},h("div",{key:"c1c0bd65f7373e21b112ff3b416c609464fb866f",class:"dialog"},h("div",{key:"c980fcd8174ff297d1c7c80e79efe3e126b575c7",class:"heading"},"Verification Required"),h("div",{key:"adf2d302da78555ef92a7e387051cc3676ddd2a2",class:"help-box"},h("div",{key:"2686e866a16c681937c55747a4ae9d9a4a74b4c0",class:"help-icon",innerHTML:QuestionIcon}),h("div",{key:"76d39d4f57a29c2cff014b3075d25cc67baf1c0d",class:"help-details"},h("div",{key:"45b0d03ab588dd1288c0fbf830cf58d9f83e0e51",class:"help-title"},"Please verify your email address"),h("div",{key:"486a563a055f1cfe36cc1b9ee26e113fdec804f7",class:"help-text"},"Check your email for a one-time code, and enter it below."))),h("div",{key:"83f2aa38ce0172d50982212baefe0dd74524fbca",class:"input"},h("label",{key:"f4e780dbd58eb873bd2dd42664e176e090695137",htmlFor:"verdocs-otp-input"},"Code:"),h("input",{key:"667d1344b55e619e114329d5c09bf6b740266010",type:"text",id:"verdocs-otp-input",name:"verdocs-otp-input",placeholder:"Enter your one-time code...",value:this.response,onInput:function(e){return t.response=e.target.value}})),h("div",{key:"7359603409454e4327d4fbb69d19a9c28bfa0225",class:"buttons"},h("verdocs-button",{key:"8951da68dbca16f671b51c1437f219237963b9d6",label:"Cancel",variant:"outline",onClick:function(){return t.handleCancel()}}),h("verdocs-button",{key:"12b7bfa6c49e1db77c96c6972cc1aa96493ea2bb",label:"Resend",onClick:function(){return t.handleResend()},disabled:this.resendDisabled}),h("verdocs-button",{key:"7a10bebcf57ab4f1a5cf741860156f81a08f1def",label:"Submit",onClick:function(){return t.handleSubmit()},disabled:!this.response})))))};return t}();VerdocsOtpDialog.style=verdocsOtpDialogCss;var verdocsViewCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var VerdocsView=function(){function t(t){registerInstance(this,t);this.sdkError=createEvent(this,"sdkError");this.envelopeUpdated=createEvent(this,"envelopeUpdated");this.another=createEvent(this,"another");this.view=createEvent(this,"view");this.next=createEvent(this,"next");this.envelopeListenerId=null;this.endpoint=null;this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.showCancelDone=false;this.showLoadError=false;this.loading=true;this.envelope=null}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,n,s;return __generator(this,(function(r){switch(r.label){case 0:if(!this.endpoint){this.endpoint=VerdocsEndpoint.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}this.listenToEnvelope();if(!!this.envelope)return[3,4];r.label=1;case 1:r.trys.push([1,3,,4]);console.log("[VIEW] Loading envelope...");n=this;return[4,getEnvelope(this.endpoint,this.envelopeId)];case 2:n.envelope=r.sent();console.log("[VIEW] Loaded envelope",this.envelope);return[3,4];case 3:s=r.sent();this.showLoadError=true;(t=this.sdkError)===null||t===void 0?void 0:t.emit(new SDKError(s.message,(e=s.response)===null||e===void 0?void 0:e.status,(i=s.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[2]}}))}))};t.prototype.componentDidRender=function(){var t=this.headerTargetId?document.getElementById(this.headerTargetId):null;var e=document.getElementById("verdocs-view-header");if(t&&e){console.log("[VIEW] Moving header");e.remove();t.append(e)}};t.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};t.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(t.endpoint,t.envelopeId)}),true,(function(e){t.envelope=e;t.loading=false}));return[2]}))}))};t.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};t.prototype.handlePageRendered=function(t){};t.prototype.handleOptionSelected=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,n,s,r,u,r;var a=this;return __generator(this,(function(o){switch(o.label){case 0:n=t.detail.id;switch(n){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,6];case"download-all":return[3,9]}return[3,10];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(t){a.canceling=false;console.log("[VIEW] Envelope canceled",t);return getEnvelope(a.endpoint,a.envelopeId)})).then((function(t){console.log("[VIEW] Loaded new envelope details",t);a.envelope=t})).catch((function(t){var e,i,n;a.canceling=false;console.log("[VIEW] Error canceling envelope",t);(e=a.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(n=t.response)===null||n===void 0?void 0:n.data))}));this.showCancelDone=true;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,10];case 2:window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,10];case 3:s=this.envelope.documents.find((function(t){return t.type==="attachment"}));if(!s)return[3,5];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,s.id)];case 4:r=o.sent();window.open(r,"_blank");o.label=5;case 5:return[3,10];case 6:u=this.envelope.documents.find((function(t){return t.type==="certificate"}));if(!u)return[3,8];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,u.id)];case 7:r=o.sent();window.open(r,"_blank");o.label=8;case 8:return[3,10];case 9:saveEnvelopesAsZip(this.endpoint,[this.envelope]).then((function(){var t;(t=a.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:a.endpoint,envelope:a.envelope,event:"downloaded"})})).catch((function(t){console.log("Error downloading Zip",t)}));return[3,10];case 10:return[2]}}))}))};t.prototype.render=function(){var t=this;var e;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:"Sorry, that envelope is not valid.",buttonLabel:"OK",onNext:function(){t.showLoadError=false}}))}if(!this.envelope){return h(Host,null,h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var i=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.profile,this.envelope)){i.push({id:"cancel",label:"Cancel"})}var n=this.envelope.documents.length>0;var s=this.envelope.documents.filter((function(t){return t.type==="attachment"})).length;var r=this.envelope.documents.find((function(t){return t.type==="certificate"}))!==undefined;if(n||r){i.push({label:""});if(n){i.push({id:"download-attachments",label:s>1?"Download Documents":"Download Document"})}if(r){i.push({id:"download-certificate",label:"Download Certificate"})}if(n&&r){i.push({id:"download-all",label:"Download All Files"})}}return h(Host,null,h("div",{id:"verdocs-view-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:i,onOptionSelected:function(e){return t.handleOptionSelected(e)}}))),h("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((e=this.envelope)===null||e===void 0?void 0:e.documents)||[]).filter((function(t){return t.type!=="certificate"})).map((function(e){var i=integerSequence(1,e.pages);return h(Fragment,null,i.map((function(i){var n;var s=((n=e.page_sizes)===null||n===void 0?void 0:n[i])||{width:612,height:792};return h("verdocs-envelope-document-page",{envelopeId:t.envelopeId,documentId:e.id,endpoint:t.endpoint,type:"filled",virtualWidth:s.width,virtualHeight:s.height,pageNumber:i,onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&h("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){t.showCancelDone=false}}),this.canceling&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))};Object.defineProperty(t.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();VerdocsView.style=verdocsViewCss;export{VerdocsDelegateDialog as verdocs_delegate_dialog,VerdocsKbaDialog as verdocs_kba_dialog,VerdocsOtpDialog as verdocs_otp_dialog,VerdocsView as verdocs_view};
|
2
|
-
//# sourceMappingURL=verdocs-delegate-dialog_4.entry.js.map
|
@@ -1,2 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,s=t.length,r;n<s;n++){if(r||!(n in t)){if(!r)r=Array.prototype.slice.call(t,0,n);r[n]=t[n]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-gAi_FRvp.system.js","@verdocs/js-sdk","./p-CD5uiThi.system.js","./p-C9y1KCYV.system.js","./p-CrzDCQEM.system.js","./p-7Iu0_GGa.system.js","./p-CmnBGerV.system.js","./p-Bzy18UgU.system.js","./p-DmF0GSqu.system.js","./p-80p0Fzir.system.js"],(function(e){"use strict";var t,i,n,s,r,o,a,l,c,d,u,h,f,v,p,g,x,m,b,w,y,k,S,_,N,I,G,D,z,P,T,E,q,A;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H;r=e.F},function(e){o=e.VerdocsEndpoint;a=e.startSigningSession;l=e.envelopeRecipientAgree;c=e.envelopeRecipientDecline;d=e.updateEnvelopeField;u=e.createSignature;h=e.updateEnvelopeFieldSignature;f=e.createInitials;v=e.updateEnvelopeFieldInitials;p=e.isValidPhone;g=e.isValidEmail;x=e.sortFields;m=e.envelopeRecipientSubmit;b=e.getEnvelope;w=e.uploadEnvelopeFieldAttachment;y=e.deleteEnvelopeFieldAttachment;k=e.formatFullName;S=e.fullNameToInitials;_=e.verifySigner;N=e.delegateRecipient;I=e.integerSequence},function(e){G=e.a;D=e.u;z=e.g;P=e.r},function(e){T=e.D},function(e){E=e.V},function(e){q=e.S},function(e){A=e.S},null,null,null],execute:function(){var j='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}verdocs-sign .disclosure-buttons verdocs-button{margin:0 12px 0 0}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';var C='\n<ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the\n <a href="https://verdocs.com/en/electronic-record-signature-disclosure/" target="_blank">\n Electronic Record and Signatures Disclosure</a>.</li>\n <li>\n Agree to Verdocs\'\n <a href="https://verdocs.com/en/eula" target="_blank">\n End User License Agreement</a>\n and confirm you have read Verdocs\'\n <a href="https://verdocs.com/en/privacy-policy/" target="_blank">\n Privacy Policy</a>.\n </li>\n</ul>';var U=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var V=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var L=e("verdocs_sign",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError");this.envelopeLoaded=i(this,"envelopeLoaded");this.envelopeUpdated=i(this,"envelopeUpdated");this.endpoint=T;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosure=C;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new o({sessionType:"signing"})}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,l;return __generator(this,(function(c){switch(c.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new q("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new q("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new q("[SIGN] Missing required inviteCode",500,""));return[2]}c.label=1;case 1:c.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,a(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:o=c.sent();console.log("[SIGN] Authentication successful",o);this.processAuthResponse(o);return[3,4];case 3:l=c.sent();console.log("[SIGN] Error with signing session",l);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new q(l.message,(s=l.response)===null||s===void 0?void 0:s.status,(r=l.response)===null||r===void 0?void 0:r.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}};e.prototype.processAuthResponse=function(e){var t,i,n;var s=e.envelope,r=e.recipient;var o=r.auth_step;this.recipient=r;this.envelope=s;this.disclosure=((i=(t=this.envelope)===null||t===void 0?void 0:t.organization)===null||i===void 0?void 0:i.disclaimer)||C;this.authStep=o;this.delegated=!!r.delegated_to;this.agreed=r.agreed;this.submitted=r.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;A.updateEnvelope(this.envelopeId,s);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=r.auth_method_states||{};this.kbaQuestions=r.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(r.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this request. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(n=this.envelopeLoaded)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;l(this.endpoint,this.envelopeId,this.roleId,true,this.disclosure).then((function(){var t;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(t){var i,n,s;console.log("[SIGN] Update failure",t);e.submitting=false;(i=e.sdkError)===null||i===void 0?void 0:i.emit(new q(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(s=t.response)===null||s===void 0?void 0:s.data))}))};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,s,r,o,a,l;return __generator(this,(function(d){switch(d.label){case 0:o=e.detail.id;switch(o){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});return[3,7];case 2:E("This feature will be available in an upcoming release.");(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});return[3,7];case 3:this.submitting=true;return[4,c(this.endpoint,this.envelopeId,this.roleId)];case 4:a=d.sent();console.log("[SIGN] Decline result",a);(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this request. The sender has been notified.";return[3,7];case 5:window.print();(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,7];case 6:{l=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(l){G(this.endpoint,this.envelope,l.id).catch((function(e){console.log("[SIGN] Error downloading PDF",e)}));(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,t){var i=this;console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=t.value;n.settings=t.settings;D(n);i.checkRecipientFields()}}))};e.prototype.saveFieldChange=function(e,t){var i=this;console.log("[SIGN] saveFieldChange",e,t);d(this.endpoint,this.envelopeId,e,t).then((function(t){return i.updateRecipientFieldValue(e,t)})).catch((function(e){var t,n,s,r,o,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((s=(n=e.response)===null||n===void 0?void 0:n.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");i.fatalErrorHeader="Signing Session Expired";i.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(r=i.sdkError)===null||r===void 0?void 0:r.emit(new q(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,s,r,o,a,l;var c=this;return __generator(this,(function(d){switch(d.label){case 0:i=t.target,n=i.value,s=i.checked;r=e.type;switch(r){case"textarea":return[3,1];case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:n})];case 2:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}d.label=3;case 3:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}d.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 6:return[4,d.sent().blob()];case 7:o=d.sent();return[2,f(this.endpoint,"initial",o).then((function(t){return __awaiter(c,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:return[4,v(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);c.showSpinner=false}))];case 8:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 9:return[4,d.sent().blob()];case 10:a=d.sent();return[2,u(this.endpoint,"signature",a).then((function(t){return __awaiter(c,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",t);return[4,h(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);c.showSpinner=false}))];case 11:l=t.detail.formattedDate;if(l){return[2,this.saveFieldChange(e.name,{prepared:false,value:l})]}return[3,14];case 12:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("[SIGN] Unhandled field update",{value:n,checked:s},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldFilled=function(e){var t=e.value,i=t===void 0?"":t;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return g(i);case"phone":return p(i);default:return(i||"").trim()!==""}case"signature":return i==="signed";case"initial":return i==="initialed";case"timestamp":return true;case"date":return!!i;case"attachment":return i==="attached";case"dropdown":return i!=="";case"checkbox":return i==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((function(t){return t.group===e.group})).some((function(e){return e.value==="true"}))}return e.value==="true";default:return false}};e.prototype.isFieldValid=function(e){return!e.required||this.isFieldFilled(e)};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));x(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,a,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:if(!this.nextSubmits)return[3,5];u.label=1;case 1:u.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,m(this.endpoint,this.envelopeId,this.roleId)];case 2:t=u.sent();console.log("[SIGN] Submitted successfully",t);this.recipient.status="submitted";this.showDone=true;console.log("[SIGN] Reloading envelope");b(this.endpoint,this.envelopeId).then((function(e){d.envelope=e;d.submitting=false})).catch((function(e){console.log("[SIGN] Error reloading envelope",e);d.submitting=false}));return[3,4];case 3:i=u.sent();console.log("[SIGN] Error submitting",i);return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return e.required&&!d.isFieldFilled(e)}));x(n);s=n.findIndex((function(e){return e.name===d.focusedField}));r=s+1;if(r>=n.length){r=0}o=n[r];a=0;if(a<n.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){a++;r++;if(r>=n.length){r=0}o=n[r]}if(a>=n.length){o=null}if(o){l=z(o);c=document.getElementById(l);c===null||c===void 0?void 0:c.scrollIntoView({behavior:"smooth"});c===null||c===void 0?void 0:c.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.getRecipientFields=function(){var e=this;return this.envelope.fields.filter((function(t){return t.role_name===e.recipient.role_name}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!e.isFieldValid(t)}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",t.map((function(e){return e.name})));this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,i){var n=this;if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(function(e){if(e.target.type==="radio"||e.target.type==="checkbox"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));i.addEventListener("attached",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,w(this.endpoint,this.envelopeId,t.name,i.detail)];case 2:n=o.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=P("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);E("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("deleted",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,y(this.endpoint,this.envelopeId,t.name)];case 2:n=o.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=P("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);E("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("focusout",(function(e){if(t.type!=="dropdown"&&t.type!=="attachment"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.setAttribute("templateid",this.envelope.template_id);i.setAttribute("fieldname",t.name);i.setAttribute("page",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);var s=k(this.recipient);i.setAttribute("initials",S(s));i.setAttribute("name",s)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;var n=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",i.pageNumber,n);n.forEach((function(e,n){if(e.page!==i.pageNumber){return}var s=P("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!s){return}if(Array.isArray(s)){s.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,s)}}));this.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){t.getRecipientFields().filter((function(e){return e.page===i.pageNumber})).forEach((function(e){var n=P("envelope",e,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,n)}}))}));this.checkRecipientFields()};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);_(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,s,r,o;console.log("[SIGN] Error submitting authentication step",e);if((s=(n=(i=e.response)===null||i===void 0?void 0:i.data)===null||n===void 0?void 0:n.error)===null||s===void 0?void 0:s.includes("failed")){t.fatalErrorHeader="Recipient Verification Failed";t.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";t.isDone=true}else{E(((o=(r=e.response)===null||r===void 0?void 0:r.data)===null||o===void 0?void 0:o.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;var t;console.log("[SIGN] Rendering",{authStep:this.authStep});if(this.showLoadError){return n(s,null,n("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:"Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.",buttonLabel:"OK",onNext:function(){window.location.reload()}}))}if(!this.envelope){return n(s,null,n("verdocs-loader",null))}if(this.fatalErrorMessage){return n(s,{class:{agreed:this.agreed}},n("div",{class:"fatal-error"},n("div",{class:"message"},n("div",{class:"header"},this.fatalErrorHeader),n("p",null,this.fatalErrorMessage))))}if(this.delegated){return n(s,{class:{agreed:false}},n("div",{class:"fatal-error"},n("div",{class:"message"},n("div",{class:"header"},"Delegated Signing Request"),n("p",null,"You have delegated signing to another recipient. You will not be able to sign this request again."))))}if(this.isDone){return n(s,{class:{agreed:this.agreed}},n("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var i;return(i=e.sdkError)===null||i===void 0?void 0:i.emit(t.detail)}}),this.showDone&&n("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(t){t.preventDefault();t.stopPropagation();e.showDone=false;e.isDone=true}}),this.submitting&&n("div",{class:"loading-indicator"},n("verdocs-loader",null)))}if(this.delegating){return n("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:function(){return e.delegating=false},onNext:function(t){N(e.endpoint,e.envelopeId,e.roleId,t.detail).then((function(t){E("Delegation request submitted.",{style:"success"});console.log("[SIGN] Delegated successfully",t);e.delegated=true;e.delegating=false})).catch((function(e){console.log("[SIGN] Error delegating request",e);E("Unable to process delegation request. Please try again later.",{style:"error"})}))}})}if(this.declining){return n("verdocs-ok-dialog",{heading:"Decline Signing Request",message:"If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.",buttonLabel:"OK",showCancel:true,onExit:function(){return e.declining=false},onNext:function(){c(e.endpoint,e.envelopeId,e.roleId).then((function(e){console.log("[SIGN] Decline result",e);window.location.reload()})).catch((function(e){return console.warn("[SIGN] Error declining signing session",e)}))}})}if(!this.agreed){return n(s,{class:"agreed"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"agree"},n("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:function(){return e.handleClickAgree()}}),n("div",{innerHTML:this.disclosure}),n("div",{class:"disclosure-buttons"},n("h5",null,"Other Options:"),n("verdocs-button",{variant:"outline",label:"Decline",onClick:function(){return e.declining=true}}),((t=this.recipient)===null||t===void 0?void 0:t.delegator)&&n("verdocs-button",{variant:"outline",label:"Delegate",onClick:function(){return e.delegating=true}})))))}if(this.authStep==="passcode"){return n(s,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"kba"},n("verdocs-kba-dialog",{mode:"text",step:1,steps:1,placeholder:"Enter your passcode...",helptitle:"Document is protected by a Passcode",helptext:"Please enter your Passcode to proceed. If you do not have one, please contact the sender.",label:"Passcode",onNext:function(t){return e.handleAuthenticateSigner({auth_method:"passcode",code:t.detail})}}))))}if(this.authStep==="email"){return n("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.processAuthResponse(t.detail.response);return[2]}))}))}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return n(s,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"kba"},n("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=t.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:e.first_name,last_name:e.last_name,address:e.address,city:e.city,state:e.state,zip:e.zip,dob:e.dob});return[2]}))}))}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){var i=this.kbaChoices.length;var o=this.kbaQuestions[i];return n(s,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?n("verdocs-spinner",null):n("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(o===null||o===void 0?void 0:o.prompt)||"Please select one of the options below.",choices:(o===null||o===void 0?void 0:o.answer)||["Skip Question"],step:i+1,steps:this.kbaQuestions.length,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i;var n=this;return __generator(this,(function(s){e=t.detail;this.kbaChoices=__spreadArray(__spreadArray([],this.kbaChoices,true),[e],false);if(this.kbaChoices.length>=this.kbaQuestions.length){i=this.kbaQuestions.map((function(e,t){return{type:e.type,answer:n.kbaChoices[t]}}));console.log("Submitting KBA responses",this.kbaChoices,i);this.handleAuthenticateSigner({auth_method:"kba",responses:i})}return[2]}))}))}}))))}return n(s,null,n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name),n("div",{style:{flex:"1"}}),!this.finishLater&&n("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),n("div",{style:{marginLeft:"10px"}}),n("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?U:V,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),n("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((function(t){var i=I(1,t.pages);return n(r,null,i.map((function(i){var s;var r=((s=t.page_sizes)===null||s===void 0?void 0:s[i])||{width:612,height:792};return n("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:r.width,virtualHeight:r.height,pageNumber:i,onPageRendered:function(t){return e.handlePageRendered(t)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&n("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.showDone&&n("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.submitting||this.showSpinner&&n("verdocs-portal",null,n("div",{class:"spinner-overlay"},n("verdocs-spinner",null))))};return e}());L.style=j}}}));
|
2
|
-
//# sourceMappingURL=p-33691e24.system.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["verdocsSignCss","DEFAULT_DISCLOSURE","inProgressMenuOptions","id","label","doneMenuOptions","VerdocsSign","exports","class_1","hostRef","this","endpoint","DefaultEndpoint","envelopeId","roleId","inviteCode","headerTargetId","recipient","hasSignature","nextButtonLabel","nextSubmits","fatalErrorHeader","fatalErrorMessage","focusedField","disclosure","submitting","submitted","isDone","showDone","showLoadError","finishLater","showFinishLater","agreed","documentsSingularPlural","authStep","authMethodStates","kbaQuestions","showSpinner","declining","delegating","delegated","kbaChoices","loading","envelope","prototype","componentWillLoad","console","log","VerdocsEndpoint","sessionType","componentDidLoad","_a","sdkError","emit","SDKError","_b","_c","concat","startSigningSession","response","_g","sent","processAuthResponse","e_1","_d","message","_e","status","_f","data","componentDidRender","headerTarget","document","getElementById","headerEl","remove","append","auth_step","organization","disclaimer","delegated_to","Store","updateEnvelope","documents","length","auth_method_states","kba_questions","Object","values","includes","checkRecipientFields","envelopeLoaded","handleClickAgree","_this","envelopeRecipientAgree","then","envelopeUpdated","event","catch","e","handleOptionSelected","detail","VerdocsToast","envelopeRecipientDecline","declineResult","_h","window","print","firstDoc","find","doc","type","saveAttachment","updateRecipientFieldValue","fieldName","updateResult","getRecipientFields","forEach","oldField","name","value","settings","updateDocumentFieldValue","saveFieldChange","fields","updateEnvelopeField","error","handleFieldChange","field","target","checked","prepared","String","fetch","_j","blob","initialsBlob","createInitials","newInitials","__awaiter","updateEnvelopeFieldInitials","signatureBlob","createSignature","newSignature","updateEnvelopeFieldSignature","warn","formattedDate","ts","getAttribute","isFieldFilled","validator","isValidEmail","isValidPhone","trim","group","filter","f","some","isFieldValid","required","getSortedFillableFields","recipientFields","sortFields","handleNext","envelopeRecipientSubmit","result","getEnvelope","e_2","emptyFields","focusedIndex","findIndex","nextFocusedIndex","nextRequiredField","skips","getFieldId","el","scrollIntoView","behavior","focusField","role_name","invalidFields","map","attachFieldAttributes","pageInfo","setAttribute","addEventListener","finally","uploadEnvelopeFieldAttachment","newEl","renderDocumentField","disabled","editable","draggable","done","e_3","style","deleteEnvelopeFieldAttachment","e_4","template_id","pageNumber","xScale","yScale","fullName","formatFullName","fullNameToInitials","handlePageRendered","tabIndex","page","Array","isArray","recipients","r","handleAuthenticateSigner","params","verifySigner","render","h","Host","heading","buttonLabel","onNext","location","reload","class","onSdkError","preventDefault","stopPropagation","onExit","delegateRecipient","showCancel","src","alt","paddingTop","width","height","boxShadow","marginTop","onInput","innerHTML","variant","onClick","delegator","mode","step","steps","placeholder","helptitle","helptext","auth_method","code","method","kba","recipDetails","first_name","last_name","address","city","state","zip","dob","questionNumber","kbaQuestion","prompt","choices","answer","__spreadArray","responses","q","i","flex","size","marginLeft","options","onOptionSelected","envelopeDocument","pageNumbers","integerSequence","pages","Fragment","pageSize","page_sizes","documentId","virtualWidth","virtualHeight","onPageRendered","layers"],"sources":["src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n //.intro {\n // width: 100%;\n // display: flex;\n // flex: 0 0 60px;\n // color: #111111;\n // font-size: 18px;\n // font-weight: 500;\n // line-height: 28px;\n // flex-direction: row;\n // background: #ffffff;\n //\n // .inner {\n // width: 100%;\n // display: flex;\n // margin: 0 auto;\n // padding: 0 20px;\n // max-width: 1200px;\n // flex-direction: row;\n // align-items: center;\n // }\n //}\n\n > .document {\n flex: 1;\n width: 100%;\n height: 100%;\n align-self: center;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n max-width: 1200px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n //justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 5000;\n position: absolute;\n padding-top: 100px;\n align-items: center;\n flex-direction: column;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .agree {\n flex: 0;\n width: 600px;\n display: flex;\n max-width: 90%;\n padding: 30px 15px;\n flex-direction: column;\n background-color: #ffffff;\n\n .header {\n flex: 0 0 56px;\n }\n\n li {\n margin: 0.5em 0;\n }\n }\n\n verdocs-ok-dialog .background-overlay {\n align-items: flex-start;\n padding-top: 100px;\n }\n\n .loading-indicator {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 10000;\n position: fixed;\n background-color: rgba(0, 0, 0, 0.7);\n }\n\n .fatal-error {\n position: absolute;\n z-index: 100;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #4a4a4a;\n display: flex;\n align-items: center;\n justify-content: center;\n\n .placeholder {\n position: absolute;\n opacity: 0.1;\n z-index: -1;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n margin-top: 15px;\n }\n\n .message {\n max-width: 360px;\n width: 50%;\n font-size: 16px;\n background: white;\n box-shadow: 3px 3px 9px -1px #0000003f;\n }\n\n .header {\n color: white;\n font-size: 18px;\n font-weight: 500;\n padding: 5px 10px;\n margin: 0 0 10px 0;\n background: $verdocs-purple-shade;\n }\n\n p {\n margin: 1rem;\n font-size: 14px;\n font-weight: 400;\n padding: 0 10px;\n }\n }\n\n .disclosure-buttons {\n verdocs-button {\n margin: 0 12px 0 0;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n\n#verdocs-sign-header {\n color: #fff;\n width: 100%;\n display: flex;\n z-index: 1000;\n flex: 0 0 46px;\n font-size: 12px;\n column-gap: 15px;\n align-items: center;\n flex-direction: row;\n transition: all 0.25s;\n background-color: $medium-bg;\n box-shadow:\n 0 4px 4px 0 rgb(0 0 0 / 24%),\n 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .inner {\n width: 100%;\n display: flex;\n margin: 0 auto;\n padding: 0 12px;\n max-width: 1200px;\n align-items: center;\n flex-direction: row;\n }\n\n .logo {\n width: 80px;\n display: none;\n margin: -6px 0 0 0;\n }\n\n .title {\n font-size: 18px;\n font-weight: 500;\n overflow: hidden;\n white-space: nowrap;\n padding: 0 10px 0 0;\n text-overflow: ellipsis;\n }\n}\n\n.spinner-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n background: #0000007f;\n justify-content: center;\n}\n","import {updateEnvelopeField, sortFields, IKBAQuestion, ISignerTokenResponse, delegateRecipient} from '@verdocs/js-sdk';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {verifySigner, IEnvelope, IEnvelopeField, IRecipient, TAuthenticateRecipientRequest} from '@verdocs/js-sdk';\nimport {getEnvelope, integerSequence, isValidEmail, isValidPhone, updateEnvelopeFieldInitials} from '@verdocs/js-sdk';\nimport {fullNameToInitials, startSigningSession, deleteEnvelopeFieldAttachment, formatFullName} from '@verdocs/js-sdk';\nimport {updateEnvelopeFieldSignature, uploadEnvelopeFieldAttachment, VerdocsEndpoint, TRecipientAuthMethod} from '@verdocs/js-sdk';\nimport {createInitials, createSignature, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit} from '@verdocs/js-sdk';\nimport {getFieldId, renderDocumentField, saveAttachment, updateDocumentFieldValue} from '../../../utils/utils';\nimport {DefaultEndpoint} from '../../../utils/Environment';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst DEFAULT_DISCLOSURE = `\n<ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the\n <a href=\"https://verdocs.com/en/electronic-record-signature-disclosure/\" target=\"_blank\">\n Electronic Record and Signatures Disclosure</a>.</li>\n <li>\n Agree to Verdocs'\n <a href=\"https://verdocs.com/en/eula\" target=\"_blank\">\n End User License Agreement</a>\n and confirm you have read Verdocs'\n <a href=\"https://verdocs.com/en/privacy-policy/\" target=\"_blank\">\n Privacy Policy</a>.\n </li>\n</ul>`;\n\nconst inProgressMenuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing'},\n {id: 'download', label: 'Download'},\n];\n\nconst doneMenuOptions = [\n {id: 'print', label: 'Print'},\n {id: 'download', label: 'Download'},\n];\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n *\n * ```ts\n * <verdocs-sign\n * envelopeId={ENVELOPE_ID}\n * roleId={ROLE_ID}\n * inviteCode={INVITE_CODE}\n * envelopeUpdated={({ detail }) => console.log('Envelope updated state:', detail) }\n * onSdkError={({ detail }) => { console.log('SDK error', detail) }\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop({mutable: true}) endpoint: VerdocsEndpoint = DefaultEndpoint;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop({reflect: true}) envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop({reflect: true}) roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop({reflect: true}) inviteCode: string | null = null;\n\n /**\n * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this\n * component renders, the header will be removed from its default location and placed in the target element.\n * This allows the parent application to more easily control its placement and scroll effects (e.g. \"fixed\").\n *\n * The movement of the header to the target container is not dynamic - it is performed only on the initial\n * render. Host applications should not conditionally render this container. If the header's visibility must\n * be externally controlled, use CSS display options to hide/show it instead.\n */\n @Prop() headerTargetId: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is loaded for the first time.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n // @State() roleNames: string[] = [];\n // @State() sortedRecipients: IRecipient[] = [];\n @State() recipient: IRecipient | null = null;\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() fatalErrorHeader = '';\n @State() fatalErrorMessage = '';\n @State() focusedField = '';\n @State() disclosure = DEFAULT_DISCLOSURE;\n @State() submitting = false;\n @State() submitted = false;\n @State() isDone = false;\n @State() showDone = false;\n @State() showLoadError = false;\n @State() finishLater = false;\n @State() showFinishLater = false;\n @State() agreed = false;\n @State() documentsSingularPlural = 'document';\n @State() authStep: string | null = null;\n @State() authMethodStates: Partial<Record<TRecipientAuthMethod, string>> = {};\n @State() kbaQuestions: IKBAQuestion[] | null = null;\n @State() showSpinner = false;\n @State() declining = false;\n @State() delegating = false;\n @State() delegated = false;\n @State() kbaChoices = [];\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n\n // recipientIndex: number = -1;\n\n componentWillLoad() {\n if (!this.endpoint) {\n console.log('[SIGN] Creating signing endpoint');\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n\n // NOTE: We don't listen to the store here because we are often an independent\n // session and might have a different \"view\" of the envelope.\n const response = await startSigningSession(this.endpoint, this.envelopeId, this.roleId, this.inviteCode);\n console.log('[SIGN] Authentication successful', response);\n this.processAuthResponse(response);\n } catch (e) {\n console.log('[SIGN] Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n this.showLoadError = true;\n }\n }\n\n componentDidRender() {\n const headerTarget = this.headerTargetId ? document.getElementById(this.headerTargetId) : null;\n const headerEl = document.getElementById('verdocs-sign-header');\n if (headerTarget && headerEl) {\n console.log('[SIGN] Moving header');\n headerEl.remove();\n headerTarget.append(headerEl);\n }\n }\n\n processAuthResponse(response: ISignerTokenResponse) {\n const {envelope, recipient} = response;\n const {auth_step} = recipient;\n this.recipient = recipient;\n this.envelope = envelope;\n this.disclosure = this.envelope?.organization?.disclaimer || DEFAULT_DISCLOSURE;\n this.authStep = auth_step;\n this.delegated = !!recipient.delegated_to;\n this.agreed = recipient.agreed;\n this.submitted = recipient.status === 'submitted';\n this.isDone = this.submitted;\n this.showDone = this.submitted;\n Store.updateEnvelope(this.envelopeId, envelope);\n\n if (this.envelope.documents.length > 0) {\n this.documentsSingularPlural = 'document(s)';\n }\n\n this.authMethodStates = recipient.auth_method_states || ({} as Record<TRecipientAuthMethod, string>);\n this.kbaQuestions = recipient.kba_questions;\n if (Object.values(this.authMethodStates).includes('failed')) {\n this.fatalErrorHeader = 'Recipient Verification Failed';\n this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n this.isDone = true;\n }\n\n // TODO: Envelope \"complete\" | \"declined\" | \"canceled\"\n // TODO: Recipient \"canceled\"\n\n if (this.envelope.status === 'canceled') {\n this.fatalErrorHeader = 'Unable to Start Signing Session';\n this.fatalErrorMessage = 'This envelope has been canceled. The sender has been notified.';\n } else if (recipient.status === 'declined') {\n this.fatalErrorHeader = 'Declined';\n this.fatalErrorMessage = 'You have declined to sign this request. The sender has been notified.';\n } else if (this.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n this.checkRecipientFields();\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: this.envelope});\n }\n\n handleClickAgree() {\n this.submitting = true;\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true, this.disclosure)\n .then(() => {\n this.nextButtonLabel = 'Next';\n this.recipient.agreed = true;\n this.submitting = false;\n this.agreed = true; // The server returns a recipient object but it's not \"deep\" so we track this locally\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('[SIGN] Update failure', e);\n this.submitting = false;\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e: any) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'later'});\n break;\n\n case 'claim':\n VerdocsToast('This feature will be available in an upcoming release.');\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'claimed'});\n break;\n\n case 'decline':\n {\n this.submitting = true;\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Decline result', declineResult);\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'declined'});\n this.submitting = false;\n this.fatalErrorHeader = 'Declined';\n this.fatalErrorMessage = 'You have declined to sign this request. The sender has been notified.';\n }\n break;\n\n case 'print':\n window.print();\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'printed'});\n break;\n\n case 'download':\n {\n const firstDoc = this.envelope.documents.find(doc => doc.type === 'attachment');\n if (firstDoc) {\n saveAttachment(this.endpoint, this.envelope, firstDoc.id).catch(e => {\n console.log('[SIGN] Error downloading PDF', e);\n });\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n }\n }\n break;\n }\n }\n\n updateRecipientFieldValue(fieldName: string, updateResult: any) {\n console.log('[SIGN] updateRecipientFieldValue', fieldName, updateResult);\n this.getRecipientFields().forEach(oldField => {\n if (oldField.name === fieldName) {\n oldField.value = updateResult.value;\n // TODO: Keeping this while attachments still rely on it\n oldField.settings = updateResult.settings;\n updateDocumentFieldValue(oldField);\n this.checkRecipientFields();\n }\n });\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n console.log('[SIGN] saveFieldChange', fieldName, fields);\n updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .then(updateResult => this.updateRecipientFieldValue(fieldName, updateResult))\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n console.log('[SIGN] Signing session expired');\n this.fatalErrorHeader = 'Signing Session Expired';\n this.fatalErrorMessage = 'Please reload your browser to continue.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IEnvelopeField, e: any) {\n const {value, checked} = e.target;\n\n switch (field.type as any) {\n // TODO: Remove legacy type when no longer needed\n case 'textarea':\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox': {\n return this.saveFieldChange(field.name, {prepared: false, value: String(e.target.checked)});\n }\n\n case 'radio': {\n return this.saveFieldChange(field.name, {prepared: false, value: String(e.target.checked)});\n }\n\n case 'dropdown':\n // TODO: Set prepared to false server-side.\n console.log('Saving dropdown', field.name, e.detail);\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n // This can be caused by a focus-out event if the user clicks the field\n // after it's already filled in, then clicks something else like a textbox.\n // We don't visually indicate the focus, but it's still there.\n if (!e.detail) {\n return;\n }\n\n this.showSpinner = true;\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(async newInitials => {\n const updateResult = await updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.showSpinner = false;\n })\n .catch(e => {\n console.log('Error updating initials', e);\n this.showSpinner = false;\n });\n\n case 'signature':\n // This can be caused by a focus-out event if the user clicks the field\n // after it's already filled in, then clicks something else like a textbox.\n // We don't visually indicate the focus, but it's still there.\n if (!e.detail) {\n return;\n }\n\n this.showSpinner = true;\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(async newSignature => {\n console.log('Signature update result', newSignature);\n const updateResult = await updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.showSpinner = false;\n })\n .catch(e => {\n console.warn('[SIGN] Error updating signature', e);\n this.showSpinner = false;\n });\n\n case 'date':\n const {formattedDate} = e.detail;\n if (formattedDate) {\n return this.saveFieldChange(field.name, {prepared: false, value: formattedDate});\n }\n break;\n\n case 'timestamp':\n console.log('[SIGN] Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('[SIGN] Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldFilled(field: IEnvelopeField) {\n const {value = ''} = field;\n switch (field.type as any) {\n case 'textarea':\n case 'textbox':\n switch (field.validator || '') {\n case 'email':\n return isValidEmail(value);\n case 'phone':\n return isValidPhone(value);\n default:\n return (value || '').trim() !== '';\n }\n\n case 'signature':\n return value === 'signed';\n\n case 'initial':\n return value === 'initialed';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'date':\n return !!value;\n\n case 'attachment':\n return value === 'attached';\n\n case 'dropdown':\n return value !== '';\n\n case 'checkbox':\n return value === 'true';\n\n case 'radio':\n if (!!field.group) {\n return this.getRecipientFields()\n .filter(f => f.group === field.group)\n .some(field => field.value === 'true');\n }\n\n return field.value === 'true';\n\n default:\n return false;\n }\n }\n\n isFieldValid(field: IEnvelopeField) {\n return !field.required || this.isFieldFilled(field);\n }\n\n getSortedFillableFields() {\n const recipientFields = this.getRecipientFields().filter(field => field.type !== 'timestamp');\n sortFields(recipientFields);\n return recipientFields;\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n // Patches the date picker to be forcibly removed if still showing during submission\n document.getElementById('air-datepicker-global-container')?.remove();\n\n this.submitting = true;\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.recipient.status = 'submitted';\n this.showDone = true;\n console.log('[SIGN] Reloading envelope');\n getEnvelope(this.endpoint, this.envelopeId)\n .then(envelope => {\n this.envelope = envelope;\n // The show-done dialog does this\n // this.isDone = true;\n this.submitting = false;\n })\n .catch(e => {\n // this.isDone = true;\n console.log('[SIGN] Error reloading envelope', e);\n this.submitting = false;\n });\n } catch (e) {\n console.log('[SIGN] Error submitting', e);\n }\n\n return;\n }\n\n // Find and focus the next incomplete field (that is fillable)\n const emptyFields = this.getSortedFillableFields().filter(field => field.required && !this.isFieldFilled(field));\n sortFields(emptyFields);\n\n const focusedIndex = emptyFields.findIndex(field => field.name === this.focusedField);\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= emptyFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = emptyFields[nextFocusedIndex];\n // console.log('Next field', nextRequiredField, emptyFields);\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < emptyFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && ['initialed', 'signed'].includes(nextRequiredField.value)) {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= emptyFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = emptyFields[nextFocusedIndex];\n }\n\n if (skips >= emptyFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.scrollIntoView({behavior: 'smooth'});\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n getRecipientFields() {\n return this.envelope.fields.filter(field => field.role_name === this.recipient.role_name);\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const invalidFields = this.getRecipientFields().filter(field => !this.isFieldValid(field));\n if (invalidFields.length < 1) {\n this.nextButtonLabel = 'Finish';\n if (!this.nextSubmits) {\n this.nextSubmits = true;\n }\n } else {\n console.log(\n '[SIGN] Invalid fields remaining',\n invalidFields.map(field => field.name),\n );\n this.nextButtonLabel = 'Next';\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, el) {\n // We can get called multiple times as rendering completes and it's hard to avoid that\n // because it's a ton of work for the callers to know it's been done already. But we\n // don't want to attach multiple event listeners or we get dupe event handling, like\n // calling the server twice on every field update. Since JS has no removeAllEventListeners()\n // option, using removeEventListener() isn't reliable the way Stencil binds local function\n // contexts, and cloneNode messes up the rest of the rendering, we just track it with a flag.\n if (el.getAttribute('attached') === '1') {\n return;\n }\n el.setAttribute('attached', '1');\n\n el.addEventListener('input', (e: any) => {\n // console.log('[SIGN] onfieldInput', e.detail, e.target.value);\n // These field types don't emit fieldChange. Should we standardize on that? We don't tap \"input\" for fields like\n // text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.\n if (e.target.type === 'radio' || e.target.type === 'checkbox') {\n // if (e.target.type === 'radio' || e.target.name.includes('date') || e.target.name.includes('checkbox')) {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n } else {\n this.checkRecipientFields();\n }\n });\n el.addEventListener('attached', async (e: any) => {\n console.log('[SIGN] onAttached', e.detail, e.target.value);\n this.showSpinner = true;\n try {\n const updateResult = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name, e.detail);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.checkRecipientFields();\n\n const newEl = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone});\n this.attachFieldAttributes(pageInfo, field, newEl);\n\n this.showSpinner = false;\n } catch (e) {\n console.log('Error uploading attachment', e);\n VerdocsToast('Unable to upload attachment, please try again later', {style: 'error'});\n this.showSpinner = false;\n }\n });\n el.addEventListener('deleted', async (e: any) => {\n console.log('[SIGN] onDeleted', e.detail, e.target.value);\n this.showSpinner = true;\n try {\n const updateResult = await deleteEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name);\n console.log('[SIGN] Deleted attachment', updateResult);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.checkRecipientFields();\n\n const newEl = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone});\n this.attachFieldAttributes(pageInfo, field, newEl);\n\n this.showSpinner = false;\n } catch (e) {\n console.log('Error uploading attachment', e);\n VerdocsToast('Unable to upload attachment, please try again later', {style: 'error'});\n this.showSpinner = false;\n }\n });\n el.addEventListener('focusout', e => {\n // These field types trigger focusout as they're used, even without a value change\n if (field.type !== 'dropdown' && field.type !== 'attachment') {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n }\n });\n el.addEventListener('fieldChange', e => {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n });\n\n el.setAttribute('templateid', this.envelope.template_id);\n el.setAttribute('fieldname', field.name);\n el.setAttribute('page', pageInfo.pageNumber);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n\n const fullName = formatFullName(this.recipient);\n el.setAttribute('initials', fullNameToInitials(fullName));\n el.setAttribute('name', fullName);\n }\n\n handlePageRendered(e: any) {\n const pageInfo = e.detail as IDocumentPageInfo;\n\n // NOTE: We don't filter on pageNumber here because we need the position in the\n // entire list to set the tabIndex.\n const recipientFields = this.getSortedFillableFields();\n console.log('[SIGN] Rendering fields for page', pageInfo.pageNumber, recipientFields);\n\n // First render the fields for the signer\n recipientFields.forEach((field, tabIndex) => {\n if (field.page !== pageInfo.pageNumber) {\n return;\n }\n\n const el = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone}, tabIndex);\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, el);\n }\n });\n\n // Now render the fields for other signers who have yet to act\n this.envelope.recipients\n .filter(r => r.role_name !== this.recipient.role_name && (r.status === 'invited' || r.status === 'opened' || r.status === 'pending'))\n .forEach(() => {\n this.getRecipientFields()\n .filter(field => field.page === pageInfo.pageNumber)\n .forEach(field => {\n const el = renderDocumentField('envelope', field, pageInfo, {disabled: true, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, el);\n }\n });\n });\n\n this.checkRecipientFields();\n }\n\n handleAuthenticateSigner(params: TAuthenticateRecipientRequest) {\n console.log('[SIGN] Submitting authentication step', params);\n verifySigner(this.endpoint, params)\n .then(r => {\n console.log('[SIGN] Verification successful', r);\n this.processAuthResponse(r);\n })\n .catch(e => {\n console.log('[SIGN] Error submitting authentication step', e);\n if (e.response?.data?.error?.includes('failed')) {\n this.fatalErrorHeader = 'Recipient Verification Failed';\n this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n this.isDone = true;\n } else {\n VerdocsToast(e.response?.data?.error || 'Unable to verify your identity. Please try again.', {style: 'error'});\n }\n });\n }\n\n render() {\n console.log('[SIGN] Rendering', {authStep: this.authStep});\n if (this.showLoadError) {\n return (\n <Host>\n <verdocs-ok-dialog\n heading=\"Unable to Start Signing\"\n message={`Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`}\n buttonLabel=\"OK\"\n onNext={() => {\n window.location.reload();\n }}\n />\n </Host>\n );\n }\n\n if (!this.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (this.fatalErrorMessage) {\n return (\n <Host class={{agreed: this.agreed}}>\n <div class=\"fatal-error\">\n <div class=\"message\">\n <div class=\"header\">{this.fatalErrorHeader}</div>\n <p>{this.fatalErrorMessage}</p>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.delegated) {\n return (\n <Host class={{agreed: false}}>\n <div class=\"fatal-error\">\n <div class=\"message\">\n <div class=\"header\">Delegated Signing Request</div>\n <p>You have delegated signing to another recipient. You will not be able to sign this request again.</p>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.isDone) {\n return (\n <Host class={{agreed: this.agreed}}>\n <verdocs-view endpoint={this.endpoint} envelopeId={this.envelopeId} onSdkError={e => this.sdkError?.emit(e.detail)} />\n\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message={`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`}\n onNext={(e: any) => {\n e.preventDefault();\n e.stopPropagation();\n this.showDone = false;\n this.isDone = true;\n }}\n />\n )}\n\n {this.submitting && (\n <div class=\"loading-indicator\">\n <verdocs-loader />\n </div>\n )}\n </Host>\n );\n }\n\n if (this.delegating) {\n return (\n <verdocs-delegate-dialog\n endpoint={this.endpoint}\n envelope={this.envelope}\n onExit={() => (this.delegating = false)}\n onNext={(e: any) => {\n delegateRecipient(this.endpoint, this.envelopeId, this.roleId, e.detail)\n .then(r => {\n VerdocsToast('Delegation request submitted.', {style: 'success'});\n console.log('[SIGN] Delegated successfully', r);\n this.delegated = true;\n this.delegating = false;\n })\n .catch(e => {\n console.log('[SIGN] Error delegating request', e);\n VerdocsToast('Unable to process delegation request. Please try again later.', {style: 'error'});\n });\n }}\n />\n );\n }\n\n if (this.declining) {\n return (\n <verdocs-ok-dialog\n heading=\"Decline Signing Request\"\n message={`If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.`}\n buttonLabel=\"OK\"\n showCancel={true}\n onExit={() => (this.declining = false)}\n onNext={() => {\n envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId)\n .then(r => {\n console.log('[SIGN] Decline result', r);\n window.location.reload();\n })\n .catch(e => console.warn('[SIGN] Error declining signing session', e));\n }}\n />\n );\n }\n\n if (!this.agreed) {\n return (\n <Host class=\"agreed\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"By checking this box, you:\" onInput={() => this.handleClickAgree()} />\n <div innerHTML={this.disclosure} />\n\n <div class=\"disclosure-buttons\">\n <h5>Other Options:</h5>\n <verdocs-button variant=\"outline\" label=\"Decline\" onClick={() => (this.declining = true)} />\n {this.recipient?.delegator && <verdocs-button variant=\"outline\" label=\"Delegate\" onClick={() => (this.delegating = true)} />}\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.authStep === 'passcode') {\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n <verdocs-kba-dialog\n mode=\"text\"\n step={1}\n steps={1}\n placeholder=\"Enter your passcode...\"\n helptitle=\"Document is protected by a Passcode\"\n helptext=\"Please enter your Passcode to proceed. If you do not have one, please contact the sender.\"\n label=\"Passcode\"\n onNext={e => this.handleAuthenticateSigner({auth_method: 'passcode', code: e.detail as string})}\n />\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.authStep === 'email') {\n return (\n <verdocs-otp-dialog\n endpoint={this.endpoint}\n method=\"email\"\n onNext={async e => {\n this.processAuthResponse(e.detail.response);\n }}\n />\n );\n }\n\n if (this.authStep === 'kba' && !this.authMethodStates.kba) {\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n <verdocs-kba-dialog\n mode=\"identity\"\n helptitle=\"Document requires identity verification\"\n helptext=\"Please complete your contact details to proceed.\"\n recipient={this.recipient}\n onNext={async e => {\n const recipDetails = e.detail as IRecipient;\n this.handleAuthenticateSigner({\n auth_method: 'kba',\n first_name: recipDetails.first_name,\n last_name: recipDetails.last_name,\n address: recipDetails.address,\n city: recipDetails.city,\n state: recipDetails.state,\n zip: recipDetails.zip,\n dob: recipDetails.dob,\n });\n }}\n />\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.authStep === 'kba' && this.authMethodStates.kba === 'questions') {\n const questionNumber = this.kbaChoices.length;\n const kbaQuestion = this.kbaQuestions[questionNumber];\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n {this.kbaChoices.length >= this.kbaQuestions.length ? (\n <verdocs-spinner />\n ) : (\n <verdocs-kba-dialog\n mode=\"choice\"\n helptitle=\"Your identity requires additional verification\"\n helptext={kbaQuestion?.prompt || 'Please select one of the options below.'}\n choices={kbaQuestion?.answer || ['Skip Question']}\n step={questionNumber + 1}\n steps={this.kbaQuestions.length}\n onNext={async (e: any) => {\n const answer = e.detail as string;\n this.kbaChoices = [...this.kbaChoices, answer];\n if (this.kbaChoices.length >= this.kbaQuestions.length) {\n const responses = this.kbaQuestions.map((q, i) => ({type: q.type, answer: this.kbaChoices[i]}));\n console.log('Submitting KBA responses', this.kbaChoices, responses);\n this.handleAuthenticateSigner({auth_method: 'kba', responses});\n }\n }}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n\n return (\n <Host>\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n <div style={{flex: '1'}} />\n\n {!this.finishLater && <verdocs-button size=\"xsmall\" label={this.nextButtonLabel} disabled={!this.agreed || this.submitting} onClick={() => this.handleNext()} />}\n\n <div style={{marginLeft: '10px'}} />\n <verdocs-dropdown options={!this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n {(this.envelope.documents || []).map(envelopeDocument => {\n const pageNumbers = integerSequence(1, envelopeDocument.pages);\n\n return (\n <Fragment>\n {pageNumbers.map(pageNumber => {\n const pageSize = envelopeDocument.page_sizes?.[pageNumber] || {width: 612, height: 792};\n\n // In signing mode we show the original template page with all the recipient fields so we can show source formatting and\n // where everything went. This is also a visual indicator when optional fields weren't filled in by previous actors, or\n // future signers still need to act. Once we're \"done\" we flip to showing the envelope's documents which have the final\n // field vales (so far) stamped into them.\n // TODO: Confirm that a pure page-number match is good enough to find the matching template page. We need to make sure\n // we either don't reset our page numbers for additional attachments, or add match-on identifiers to work around that.\n // console.log('tp', templatePage, page);\n return (\n <verdocs-envelope-document-page\n envelopeId={this.envelopeId}\n documentId={envelopeDocument.id}\n endpoint={this.endpoint}\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n pageNumber={pageNumber}\n onPageRendered={e => this.handlePageRendered(e)}\n type=\"filled\"\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message={`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`}\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message={`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`}\n onNext={() => {\n this.showDone = false;\n this.isDone = true;\n }}\n />\n )}\n\n {this.submitting ||\n (this.showSpinner && (\n <verdocs-portal>\n <div class=\"spinner-overlay\">\n <verdocs-spinner />\n </div>\n </verdocs-portal>\n ))}\n </Host>\n );\n }\n}\n"],"mappings":"6uFAAA,IAAMA,EAAiB,wjICcvB,IAAMC,EAAqB,6hBAgB3B,IAAMC,EAAwB,CAC5B,CAACC,GAAI,QAASC,MAAO,gBAErB,CAACD,GAAI,UAAWC,MAAO,mBACvB,CAACD,GAAI,QAASC,MAAO,yBACrB,CAACD,GAAI,WAAYC,MAAO,aAG1B,IAAMC,EAAkB,CACtB,CAACF,GAAI,QAASC,MAAO,SACrB,CAACD,GAAI,WAAYC,MAAO,a,IAmCbE,EAAWC,EAAA,0BALxB,SAAAC,EAAAC,G,uIASyBC,KAAQC,SAAoBC,EAK5BF,KAAUG,WAAkB,KAK5BH,KAAMI,OAAkB,KAKxBJ,KAAUK,WAAkB,KAW3CL,KAAcM,eAAkB,KAoB/BN,KAASO,UAAsB,KAC/BP,KAAYQ,aAAG,MACfR,KAAeS,gBAAG,QAClBT,KAAWU,YAAG,MACdV,KAAgBW,iBAAG,GACnBX,KAAiBY,kBAAG,GACpBZ,KAAYa,aA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