@verdocs/web-sdk 5.0.25 → 5.0.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. package/dist/cjs/{Datastore-931fd77e.js → Datastore-e39f8315.js} +29 -24
  2. package/dist/cjs/Datastore-e39f8315.js.map +1 -0
  3. package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-checkbox_6.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-preview_6.cjs.entry.js +6 -4
  13. package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
  14. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  16. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +4 -1
  17. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js.map +1 -1
  18. package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +1 -2
  19. package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js.map +1 -1
  20. package/dist/components/{p-e4a97ad5.js → p-143a763f.js} +3 -3
  21. package/dist/components/{p-e4a97ad5.js.map → p-143a763f.js.map} +1 -1
  22. package/dist/components/{p-2d8b46e5.js → p-16b073b8.js} +2 -2
  23. package/dist/components/{p-2d8b46e5.js.map → p-16b073b8.js.map} +1 -1
  24. package/dist/components/{p-e9528d9f.js → p-1d4829fb.js} +3 -3
  25. package/dist/components/{p-e9528d9f.js.map → p-1d4829fb.js.map} +1 -1
  26. package/dist/components/{p-ca3e45f3.js → p-27a8eef0.js} +2 -2
  27. package/dist/components/{p-ca3e45f3.js.map → p-27a8eef0.js.map} +1 -1
  28. package/dist/components/{p-fcf13666.js → p-550377ba.js} +13 -13
  29. package/dist/components/{p-fcf13666.js.map → p-550377ba.js.map} +1 -1
  30. package/dist/components/{p-1ce18a42.js → p-619747d7.js} +2 -2
  31. package/dist/components/{p-1ce18a42.js.map → p-619747d7.js.map} +1 -1
  32. package/dist/components/{p-e95ded6b.js → p-631808d5.js} +18 -15
  33. package/dist/components/p-631808d5.js.map +1 -0
  34. package/dist/components/{p-e4799d51.js → p-7bd7baa6.js} +3 -3
  35. package/dist/components/{p-e4799d51.js.map → p-7bd7baa6.js.map} +1 -1
  36. package/dist/components/{p-1ab01232.js → p-813ed998.js} +3 -3
  37. package/dist/components/{p-1ab01232.js.map → p-813ed998.js.map} +1 -1
  38. package/dist/components/{p-a415ce22.js → p-8c965486.js} +3 -3
  39. package/dist/components/{p-a415ce22.js.map → p-8c965486.js.map} +1 -1
  40. package/dist/components/{p-78de9e65.js → p-90e3fae6.js} +4 -5
  41. package/dist/components/p-90e3fae6.js.map +1 -0
  42. package/dist/components/{p-681e7dd4.js → p-99128b47.js} +3 -3
  43. package/dist/components/{p-681e7dd4.js.map → p-99128b47.js.map} +1 -1
  44. package/dist/components/{p-53168eec.js → p-ac7694c0.js} +2 -2
  45. package/dist/components/{p-53168eec.js.map → p-ac7694c0.js.map} +1 -1
  46. package/dist/components/{p-ecfc85ae.js → p-b5e479db.js} +3 -3
  47. package/dist/components/{p-ecfc85ae.js.map → p-b5e479db.js.map} +1 -1
  48. package/dist/components/{p-f6156f7a.js → p-c422d9a0.js} +3 -3
  49. package/dist/components/{p-f6156f7a.js.map → p-c422d9a0.js.map} +1 -1
  50. package/dist/components/{p-c4c9feda.js → p-c4310332.js} +3 -3
  51. package/dist/components/{p-c4c9feda.js.map → p-c4310332.js.map} +1 -1
  52. package/dist/components/{p-91d65fde.js → p-c5045788.js} +3 -3
  53. package/dist/components/{p-91d65fde.js.map → p-c5045788.js.map} +1 -1
  54. package/dist/components/{p-3828cb31.js → p-d4be87ef.js} +29 -24
  55. package/dist/components/p-d4be87ef.js.map +1 -0
  56. package/dist/components/{p-28e3b2e3.js → p-d54466ed.js} +14 -14
  57. package/dist/components/{p-28e3b2e3.js.map → p-d54466ed.js.map} +1 -1
  58. package/dist/components/{p-eb2ad8d0.js → p-e39c327c.js} +2 -2
  59. package/dist/components/{p-eb2ad8d0.js.map → p-e39c327c.js.map} +1 -1
  60. package/dist/components/{p-eb12a71c.js → p-f238b25b.js} +2 -2
  61. package/dist/components/{p-eb12a71c.js.map → p-f238b25b.js.map} +1 -1
  62. package/dist/components/{p-bfed2f8d.js → p-f7cf2401.js} +2 -2
  63. package/dist/components/{p-bfed2f8d.js.map → p-f7cf2401.js.map} +1 -1
  64. package/dist/components/verdocs-build.js +20 -20
  65. package/dist/components/verdocs-envelope-recipient-link.js +1 -1
  66. package/dist/components/verdocs-envelope-recipient-summary.js +1 -1
  67. package/dist/components/verdocs-envelope-sidebar.js +2 -2
  68. package/dist/components/verdocs-field-attachment.js +1 -1
  69. package/dist/components/verdocs-field-checkbox.js +1 -1
  70. package/dist/components/verdocs-field-date.js +1 -1
  71. package/dist/components/verdocs-field-dropdown.js +1 -1
  72. package/dist/components/verdocs-field-initial.js +1 -1
  73. package/dist/components/verdocs-field-payment.js +2 -2
  74. package/dist/components/verdocs-field-radio.js +1 -1
  75. package/dist/components/verdocs-field-signature.js +1 -1
  76. package/dist/components/verdocs-field-textarea.js +1 -1
  77. package/dist/components/verdocs-field-textbox.js +1 -1
  78. package/dist/components/verdocs-field-timestamp.js +1 -1
  79. package/dist/components/verdocs-preview.js +1 -1
  80. package/dist/components/verdocs-send.js +1 -1
  81. package/dist/components/verdocs-sign.js +2 -2
  82. package/dist/components/verdocs-template-attachments.js +1 -1
  83. package/dist/components/verdocs-template-build-tabs.js +1 -1
  84. package/dist/components/verdocs-template-document-page.js +1 -1
  85. package/dist/components/verdocs-template-field-properties.js +1 -1
  86. package/dist/components/verdocs-template-fields.js +1 -1
  87. package/dist/components/verdocs-template-role-properties.js +1 -1
  88. package/dist/components/verdocs-template-roles.js +1 -1
  89. package/dist/components/verdocs-view.js +1 -1
  90. package/dist/esm/{Datastore-3f924d94.js → Datastore-77cb8d9c.js} +29 -24
  91. package/dist/esm/Datastore-77cb8d9c.js.map +1 -0
  92. package/dist/esm/verdocs-build.entry.js +1 -1
  93. package/dist/esm/verdocs-checkbox_6.entry.js +1 -1
  94. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  95. package/dist/esm/verdocs-envelope-recipient-summary.entry.js +1 -1
  96. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  97. package/dist/esm/verdocs-field-attachment_13.entry.js +1 -1
  98. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  99. package/dist/esm/verdocs-kba-dialog_2.entry.js +1 -1
  100. package/dist/esm/verdocs-menu-panel_2.entry.js +1 -1
  101. package/dist/esm/verdocs-preview_6.entry.js +6 -4
  102. package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
  103. package/dist/esm/verdocs-sign.entry.js +1 -1
  104. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  105. package/dist/esm-es5/Datastore-77cb8d9c.js +2 -0
  106. package/dist/esm-es5/Datastore-77cb8d9c.js.map +1 -0
  107. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  108. package/dist/esm-es5/verdocs-checkbox_6.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-preview_6.entry.js +2 -2
  117. package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
  118. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  120. package/dist/verdocs-web-sdk/{p-f6ed768d.entry.js → p-00063a35.entry.js} +2 -2
  121. package/dist/verdocs-web-sdk/{p-b1a9dc79.entry.js → p-0a745e87.entry.js} +3 -3
  122. package/dist/verdocs-web-sdk/p-0a745e87.entry.js.map +1 -0
  123. package/dist/verdocs-web-sdk/{p-1902bf04.entry.js → p-104863b5.entry.js} +2 -2
  124. package/dist/verdocs-web-sdk/{p-9ab8bcaa.system.entry.js → p-1f2c019d.system.entry.js} +2 -2
  125. package/dist/verdocs-web-sdk/{p-fc29a754.entry.js → p-25aa3bd3.entry.js} +2 -2
  126. package/dist/verdocs-web-sdk/p-52c3e8b0.system.js +2 -0
  127. package/dist/verdocs-web-sdk/p-52c3e8b0.system.js.map +1 -0
  128. package/dist/verdocs-web-sdk/{p-7975ec40.system.entry.js → p-578e65d4.system.entry.js} +2 -2
  129. package/dist/verdocs-web-sdk/{p-407c0725.system.entry.js → p-5bcf921b.system.entry.js} +2 -2
  130. package/dist/verdocs-web-sdk/{p-26106576.system.entry.js → p-5c065719.system.entry.js} +2 -2
  131. package/dist/verdocs-web-sdk/{p-7ffebea3.entry.js → p-5ebfe76c.entry.js} +2 -2
  132. package/dist/verdocs-web-sdk/{p-086ee7f1.system.entry.js → p-6eee289a.system.entry.js} +2 -2
  133. package/dist/verdocs-web-sdk/{p-cc230abf.entry.js → p-6f1e2f2f.entry.js} +2 -2
  134. package/dist/verdocs-web-sdk/{p-4e3790db.system.entry.js → p-70247599.system.entry.js} +2 -2
  135. package/dist/verdocs-web-sdk/{p-e84cf41e.entry.js → p-8369273d.entry.js} +2 -2
  136. package/dist/verdocs-web-sdk/{p-f84ba101.entry.js → p-a285560f.entry.js} +2 -2
  137. package/dist/verdocs-web-sdk/{p-80952d72.system.entry.js → p-a41e6f04.system.entry.js} +3 -3
  138. package/dist/verdocs-web-sdk/p-a41e6f04.system.entry.js.map +1 -0
  139. package/dist/verdocs-web-sdk/{p-75e53ae1.entry.js → p-b7799ec0.entry.js} +2 -2
  140. package/dist/verdocs-web-sdk/{p-a4d94e2e.entry.js → p-b8945173.entry.js} +2 -2
  141. package/dist/verdocs-web-sdk/{p-d4aff253.entry.js → p-b9fee1a7.entry.js} +2 -2
  142. package/dist/verdocs-web-sdk/{p-34c2298e.system.entry.js → p-cabfdb9d.system.entry.js} +2 -2
  143. package/dist/verdocs-web-sdk/{p-90690dde.system.entry.js → p-d1d95df4.system.entry.js} +2 -2
  144. package/dist/verdocs-web-sdk/{p-60da8e6b.entry.js → p-d3a8c6b8.entry.js} +2 -2
  145. package/dist/verdocs-web-sdk/p-d4be87ef.js +2 -0
  146. package/dist/verdocs-web-sdk/p-d4be87ef.js.map +1 -0
  147. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
  148. package/dist/verdocs-web-sdk/{p-208a8b41.system.entry.js → p-e3efeb57.system.entry.js} +2 -2
  149. package/dist/verdocs-web-sdk/{p-dc5c275f.system.entry.js → p-e83d06d4.system.entry.js} +2 -2
  150. package/dist/verdocs-web-sdk/{p-32cf09f0.system.entry.js → p-ecfe8987.system.entry.js} +2 -2
  151. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  152. package/package.json +3 -3
  153. package/dist/cjs/Datastore-931fd77e.js.map +0 -1
  154. package/dist/components/p-3828cb31.js.map +0 -1
  155. package/dist/components/p-78de9e65.js.map +0 -1
  156. package/dist/components/p-e95ded6b.js.map +0 -1
  157. package/dist/esm/Datastore-3f924d94.js.map +0 -1
  158. package/dist/esm-es5/Datastore-3f924d94.js +0 -2
  159. package/dist/esm-es5/Datastore-3f924d94.js.map +0 -1
  160. package/dist/verdocs-web-sdk/p-3828cb31.js +0 -2
  161. package/dist/verdocs-web-sdk/p-3828cb31.js.map +0 -1
  162. package/dist/verdocs-web-sdk/p-65be7617.system.js +0 -2
  163. package/dist/verdocs-web-sdk/p-65be7617.system.js.map +0 -1
  164. package/dist/verdocs-web-sdk/p-80952d72.system.entry.js.map +0 -1
  165. package/dist/verdocs-web-sdk/p-b1a9dc79.entry.js.map +0 -1
  166. /package/dist/verdocs-web-sdk/{p-f6ed768d.entry.js.map → p-00063a35.entry.js.map} +0 -0
  167. /package/dist/verdocs-web-sdk/{p-1902bf04.entry.js.map → p-104863b5.entry.js.map} +0 -0
  168. /package/dist/verdocs-web-sdk/{p-9ab8bcaa.system.entry.js.map → p-1f2c019d.system.entry.js.map} +0 -0
  169. /package/dist/verdocs-web-sdk/{p-fc29a754.entry.js.map → p-25aa3bd3.entry.js.map} +0 -0
  170. /package/dist/verdocs-web-sdk/{p-7975ec40.system.entry.js.map → p-578e65d4.system.entry.js.map} +0 -0
  171. /package/dist/verdocs-web-sdk/{p-407c0725.system.entry.js.map → p-5bcf921b.system.entry.js.map} +0 -0
  172. /package/dist/verdocs-web-sdk/{p-26106576.system.entry.js.map → p-5c065719.system.entry.js.map} +0 -0
  173. /package/dist/verdocs-web-sdk/{p-7ffebea3.entry.js.map → p-5ebfe76c.entry.js.map} +0 -0
  174. /package/dist/verdocs-web-sdk/{p-086ee7f1.system.entry.js.map → p-6eee289a.system.entry.js.map} +0 -0
  175. /package/dist/verdocs-web-sdk/{p-cc230abf.entry.js.map → p-6f1e2f2f.entry.js.map} +0 -0
  176. /package/dist/verdocs-web-sdk/{p-4e3790db.system.entry.js.map → p-70247599.system.entry.js.map} +0 -0
  177. /package/dist/verdocs-web-sdk/{p-e84cf41e.entry.js.map → p-8369273d.entry.js.map} +0 -0
  178. /package/dist/verdocs-web-sdk/{p-f84ba101.entry.js.map → p-a285560f.entry.js.map} +0 -0
  179. /package/dist/verdocs-web-sdk/{p-75e53ae1.entry.js.map → p-b7799ec0.entry.js.map} +0 -0
  180. /package/dist/verdocs-web-sdk/{p-a4d94e2e.entry.js.map → p-b8945173.entry.js.map} +0 -0
  181. /package/dist/verdocs-web-sdk/{p-d4aff253.entry.js.map → p-b9fee1a7.entry.js.map} +0 -0
  182. /package/dist/verdocs-web-sdk/{p-34c2298e.system.entry.js.map → p-cabfdb9d.system.entry.js.map} +0 -0
  183. /package/dist/verdocs-web-sdk/{p-90690dde.system.entry.js.map → p-d1d95df4.system.entry.js.map} +0 -0
  184. /package/dist/verdocs-web-sdk/{p-60da8e6b.entry.js.map → p-d3a8c6b8.entry.js.map} +0 -0
  185. /package/dist/verdocs-web-sdk/{p-208a8b41.system.entry.js.map → p-e3efeb57.system.entry.js.map} +0 -0
  186. /package/dist/verdocs-web-sdk/{p-dc5c275f.system.entry.js.map → p-e83d06d4.system.entry.js.map} +0 -0
  187. /package/dist/verdocs-web-sdk/{p-32cf09f0.system.entry.js.map → p-ecfe8987.system.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as s,F as i,H as o}from"./p-b9654a5e.js";import{getRGBA as n}from"@verdocs/js-sdk";import{S as a}from"./p-b0766439.js";import{S as r}from"./p-3828cb31.js";const d='@-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-field-payment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;border:1px solid #cfa;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-payment.disabled{opacity:0.5}verdocs-field-payment button,verdocs-field-payment div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-payment button{color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-payment button.hide{display:none}verdocs-field-payment input{float:left;font-family:Arial, sans-serif}verdocs-field-payment select{position:absolute;font-family:Arial, sans-serif;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 4px, calc(100% - 3px) 4px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-payment .frame{width:100%;height:100%;background-size:contain;text-align:left}verdocs-field-payment .frame img{position:absolute;height:auto;width:100%}verdocs-field-payment.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-payment .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-payment .settings-icon svg{fill:#707ae5}verdocs-field-payment .settings-icon:hover{opacity:1}@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)}}';const l=d;const c=class{constructor(s){e(this,s);this.settingsChanged=t(this,"settingsChanged",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.done=false;this.editable=false;this.moveable=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false;this.fields=undefined;this.pageNum=undefined;this.roleName=undefined;this.fieldId=undefined;this.recipients=undefined;this.selectedRoleName=undefined;this.pdfPages=undefined;this.currentSignature=undefined;this.currentSignatureId=undefined;this.currentInitial=undefined;this.currentInitialId=undefined;this.signed=false;this.preparedMessage=undefined;this.signatureUrl="";this.roleindex=0}componentWillLoad(){if(this.recipients&&this.recipients.length>0){const e=this.recipients.find((e=>e.type==="preparer"));console.log("Found preparer",e);if(e){this.preparedMessage=`Prepared by ${e["full_name"]}`}}}async focusField(){this.focused=true;setTimeout((()=>{this.focused=false}),500)}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}}render(){const{source:e,sourceid:t,fieldname:d,editable:l=false,done:c=false,disabled:f=false,focused:p,xscale:h=1,yscale:g=1}=this;const{index:u,field:b}=r.getField(e,t,d,this.field);const m=n(u);if(!b){return s(i,null)}if(c){return s(o,{class:{done:c}},"$✓")}return s(o,{class:{focused:p,disabled:f},style:{backgroundColor:m}},s("button",{class:{hide:this.signed}},"$"),this.signed?s("div",{class:"frame"}):s("div",{style:{display:"none"}}),s("img",{width:"100%",height:"100%",src:this.signatureUrl,alt:"Payment Icon"}),l&&s(i,null,s("div",{id:`verdocs-settings-panel-trigger-${d}`,style:{transform:`scale(${Math.floor(1/h*1e3)/1e3}, ${Math.floor(1/g*1e3)/1e3})`},class:"settings-icon",innerHTML:a,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&s("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${b.name}`,onClickAway:()=>this.showingProperties=false},s("verdocs-template-field-properties",{templateId:t,fieldName:b.name,onClose:()=>this.showingProperties=false,onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:d});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Check boxes allow the user to select one or more (non-exclusive) options."}))))}};c.style=l;export{c as verdocs_field_payment};
