@verdocs/web-sdk 5.0.29 → 5.0.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +16 -0
  3. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js.map +1 -1
  4. package/dist/cjs/verdocs-preview_6.cjs.entry.js +18 -4
  5. package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
  6. package/dist/cjs/verdocs-sign.cjs.entry.js +9 -2
  7. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  8. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  9. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +18 -4
  10. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
  11. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +9 -2
  12. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  13. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +17 -0
  14. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js.map +1 -1
  15. package/dist/components/{p-27a8eef0.js → p-87d3651e.js} +19 -5
  16. package/dist/components/p-87d3651e.js.map +1 -0
  17. package/dist/components/verdocs-build.js +1 -1
  18. package/dist/components/verdocs-envelope-sidebar.js +17 -0
  19. package/dist/components/verdocs-envelope-sidebar.js.map +1 -1
  20. package/dist/components/verdocs-send.js +1 -1
  21. package/dist/components/verdocs-sign.js +9 -2
  22. package/dist/components/verdocs-sign.js.map +1 -1
  23. package/dist/esm/loader.js +1 -1
  24. package/dist/esm/verdocs-envelope-sidebar.entry.js +16 -0
  25. package/dist/esm/verdocs-envelope-sidebar.entry.js.map +1 -1
  26. package/dist/esm/verdocs-preview_6.entry.js +18 -4
  27. package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
  28. package/dist/esm/verdocs-sign.entry.js +9 -2
  29. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  30. package/dist/esm/verdocs-web-sdk.js +1 -1
  31. package/dist/esm-es5/loader.js +1 -1
  32. package/dist/esm-es5/loader.js.map +1 -1
  33. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  34. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js.map +1 -1
  35. package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
  36. package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
  37. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  38. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  39. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  40. package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
  41. package/dist/types/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +1 -0
  42. package/dist/verdocs-web-sdk/{p-a285560f.entry.js → p-2d0bd50f.entry.js} +2 -2
  43. package/dist/verdocs-web-sdk/{p-a285560f.entry.js.map → p-2d0bd50f.entry.js.map} +1 -1
  44. package/dist/verdocs-web-sdk/{p-4ae786e9.system.entry.js → p-33064db4.system.entry.js} +3 -3
  45. package/dist/verdocs-web-sdk/{p-6369fc93.entry.js.map → p-33064db4.system.entry.js.map} +1 -1
  46. package/dist/verdocs-web-sdk/{p-1f2c019d.system.entry.js → p-3d7d95b0.system.entry.js} +2 -2
  47. package/dist/verdocs-web-sdk/p-3d7d95b0.system.entry.js.map +1 -0
  48. package/dist/verdocs-web-sdk/{p-b7799ec0.entry.js → p-6ff5cab7.entry.js} +2 -2
  49. package/dist/verdocs-web-sdk/p-6ff5cab7.entry.js.map +1 -0
  50. package/dist/verdocs-web-sdk/{p-70247599.system.entry.js → p-9d538cb1.system.entry.js} +2 -2
  51. package/dist/verdocs-web-sdk/{p-70247599.system.entry.js.map → p-9d538cb1.system.entry.js.map} +1 -1
  52. package/dist/verdocs-web-sdk/{p-6369fc93.entry.js → p-9e04b9f0.entry.js} +2 -2
  53. package/dist/verdocs-web-sdk/p-9e04b9f0.entry.js.map +1 -0
  54. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
  55. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js.map +1 -1
  56. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  57. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
  58. package/package.json +1 -1
  59. package/dist/components/p-27a8eef0.js.map +0 -1
  60. package/dist/verdocs-web-sdk/p-1f2c019d.system.entry.js.map +0 -1
  61. package/dist/verdocs-web-sdk/p-4ae786e9.system.entry.js.map +0 -1
  62. package/dist/verdocs-web-sdk/p-b7799ec0.entry.js.map +0 -1
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,a){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function d(e){try{l(a.next(e))}catch(e){n(e)}}function s(e){try{l(a["throw"](e))}catch(e){n(e)}}function l(e){e.done?o(e.value):i(e.value).then(d,s)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,i,n,d;return d={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return l([e,t])}}function l(s){if(a)throw new TypeError("Generator is already executing.");while(d&&(d=0,s[0]&&(o=0)),o)try{if(a=1,i&&(n=s[0]&2?i["return"]:s[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;if(i=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(s[0]===6&&o.label<n[1]){o.label=n[1];n=s;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(s);break}if(n[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];i=0}finally{a=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{p as promiseResolve,b as bootstrapLazy}from"./index-272d51a4.js";export{s as setNonce}from"./index-272d51a4.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,globalScripts()];case 1:t.sent();return[2,bootstrapLazy(JSON.parse('[["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["verdocs-envelopes-list",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["verdocs-sign",[[0,"verdocs-sign",{"endpoint":[1040],"envelopeId":[513,"envelope-id"],"roleId":[513,"role-id"],"inviteCode":[513,"invite-code"],"headerTargetId":[1,"header-target-id"],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"fatalErrorHeader":[32],"fatalErrorMessage":[32],"focusedField":[32],"submitting":[32],"submitted":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32],"kbaStep":[32],"kbaQuestions":[32],"showSpinner":[32],"kbaChoices":[32],"loading":[32],"envelope":[32]}]]],["verdocs-templates-list",[[0,"verdocs-templates-list",{"endpoint":[16],"visibility":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]},null,{"sharing":["handleSharingUpdated"],"starred":["handleStarredUpdated"],"sort":["handleSortUpdated"],"name":["handleNameUpdated"],"selectedPage":["handlePageUpdated"]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"signed":[4],"roleindex":[2],"showingProperties":[32],"focused":[32],"preparedMessage":[32],"signatureUrl":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"remindersEnabled":[32],"updatingReminders":[32],"initialReminder":[32],"followupReminders":[32],"loading":[32],"envelope":[32]}]]],["verdocs-template-create",[[0,"verdocs-template-create",{"endpoint":[16],"maxSize":[1026,"max-size"],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32],"errorMessage":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"displayMode":[1025,"display-mode"],"org_name":[32],"first_name":[32],"last_name":[32],"email":[32],"verificationCode":[32],"newPassword":[32],"password":[32],"confirmpass":[32],"submitting":[32],"resendDisabled":[32],"session":[32],"profile":[32]}]]],["verdocs-envelope-recipient-summary",[[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32],"loading":[32],"envelope":[32]}]]],["verdocs-dialog",[[4,"verdocs-dialog"]]],["verdocs-quick-functions",[[0,"verdocs-quick-functions",{"endpoint":[16]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-search-box",[[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-table",[[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["verdocs-template-star",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["verdocs-envelope-document-page",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["verdocs-button_2",[[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-kba-dialog_2",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"showCancelDone":[32],"showLoadError":[32],"loading":[32],"envelope":[32]}],[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"recipient":[16],"choices":[16],"response":[32],"updatedRecipient":[32]}]]],["verdocs-envelope-recipient-link_2",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"gettingLink":[32],"link":[32],"loading":[32],"envelope":[32],"recipient":[32]}],[0,"verdocs-switch",{"checked":[1028],"theme":[1],"disabled":[4]}]]],["verdocs-menu-panel_2",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"dirty":[32],"saving":[32],"name":[32],"type":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"delegator":[32],"loading":[32],"template":[32]}],[4,"verdocs-menu-panel",{"side":[1],"overlay":[4],"width":[2]},[[4,"click","handleClick"]]]]],["verdocs-button-panel_2",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["verdocs-pagination_2",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["verdocs-template-document-page_2",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32],"loading":[32],"template":[32]}]]],["verdocs-contact-picker_2",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"zip":[32],"address":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"showKba":[32],"kba_method":[32],"kba_pin":[32],"nameFieldId":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-file-chooser_2",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["verdocs-spinner",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["verdocs-organization-card_2",[[0,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[4,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["verdocs-dropdown",[[0,"verdocs-dropdown",{"options":[16],"containerId":[32],"showPicker":[32]}]]],["verdocs-checkbox_6",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32],"loading":[32],"template":[32]}],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-loader"],[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}]]],["verdocs-field-attachment_13",[[0,"verdocs-field-attachment",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"dialogOpen":[32],"selectedFile":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"initials":[513],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"name":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"source":[513],"sourceid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"required":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"multiline":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"maxSize":[1026,"max-size"],"existingFile":[1032,"existing-file"],"draggingOver":[32],"confirmDelete":[32],"selectedFiles":[32],"errorMessage":[32]}]]],["verdocs-preview_6",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1537,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32],"template":[32]},[[4,"keydown","handleKeyDown"]],{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"loading":[32],"template":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"sender":[32],"dragging":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]]]'),e)]}}))}))}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,o,a){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function d(e){try{l(a.next(e))}catch(e){n(e)}}function s(e){try{l(a["throw"](e))}catch(e){n(e)}}function l(e){e.done?o(e.value):i(e.value).then(d,s)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,i,n,d;return d={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return l([e,t])}}function l(s){if(a)throw new TypeError("Generator is already executing.");while(d&&(d=0,s[0]&&(o=0)),o)try{if(a=1,i&&(n=s[0]&2?i["return"]:s[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;if(i=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(s[0]===6&&o.label<n[1]){o.label=n[1];n=s;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(s);break}if(n[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];i=0}finally{a=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{p as promiseResolve,b as bootstrapLazy}from"./index-272d51a4.js";export{s as setNonce}from"./index-272d51a4.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,globalScripts()];case 1:t.sent();return[2,bootstrapLazy(JSON.parse('[["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["verdocs-envelopes-list",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["verdocs-sign",[[0,"verdocs-sign",{"endpoint":[1040],"envelopeId":[513,"envelope-id"],"roleId":[513,"role-id"],"inviteCode":[513,"invite-code"],"headerTargetId":[1,"header-target-id"],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"fatalErrorHeader":[32],"fatalErrorMessage":[32],"focusedField":[32],"submitting":[32],"submitted":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32],"kbaStep":[32],"kbaQuestions":[32],"showSpinner":[32],"kbaChoices":[32],"loading":[32],"envelope":[32]}]]],["verdocs-templates-list",[[0,"verdocs-templates-list",{"endpoint":[16],"visibility":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]},null,{"sharing":["handleSharingUpdated"],"starred":["handleStarredUpdated"],"sort":["handleSortUpdated"],"name":["handleNameUpdated"],"selectedPage":["handlePageUpdated"]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"signed":[4],"roleindex":[2],"showingProperties":[32],"focused":[32],"preparedMessage":[32],"signatureUrl":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"showReinviteDialog":[32],"remindersEnabled":[32],"updatingReminders":[32],"initialReminder":[32],"followupReminders":[32],"loading":[32],"envelope":[32]}]]],["verdocs-template-create",[[0,"verdocs-template-create",{"endpoint":[16],"maxSize":[1026,"max-size"],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32],"errorMessage":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"displayMode":[1025,"display-mode"],"org_name":[32],"first_name":[32],"last_name":[32],"email":[32],"verificationCode":[32],"newPassword":[32],"password":[32],"confirmpass":[32],"submitting":[32],"resendDisabled":[32],"session":[32],"profile":[32]}]]],["verdocs-envelope-recipient-summary",[[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32],"loading":[32],"envelope":[32]}]]],["verdocs-dialog",[[4,"verdocs-dialog"]]],["verdocs-quick-functions",[[0,"verdocs-quick-functions",{"endpoint":[16]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-search-box",[[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-table",[[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["verdocs-template-star",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["verdocs-envelope-document-page",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["verdocs-button_2",[[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-kba-dialog_2",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"showCancelDone":[32],"showLoadError":[32],"loading":[32],"envelope":[32]}],[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"recipient":[16],"choices":[16],"response":[32],"updatedRecipient":[32]}]]],["verdocs-envelope-recipient-link_2",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"gettingLink":[32],"link":[32],"loading":[32],"envelope":[32],"recipient":[32]}],[0,"verdocs-switch",{"checked":[1028],"theme":[1],"disabled":[4]}]]],["verdocs-menu-panel_2",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"dirty":[32],"saving":[32],"name":[32],"type":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"delegator":[32],"loading":[32],"template":[32]}],[4,"verdocs-menu-panel",{"side":[1],"overlay":[4],"width":[2]},[[4,"click","handleClick"]]]]],["verdocs-button-panel_2",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["verdocs-pagination_2",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["verdocs-template-document-page_2",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32],"loading":[32],"template":[32]}]]],["verdocs-contact-picker_2",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"zip":[32],"address":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"showKba":[32],"kba_method":[32],"kba_pin":[32],"nameFieldId":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-file-chooser_2",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["verdocs-spinner",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["verdocs-organization-card_2",[[0,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[4,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["verdocs-dropdown",[[0,"verdocs-dropdown",{"options":[16],"containerId":[32],"showPicker":[32]}]]],["verdocs-checkbox_6",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32],"loading":[32],"template":[32]}],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-loader"],[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}]]],["verdocs-field-attachment_13",[[0,"verdocs-field-attachment",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"dialogOpen":[32],"selectedFile":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"initials":[513],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"name":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"source":[513],"sourceid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"required":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"multiline":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"maxSize":[1026,"max-size"],"existingFile":[1032,"existing-file"],"draggingOver":[32],"confirmDelete":[32],"selectedFiles":[32],"errorMessage":[32]}]]],["verdocs-preview_6",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1537,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32],"template":[32]},[[4,"keydown","handleKeyDown"]],{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"loading":[32],"template":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"sender":[32],"dragging":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]]]'),e)]}}))}))}));
2
2
  //# sourceMappingURL=verdocs-web-sdk.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","__awaiter","globalScripts","_a","sent","bootstrapLazy","JSON","parse"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"+nDAOA,IAAIA,aAAe,WAUjB,IAAMC,cAAyBC,IAC/B,IAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,eAAeJ,EACxB,ECnBAH,eAAeQ,MAAK,SAAOC,GAAO,OAAAC,eAAA,4B,4DAChC,SAAMC,iB,OAANC,EAAAC,OACA,SAAOC,cAAcC,KAAAC,MAAA,iqdAAuCP,I","ignoreList":[]}
1
+ {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","__awaiter","globalScripts","_a","sent","bootstrapLazy","JSON","parse"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"+nDAOA,IAAIA,aAAe,WAUjB,IAAMC,cAAyBC,IAC/B,IAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,eAAeJ,EACxB,ECnBAH,eAAeQ,MAAK,SAAOC,GAAO,OAAAC,eAAA,4B,4DAChC,SAAMC,iB,OAANC,EAAAC,OACA,SAAOC,cAAcC,KAAAC,MAAA,2rdAAuCP,I","ignoreList":[]}
@@ -51,6 +51,7 @@ export declare class VerdocsEnvelopeSidebar {
51
51
  panelOpen: boolean;
52
52
  showRecipientDialog: string;
53
53
  showCancelDialog: boolean;
54
+ showReinviteDialog: string;
54
55
  remindersEnabled: boolean;
55
56
  updatingReminders: boolean;
56
57
  initialReminder: number | null;
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as t,H as s,F as o}from"./p-b9654a5e.js";import{VerdocsEndpoint as n,startSigningSession as a,getKbaStep as l,envelopeRecipientAgree as r,envelopeRecipientDecline as d,updateEnvelopeField as c,createSignature as h,updateEnvelopeFieldSignature as p,createInitials as g,updateEnvelopeFieldInitials as u,isValidPhone as v,isValidEmail as f,sortFields as m,envelopeRecipientSubmit as x,getEnvelope as b,uploadEnvelopeFieldAttachment as y,deleteEnvelopeFieldAttachment as w,formatFullName as k,fullNameToInitials as S,submitKbaPin as N,submitKbaIdentity as I,submitKbaChallengeResponse as G,integerSequence as P}from"@verdocs/js-sdk";import{a as z,u as F,r as T,g as E}from"./p-0c45b79c.js";import{V as D}from"./p-04c07b7b.js";import{S as A}from"./p-fd97809c.js";import{S as L}from"./p-d4be87ef.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";const U='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);margin-top:15px}verdocs-sign .fatal-error .message{max-width:50%;width:50%;font-size:16px;background:white;border-radius:5px;-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{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';const V=U;const j=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];const R=[{id:"print",label:"Print"},{id:"download",label:"Download"}];const C=class{constructor(t){e(this,t);this.sdkError=i(this,"sdkError",7);this.envelopeLoaded=i(this,"envelopeLoaded",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.recipientIndex=-1;this.endpoint=null;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.roleNames=[];this.sortedRecipients=[];this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.kbaStep="";this.kbaQuestions=[];this.showSpinner=false;this.kbaChoices=[];this.loading=true;this.envelope=null}componentWillLoad(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new n({sessionType:"signing"})}}async componentDidLoad(){var e,i,t,s,o,n,r;if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new A("[SIGN] Missing required envelopId",500,""));return}if(!this.roleId){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new A("[SIGN] Missing required roleId",500,""));return}if(!this.inviteCode){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new A("[SIGN] Missing required inviteCode",500,""));return}try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{envelope:e,recipient:i}=await a(this.endpoint,this.envelopeId,this.roleId,this.inviteCode);console.log(`[SIGN] Loaded signing session`,e,i);this.recipient=i;this.envelope=e;L.updateEnvelope(this.envelopeId,e);this.sortedRecipients=[...this.envelope.recipients];this.sortedRecipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence));this.roleNames=this.sortedRecipients.map((e=>e.role_name));if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.recipientIndex=this.roleNames.findIndex((e=>e==this.roleId));if(this.recipientIndex>-1){this.recipient=this.sortedRecipients[this.recipientIndex];this.agreed=this.recipient.agreed}else{console.warn("[SIGN] Could not find our recipient record",this.roleId,this.sortedRecipients)}this.submitted=this.recipient.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;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(this.recipient.status==="declined"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(s=this.envelopeLoaded)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope});if(!this.isDone){l(this.endpoint,this.envelopeId,this.roleId).then((e=>{var i;console.log("[SIGN] KBA Step",e);this.kbaStep=e.kba_step;if(this.kbaStep==="failed"){this.fatalErrorHeader="Identity Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}else{this.kbaQuestions=((i=e.questions)===null||i===void 0?void 0:i.question)||[];this.kbaChoices=[]}})).catch((e=>console.log("Error getting KBA step",e)))}}catch(e){console.log("[SIGN] Error with signing session",e);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new A(e.message,(n=e.response)===null||n===void 0?void 0:n.status,(r=e.response)===null||r===void 0?void 0:r.data));this.showLoadError=true}}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null;const i=document.getElementById("verdocs-sign-header");if(e&&i){console.log("[SIGN] Moving header");i.remove();e.append(i)}}handleClickAgree(){this.submitting=true;r(this.endpoint,this.envelopeId,this.roleId,true).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 i,t,s;console.log("[SIGN] Update failure",e);this.submitting=false;(i=this.sdkError)===null||i===void 0?void 0:i.emit(new A(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(s=e.response)===null||s===void 0?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,o,n;switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"claim":D("This feature will be available in an upcoming release.");(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});break;case"decline":{this.submitting=true;const e=await d(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Decline result",e);(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}break;case"print":window.print();(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":{const e=this.envelope.documents.find((e=>e.type==="attachment"));if(e){z(this.endpoint,this.envelope,e.id).catch((e=>{console.log("[SIGN] Error downloading PDF",e)}));(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}break}}updateRecipientFieldValue(e,i){console.log("[SIGN] updateRecipientFieldValue",e,i);this.getRecipientFields().forEach((t=>{if(t.name===e){t.value=i.value;t.settings=i.settings;F(t);this.checkRecipientFields()}}))}saveFieldChange(e,i){console.log("[SIGN] saveFieldChange",e,i);c(this.endpoint,this.envelopeId,e,i).then((i=>this.updateRecipientFieldValue(e,i))).catch((e=>{var i,t,s,o,n,a;if(((i=e.response)===null||i===void 0?void 0:i.status)===401&&((s=(t=e.response)===null||t===void 0?void 0:t.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)}(o=this.sdkError)===null||o===void 0?void 0:o.emit(new A(e.message,(n=e.response)===null||n===void 0?void 0:n.status,(a=e.response)===null||a===void 0?void 0:a.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textarea":case"textbox":return this.saveFieldChange(e.name,{prepared:false,value:t});case"checkbox":{return this.saveFieldChange(e.name,{prepared:false,value:String(i.target.checked)})}case"radio":{return this.saveFieldChange(e.name,{prepared:false,value:String(i.target.checked)})}case"dropdown":console.log("Saving dropdown",e.name,i.detail);return this.saveFieldChange(e.name,{prepared:false,value:i.detail});case"initial":if(!i.detail){return}this.showSpinner=true;const o=await(await fetch(i.detail)).blob();return g(this.endpoint,"initial",o).then((async i=>{const t=await u(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t);this.showSpinner=false})).catch((e=>{console.log("Error updating initials",e);this.showSpinner=false}));case"signature":if(!i.detail){return}this.showSpinner=true;const n=await(await fetch(i.detail)).blob();return h(this.endpoint,"signature",n).then((async i=>{console.log("Signature update result",i);const t=await p(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t);this.showSpinner=false})).catch((e=>{console.warn("[SIGN] Error updating signature",e);this.showSpinner=false}));case"date":const{formattedDate:a}=i.detail;if(a){return this.saveFieldChange(e.name,{prepared:false,value:a})}break;case"timestamp":console.log("[SIGN] Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("[SIGN] Unhandled field update",{value:t,checked:s},e);break}}isFieldFilled(e){const{value:i=""}=e;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return f(i);case"phone":return v(i);default:return(i||"").trim()!==""}case"signature":return i==="signed";case"initial":return i==="initialed";case"timestamp":return true;case"date":return!!i;case"attachment":return i==="attached";case"dropdown":return i!=="";case"checkbox":return i==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((i=>i.group===e.group)).some((e=>e.value==="true"))}return e.value==="true";default:return false}}isFieldValid(e){return!e.required||this.isFieldFilled(e)}getSortedFillableFields(){const e=this.getRecipientFields().filter((e=>e.type!=="timestamp"));m(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 i=await x(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",i);this.recipient.status="submitted";this.showDone=true;console.log("[SIGN] Reloading envelope");b(this.endpoint,this.envelopeId).then((e=>{this.envelope=e;this.submitting=false})).catch((e=>{console.log("[SIGN] Error reloading envelope",e);this.submitting=false}))}catch(e){console.log("[SIGN] Error submitting",e)}return}const i=this.getSortedFillableFields().filter((e=>e.required&&!this.isFieldFilled(e)));m(i);const t=i.findIndex((e=>e.name===this.focusedField));let s=t+1;if(s>=i.length){s=0}let o=i[s];let n=0;if(n<i.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){n++;s++;if(s>=i.length){s=0}o=i[s]}if(n>=i.length){o=null}if(o){const e=E(o);const i=document.getElementById(e);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth"});i===null||i===void 0?void 0:i.focusField();this.focusedField=o.name}}getRecipientFields(){return this.envelope.fields.filter((e=>e.role_name===this.recipient.role_name))}checkRecipientFields(){const e=this.getRecipientFields().filter((e=>!this.isFieldValid(e)));if(e.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",e.map((e=>e.name)));this.nextButtonLabel="Next";this.nextSubmits=false}}attachFieldAttributes(e,i,t){if(t.getAttribute("attached")==="1"){return}t.setAttribute("attached","1");t.addEventListener("input",(e=>{if(e.target.type==="radio"||e.target.type==="checkbox"){this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}else{this.checkRecipientFields()}}));t.addEventListener("attached",(async t=>{console.log("[SIGN] onAttached",t.detail,t.target.value);this.showSpinner=true;try{const s=await y(this.endpoint,this.envelopeId,i.name,t.detail);this.updateRecipientFieldValue(i.name,s);this.checkRecipientFields();const o=T("envelope",i,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,i,o);this.showSpinner=false}catch(t){console.log("Error uploading attachment",t);D("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));t.addEventListener("deleted",(async t=>{console.log("[SIGN] onDeleted",t.detail,t.target.value);this.showSpinner=true;try{const t=await w(this.endpoint,this.envelopeId,i.name);console.log("[SIGN] Deleted attachment",t);this.updateRecipientFieldValue(i.name,t);this.checkRecipientFields();const s=T("envelope",i,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,i,s);this.showSpinner=false}catch(t){console.log("Error uploading attachment",t);D("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));t.addEventListener("focusout",(e=>{if(i.type!=="dropdown"&&i.type!=="attachment"){this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}}));t.addEventListener("fieldChange",(e=>{this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}));t.setAttribute("templateid",this.envelope.template_id);t.setAttribute("fieldname",i.name);t.setAttribute("page",e.pageNumber);t.setAttribute("xScale",e.xScale);t.setAttribute("yScale",e.yScale);const s=k(this.recipient);t.setAttribute("initials",S(s));t.setAttribute("name",s)}handlePageRendered(e){const i=e.detail;const t=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",i.pageNumber,t);t.forEach(((e,t)=>{if(e.page!==i.pageNumber){return}const s=T("envelope",e,i,{disabled:false,editable:false,draggable:false,done:this.isDone},t);if(!s){return}if(Array.isArray(s)){s.map((t=>this.attachFieldAttributes(i,e,t)))}else{this.attachFieldAttributes(i,e,s)}}));this.sortedRecipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending"))).forEach((()=>{this.getRecipientFields().filter((e=>e.page===i.pageNumber)).forEach((e=>{const t=T("envelope",e,i,{disabled:true,editable:false,draggable:false,done:this.isDone});if(!t){return}if(Array.isArray(t)){t.map((t=>this.attachFieldAttributes(i,e,t)))}else{this.attachFieldAttributes(i,e,t)}}))}));this.checkRecipientFields()}render(){if(this.showLoadError){return t(s,null,t("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 t(s,null,t("verdocs-loader",null))}if(this.fatalErrorMessage){return t(s,{class:{agreed:this.agreed}},t("div",{class:"fatal-error"},t("div",{class:"message"},t("div",{class:"header"},this.fatalErrorHeader),t("p",null,this.fatalErrorMessage))))}if(this.isDone){return t(s,{class:{agreed:this.agreed}},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return(i=this.sdkError)===null||i===void 0?void 0:i.emit(e.detail)}}),this.showDone&&t("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&&t("div",{class:"loading-indicator"},t("verdocs-loader",null)))}if(!this.agreed){return t(s,{class:"agreed"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:()=>this.handleClickAgree()}),t("ul",null,t("li",null,"Agree to use electronic records and signatures, and confirm you have read the"," ",t("a",{href:"https://verdocs.com/en/electronic-record-signature-disclosure/",target:"_blank"},"Electronic Record and Signatures Disclosure"),"."),t("li",null,"Agree to Verdocs'"," ",t("a",{href:"https://verdocs.com/en/eula",target:"_blank"},"End User License Agreement")," ","and confirm you have read Verdocs'"," ",t("a",{href:"https://verdocs.com/en/privacy-policy/",target:"_blank"},"Privacy Policy"),".")))))}if(this.kbaStep==="pin"){return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},t("verdocs-kba-dialog",{mode:"text",step:1,steps:1,helptitle:"Document is protected by a PIN code",helptext:"Please enter your PIN code to proceed. If you do not have one, please contact the sender.",label:"PIN Code",onNext:async e=>{N(this.endpoint,this.envelopeId,this.roleId,e.detail).then((e=>{console.log("[SIGN] PIN code submission result",e);if(e.kba_step==="complete"){this.kbaStep=""}})).catch((e=>{var i,t;console.log("[SIGN] Error submitting PIN",e);D(((t=(i=e.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)||"Unable to verify PIN code. Please try again.",{style:"error"})}))}}))))}if(this.kbaStep==="identity"){return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},t("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 i=e.detail;I(this.endpoint,this.envelopeId,this.roleId,{firstName:i.first_name,lastName:i.last_name,address:i.address,city:i.city,state:i.state,zip:i.zip,ssnLast4:i.ssn_last_4}).then((e=>{console.log("[SIGN] Identity submission result",e);this.kbaStep=e.kba_step})).catch((e=>{var i,t;console.log("[SIGN] Error submitting identity",e);D(((t=(i=e.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)||"Unable to verify identity.",{style:"error"})}))}}))))}if(this.kbaStep==="challenge"){const e=this.kbaChoices.length;const i=this.kbaQuestions[e];return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?t("verdocs-spinner",null):t("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(i===null||i===void 0?void 0:i.prompt)||"Please select one of the options below.",choices:(i===null||i===void 0?void 0:i.answer)||["Skip Question"],step:e+1,steps:this.kbaQuestions.length,onNext:async e=>{var i,t,s;const o=e.detail;this.kbaChoices=[...this.kbaChoices,o];if(this.kbaChoices.length>=this.kbaQuestions.length){const o=this.kbaQuestions.map(((e,i)=>({type:e.type,answer:this.kbaChoices[i]})));console.log("Submitting KBA responses",this.kbaChoices,o);try{const e=await G(this.endpoint,this.envelopeId,this.roleId,o);console.log("KBA challenge response",e);this.kbaStep=e.kba_step;if(this.kbaStep==="failed"){this.fatalErrorHeader="Identity Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}else{this.kbaQuestions=((i=e.questions)===null||i===void 0?void 0:i.question)||[];this.kbaChoices=[]}}catch(e){console.log("Error submitting KBA challenge",e);this.kbaStep="";this.fatalErrorHeader="Unable to Verify Identity";this.fatalErrorMessage=((s=(t=e.response)===null||t===void 0?void 0:t.data)===null||s===void 0?void 0:s.error)||"Please try again later.";this.isDone=true}}}}))))}return t(s,null,t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name),t("div",{style:{flex:"1"}}),!this.finishLater&&t("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?j:R,onOptionSelected:e=>this.handleOptionSelected(e)}))),t("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((e=>{const i=P(1,e.pages);return t(o,null,i.map((i=>{var s;const o=((s=e.page_sizes)===null||s===void 0?void 0:s[i])||{width:612,height:792};return t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:o.width,virtualHeight:o.height,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&t("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.showFinishLater=false}),this.showDone&&t("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.submitting||this.showSpinner&&t("verdocs-portal",null,t("div",{class:"spinner-overlay"},t("verdocs-spinner",null))))}};C.style=V;export{C as verdocs_sign};
2
- //# sourceMappingURL=p-a285560f.entry.js.map
1
+ import{r as e,c as i,h as t,H as s,F as o}from"./p-b9654a5e.js";import{VerdocsEndpoint as n,startSigningSession as a,getKbaStep as l,envelopeRecipientAgree as r,envelopeRecipientDecline as d,updateEnvelopeField as c,createSignature as h,updateEnvelopeFieldSignature as p,createInitials as g,updateEnvelopeFieldInitials as u,isValidPhone as v,isValidEmail as f,sortFields as m,envelopeRecipientSubmit as x,getEnvelope as b,uploadEnvelopeFieldAttachment as y,deleteEnvelopeFieldAttachment as w,formatFullName as k,fullNameToInitials as S,submitKbaPin as N,submitKbaIdentity as I,submitKbaChallengeResponse as G,integerSequence as P}from"@verdocs/js-sdk";import{a as z,u as F,r as T,g as E}from"./p-0c45b79c.js";import{V as D}from"./p-04c07b7b.js";import{S as A}from"./p-fd97809c.js";import{S as V}from"./p-d4be87ef.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";const L='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);margin-top:15px}verdocs-sign .fatal-error .message{max-width:50%;width:50%;font-size:16px;background:white;border-radius:5px;-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{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';const U=L;const j=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];const R=[{id:"print",label:"Print"},{id:"download",label:"Download"}];const C=class{constructor(t){e(this,t);this.sdkError=i(this,"sdkError",7);this.envelopeLoaded=i(this,"envelopeLoaded",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.recipientIndex=-1;this.endpoint=null;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.roleNames=[];this.sortedRecipients=[];this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.kbaStep="";this.kbaQuestions=[];this.showSpinner=false;this.kbaChoices=[];this.loading=true;this.envelope=null}componentWillLoad(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new n({sessionType:"signing"})}}async componentDidLoad(){var e,i,t,s,o,n,r;if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new A("[SIGN] Missing required envelopId",500,""));return}if(!this.roleId){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new A("[SIGN] Missing required roleId",500,""));return}if(!this.inviteCode){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new A("[SIGN] Missing required inviteCode",500,""));return}try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{envelope:e,recipient:i}=await a(this.endpoint,this.envelopeId,this.roleId,this.inviteCode);console.log(`[SIGN] Loaded signing session`,e,i);this.recipient=i;this.envelope=e;V.updateEnvelope(this.envelopeId,e);this.sortedRecipients=[...this.envelope.recipients];this.sortedRecipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence));this.roleNames=this.sortedRecipients.map((e=>e.role_name));if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.recipientIndex=this.roleNames.findIndex((e=>e==this.roleId));if(this.recipientIndex>-1){this.recipient=this.sortedRecipients[this.recipientIndex];this.agreed=this.recipient.agreed}else{console.warn("[SIGN] Could not find our recipient record",this.roleId,this.sortedRecipients)}this.submitted=this.recipient.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;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(this.recipient.status==="declined"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(s=this.envelopeLoaded)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope});if(!this.isDone){l(this.endpoint,this.envelopeId,this.roleId).then((e=>{var i;console.log("[SIGN] KBA Step",e);this.kbaStep=e.kba_step;if(this.kbaStep==="failed"){this.fatalErrorHeader="Identity Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}else{this.kbaQuestions=((i=e.questions)===null||i===void 0?void 0:i.question)||[];this.kbaChoices=[]}})).catch((e=>console.log("Error getting KBA step",e)))}}catch(e){console.log("[SIGN] Error with signing session",e);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new A(e.message,(n=e.response)===null||n===void 0?void 0:n.status,(r=e.response)===null||r===void 0?void 0:r.data));this.showLoadError=true}}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null;const i=document.getElementById("verdocs-sign-header");if(e&&i){console.log("[SIGN] Moving header");i.remove();e.append(i)}}handleClickAgree(){this.submitting=true;r(this.endpoint,this.envelopeId,this.roleId,true).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 i,t,s;console.log("[SIGN] Update failure",e);this.submitting=false;(i=this.sdkError)===null||i===void 0?void 0:i.emit(new A(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(s=e.response)===null||s===void 0?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,o,n;switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"claim":D("This feature will be available in an upcoming release.");(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});break;case"decline":{this.submitting=true;const e=await d(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Decline result",e);(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}break;case"print":window.print();(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":{const e=this.envelope.documents.find((e=>e.type==="attachment"));if(e){z(this.endpoint,this.envelope,e.id).catch((e=>{console.log("[SIGN] Error downloading PDF",e)}));(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}break}}updateRecipientFieldValue(e,i){console.log("[SIGN] updateRecipientFieldValue",e,i);this.getRecipientFields().forEach((t=>{if(t.name===e){t.value=i.value;t.settings=i.settings;F(t);this.checkRecipientFields()}}))}saveFieldChange(e,i){console.log("[SIGN] saveFieldChange",e,i);c(this.endpoint,this.envelopeId,e,i).then((i=>this.updateRecipientFieldValue(e,i))).catch((e=>{var i,t,s,o,n,a;if(((i=e.response)===null||i===void 0?void 0:i.status)===401&&((s=(t=e.response)===null||t===void 0?void 0:t.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)}(o=this.sdkError)===null||o===void 0?void 0:o.emit(new A(e.message,(n=e.response)===null||n===void 0?void 0:n.status,(a=e.response)===null||a===void 0?void 0:a.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textarea":case"textbox":return this.saveFieldChange(e.name,{prepared:false,value:t});case"checkbox":{return this.saveFieldChange(e.name,{prepared:false,value:String(i.target.checked)})}case"radio":{return this.saveFieldChange(e.name,{prepared:false,value:String(i.target.checked)})}case"dropdown":console.log("Saving dropdown",e.name,i.detail);return this.saveFieldChange(e.name,{prepared:false,value:i.detail});case"initial":if(!i.detail){return}this.showSpinner=true;const o=await(await fetch(i.detail)).blob();return g(this.endpoint,"initial",o).then((async i=>{const t=await u(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t);this.showSpinner=false})).catch((e=>{console.log("Error updating initials",e);this.showSpinner=false}));case"signature":if(!i.detail){return}this.showSpinner=true;const n=await(await fetch(i.detail)).blob();return h(this.endpoint,"signature",n).then((async i=>{console.log("Signature update result",i);const t=await p(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t);this.showSpinner=false})).catch((e=>{console.warn("[SIGN] Error updating signature",e);this.showSpinner=false}));case"date":const{formattedDate:a}=i.detail;if(a){return this.saveFieldChange(e.name,{prepared:false,value:a})}break;case"timestamp":console.log("[SIGN] Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("[SIGN] Unhandled field update",{value:t,checked:s},e);break}}isFieldFilled(e){const{value:i=""}=e;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return f(i);case"phone":return v(i);default:return(i||"").trim()!==""}case"signature":return i==="signed";case"initial":return i==="initialed";case"timestamp":return true;case"date":return!!i;case"attachment":return i==="attached";case"dropdown":return i!=="";case"checkbox":return i==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((i=>i.group===e.group)).some((e=>e.value==="true"))}return e.value==="true";default:return false}}isFieldValid(e){return!e.required||this.isFieldFilled(e)}getSortedFillableFields(){const e=this.getRecipientFields().filter((e=>e.type!=="timestamp"));m(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 i=await x(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",i);this.recipient.status="submitted";this.showDone=true;console.log("[SIGN] Reloading envelope");b(this.endpoint,this.envelopeId).then((e=>{this.envelope=e;this.submitting=false})).catch((e=>{console.log("[SIGN] Error reloading envelope",e);this.submitting=false}))}catch(e){console.log("[SIGN] Error submitting",e)}return}const i=this.getSortedFillableFields().filter((e=>e.required&&!this.isFieldFilled(e)));m(i);const t=i.findIndex((e=>e.name===this.focusedField));let s=t+1;if(s>=i.length){s=0}let o=i[s];let n=0;if(n<i.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){n++;s++;if(s>=i.length){s=0}o=i[s]}if(n>=i.length){o=null}if(o){const e=E(o);const i=document.getElementById(e);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth"});i===null||i===void 0?void 0:i.focusField();this.focusedField=o.name}}getRecipientFields(){return this.envelope.fields.filter((e=>e.role_name===this.recipient.role_name))}checkRecipientFields(){const e=this.getRecipientFields().filter((e=>!this.isFieldValid(e)));if(e.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",e.map((e=>e.name)));this.nextButtonLabel="Next";this.nextSubmits=false}}attachFieldAttributes(e,i,t){if(t.getAttribute("attached")==="1"){return}t.setAttribute("attached","1");t.addEventListener("input",(e=>{if(e.target.type==="radio"||e.target.type==="checkbox"){this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}else{this.checkRecipientFields()}}));t.addEventListener("attached",(async t=>{console.log("[SIGN] onAttached",t.detail,t.target.value);this.showSpinner=true;try{const s=await y(this.endpoint,this.envelopeId,i.name,t.detail);this.updateRecipientFieldValue(i.name,s);this.checkRecipientFields();const o=T("envelope",i,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,i,o);this.showSpinner=false}catch(t){console.log("Error uploading attachment",t);D("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));t.addEventListener("deleted",(async t=>{console.log("[SIGN] onDeleted",t.detail,t.target.value);this.showSpinner=true;try{const t=await w(this.endpoint,this.envelopeId,i.name);console.log("[SIGN] Deleted attachment",t);this.updateRecipientFieldValue(i.name,t);this.checkRecipientFields();const s=T("envelope",i,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,i,s);this.showSpinner=false}catch(t){console.log("Error uploading attachment",t);D("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));t.addEventListener("focusout",(e=>{if(i.type!=="dropdown"&&i.type!=="attachment"){this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}}));t.addEventListener("fieldChange",(e=>{this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}));t.setAttribute("templateid",this.envelope.template_id);t.setAttribute("fieldname",i.name);t.setAttribute("page",e.pageNumber);t.setAttribute("xScale",e.xScale);t.setAttribute("yScale",e.yScale);const s=k(this.recipient);t.setAttribute("initials",S(s));t.setAttribute("name",s)}handlePageRendered(e){const i=e.detail;const t=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",i.pageNumber,t);t.forEach(((e,t)=>{if(e.page!==i.pageNumber){return}const s=T("envelope",e,i,{disabled:false,editable:false,draggable:false,done:this.isDone},t);if(!s){return}if(Array.isArray(s)){s.map((t=>this.attachFieldAttributes(i,e,t)))}else{this.attachFieldAttributes(i,e,s)}}));this.sortedRecipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending"))).forEach((()=>{this.getRecipientFields().filter((e=>e.page===i.pageNumber)).forEach((e=>{const t=T("envelope",e,i,{disabled:true,editable:false,draggable:false,done:this.isDone});if(!t){return}if(Array.isArray(t)){t.map((t=>this.attachFieldAttributes(i,e,t)))}else{this.attachFieldAttributes(i,e,t)}}))}));this.checkRecipientFields()}render(){if(this.showLoadError){return t(s,null,t("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 t(s,null,t("verdocs-loader",null))}if(this.fatalErrorMessage){return t(s,{class:{agreed:this.agreed}},t("div",{class:"fatal-error"},t("div",{class:"message"},t("div",{class:"header"},this.fatalErrorHeader),t("p",null,this.fatalErrorMessage))))}if(this.isDone){return t(s,{class:{agreed:this.agreed}},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return(i=this.sdkError)===null||i===void 0?void 0:i.emit(e.detail)}}),this.showDone&&t("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&&t("div",{class:"loading-indicator"},t("verdocs-loader",null)))}if(!this.agreed){return t(s,{class:"agreed"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:()=>this.handleClickAgree()}),t("ul",null,t("li",null,"Agree to use electronic records and signatures, and confirm you have read the"," ",t("a",{href:"https://verdocs.com/en/electronic-record-signature-disclosure/",target:"_blank"},"Electronic Record and Signatures Disclosure"),"."),t("li",null,"Agree to Verdocs'"," ",t("a",{href:"https://verdocs.com/en/eula",target:"_blank"},"End User License Agreement")," ","and confirm you have read Verdocs'"," ",t("a",{href:"https://verdocs.com/en/privacy-policy/",target:"_blank"},"Privacy Policy"),".")))))}if(this.kbaStep==="pin"){return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},t("verdocs-kba-dialog",{mode:"text",step:1,steps:1,helptitle:"Document is protected by a PIN code",helptext:"Please enter your PIN code to proceed. If you do not have one, please contact the sender.",label:"PIN Code",onNext:async e=>{N(this.endpoint,this.envelopeId,this.roleId,e.detail).then((e=>{console.log("[SIGN] PIN code submission result",e);if(e.kba_step==="complete"){this.kbaStep=""}})).catch((e=>{var i,t,s,o;console.log("[SIGN] Error submitting PIN",e);if(((t=(i=e.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)==="Rejecting PIN submission, too many attempts"){this.fatalErrorHeader="PIN Verification Failed";this.fatalErrorMessage="Too many failed attempts. The sender has been notified.";this.isDone=true}else{D(((o=(s=e.response)===null||s===void 0?void 0:s.data)===null||o===void 0?void 0:o.error)||"Unable to verify PIN code. Please try again.",{style:"error"})}}))}}))))}if(this.kbaStep==="identity"){return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},t("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 i=e.detail;I(this.endpoint,this.envelopeId,this.roleId,{firstName:i.first_name,lastName:i.last_name,address:i.address,city:i.city,state:i.state,zip:i.zip,ssnLast4:i.ssn_last_4}).then((e=>{console.log("[SIGN] Identity submission result",e);this.kbaStep=e.kba_step})).catch((e=>{var i,t;console.log("[SIGN] Error submitting identity",e);D(((t=(i=e.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)||"Unable to verify identity.",{style:"error"})}))}}))))}if(this.kbaStep==="challenge"){const e=this.kbaChoices.length;const i=this.kbaQuestions[e];return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?t("verdocs-spinner",null):t("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(i===null||i===void 0?void 0:i.prompt)||"Please select one of the options below.",choices:(i===null||i===void 0?void 0:i.answer)||["Skip Question"],step:e+1,steps:this.kbaQuestions.length,onNext:async e=>{var i,t,s;const o=e.detail;this.kbaChoices=[...this.kbaChoices,o];if(this.kbaChoices.length>=this.kbaQuestions.length){const o=this.kbaQuestions.map(((e,i)=>({type:e.type,answer:this.kbaChoices[i]})));console.log("Submitting KBA responses",this.kbaChoices,o);try{const e=await G(this.endpoint,this.envelopeId,this.roleId,o);console.log("KBA challenge response",e);this.kbaStep=e.kba_step;if(this.kbaStep==="failed"){this.fatalErrorHeader="Identity Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}else{this.kbaQuestions=((i=e.questions)===null||i===void 0?void 0:i.question)||[];this.kbaChoices=[]}}catch(e){console.log("Error submitting KBA challenge",e);this.kbaStep="";this.fatalErrorHeader="Unable to Verify Identity";this.fatalErrorMessage=((s=(t=e.response)===null||t===void 0?void 0:t.data)===null||s===void 0?void 0:s.error)||"Please try again later.";this.isDone=true}}}}))))}return t(s,null,t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name),t("div",{style:{flex:"1"}}),!this.finishLater&&t("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?j:R,onOptionSelected:e=>this.handleOptionSelected(e)}))),t("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((e=>{const i=P(1,e.pages);return t(o,null,i.map((i=>{var s;const o=((s=e.page_sizes)===null||s===void 0?void 0:s[i])||{width:612,height:792};return t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:o.width,virtualHeight:o.height,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&t("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.showFinishLater=false}),this.showDone&&t("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.submitting||this.showSpinner&&t("verdocs-portal",null,t("div",{class:"spinner-overlay"},t("verdocs-spinner",null))))}};C.style=U;export{C as verdocs_sign};
2
+ //# sourceMappingURL=p-2d0bd50f.entry.js.map