@verdocs/web-sdk 6.8.6 → 6.8.8
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/{Datastore-B-sxWSPD.js → Datastore-C-Pojt3E.js} +3 -3
- package/dist/{esm-es5/Datastore-bS8INhRF.js.map → cjs/Datastore-C-Pojt3E.js.map} +1 -1
- package/dist/cjs/index-CQ5bTnED.js +14 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-ecG41L2k.js → utils-kkGeJs-8.js} +6 -3
- package/dist/cjs/utils-kkGeJs-8.js.map +1 -0
- package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +5 -3
- package/dist/cjs/verdocs-build.entry.cjs.js.map +1 -1
- package/dist/cjs/{verdocs-button-panel_2.cjs.entry.js → verdocs-button-panel.cjs.entry.js} +1 -27
- package/dist/cjs/verdocs-button-panel.entry.cjs.js.map +1 -0
- package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +119 -51
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +16 -9
- package/dist/cjs/verdocs-field-payment.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.cjs.js.map +1 -0
- package/dist/cjs/{verdocs-preview_7.cjs.entry.js → verdocs-preview_6.cjs.entry.js} +56 -214
- package/dist/cjs/verdocs-sign.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-signing-progress.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-tabs.cjs.entry.js +31 -0
- package/dist/cjs/verdocs-tabs.entry.cjs.js.map +1 -0
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-settings.cjs.entry.js +150 -0
- package/dist/cjs/verdocs-template-settings.entry.cjs.js.map +1 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.css +4 -0
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +5 -3
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +10 -0
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +15 -5
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +15 -5
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +15 -5
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +15 -5
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +13 -5
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.js +18 -8
- package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js +15 -5
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +13 -5
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +15 -5
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +15 -5
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js +17 -5
- package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js.map +1 -1
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.css +41 -49
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.js +25 -45
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.js.map +1 -1
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +31 -52
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js.map +1 -1
- package/dist/collection/utils/Datastore.js +1 -1
- package/dist/collection/utils/Datastore.js.map +1 -1
- package/dist/collection/utils/utils.js +4 -1
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/{p-CRIrD66O.js → p---tnXjlx.js} +3 -3
- package/dist/components/{p-CRIrD66O.js.map → p---tnXjlx.js.map} +1 -1
- package/dist/components/{p-BgNCVox7.js → p-1oPQs4-S.js} +3 -3
- package/dist/components/{p-BgNCVox7.js.map → p-1oPQs4-S.js.map} +1 -1
- package/dist/components/{p-CFi6VKgU.js → p-2sD6OXzl.js} +19 -10
- package/dist/components/p-2sD6OXzl.js.map +1 -0
- package/dist/components/{p-CWGxLuye.js → p-7dtIf4QF.js} +19 -10
- package/dist/components/p-7dtIf4QF.js.map +1 -0
- package/dist/components/{p-CherENoi.js → p-BCiVZnf0.js} +3 -3
- package/dist/components/{p-CherENoi.js.map → p-BCiVZnf0.js.map} +1 -1
- package/dist/components/{p-BYDdRCru.js → p-BEI7Iwuj.js} +34 -42
- package/dist/components/p-BEI7Iwuj.js.map +1 -0
- package/dist/components/{p-DLV8jNf8.js → p-BUaaBFra.js} +17 -10
- package/dist/components/p-BUaaBFra.js.map +1 -0
- package/dist/components/{p-BZRJWqKI.js → p-BVu-nE_L.js} +19 -10
- package/dist/components/p-BVu-nE_L.js.map +1 -0
- package/dist/components/{p-By2QlfRC.js → p-BihWiABu.js} +19 -10
- package/dist/components/p-BihWiABu.js.map +1 -0
- package/dist/components/p-BqoZV7Do.js +156 -0
- package/dist/components/p-BqoZV7Do.js.map +1 -0
- package/dist/components/{p-D1tvdWaA.js → p-BrtyCjOf.js} +4 -4
- package/dist/components/{p-D1tvdWaA.js.map → p-BrtyCjOf.js.map} +1 -1
- package/dist/components/{p-tSwumenv.js → p-Bzs-6uU0.js} +3 -3
- package/dist/components/{p-tSwumenv.js.map → p-Bzs-6uU0.js.map} +1 -1
- package/dist/components/{p-Dj_oFCRK.js → p-C02BWoNV.js} +17 -10
- package/dist/components/p-C02BWoNV.js.map +1 -0
- package/dist/{esm/Datastore-bS8INhRF.js → components/p-C7hFgM52.js} +3 -3
- package/dist/components/p-C7hFgM52.js.map +1 -0
- package/dist/components/{p-CjDMm6od.js → p-CD24uAWY.js} +19 -10
- package/dist/components/p-CD24uAWY.js.map +1 -0
- package/dist/components/{p-_igYrwND.js → p-CDR7tIN-.js} +3 -3
- package/dist/components/{p-_igYrwND.js.map → p-CDR7tIN-.js.map} +1 -1
- package/dist/components/{p-tyY7kKNB.js → p-CPIwQCo_.js} +21 -10
- package/dist/components/p-CPIwQCo_.js.map +1 -0
- package/dist/components/{p-Bafj7hI1.js → p-Cli5nWln.js} +19 -10
- package/dist/components/p-Cli5nWln.js.map +1 -0
- package/dist/components/{p-Dpu4D5bv.js → p-Cx0Mif05.js} +6 -3
- package/dist/components/p-Cx0Mif05.js.map +1 -0
- package/dist/components/{p-BF4y1YRU.js → p-CzvUUEq1.js} +3 -3
- package/dist/components/{p-BF4y1YRU.js.map → p-CzvUUEq1.js.map} +1 -1
- package/dist/components/{p-DzM2oGUr.js → p-D1TqIILD.js} +19 -10
- package/dist/components/p-D1TqIILD.js.map +1 -0
- package/dist/components/{p-CYRfkDZa.js → p-Dj2R-VU1.js} +26 -16
- package/dist/components/p-Dj2R-VU1.js.map +1 -0
- package/dist/components/{p-Cal5IvqT.js → p-DmEzMnt3.js} +3 -3
- package/dist/components/{p-Cal5IvqT.js.map → p-DmEzMnt3.js.map} +1 -1
- package/dist/components/{p-C5fwD53I.js → p-Dz6Xrh7z.js} +3 -3
- package/dist/components/{p-C5fwD53I.js.map → p-Dz6Xrh7z.js.map} +1 -1
- package/dist/components/{p-DaWDoIag.js → p-IJa78J36.js} +4 -4
- package/dist/components/{p-DaWDoIag.js.map → p-IJa78J36.js.map} +1 -1
- package/dist/components/{p-DtpXCLdt.js → p-RdlD8c2P.js} +5 -5
- package/dist/components/{p-DtpXCLdt.js.map → p-RdlD8c2P.js.map} +1 -1
- package/dist/components/{p-DmyvK-Tr.js → p-aH_YLUuP.js} +15 -15
- package/dist/components/{p-DmyvK-Tr.js.map → p-aH_YLUuP.js.map} +1 -1
- package/dist/components/{p-DyfpSDn-.js → p-zAW1BOj6.js} +3 -3
- package/dist/components/{p-DyfpSDn-.js.map → p-zAW1BOj6.js.map} +1 -1
- package/dist/components/verdocs-build.js +73 -95
- package/dist/components/verdocs-build.js.map +1 -1
- package/dist/components/verdocs-button-panel.js +98 -1
- package/dist/components/verdocs-button-panel.js.map +1 -1
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-envelope-document-page.js +1 -1
- package/dist/components/verdocs-envelope-recipient-link.js +1 -1
- package/dist/components/verdocs-envelope-recipient-summary.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +3 -3
- package/dist/components/verdocs-envelope-update-recipient.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +2 -2
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-checkbox.js +1 -1
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-field-dropdown.js +1 -1
- package/dist/components/verdocs-field-initial.js +1 -1
- package/dist/components/verdocs-field-payment.js +20 -11
- package/dist/components/verdocs-field-payment.js.map +1 -1
- package/dist/components/verdocs-field-radio.js +1 -1
- package/dist/components/verdocs-field-signature.js +1 -1
- package/dist/components/verdocs-field-textarea.js +1 -1
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-field-timestamp.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-quick-filter.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign-footer.js +1 -1
- package/dist/components/verdocs-sign.js +5 -5
- package/dist/components/verdocs-signing-progress.js +1 -1
- package/dist/components/verdocs-tabs.js +45 -1
- package/dist/components/verdocs-tabs.js.map +1 -1
- package/dist/components/verdocs-template-attachments.js +1 -1
- package/dist/components/verdocs-template-build-tabs.js +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-field-properties.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-settings.js +215 -1
- package/dist/components/verdocs-template-settings.js.map +1 -1
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/custom-elements.json +0 -6
- package/dist/{components/p-bS8INhRF.js → esm/Datastore-C7hFgM52.js} +3 -3
- package/dist/{cjs/Datastore-B-sxWSPD.js.map → esm/Datastore-C7hFgM52.js.map} +1 -1
- package/dist/esm/index-BIRwgFLv.js +14 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-CerrMWqr.js → utils-CPSY5rft.js} +6 -3
- package/dist/esm/utils-CPSY5rft.js.map +1 -0
- package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +5 -3
- package/dist/esm/verdocs-build.entry.js.map +1 -1
- package/dist/{components/p-rboJNAPD.js → esm/verdocs-button-panel.entry.js} +9 -32
- package/dist/esm/verdocs-button-panel.entry.js.map +1 -0
- package/dist/esm/verdocs-checkbox_5.entry.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-download-dialog_4.entry.js +2 -2
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-recipient-summary.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_11.entry.js +119 -51
- package/dist/esm/verdocs-field-payment.entry.js +16 -9
- package/dist/esm/verdocs-field-payment.entry.js.map +1 -1
- package/dist/esm/verdocs-menu-panel_2.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.js.map +1 -0
- package/dist/esm/{verdocs-preview_7.entry.js → verdocs-preview_6.entry.js} +58 -215
- package/dist/esm/verdocs-sign.entry.js +2 -2
- package/dist/esm/verdocs-signing-progress.entry.js +1 -1
- package/dist/{components/p-e7e4Os6T.js → esm/verdocs-tabs.entry.js} +8 -29
- package/dist/esm/verdocs-tabs.entry.js.map +1 -0
- package/dist/esm/verdocs-template-document-page_2.entry.js +2 -2
- package/dist/{components/p-Cp7g7TMK.js → esm/verdocs-template-settings.entry.js} +12 -84
- package/dist/esm/verdocs-template-settings.entry.js.map +1 -0
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{Datastore-bS8INhRF.js → Datastore-C7hFgM52.js} +2 -2
- package/dist/{esm/Datastore-bS8INhRF.js.map → esm-es5/Datastore-C7hFgM52.js.map} +1 -1
- package/dist/esm-es5/index-BIRwgFLv.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/utils-CPSY5rft.js +2 -0
- package/dist/esm-es5/utils-CPSY5rft.js.map +1 -0
- package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-button-panel.entry.js +2 -0
- package/dist/esm-es5/verdocs-button-panel.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_11.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-preview_6.entry.js +8 -0
- package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-signing-progress.entry.js +1 -1
- package/dist/esm-es5/verdocs-tabs.entry.js +2 -0
- package/dist/esm-es5/verdocs-tabs.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-settings.entry.js +2 -0
- package/dist/esm-es5/verdocs-template-settings.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +1 -1
- package/dist/types/components/embeds/verdocs-preview/verdocs-preview.d.ts +1 -0
- package/dist/types/components/fields/verdocs-field-attachment/verdocs-field-attachment.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-date/verdocs-field-date.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +1 -1
- package/dist/types/components/fields/verdocs-field-payment/verdocs-field-payment.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-radio/verdocs-field-radio.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-signature/verdocs-field-signature.d.ts +1 -1
- package/dist/types/components/fields/verdocs-field-textarea/verdocs-field-textarea.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.d.ts +2 -1
- package/dist/types/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.d.ts +8 -3
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +4 -9
- package/dist/types/components.d.ts +2 -4
- package/dist/verdocs-web-sdk/{p-2ff00959.system.entry.js → p-032e8fb0.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-fe5aabfb.entry.js → p-04981f9f.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-7f7da7d6.system.entry.js → p-066eaea8.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-53be15dc.entry.js → p-0b59a4a5.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-0e4aa0d1.entry.js +8 -0
- package/dist/verdocs-web-sdk/p-0e4aa0d1.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-107a1995.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-e65af831.system.entry.js.map → p-107a1995.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-1b5b8ffa.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-1b5b8ffa.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-be9c544d.system.entry.js → p-2ba8c771.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-2ebc769e.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-2ebc769e.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-311bb5b2.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-da28bd7d.entry.js.map → p-311bb5b2.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-069169a7.entry.js → p-3202f0eb.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-edc49225.entry.js → p-3648e4c0.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-3648e4c0.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-39b03469.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-39b03469.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-64b9e2de.entry.js → p-3be22031.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f4c4a49e.system.entry.js → p-4424623c.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-7a086c18.entry.js → p-4f820bee.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2fc50938.system.entry.js → p-53530f64.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f1ca6e1c.system.entry.js → p-60cfa50a.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-93e9df57.system.entry.js → p-641dbbfa.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-6c8883ff.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-8e8c0110.entry.js.map → p-6c8883ff.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-6d41df5d.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-6d41df5d.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-8062bb99.entry.js → p-6d5af60f.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6038e4c1.system.entry.js → p-774961dc.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-63c0f31d.system.entry.js → p-822694c1.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-9b367391.system.entry.js → p-91316504.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0c24c1b8.entry.js → p-92b4f218.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-adcbb1c2.entry.js → p-9586b268.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-CC3ukJv1.system.js.map → p-BFC8G6sY.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-LGooaeHw.system.js.map → p-BJ0cUjeu.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CRk-MpSX.system.js.map → p-BJx8Y9VG.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-BUFQbxzf.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-CWh-S6N5.system.js.map → p-BuHYXI2L.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-bS8INhRF.js → p-C7hFgM52.js} +2 -2
- package/dist/verdocs-web-sdk/{p-bS8INhRF.js.map → p-C7hFgM52.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-C9JdpYtM.js +2 -0
- package/dist/verdocs-web-sdk/p-C9JdpYtM.js.map +1 -0
- package/dist/verdocs-web-sdk/p-CCv1s4sj.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-COM7km0I.system.js.map → p-CVmJ8lYI.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-Cd268O-w.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-C5U_96FD.system.js.map → p-CyPGia16.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-DGti20Vc.system.js +2 -0
- package/dist/verdocs-web-sdk/p-DGti20Vc.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-Db5fIu2w.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-BcNo_mbk.system.js.map → p-DmQa-gqf.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-dY2me2i5.system.js.map → p-Dmc2VIXX.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-DrBEr1CO.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-C-5pmv-B.system.js.map → p-N4-IQ3Cb.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-TQtp_Nv2.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-BvI8gTGk.system.js.map → p-WCWuCFHk.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-a06b40a9.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-a06b40a9.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-ESsv28K0.system.js.map → p-a51WVEiq.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-c0c4b822.entry.js → p-a7e0e67a.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-abfa8b47.system.entry.js +8 -0
- package/dist/verdocs-web-sdk/p-abfa8b47.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-ad41a644.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-ad41a644.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-333d4a2e.system.entry.js → p-b7d907b4.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-b83472cd.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-b83472cd.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-e4b13df9.system.entry.js → p-bcffad7a.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-8d5c3516.entry.js → p-c7bfe2f1.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-081b245d.system.entry.js → p-d52e6117.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-dde291ad.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-dde291ad.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-0faa3e84.entry.js → p-e262ea96.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-8b2d4ca5.entry.js → p-f7f33a99.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-lEpx1l-p.system.js → p-fEbwslLK.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-lEpx1l-p.system.js.map → p-fEbwslLK.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-fd923850.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-fd923850.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-0-YdlCL1.system.js.map → p-x_N0ZS08.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-yFbTWZrj.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-D1RF_rpl.system.js.map → p-yUsULl32.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/verdocs-build.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-button-panel.entry.esm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-payment.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.esm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-tabs.entry.esm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-template-settings.entry.esm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/utils-ecG41L2k.js.map +0 -1
- package/dist/cjs/verdocs-button-panel.verdocs-tabs.entry.cjs.js.map +0 -1
- package/dist/cjs/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.cjs.js.map +0 -1
- package/dist/components/p-BYDdRCru.js.map +0 -1
- package/dist/components/p-BZRJWqKI.js.map +0 -1
- package/dist/components/p-Bafj7hI1.js.map +0 -1
- package/dist/components/p-By2QlfRC.js.map +0 -1
- package/dist/components/p-CFi6VKgU.js.map +0 -1
- package/dist/components/p-CWGxLuye.js.map +0 -1
- package/dist/components/p-CYRfkDZa.js.map +0 -1
- package/dist/components/p-CjDMm6od.js.map +0 -1
- package/dist/components/p-Cp7g7TMK.js.map +0 -1
- package/dist/components/p-DLV8jNf8.js.map +0 -1
- package/dist/components/p-Dj_oFCRK.js.map +0 -1
- package/dist/components/p-Dpu4D5bv.js.map +0 -1
- package/dist/components/p-DzM2oGUr.js.map +0 -1
- package/dist/components/p-bS8INhRF.js.map +0 -1
- package/dist/components/p-e7e4Os6T.js.map +0 -1
- package/dist/components/p-hDK3S4nn.js +0 -188
- package/dist/components/p-hDK3S4nn.js.map +0 -1
- package/dist/components/p-rboJNAPD.js.map +0 -1
- package/dist/components/p-tyY7kKNB.js.map +0 -1
- package/dist/esm/utils-CerrMWqr.js.map +0 -1
- package/dist/esm/verdocs-button-panel.verdocs-tabs.entry.js.map +0 -1
- package/dist/esm/verdocs-button-panel_2.entry.js +0 -105
- package/dist/esm/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.js.map +0 -1
- package/dist/esm-es5/utils-CerrMWqr.js +0 -2
- package/dist/esm-es5/utils-CerrMWqr.js.map +0 -1
- package/dist/esm-es5/verdocs-button-panel.verdocs-tabs.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-button-panel_2.entry.js +0 -2
- package/dist/esm-es5/verdocs-button-panel_2.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-preview_7.entry.js +0 -8
- package/dist/esm-es5/verdocs-preview_7.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-07bd9f14.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-07bd9f14.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-5bc00fc6.entry.js +0 -8
- package/dist/verdocs-web-sdk/p-5bc00fc6.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-6bbe3f73.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-6bbe3f73.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-8e8c0110.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-B390zQJa.js +0 -2
- package/dist/verdocs-web-sdk/p-B390zQJa.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BZv_Bu9M.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-CT1VA0C-.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-CaEXyfjG.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DEv3ZZhp.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DGOssAS4.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-a6b008ef.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-a6b008ef.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-aaad7b8a.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-aaad7b8a.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-acf58947.system.entry.js +0 -8
- package/dist/verdocs-web-sdk/p-acf58947.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-da28bd7d.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e3075674.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e3075674.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e65af831.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-edc49225.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f589tneI.system.js +0 -2
- package/dist/verdocs-web-sdk/p-f589tneI.system.js.map +0 -1
- package/dist/verdocs-web-sdk/verdocs-button-panel.verdocs-tabs.entry.esm.js.map +0 -1
- package/dist/verdocs-web-sdk/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.esm.js.map +0 -1
- /package/dist/verdocs-web-sdk/{p-2ff00959.system.entry.js.map → p-032e8fb0.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-fe5aabfb.entry.js.map → p-04981f9f.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-7f7da7d6.system.entry.js.map → p-066eaea8.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-53be15dc.entry.js.map → p-0b59a4a5.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-be9c544d.system.entry.js.map → p-2ba8c771.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-069169a7.entry.js.map → p-3202f0eb.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-64b9e2de.entry.js.map → p-3be22031.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-f4c4a49e.system.entry.js.map → p-4424623c.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-7a086c18.entry.js.map → p-4f820bee.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-2fc50938.system.entry.js.map → p-53530f64.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-f1ca6e1c.system.entry.js.map → p-60cfa50a.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-93e9df57.system.entry.js.map → p-641dbbfa.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-8062bb99.entry.js.map → p-6d5af60f.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6038e4c1.system.entry.js.map → p-774961dc.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-63c0f31d.system.entry.js.map → p-822694c1.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-9b367391.system.entry.js.map → p-91316504.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0c24c1b8.entry.js.map → p-92b4f218.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-adcbb1c2.entry.js.map → p-9586b268.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-c0c4b822.entry.js.map → p-a7e0e67a.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-333d4a2e.system.entry.js.map → p-b7d907b4.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-e4b13df9.system.entry.js.map → p-bcffad7a.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-8d5c3516.entry.js.map → p-c7bfe2f1.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-081b245d.system.entry.js.map → p-d52e6117.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0faa3e84.entry.js.map → p-e262ea96.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-8b2d4ca5.entry.js.map → p-f7f33a99.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,o,s,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(i=0)),i)try{if(n=1,o&&(s=a[0]&2?o["return"]:a[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,a[1])).done)return s;if(o=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];o=0}finally{n=s=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,o=t.length,s;n<o;n++){if(s||!(n in t)){if(!s)s=Array.prototype.slice.call(t,0,n);s[n]=t[n]}}return e.concat(s||Array.prototype.slice.call(t))};System.register(["./p-BO6MZhlp.system.js","@verdocs/js-sdk","./p-f589tneI.system.js","./p-GqS1qR-V.system.js","./p-Dj475wLP.system.js","./p-7Iu0_GGa.system.js","./p-lEpx1l-p.system.js","./p-DmF0GSqu.system.js","./p-C2OP3llY.system.js"],(function(e){"use strict";var t,i,n,o,s,r,a,l,c,d,u,h,f,v,p,g,m,x,b,w,y,k,C,S,_,I,N,z,G,L,H,T,E,M,q,V,j,D,A;return{setters:[function(e){t=e.r;i=e.c;n=e.h;o=e.H;s=e.F;r=e.g},function(e){a=e.VerdocsEndpoint;l=e.DEFAULT_DISCLOSURES;c=e.startSigningSession;d=e.envelopeRecipientAgree;u=e.getEnvelope;h=e.updateEnvelopeField;f=e.createSignature;v=e.createInitials;p=e.sortFields;g=e.envelopeRecipientSubmit;m=e.isFieldValid;x=e.isFieldFilled;b=e.uploadEnvelopeFieldAttachment;w=e.deleteEnvelopeFieldAttachment;y=e.formatFullName;k=e.fullNameToInitials;C=e.verifySigner;S=e.delegateRecipient;_=e.envelopeRecipientDecline;I=e.integerSequence;N=e.askQuestion;z=e.getEnvelopeDocumentDownloadLink;G=e.getEnvelopesZip},function(e){L=e.u;H=e.g;T=e.r;E=e.a;M=e.d},function(e){q=e.D;V=e.C},function(e){j=e.V},function(e){D=e.S},function(e){A=e.S},null,null],execute:function(){var P='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;min-height:700px;position:relative;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f5;font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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;padding-right:140px;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>.document .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;max-width:1028px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-sign>.document .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-sign>.document .document-separator:first-child{margin-top:0}verdocs-sign .signed-document-container{width:64%;margin-left:260px;-webkit-transition:all 0.3s ease;transition:all 0.3s ease}verdocs-sign .signed-document-container.zoom-normal{width:64%;margin-left:260px}verdocs-sign .signed-document-container.zoom-zoom1{width:80%;margin-left:200px}verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:150px}verdocs-sign .signed-document-container.zoom-zoom2 .verdocs-flag-instance{opacity:0;pointer-events:none}@media (max-width: 768px){verdocs-sign verdocs-sign-footer{padding:0 10px}verdocs-sign verdocs-sign-footer .buttons{gap:8px}verdocs-sign verdocs-sign-footer .buttons button{font-size:10px}verdocs-sign .signed-document-container{width:100%;margin-left:0}verdocs-sign .signed-document-container.zoom-normal,verdocs-sign .signed-document-container.zoom-zoom1,verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:0}verdocs-sign>.document{padding-right:15px}verdocs-sign .verdocs-flag-instance{display:none !important}verdocs-sign .controls-toolbar .center-controls{display:none}verdocs-sign .controls-toolbar .right-controls .mobile-next-button{display:block;margin-right:10px}verdocs-sign .controls-toolbar .right-controls .minus,verdocs-sign .controls-toolbar .right-controls .plus{display:none}}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 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}@media print{verdocs-sign .header,.controls-toolbar,.verdocs-flag-instance,verdocs-signing-progress{display:none !important}verdocs-sign{min-height:auto;background-color:white}verdocs-sign>.document{overflow:visible;height:auto;display:block;padding:0;margin:0}verdocs-sign>.document .document-separator{display:none}verdocs-sign .signed-document-container{width:100%;margin:0}}#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;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px}#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}#verdocs-sign-header .remaining-count{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;color:#ffffff;font-size:13px;font-weight:400;white-space:nowrap}#verdocs-sign-header .remaining-count .check-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}#verdocs-sign-header .remaining-count .check-icon svg{width:16px;height:16px;fill:#55bc81}#verdocs-sign-header .remaining-count .separator{opacity:0.5;margin:0 2px}#verdocs-sign-header .remaining-count .review-optional{cursor:pointer;text-decoration:underline}#verdocs-sign-header .remaining-count .review-optional:hover{color:#54d68c}#verdocs-sign-header .icon-button{width:20px;height:32px;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}#verdocs-sign-header .icon-button svg path{fill:#ffffff}#verdocs-sign-header .icon-button:hover{background-color:rgba(255, 255, 255, 0.1)}#verdocs-sign-header .icon-button.disabled{opacity:0.35;pointer-events:none}#verdocs-sign-header .icon-button+.icon-button{margin-left:-6px}.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}.controls-toolbar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:54px;padding:0 12px 0 24px;background-color:#ffffff;border-bottom:1px solid #e0e0e0;-webkit-box-shadow:none;box-shadow:none;font-family:"Inter", sans-serif;color:#424242;z-index:1000}.controls-toolbar .left-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .left-controls .title{font-weight:500;font-size:16px;color:#242424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.controls-toolbar .center-controls{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:10px;font-size:14px;display:none}.controls-toolbar .center-controls .label{color:#000000;font-weight:300}.controls-toolbar .center-controls .select-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .center-controls .select-wrapper verdocs-select-input{margin:0}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-label{display:none}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element{background:transparent;border:1px solid #e0e0e0;height:32px;padding:2px 8px;min-width:60px;text-align:center;font-family:inherit;color:#424242}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element:focus{border-color:var(--verdocs-primary-color, #55bc81)}.controls-toolbar .center-controls .count{color:#000000;font-weight:300}.controls-toolbar .right-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.controls-toolbar .right-controls .mobile-next-button{display:none}.controls-toolbar .right-controls .icon-button{width:32px;height:32px;display:-ms-flexbox;display:flex;color:#424242;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}.controls-toolbar .right-controls .icon-button:hover{background-color:#f5f5f5}.controls-toolbar .right-controls .icon-button.disabled{opacity:0.3;pointer-events:none}.controls-toolbar .right-controls .icon-button svg{display:block;width:20px;height:20px}';var U='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z" fill="#424242" /></svg>';var O='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z" fill="#424242" /></svg>';var R='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z" fill="#424242"/></svg>';var Z='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z" fill="#424242"/></svg>';var Y=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=new a({sessionType:"signing"});this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.toolbarStyle="menu";this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=l;this.fieldUpdateCounter=0;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.adoptingSignature=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.signatureId=null;this.initialId=null;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.pageNumber=1;this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.showDownloadDialog=false;this.loading=true;this.envelope=null;this.zoomLevel="normal";this.signingProgressMode="start";this.polling=true;this.renderedPages={};this.pollingInterval=null}e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,s,r,a;var l=this;return __generator(this,(function(d){switch(d.label){case 0:this.updateZoomFromWindow();window.addEventListener("resize",(function(){return l.updateZoomFromWindow()}));if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new D("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new D("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new D("[SIGN] Missing required inviteCode",500,""));return[2]}d.label=1;case 1:d.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,c(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:r=d.sent();this.processAuthResponse(r);return[3,4];case 3:a=d.sent();console.log("[SIGN] Error with signing session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new D(a.message,(o=a.response)===null||o===void 0?void 0:o.status,(s=a.response)===null||s===void 0?void 0:s.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)}this.setupIntersectionObserver()};e.prototype.disconnectedCallback=function(){var e=this;var t,i;this.stopPolling();(t=this.observer)===null||t===void 0?void 0:t.disconnect();window.removeEventListener("resize",(function(){return e.updateZoomFromWindow()}));(i=document.getElementById(this.getOrgStyleOverridesId()))===null||i===void 0?void 0:i.remove()};e.prototype.updateZoomFromWindow=function(){var e=window.innerWidth;if(e<768){if(this.zoomLevel!=="zoom2")this.zoomLevel="zoom2"}else if(e<1024){if(this.zoomLevel!=="zoom1")this.zoomLevel="zoom1"}else{if(this.zoomLevel!=="normal")this.zoomLevel="normal"}};e.prototype.setupIntersectionObserver=function(){var e=this;var t=this.el.querySelectorAll("verdocs-envelope-document-page");if(t.length===0)return;if(this.observer){this.observer.disconnect()}var i=this.el.querySelector(".signed-document-container");var n={root:i,rootMargin:"-40% 0px -40% 0px",threshold:0};this.observer=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting){var i=t.target.id;var n=parseInt(i.replace("page-",""),10);if(!isNaN(n)&&e.pageNumber!==n){e.pageNumber=n}}}))}),n);t.forEach((function(t){return e.observer.observe(t)}))};e.prototype.getOrgStyleOverridesId=function(){return"verdocs-org-style-overrides-".concat(this.envelopeId)};e.prototype.applyOrgStyleOverrides=function(){var e,t;var i=this.getOrgStyleOverridesId();var n=document.getElementById(i);var o=(t=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||t===void 0?void 0:t.style_overrides;if(typeof o==="string"){var s=n||document.createElement("style");s.id=i;s.textContent=o;if(!n){document.head.appendChild(s)}}else if(n){n.remove()}};e.prototype.processAuthResponse=function(e){var t,i,n,o;var s=e.envelope,r=e.recipient;(t=s.documents)===null||t===void 0?void 0:t.sort((function(e,t){return e.order!==t.order?e.order-t.order:e.created_at.localeCompare(t.created_at)}));var a=r.auth_step;this.recipient=r;this.envelope=s;this.disclosures=((n=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||n===void 0?void 0:n.disclaimer)||l;this.applyOrgStyleOverrides();this.authStep=a;this.delegated=!!r.delegated_to;this.agreed=r.agreed;this.signatureId=null;this.initialId=null;this.submitted=r.status==="submitted";this.loading=false;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();(o=this.envelopeLoaded)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);d(this.endpoint,this.envelopeId,this.roleId,this.disclosures).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,o;console.log("[SIGN] Unable to accept disclosures",t);j("Unable to accept disclosures, please try again later",{style:"error"});(i=e.sdkError)===null||i===void 0?void 0:i.emit(new D(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(o=t.response)===null||o===void 0?void 0:o.data));e.submitting=false}))};e.prototype.handlePageSelect=function(e){var t=parseInt(e.target.value);if(!isNaN(t)){this.pageNumber=t;var i=this.el.querySelector(".signed-document-container");var n=this.el.querySelector("#page-".concat(t));if(i&&n){var o=n.offsetTop-20;i.scrollTo({top:o,behavior:"smooth"})}}};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(n){switch(e.detail.id){case"later":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"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":this.showDownloadDialog=true;this.startPolling();break}return[2]}))}))};e.prototype.startPolling=function(){var e=this;this.stopPolling();var t=function(){var t,i,n,o,s,r;var a=((t=e.envelope)===null||t===void 0?void 0:t.status)==="complete"||!!((i=e.envelope)===null||i===void 0?void 0:i.signed);var l=(o=(n=e.envelope)===null||n===void 0?void 0:n.documents)===null||o===void 0?void 0:o.some((function(e){return e.type==="certificate"}));var c=(r=(s=e.envelope)===null||s===void 0?void 0:s.recipients)===null||r===void 0?void 0:r.every((function(e){return e.status==="submitted"}));if(a&&l)return false;if(!c)return false;return true};if(!t()){return}this.polling=true;this.pollingInterval=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,u(this.endpoint,this.envelopeId)];case 1:e=n.sent();this.envelope=e;A.updateEnvelope(this.envelopeId,e);this.checkRecipientFields();if(!t()){this.stopPolling()}return[3,3];case 2:i=n.sent();console.error("[SIGN] Polling error",i);this.stopPolling();return[3,3];case 3:return[2]}}))}))}),5e3)};e.prototype.stopPolling=function(){if(this.pollingInterval){clearInterval(this.pollingInterval);this.pollingInterval=null}this.polling=false};e.prototype.handleZoomIn=function(){if(this.zoomLevel==="normal"){this.zoomLevel="zoom1"}else if(this.zoomLevel==="zoom1"){this.zoomLevel="zoom2"}};e.prototype.handleZoomOut=function(){if(this.zoomLevel==="zoom1"){this.zoomLevel="normal"}else if(this.zoomLevel==="zoom2"){this.zoomLevel="zoom1"}};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;L(n);i.fieldUpdateCounter++;i.markEnvelopeStarted();i.checkRecipientFields()}}))};e.prototype.getStartedKey=function(){var e;return"".concat(this.envelopeId,":").concat(((e=this.recipient)===null||e===void 0?void 0:e.role_name)||"")};e.prototype.markEnvelopeStarted=function(){var e=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var t=this.getStartedKey();if(!e.includes(t)){e.push(t);while(e.length>10){e.shift()}localStorage.setItem("startedEnvelopes",JSON.stringify(e))}};e.prototype.saveFieldChange=function(e,t,i){var n=this;var o=this.getRecipientFields().find((function(t){return t.name===e}));if(o===null||o===void 0?void 0:o.readonly){return}console.log("[SIGN] saveFieldChange",e,{value:t,prepared:i});h(this.endpoint,this.envelopeId,this.roleId,e,t,i).then((function(t){return n.updateRecipientFieldValue(e,t)})).catch((function(e){var t,i,o,s,r,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((o=(i=e.response)===null||i===void 0?void 0:i.data)===null||o===void 0?void 0:o.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.fatalErrorHeader="Signing Session Expired";n.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);j("Unable to save change, please try again later",{style:"error"})}(s=n.sdkError)===null||s===void 0?void 0:s.emit(new D(e.message,(r=e.response)===null||r===void 0?void 0:r.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,o,s,r,r,r,a,r,r,r,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:if(!t.target){return[2]}i=t.target,n=i.value,o=i.checked;s=e.type;switch(s){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,14];case"date":return[3,23];case"timestamp":return[3,24]}return[3,25];case 1:return[2,this.saveFieldChange(e.name,n,false)];case 2:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=3;case 3:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,t.detail,false)];case 5:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,7];console.log("[SIGN] Clearing initial");return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 6:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 7:if(!this.initialId)return[3,9];console.log("[SIGN] Reusing initial",this.initialId);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,this.initialId,false)];case 8:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 9:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,11];console.log("[SIGN] Reusing initial",t.detail);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 10:r=u.sent();this.initialId=t.detail;return[2,this.updateRecipientFieldValue(e.name,r)];case 11:this.showSpinner=true;return[4,fetch(t.detail)];case 12:return[4,u.sent().blob()];case 13:a=u.sent();return[2,v(this.endpoint,"initial",a).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.initialId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);j("Unable to save initials, please try again later",{style:"error"});d.showSpinner=false}))];case 14:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,16];console.log("[SIGN] Clearing signature");return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 15:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 16:if(!this.signatureId)return[3,18];console.log("[SIGN] Reusing signature",this.signatureId);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,this.signatureId,false)];case 17:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 18:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,20];console.log("[SIGN] Reusing signature",t.detail);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 19:r=u.sent();this.signatureId=t.detail;return[2,this.updateRecipientFieldValue(e.name,r)];case 20:this.showSpinner=true;return[4,fetch(t.detail)];case 21:return[4,u.sent().blob()];case 22:l=u.sent();console.log("[SIGN] Creating new signature");return[2,f(this.endpoint,"signature",l).then((function(t){return __awaiter(d,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,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.signatureId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);j("Unable to save signature, please try again later",{style:"error"});d.showSpinner=false}))];case 23:c=t.detail.formattedDate;if(c){return[2,this.saveFieldChange(e.name,c,false)]}return[3,26];case 24:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,26];case 25:console.log("[SIGN] Unhandled field update",{value:n,checked:o},e);return[3,26];case 26:return[2]}}))}))};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"&&!e.readonly}));p(e);return e};e.prototype.getSortedDisplayableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));p(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,s,r;var a=this;return __generator(this,(function(l){switch(l.label){case 0:if(!this.nextSubmits)return[3,5];l.label=1;case 1:l.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,g(this.endpoint,this.envelopeId,this.roleId)];case 2:t=l.sent();console.log("[SIGN] Submitted successfully",t);window.location.reload();return[3,4];case 3:i=l.sent();console.log("[SIGN] Error submitting",i);this.submitting=false;j("Unable to submit document, please try again.",{style:"error"});return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return!a.isFieldActuallyFilled(e)}));o=this.getNextFieldFromList(n);if(o){s=H(o);r=document.getElementById(s);r===null||r===void 0?void 0:r.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});r===null||r===void 0?void 0:r.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.handleNextOptional=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)}));var i=this.getNextFieldFromList(t);if(i){var n=H(i);var o=document.getElementById(n);o===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});o===null||o===void 0?void 0:o.focusField();this.focusedField=i.name}};e.prototype.getRecipientFields=function(){var e=this;var t;return((t=this.envelope)===null||t===void 0?void 0:t.fields.filter((function(t){return t.role_name===e.recipient.role_name})))||[]};e.prototype.getRequiredTotalCount=function(){return this.getSortedFillableFields().filter((function(e){return e.required})).length};e.prototype.getRequiredFilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return t.required&&e.isFieldActuallyFilled(t)})).length};e.prototype.getOptionalUnfilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)})).length};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!m(t,e.getRecipientFields())}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}this.updateAllFlags();var i=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var n=i.includes(this.getStartedKey());if(this.nextSubmits){this.signingProgressMode="completed"}else if(n){this.signingProgressMode="signing"}else{this.signingProgressMode="start"}};e.prototype.isFieldActuallyFilled=function(e){if(e.type==="radio"&&e.group){var t=this.getRecipientFields().some((function(t){return t.group===e.group&&t.value==="true"}));if(t){return true}}return x(e,this.getRecipientFields())&&(e.type!=="dropdown"||!!e.value)&&(e.type!=="radio"||e.value==="true")&&(e.type!=="checkbox"||e.value==="true")};e.prototype.getNextRequiredField=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return t.required&&!e.isFieldActuallyFilled(t)}));p(t);if(t.length===0){var i=this.getSortedFillableFields().filter((function(t){return!e.isFieldActuallyFilled(t)}));p(i);if(i.length>0){return this.getNextFieldFromList(i)}return null}return this.getNextFieldFromList(t)};e.prototype.getNextFieldFromList=function(e){var t=this;var i=e.findIndex((function(e){return e.name===t.focusedField}));var n=i+1;if(n>=e.length){n=0}return e[n]};e.prototype.handlePrev=function(){var e=this;var t;var i=this.getSortedFillableFields();var n=i.findIndex((function(t){return t.name===e.focusedField}));if(n>0){var o=i[n-1];var s=H(o);var r=document.getElementById(s);r===null||r===void 0?void 0:r.scrollIntoView({behavior:"smooth",block:"center"});(t=r===null||r===void 0?void 0:r.focusField)===null||t===void 0?void 0:t.call(r);this.focusedField=o.name}};e.prototype.updateAllFlags=function(){var e=this;Object.values(this.renderedPages).forEach((function(t){e.updateFlagsForPage(t)}))};e.prototype.updateFlagsForPage=function(e){var t=this;if(!e)return;var i=document.getElementById(e.containerId+"-controls");if(!i)return;var n=i.querySelectorAll(".verdocs-flag-instance");n.forEach((function(e){return e.remove()}));var o=this.getNextRequiredField();var s=this.getRecipientFields().find((function(e){return e.name===t.focusedField}));if(s&&!x(s,this.getRecipientFields())){o=s}if(o&&o.page===e.pageNumber&&o.document_id===e.documentId){var r="fill";var a="FILL";var l=false;switch(o.type){case"signature":a="SIGN";break;case"initial":a="INITIAL";break;case"checkbox":a="CHECK";break;case"radio":a="SELECT";break;case"date":case"dropdown":a="SELECT";break;case"attachment":a="ATTACH";break;case"payment":a="PAY";break;default:a="FILL";break}if(!o.required){l=true}T(e,o.y,o.height||M(o.type),{variant:r,label:a,showSkip:l,onSkip:function(){t.handleNext()},onClick:function(){var e;var t=H(o);var i=document.getElementById(t);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center"});(e=i===null||i===void 0?void 0:i.focusField)===null||e===void 0?void 0:e.call(i)}})}};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,o,s;return __generator(this,(function(r){switch(r.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;r.label=1;case 1:r.trys.push([1,3,,4]);return[4,b(this.endpoint,this.envelopeId,this.roleId,t.name,i.detail)];case 2:n=r.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=E("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:s=r.sent();console.log("Error uploading attachment",s);j("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,o,s;return __generator(this,(function(r){switch(r.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;r.label=1;case 1:r.trys.push([1,3,,4]);return[4,w(this.endpoint,this.envelopeId,this.roleId,t.name)];case 2:n=r.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=E("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:s=r.sent();console.log("Error uploading attachment",s);j("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"&&t.type!=="signature"&&t.type!=="initial"&&t.type!=="checkbox"&&t.type!=="radio"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.addEventListener("adopt",(function(){n.focusedField=t.name;n.adoptingSignature=true}));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 o=y(this.recipient);i.setAttribute("initials",k(o));i.setAttribute("name",o);if(this.signatureId){i.setAttribute("signatureid",this.signatureId)}if(this.initialId){i.setAttribute("initialid",this.initialId)}};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;this.renderedPages["".concat(i.documentId,":").concat(i.pageNumber)]=i;var n=this.getSortedDisplayableFields();n.filter((function(e){return e&&e.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e,n){var o=E("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!o){return}if(Array.isArray(o)){o.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,o)}}));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.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e){var n=E("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();this.updateFlagsForPage(i)};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);C(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,o,s,r,a;console.log("[SIGN] Error submitting authentication step",e);console.log((i=e.response)===null||i===void 0?void 0:i.data);if((s=(o=(n=e.response)===null||n===void 0?void 0:n.data)===null||o===void 0?void 0:o.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{j(((a=(r=e.response)===null||r===void 0?void 0:r.data)===null||a===void 0?void 0:a.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;var t;if(this.showLoadError){return n(o,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(o,null,n("verdocs-loader",null))}if(this.fatalErrorMessage){return n(o,{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(o,{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(o,{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(o,{class:"agreed"},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("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:function(){return e.delegating=false},onNext:function(t){S(e.endpoint,e.envelopeId,e.roleId,t.detail).then((function(t){j("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);j("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return n(o,{class:"agreed"},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("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(){_(e.endpoint,e.envelopeId,e.roleId).then((function(e){console.log("[SIGN] Decline result",e);window.location.reload()})).catch((function(e){console.warn("[SIGN] Error declining signing session",e);j("Unable to decline, please try again later",{style:"error"})}))}}))}if(!this.agreed){return n(o,{class:"agreed"},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("verdocs-disclosure-dialog",{disclosures:this.disclosures,delegator:this.recipient.delegator,onDelegate:function(){return e.delegating=true},onDecline:function(){return e.declining=true},onAccept:function(){return e.handleClickAgree()}}))}if(this.authStep==="passcode"){return n("verdocs-passcode-dialog",{endpoint:this.endpoint,onNext:function(t){return e.processAuthResponse(t.detail.response)}})}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(o,{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 r=this.kbaQuestions[i];return n(o,{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:(r===null||r===void 0?void 0:r.prompt)||"Please select one of the options below.",choices:(r===null||r===void 0?void 0:r.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(o){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]}))}))}}))))}var a=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var l=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){a.unshift({id:"delegate",label:"Delegate"})}var c=this.getRecipientFields().filter((function(t){return!m(t,e.getRecipientFields())}));c.length>0?console.log("[SIGN] Invalid fields remaining",c.map((function(e){return e.name}))):console.log("[SIGN] All field valid");var d=this.envelope.documents.reduce((function(e,t){return e+t.pages}),0);var u=I(1,d).map((function(e){return{label:e.toString(),value:e.toString()}}));var p=0;return n(o,null,this.toolbarStyle==="menu"&&n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("div",{class:"title"},this.envelope.name),n("div",{style:{flex:"1"}}),!this.finishLater&&function(){var t=e.getRequiredTotalCount()-e.getRequiredFilledCount();var i=e.getOptionalUnfilledCount();if(t>0){return n("span",{class:"remaining-count"},t," required field",t===1?"":"s"," left")}return n("span",{class:"remaining-count"},n("span",{class:"check-icon",innerHTML:V}),"All required fields complete",i>0&&n("span",{class:"separator"},"|"),i>0&&n("span",{class:"review-optional",onClick:function(){return e.handleNextOptional()}},"Review ",i," optional"))}(),!this.finishLater&&n("verdocs-button",{size:"xsmall",label:this.nextButtonLabel==="Next"?"Next Required":this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),n("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:U,onClick:function(){return e.handleZoomOut()}}),n("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:O,onClick:function(){return e.handleZoomIn()}}),n("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?a:l,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),this.toolbarStyle==="controls"&&n("div",{class:"controls-toolbar"},n("div",{class:"left-controls"},n("div",{class:"title"},this.envelope.name)),n("div",{class:"center-controls"},n("span",{class:"label"},"Page"),n("div",{class:"select-wrapper"},n("verdocs-select-input",{options:u,value:this.pageNumber.toString(),onInput:function(t){return e.handlePageSelect(t)}})),n("span",{class:"count"},"of ",d)),n("div",{class:"right-controls"},n("verdocs-button",{class:"mobile-next-button",label:this.nextButtonLabel,size:"xsmall",disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),n("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:U,onClick:function(){return e.handleZoomOut()}}),n("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:O,onClick:function(){return e.handleZoomIn()}}),n("div",{class:"icon-button download",innerHTML:R,onClick:function(){return e.handleOptionSelected({detail:{id:"download"}})}}),n("div",{class:"icon-button print",innerHTML:Z,onClick:function(){return e.handleOptionSelected({detail:{id:"print"}})}}))),n("div",{class:"document signed-document-container zoom-".concat(this.zoomLevel)},(this.envelope.documents||[]).map((function(t){var i=I(1,t.pages);return n(s,null,e.envelope.documents.length>1&&n("div",{class:"document-separator"},n("div",{innerHTML:q}),n("span",null,t.name)),i.map((function(i){var o;var s=((o=t.page_sizes)===null||o===void 0?void 0:o[i])||{width:612,height:792};p++;return n("verdocs-envelope-document-page",{id:"page-".concat(p),envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:s.width,virtualHeight:s.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(){e.isDone=true;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.adoptingSignature&&n("verdocs-adopt-signature-dialog",{name:y(this.recipient),nameLocked:!!((t=this.recipient)===null||t===void 0?void 0:t.name_locked),onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,s,r,a,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:console.log("[SIGN] Adopting signature/initials block",t.detail);this.showSpinner=true;return[4,fetch(t.detail.signature)];case 1:return[4,u.sent().blob()];case 2:e=u.sent();return[4,fetch(t.detail.initials)];case 3:return[4,u.sent().blob()];case 4:i=u.sent();return[4,f(this.endpoint,"signature",e)];case 5:n=u.sent();console.log("[SIGN] Created signature",n);this.signatureId=n.id;return[4,v(this.endpoint,"initial",i)];case 6:o=u.sent();console.log("[SIGN] Created initials",o);this.initialId=o.id;this.showSpinner=false;this.adoptingSignature=false;this.markEnvelopeStarted();if(!this.focusedField)return[3,9];s=this.getRecipientFields().find((function(e){return e.name===d.focusedField}));if(!s)return[3,8];r=s.type==="signature"?this.signatureId:s.type==="initial"?this.initialId:null;if(!r)return[3,8];return[4,h(this.endpoint,this.envelopeId,this.roleId,s.name,r,false)];case 7:a=u.sent();this.updateRecipientFieldValue(s.name,a);u.label=8;case 8:this.focusedField="";u.label=9;case 9:l=this.el.querySelectorAll("verdocs-field-signature");l.forEach((function(e){return e.setAttribute("signatureid",d.signatureId)}));c=this.el.querySelectorAll("verdocs-field-initial");c.forEach((function(e){return e.setAttribute("initialid",d.initialId)}));this.checkRecipientFields();return[2]}}))}))},onExit:function(){return e.adoptingSignature=false}}),(this.submitting||this.showSpinner)&&n("verdocs-portal",null,n("div",{class:"spinner-overlay"},n("verdocs-spinner",null))),this.showDownloadDialog&&n("verdocs-download-dialog",{signed:this.envelope.signed,polling:this.polling,documents:this.envelope.documents,onExit:function(){e.showDownloadDialog=false;e.stopPolling()},onDownload:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,s,r,a,r,l,r,c,d;return __generator(this,(function(u){switch(u.label){case 0:i=t.detail,n=i.action,o=i.documentId;console.log("[SIGN] Download action selected:",n,o);u.label=1;case 1:u.trys.push([1,11,,12]);if(!(n==="document"))return[3,4];s=o||((e=this.envelope.documents.find((function(e){return e.type==="attachment"})))===null||e===void 0?void 0:e.id);if(!s)return[3,3];return[4,z(this.endpoint,s)];case 2:r=u.sent();window.open(r,"_blank");u.label=3;case 3:return[3,10];case 4:if(!(n==="certificate"))return[3,8];a=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!a)return[3,6];return[4,z(this.endpoint,a.id)];case 5:r=u.sent();window.open(r,"_blank");return[3,7];case 6:j("Certificate not yet available.",{style:"info"});u.label=7;case 7:return[3,10];case 8:if(!(n==="zip"))return[3,10];return[4,G(this.endpoint,[this.envelopeId])];case 9:l=u.sent();r=window.URL.createObjectURL(l.data);c=document.createElement("a");c.href=r;c.download="".concat(this.envelope.name,".zip");document.body.appendChild(c);c.click();c.remove();window.URL.revokeObjectURL(r);u.label=10;case 10:return[3,12];case 11:d=u.sent();console.error("Download error",d);j("Unable to complete download request.",{style:"error"});return[3,12];case 12:return[2]}}))}))}}),!this.loading&&!this.isDone&&n("verdocs-sign-footer",{endpoint:this.endpoint,envelopeId:this.envelopeId,isDone:this.isDone,onAskQuestion:function(t){N(e.endpoint,e.envelopeId,e.roleId,{question:t.detail.question}).then((function(){return j("Your question has been sent.",{style:"success"})})).catch((function(e){console.log("Error asking question",e);j("Unable to send question, please try again later.",{style:"error"})}))},onDecline:function(){return e.declining=true},onFinishLater:function(){return e.showFinishLater=true}}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());Y.style=P}}}));
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,o,s,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(i=0)),i)try{if(n=1,o&&(s=a[0]&2?o["return"]:a[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,a[1])).done)return s;if(o=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];o=0}finally{n=s=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,o=t.length,s;n<o;n++){if(s||!(n in t)){if(!s)s=Array.prototype.slice.call(t,0,n);s[n]=t[n]}}return e.concat(s||Array.prototype.slice.call(t))};System.register(["./p-BO6MZhlp.system.js","@verdocs/js-sdk","./p-DGti20Vc.system.js","./p-GqS1qR-V.system.js","./p-Dj475wLP.system.js","./p-7Iu0_GGa.system.js","./p-fEbwslLK.system.js","./p-DmF0GSqu.system.js","./p-C2OP3llY.system.js"],(function(e){"use strict";var t,i,n,o,s,r,a,l,c,d,u,h,f,v,p,g,m,x,b,w,y,k,C,S,_,N,I,z,G,L,H,T,E,M,V,q,D,j,A;return{setters:[function(e){t=e.r;i=e.c;n=e.h;o=e.H;s=e.F;r=e.g},function(e){a=e.VerdocsEndpoint;l=e.DEFAULT_DISCLOSURES;c=e.startSigningSession;d=e.envelopeRecipientAgree;u=e.getEnvelope;h=e.updateEnvelopeField;f=e.createSignature;v=e.createInitials;p=e.sortFields;g=e.envelopeRecipientSubmit;m=e.isFieldValid;x=e.isFieldFilled;b=e.uploadEnvelopeFieldAttachment;w=e.deleteEnvelopeFieldAttachment;y=e.formatFullName;k=e.fullNameToInitials;C=e.verifySigner;S=e.delegateRecipient;_=e.envelopeRecipientDecline;N=e.integerSequence;I=e.askQuestion;z=e.getEnvelopeDocumentDownloadLink;G=e.getEnvelopesZip},function(e){L=e.u;H=e.g;T=e.r;E=e.a;M=e.d},function(e){V=e.D;q=e.C},function(e){D=e.V},function(e){j=e.S},function(e){A=e.S},null,null],execute:function(){var P='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;min-height:700px;position:relative;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f5;font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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;padding-right:140px;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>.document .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;max-width:1028px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-sign>.document .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-sign>.document .document-separator:first-child{margin-top:0}verdocs-sign .signed-document-container{width:64%;margin-left:260px;-webkit-transition:all 0.3s ease;transition:all 0.3s ease}verdocs-sign .signed-document-container.zoom-normal{width:64%;margin-left:260px}verdocs-sign .signed-document-container.zoom-zoom1{width:80%;margin-left:200px}verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:150px}verdocs-sign .signed-document-container.zoom-zoom2 .verdocs-flag-instance{opacity:0;pointer-events:none}@media (max-width: 768px){verdocs-sign verdocs-sign-footer{padding:0 10px}verdocs-sign verdocs-sign-footer .buttons{gap:8px}verdocs-sign verdocs-sign-footer .buttons button{font-size:10px}verdocs-sign .signed-document-container{width:100%;margin-left:0}verdocs-sign .signed-document-container.zoom-normal,verdocs-sign .signed-document-container.zoom-zoom1,verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:0}verdocs-sign>.document{padding-right:15px}verdocs-sign .verdocs-flag-instance{display:none !important}verdocs-sign .controls-toolbar .center-controls{display:none}verdocs-sign .controls-toolbar .right-controls .mobile-next-button{display:block;margin-right:10px}verdocs-sign .controls-toolbar .right-controls .minus,verdocs-sign .controls-toolbar .right-controls .plus{display:none}}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 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}@media print{verdocs-sign .header,.controls-toolbar,.verdocs-flag-instance,verdocs-signing-progress{display:none !important}verdocs-sign{min-height:auto;background-color:white}verdocs-sign>.document{overflow:visible;height:auto;display:block;padding:0;margin:0}verdocs-sign>.document .document-separator{display:none}verdocs-sign .signed-document-container{width:100%;margin:0}}#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;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px}#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}#verdocs-sign-header .remaining-count{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;color:#ffffff;font-size:13px;font-weight:400;white-space:nowrap}#verdocs-sign-header .remaining-count .check-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}#verdocs-sign-header .remaining-count .check-icon svg{width:16px;height:16px;fill:#55bc81}#verdocs-sign-header .remaining-count .separator{opacity:0.5;margin:0 2px}#verdocs-sign-header .remaining-count .review-optional{cursor:pointer;text-decoration:underline}#verdocs-sign-header .remaining-count .review-optional:hover{color:#54d68c}#verdocs-sign-header .icon-button{width:20px;height:32px;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}#verdocs-sign-header .icon-button svg path{fill:#ffffff}#verdocs-sign-header .icon-button:hover{background-color:rgba(255, 255, 255, 0.1)}#verdocs-sign-header .icon-button.disabled{opacity:0.35;pointer-events:none}#verdocs-sign-header .icon-button+.icon-button{margin-left:-6px}.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}.controls-toolbar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:54px;padding:0 12px 0 24px;background-color:#ffffff;border-bottom:1px solid #e0e0e0;-webkit-box-shadow:none;box-shadow:none;font-family:"Inter", sans-serif;color:#424242;z-index:1000}.controls-toolbar .left-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .left-controls .title{font-weight:500;font-size:16px;color:#242424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.controls-toolbar .center-controls{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:10px;font-size:14px;display:none}.controls-toolbar .center-controls .label{color:#000000;font-weight:300}.controls-toolbar .center-controls .select-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .center-controls .select-wrapper verdocs-select-input{margin:0}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-label{display:none}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element{background:transparent;border:1px solid #e0e0e0;height:32px;padding:2px 8px;min-width:60px;text-align:center;font-family:inherit;color:#424242}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element:focus{border-color:var(--verdocs-primary-color, #55bc81)}.controls-toolbar .center-controls .count{color:#000000;font-weight:300}.controls-toolbar .right-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.controls-toolbar .right-controls .mobile-next-button{display:none}.controls-toolbar .right-controls .icon-button{width:32px;height:32px;display:-ms-flexbox;display:flex;color:#424242;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}.controls-toolbar .right-controls .icon-button:hover{background-color:#f5f5f5}.controls-toolbar .right-controls .icon-button.disabled{opacity:0.3;pointer-events:none}.controls-toolbar .right-controls .icon-button svg{display:block;width:20px;height:20px}';var U='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z" fill="#424242" /></svg>';var O='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z" fill="#424242" /></svg>';var R='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z" fill="#424242"/></svg>';var Z='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z" fill="#424242"/></svg>';var Y=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=new a({sessionType:"signing"});this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.toolbarStyle="menu";this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=l;this.fieldUpdateCounter=0;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.adoptingSignature=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.signatureId=null;this.initialId=null;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.pageNumber=1;this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.showDownloadDialog=false;this.loading=true;this.envelope=null;this.zoomLevel="normal";this.signingProgressMode="start";this.polling=true;this.renderedPages={};this.pollingInterval=null}e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,s,r,a;var l=this;return __generator(this,(function(d){switch(d.label){case 0:this.updateZoomFromWindow();window.addEventListener("resize",(function(){return l.updateZoomFromWindow()}));if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new j("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new j("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new j("[SIGN] Missing required inviteCode",500,""));return[2]}d.label=1;case 1:d.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,c(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:r=d.sent();this.processAuthResponse(r);return[3,4];case 3:a=d.sent();console.log("[SIGN] Error with signing session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new j(a.message,(o=a.response)===null||o===void 0?void 0:o.status,(s=a.response)===null||s===void 0?void 0:s.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)}this.setupIntersectionObserver()};e.prototype.disconnectedCallback=function(){var e=this;var t,i;this.stopPolling();(t=this.observer)===null||t===void 0?void 0:t.disconnect();window.removeEventListener("resize",(function(){return e.updateZoomFromWindow()}));(i=document.getElementById(this.getOrgStyleOverridesId()))===null||i===void 0?void 0:i.remove()};e.prototype.updateZoomFromWindow=function(){var e=window.innerWidth;if(e<768){if(this.zoomLevel!=="zoom2")this.zoomLevel="zoom2"}else if(e<1024){if(this.zoomLevel!=="zoom1")this.zoomLevel="zoom1"}else{if(this.zoomLevel!=="normal")this.zoomLevel="normal"}};e.prototype.setupIntersectionObserver=function(){var e=this;var t=this.el.querySelectorAll("verdocs-envelope-document-page");if(t.length===0)return;if(this.observer){this.observer.disconnect()}var i=this.el.querySelector(".signed-document-container");var n={root:i,rootMargin:"-40% 0px -40% 0px",threshold:0};this.observer=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting){var i=t.target.id;var n=parseInt(i.replace("page-",""),10);if(!isNaN(n)&&e.pageNumber!==n){e.pageNumber=n}}}))}),n);t.forEach((function(t){return e.observer.observe(t)}))};e.prototype.getOrgStyleOverridesId=function(){return"verdocs-org-style-overrides-".concat(this.envelopeId)};e.prototype.applyOrgStyleOverrides=function(){var e,t;var i=this.getOrgStyleOverridesId();var n=document.getElementById(i);var o=(t=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||t===void 0?void 0:t.style_overrides;if(typeof o==="string"){var s=n||document.createElement("style");s.id=i;s.textContent=o;if(!n){document.head.appendChild(s)}}else if(n){n.remove()}};e.prototype.processAuthResponse=function(e){var t,i,n,o;var s=e.envelope,r=e.recipient;(t=s.documents)===null||t===void 0?void 0:t.sort((function(e,t){return e.order!==t.order?e.order-t.order:e.created_at.localeCompare(t.created_at)}));var a=r.auth_step;this.recipient=r;this.envelope=s;this.disclosures=((n=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||n===void 0?void 0:n.disclaimer)||l;this.applyOrgStyleOverrides();this.authStep=a;this.delegated=!!r.delegated_to;this.agreed=r.agreed;this.signatureId=null;this.initialId=null;this.submitted=r.status==="submitted";this.loading=false;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();(o=this.envelopeLoaded)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);d(this.endpoint,this.envelopeId,this.roleId,this.disclosures).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,o;console.log("[SIGN] Unable to accept disclosures",t);D("Unable to accept disclosures, please try again later",{style:"error"});(i=e.sdkError)===null||i===void 0?void 0:i.emit(new j(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(o=t.response)===null||o===void 0?void 0:o.data));e.submitting=false}))};e.prototype.handlePageSelect=function(e){var t=parseInt(e.target.value);if(!isNaN(t)){this.pageNumber=t;var i=this.el.querySelector(".signed-document-container");var n=this.el.querySelector("#page-".concat(t));if(i&&n){var o=n.offsetTop-20;i.scrollTo({top:o,behavior:"smooth"})}}};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(n){switch(e.detail.id){case"later":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"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":this.showDownloadDialog=true;this.startPolling();break}return[2]}))}))};e.prototype.startPolling=function(){var e=this;this.stopPolling();var t=function(){var t,i,n,o,s,r;var a=((t=e.envelope)===null||t===void 0?void 0:t.status)==="complete"||!!((i=e.envelope)===null||i===void 0?void 0:i.signed);var l=(o=(n=e.envelope)===null||n===void 0?void 0:n.documents)===null||o===void 0?void 0:o.some((function(e){return e.type==="certificate"}));var c=(r=(s=e.envelope)===null||s===void 0?void 0:s.recipients)===null||r===void 0?void 0:r.every((function(e){return e.status==="submitted"}));if(a&&l)return false;if(!c)return false;return true};if(!t()){return}this.polling=true;this.pollingInterval=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,u(this.endpoint,this.envelopeId)];case 1:e=n.sent();this.envelope=e;A.updateEnvelope(this.envelopeId,e);this.checkRecipientFields();if(!t()){this.stopPolling()}return[3,3];case 2:i=n.sent();console.error("[SIGN] Polling error",i);this.stopPolling();return[3,3];case 3:return[2]}}))}))}),5e3)};e.prototype.stopPolling=function(){if(this.pollingInterval){clearInterval(this.pollingInterval);this.pollingInterval=null}this.polling=false};e.prototype.handleZoomIn=function(){if(this.zoomLevel==="normal"){this.zoomLevel="zoom1"}else if(this.zoomLevel==="zoom1"){this.zoomLevel="zoom2"}};e.prototype.handleZoomOut=function(){if(this.zoomLevel==="zoom1"){this.zoomLevel="normal"}else if(this.zoomLevel==="zoom2"){this.zoomLevel="zoom1"}};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;L(n);i.fieldUpdateCounter++;i.markEnvelopeStarted();i.checkRecipientFields()}}))};e.prototype.getStartedKey=function(){var e;return"".concat(this.envelopeId,":").concat(((e=this.recipient)===null||e===void 0?void 0:e.role_name)||"")};e.prototype.markEnvelopeStarted=function(){var e=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var t=this.getStartedKey();if(!e.includes(t)){e.push(t);while(e.length>10){e.shift()}localStorage.setItem("startedEnvelopes",JSON.stringify(e))}};e.prototype.saveFieldChange=function(e,t,i){var n=this;var o=this.getRecipientFields().find((function(t){return t.name===e}));if(o===null||o===void 0?void 0:o.readonly){return}console.log("[SIGN] saveFieldChange",e,{value:t,prepared:i});h(this.endpoint,this.envelopeId,this.roleId,e,t,i).then((function(t){return n.updateRecipientFieldValue(e,t)})).catch((function(e){var t,i,o,s,r,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((o=(i=e.response)===null||i===void 0?void 0:i.data)===null||o===void 0?void 0:o.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.fatalErrorHeader="Signing Session Expired";n.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);D("Unable to save change, please try again later",{style:"error"})}(s=n.sdkError)===null||s===void 0?void 0:s.emit(new j(e.message,(r=e.response)===null||r===void 0?void 0:r.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,o,s,r,r,r,a,r,r,r,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:if(!t.target){return[2]}i=t.target,n=i.value,o=i.checked;s=e.type;switch(s){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,14];case"date":return[3,23];case"timestamp":return[3,24]}return[3,25];case 1:return[2,this.saveFieldChange(e.name,n,false)];case 2:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=3;case 3:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,t.detail,false)];case 5:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,7];console.log("[SIGN] Clearing initial");return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 6:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 7:if(!this.initialId)return[3,9];console.log("[SIGN] Reusing initial",this.initialId);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,this.initialId,false)];case 8:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 9:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,11];console.log("[SIGN] Reusing initial",t.detail);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 10:r=u.sent();this.initialId=t.detail;return[2,this.updateRecipientFieldValue(e.name,r)];case 11:this.showSpinner=true;return[4,fetch(t.detail)];case 12:return[4,u.sent().blob()];case 13:a=u.sent();return[2,v(this.endpoint,"initial",a).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.initialId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);D("Unable to save initials, please try again later",{style:"error"});d.showSpinner=false}))];case 14:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,16];console.log("[SIGN] Clearing signature");return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 15:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 16:if(!this.signatureId)return[3,18];console.log("[SIGN] Reusing signature",this.signatureId);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,this.signatureId,false)];case 17:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 18:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,20];console.log("[SIGN] Reusing signature",t.detail);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 19:r=u.sent();this.signatureId=t.detail;return[2,this.updateRecipientFieldValue(e.name,r)];case 20:this.showSpinner=true;return[4,fetch(t.detail)];case 21:return[4,u.sent().blob()];case 22:l=u.sent();console.log("[SIGN] Creating new signature");return[2,f(this.endpoint,"signature",l).then((function(t){return __awaiter(d,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,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.signatureId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);D("Unable to save signature, please try again later",{style:"error"});d.showSpinner=false}))];case 23:c=t.detail.formattedDate;if(c){return[2,this.saveFieldChange(e.name,c,false)]}return[3,26];case 24:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,26];case 25:console.log("[SIGN] Unhandled field update",{value:n,checked:o},e);return[3,26];case 26:return[2]}}))}))};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"&&!e.readonly}));p(e);return e};e.prototype.getSortedDisplayableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));p(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,s,r;var a=this;return __generator(this,(function(l){switch(l.label){case 0:if(!this.nextSubmits)return[3,5];l.label=1;case 1:l.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,g(this.endpoint,this.envelopeId,this.roleId)];case 2:t=l.sent();console.log("[SIGN] Submitted successfully",t);window.location.reload();return[3,4];case 3:i=l.sent();console.log("[SIGN] Error submitting",i);this.submitting=false;D("Unable to submit document, please try again.",{style:"error"});return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return!a.isFieldActuallyFilled(e)}));o=this.getNextFieldFromList(n);if(o){s=H(o);r=document.getElementById(s);r===null||r===void 0?void 0:r.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});r===null||r===void 0?void 0:r.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.handleNextOptional=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)}));var i=this.getNextFieldFromList(t);if(i){var n=H(i);var o=document.getElementById(n);o===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});o===null||o===void 0?void 0:o.focusField();this.focusedField=i.name}};e.prototype.getRecipientFields=function(){var e=this;var t;return((t=this.envelope)===null||t===void 0?void 0:t.fields.filter((function(t){return t.role_name===e.recipient.role_name})))||[]};e.prototype.getRequiredTotalCount=function(){return this.getSortedFillableFields().filter((function(e){return e.required})).length};e.prototype.getRequiredFilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return t.required&&e.isFieldActuallyFilled(t)})).length};e.prototype.getOptionalUnfilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)})).length};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!m(t,e.getRecipientFields())}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}this.updateAllFlags();var i=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var n=i.includes(this.getStartedKey());if(this.nextSubmits){this.signingProgressMode="completed"}else if(n){this.signingProgressMode="signing"}else{this.signingProgressMode="start"}};e.prototype.isFieldActuallyFilled=function(e){if(e.type==="radio"&&e.group){var t=this.getRecipientFields().some((function(t){return t.group===e.group&&t.value==="true"}));if(t){return true}}return x(e,this.getRecipientFields())&&(e.type!=="dropdown"||!!e.value)&&(e.type!=="radio"||e.value==="true")&&(e.type!=="checkbox"||e.value==="true")};e.prototype.getNextRequiredField=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return t.required&&!e.isFieldActuallyFilled(t)}));p(t);if(t.length===0){var i=this.getSortedFillableFields().filter((function(t){return!e.isFieldActuallyFilled(t)}));p(i);if(i.length>0){return this.getNextFieldFromList(i)}return null}return this.getNextFieldFromList(t)};e.prototype.getNextFieldFromList=function(e){var t=this;var i=e.findIndex((function(e){return e.name===t.focusedField}));var n=i+1;if(n>=e.length){n=0}return e[n]};e.prototype.handlePrev=function(){var e=this;var t;var i=this.getSortedFillableFields();var n=i.findIndex((function(t){return t.name===e.focusedField}));if(n>0){var o=i[n-1];var s=H(o);var r=document.getElementById(s);r===null||r===void 0?void 0:r.scrollIntoView({behavior:"smooth",block:"center"});(t=r===null||r===void 0?void 0:r.focusField)===null||t===void 0?void 0:t.call(r);this.focusedField=o.name}};e.prototype.updateAllFlags=function(){var e=this;Object.values(this.renderedPages).forEach((function(t){e.updateFlagsForPage(t)}))};e.prototype.updateFlagsForPage=function(e){var t=this;if(!e)return;var i=document.getElementById(e.containerId+"-controls");if(!i)return;var n=i.querySelectorAll(".verdocs-flag-instance");n.forEach((function(e){return e.remove()}));var o=this.getNextRequiredField();var s=this.getRecipientFields().find((function(e){return e.name===t.focusedField}));if(s&&!x(s,this.getRecipientFields())){o=s}if(o&&o.page===e.pageNumber&&o.document_id===e.documentId){var r="fill";var a="FILL";var l=false;switch(o.type){case"signature":a="SIGN";break;case"initial":a="INITIAL";break;case"checkbox":a="CHECK";break;case"radio":a="SELECT";break;case"date":case"dropdown":a="SELECT";break;case"attachment":a="ATTACH";break;case"payment":a="PAY";break;default:a="FILL";break}if(!o.required){l=true}T(e,o.y,o.height||M(o.type),{variant:r,label:a,showSkip:l,onSkip:function(){t.handleNext()},onClick:function(){var e;var t=H(o);var i=document.getElementById(t);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center"});(e=i===null||i===void 0?void 0:i.focusField)===null||e===void 0?void 0:e.call(i)}})}};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,o,s;return __generator(this,(function(r){switch(r.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;r.label=1;case 1:r.trys.push([1,3,,4]);return[4,b(this.endpoint,this.envelopeId,this.roleId,t.name,i.detail)];case 2:n=r.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=E("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:s=r.sent();console.log("Error uploading attachment",s);D("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,o,s;return __generator(this,(function(r){switch(r.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;r.label=1;case 1:r.trys.push([1,3,,4]);return[4,w(this.endpoint,this.envelopeId,this.roleId,t.name)];case 2:n=r.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=E("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:s=r.sent();console.log("Error uploading attachment",s);D("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"&&t.type!=="signature"&&t.type!=="initial"&&t.type!=="checkbox"&&t.type!=="radio"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.addEventListener("adopt",(function(){n.focusedField=t.name;n.adoptingSignature=true}));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 o=y(this.recipient);i.setAttribute("initials",k(o));i.setAttribute("name",o);if(this.signatureId){i.setAttribute("signatureid",this.signatureId)}if(this.initialId){i.setAttribute("initialid",this.initialId)}};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;this.renderedPages["".concat(i.documentId,":").concat(i.pageNumber)]=i;var n=this.getSortedDisplayableFields();n.filter((function(e){return e&&e.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e,n){var o=E("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!o){return}if(Array.isArray(o)){o.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,o)}}));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.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e){var n=E("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();this.updateFlagsForPage(i)};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);C(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,o,s,r,a;console.log("[SIGN] Error submitting authentication step",e);console.log((i=e.response)===null||i===void 0?void 0:i.data);if((s=(o=(n=e.response)===null||n===void 0?void 0:n.data)===null||o===void 0?void 0:o.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{D(((a=(r=e.response)===null||r===void 0?void 0:r.data)===null||a===void 0?void 0:a.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;var t;if(this.showLoadError){return n(o,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(o,null,n("verdocs-loader",null))}if(this.fatalErrorMessage){return n(o,{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(o,{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(o,{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(o,{class:"agreed"},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("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:function(){return e.delegating=false},onNext:function(t){S(e.endpoint,e.envelopeId,e.roleId,t.detail).then((function(t){D("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);D("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return n(o,{class:"agreed"},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("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(){_(e.endpoint,e.envelopeId,e.roleId).then((function(e){console.log("[SIGN] Decline result",e);window.location.reload()})).catch((function(e){console.warn("[SIGN] Error declining signing session",e);D("Unable to decline, please try again later",{style:"error"})}))}}))}if(!this.agreed){return n(o,{class:"agreed"},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("verdocs-disclosure-dialog",{disclosures:this.disclosures,delegator:this.recipient.delegator,onDelegate:function(){return e.delegating=true},onDecline:function(){return e.declining=true},onAccept:function(){return e.handleClickAgree()}}))}if(this.authStep==="passcode"){return n("verdocs-passcode-dialog",{endpoint:this.endpoint,onNext:function(t){return e.processAuthResponse(t.detail.response)}})}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(o,{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 r=this.kbaQuestions[i];return n(o,{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:(r===null||r===void 0?void 0:r.prompt)||"Please select one of the options below.",choices:(r===null||r===void 0?void 0:r.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(o){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]}))}))}}))))}var a=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var l=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){a.unshift({id:"delegate",label:"Delegate"})}var c=this.getRecipientFields().filter((function(t){return!m(t,e.getRecipientFields())}));c.length>0?console.log("[SIGN] Invalid fields remaining",c.map((function(e){return e.name}))):console.log("[SIGN] All field valid");var d=this.envelope.documents.reduce((function(e,t){return e+t.pages}),0);var u=N(1,d).map((function(e){return{label:e.toString(),value:e.toString()}}));var p=0;return n(o,null,this.toolbarStyle==="menu"&&n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("div",{class:"title"},this.envelope.name),n("div",{style:{flex:"1"}}),!this.finishLater&&function(){var t=e.getRequiredTotalCount()-e.getRequiredFilledCount();var i=e.getOptionalUnfilledCount();if(t>0){return n("span",{class:"remaining-count"},t," required field",t===1?"":"s"," left")}return n("span",{class:"remaining-count"},n("span",{class:"check-icon",innerHTML:q}),"All required fields complete",i>0&&n("span",{class:"separator"},"|"),i>0&&n("span",{class:"review-optional",onClick:function(){return e.handleNextOptional()}},"Review ",i," optional"))}(),!this.finishLater&&n("verdocs-button",{size:"xsmall",label:this.nextButtonLabel==="Next"?"Next Required":this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),n("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:U,onClick:function(){return e.handleZoomOut()}}),n("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:O,onClick:function(){return e.handleZoomIn()}}),n("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?a:l,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),this.toolbarStyle==="controls"&&n("div",{class:"controls-toolbar"},n("div",{class:"left-controls"},n("div",{class:"title"},this.envelope.name)),n("div",{class:"center-controls"},n("span",{class:"label"},"Page"),n("div",{class:"select-wrapper"},n("verdocs-select-input",{options:u,value:this.pageNumber.toString(),onInput:function(t){return e.handlePageSelect(t)}})),n("span",{class:"count"},"of ",d)),n("div",{class:"right-controls"},n("verdocs-button",{class:"mobile-next-button",label:this.nextButtonLabel,size:"xsmall",disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),n("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:U,onClick:function(){return e.handleZoomOut()}}),n("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:O,onClick:function(){return e.handleZoomIn()}}),n("div",{class:"icon-button download",innerHTML:R,onClick:function(){return e.handleOptionSelected({detail:{id:"download"}})}}),n("div",{class:"icon-button print",innerHTML:Z,onClick:function(){return e.handleOptionSelected({detail:{id:"print"}})}}))),n("div",{class:"document signed-document-container zoom-".concat(this.zoomLevel)},(this.envelope.documents||[]).map((function(t){var i=N(1,t.pages);return n(s,null,e.envelope.documents.length>1&&n("div",{class:"document-separator"},n("div",{innerHTML:V}),n("span",null,t.name)),i.map((function(i){var o;var s=((o=t.page_sizes)===null||o===void 0?void 0:o[i])||{width:612,height:792};p++;return n("verdocs-envelope-document-page",{id:"page-".concat(p),envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:s.width,virtualHeight:s.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(){e.isDone=true;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.adoptingSignature&&n("verdocs-adopt-signature-dialog",{name:y(this.recipient),nameLocked:!!((t=this.recipient)===null||t===void 0?void 0:t.name_locked),onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,s,r,a,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:console.log("[SIGN] Adopting signature/initials block",t.detail);this.showSpinner=true;return[4,fetch(t.detail.signature)];case 1:return[4,u.sent().blob()];case 2:e=u.sent();return[4,fetch(t.detail.initials)];case 3:return[4,u.sent().blob()];case 4:i=u.sent();return[4,f(this.endpoint,"signature",e)];case 5:n=u.sent();console.log("[SIGN] Created signature",n);this.signatureId=n.id;return[4,v(this.endpoint,"initial",i)];case 6:o=u.sent();console.log("[SIGN] Created initials",o);this.initialId=o.id;this.showSpinner=false;this.adoptingSignature=false;this.markEnvelopeStarted();if(!this.focusedField)return[3,9];s=this.getRecipientFields().find((function(e){return e.name===d.focusedField}));if(!s)return[3,8];r=s.type==="signature"?this.signatureId:s.type==="initial"?this.initialId:null;if(!r)return[3,8];return[4,h(this.endpoint,this.envelopeId,this.roleId,s.name,r,false)];case 7:a=u.sent();this.updateRecipientFieldValue(s.name,a);u.label=8;case 8:this.focusedField="";u.label=9;case 9:l=this.el.querySelectorAll("verdocs-field-signature");l.forEach((function(e){return e.setAttribute("signatureid",d.signatureId)}));c=this.el.querySelectorAll("verdocs-field-initial");c.forEach((function(e){return e.setAttribute("initialid",d.initialId)}));this.checkRecipientFields();return[2]}}))}))},onExit:function(){return e.adoptingSignature=false}}),(this.submitting||this.showSpinner)&&n("verdocs-portal",null,n("div",{class:"spinner-overlay"},n("verdocs-spinner",null))),this.showDownloadDialog&&n("verdocs-download-dialog",{signed:this.envelope.signed,polling:this.polling,documents:this.envelope.documents,onExit:function(){e.showDownloadDialog=false;e.stopPolling()},onDownload:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,s,r,a,r,l,r,c,d;return __generator(this,(function(u){switch(u.label){case 0:i=t.detail,n=i.action,o=i.documentId;console.log("[SIGN] Download action selected:",n,o);u.label=1;case 1:u.trys.push([1,11,,12]);if(!(n==="document"))return[3,4];s=o||((e=this.envelope.documents.find((function(e){return e.type==="attachment"})))===null||e===void 0?void 0:e.id);if(!s)return[3,3];return[4,z(this.endpoint,s)];case 2:r=u.sent();window.open(r,"_blank");u.label=3;case 3:return[3,10];case 4:if(!(n==="certificate"))return[3,8];a=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!a)return[3,6];return[4,z(this.endpoint,a.id)];case 5:r=u.sent();window.open(r,"_blank");return[3,7];case 6:D("Certificate not yet available.",{style:"info"});u.label=7;case 7:return[3,10];case 8:if(!(n==="zip"))return[3,10];return[4,G(this.endpoint,[this.envelopeId])];case 9:l=u.sent();r=window.URL.createObjectURL(l.data);c=document.createElement("a");c.href=r;c.download="".concat(this.envelope.name,".zip");document.body.appendChild(c);c.click();c.remove();window.URL.revokeObjectURL(r);u.label=10;case 10:return[3,12];case 11:d=u.sent();console.error("Download error",d);D("Unable to complete download request.",{style:"error"});return[3,12];case 12:return[2]}}))}))}}),!this.loading&&!this.isDone&&n("verdocs-sign-footer",{endpoint:this.endpoint,envelopeId:this.envelopeId,isDone:this.isDone,onAskQuestion:function(t){I(e.endpoint,e.envelopeId,e.roleId,{question:t.detail.question}).then((function(){return D("Your question has been sent.",{style:"success"})})).catch((function(e){console.log("Error asking question",e);D("Unable to send question, please try again later.",{style:"error"})}))},onDecline:function(){return e.declining=true},onFinishLater:function(){return e.showFinishLater=true}}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());Y.style=P}}}));
|
|
2
|
+
//# sourceMappingURL=p-641dbbfa.system.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as t,h as i,H as s,F as o,g as n}from"./p-BIRwgFLv.js";import{VerdocsEndpoint as l,DEFAULT_DISCLOSURES as a,startSigningSession as r,envelopeRecipientAgree as d,getEnvelope as c,updateEnvelopeField as h,createSignature as p,createInitials as g,sortFields as u,envelopeRecipientSubmit as f,isFieldValid as v,isFieldFilled as m,uploadEnvelopeFieldAttachment as x,deleteEnvelopeFieldAttachment as b,formatFullName as w,fullNameToInitials as y,verifySigner as k,delegateRecipient as C,envelopeRecipientDecline as S,integerSequence as N,askQuestion as I,getEnvelopeDocumentDownloadLink as z,getEnvelopesZip as L}from"@verdocs/js-sdk";import{u as G,g as H,r as T,a as F,d as D}from"./p-C9JdpYtM.js";import{D as q,C as M}from"./p-BU5rnXp2.js";import{V}from"./p-D97GxsI-.js";import{S as E}from"./p-C1sRVZWv.js";import{S as P}from"./p-C7hFgM52.js";import"./p-dzBXqXlK.js";import"./p-BqoC0yeA.js";const A='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;min-height:700px;position:relative;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f5;font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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;padding-right:140px;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>.document .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;max-width:1028px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-sign>.document .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-sign>.document .document-separator:first-child{margin-top:0}verdocs-sign .signed-document-container{width:64%;margin-left:260px;-webkit-transition:all 0.3s ease;transition:all 0.3s ease}verdocs-sign .signed-document-container.zoom-normal{width:64%;margin-left:260px}verdocs-sign .signed-document-container.zoom-zoom1{width:80%;margin-left:200px}verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:150px}verdocs-sign .signed-document-container.zoom-zoom2 .verdocs-flag-instance{opacity:0;pointer-events:none}@media (max-width: 768px){verdocs-sign verdocs-sign-footer{padding:0 10px}verdocs-sign verdocs-sign-footer .buttons{gap:8px}verdocs-sign verdocs-sign-footer .buttons button{font-size:10px}verdocs-sign .signed-document-container{width:100%;margin-left:0}verdocs-sign .signed-document-container.zoom-normal,verdocs-sign .signed-document-container.zoom-zoom1,verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:0}verdocs-sign>.document{padding-right:15px}verdocs-sign .verdocs-flag-instance{display:none !important}verdocs-sign .controls-toolbar .center-controls{display:none}verdocs-sign .controls-toolbar .right-controls .mobile-next-button{display:block;margin-right:10px}verdocs-sign .controls-toolbar .right-controls .minus,verdocs-sign .controls-toolbar .right-controls .plus{display:none}}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 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}@media print{verdocs-sign .header,.controls-toolbar,.verdocs-flag-instance,verdocs-signing-progress{display:none !important}verdocs-sign{min-height:auto;background-color:white}verdocs-sign>.document{overflow:visible;height:auto;display:block;padding:0;margin:0}verdocs-sign>.document .document-separator{display:none}verdocs-sign .signed-document-container{width:100%;margin:0}}#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;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px}#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}#verdocs-sign-header .remaining-count{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;color:#ffffff;font-size:13px;font-weight:400;white-space:nowrap}#verdocs-sign-header .remaining-count .check-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}#verdocs-sign-header .remaining-count .check-icon svg{width:16px;height:16px;fill:#55bc81}#verdocs-sign-header .remaining-count .separator{opacity:0.5;margin:0 2px}#verdocs-sign-header .remaining-count .review-optional{cursor:pointer;text-decoration:underline}#verdocs-sign-header .remaining-count .review-optional:hover{color:#54d68c}#verdocs-sign-header .icon-button{width:20px;height:32px;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}#verdocs-sign-header .icon-button svg path{fill:#ffffff}#verdocs-sign-header .icon-button:hover{background-color:rgba(255, 255, 255, 0.1)}#verdocs-sign-header .icon-button.disabled{opacity:0.35;pointer-events:none}#verdocs-sign-header .icon-button+.icon-button{margin-left:-6px}.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}.controls-toolbar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:54px;padding:0 12px 0 24px;background-color:#ffffff;border-bottom:1px solid #e0e0e0;-webkit-box-shadow:none;box-shadow:none;font-family:"Inter", sans-serif;color:#424242;z-index:1000}.controls-toolbar .left-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .left-controls .title{font-weight:500;font-size:16px;color:#242424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.controls-toolbar .center-controls{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:10px;font-size:14px;display:none}.controls-toolbar .center-controls .label{color:#000000;font-weight:300}.controls-toolbar .center-controls .select-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .center-controls .select-wrapper verdocs-select-input{margin:0}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-label{display:none}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element{background:transparent;border:1px solid #e0e0e0;height:32px;padding:2px 8px;min-width:60px;text-align:center;font-family:inherit;color:#424242}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element:focus{border-color:var(--verdocs-primary-color, #55bc81)}.controls-toolbar .center-controls .count{color:#000000;font-weight:300}.controls-toolbar .right-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.controls-toolbar .right-controls .mobile-next-button{display:none}.controls-toolbar .right-controls .icon-button{width:32px;height:32px;display:-ms-flexbox;display:flex;color:#424242;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}.controls-toolbar .right-controls .icon-button:hover{background-color:#f5f5f5}.controls-toolbar .right-controls .icon-button.disabled{opacity:0.3;pointer-events:none}.controls-toolbar .right-controls .icon-button svg{display:block;width:20px;height:20px}';const R=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z" fill="#424242" /></svg>`;const j=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z" fill="#424242" /></svg>`;const U=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z" fill="#424242"/></svg>`;const O=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z" fill="#424242"/></svg>`;const Z=class{constructor(i){e(this,i);this.sdkError=t(this,"sdkError");this.envelopeLoaded=t(this,"envelopeLoaded");this.envelopeUpdated=t(this,"envelopeUpdated");this.endpoint=new l({sessionType:"signing"});this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.toolbarStyle="menu";this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=a;this.fieldUpdateCounter=0;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.adoptingSignature=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.signatureId=null;this.initialId=null;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.pageNumber=1;this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.showDownloadDialog=false;this.loading=true;this.envelope=null;this.zoomLevel="normal";this.signingProgressMode="start";this.polling=true;this.renderedPages={};this.pollingInterval=null}async componentDidLoad(){var e,t,i,s,o,n;this.updateZoomFromWindow();window.addEventListener("resize",(()=>this.updateZoomFromWindow()));if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new E("[SIGN] Missing required envelopId",500,""));return}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new E("[SIGN] Missing required roleId",500,""));return}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new E("[SIGN] Missing required inviteCode",500,""));return}try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const e=await r(this.endpoint,this.envelopeId,this.roleId,this.inviteCode);this.processAuthResponse(e)}catch(e){console.log("[SIGN] Error with signing session",e);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new E(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(n=e.response)===null||n===void 0?void 0:n.data));this.showLoadError=true}}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null;const t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}this.setupIntersectionObserver()}disconnectedCallback(){var e,t;this.stopPolling();(e=this.observer)===null||e===void 0?void 0:e.disconnect();window.removeEventListener("resize",(()=>this.updateZoomFromWindow()));(t=document.getElementById(this.getOrgStyleOverridesId()))===null||t===void 0?void 0:t.remove()}updateZoomFromWindow(){const e=window.innerWidth;if(e<768){if(this.zoomLevel!=="zoom2")this.zoomLevel="zoom2"}else if(e<1024){if(this.zoomLevel!=="zoom1")this.zoomLevel="zoom1"}else{if(this.zoomLevel!=="normal")this.zoomLevel="normal"}}setupIntersectionObserver(){const e=this.el.querySelectorAll("verdocs-envelope-document-page");if(e.length===0)return;if(this.observer){this.observer.disconnect()}const t=this.el.querySelector(".signed-document-container");const i={root:t,rootMargin:"-40% 0px -40% 0px",threshold:0};this.observer=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){const t=e.target.id;const i=parseInt(t.replace("page-",""),10);if(!isNaN(i)&&this.pageNumber!==i){this.pageNumber=i}}}))}),i);e.forEach((e=>this.observer.observe(e)))}getOrgStyleOverridesId(){return`verdocs-org-style-overrides-${this.envelopeId}`}applyOrgStyleOverrides(){var e,t;const i=this.getOrgStyleOverridesId();const s=document.getElementById(i);const o=(t=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||t===void 0?void 0:t.style_overrides;if(typeof o==="string"){const e=s||document.createElement("style");e.id=i;e.textContent=o;if(!s){document.head.appendChild(e)}}else if(s){s.remove()}}processAuthResponse(e){var t,i,s,o;const{envelope:n,recipient:l}=e;(t=n.documents)===null||t===void 0?void 0:t.sort(((e,t)=>e.order!==t.order?e.order-t.order:e.created_at.localeCompare(t.created_at)));const{auth_step:r}=l;this.recipient=l;this.envelope=n;this.disclosures=((s=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||s===void 0?void 0:s.disclaimer)||a;this.applyOrgStyleOverrides();this.authStep=r;this.delegated=!!l.delegated_to;this.agreed=l.agreed;this.signatureId=null;this.initialId=null;this.submitted=l.status==="submitted";this.loading=false;this.isDone=this.submitted;this.showDone=this.submitted;P.updateEnvelope(this.envelopeId,n);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=l.auth_method_states||{};this.kbaQuestions=l.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(l.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();(o=this.envelopeLoaded)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope})}handleClickAgree(){this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);d(this.endpoint,this.envelopeId,this.roleId,this.disclosures).then((()=>{var e;this.nextButtonLabel="Next";this.recipient.agreed=true;this.submitting=false;this.agreed=true;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var t,i,s;console.log("[SIGN] Unable to accept disclosures",e);V("Unable to accept disclosures, please try again later",{style:"error"});(t=this.sdkError)===null||t===void 0?void 0:t.emit(new E(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(s=e.response)===null||s===void 0?void 0:s.data));this.submitting=false}))}handlePageSelect(e){const t=parseInt(e.target.value);if(!isNaN(t)){this.pageNumber=t;const e=this.el.querySelector(".signed-document-container");const i=this.el.querySelector(`#page-${t}`);if(e&&i){const t=i.offsetTop-20;e.scrollTo({top:t,behavior:"smooth"})}}}async handleOptionSelected(e){var t,i;switch(e.detail.id){case"later":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"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":this.showDownloadDialog=true;this.startPolling();break}}startPolling(){this.stopPolling();const e=()=>{var e,t,i,s,o,n;const l=((e=this.envelope)===null||e===void 0?void 0:e.status)==="complete"||!!((t=this.envelope)===null||t===void 0?void 0:t.signed);const a=(s=(i=this.envelope)===null||i===void 0?void 0:i.documents)===null||s===void 0?void 0:s.some((e=>e.type==="certificate"));const r=(n=(o=this.envelope)===null||o===void 0?void 0:o.recipients)===null||n===void 0?void 0:n.every((e=>e.status==="submitted"));if(l&&a)return false;if(!r)return false;return true};if(!e()){return}this.polling=true;this.pollingInterval=setInterval((async()=>{try{const t=await c(this.endpoint,this.envelopeId);this.envelope=t;P.updateEnvelope(this.envelopeId,t);this.checkRecipientFields();if(!e()){this.stopPolling()}}catch(e){console.error("[SIGN] Polling error",e);this.stopPolling()}}),5e3)}stopPolling(){if(this.pollingInterval){clearInterval(this.pollingInterval);this.pollingInterval=null}this.polling=false}handleZoomIn(){if(this.zoomLevel==="normal"){this.zoomLevel="zoom1"}else if(this.zoomLevel==="zoom1"){this.zoomLevel="zoom2"}}handleZoomOut(){if(this.zoomLevel==="zoom1"){this.zoomLevel="normal"}else if(this.zoomLevel==="zoom2"){this.zoomLevel="zoom1"}}updateRecipientFieldValue(e,t){console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((i=>{if(i.name===e){i.value=t.value;i.settings=t.settings;G(i);this.fieldUpdateCounter++;this.markEnvelopeStarted();this.checkRecipientFields()}}))}getStartedKey(){var e;return`${this.envelopeId}:${((e=this.recipient)===null||e===void 0?void 0:e.role_name)||""}`}markEnvelopeStarted(){const e=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");const t=this.getStartedKey();if(!e.includes(t)){e.push(t);while(e.length>10){e.shift()}localStorage.setItem("startedEnvelopes",JSON.stringify(e))}}saveFieldChange(e,t,i){const s=this.getRecipientFields().find((t=>t.name===e));if(s===null||s===void 0?void 0:s.readonly){return}console.log("[SIGN] saveFieldChange",e,{value:t,prepared:i});h(this.endpoint,this.envelopeId,this.roleId,e,t,i).then((t=>this.updateRecipientFieldValue(e,t))).catch((e=>{var t,i,s,o,n,l;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((s=(i=e.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");this.fatalErrorHeader="Signing Session Expired";this.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);V("Unable to save change, please try again later",{style:"error"})}(o=this.sdkError)===null||o===void 0?void 0:o.emit(new E(e.message,(n=e.response)===null||n===void 0?void 0:n.status,(l=e.response)===null||l===void 0?void 0:l.data))}))}async handleFieldChange(e,t){if(!t.target){return}const{value:i,checked:s}=t.target;switch(e.type){case"textarea":case"textbox":return this.saveFieldChange(e.name,i,false);case"checkbox":{return this.saveFieldChange(e.name,String(t.target.checked),false)}case"radio":{return this.saveFieldChange(e.name,String(t.target.checked),false)}case"dropdown":console.log("Saving dropdown",e.name,t.detail);return this.saveFieldChange(e.name,t.detail,false);case"initial":if(t.detail===undefined){return}if(t.detail===null){console.log("[SIGN] Clearing initial");const t=await h(this.endpoint,this.envelopeId,this.roleId,e.name,null,false);return this.updateRecipientFieldValue(e.name,t)}if(this.initialId){console.log("[SIGN] Reusing initial",this.initialId);const t=await h(this.endpoint,this.envelopeId,this.roleId,e.name,this.initialId,false);return this.updateRecipientFieldValue(e.name,t)}if(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)){console.log("[SIGN] Reusing initial",t.detail);const i=await h(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false);this.initialId=t.detail;return this.updateRecipientFieldValue(e.name,i)}this.showSpinner=true;const o=await(await fetch(t.detail)).blob();return g(this.endpoint,"initial",o).then((async t=>{const i=await h(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false);this.updateRecipientFieldValue(e.name,i);this.initialId=t.id;this.showSpinner=false})).catch((e=>{console.log("Error updating initials",e);V("Unable to save initials, please try again later",{style:"error"});this.showSpinner=false}));case"signature":if(t.detail===undefined){return}if(t.detail===null){console.log("[SIGN] Clearing signature");const t=await h(this.endpoint,this.envelopeId,this.roleId,e.name,null,false);return this.updateRecipientFieldValue(e.name,t)}if(this.signatureId){console.log("[SIGN] Reusing signature",this.signatureId);const t=await h(this.endpoint,this.envelopeId,this.roleId,e.name,this.signatureId,false);return this.updateRecipientFieldValue(e.name,t)}if(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)){console.log("[SIGN] Reusing signature",t.detail);const i=await h(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false);this.signatureId=t.detail;return this.updateRecipientFieldValue(e.name,i)}this.showSpinner=true;const n=await(await fetch(t.detail)).blob();console.log("[SIGN] Creating new signature");return p(this.endpoint,"signature",n).then((async t=>{console.log("Signature update result",t);const i=await h(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false);this.updateRecipientFieldValue(e.name,i);this.signatureId=t.id;this.showSpinner=false})).catch((e=>{console.warn("[SIGN] Error updating signature",e);V("Unable to save signature, please try again later",{style:"error"});this.showSpinner=false}));case"date":const{formattedDate:l}=t.detail;if(l){return this.saveFieldChange(e.name,l,false)}break;case"timestamp":console.log("[SIGN] Updating timestamp",{value:i,ts:t.target.getAttribute("timestamp")});break;default:console.log("[SIGN] Unhandled field update",{value:i,checked:s},e);break}}getSortedFillableFields(){const e=this.getRecipientFields().filter((e=>e.type!=="timestamp"&&!e.readonly));u(e);return e}getSortedDisplayableFields(){const e=this.getRecipientFields().filter((e=>e.type!=="timestamp"));u(e);return e}async handleNext(){var e;if(this.nextSubmits){try{(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;const t=await f(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",t);window.location.reload()}catch(e){console.log("[SIGN] Error submitting",e);this.submitting=false;V("Unable to submit document, please try again.",{style:"error"})}return}const t=this.getSortedFillableFields().filter((e=>!this.isFieldActuallyFilled(e)));const i=this.getNextFieldFromList(t);if(i){const e=H(i);const t=document.getElementById(e);t===null||t===void 0?void 0:t.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});t===null||t===void 0?void 0:t.focusField();this.focusedField=i.name}}handleNextOptional(){const e=this.getSortedFillableFields().filter((e=>!e.required&&!this.isFieldActuallyFilled(e)));const t=this.getNextFieldFromList(e);if(t){const e=H(t);const i=document.getElementById(e);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});i===null||i===void 0?void 0:i.focusField();this.focusedField=t.name}}getRecipientFields(){var e;return((e=this.envelope)===null||e===void 0?void 0:e.fields.filter((e=>e.role_name===this.recipient.role_name)))||[]}getRequiredTotalCount(){return this.getSortedFillableFields().filter((e=>e.required)).length}getRequiredFilledCount(){return this.getSortedFillableFields().filter((e=>e.required&&this.isFieldActuallyFilled(e))).length}getOptionalUnfilledCount(){return this.getSortedFillableFields().filter((e=>!e.required&&!this.isFieldActuallyFilled(e))).length}checkRecipientFields(){const e=this.getRecipientFields().filter((e=>!v(e,this.getRecipientFields())));if(e.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}this.updateAllFlags();const t=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");const i=t.includes(this.getStartedKey());if(this.nextSubmits){this.signingProgressMode="completed"}else if(i){this.signingProgressMode="signing"}else{this.signingProgressMode="start"}}isFieldActuallyFilled(e){if(e.type==="radio"&&e.group){const t=this.getRecipientFields().some((t=>t.group===e.group&&t.value==="true"));if(t){return true}}return m(e,this.getRecipientFields())&&(e.type!=="dropdown"||!!e.value)&&(e.type!=="radio"||e.value==="true")&&(e.type!=="checkbox"||e.value==="true")}getNextRequiredField(){const e=this.getSortedFillableFields().filter((e=>e.required&&!this.isFieldActuallyFilled(e)));u(e);if(e.length===0){const e=this.getSortedFillableFields().filter((e=>!this.isFieldActuallyFilled(e)));u(e);if(e.length>0){return this.getNextFieldFromList(e)}return null}return this.getNextFieldFromList(e)}getNextFieldFromList(e){const t=e.findIndex((e=>e.name===this.focusedField));let i=t+1;if(i>=e.length){i=0}return e[i]}handlePrev(){var e;const t=this.getSortedFillableFields();const i=t.findIndex((e=>e.name===this.focusedField));if(i>0){const s=t[i-1];const o=H(s);const n=document.getElementById(o);n===null||n===void 0?void 0:n.scrollIntoView({behavior:"smooth",block:"center"});(e=n===null||n===void 0?void 0:n.focusField)===null||e===void 0?void 0:e.call(n);this.focusedField=s.name}}updateAllFlags(){Object.values(this.renderedPages).forEach((e=>{this.updateFlagsForPage(e)}))}updateFlagsForPage(e){if(!e)return;const t=document.getElementById(e.containerId+"-controls");if(!t)return;const i=t.querySelectorAll(".verdocs-flag-instance");i.forEach((e=>e.remove()));let s=this.getNextRequiredField();const o=this.getRecipientFields().find((e=>e.name===this.focusedField));if(o&&!m(o,this.getRecipientFields())){s=o}if(s&&s.page===e.pageNumber&&s.document_id===e.documentId){const t="fill";let i="FILL";let o=false;switch(s.type){case"signature":i="SIGN";break;case"initial":i="INITIAL";break;case"checkbox":i="CHECK";break;case"radio":i="SELECT";break;case"date":case"dropdown":i="SELECT";break;case"attachment":i="ATTACH";break;case"payment":i="PAY";break;default:i="FILL";break}if(!s.required){o=true}T(e,s.y,s.height||D(s.type),{variant:t,label:i,showSkip:o,onSkip:()=>{this.handleNext()},onClick:()=>{var e;const t=H(s);const i=document.getElementById(t);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center"});(e=i===null||i===void 0?void 0:i.focusField)===null||e===void 0?void 0:e.call(i)}})}}attachFieldAttributes(e,t,i){if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(e=>{if(e.target.type==="radio"||e.target.type==="checkbox"){this.handleFieldChange(t,e).finally((()=>this.checkRecipientFields()))}else{this.checkRecipientFields()}}));i.addEventListener("attached",(async i=>{console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;try{const s=await x(this.endpoint,this.envelopeId,this.roleId,t.name,i.detail);this.updateRecipientFieldValue(t.name,s);this.checkRecipientFields();const o=F("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false}catch(i){console.log("Error uploading attachment",i);V("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));i.addEventListener("deleted",(async i=>{console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;try{const i=await b(this.endpoint,this.envelopeId,this.roleId,t.name);console.log("[SIGN] Deleted attachment",i);this.updateRecipientFieldValue(t.name,i);this.checkRecipientFields();const s=F("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false}catch(i){console.log("Error uploading attachment",i);V("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));i.addEventListener("focusout",(e=>{if(t.type!=="dropdown"&&t.type!=="attachment"&&t.type!=="signature"&&t.type!=="initial"&&t.type!=="checkbox"&&t.type!=="radio"){this.handleFieldChange(t,e).finally((()=>this.checkRecipientFields()))}}));i.addEventListener("fieldChange",(e=>{this.handleFieldChange(t,e).finally((()=>this.checkRecipientFields()))}));i.addEventListener("adopt",(()=>{this.focusedField=t.name;this.adoptingSignature=true}));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);const s=w(this.recipient);i.setAttribute("initials",y(s));i.setAttribute("name",s);if(this.signatureId){i.setAttribute("signatureid",this.signatureId)}if(this.initialId){i.setAttribute("initialid",this.initialId)}}handlePageRendered(e){const t=e.detail;this.renderedPages[`${t.documentId}:${t.pageNumber}`]=t;const i=this.getSortedDisplayableFields();i.filter((e=>e&&e.document_id===t.documentId&&e.page===t.pageNumber)).forEach(((e,i)=>{const s=F("envelope",e,t,{disabled:false,editable:false,draggable:false,done:this.isDone},i);if(!s){return}if(Array.isArray(s)){s.map((i=>this.attachFieldAttributes(t,e,i)))}else{this.attachFieldAttributes(t,e,s)}}));this.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending"))).forEach((()=>{this.getRecipientFields().filter((e=>e.document_id===t.documentId&&e.page===t.pageNumber)).forEach((e=>{const i=F("envelope",e,t,{disabled:true,editable:false,draggable:false,done:this.isDone});if(!i){return}if(Array.isArray(i)){i.map((i=>this.attachFieldAttributes(t,e,i)))}else{this.attachFieldAttributes(t,e,i)}}))}));this.checkRecipientFields();this.updateFlagsForPage(t)}handleAuthenticateSigner(e){console.log("[SIGN] Submitting authentication step",e);k(this.endpoint,e).then((e=>{console.log("[SIGN] Verification successful",e);this.processAuthResponse(e)})).catch((e=>{var t,i,s,o,n,l;console.log("[SIGN] Error submitting authentication step",e);console.log((t=e.response)===null||t===void 0?void 0:t.data);if((o=(s=(i=e.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.error)===null||o===void 0?void 0:o.includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}else{V(((l=(n=e.response)===null||n===void 0?void 0:n.data)===null||l===void 0?void 0:l.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))}render(){var e;if(this.showLoadError){return i(s,null,i("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:()=>{window.location.reload()}}))}if(!this.envelope){return i(s,null,i("verdocs-loader",null))}if(this.fatalErrorMessage){return i(s,{class:{agreed:this.agreed}},i("div",{class:"fatal-error"},i("div",{class:"message"},i("div",{class:"header"},this.fatalErrorHeader),i("p",null,this.fatalErrorMessage))))}if(this.delegated){return i(s,{class:{agreed:false}},i("div",{class:"fatal-error"},i("div",{class:"message"},i("div",{class:"header"},"Delegated Signing Request"),i("p",null,"You have delegated signing to another recipient. You will not be able to sign this request again."))))}if(this.isDone){return i(s,{class:{agreed:this.agreed}},i("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var t;return(t=this.sdkError)===null||t===void 0?void 0:t.emit(e.detail)}}),this.showDone&&i("verdocs-ok-dialog",{heading:"You're Done!",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.`,onNext:e=>{e.preventDefault();e.stopPropagation();this.showDone=false;this.isDone=true}}),this.submitting&&i("div",{class:"loading-indicator"},i("verdocs-loader",null)))}if(this.delegating){return i(s,{class:"agreed"},i("div",{class:"document",style:{paddingTop:"15px"}},i("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"})),i("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:()=>this.delegating=false,onNext:e=>{C(this.endpoint,this.envelopeId,this.roleId,e.detail).then((e=>{V("Delegation request submitted.",{style:"success"});console.log("[SIGN] Delegated successfully",e);this.delegated=true;this.delegating=false})).catch((e=>{console.log("[SIGN] Error delegating request",e);V("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return i(s,{class:"agreed"},i("div",{class:"document",style:{paddingTop:"15px"}},i("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"})),i("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:()=>this.declining=false,onNext:()=>{S(this.endpoint,this.envelopeId,this.roleId).then((e=>{console.log("[SIGN] Decline result",e);window.location.reload()})).catch((e=>{console.warn("[SIGN] Error declining signing session",e);V("Unable to decline, please try again later",{style:"error"})}))}}))}if(!this.agreed){return i(s,{class:"agreed"},i("div",{class:"document",style:{paddingTop:"15px"}},i("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"})),i("verdocs-disclosure-dialog",{disclosures:this.disclosures,delegator:this.recipient.delegator,onDelegate:()=>this.delegating=true,onDecline:()=>this.declining=true,onAccept:()=>this.handleClickAgree()}))}if(this.authStep==="passcode"){return i("verdocs-passcode-dialog",{endpoint:this.endpoint,onNext:e=>this.processAuthResponse(e.detail.response)})}if(this.authStep==="email"){return i("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:async e=>{this.processAuthResponse(e.detail.response)}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return i(s,{class:"kba"},i("div",{id:"verdocs-sign-header"},i("div",{class:"inner"},i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},this.envelope.name))),i("div",{class:"document",style:{paddingTop:"15px"}},i("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"})),i("div",{class:"cover"},i("div",{class:"kba"},i("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:async e=>{const t=e.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:t.first_name,last_name:t.last_name,address:t.address,city:t.city,state:t.state,zip:t.zip,dob:t.dob})}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){const e=this.kbaChoices.length;const t=this.kbaQuestions[e];return i(s,{class:"kba"},i("div",{id:"verdocs-sign-header"},i("div",{class:"inner"},i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},this.envelope.name))),i("div",{class:"document",style:{paddingTop:"15px"}},i("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"})),i("div",{class:"cover"},i("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?i("verdocs-spinner",null):i("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(t===null||t===void 0?void 0:t.prompt)||"Please select one of the options below.",choices:(t===null||t===void 0?void 0:t.answer)||["Skip Question"],step:e+1,steps:this.kbaQuestions.length,onNext:async e=>{const t=e.detail;this.kbaChoices=[...this.kbaChoices,t];if(this.kbaChoices.length>=this.kbaQuestions.length){const e=this.kbaQuestions.map(((e,t)=>({type:e.type,answer:this.kbaChoices[t]})));console.log("Submitting KBA responses",this.kbaChoices,e);this.handleAuthenticateSigner({auth_method:"kba",responses:e})}}}))))}const t=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];const n=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){t.unshift({id:"delegate",label:"Delegate"})}const l=this.getRecipientFields().filter((e=>!v(e,this.getRecipientFields())));l.length>0?console.log("[SIGN] Invalid fields remaining",l.map((e=>e.name))):console.log("[SIGN] All field valid");const a=this.envelope.documents.reduce(((e,t)=>e+t.pages),0);const r=N(1,a).map((e=>({label:e.toString(),value:e.toString()})));let d=0;return i(s,null,this.toolbarStyle==="menu"&&i("div",{id:"verdocs-sign-header"},i("div",{class:"inner"},i("div",{class:"title"},this.envelope.name),i("div",{style:{flex:"1"}}),!this.finishLater&&(()=>{const e=this.getRequiredTotalCount()-this.getRequiredFilledCount();const t=this.getOptionalUnfilledCount();if(e>0){return i("span",{class:"remaining-count"},e," required field",e===1?"":"s"," left")}return i("span",{class:"remaining-count"},i("span",{class:"check-icon",innerHTML:M}),"All required fields complete",t>0&&i("span",{class:"separator"},"|"),t>0&&i("span",{class:"review-optional",onClick:()=>this.handleNextOptional()},"Review ",t," optional"))})(),!this.finishLater&&i("verdocs-button",{size:"xsmall",label:this.nextButtonLabel==="Next"?"Next Required":this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:()=>this.handleNext()}),i("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:R,onClick:()=>this.handleZoomOut()}),i("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:j,onClick:()=>this.handleZoomIn()}),i("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?t:n,onOptionSelected:e=>this.handleOptionSelected(e)}))),this.toolbarStyle==="controls"&&i("div",{class:"controls-toolbar"},i("div",{class:"left-controls"},i("div",{class:"title"},this.envelope.name)),i("div",{class:"center-controls"},i("span",{class:"label"},"Page"),i("div",{class:"select-wrapper"},i("verdocs-select-input",{options:r,value:this.pageNumber.toString(),onInput:e=>this.handlePageSelect(e)})),i("span",{class:"count"},"of ",a)),i("div",{class:"right-controls"},i("verdocs-button",{class:"mobile-next-button",label:this.nextButtonLabel,size:"xsmall",disabled:!this.agreed||this.submitting,onClick:()=>this.handleNext()}),i("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:R,onClick:()=>this.handleZoomOut()}),i("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:j,onClick:()=>this.handleZoomIn()}),i("div",{class:"icon-button download",innerHTML:U,onClick:()=>this.handleOptionSelected({detail:{id:"download"}})}),i("div",{class:"icon-button print",innerHTML:O,onClick:()=>this.handleOptionSelected({detail:{id:"print"}})}))),i("div",{class:`document signed-document-container zoom-${this.zoomLevel}`},(this.envelope.documents||[]).map((e=>{const t=N(1,e.pages);return i(o,null,this.envelope.documents.length>1&&i("div",{class:"document-separator"},i("div",{innerHTML:q}),i("span",null,e.name)),t.map((t=>{var s;const o=((s=e.page_sizes)===null||s===void 0?void 0:s[t])||{width:612,height:792};d++;return i("verdocs-envelope-document-page",{id:`page-${d}`,envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:o.width,virtualHeight:o.height,pageNumber:t,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&i("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>{this.isDone=true;this.showFinishLater=false}}),this.showDone&&i("verdocs-ok-dialog",{heading:"You're Done!",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.`,onNext:()=>{this.showDone=false;this.isDone=true}}),this.adoptingSignature&&i("verdocs-adopt-signature-dialog",{name:w(this.recipient),nameLocked:!!((e=this.recipient)===null||e===void 0?void 0:e.name_locked),onNext:async e=>{console.log("[SIGN] Adopting signature/initials block",e.detail);this.showSpinner=true;const t=await(await fetch(e.detail.signature)).blob();const i=await(await fetch(e.detail.initials)).blob();const s=await p(this.endpoint,"signature",t);console.log("[SIGN] Created signature",s);this.signatureId=s.id;const o=await g(this.endpoint,"initial",i);console.log("[SIGN] Created initials",o);this.initialId=o.id;this.showSpinner=false;this.adoptingSignature=false;this.markEnvelopeStarted();if(this.focusedField){const e=this.getRecipientFields().find((e=>e.name===this.focusedField));if(e){const t=e.type==="signature"?this.signatureId:e.type==="initial"?this.initialId:null;if(t){const i=await h(this.endpoint,this.envelopeId,this.roleId,e.name,t,false);this.updateRecipientFieldValue(e.name,i)}}this.focusedField=""}const n=this.el.querySelectorAll("verdocs-field-signature");n.forEach((e=>e.setAttribute("signatureid",this.signatureId)));const l=this.el.querySelectorAll("verdocs-field-initial");l.forEach((e=>e.setAttribute("initialid",this.initialId)));this.checkRecipientFields()},onExit:()=>this.adoptingSignature=false}),(this.submitting||this.showSpinner)&&i("verdocs-portal",null,i("div",{class:"spinner-overlay"},i("verdocs-spinner",null))),this.showDownloadDialog&&i("verdocs-download-dialog",{signed:this.envelope.signed,polling:this.polling,documents:this.envelope.documents,onExit:()=>{this.showDownloadDialog=false;this.stopPolling()},onDownload:async e=>{var t;const{action:i,documentId:s}=e.detail;console.log("[SIGN] Download action selected:",i,s);try{if(i==="document"){const e=s||((t=this.envelope.documents.find((e=>e.type==="attachment")))===null||t===void 0?void 0:t.id);if(e){const t=await z(this.endpoint,e);window.open(t,"_blank")}}else if(i==="certificate"){const e=this.envelope.documents.find((e=>e.type==="certificate"));if(e){const t=await z(this.endpoint,e.id);window.open(t,"_blank")}else{V("Certificate not yet available.",{style:"info"})}}else if(i==="zip"){const e=await L(this.endpoint,[this.envelopeId]);const t=window.URL.createObjectURL(e.data);const i=document.createElement("a");i.href=t;i.download=`${this.envelope.name}.zip`;document.body.appendChild(i);i.click();i.remove();window.URL.revokeObjectURL(t)}}catch(e){console.error("Download error",e);V("Unable to complete download request.",{style:"error"})}}}),!this.loading&&!this.isDone&&i("verdocs-sign-footer",{endpoint:this.endpoint,envelopeId:this.envelopeId,isDone:this.isDone,onAskQuestion:e=>{I(this.endpoint,this.envelopeId,this.roleId,{question:e.detail.question}).then((()=>V("Your question has been sent.",{style:"success"}))).catch((e=>{console.log("Error asking question",e);V("Unable to send question, please try again later.",{style:"error"})}))},onDecline:()=>this.declining=true,onFinishLater:()=>this.showFinishLater=true}))}get el(){return n(this)}};Z.style=A;export{Z as verdocs_sign};
|
|
2
|
+
//# sourceMappingURL=p-6c8883ff.entry.js.map
|