2
- //# sourceMappingURL=p-1902bf04.entry.js.map
1
+ import{r as e,c as t,h as s,F as i,H as o}from"./p-b9654a5e.js";import{getRGBA as n}from"@verdocs/js-sdk";import{S as a}from"./p-b0766439.js";import{S as r}from"./p-d4be87ef.js";const d='@-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-field-payment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;border:1px solid #cfa;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-payment.disabled{opacity:0.5}verdocs-field-payment button,verdocs-field-payment div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-payment button{color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-payment button.hide{display:none}verdocs-field-payment input{float:left;font-family:Arial, sans-serif}verdocs-field-payment select{position:absolute;font-family:Arial, sans-serif;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 4px, calc(100% - 3px) 4px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-payment .frame{width:100%;height:100%;background-size:contain;text-align:left}verdocs-field-payment .frame img{position:absolute;height:auto;width:100%}verdocs-field-payment.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-payment .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-payment .settings-icon svg{fill:#707ae5}verdocs-field-payment .settings-icon:hover{opacity:1}@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)}}';const l=d;const c=class{constructor(s){e(this,s);this.settingsChanged=t(this,"settingsChanged",7);this.deleted=t(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.done=false;this.editable=false;this.moveable=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false;this.fields=undefined;this.pageNum=undefined;this.roleName=undefined;this.fieldId=undefined;this.recipients=undefined;this.selectedRoleName=undefined;this.pdfPages=undefined;this.currentSignature=undefined;this.currentSignatureId=undefined;this.currentInitial=undefined;this.currentInitialId=undefined;this.signed=false;this.preparedMessage=undefined;this.signatureUrl="";this.roleindex=0}componentWillLoad(){if(this.recipients&&this.recipients.length>0){const e=this.recipients.find((e=>e.type==="preparer"));console.log("Found preparer",e);if(e){this.preparedMessage=`Prepared by ${e["full_name"]}`}}}async focusField(){this.focused=true;setTimeout((()=>{this.focused=false}),500)}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.showPanel){e.showPanel()}}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.fieldname}`);if(e&&e.hidePanel){e.hidePanel()}}render(){const{source:e,sourceid:t,fieldname:d,editable:l=false,done:c=false,disabled:f=false,focused:p,xscale:h=1,yscale:g=1}=this;const{index:u,field:b}=r.getField(e,t,d,this.field);const m=n(u);if(!b){return s(i,null)}if(c){return s(o,{class:{done:c}},"$✓")}return s(o,{class:{focused:p,disabled:f},style:{backgroundColor:m}},s("button",{class:{hide:this.signed}},"$"),this.signed?s("div",{class:"frame"}):s("div",{style:{display:"none"}}),s("img",{width:"100%",height:"100%",src:this.signatureUrl,alt:"Payment Icon"}),l&&s(i,null,s("div",{id:`verdocs-settings-panel-trigger-${d}`,style:{transform:`scale(${Math.floor(1/h*1e3)/1e3}, ${Math.floor(1/g*1e3)/1e3})`},class:"settings-icon",innerHTML:a,onClick:e=>{e.stopPropagation();this.showingProperties=!this.showingProperties}}),this.showingProperties&&s("verdocs-portal",{anchor:`verdocs-settings-panel-trigger-${b.name}`,onClickAway:()=>this.showingProperties=false},s("verdocs-template-field-properties",{templateId:t,fieldName:b.name,onClose:()=>this.showingProperties=false,onDelete:()=>{var e;(e=this.deleted)===null||e===void 0?void 0:e.emit({fieldName:d});return this.hideSettingsPanel()},onSettingsChanged:e=>{var t;(t=this.settingsChanged)===null||t===void 0?void 0:t.emit(e.detail);return this.hideSettingsPanel()},helpText:"Check boxes allow the user to select one or more (non-exclusive) options."}))))}};c.style=l;export{c as verdocs_field_payment};
2
+ //# sourceMappingURL=p-104863b5.entry.js.map
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,i,t,n){function s(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?t(e.value):s(e.value).then(r,a)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){t.label=a[1];break}if(a[0]===6&&t.label<o[1]){t.label=o[1];o=a;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(a);break}if(o[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-d738b5db.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-65be7617.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var i,t,n,s,o,r,a,l,d,c,v,p,h,u,f,w,g,b;return{setters:[function(e){i=e.r;t=e.c;n=e.h;s=e.F;o=e.H},function(e){r=e.VerdocsEndpoint;a=e.getEnvelope;l=e.resendInvitation;d=e.cancelEnvelope;c=e.formatFullName;v=e.updateEnvelope;p=e.userIsEnvelopeOwner;h=e.capitalize},function(e){u=e.F},function(e){f=e.V},function(e){w=e.S},function(e){g=e.S},function(e){b=e.f}],execute:function(){var m='@-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-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;font-size:14px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;gap:6px;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-name{-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:0 0 100px;flex:0 0 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}verdocs-envelope-sidebar .reminders{margin:15px 0 30px 0}verdocs-envelope-sidebar .reminders .form-row{margin:8px 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-sidebar .reminders .form-row .reminders-label{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row .form-label{-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row verdocs-text-input{margin:0;width:100px}';var x=m;var k=24*60*60*1e3;var C='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var y='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var z='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var M={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>',idcard:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 10H18" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 14H18" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6.16992 15.0001C6.37606 14.4141 6.75902 13.9065 7.26594 13.5475C7.77286 13.1884 8.37873 12.9956 8.99992 12.9956C9.62111 12.9956 10.227 13.1884 10.7339 13.5475C11.2408 13.9065 11.6238 14.4141 11.8299 15.0001" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 13C10.1046 13 11 12.1046 11 11C11 9.89543 10.1046 9 9 9C7.89543 9 7 9.89543 7 11C7 12.1046 7.89543 13 9 13Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 5H4C2.89543 5 2 5.89543 2 7V17C2 18.1046 2.89543 19 4 19H20C21.1046 19 22 18.1046 22 17V7C22 5.89543 21.1046 5 20 5Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',idcardslash:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 10H18" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 14H18" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6.16992 15.0001C6.37606 14.4141 6.75902 13.9065 7.26594 13.5475C7.77286 13.1884 8.37873 12.9956 8.99992 12.9956C9.62111 12.9956 10.227 13.1884 10.7339 13.5475C11.2408 13.9065 11.6238 14.4141 11.8299 15.0001" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 13C10.1046 13 11 12.1046 11 11C11 9.89543 10.1046 9 9 9C7.89543 9 7 9.89543 7 11C7 12.1046 7.89543 13 9 13Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 5H4C2.89543 5 2 5.89543 2 7V17C2 18.1046 2.89543 19 4 19H20C21.1046 19 22 18.1046 22 17V7C22 5.89543 21.1046 5 20 5Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M2 2L22 22" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',key:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.586 17.4139C2.2109 17.7889 2.00011 18.2975 2 18.8279V20.9999C2 21.2651 2.10536 21.5195 2.29289 21.707C2.48043 21.8946 2.73478 21.9999 3 21.9999H6C6.26522 21.9999 6.51957 21.8946 6.70711 21.707C6.89464 21.5195 7 21.2651 7 20.9999V19.9999C7 19.7347 7.10536 19.4803 7.29289 19.2928C7.48043 19.1053 7.73478 18.9999 8 18.9999H9C9.26522 18.9999 9.51957 18.8946 9.70711 18.707C9.89464 18.5195 10 18.2651 10 17.9999V16.9999C10 16.7347 10.1054 16.4803 10.2929 16.2928C10.4804 16.1053 10.7348 15.9999 11 15.9999H11.172C11.7024 15.9998 12.211 15.789 12.586 15.4139L13.4 14.5999C14.7898 15.0841 16.3028 15.0822 17.6915 14.5947C19.0801 14.1071 20.2622 13.1628 21.0444 11.916C21.8265 10.6693 22.1624 9.19409 21.9971 7.73165C21.8318 6.26922 21.1751 4.90617 20.1344 3.86549C19.0937 2.8248 17.7307 2.1681 16.2683 2.00281C14.8058 1.83751 13.3306 2.17341 12.0839 2.95556C10.8372 3.7377 9.89279 4.91979 9.40525 6.30844C8.91771 7.69708 8.91585 9.21008 9.4 10.5999L2.586 17.4139Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16.5 8C16.7761 8 17 7.77614 17 7.5C17 7.22386 16.7761 7 16.5 7C16.2239 7 16 7.22386 16 7.5C16 7.77614 16.2239 8 16.5 8Z" fill="black" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',keyslash:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.586 17.4139C2.2109 17.7889 2.00011 18.2975 2 18.8279V20.9999C2 21.2651 2.10536 21.5195 2.29289 21.707C2.48043 21.8946 2.73478 21.9999 3 21.9999H6C6.26522 21.9999 6.51957 21.8946 6.70711 21.707C6.89464 21.5195 7 21.2651 7 20.9999V19.9999C7 19.7347 7.10536 19.4803 7.29289 19.2928C7.48043 19.1053 7.73478 18.9999 8 18.9999H9C9.26522 18.9999 9.51957 18.8946 9.70711 18.707C9.89464 18.5195 10 18.2651 10 17.9999V16.9999C10 16.7347 10.1054 16.4803 10.2929 16.2928C10.4804 16.1053 10.7348 15.9999 11 15.9999H11.172C11.7024 15.9998 12.211 15.789 12.586 15.4139L13.4 14.5999C14.7898 15.0841 16.3028 15.0822 17.6915 14.5947C19.0801 14.1071 20.2622 13.1628 21.0444 11.916C21.8265 10.6693 22.1624 9.19409 21.9971 7.73165C21.8318 6.26922 21.1751 4.90617 20.1344 3.86549C19.0937 2.8248 17.7307 2.1681 16.2683 2.00281C14.8058 1.83751 13.3306 2.17341 12.0839 2.95556C10.8372 3.7377 9.89279 4.91979 9.40525 6.30844C8.91771 7.69708 8.91585 9.21008 9.4 10.5999L2.586 17.4139Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16.5 8C16.7761 8 17 7.77614 17 7.5C17 7.22386 16.7761 7 16.5 7C16.2239 7 16 7.22386 16 7.5C16 7.77614 16.2239 8 16.5 8Z" fill="black" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',pin:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 17V22" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 10.76C8.9998 11.1321 8.89581 11.4967 8.69972 11.813C8.50363 12.1292 8.22321 12.3844 7.89 12.55L6.11 13.45C5.77679 13.6156 5.49637 13.8708 5.30028 14.187C5.10419 14.5033 5.0002 14.8679 5 15.24V16C5 16.2652 5.10536 16.5196 5.29289 16.7071C5.48043 16.8946 5.73478 17 6 17H18C18.2652 17 18.5196 16.8946 18.7071 16.7071C18.8946 16.5196 19 16.2652 19 16V15.24C18.9998 14.8679 18.8958 14.5033 18.6997 14.187C18.5036 13.8708 18.2232 13.6156 17.89 13.45L16.11 12.55C15.7768 12.3844 15.4964 12.1292 15.3003 11.813C15.1042 11.4967 15.0002 11.1321 15 10.76V7C15 6.73478 15.1054 6.48043 15.2929 6.29289C15.4804 6.10536 15.7348 6 16 6C16.5304 6 17.0391 5.78929 17.4142 5.41421C17.7893 5.03914 18 4.53043 18 4C18 3.46957 17.7893 2.96086 17.4142 2.58579C17.0391 2.21071 16.5304 2 16 2H8C7.46957 2 6.96086 2.21071 6.58579 2.58579C6.21071 2.96086 6 3.46957 6 4C6 4.53043 6.21071 5.03914 6.58579 5.41421C6.96086 5.78929 7.46957 6 8 6C8.26522 6 8.51957 6.10536 8.70711 6.29289C8.89464 6.48043 9 6.73478 9 7V10.76Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',pinslash:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 17V22" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M15.0006 9.34V7C15.0006 6.73478 15.106 6.48043 15.2935 6.29289C15.4811 6.10536 15.7354 6 16.0006 6C16.5311 6 17.0398 5.78929 17.4148 5.41421C17.7899 5.03914 18.0006 4.53043 18.0006 4C18.0006 3.46957 17.7899 2.96086 17.4148 2.58579C17.0398 2.21071 16.5311 2 16.0006 2H7.89062" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M2 2L22 22" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 9V10.76C8.9998 11.1321 8.89581 11.4967 8.69972 11.813C8.50363 12.1292 8.22321 12.3844 7.89 12.55L6.11 13.45C5.77679 13.6156 5.49637 13.8708 5.30028 14.187C5.10419 14.5033 5.0002 14.8679 5 15.24V16C5 16.2652 5.10536 16.5196 5.29289 16.7071C5.48043 16.8946 5.73478 17 6 17H17" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'};var D=e("verdocs_envelope_sidebar",function(){function e(e){i(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.toggle=t(this,"toggle",7);this.another=t(this,"another",7);this.envelopeListenerId=null;this.endpoint=r.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false;this.showRecipientDialog="";this.showCancelDialog=false;this.remindersEnabled=false;this.updatingReminders=false;this.initialReminder=null;this.followupReminders=null;this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t;return __generator(this,(function(n){try{this.endpoint.loadSession();if(!this.envelopeId){console.log("[SIDEBAR] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return[2]}this.listenToEnvelope()}catch(n){console.log("[SIDEBAR] Error loading envelope",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(t=n.response)===null||t===void 0?void 0:t.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();g.subscribe("envelopes",this.envelopeId,(function(){return a(e.endpoint,e.envelopeId)}),false,(function(i){var t,n;e.envelope=i;e.loading=false;e.sortEnvelopeRecipients();e.initialReminder=(t=e.envelope)===null||t===void 0?void 0:t.initial_reminder;e.followupReminders=(n=e.envelope)===null||n===void 0?void 0:n.followup_reminders;e.remindersEnabled=!!e.initialReminder}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){g.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.sortEnvelopeRecipients=function(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.setTab=function(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen;(i=this.toggle)===null||i===void 0?void 0:i.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){var i;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes((i=this.envelope)===null||i===void 0?void 0:i.status)};e.prototype.handleRecipientAction=function(e,i){var t;console.log("[SIDEBAR] Recipient action",i,e);switch(i){case"reminder":l(this.endpoint,this.envelopeId,e.role_name).then((function(){f("Reminder Sent",{style:"success"})})).catch((function(e){console.log("[SIDEBAR] Error resending invitation",e);f("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":f("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":f("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:i})};e.prototype.handleCancelEnvelope=function(){var e=this;this.loading=true;d(this.endpoint,this.envelopeId).then((function(i){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){console.log("[SIDEBAR] Envelope canceled",i);f("Envelope canceled",{style:"success"});t=JSON.parse(JSON.stringify(this.envelope));t.status="canceled";g.updateEnvelope(this.envelopeId,t);this.loading=false;this.panelOpen=false;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:t,event:"canceled"});return[2]}))}))})).catch((function(i){console.log("[SIDEBAR] Error canceling envelope",i);e.loading=false;f("Error canceling envelope: "+i.message,{style:"error"})}))};e.prototype.prepareHistoryEntries=function(){var e=this;var i,t,n,s,o,r;var a=[];var l=((i=this.envelope)===null||i===void 0?void 0:i.history_entries)||[];a.push({icon:"pencil",message:"Envelope created.",date:new Date((t=this.envelope)===null||t===void 0?void 0:t.created_at)});if(((n=this.envelope)===null||n===void 0?void 0:n.status)==="complete"){a.push({icon:"pencil",message:"Envelope completed.",date:new Date((s=this.envelope)===null||s===void 0?void 0:s.updated_at)})}var d=l.some((function(e){return e.event==="owner:canceled"}));if(((o=this.envelope)===null||o===void 0?void 0:o.status)==="canceled"&&!d){a.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((r=this.envelope)===null||r===void 0?void 0:r.canceled_at)})}l.forEach((function(i){var t;var n=(((t=e.envelope)===null||t===void 0?void 0:t.recipients)||[]).find((function(e){return e.role_name===i.role_name}));var s=c(n);switch(i.event.toLowerCase()){case"recipient:kba_verified":a.push({icon:"key",message:"KBA verification completed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:kba_failed":a.push({icon:"keyslash",message:"KBA verification failed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:id_verified":a.push({icon:"idcard",message:"ID verification completed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:id_failed":a.push({icon:"idcardslash",message:"ID verification failed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:pin_verified":a.push({icon:"pin",message:"PIN verification completed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:pin_failed":a.push({icon:"pinslash",message:"PIN verification failed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:signed":a.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:declined":a.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":a.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(i.created_at)});break;case"sms":a.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(i.created_at)});break;case"in_person_link":a.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(i.created_at)});break;case"in_app":a.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(i.created_at)});break;default:a.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":a.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(i.created_at)});break;default:a.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(i.created_at)});break}break;case"recipient:prepared":a.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:claimed":if(i.event_detail==="guest"){a.push({icon:"account_circle",message:"".concat(s," claimed the Envelope as a guest."),date:new Date(i.created_at)})}else if(i.event_detail==="profile"){a.push({icon:"verified_user",message:"".concat(s," claimed the Envelope as a verified user."),date:new Date(i.created_at)})}break;case"recipient:agreed":a.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(i.created_at)});break;case"recipient:invited":if(i.event_detail==="sms"){a.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(i.created_at)})}else{a.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(i.created_at)})}break;case"recipient:reminder":if(i.event_detail==="sms"){a.push({icon:"textsms",message:"".concat(s," sent a reminder via SMS."),date:new Date(i.created_at)})}else{a.push({icon:"mail",message:"".concat(s," sent a reminder via email."),date:new Date(i.created_at)})}break;case"invitation:resent":a.push({icon:"mail",message:"Invitation was resent to ".concat(s).concat(i.event_detail==="reminder"?" by reminder":"","."),date:new Date(i.created_at)});break;case"envelope:cc":a.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:delegated":a.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":a.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"owner:updated_recipient_info":a.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":a.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":a.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"envelope:canceled":case"envelope_canceled":case"canceled":case"owner:canceled":a.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":a.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i);break}}));a.sort((function(e,i){return i.date.getTime()-e.date.getTime()}));return a};e.prototype.handleToggleReminders=function(){if(this.remindersEnabled){return this.handleSetReminders(null,null)}else{return this.handleSetReminders(k,3*k)}};e.prototype.handleSetReminders=function(e,i){var t=this;console.log("Updating reminders...");this.updatingReminders=true;v(this.endpoint,this.envelopeId,{initial_reminder:e,followup_reminders:i}).then((function(e){console.log("Updated",e);g.updateEnvelope(t.envelopeId,e);t.initialReminder=e.initial_reminder;t.followupReminders=e.followup_reminders;t.remindersEnabled=!!e.initial_reminder;t.updatingReminders=false})).catch((function(e){var i,n,s;console.log("Error updating envelope",e);t.initialReminder=(i=t.envelope)===null||i===void 0?void 0:i.initial_reminder;t.followupReminders=(n=t.envelope)===null||n===void 0?void 0:n.followup_reminders;t.remindersEnabled=!!((s=t.envelope)===null||s===void 0?void 0:s.initial_reminder);t.updatingReminders=false;alert(e.response.data.error)}))};e.prototype.render=function(){var e=this;var i,t,r,a,l,d,v,f,w,g,m,x;if(this.loading){return n(o,null)}var D=p(this.endpoint.profile,this.envelope);var _=this.prepareHistoryEntries();var H=((i=this.envelope)===null||i===void 0?void 0:i.status)!=="pending"&&((t=this.envelope)===null||t===void 0?void 0:t.status)!=="in progress";return n(o,{class:this.panelOpen?"open":""},n("div",{class:"side-buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:C}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:y}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:z})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},(r=this.envelope)===null||r===void 0?void 0:r.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},b(new Date((a=this.envelope)===null||a===void 0?void 0:a.created_at),u)),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},b(new Date((l=this.envelope)===null||l===void 0?void 0:l.updated_at),u)),n("div",{class:"label"},"Status"),n("div",{class:"value"},h((d=this.envelope)===null||d===void 0?void 0:d.status)),n("div",{class:"label"},"Owner ID"),n("div",{class:"value"},(v=this.envelope)===null||v===void 0?void 0:v.profile_id),n("div",{class:"label"},"Owner Name"),n("div",{class:"value"},c((f=this.envelope)===null||f===void 0?void 0:f.profile)),n("div",{class:"label"},"Owner Email"),n("div",{class:"value"},(g=(w=this.envelope)===null||w===void 0?void 0:w.profile)===null||g===void 0?void 0:g.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),(m=this.envelope)===null||m===void 0?void 0:m.recipients.map((function(i,t){var s;var o=i.status!=="submitted"&&i.status!=="canceled"&&i.status!=="declined";var r=e.canResendRecipient(i);var a=c(i);return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},t+1),n("div",{class:"recipient-name"},i.role_name),n("div",{class:(s={"recipient-status":true},s[i.status]=true,s)},i.status),D&&!H&&n("verdocs-dropdown",{onOptionSelected:function(t){return e.handleRecipientAction(i,t.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!r},{id:"inperson",label:"Get In-Person Link",disabled:!o}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},a),n("div",{class:"recipient-name"},i.email),n("div",{class:"recipient-name"},i.phone)))})),D&&n("div",{class:"reminders"},n("div",{class:"form-row"},n("div",{class:"reminders-label"},"Reminders"),n("verdocs-switch",{disabled:H||this.updatingReminders,checked:this.remindersEnabled,onCheckedChange:function(){return e.handleToggleReminders()}})),this.remindersEnabled&&n(s,null,n("div",{class:"form-row"},"NOTE: Reminders will only be sent for up to 14 days."),n("div",{class:"form-row"},n("div",{class:"form-label"},"Initial Reminder (days):"),n("verdocs-text-input",{placeholder:"In hours...",disabled:H||this.updatingReminders,value:String(Math.floor(this.initialReminder/k)),onBlur:function(i){e.initialReminder=Number(i.target.value)*k;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),n("div",{class:"form-row"},n("div",{class:"form-label"},"Follow-up Reminders:"),n("verdocs-text-input",{placeholder:"In hours...",disabled:H||this.updatingReminders,value:String(Math.floor(this.followupReminders/k)),onBlur:function(i){e.followupReminders=Number(i.target.value)*k;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),n("div",{class:"form-row"},n("div",{class:"form-label"},"Next Reminder:"),n("div",{style:{color:"#dddddd"}},b(new Date((x=this.envelope)===null||x===void 0?void 0:x.next_reminder),"P p"))))),D&&n("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Envelope",onClick:function(){return e.showCancelDialog=!H},disabled:H})),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),_.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:M[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},b(e.date,u))))}))),this.showRecipientDialog&&n("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:function(){return e.showRecipientDialog=""}}),this.showCancelDialog&&n("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:function(){e.showCancelDialog=false;e.handleCancelEnvelope()}}))};return e}());D.style=x}}}));
2
- //# sourceMappingURL=p-9ab8bcaa.system.entry.js.map
1
+ var __awaiter=this&&this.__awaiter||function(e,i,t,n){function s(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?t(e.value):s(e.value).then(r,a)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){t.label=a[1];break}if(a[0]===6&&t.label<o[1]){t.label=o[1];o=a;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(a);break}if(o[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-d738b5db.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-52c3e8b0.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var i,t,n,s,o,r,a,l,d,c,v,p,h,u,f,w,g,b;return{setters:[function(e){i=e.r;t=e.c;n=e.h;s=e.F;o=e.H},function(e){r=e.VerdocsEndpoint;a=e.getEnvelope;l=e.resendInvitation;d=e.cancelEnvelope;c=e.formatFullName;v=e.updateEnvelope;p=e.userIsEnvelopeOwner;h=e.capitalize},function(e){u=e.F},function(e){f=e.V},function(e){w=e.S},function(e){g=e.S},function(e){b=e.f}],execute:function(){var m='@-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-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;font-size:14px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;gap:6px;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-name{-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:0 0 100px;flex:0 0 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}verdocs-envelope-sidebar .reminders{margin:15px 0 30px 0}verdocs-envelope-sidebar .reminders .form-row{margin:8px 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-sidebar .reminders .form-row .reminders-label{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row .form-label{-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row verdocs-text-input{margin:0;width:100px}';var x=m;var k=24*60*60*1e3;var C='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var y='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var z='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var M={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>',idcard:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 10H18" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 14H18" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6.16992 15.0001C6.37606 14.4141 6.75902 13.9065 7.26594 13.5475C7.77286 13.1884 8.37873 12.9956 8.99992 12.9956C9.62111 12.9956 10.227 13.1884 10.7339 13.5475C11.2408 13.9065 11.6238 14.4141 11.8299 15.0001" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 13C10.1046 13 11 12.1046 11 11C11 9.89543 10.1046 9 9 9C7.89543 9 7 9.89543 7 11C7 12.1046 7.89543 13 9 13Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 5H4C2.89543 5 2 5.89543 2 7V17C2 18.1046 2.89543 19 4 19H20C21.1046 19 22 18.1046 22 17V7C22 5.89543 21.1046 5 20 5Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',idcardslash:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 10H18" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 14H18" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6.16992 15.0001C6.37606 14.4141 6.75902 13.9065 7.26594 13.5475C7.77286 13.1884 8.37873 12.9956 8.99992 12.9956C9.62111 12.9956 10.227 13.1884 10.7339 13.5475C11.2408 13.9065 11.6238 14.4141 11.8299 15.0001" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 13C10.1046 13 11 12.1046 11 11C11 9.89543 10.1046 9 9 9C7.89543 9 7 9.89543 7 11C7 12.1046 7.89543 13 9 13Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 5H4C2.89543 5 2 5.89543 2 7V17C2 18.1046 2.89543 19 4 19H20C21.1046 19 22 18.1046 22 17V7C22 5.89543 21.1046 5 20 5Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M2 2L22 22" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',key:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.586 17.4139C2.2109 17.7889 2.00011 18.2975 2 18.8279V20.9999C2 21.2651 2.10536 21.5195 2.29289 21.707C2.48043 21.8946 2.73478 21.9999 3 21.9999H6C6.26522 21.9999 6.51957 21.8946 6.70711 21.707C6.89464 21.5195 7 21.2651 7 20.9999V19.9999C7 19.7347 7.10536 19.4803 7.29289 19.2928C7.48043 19.1053 7.73478 18.9999 8 18.9999H9C9.26522 18.9999 9.51957 18.8946 9.70711 18.707C9.89464 18.5195 10 18.2651 10 17.9999V16.9999C10 16.7347 10.1054 16.4803 10.2929 16.2928C10.4804 16.1053 10.7348 15.9999 11 15.9999H11.172C11.7024 15.9998 12.211 15.789 12.586 15.4139L13.4 14.5999C14.7898 15.0841 16.3028 15.0822 17.6915 14.5947C19.0801 14.1071 20.2622 13.1628 21.0444 11.916C21.8265 10.6693 22.1624 9.19409 21.9971 7.73165C21.8318 6.26922 21.1751 4.90617 20.1344 3.86549C19.0937 2.8248 17.7307 2.1681 16.2683 2.00281C14.8058 1.83751 13.3306 2.17341 12.0839 2.95556C10.8372 3.7377 9.89279 4.91979 9.40525 6.30844C8.91771 7.69708 8.91585 9.21008 9.4 10.5999L2.586 17.4139Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16.5 8C16.7761 8 17 7.77614 17 7.5C17 7.22386 16.7761 7 16.5 7C16.2239 7 16 7.22386 16 7.5C16 7.77614 16.2239 8 16.5 8Z" fill="black" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',keyslash:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.586 17.4139C2.2109 17.7889 2.00011 18.2975 2 18.8279V20.9999C2 21.2651 2.10536 21.5195 2.29289 21.707C2.48043 21.8946 2.73478 21.9999 3 21.9999H6C6.26522 21.9999 6.51957 21.8946 6.70711 21.707C6.89464 21.5195 7 21.2651 7 20.9999V19.9999C7 19.7347 7.10536 19.4803 7.29289 19.2928C7.48043 19.1053 7.73478 18.9999 8 18.9999H9C9.26522 18.9999 9.51957 18.8946 9.70711 18.707C9.89464 18.5195 10 18.2651 10 17.9999V16.9999C10 16.7347 10.1054 16.4803 10.2929 16.2928C10.4804 16.1053 10.7348 15.9999 11 15.9999H11.172C11.7024 15.9998 12.211 15.789 12.586 15.4139L13.4 14.5999C14.7898 15.0841 16.3028 15.0822 17.6915 14.5947C19.0801 14.1071 20.2622 13.1628 21.0444 11.916C21.8265 10.6693 22.1624 9.19409 21.9971 7.73165C21.8318 6.26922 21.1751 4.90617 20.1344 3.86549C19.0937 2.8248 17.7307 2.1681 16.2683 2.00281C14.8058 1.83751 13.3306 2.17341 12.0839 2.95556C10.8372 3.7377 9.89279 4.91979 9.40525 6.30844C8.91771 7.69708 8.91585 9.21008 9.4 10.5999L2.586 17.4139Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M16.5 8C16.7761 8 17 7.77614 17 7.5C17 7.22386 16.7761 7 16.5 7C16.2239 7 16 7.22386 16 7.5C16 7.77614 16.2239 8 16.5 8Z" fill="black" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',pin:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 17V22" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 10.76C8.9998 11.1321 8.89581 11.4967 8.69972 11.813C8.50363 12.1292 8.22321 12.3844 7.89 12.55L6.11 13.45C5.77679 13.6156 5.49637 13.8708 5.30028 14.187C5.10419 14.5033 5.0002 14.8679 5 15.24V16C5 16.2652 5.10536 16.5196 5.29289 16.7071C5.48043 16.8946 5.73478 17 6 17H18C18.2652 17 18.5196 16.8946 18.7071 16.7071C18.8946 16.5196 19 16.2652 19 16V15.24C18.9998 14.8679 18.8958 14.5033 18.6997 14.187C18.5036 13.8708 18.2232 13.6156 17.89 13.45L16.11 12.55C15.7768 12.3844 15.4964 12.1292 15.3003 11.813C15.1042 11.4967 15.0002 11.1321 15 10.76V7C15 6.73478 15.1054 6.48043 15.2929 6.29289C15.4804 6.10536 15.7348 6 16 6C16.5304 6 17.0391 5.78929 17.4142 5.41421C17.7893 5.03914 18 4.53043 18 4C18 3.46957 17.7893 2.96086 17.4142 2.58579C17.0391 2.21071 16.5304 2 16 2H8C7.46957 2 6.96086 2.21071 6.58579 2.58579C6.21071 2.96086 6 3.46957 6 4C6 4.53043 6.21071 5.03914 6.58579 5.41421C6.96086 5.78929 7.46957 6 8 6C8.26522 6 8.51957 6.10536 8.70711 6.29289C8.89464 6.48043 9 6.73478 9 7V10.76Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',pinslash:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 17V22" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M15.0006 9.34V7C15.0006 6.73478 15.106 6.48043 15.2935 6.29289C15.4811 6.10536 15.7354 6 16.0006 6C16.5311 6 17.0398 5.78929 17.4148 5.41421C17.7899 5.03914 18.0006 4.53043 18.0006 4C18.0006 3.46957 17.7899 2.96086 17.4148 2.58579C17.0398 2.21071 16.5311 2 16.0006 2H7.89062" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M2 2L22 22" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 9V10.76C8.9998 11.1321 8.89581 11.4967 8.69972 11.813C8.50363 12.1292 8.22321 12.3844 7.89 12.55L6.11 13.45C5.77679 13.6156 5.49637 13.8708 5.30028 14.187C5.10419 14.5033 5.0002 14.8679 5 15.24V16C5 16.2652 5.10536 16.5196 5.29289 16.7071C5.48043 16.8946 5.73478 17 6 17H17" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'};var D=e("verdocs_envelope_sidebar",function(){function e(e){i(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.toggle=t(this,"toggle",7);this.another=t(this,"another",7);this.envelopeListenerId=null;this.endpoint=r.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false;this.showRecipientDialog="";this.showCancelDialog=false;this.remindersEnabled=false;this.updatingReminders=false;this.initialReminder=null;this.followupReminders=null;this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t;return __generator(this,(function(n){try{this.endpoint.loadSession();if(!this.envelopeId){console.log("[SIDEBAR] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return[2]}this.listenToEnvelope()}catch(n){console.log("[SIDEBAR] Error loading envelope",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(t=n.response)===null||t===void 0?void 0:t.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();g.subscribe("envelopes",this.envelopeId,(function(){return a(e.endpoint,e.envelopeId)}),false,(function(i){var t,n;e.envelope=i;e.loading=false;e.sortEnvelopeRecipients();e.initialReminder=(t=e.envelope)===null||t===void 0?void 0:t.initial_reminder;e.followupReminders=(n=e.envelope)===null||n===void 0?void 0:n.followup_reminders;e.remindersEnabled=!!e.initialReminder}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){g.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.sortEnvelopeRecipients=function(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.setTab=function(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen;(i=this.toggle)===null||i===void 0?void 0:i.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){var i;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes((i=this.envelope)===null||i===void 0?void 0:i.status)};e.prototype.handleRecipientAction=function(e,i){var t;console.log("[SIDEBAR] Recipient action",i,e);switch(i){case"reminder":l(this.endpoint,this.envelopeId,e.role_name).then((function(){f("Reminder Sent",{style:"success"})})).catch((function(e){console.log("[SIDEBAR] Error resending invitation",e);f("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":f("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":f("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:i})};e.prototype.handleCancelEnvelope=function(){var e=this;this.loading=true;d(this.endpoint,this.envelopeId).then((function(i){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){console.log("[SIDEBAR] Envelope canceled",i);f("Envelope canceled",{style:"success"});t=JSON.parse(JSON.stringify(this.envelope));t.status="canceled";g.updateEnvelope(this.envelopeId,t);this.loading=false;this.panelOpen=false;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:t,event:"canceled"});return[2]}))}))})).catch((function(i){console.log("[SIDEBAR] Error canceling envelope",i);e.loading=false;f("Error canceling envelope: "+i.message,{style:"error"})}))};e.prototype.prepareHistoryEntries=function(){var e=this;var i,t,n,s,o,r;var a=[];var l=((i=this.envelope)===null||i===void 0?void 0:i.history_entries)||[];a.push({icon:"pencil",message:"Envelope created.",date:new Date((t=this.envelope)===null||t===void 0?void 0:t.created_at)});if(((n=this.envelope)===null||n===void 0?void 0:n.status)==="complete"){a.push({icon:"pencil",message:"Envelope completed.",date:new Date((s=this.envelope)===null||s===void 0?void 0:s.updated_at)})}var d=l.some((function(e){return e.event==="owner:canceled"}));if(((o=this.envelope)===null||o===void 0?void 0:o.status)==="canceled"&&!d){a.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((r=this.envelope)===null||r===void 0?void 0:r.canceled_at)})}l.forEach((function(i){var t;var n=(((t=e.envelope)===null||t===void 0?void 0:t.recipients)||[]).find((function(e){return e.role_name===i.role_name}));var s=c(n);switch(i.event.toLowerCase()){case"recipient:kba_verified":a.push({icon:"key",message:"KBA verification completed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:kba_failed":a.push({icon:"keyslash",message:"KBA verification failed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:id_verified":a.push({icon:"idcard",message:"ID verification completed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:id_failed":a.push({icon:"idcardslash",message:"ID verification failed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:pin_verified":a.push({icon:"pin",message:"PIN verification completed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:pin_failed":a.push({icon:"pinslash",message:"PIN verification failed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:signed":a.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:declined":a.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":a.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(i.created_at)});break;case"sms":a.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(i.created_at)});break;case"in_person_link":a.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(i.created_at)});break;case"in_app":a.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(i.created_at)});break;default:a.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":a.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(i.created_at)});break;default:a.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(i.created_at)});break}break;case"recipient:prepared":a.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:claimed":if(i.event_detail==="guest"){a.push({icon:"account_circle",message:"".concat(s," claimed the Envelope as a guest."),date:new Date(i.created_at)})}else if(i.event_detail==="profile"){a.push({icon:"verified_user",message:"".concat(s," claimed the Envelope as a verified user."),date:new Date(i.created_at)})}break;case"recipient:agreed":a.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(i.created_at)});break;case"recipient:invited":if(i.event_detail==="sms"){a.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(i.created_at)})}else{a.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(i.created_at)})}break;case"recipient:reminder":if(i.event_detail==="sms"){a.push({icon:"textsms",message:"".concat(s," sent a reminder via SMS."),date:new Date(i.created_at)})}else{a.push({icon:"mail",message:"".concat(s," sent a reminder via email."),date:new Date(i.created_at)})}break;case"invitation:resent":a.push({icon:"mail",message:"Invitation was resent to ".concat(s).concat(i.event_detail==="reminder"?" by reminder":"","."),date:new Date(i.created_at)});break;case"envelope:cc":a.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:delegated":a.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":a.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"owner:updated_recipient_info":a.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":a.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":a.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"envelope:canceled":case"envelope_canceled":case"canceled":case"owner:canceled":a.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":a.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i);break}}));a.sort((function(e,i){return i.date.getTime()-e.date.getTime()}));return a};e.prototype.handleToggleReminders=function(){if(this.remindersEnabled){return this.handleSetReminders(null,null)}else{return this.handleSetReminders(k,3*k)}};e.prototype.handleSetReminders=function(e,i){var t=this;console.log("Updating reminders...");this.updatingReminders=true;v(this.endpoint,this.envelopeId,{initial_reminder:e,followup_reminders:i}).then((function(e){console.log("Updated",e);g.updateEnvelope(t.envelopeId,e);t.initialReminder=e.initial_reminder;t.followupReminders=e.followup_reminders;t.remindersEnabled=!!e.initial_reminder;t.updatingReminders=false})).catch((function(e){var i,n,s;console.log("Error updating envelope",e);t.initialReminder=(i=t.envelope)===null||i===void 0?void 0:i.initial_reminder;t.followupReminders=(n=t.envelope)===null||n===void 0?void 0:n.followup_reminders;t.remindersEnabled=!!((s=t.envelope)===null||s===void 0?void 0:s.initial_reminder);t.updatingReminders=false;alert(e.response.data.error)}))};e.prototype.render=function(){var e=this;var i,t,r,a,l,d,v,f,w,g,m,x;if(this.loading){return n(o,null)}var D=p(this.endpoint.profile,this.envelope);var _=this.prepareHistoryEntries();var H=((i=this.envelope)===null||i===void 0?void 0:i.status)!=="pending"&&((t=this.envelope)===null||t===void 0?void 0:t.status)!=="in progress";return n(o,{class:this.panelOpen?"open":""},n("div",{class:"side-buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:C}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:y}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:z})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},(r=this.envelope)===null||r===void 0?void 0:r.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},b(new Date((a=this.envelope)===null||a===void 0?void 0:a.created_at),u)),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},b(new Date((l=this.envelope)===null||l===void 0?void 0:l.updated_at),u)),n("div",{class:"label"},"Status"),n("div",{class:"value"},h((d=this.envelope)===null||d===void 0?void 0:d.status)),n("div",{class:"label"},"Owner ID"),n("div",{class:"value"},(v=this.envelope)===null||v===void 0?void 0:v.profile_id),n("div",{class:"label"},"Owner Name"),n("div",{class:"value"},c((f=this.envelope)===null||f===void 0?void 0:f.profile)),n("div",{class:"label"},"Owner Email"),n("div",{class:"value"},(g=(w=this.envelope)===null||w===void 0?void 0:w.profile)===null||g===void 0?void 0:g.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),(m=this.envelope)===null||m===void 0?void 0:m.recipients.map((function(i,t){var s;var o=i.status!=="submitted"&&i.status!=="canceled"&&i.status!=="declined";var r=e.canResendRecipient(i);var a=c(i);return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},t+1),n("div",{class:"recipient-name"},i.role_name),n("div",{class:(s={"recipient-status":true},s[i.status]=true,s)},i.status),D&&!H&&n("verdocs-dropdown",{onOptionSelected:function(t){return e.handleRecipientAction(i,t.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!r},{id:"inperson",label:"Get In-Person Link",disabled:!o}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},a),n("div",{class:"recipient-name"},i.email),n("div",{class:"recipient-name"},i.phone)))})),D&&n("div",{class:"reminders"},n("div",{class:"form-row"},n("div",{class:"reminders-label"},"Reminders"),n("verdocs-switch",{disabled:H||this.updatingReminders,checked:this.remindersEnabled,onCheckedChange:function(){return e.handleToggleReminders()}})),this.remindersEnabled&&n(s,null,n("div",{class:"form-row"},"NOTE: Reminders will only be sent for up to 14 days."),n("div",{class:"form-row"},n("div",{class:"form-label"},"Initial Reminder (days):"),n("verdocs-text-input",{placeholder:"In hours...",disabled:H||this.updatingReminders,value:String(Math.floor(this.initialReminder/k)),onBlur:function(i){e.initialReminder=Number(i.target.value)*k;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),n("div",{class:"form-row"},n("div",{class:"form-label"},"Follow-up Reminders:"),n("verdocs-text-input",{placeholder:"In hours...",disabled:H||this.updatingReminders,value:String(Math.floor(this.followupReminders/k)),onBlur:function(i){e.followupReminders=Number(i.target.value)*k;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),n("div",{class:"form-row"},n("div",{class:"form-label"},"Next Reminder:"),n("div",{style:{color:"#dddddd"}},b(new Date((x=this.envelope)===null||x===void 0?void 0:x.next_reminder),"P p"))))),D&&n("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Envelope",onClick:function(){return e.showCancelDialog=!H},disabled:H})),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),_.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:M[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},b(e.date,u))))}))),this.showRecipientDialog&&n("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:function(){return e.showRecipientDialog=""}}),this.showCancelDialog&&n("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:function(){e.showCancelDialog=false;e.handleCancelEnvelope()}}))};return e}());D.style=x}}}));
2
+ //# sourceMappingURL=p-1f2c019d.system.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as s,F as t,H as o,g as l}from"./p-b9654a5e.js";import{VerdocsEndpoint as a,getEnvelope as d,getDocumentDownloadLink as n,cancelEnvelope as r,userCanCancelEnvelope as c,integerSequence as h}from"@verdocs/js-sdk";import{s as p}from"./p-0c45b79c.js";import{S as v}from"./p-fd97809c.js";import{S as x}from"./p-3828cb31.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";const b='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-kba-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-kba-dialog .field label{-ms-flex:0 0 100px;flex:0 0 100px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-kba-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';const u=b;const f=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>`;const g=class{constructor(s){e(this,s);this.exit=i(this,"exit",7);this.pinEntered=i(this,"pinEntered",7);this.next=i(this,"next",7);this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.recipient=null;this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.response="";this.updatedRecipient=null}componentDidLoad(){this.updatedRecipient={...this.recipient||{}}}handleCancel(){this.exit.emit()}handleDismiss(e){if(e.target.class==="background-overlay"){e.preventDefault();this.handleCancel()}}handleDone(){this.next.emit(this.response);this.response=""}handleConfirmID(){this.next.emit(this.updatedRecipient)}render(){var e,i,l,a,d,n,r,c,h,p,v;if(this.mode==="choice"){return s(o,null,s("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},s("div",{class:"dialog"},s("div",{class:"heading"},"Confirm Your Identity",this.steps>1?s("span",{class:"step"},"(",this.step,"/",this.steps,")"):s(t,null)),!!this.helptitle&&s("div",{class:"help-box"},s("div",{class:"help-icon",innerHTML:f}),s("div",{class:"help-details"},s("div",{class:"help-title"},this.helptitle),s("div",{class:"help-text"},this.helptext))),s("div",{class:"choices"},this.choices.map((e=>s("div",{class:`choice ${e===this.response?"selected":""}`,onClick:()=>{console.log("Selected",e);this.response=e}},e)))),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),s("verdocs-button",{label:this.step<this.steps?"Next":"Submit",onClick:()=>this.handleDone(),disabled:!this.response})))))}if(this.mode==="identity"){return s(o,null,s("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},s("div",{class:"dialog"},s("div",{class:"heading"},"Confirm Your Identity"),!!this.helptitle&&s("div",{class:"help-box"},s("div",{class:"help-icon",innerHTML:f}),s("div",{class:"help-details"},s("div",{class:"help-title"},"Identity verification is required"),s("div",{class:"help-text"},"NOTE: Only four fields are required, but providing more details will allow us to complete the verification process more quickly."))),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-first"},"Your Name:",s("span",{class:"required"},"*")),s("input",{required:true,type:"text",id:"verdocs-kba-first",name:"verdocs-kba-first",placeholder:"First name...",value:(e=this.updatedRecipient)===null||e===void 0?void 0:e.first_name,onInput:e=>this.updatedRecipient={...this.updatedRecipient,first_name:e.target.value}}),s("input",{type:"text",id:"verdocs-kba-last",name:"verdocs-kba-last",placeholder:"Last name...",required:true,value:(i=this.updatedRecipient)===null||i===void 0?void 0:i.last_name,onInput:e=>this.updatedRecipient={...this.updatedRecipient,last_name:e.target.value}})),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-address"},"Address:",s("span",{class:"required"},"*")),s("input",{type:"text",id:"verdocs-kba-address",name:"verdocs-kba-address",placeholder:"Address...",value:(l=this.updatedRecipient)===null||l===void 0?void 0:l.address,onInput:e=>this.updatedRecipient={...this.updatedRecipient,address:e.target.value}})),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-city"},"City:"),s("input",{type:"text",id:"verdocs-kba-city",name:"verdocs-kba-city",placeholder:"City...",value:(a=this.updatedRecipient)===null||a===void 0?void 0:a.city,onInput:e=>this.updatedRecipient={...this.updatedRecipient,city:e.target.value}})),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-state"},"State:"),s("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"State...",value:(d=this.updatedRecipient)===null||d===void 0?void 0:d.state,onInput:e=>this.updatedRecipient={...this.updatedRecipient,state:e.target.value}})),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-zip"},"Zip Code:",s("span",{class:"required"},"*")),s("input",{type:"text",id:"verdocs-kba-zip",name:"verdocs-kba-zip",placeholder:"Zip Code...",required:true,value:(n=this.updatedRecipient)===null||n===void 0?void 0:n.zip,onInput:e=>this.updatedRecipient={...this.updatedRecipient,zip:e.target.value}})),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-address"},"SSN Last 4:"),s("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"Last 4 digits of your SSN...",value:(r=this.updatedRecipient)===null||r===void 0?void 0:r.ssn_last_4,onInput:e=>this.updatedRecipient={...this.updatedRecipient,ssn_last_4:e.target.value}})),s("div",{class:"buttons"},s("verdocs-button",{label:"Submit",onClick:()=>this.handleConfirmID(),disabled:!((c=this.updatedRecipient)===null||c===void 0?void 0:c.first_name)||!((h=this.updatedRecipient)===null||h===void 0?void 0:h.last_name)||!((p=this.updatedRecipient)===null||p===void 0?void 0:p.address)||!((v=this.updatedRecipient)===null||v===void 0?void 0:v.zip)})))))}return s(o,null,s("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},s("div",{class:"dialog"},s("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?s("span",{class:"step"},"(",this.step,"/",this.steps,")"):s(t,null)),!!this.helptitle&&s("div",{class:"help-box"},s("div",{class:"help-icon",innerHTML:f}),s("div",{class:"help-details"},s("div",{class:"help-title"},this.helptitle),s("div",{class:"help-text"},this.helptext))),s("div",{class:"input"},s("label",{htmlFor:"verdocs-kba-input"},this.label),s("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:e=>this.response=e.target.value})),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),s("verdocs-button",{label:"Submit",onClick:()=>this.handleDone(),disabled:!this.response})))))}};g.style=u;const m='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';const w=m;const k=class{constructor(s){e(this,s);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.envelopeListenerId=null;this.endpoint=null;this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.showCancelDone=false;this.showLoadError=false;this.loading=true;this.envelope=null}async componentWillLoad(){var e,i,s;if(!this.endpoint){this.endpoint=a.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error(`[VIEW] Missing required envelopeId`);return}this.listenToEnvelope();if(!this.envelope){try{console.log("[VIEW] Loading envelope...");this.envelope=await d(this.endpoint,this.envelopeId);console.log("[VIEW] Loaded envelope",this.envelope)}catch(t){this.showLoadError=true;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new v(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(s=t.response)===null||s===void 0?void 0:s.data))}}}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null;const i=document.getElementById("verdocs-view-header");if(e&&i){console.log("[VIEW] Moving header");i.remove();e.append(i)}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();x.subscribe("envelopes",this.envelopeId,(()=>d(this.endpoint,this.envelopeId)),true,(e=>{this.envelope=e;this.loading=false}))}unlistenToEnvelope(){if(this.envelopeListenerId){x.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}handlePageRendered(e){}async handleOptionSelected(e){var i,s;switch(e.detail.id){case"cancel":if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;r(this.endpoint,this.envelopeId).then((e=>{this.canceling=false;console.log("[VIEW] Envelope canceled",e);return d(this.endpoint,this.envelopeId)})).then((e=>{console.log("[VIEW] Loaded new envelope details",e);this.envelope=e})).catch((e=>{var i,s,t;this.canceling=false;console.log("[VIEW] Error canceling envelope",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new v(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(t=e.response)===null||t===void 0?void 0:t.data))}));this.showCancelDone=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}break;case"print":window.print();(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download-attachments":{const e=this.envelope.documents.find((e=>e.type==="attachment"));if(e){const i=await n(this.endpoint,this.envelopeId,e.id);window.open(i,"_blank")}}break;case"download-certificate":{const e=this.envelope.documents.find((e=>e.type==="certificate"));if(e){const i=await n(this.endpoint,this.envelopeId,e.id);window.open(i,"_blank")}}break;case"download-all":p(this.endpoint,[this.envelope]).then((()=>{var e;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading Zip",e)}));break}}render(){var e;if(this.loading){return s(o,null,s("verdocs-loader",null))}if(this.showLoadError){return s(o,null,s("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:`Sorry, that envelope is not valid.`,buttonLabel:"OK",onNext:()=>{this.showLoadError=false}}))}if(!this.envelope){return s(o,null,s("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"}))}const i=[{id:"print",label:"Print"}];if(c(this.endpoint.profile,this.envelope)){i.push({id:"cancel",label:"Cancel"})}const l=this.envelope.documents.length>0;const a=this.envelope.documents.filter((e=>e.type==="attachment")).length;const d=this.envelope.documents.find((e=>e.type==="certificate"))!==undefined;if(l||d){i.push({label:""});if(l){i.push({id:"download-attachments",label:a>1?"Download Documents":"Download Document"})}if(d){i.push({id:"download-certificate",label:"Download Certificate"})}if(l&&d){i.push({id:"download-all",label:"Download All Files"})}}return s(o,null,s("div",{id:"verdocs-view-header"},s("div",{class:"inner"},s("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),s("div",{class:"title"},this.envelope.name),s("div",{style:{flex:"1"}}),s("div",{style:{marginLeft:"10px"}}),s("verdocs-dropdown",{options:i,onOptionSelected:e=>this.handleOptionSelected(e)}))),s("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((e=this.envelope)===null||e===void 0?void 0:e.documents)||[]).filter((e=>e.type!=="certificate")).map((e=>{const i=h(1,e.pages);return s(t,null,i.map((i=>{var t;const o=((t=e.page_sizes)===null||t===void 0?void 0:t[i])||{width:612,height:792};return s("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,type:"filled",virtualWidth:o.width,virtualHeight:o.height,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&s("verdocs-ok-dialog",{heading:"Cancelled",message:`This envelope has been cancelled successfully.`,onNext:()=>{this.showCancelDone=false}}),this.canceling&&s("div",{class:"loading-indicator"},s("verdocs-loader",null)))}get component(){return l(this)}};k.style=w;export{g as verdocs_kba_dialog,k as verdocs_view};
2
- //# sourceMappingURL=p-fc29a754.entry.js.map
1
+ import{r as e,c as i,h as s,F as t,H as o,g as l}from"./p-b9654a5e.js";import{VerdocsEndpoint as a,getEnvelope as d,getDocumentDownloadLink as n,cancelEnvelope as r,userCanCancelEnvelope as c,integerSequence as h}from"@verdocs/js-sdk";import{s as p}from"./p-0c45b79c.js";import{S as v}from"./p-fd97809c.js";import{S as x}from"./p-d4be87ef.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";const b='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-kba-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-kba-dialog .field label{-ms-flex:0 0 100px;flex:0 0 100px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-kba-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';const u=b;const f=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>`;const g=class{constructor(s){e(this,s);this.exit=i(this,"exit",7);this.pinEntered=i(this,"pinEntered",7);this.next=i(this,"next",7);this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.recipient=null;this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.response="";this.updatedRecipient=null}componentDidLoad(){this.updatedRecipient={...this.recipient||{}}}handleCancel(){this.exit.emit()}handleDismiss(e){if(e.target.class==="background-overlay"){e.preventDefault();this.handleCancel()}}handleDone(){this.next.emit(this.response);this.response=""}handleConfirmID(){this.next.emit(this.updatedRecipient)}render(){var e,i,l,a,d,n,r,c,h,p,v;if(this.mode==="choice"){return s(o,null,s("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},s("div",{class:"dialog"},s("div",{class:"heading"},"Confirm Your Identity",this.steps>1?s("span",{class:"step"},"(",this.step,"/",this.steps,")"):s(t,null)),!!this.helptitle&&s("div",{class:"help-box"},s("div",{class:"help-icon",innerHTML:f}),s("div",{class:"help-details"},s("div",{class:"help-title"},this.helptitle),s("div",{class:"help-text"},this.helptext))),s("div",{class:"choices"},this.choices.map((e=>s("div",{class:`choice ${e===this.response?"selected":""}`,onClick:()=>{console.log("Selected",e);this.response=e}},e)))),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),s("verdocs-button",{label:this.step<this.steps?"Next":"Submit",onClick:()=>this.handleDone(),disabled:!this.response})))))}if(this.mode==="identity"){return s(o,null,s("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},s("div",{class:"dialog"},s("div",{class:"heading"},"Confirm Your Identity"),!!this.helptitle&&s("div",{class:"help-box"},s("div",{class:"help-icon",innerHTML:f}),s("div",{class:"help-details"},s("div",{class:"help-title"},"Identity verification is required"),s("div",{class:"help-text"},"NOTE: Only four fields are required, but providing more details will allow us to complete the verification process more quickly."))),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-first"},"Your Name:",s("span",{class:"required"},"*")),s("input",{required:true,type:"text",id:"verdocs-kba-first",name:"verdocs-kba-first",placeholder:"First name...",value:(e=this.updatedRecipient)===null||e===void 0?void 0:e.first_name,onInput:e=>this.updatedRecipient={...this.updatedRecipient,first_name:e.target.value}}),s("input",{type:"text",id:"verdocs-kba-last",name:"verdocs-kba-last",placeholder:"Last name...",required:true,value:(i=this.updatedRecipient)===null||i===void 0?void 0:i.last_name,onInput:e=>this.updatedRecipient={...this.updatedRecipient,last_name:e.target.value}})),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-address"},"Address:",s("span",{class:"required"},"*")),s("input",{type:"text",id:"verdocs-kba-address",name:"verdocs-kba-address",placeholder:"Address...",value:(l=this.updatedRecipient)===null||l===void 0?void 0:l.address,onInput:e=>this.updatedRecipient={...this.updatedRecipient,address:e.target.value}})),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-city"},"City:"),s("input",{type:"text",id:"verdocs-kba-city",name:"verdocs-kba-city",placeholder:"City...",value:(a=this.updatedRecipient)===null||a===void 0?void 0:a.city,onInput:e=>this.updatedRecipient={...this.updatedRecipient,city:e.target.value}})),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-state"},"State:"),s("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"State...",value:(d=this.updatedRecipient)===null||d===void 0?void 0:d.state,onInput:e=>this.updatedRecipient={...this.updatedRecipient,state:e.target.value}})),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-zip"},"Zip Code:",s("span",{class:"required"},"*")),s("input",{type:"text",id:"verdocs-kba-zip",name:"verdocs-kba-zip",placeholder:"Zip Code...",required:true,value:(n=this.updatedRecipient)===null||n===void 0?void 0:n.zip,onInput:e=>this.updatedRecipient={...this.updatedRecipient,zip:e.target.value}})),s("div",{class:"field"},s("label",{htmlFor:"verdocs-kba-address"},"SSN Last 4:"),s("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"Last 4 digits of your SSN...",value:(r=this.updatedRecipient)===null||r===void 0?void 0:r.ssn_last_4,onInput:e=>this.updatedRecipient={...this.updatedRecipient,ssn_last_4:e.target.value}})),s("div",{class:"buttons"},s("verdocs-button",{label:"Submit",onClick:()=>this.handleConfirmID(),disabled:!((c=this.updatedRecipient)===null||c===void 0?void 0:c.first_name)||!((h=this.updatedRecipient)===null||h===void 0?void 0:h.last_name)||!((p=this.updatedRecipient)===null||p===void 0?void 0:p.address)||!((v=this.updatedRecipient)===null||v===void 0?void 0:v.zip)})))))}return s(o,null,s("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},s("div",{class:"dialog"},s("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?s("span",{class:"step"},"(",this.step,"/",this.steps,")"):s(t,null)),!!this.helptitle&&s("div",{class:"help-box"},s("div",{class:"help-icon",innerHTML:f}),s("div",{class:"help-details"},s("div",{class:"help-title"},this.helptitle),s("div",{class:"help-text"},this.helptext))),s("div",{class:"input"},s("label",{htmlFor:"verdocs-kba-input"},this.label),s("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:e=>this.response=e.target.value})),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),s("verdocs-button",{label:"Submit",onClick:()=>this.handleDone(),disabled:!this.response})))))}};g.style=u;const m='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';const w=m;const k=class{constructor(s){e(this,s);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.envelopeListenerId=null;this.endpoint=null;this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.showCancelDone=false;this.showLoadError=false;this.loading=true;this.envelope=null}async componentWillLoad(){var e,i,s;if(!this.endpoint){this.endpoint=a.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error(`[VIEW] Missing required envelopeId`);return}this.listenToEnvelope();if(!this.envelope){try{console.log("[VIEW] Loading envelope...");this.envelope=await d(this.endpoint,this.envelopeId);console.log("[VIEW] Loaded envelope",this.envelope)}catch(t){this.showLoadError=true;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new v(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(s=t.response)===null||s===void 0?void 0:s.data))}}}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null;const i=document.getElementById("verdocs-view-header");if(e&&i){console.log("[VIEW] Moving header");i.remove();e.append(i)}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();x.subscribe("envelopes",this.envelopeId,(()=>d(this.endpoint,this.envelopeId)),true,(e=>{this.envelope=e;this.loading=false}))}unlistenToEnvelope(){if(this.envelopeListenerId){x.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}handlePageRendered(e){}async handleOptionSelected(e){var i,s;switch(e.detail.id){case"cancel":if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;r(this.endpoint,this.envelopeId).then((e=>{this.canceling=false;console.log("[VIEW] Envelope canceled",e);return d(this.endpoint,this.envelopeId)})).then((e=>{console.log("[VIEW] Loaded new envelope details",e);this.envelope=e})).catch((e=>{var i,s,t;this.canceling=false;console.log("[VIEW] Error canceling envelope",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new v(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(t=e.response)===null||t===void 0?void 0:t.data))}));this.showCancelDone=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}break;case"print":window.print();(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download-attachments":{const e=this.envelope.documents.find((e=>e.type==="attachment"));if(e){const i=await n(this.endpoint,this.envelopeId,e.id);window.open(i,"_blank")}}break;case"download-certificate":{const e=this.envelope.documents.find((e=>e.type==="certificate"));if(e){const i=await n(this.endpoint,this.envelopeId,e.id);window.open(i,"_blank")}}break;case"download-all":p(this.endpoint,[this.envelope]).then((()=>{var e;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading Zip",e)}));break}}render(){var e;if(this.loading){return s(o,null,s("verdocs-loader",null))}if(this.showLoadError){return s(o,null,s("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:`Sorry, that envelope is not valid.`,buttonLabel:"OK",onNext:()=>{this.showLoadError=false}}))}if(!this.envelope){return s(o,null,s("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"}))}const i=[{id:"print",label:"Print"}];if(c(this.endpoint.profile,this.envelope)){i.push({id:"cancel",label:"Cancel"})}const l=this.envelope.documents.length>0;const a=this.envelope.documents.filter((e=>e.type==="attachment")).length;const d=this.envelope.documents.find((e=>e.type==="certificate"))!==undefined;if(l||d){i.push({label:""});if(l){i.push({id:"download-attachments",label:a>1?"Download Documents":"Download Document"})}if(d){i.push({id:"download-certificate",label:"Download Certificate"})}if(l&&d){i.push({id:"download-all",label:"Download All Files"})}}return s(o,null,s("div",{id:"verdocs-view-header"},s("div",{class:"inner"},s("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),s("div",{class:"title"},this.envelope.name),s("div",{style:{flex:"1"}}),s("div",{style:{marginLeft:"10px"}}),s("verdocs-dropdown",{options:i,onOptionSelected:e=>this.handleOptionSelected(e)}))),s("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((e=this.envelope)===null||e===void 0?void 0:e.documents)||[]).filter((e=>e.type!=="certificate")).map((e=>{const i=h(1,e.pages);return s(t,null,i.map((i=>{var t;const o=((t=e.page_sizes)===null||t===void 0?void 0:t[i])||{width:612,height:792};return s("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,type:"filled",virtualWidth:o.width,virtualHeight:o.height,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&s("verdocs-ok-dialog",{heading:"Cancelled",message:`This envelope has been cancelled successfully.`,onNext:()=>{this.showCancelDone=false}}),this.canceling&&s("div",{class:"loading-indicator"},s("verdocs-loader",null)))}get component(){return l(this)}};k.style=w;export{g as verdocs_kba_dialog,k as verdocs_view};
2
+ //# sourceMappingURL=p-25aa3bd3.entry.js.map
@@ -0,0 +1,2 @@
1
+ var __awaiter=this&&this.__awaiter||function(n,r,t,u){function e(n){return n instanceof t?n:new t((function(r){r(n)}))}return new(t||(t=Promise))((function(t,i){function a(n){try{f(u.next(n))}catch(n){i(n)}}function o(n){try{f(u["throw"](n))}catch(n){i(n)}}function f(n){n.done?t(n.value):e(n.value).then(a,o)}f((u=u.apply(n,r||[])).next())}))};var __generator=this&&this.__generator||function(n,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},u,e,i,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(n){return function(r){return f([n,r])}}function f(o){if(u)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(t=0)),t)try{if(u=1,e&&(i=o[0]&2?e["return"]:o[0]?e["throw"]||((i=e["return"])&&i.call(e),0):e.next)&&!(i=i.call(e,o[1])).done)return i;if(e=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;e=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1];i=o;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(o);break}if(i[2])t.ops.pop();t.trys.pop();continue}o=r.call(n,t)}catch(n){o=[6,n];e=0}finally{u=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(n,r,t){if(t||arguments.length===2)for(var u=0,e=r.length,i;u<e;u++){if(i||!(u in r)){if(!i)i=Array.prototype.slice.call(r,0,u);i[u]=r[u]}}return n.concat(i||Array.prototype.slice.call(r))};System.register(["@verdocs/js-sdk"],(function(n){"use strict";var r;return{setters:[function(n){r=n.getTemplate}],execute:function(){var t=function(n){return typeof n};var u="";var e=t(u);var i=t(true);var a=t(0);var o=t(t);var f="type";var v="default";var c="Listener";var l="add";var s="Has";var d="Ids";var _="Table";var h=_+"s";var p=_+d;var y="Row";var b=y+"Count";var g=y+d;var w="Cell";var T=w+d;var S="Value";var m=S+"s";var A=S+d;var C=function(n){return u+n};var V=isFinite;var R=function(n,r){return n instanceof r};var I=function(n){return n==undefined};var J=function(n,r,t){return I(n)?t===null||t===void 0?void 0:t():r(n)};var E=function(n){return n==e||n==i};var L=function(n){return t(n)==o};var O=function(n){return Array.isArray(n)};var j=function(n,r,t){return n.slice(r,t)};var k=function(n){return n.length};var x=function(n,r){return n.test(r)};var N=function(n,r){return n.includes(r)};var F=function(n,r){return n.every(r)};var M=function(n,r){return k(n)===k(r)&&F(n,(function(n,t){return r[t]===n}))};var P=function(n,r){return n.sort(r)};var D=function(n,r){return n.forEach(r)};var z=function(n,r){return n.map(r)};var G=function(n,r,t){return n.reduce(r,t)};var H=function(n){var r=[];for(var t=1;t<arguments.length;t++){r[t-1]=arguments[t]}return n.push.apply(n,r)};var W=function(n){return n.shift()};var $=Object;var q=function(n){return $.getPrototypeOf(n)};var B=$.entries;var K=$.isFrozen;var Q=function(n){return!I(n)&&J(q(n),(function(n){return n==$.prototype||I(q(n))}),(function(){return true}))};var U=$.keys;var X=$.freeze;var Y=function(n){if(n===void 0){n=[]}return $.fromEntries(n)};var Z=function(n,r){return r in n};var nn=function(n,r){delete n[r];return n};var rn=function(n,r){return D(B(n),(function(n){var t=n[0],u=n[1];return r(u,t)}))};var tn=function(n,r){return z(B(n),(function(n){var t=n[0],u=n[1];return r(u,t)}))};var un=function(n,r){return Y(tn(n,(function(n,t){return[t,r(n,t)]})))};var en=function(n){return k(U(n))};var an=function(n){return Q(n)&&en(n)==0};var on=function(n,r,t,u){if(u===void 0){u=0}if(I(n)||!Q(n)||!u&&an(n)||K(n)){t===null||t===void 0?void 0:t();return false}rn(n,(function(t,u){if(!r(t,u)){nn(n,u)}}));return u?true:!an(n)};var fn=function(n){return function(r){return G(hn(r),(function(r,t){return r+n(t)}),0)}};var vn=function(n){var r;return(r=n===null||n===void 0?void 0:n.size)!==null&&r!==void 0?r:0};var cn=fn(vn);var ln=fn(cn);var sn=fn(ln);var dn=function(n,r){var t;return(t=n===null||n===void 0?void 0:n.has(r))!==null&&t!==void 0?t:false};var _n=function(n){return I(n)||vn(n)==0};var hn=function(n){var r;return __spreadArray([],(r=n===null||n===void 0?void 0:n.values())!==null&&r!==void 0?r:[],true)};var pn=function(n){return n.clear()};var yn=function(n,r){return n===null||n===void 0?void 0:n.forEach(r)};var bn=function(n,r){return n===null||n===void 0?void 0:n.delete(r)};var gn=function(n){return new Map(n)};var wn=function(n){var r;return __spreadArray([],(r=n===null||n===void 0?void 0:n.keys())!==null&&r!==void 0?r:[],true)};var Tn=function(n,r){return n===null||n===void 0?void 0:n.get(r)};var Sn=function(n,r){return yn(n,(function(n,t){return r(t,n)}))};var mn=function(n,r){var t;return z(__spreadArray([],(t=n===null||n===void 0?void 0:n.entries())!==null&&t!==void 0?t:[],true),(function(n){var t=n[0],u=n[1];return r(u,t)}))};var An=function(n,r,t){return I(t)?(bn(n,r),n):n===null||n===void 0?void 0:n.set(r,t)};var Cn=function(n,r,t,u){if(!dn(n,r)){An(n,r,t())}else{u===null||u===void 0?void 0:u(Tn(n,r))}return Tn(n,r)};var Vn=function(n,r,t,u){if(u===void 0){u=An}un(r,(function(r,u){return t(n,u,r)}));Sn(n,(function(t){return Z(r,t)?0:u(n,t)}));return n};var Rn=function(n,r,t,u){var e={};yn(n,(function(n,i){if(!(t===null||t===void 0?void 0:t(n,i))){var a=r?r(n,i):n;if(!(u===null||u===void 0?void 0:u(a))){e[i]=a}}}));return e};var In=function(n,r,t){return Rn(n,(function(n){return Rn(n,r,t)}),_n,an)};var Jn=function(n,r,t){return Rn(n,(function(n){return In(n,r,t)}),_n,an)};var En=function(n,r){var t=gn();yn(n,(function(n,u){var e;return t.set(u,(e=r===null||r===void 0?void 0:r(n))!==null&&e!==void 0?e:n)}));return t};var Ln=function(n){return En(n,En)};var On=function(n){return En(n,Ln)};var jn=function(n,r,t,u,e){if(e===void 0){e=0}return J((t?Cn:Tn)(n,r[e],e>k(r)-2?t:gn),(function(i){if(e>k(r)-2){if(u===null||u===void 0?void 0:u(i)){An(n,r[e])}return i}var a=jn(i,r,t,u,e+1);if(_n(i)){An(n,r[e])}return a}))};var kn=function(n){var r=t(n);return E(r)||r==a&&V(n)?r:undefined};var xn=function(n,r,t,u,e){return I(e)?n.delCell(r,t,u,true):n.setCell(r,t,u,e)};var Nn=function(n,r,t){return I(t)?n.delValue(r):n.setValue(r,t)};var Fn=function(n){return new Set(O(n)||I(n)?n:[n])};var Mn=function(n,r){return n===null||n===void 0?void 0:n.add(r)};var Pn=/^\d+$/;var Dn=function(){var n=[];var r=0;return[function(t){var e;return(e=t?W(n):null)!==null&&e!==void 0?e:u+r++},function(r){if(x(Pn,r)&&k(n)<1e3){H(n,r)}}]};var zn=function(n,r){if(r===void 0){r=[u]}var t=[];var e=function(n,u){return u==k(r)?H(t,n):r[u]===null?yn(n,(function(n){return e(n,u+1)})):D([r[u],null],(function(r){return e(Tn(n,r),u+1)}))};e(n,0);return t};var Gn=function(n){var r;var t=Dn(),e=t[0],i=t[1];var a=gn();var o=function(t,i,o,f,v){if(f===void 0){f=[]}if(v===void 0){v=function(){return[]}}r!==null&&r!==void 0?r:r=n();var c=e(1);An(a,c,[t,i,o,f,v]);Mn(jn(i,o!==null&&o!==void 0?o:[u],Fn),c);return c};var f=function(n,t){var u=[];for(var e=2;e<arguments.length;e++){u[e-2]=arguments[e]}return D(zn(n,t),(function(n){return yn(n,(function(n){var e;return(e=Tn(a,n))[0].apply(e,__spreadArray(__spreadArray([r],t!==null&&t!==void 0?t:[],false),u,false))}))}))};var v=function(n){return J(Tn(a,n),(function(r){var t=r[1],e=r[2];jn(t,e!==null&&e!==void 0?e:[u],undefined,(function(r){bn(r,n);return _n(r)?1:0}));An(a,n);i(n);return e}))};var c=function(n){return J(Tn(a,n),(function(n){var t=n[0],u=n[2],e=u===void 0?[]:u,i=n[3],a=n[4];var o=function(){var n,u;var f=[];for(var v=0;v<arguments.length;v++){f[v]=arguments[v]}var c=k(f);if(c==k(e)){t.apply(void 0,__spreadArray(__spreadArray([r],f,false),a(f),false))}else if(I(e[c])){D((u=(n=i[c])===null||n===void 0?void 0:n.call.apply(n,__spreadArray([i],f,false)))!==null&&u!==void 0?u:[],(function(n){return o.apply(void 0,__spreadArray(__spreadArray([],f,false),[n],false))}))}else{o.apply(void 0,__spreadArray(__spreadArray([],f,false),[e[c]],false))}};o()}))};return[o,f,v,c]};var Hn=function(n,r){return(n!==null&&n!==void 0?n:0)<(r!==null&&r!==void 0?r:0)?-1:1};var Wn=function(n){return[n,n]};var $n=function(n,r){if(r===void 0){r=cn}return r(n[0])+r(n[1])};var qn=function(){return[gn(),gn()]};var Bn=function(n){return __spreadArray([],n,true)};var Kn=function(n){var r=n[0],t=n[1];return r===t};var Qn=JSON.stringify;var Un=JSON.parse;var Xn=function(n){return Qn(n,(function(n,r){return R(r,Map)?$.fromEntries(__spreadArray([],r,true)):r}))};var Yn=function(n,r,t){return An(n,r,Tn(n,r)==-t?undefined:t)};var Zn=function(){var n;var r;var t;var u=false;var e=false;var i=0;var o=[];var d=gn();var V=gn();var R=gn();var k=gn();var x=gn();var F=gn();var G=gn();var W=gn();var $=gn();var q=gn();var B=gn();var K=gn();var Q=gn();var U=gn();var Y=Fn();var rn=gn();var tn=gn();var en=gn();var fn=gn();var hn=qn();var jn=qn();var Pn=qn();var zn=qn();var Qn=qn();var nr=qn();var rr=qn();var tr=qn();var ur=qn();var er=qn();var ir=qn();var ar=qn();var or=qn();var fr=qn();var vr=qn();var cr=qn();var lr=qn();var sr=qn();var dr=qn();var _r=qn();var hr=qn();var pr=qn();var yr=gn();var br=qn();var gr=Gn((function(){return ju})),wr=gr[0],Tr=gr[1],Sr=gr[2],mr=gr[3];var Ar=function(n){return on(n,(function(n){return on(n,Vr)}))};var Cr=function(n){return on(n,Vr)};var Vr=function(n){if(!on(n,(function(n,r){return N([f,v],r)}))){return false}var r=n[f];if(!E(r)&&r!=a){return false}if(kn(n[v])!=r){nn(n,v)}return true};var Rr=O;var Ir=function(n){return on(n,Jr,at)};var Jr=function(n,t){return(!r||dn(B,t)||at(t))&&on(n,(function(n,r){return Er(t,r,n)}),(function(){return at(t)}))};var Er=function(n,r,t,u){return on(u?t:kr(t,n,r),(function(u,e){return J(Lr(n,r,e,u),(function(n){t[e]=n;return true}),(function(){return false}))}),(function(){return at(n,r)}))};var Lr=function(n,t,u,e){return r?J(Tn(Tn(B,n),u),(function(r){return kn(e)!=r[f]?at(n,t,u,e,r[v]):e}),(function(){return at(n,t,u,e)})):I(kn(e))?at(n,t,u,e):e};var Or=function(n,r){return on(r?n:xr(n),(function(r,t){return J(jr(t,r),(function(r){n[t]=r;return true}),(function(){return false}))}),(function(){return ot()}))};var jr=function(n,r){return t?J(Tn(Q,n),(function(t){return kn(r)!=t[f]?ot(n,r,t[v]):r}),(function(){return ot(n,r)})):I(kn(r))?ot(n,r):r};var kr=function(n,r,t){J(Tn(K,r),(function(u){var e=u[0],i=u[1];yn(e,(function(r,t){if(!Z(n,t)){n[t]=r}}));yn(i,(function(u){if(!Z(n,u)){at(r,t,u)}}))}));return n};var xr=function(n){if(t){yn(U,(function(r,t){if(!Z(n,t)){n[t]=r}}));yn(Y,(function(r){if(!Z(n,r)){ot(r)}}))}return n};var Nr=function(n){return Vn(B,n,(function(n,r,t){var u=gn();var e=Fn();Vn(Cn(B,r,gn),t,(function(n,r,t){An(n,r,t);J(t[v],(function(n){return An(u,r,n)}),(function(){return Mn(e,r)}))}));An(K,r,[u,e])}),(function(n,r){An(B,r);An(K,r)}))};var Fr=function(n){return Vn(Q,n,(function(n,r,t){An(Q,r,t);J(t[v],(function(n){return An(U,r,n)}),(function(){return Mn(Y,r)}))}),(function(n,r){An(Q,r);An(U,r);bn(Y,r)}))};var Mr=function(n){return an(n)?au():Wt(n)};var Pr=function(n){var r=n[0],t=n[1];(an(r)?au:Wt)(r);(an(t)?cu:Ut)(t)};var Dr=function(n){return Vn(en,n,(function(n,r,t){return zr(r,t)}),(function(n,r){return Ur(r)}))};var zr=function(n,r){return Vn(Cn(en,n,(function(){nt(n,1);An(rn,n,Dn());An(tn,n,gn());return gn()})),r,(function(r,t,u){return Gr(n,r,t,u)}),(function(r,t){return Xr(n,r,t)}))};var Gr=function(n,r,t,u,e){return Vn(Cn(r,t,(function(){rt(n,t,1);return gn()})),u,(function(r,u,e){return Hr(n,t,r,u,e)}),(function(u,i){return Yr(n,r,t,u,i,e)}))};var Hr=function(n,r,t,u,e){if(!dn(t,u)){tt(n,r,u,1)}var i=Tn(t,u);if(e!==i){ut(n,r,u,i,e);An(t,u,e)}};var Wr=function(n,r,t,u,e){return J(Tn(r,t),(function(r){return Hr(n,t,r,u,e)}),(function(){var i;return Gr(n,r,t,kr((i={},i[u]=e,i),n,t))}))};var $r=function(n){return an(n)?cu():Ut(n)};var qr=function(n){return Vn(fn,n,(function(n,r,t){return Br(r,t)}),(function(n,r){return Zr(r)}))};var Br=function(n,r){if(!dn(fn,n)){et(n,1)}var t=Tn(fn,n);if(r!==t){it(n,t,r);An(fn,n,r)}};var Kr=function(n,r){var t=Tn(rn,n)[0];var u;do{u=t(r)}while(dn(Tn(en,n),u));return u};var Qr=function(n){var r;return(r=Tn(en,n))!==null&&r!==void 0?r:zr(n,{})};var Ur=function(n){return zr(n,{})};var Xr=function(n,r,t){var u=Tn(rn,n),e=u[1];e(t);Gr(n,r,t,{},true)};var Yr=function(n,r,t,u,e,i){var a;var o=Tn((a=Tn(K,n))===null||a===void 0?void 0:a[0],e);if(!I(o)&&!i){return Hr(n,t,u,e,o)}var f=function(r){ut(n,t,r,Tn(u,r));tt(n,t,r,-1);An(u,r)};if(I(o)){f(e)}else{Sn(u,f)}if(_n(u)){rt(n,t,-1);if(_n(An(r,t))){nt(n,-1);An(en,n);An(rn,n);An(tn,n)}}};var Zr=function(n){var r=Tn(U,n);if(!I(r)){return Br(n,r)}it(n,Tn(fn,n));et(n,-1);An(fn,n)};var nt=function(n,r){return Yn(d,n,r)};var rt=function(n,r,t){return Yn(Cn(k,n,gn),r,t)&&An(R,n,Cn(R,n,(function(){return 0}))+t)};var tt=function(n,r,t,u){var e;var i=Tn(tn,n);var a=(e=Tn(i,t))!==null&&e!==void 0?e:0;if(a==0&&u==1||a==1&&u==-1){Yn(Cn(V,n,gn),t,u)}An(i,t,a!=-u?a+u:null);Yn(Cn(Cn(x,n,gn),r,gn),t,u)};var ut=function(n,r,t,u,e){var i;Cn(Cn(Cn(F,n,gn),r,gn),t,(function(){return[u,0]}))[1]=e;(i=o[3])===null||i===void 0?void 0:i.call(o,n,r,t,e)};var et=function(n,r){return Yn(G,n,r)};var it=function(n,r,t){var u;Cn(W,n,(function(){return[r,0]}))[1]=t;(u=o[4])===null||u===void 0?void 0:u.call(o,n,t)};var at=function(n,r,t,u,e){H(Cn(Cn(Cn($,n,gn),r,gn),t,(function(){return[]})),u);return e};var ot=function(n,r,t){H(Cn(q,n,(function(){return[]})),r);return t};var ft=function(n,r,t){return J(Tn(Tn(Tn(F,n),r),t),(function(n){var r=n[0],t=n[1];return[true,r,t]}),(function(){return __spreadArray([false],Wn(Vt(n,r,t)),true)}))};var vt=function(n){return J(Tn(W,n),(function(n){var r=n[0],t=n[1];return[true,r,t]}),(function(){return __spreadArray([false],Wn(Jt(n)),true)}))};var ct=function(n){return!_n($)&&!_n(cr[n])?yn(n?On($):$,(function(r,t){return yn(r,(function(r,u){return yn(r,(function(r,e){return Tr(cr[n],[t,u,e],r)}))}))})):0};var lt=function(n){return!_n(q)&&!_n(lr[n])?yn(n?En(q):q,(function(r,t){return Tr(lr[n],[t],r)})):0};var st=function(n,r,t,u){if(!_n(n)){Tr(r,u,(function(){return Rn(n)}));Sn(n,(function(n,r){return Tr(t,__spreadArray(__spreadArray([],u!==null&&u!==void 0?u:[],true),[n],false),r==1)}));return 1}};var dt=function(n){var r=Et();if(r!=u){Tr(hn[n],undefined,r)}var t=_n(er[n]);var e=_n(or[n])&&_n(fr[n])&&_n(ur[n])&&_n(ir[n])&&_n(nr[n])&&_n(rr[n])&&_n(tr[n])&&t&&_n(Pn[n])&&_n(zn[n]);var i=_n(vr[n])&&_n(ar[n])&&_n(Qn[n])&&_n(jn[n]);if(!e||!i){var a=n?[En(d),Ln(V),En(R),Ln(k),On(x),On(F)]:[d,V,R,k,x,F];if(!e){st(a[0],Pn[n],zn[n]);yn(a[1],(function(r,t){return st(r,nr[n],rr[n],[t])}));yn(a[2],(function(r,t){if(r!=0){Tr(tr[n],[t],Tt(t))}}));var o=Fn();yn(a[3],(function(r,u){if(st(r,ur[n],ir[n],[u])&&!t){Tr(er[n],[u,null]);Mn(o,u)}}));if(!t){yn(a[5],(function(r,t){if(!dn(o,t)){var u=Fn();yn(r,(function(n){return yn(n,(function(r,t){var e=r[0],i=r[1];return i!==e?Mn(u,t):bn(n,t)}))}));yn(u,(function(r){return Tr(er[n],[t,r])}))}}))}yn(a[4],(function(r,t){return yn(r,(function(r,u){return st(r,or[n],fr[n],[t,u])}))}))}if(!i){var f;yn(a[5],(function(r,t){var u;yn(r,(function(r,e){var i;yn(r,(function(r,a){var o=r[0],v=r[1];if(v!==o){Tr(vr[n],[t,e,a],v,o,ft);f=u=i=1}}));if(i){Tr(ar[n],[t,e],ft)}}));if(u){Tr(Qn[n],[t],ft)}}));if(f){Tr(jn[n],undefined,ft)}}}};var _t=function(n){var r=xt();if(r!=e){Tr(sr[n],undefined,r)}var t=_n(_r[n])&&_n(hr[n]);var u=_n(pr[n])&&_n(dr[n]);if(!t||!u){var i=n?[En(G),En(W)]:[G,W];if(!t){st(i[0],_r[n],hr[n])}if(!u){var a;yn(i[1],(function(r,t){var u=r[0],e=r[1];if(e!==u){Tr(pr[n],[t],e,u,vt);a=1}}));if(a){Tr(dr[n],undefined,vt)}}}};var ht=function(n){var r=[];for(var t=1;t<arguments.length;t++){r[t-1]=arguments[t]}hu((function(){return n.apply(void 0,z(r,C))}));return ju};var pt=function(){return[yt(),Rt()]};var yt=function(){return Jn(en)};var bt=function(){return wn(en)};var gt=function(n){return In(Tn(en,C(n)))};var wt=function(n){return wn(Tn(tn,C(n)))};var Tt=function(n){return vn(Tn(en,C(n)))};var St=function(n){return wn(Tn(en,C(n)))};var mt=function(n,r,t,u,e){if(u===void 0){u=0}return z(j(P(mn(Tn(en,C(n)),(function(n,t){return[I(r)?t:Tn(n,C(r)),t]})),(function(n,r){var u=n[0];var e=r[0];return Hn(u,e)*(t?-1:1)})),u,I(e)?e:u+e),(function(n){var r=n[1];return r}))};var At=function(n,r){return Rn(Tn(Tn(en,C(n)),C(r)))};var Ct=function(n,r){return wn(Tn(Tn(en,C(n)),C(r)))};var Vt=function(n,r,t){return Tn(Tn(Tn(en,C(n)),C(r)),C(t))};var Rt=function(){return Rn(fn)};var It=function(){return wn(fn)};var Jt=function(n){return Tn(fn,C(n))};var Et=function(){return!_n(en)};var Lt=function(n){return dn(en,C(n))};var Ot=function(n,r){return dn(Tn(tn,C(n)),C(r))};var jt=function(n,r){return dn(Tn(en,C(n)),C(r))};var kt=function(n,r,t){return dn(Tn(Tn(en,C(n)),C(r)),C(t))};var xt=function(){return!_n(fn)};var Nt=function(n){return dn(fn,C(n))};var Ft=function(){return Xn(en)};var Mt=function(){return Xn(fn)};var Pt=function(){return Xn([en,fn])};var Dt=function(){return Xn(B)};var zt=function(){return Xn(Q)};var Gt=function(){return Xn([B,Q])};var Ht=function(n){return ht((function(){var r=L(n)?n():n;if(Rr(r)){Pr(r)}}))};var Wt=function(n){return ht((function(){return Ir(n)?Dr(n):0}))};var $t=function(n,r){return ht((function(n){return Jr(r,n)?zr(n,r):0}),n)};var qt=function(n,r,t){return ht((function(n,r){return Er(n,r,t)?Gr(n,Qr(n),r,t):0}),n,r)};var Bt=function(n,r,t){if(t===void 0){t=true}return hu((function(){var u=undefined;if(Er(n,u,r)){n=C(n);Gr(n,Qr(n),u=Kr(n,t?1:0),r)}return u}))};var Kt=function(n,r,t){return ht((function(n,r){if(Er(n,r,t,1)){var u=Qr(n);un(t,(function(t,e){return Wr(n,u,r,e,t)}))}}),n,r)};var Qt=function(n,r,t,u){return ht((function(n,r,t){return J(Lr(n,r,t,L(u)?u(Vt(n,r,t)):u),(function(u){return Wr(n,Qr(n),r,t,u)}))}),n,r,t)};var Ut=function(n){return ht((function(){return Or(n)?qr(n):0}))};var Xt=function(n){return ht((function(){return Or(n,1)?un(n,(function(n,r){return Br(r,n)})):0}))};var Yt=function(n,r){return ht((function(n){return J(jr(n,L(r)?r(Jt(n)):r),(function(r){return Br(n,r)}))}),n)};var Zt=function(n){return ht((function(){un(n[0],(function(n,r){return I(n)?ou(r):un(n,(function(n,t){return I(n)?fu(r,t):un(n,(function(n,u){return xn(ju,r,t,u,n)}))}))}));un(n[1],(function(n,r){return Nn(ju,r,n)}))}))};var nu=function(n){try{Mr(Un(n))}catch(n){}return ju};var ru=function(n){try{$r(Un(n))}catch(n){}return ju};var tu=function(n){return ht((function(){try{var r=Un(n),t=r[0],u=r[1];Mr(t);$r(u)}catch(r){nu(n)}}))};var uu=function(n){return ht((function(){if(r=Ar(n)){Nr(n);if(!_n(en)){var t=yt();au();Wt(t)}}}))};var eu=function(n){return ht((function(){if(t=Cr(n)){var r=Rt();du();cu();t=true;Fr(n);Ut(r)}}))};var iu=function(n,r){return ht((function(){uu(n);eu(r)}))};var au=function(){return ht((function(){return Dr({})}))};var ou=function(n){return ht((function(n){return dn(en,n)?Ur(n):0}),n)};var fu=function(n,r){return ht((function(n,r){return J(Tn(en,n),(function(t){return dn(t,r)?Xr(n,t,r):0}))}),n,r)};var vu=function(n,r,t,u){return ht((function(n,r,t){return J(Tn(en,n),(function(e){return J(Tn(e,r),(function(i){return dn(i,t)?Yr(n,e,r,i,t,u):0}))}))}),n,r,t)};var cu=function(){return ht((function(){return qr({})}))};var lu=function(n){return ht((function(n){return dn(fn,n)?Zr(n):0}),n)};var su=function(){return ht((function(){Nr({});r=false}))};var du=function(){return ht((function(){Fr({});t=false}))};var _u=function(){return ht((function(){su();du()}))};var hu=function(n,r){if(i!=-1){pu();var t=n();gu(r);return t}};var pu=function(){var n;if(i!=-1){i++}if(i==1){(n=o[0])===null||n===void 0?void 0:n.call(o);Tr(yr)}return ju};var yu=function(){return[Rn(F,(function(n,r){return Tn(d,r)===-1?undefined:Rn(n,(function(n,t){return Tn(Tn(k,r),t)===-1?undefined:Rn(n,(function(n){var r=n[1];return r}),(function(n){return Kn(n)}))}),_n,an)}),_n,an),Rn(W,(function(n){var r=n[1];return r}),(function(n){return Kn(n)})),1]};var bu=function(){return[!_n(F),!_n(W),Jn(F,Bn,Kn),Jn($),Rn(W,Bn,Kn),Rn(q),Rn(d),In(k),Jn(x),Rn(G)]};var gu=function(n){var r,t;if(i>0){i--;if(i==0){i=1;ct(1);if(!_n(F)){dt(1)}lt(1);if(!_n(W)){_t(1)}if(n===null||n===void 0?void 0:n(ju)){yn(F,(function(n,r){return yn(n,(function(n,t){return yn(n,(function(n,u){var e=n[0];return xn(ju,r,t,u,e)}))}))}));pn(F);yn(W,(function(n,r){var t=n[0];return Nn(ju,r,t)}));pn(W)}Tr(br[0],undefined);i=-1;ct(0);if(!_n(F)){dt(0)}lt(0);if(!_n(W)){_t(0)}(r=o[1])===null||r===void 0?void 0:r.call(o);Tr(br[1],undefined);(t=o[2])===null||t===void 0?void 0:t.call(o);i=0;u=Et();e=xt();D([d,V,R,k,x,F,$,G,W,q],pn)}}return ju};var wu=function(n){return yn(en,(function(r,t){return n(t,(function(n){return yn(r,(function(r,t){return n(t,(function(n){return Sn(r,n)}))}))}))}))};var Tu=function(n,r){return Sn(Tn(tn,C(n)),r)};var Su=function(n,r){return yn(Tn(en,C(n)),(function(n,t){return r(t,(function(r){return Sn(n,r)}))}))};var mu=function(n,r,t){return Sn(Tn(Tn(en,C(n)),C(r)),t)};var Au=function(n){return Sn(fn,n)};var Cu=function(n,r,t,u,e,i,a){var o=mt(n,r,t,u,e);return wr((function(){var a=mt(n,r,t,u,e);if(!M(a,o)){o=a;i(ju,n,r,t,u,e,o)}}),er[a?1:0],[n,r],[bt])};var Vu=function(n){return wr(n,yr)};var Ru=function(n){return wr(n,br[0])};var Iu=function(n){return wr(n,br[1])};var Ju=function(n){mr(n);return ju};var Eu=function(n){Sr(n);return ju};var Lu=function(){return{hasTables:$n(hn),tables:$n(jn),tableIds:$n(Pn),hasTable:$n(zn),table:$n(Qn),tableCellIds:$n(nr),hasTableCell:$n(rr,ln),rowCount:$n(tr),rowIds:$n(ur),sortedRowIds:$n(er),hasRow:$n(ir,ln),row:$n(ar,ln),cellIds:$n(or,ln),hasCell:$n(fr,sn),cell:$n(vr,sn),invalidCell:$n(cr,sn),hasValues:$n(sr),values:$n(dr),valueIds:$n(_r),hasValue:$n(hr),value:$n(pr),invalidValue:$n(lr),transaction:cn(yr)+$n(br)}};var Ou=function(n,r,t,u,e){return o=[n,r,t,u,e]};var ju={getContent:pt,getTables:yt,getTableIds:bt,getTable:gt,getTableCellIds:wt,getRowCount:Tt,getRowIds:St,getSortedRowIds:mt,getRow:At,getCellIds:Ct,getCell:Vt,getValues:Rt,getValueIds:It,getValue:Jt,hasTables:Et,hasTable:Lt,hasTableCell:Ot,hasRow:jt,hasCell:kt,hasValues:xt,hasValue:Nt,getTablesJson:Ft,getValuesJson:Mt,getJson:Pt,getTablesSchemaJson:Dt,getValuesSchemaJson:zt,getSchemaJson:Gt,hasTablesSchema:function(){return r},hasValuesSchema:function(){return t},setContent:Ht,setTables:Wt,setTable:$t,setRow:qt,addRow:Bt,setPartialRow:Kt,setCell:Qt,setValues:Ut,setPartialValues:Xt,setValue:Yt,applyChanges:Zt,setTablesJson:nu,setValuesJson:ru,setJson:tu,setTablesSchema:uu,setValuesSchema:eu,setSchema:iu,delTables:au,delTable:ou,delRow:fu,delCell:vu,delValues:cu,delValue:lu,delTablesSchema:su,delValuesSchema:du,delSchema:_u,transaction:hu,startTransaction:pu,getTransactionChanges:yu,getTransactionLog:bu,finishTransaction:gu,forEachTable:wu,forEachTableCell:Tu,forEachRow:Su,forEachCell:mu,forEachValue:Au,addSortedRowIdsListener:Cu,addStartTransactionListener:Vu,addWillFinishTransactionListener:Ru,addDidFinishTransactionListener:Iu,callListener:Ju,delListener:Eu,getListenerStats:Lu,isMergeable:function(){return false},createStore:Zn,addListener:wr,callListeners:Tr,setInternalListeners:Ou};un((n={},n[s+h]=[0,hn,[],function(){return[Et()]}],n[h]=[0,jn],n[p]=[0,Pn],n[s+_]=[1,zn,[bt],function(n){return[Lt.apply(void 0,n)]}],n[_]=[1,Qn,[bt]],n[_+T]=[1,nr,[bt]],n[s+_+w]=[2,rr,[bt,wt],function(n){return[Ot.apply(void 0,n)]}],n[b]=[1,tr,[bt]],n[g]=[1,ur,[bt]],n[s+y]=[2,ir,[bt,St],function(n){return[jt.apply(void 0,n)]}],n[y]=[2,ar,[bt,St]],n[T]=[2,or,[bt,St]],n[s+w]=[3,fr,[bt,St,Ct],function(n){return[kt.apply(void 0,n)]}],n[w]=[3,vr,[bt,St,Ct],function(n){return Wn(Vt.apply(void 0,n))}],n.InvalidCell=[3,cr],n[s+m]=[0,sr,[],function(){return[xt()]}],n[m]=[0,dr],n[A]=[0,_r],n[s+S]=[1,hr,[It],function(n){return[Nt.apply(void 0,n)]}],n[S]=[1,pr,[It],function(n){return Wn(Jt(n[0]))}],n.InvalidValue=[1,lr],n),(function(n,r){var t=n[0],u=n[1],e=n[2],i=n[3];ju[l+r+c]=function(){var n=[];for(var r=0;r<arguments.length;r++){n[r]=arguments[r]}return wr(n[t],u[n[t+1]?1:0],t>0?j(n,0,t):undefined,e,i)}}));return X(ju)};var nr=Zn();nr.delTables();nr.delValues();console.log("[STORE] Data store initialized.");var rr=function(n,r){try{return JSON.parse(n)}catch(n){return r||null}};var tr=function(n){var r={};for(var t in n){if(typeof n[t]==="string"||typeof n[t]==="number"||typeof n[t]==="boolean"){r[t]=n[t]}else if(n[t]===null){r["__null__".concat(t)]=""}else if(Array.isArray(n[t])){r["__array__".concat(t)]=JSON.stringify(n[t])}else if(typeof n[t]==="object"){r["__object__".concat(t)]=JSON.stringify(n[t])}}return r};var ur=function(n){var r={};for(var t in n){if(t.startsWith("__null__")){r[t.replace("__null__","")]=null}else if(typeof n[t]==="string"&&t.startsWith("__array__")){r[t.replace("__array__","")]=rr(n[t])}else if(typeof n[t]==="string"&&t.startsWith("__object__")){r[t.replace("__object__","")]=rr(n[t])}else{r[t]=n[t]}}return r};var er=n("S",{store:nr,subscribe:function(n,r,t,u,e){if(nr.hasRow(n,r)){e(ur(nr.getRow(n,r)))}var i=nr.addRowListener(n,r,(function(){var t=nr.getRow(n,r);e(ur(t))}));if(!nr.hasRow(n,r)||u){console.log("[STORE] Loading/reloading",{tableId:n,rowId:r});t().then((function(t){nr.setRow(n,r,tr(t))})).catch((function(t){console.error("[STORE] Error getting row",{tableId:n,rowId:r,forceReload:u},t)}))}return i},unsubscribe:function(n){nr.delListener(n)},getTemplate:function(n,t){return __awaiter(this,arguments,void 0,(function(n,t,u){var e,i;if(u===void 0){u=false}return __generator(this,(function(a){switch(a.label){case 0:if(!u){if(!nr.hasRow("templates",t)){return[2,null]}e=nr.getRow("templates",t);return[2,ur(e)]}return[4,r(n,t)];case 1:i=a.sent();console.log("[STORE] Reloading template",i);nr.setRow("templates",t,tr(i));return[2,i]}}))}))},updateTemplate:function(n,r){nr.setRow("templates",n,tr(r));return r},getEnvelope:function(n,t){return __awaiter(this,arguments,void 0,(function(n,t,u){var e,i;if(u===void 0){u=false}return __generator(this,(function(a){switch(a.label){case 0:if(!u){if(!nr.hasRow("envelopes",t)){return[2,null]}e=nr.getRow("envelopes",t);return[2,ur(e)]}return[4,r(n,t)];case 1:i=a.sent();nr.setRow("envelopes",t,tr(i));return[2,i]}}))}))},updateEnvelope:function(n,r){nr.setRow("envelopes",n,tr(r));return r},getField:function(n,r,t,u){if(n==="template"){var e=nr.getRow("templates",r);var i=ur(e);var a=(i.fields||[]).find((function(n){return n.name===t}));var o=(i.roles||[]).map((function(n){return n.name}));var f=o.findIndex((function(n){return n===a.role_name}));return{index:Math.max(f,0),field:u||a}}else{var e=nr.getRow("envelopes",r);var v=ur(e);var c=(v.fields||[]).find((function(n){return n.name===t}));var o=(v.recipients||[]).map((function(n){return n.role_name}));var f=o.findIndex((function(n){return n===c.role_name}));return{index:f,field:u||c}}}})}}}));
2
+ //# sourceMappingURL=p-52c3e8b0.system.js.map