@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 i,h as s,F as t,H as n}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getEnvelope as a,resendInvitation as l,cancelEnvelope as r,formatFullName as d,updateEnvelope as c,userIsEnvelopeOwner as v,capitalize as h}from"@verdocs/js-sdk";import{F as p}from"./p-c7ee88c7.js";import{V as w}from"./p-04c07b7b.js";import{S as g}from"./p-fd97809c.js";import{S as m}from"./p-3828cb31.js";import{f as b}from"./p-12bab948.js";const f='@-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}';const x=f;const u=24*60*60*1e3;const k=`<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>`;const 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="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>`;const 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="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>`;const z={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>`};const M=class{constructor(s){e(this,s);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.toggle=i(this,"toggle",7);this.another=i(this,"another",7);this.envelopeListenerId=null;this.endpoint=o.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}async componentWillLoad(){var e,i,s;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[SIDEBAR] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(t){console.log("[SIDEBAR] Error loading envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new g(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(s=t.response)===null||s===void 0?void 0:s.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();m.subscribe("envelopes",this.envelopeId,(()=>a(this.endpoint,this.envelopeId)),false,(e=>{var i,s;this.envelope=e;this.loading=false;this.sortEnvelopeRecipients();this.initialReminder=(i=this.envelope)===null||i===void 0?void 0:i.initial_reminder;this.followupReminders=(s=this.envelope)===null||s===void 0?void 0:s.followup_reminders;this.remindersEnabled=!!this.initialReminder}))}unlistenToEnvelope(){if(this.envelopeListenerId){m.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}sortEnvelopeRecipients(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}setTab(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}canResendRecipient(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)}handleRecipientAction(e,i){var s;console.log("[SIDEBAR] Recipient action",i,e);switch(i){case"reminder":l(this.endpoint,this.envelopeId,e.role_name).then((()=>{w("Reminder Sent",{style:"success"})})).catch((e=>{console.log("[SIDEBAR] Error resending invitation",e);w("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":w("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":w("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:i})}handleCancelEnvelope(){this.loading=true;r(this.endpoint,this.envelopeId).then((async e=>{var i;console.log("[SIDEBAR] Envelope canceled",e);w("Envelope canceled",{style:"success"});const s=JSON.parse(JSON.stringify(this.envelope));s.status="canceled";m.updateEnvelope(this.envelopeId,s);this.loading=false;this.panelOpen=false;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:s,event:"canceled"})})).catch((e=>{console.log("[SIDEBAR] Error canceling envelope",e);this.loading=false;w("Error canceling envelope: "+e.message,{style:"error"})}))}prepareHistoryEntries(){var e,i,s,t,n,o;const a=[];const l=((e=this.envelope)===null||e===void 0?void 0:e.history_entries)||[];a.push({icon:"pencil",message:"Envelope created.",date:new Date((i=this.envelope)===null||i===void 0?void 0:i.created_at)});if(((s=this.envelope)===null||s===void 0?void 0:s.status)==="complete"){a.push({icon:"pencil",message:"Envelope completed.",date:new Date((t=this.envelope)===null||t===void 0?void 0:t.updated_at)})}const r=l.some((e=>e.event==="owner:canceled"));if(((n=this.envelope)===null||n===void 0?void 0:n.status)==="canceled"&&!r){a.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((o=this.envelope)===null||o===void 0?void 0:o.canceled_at)})}l.forEach((e=>{var i;const s=(((i=this.envelope)===null||i===void 0?void 0:i.recipients)||[]).find((i=>i.role_name===e.role_name));const t=d(s);switch(e.event.toLowerCase()){case"recipient:kba_verified":a.push({icon:"key",message:`KBA verification completed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:kba_failed":a.push({icon:"keyslash",message:`KBA verification failed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:id_verified":a.push({icon:"idcard",message:`ID verification completed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:id_failed":a.push({icon:"idcardslash",message:`ID verification failed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:pin_verified":a.push({icon:"pin",message:`PIN verification completed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:pin_failed":a.push({icon:"pinslash",message:`PIN verification failed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:signed":a.push({icon:"gesture",message:`Signed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:declined":a.push({icon:"clear",message:`Declined by ${t}.`,date:new Date(e.created_at)});break;case"recipient:opened":switch(e.event_detail){case"email":case"mail":a.push({icon:"visibility",message:`Opened by ${t}, via email.`,date:new Date(e.created_at)});break;case"sms":a.push({icon:"visibility",message:`Opened by ${t}, via SMS.`,date:new Date(e.created_at)});break;case"in_person_link":a.push({icon:"visibility",message:`Opened by ${t}, via In-person link.`,date:new Date(e.created_at)});break;case"in_app":a.push({icon:"visibility",message:`Opened by ${t}, via dashboard.`,date:new Date(e.created_at)});break;default:a.push({icon:"visibility",message:`Opened by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:submitted":switch(e.event_detail){case"approver":a.push({icon:"check_circle",message:`Approved by ${t}.`,date:new Date(e.created_at)});break;default:a.push({icon:"send",message:`Submitted by ${t}.`,date:new Date(e.created_at)});break}break;case"recipient:prepared":a.push({icon:"send",message:`Prepared by ${t}.`,date:new Date(e.created_at)});break;case"recipient:claimed":if(e.event_detail==="guest"){a.push({icon:"account_circle",message:`${t} claimed the Envelope as a guest.`,date:new Date(e.created_at)})}else if(e.event_detail==="profile"){a.push({icon:"verified_user",message:`${t} claimed the Envelope as a verified user.`,date:new Date(e.created_at)})}break;case"recipient:agreed":a.push({icon:"done",message:`${t} agreed to use electronic records and signatures.`,date:new Date(e.created_at)});break;case"recipient:invited":if(e.event_detail==="sms"){a.push({icon:"textsms",message:`${t} has been invited via SMS.`,date:new Date(e.created_at)})}else{a.push({icon:"mail",message:`${t} has been invited via email.`,date:new Date(e.created_at)})}break;case"recipient:reminder":if(e.event_detail==="sms"){a.push({icon:"textsms",message:`${t} sent a reminder via SMS.`,date:new Date(e.created_at)})}else{a.push({icon:"mail",message:`${t} sent a reminder via email.`,date:new Date(e.created_at)})}break;case"invitation:resent":a.push({icon:"mail",message:`Invitation was resent to ${t}${e.event_detail==="reminder"?" by reminder":""}.`,date:new Date(e.created_at)});break;case"envelope:cc":a.push({icon:"contact_mail",message:`A copy has been sent to ${t}.`,date:new Date(e.created_at)});break;case"recipient:delegated":a.push({icon:"people",message:e.event_detail,date:new Date(e.created_at)});break;case"recipient:updated_info":a.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"owner:updated_recipient_info":a.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"created":a.push({icon:"create",message:`Envelope was created.`,date:new Date(e.created_at)});break;case"completed":a.push({icon:"done_all",message:`Envelope was completed.`,date:new Date(e.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(e.created_at)});break;case"owner:get_in_person_link":a.push({icon:"link",message:`Owner accessed the In-person link for ${s}.`,date:new Date(e.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",e);break}}));a.sort(((e,i)=>i.date.getTime()-e.date.getTime()));return a}handleToggleReminders(){if(this.remindersEnabled){return this.handleSetReminders(null,null)}else{return this.handleSetReminders(u,3*u)}}handleSetReminders(e,i){console.log("Updating reminders...");this.updatingReminders=true;c(this.endpoint,this.envelopeId,{initial_reminder:e,followup_reminders:i}).then((e=>{console.log("Updated",e);m.updateEnvelope(this.envelopeId,e);this.initialReminder=e.initial_reminder;this.followupReminders=e.followup_reminders;this.remindersEnabled=!!e.initial_reminder;this.updatingReminders=false})).catch((e=>{var i,s,t;console.log("Error updating envelope",e);this.initialReminder=(i=this.envelope)===null||i===void 0?void 0:i.initial_reminder;this.followupReminders=(s=this.envelope)===null||s===void 0?void 0:s.followup_reminders;this.remindersEnabled=!!((t=this.envelope)===null||t===void 0?void 0:t.initial_reminder);this.updatingReminders=false;alert(e.response.data.error)}))}render(){var e,i,o,a,l,r,c,w,g,m,f,x;if(this.loading){return s(n,null)}const M=v(this.endpoint.profile,this.envelope);const D=this.prepareHistoryEntries();const H=((e=this.envelope)===null||e===void 0?void 0:e.status)!=="pending"&&((i=this.envelope)===null||i===void 0?void 0:i.status)!=="in progress";return s(n,{class:this.panelOpen?"open":""},s("div",{class:"side-buttons"},s("button",{class:this.activeTab===1?"active":"",onClick:()=>this.setTab(1),innerHTML:k}),s("button",{class:this.activeTab===2?"active":"",onClick:()=>this.setTab(2),innerHTML:C}),s("button",{class:this.activeTab===3?"active":"",onClick:()=>this.setTab(3),innerHTML:y})),this.activeTab===1&&s("div",{class:"content"},s("div",{class:"title"},"Details"),s("div",{class:"label"},"Envelope ID"),s("div",{class:"value"},(o=this.envelope)===null||o===void 0?void 0:o.id),s("div",{class:"label"},"Date Created"),s("div",{class:"value"},b(new Date((a=this.envelope)===null||a===void 0?void 0:a.created_at),p)),s("div",{class:"label"},"Last Modified"),s("div",{class:"value"},b(new Date((l=this.envelope)===null||l===void 0?void 0:l.updated_at),p)),s("div",{class:"label"},"Status"),s("div",{class:"value"},h((r=this.envelope)===null||r===void 0?void 0:r.status)),s("div",{class:"label"},"Owner ID"),s("div",{class:"value"},(c=this.envelope)===null||c===void 0?void 0:c.profile_id),s("div",{class:"label"},"Owner Name"),s("div",{class:"value"},d((w=this.envelope)===null||w===void 0?void 0:w.profile)),s("div",{class:"label"},"Owner Email"),s("div",{class:"value"},(m=(g=this.envelope)===null||g===void 0?void 0:g.profile)===null||m===void 0?void 0:m.email)),this.activeTab===2&&s("div",{class:"content"},s("div",{class:"title"},"Recipients"),(f=this.envelope)===null||f===void 0?void 0:f.recipients.map(((e,i)=>{const t=e.status!=="submitted"&&e.status!=="canceled"&&e.status!=="declined";const n=this.canResendRecipient(e);const o=d(e);return s("div",{class:"recipient-detail"},s("div",{class:"recipient-header"},s("div",{class:"recipient-number"},i+1),s("div",{class:"recipient-name"},e.role_name),s("div",{class:{"recipient-status":true,[e.status]:true}},e.status),M&&!H&&s("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!n},{id:"inperson",label:"Get In-Person Link",disabled:!t}]})),s("dic",{class:"recipient-content"},s("div",{class:"recipient-name"},o),s("div",{class:"recipient-name"},e.email),s("div",{class:"recipient-name"},e.phone)))})),M&&s("div",{class:"reminders"},s("div",{class:"form-row"},s("div",{class:"reminders-label"},"Reminders"),s("verdocs-switch",{disabled:H||this.updatingReminders,checked:this.remindersEnabled,onCheckedChange:()=>this.handleToggleReminders()})),this.remindersEnabled&&s(t,null,s("div",{class:"form-row"},"NOTE: Reminders will only be sent for up to 14 days."),s("div",{class:"form-row"},s("div",{class:"form-label"},"Initial Reminder (days):"),s("verdocs-text-input",{placeholder:"In hours...",disabled:H||this.updatingReminders,value:String(Math.floor(this.initialReminder/u)),onBlur:e=>{this.initialReminder=Number(e.target.value)*u;this.handleSetReminders(this.initialReminder,this.followupReminders)}})),s("div",{class:"form-row"},s("div",{class:"form-label"},"Follow-up Reminders:"),s("verdocs-text-input",{placeholder:"In hours...",disabled:H||this.updatingReminders,value:String(Math.floor(this.followupReminders/u)),onBlur:e=>{this.followupReminders=Number(e.target.value)*u;this.handleSetReminders(this.initialReminder,this.followupReminders)}})),s("div",{class:"form-row"},s("div",{class:"form-label"},"Next Reminder:"),s("div",{style:{color:"#dddddd"}},b(new Date((x=this.envelope)===null||x===void 0?void 0:x.next_reminder),"P p"))))),M&&s("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Envelope",onClick:()=>this.showCancelDialog=!H,disabled:H})),this.activeTab===3&&s("div",{class:"content"},s("div",{class:"title"},"History"),D.map((e=>s("div",{class:"history-entry"},s("div",{class:"activity-icon",innerHTML:z[e.icon]||e.icon}),s("div",{class:"activity-details"},s("div",{class:"activity-text"},e.message),s("div",{class:"activity-date"},b(e.date,p))))))),this.showRecipientDialog&&s("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:()=>this.showRecipientDialog=""}),this.showCancelDialog&&s("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:()=>{this.showCancelDialog=false;this.handleCancelEnvelope()}}))}};M.style=x;export{M as verdocs_envelope_sidebar};
2
- //# sourceMappingURL=p-75e53ae1.entry.js.map
1
+ import{r as e,c as i,h as s,F as t,H as n}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getEnvelope as a,resendInvitation as l,cancelEnvelope as r,formatFullName as d,updateEnvelope as c,userIsEnvelopeOwner as v,capitalize as h}from"@verdocs/js-sdk";import{F as p}from"./p-c7ee88c7.js";import{V as w}from"./p-04c07b7b.js";import{S as g}from"./p-fd97809c.js";import{S as m}from"./p-d4be87ef.js";import{f as b}from"./p-12bab948.js";const f='@-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}';const x=f;const u=24*60*60*1e3;const k=`<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>`;const 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="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>`;const 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="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>`;const z={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>`};const M=class{constructor(s){e(this,s);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.toggle=i(this,"toggle",7);this.another=i(this,"another",7);this.envelopeListenerId=null;this.endpoint=o.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}async componentWillLoad(){var e,i,s;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[SIDEBAR] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(t){console.log("[SIDEBAR] Error loading envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new g(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(s=t.response)===null||s===void 0?void 0:s.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();m.subscribe("envelopes",this.envelopeId,(()=>a(this.endpoint,this.envelopeId)),false,(e=>{var i,s;this.envelope=e;this.loading=false;this.sortEnvelopeRecipients();this.initialReminder=(i=this.envelope)===null||i===void 0?void 0:i.initial_reminder;this.followupReminders=(s=this.envelope)===null||s===void 0?void 0:s.followup_reminders;this.remindersEnabled=!!this.initialReminder}))}unlistenToEnvelope(){if(this.envelopeListenerId){m.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}sortEnvelopeRecipients(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}setTab(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}canResendRecipient(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)}handleRecipientAction(e,i){var s;console.log("[SIDEBAR] Recipient action",i,e);switch(i){case"reminder":l(this.endpoint,this.envelopeId,e.role_name).then((()=>{w("Reminder Sent",{style:"success"})})).catch((e=>{console.log("[SIDEBAR] Error resending invitation",e);w("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":w("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":w("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:i})}handleCancelEnvelope(){this.loading=true;r(this.endpoint,this.envelopeId).then((async e=>{var i;console.log("[SIDEBAR] Envelope canceled",e);w("Envelope canceled",{style:"success"});const s=JSON.parse(JSON.stringify(this.envelope));s.status="canceled";m.updateEnvelope(this.envelopeId,s);this.loading=false;this.panelOpen=false;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:s,event:"canceled"})})).catch((e=>{console.log("[SIDEBAR] Error canceling envelope",e);this.loading=false;w("Error canceling envelope: "+e.message,{style:"error"})}))}prepareHistoryEntries(){var e,i,s,t,n,o;const a=[];const l=((e=this.envelope)===null||e===void 0?void 0:e.history_entries)||[];a.push({icon:"pencil",message:"Envelope created.",date:new Date((i=this.envelope)===null||i===void 0?void 0:i.created_at)});if(((s=this.envelope)===null||s===void 0?void 0:s.status)==="complete"){a.push({icon:"pencil",message:"Envelope completed.",date:new Date((t=this.envelope)===null||t===void 0?void 0:t.updated_at)})}const r=l.some((e=>e.event==="owner:canceled"));if(((n=this.envelope)===null||n===void 0?void 0:n.status)==="canceled"&&!r){a.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((o=this.envelope)===null||o===void 0?void 0:o.canceled_at)})}l.forEach((e=>{var i;const s=(((i=this.envelope)===null||i===void 0?void 0:i.recipients)||[]).find((i=>i.role_name===e.role_name));const t=d(s);switch(e.event.toLowerCase()){case"recipient:kba_verified":a.push({icon:"key",message:`KBA verification completed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:kba_failed":a.push({icon:"keyslash",message:`KBA verification failed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:id_verified":a.push({icon:"idcard",message:`ID verification completed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:id_failed":a.push({icon:"idcardslash",message:`ID verification failed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:pin_verified":a.push({icon:"pin",message:`PIN verification completed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:pin_failed":a.push({icon:"pinslash",message:`PIN verification failed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:signed":a.push({icon:"gesture",message:`Signed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:declined":a.push({icon:"clear",message:`Declined by ${t}.`,date:new Date(e.created_at)});break;case"recipient:opened":switch(e.event_detail){case"email":case"mail":a.push({icon:"visibility",message:`Opened by ${t}, via email.`,date:new Date(e.created_at)});break;case"sms":a.push({icon:"visibility",message:`Opened by ${t}, via SMS.`,date:new Date(e.created_at)});break;case"in_person_link":a.push({icon:"visibility",message:`Opened by ${t}, via In-person link.`,date:new Date(e.created_at)});break;case"in_app":a.push({icon:"visibility",message:`Opened by ${t}, via dashboard.`,date:new Date(e.created_at)});break;default:a.push({icon:"visibility",message:`Opened by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:submitted":switch(e.event_detail){case"approver":a.push({icon:"check_circle",message:`Approved by ${t}.`,date:new Date(e.created_at)});break;default:a.push({icon:"send",message:`Submitted by ${t}.`,date:new Date(e.created_at)});break}break;case"recipient:prepared":a.push({icon:"send",message:`Prepared by ${t}.`,date:new Date(e.created_at)});break;case"recipient:claimed":if(e.event_detail==="guest"){a.push({icon:"account_circle",message:`${t} claimed the Envelope as a guest.`,date:new Date(e.created_at)})}else if(e.event_detail==="profile"){a.push({icon:"verified_user",message:`${t} claimed the Envelope as a verified user.`,date:new Date(e.created_at)})}break;case"recipient:agreed":a.push({icon:"done",message:`${t} agreed to use electronic records and signatures.`,date:new Date(e.created_at)});break;case"recipient:invited":if(e.event_detail==="sms"){a.push({icon:"textsms",message:`${t} has been invited via SMS.`,date:new Date(e.created_at)})}else{a.push({icon:"mail",message:`${t} has been invited via email.`,date:new Date(e.created_at)})}break;case"recipient:reminder":if(e.event_detail==="sms"){a.push({icon:"textsms",message:`${t} sent a reminder via SMS.`,date:new Date(e.created_at)})}else{a.push({icon:"mail",message:`${t} sent a reminder via email.`,date:new Date(e.created_at)})}break;case"invitation:resent":a.push({icon:"mail",message:`Invitation was resent to ${t}${e.event_detail==="reminder"?" by reminder":""}.`,date:new Date(e.created_at)});break;case"envelope:cc":a.push({icon:"contact_mail",message:`A copy has been sent to ${t}.`,date:new Date(e.created_at)});break;case"recipient:delegated":a.push({icon:"people",message:e.event_detail,date:new Date(e.created_at)});break;case"recipient:updated_info":a.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"owner:updated_recipient_info":a.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"created":a.push({icon:"create",message:`Envelope was created.`,date:new Date(e.created_at)});break;case"completed":a.push({icon:"done_all",message:`Envelope was completed.`,date:new Date(e.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(e.created_at)});break;case"owner:get_in_person_link":a.push({icon:"link",message:`Owner accessed the In-person link for ${s}.`,date:new Date(e.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",e);break}}));a.sort(((e,i)=>i.date.getTime()-e.date.getTime()));return a}handleToggleReminders(){if(this.remindersEnabled){return this.handleSetReminders(null,null)}else{return this.handleSetReminders(u,3*u)}}handleSetReminders(e,i){console.log("Updating reminders...");this.updatingReminders=true;c(this.endpoint,this.envelopeId,{initial_reminder:e,followup_reminders:i}).then((e=>{console.log("Updated",e);m.updateEnvelope(this.envelopeId,e);this.initialReminder=e.initial_reminder;this.followupReminders=e.followup_reminders;this.remindersEnabled=!!e.initial_reminder;this.updatingReminders=false})).catch((e=>{var i,s,t;console.log("Error updating envelope",e);this.initialReminder=(i=this.envelope)===null||i===void 0?void 0:i.initial_reminder;this.followupReminders=(s=this.envelope)===null||s===void 0?void 0:s.followup_reminders;this.remindersEnabled=!!((t=this.envelope)===null||t===void 0?void 0:t.initial_reminder);this.updatingReminders=false;alert(e.response.data.error)}))}render(){var e,i,o,a,l,r,c,w,g,m,f,x;if(this.loading){return s(n,null)}const M=v(this.endpoint.profile,this.envelope);const D=this.prepareHistoryEntries();const H=((e=this.envelope)===null||e===void 0?void 0:e.status)!=="pending"&&((i=this.envelope)===null||i===void 0?void 0:i.status)!=="in progress";return s(n,{class:this.panelOpen?"open":""},s("div",{class:"side-buttons"},s("button",{class:this.activeTab===1?"active":"",onClick:()=>this.setTab(1),innerHTML:k}),s("button",{class:this.activeTab===2?"active":"",onClick:()=>this.setTab(2),innerHTML:C}),s("button",{class:this.activeTab===3?"active":"",onClick:()=>this.setTab(3),innerHTML:y})),this.activeTab===1&&s("div",{class:"content"},s("div",{class:"title"},"Details"),s("div",{class:"label"},"Envelope ID"),s("div",{class:"value"},(o=this.envelope)===null||o===void 0?void 0:o.id),s("div",{class:"label"},"Date Created"),s("div",{class:"value"},b(new Date((a=this.envelope)===null||a===void 0?void 0:a.created_at),p)),s("div",{class:"label"},"Last Modified"),s("div",{class:"value"},b(new Date((l=this.envelope)===null||l===void 0?void 0:l.updated_at),p)),s("div",{class:"label"},"Status"),s("div",{class:"value"},h((r=this.envelope)===null||r===void 0?void 0:r.status)),s("div",{class:"label"},"Owner ID"),s("div",{class:"value"},(c=this.envelope)===null||c===void 0?void 0:c.profile_id),s("div",{class:"label"},"Owner Name"),s("div",{class:"value"},d((w=this.envelope)===null||w===void 0?void 0:w.profile)),s("div",{class:"label"},"Owner Email"),s("div",{class:"value"},(m=(g=this.envelope)===null||g===void 0?void 0:g.profile)===null||m===void 0?void 0:m.email)),this.activeTab===2&&s("div",{class:"content"},s("div",{class:"title"},"Recipients"),(f=this.envelope)===null||f===void 0?void 0:f.recipients.map(((e,i)=>{const t=e.status!=="submitted"&&e.status!=="canceled"&&e.status!=="declined";const n=this.canResendRecipient(e);const o=d(e);return s("div",{class:"recipient-detail"},s("div",{class:"recipient-header"},s("div",{class:"recipient-number"},i+1),s("div",{class:"recipient-name"},e.role_name),s("div",{class:{"recipient-status":true,[e.status]:true}},e.status),M&&!H&&s("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!n},{id:"inperson",label:"Get In-Person Link",disabled:!t}]})),s("dic",{class:"recipient-content"},s("div",{class:"recipient-name"},o),s("div",{class:"recipient-name"},e.email),s("div",{class:"recipient-name"},e.phone)))})),M&&s("div",{class:"reminders"},s("div",{class:"form-row"},s("div",{class:"reminders-label"},"Reminders"),s("verdocs-switch",{disabled:H||this.updatingReminders,checked:this.remindersEnabled,onCheckedChange:()=>this.handleToggleReminders()})),this.remindersEnabled&&s(t,null,s("div",{class:"form-row"},"NOTE: Reminders will only be sent for up to 14 days."),s("div",{class:"form-row"},s("div",{class:"form-label"},"Initial Reminder (days):"),s("verdocs-text-input",{placeholder:"In hours...",disabled:H||this.updatingReminders,value:String(Math.floor(this.initialReminder/u)),onBlur:e=>{this.initialReminder=Number(e.target.value)*u;this.handleSetReminders(this.initialReminder,this.followupReminders)}})),s("div",{class:"form-row"},s("div",{class:"form-label"},"Follow-up Reminders:"),s("verdocs-text-input",{placeholder:"In hours...",disabled:H||this.updatingReminders,value:String(Math.floor(this.followupReminders/u)),onBlur:e=>{this.followupReminders=Number(e.target.value)*u;this.handleSetReminders(this.initialReminder,this.followupReminders)}})),s("div",{class:"form-row"},s("div",{class:"form-label"},"Next Reminder:"),s("div",{style:{color:"#dddddd"}},b(new Date((x=this.envelope)===null||x===void 0?void 0:x.next_reminder),"P p"))))),M&&s("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Envelope",onClick:()=>this.showCancelDialog=!H,disabled:H})),this.activeTab===3&&s("div",{class:"content"},s("div",{class:"title"},"History"),D.map((e=>s("div",{class:"history-entry"},s("div",{class:"activity-icon",innerHTML:z[e.icon]||e.icon}),s("div",{class:"activity-details"},s("div",{class:"activity-text"},e.message),s("div",{class:"activity-date"},b(e.date,p))))))),this.showRecipientDialog&&s("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:()=>this.showRecipientDialog=""}),this.showCancelDialog&&s("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:()=>{this.showCancelDialog=false;this.handleCancelEnvelope()}}))}};M.style=x;export{M as verdocs_envelope_sidebar};
2
+ //# sourceMappingURL=p-b7799ec0.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as s,H as i}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getTemplate as r,updateTemplateRole as l,deleteTemplateRole as a,isValidEmail as d}from"@verdocs/js-sdk";import{S as c}from"./p-fd97809c.js";import{S as n}from"./p-3828cb31.js";const p='@-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-menu-panel-overlay{top:0;left:0;width:100%;height:100%;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.4980392157)}#verdocs-menu-panel{opacity:0;z-index:10001;position:fixed;overflow-y:scroll;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-animation:showVerdocsMenuPanel 0.35s;-webkit-animation-fill-mode:forwards}@-webkit-keyframes showVerdocsMenuPanel{0%{opacity:0;right:-300px}100%{right:0;opacity:1}}';const h=p;const f=class{constructor(s){e(this,s);this.close=t(this,"close",7);this.moved=false;this.overlayId=`verdocs-menu-panel-overlay`;this.panelId=`verdocs-menu-panel`;this.side="right";this.overlay=true;this.width=300}handleClick(e){var t;if(!this.element.contains(e.target)){this.hide();(t=this.close)===null||t===void 0?void 0:t.emit()}}componentWillLoad(){this.hide();if(this.overlay){this.portal=document.createElement("div");this.portal.setAttribute("id",this.overlayId);document.body.append(this.portal)}this.portal=document.createElement("div");this.portal.setAttribute("id",this.panelId);this.portal.style.top=`0px`;this.portal.style.bottom=`0px`;this.portal.style.width=`${this.width}px`;if(this.side==="left"){this.portal.style.left=`0px`}else{this.portal.style.right=`0px`}document.body.append(this.portal)}componentDidLoad(){this.portal.appendChild(this.element)}disconnectedCallback(){this.moved?this.portal.remove():this.moved=true}hide(){var e,t;(e=document.getElementById(this.overlayId))===null||e===void 0?void 0:e.remove();(t=document.getElementById(this.panelId))===null||t===void 0?void 0:t.remove()}render(){return s(i,{key:"1d8fd8a0d6035917184972712ab812f5c6141a1f",ref:e=>this.element=e},s("slot",{key:"696879936056ff36c4054e4a235455f9308605af"}))}};f.style=h;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-template-role-properties{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form{gap:15px;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-role-properties form .instructions{margin:7px 0 0 0;font-size:12px;font-style:italic}verdocs-template-role-properties form .input-label{display:block;font-size:14px;-ms-flex:0 0 100px;flex:0 0 100px;font-weight:700;margin:0 0 4px 0;color:#555570}verdocs-template-role-properties form .first-last{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form verdocs-help-icon{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-role-properties verdocs-select-input label{display:block}verdocs-template-role-properties verdocs-text-input{margin:0}verdocs-template-role-properties verdocs-text-input label{display:block}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';const u=b;const m=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>`;const v=class{constructor(s){e(this,s);this.close=t(this,"close",7);this.delete=t(this,"delete",7);this.sdkError=t(this,"sdkError",7);this.templateListenerId=null;this.endpoint=o.getDefault();this.templateId="";this.roleName="";this.dirty=false;this.saving=false;this.name="";this.type="signer";this.first_name="";this.last_name="";this.email="";this.phone="";this.delegator=false;this.loading=true;this.template=null}async componentWillLoad(){var e,t,s;try{this.endpoint.loadSession();if(!this.templateId){console.log(`[ROLES] Missing required template ID ${this.templateId}`);return}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return}this.listenToTemplate()}catch(i){console.log("[ROLES Error with preview session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(s=i.response)===null||s===void 0?void 0:s.data))}}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){console.log("[ROLES] Loading tempate",this.templateId);this.unlistenToTemplate();n.subscribe("templates",this.templateId,(()=>r(this.endpoint,this.templateId)),false,(e=>{var t;console.log("[BUILD] Template Updated",e);this.template=e;this.loading=false;const s=(t=this.template)===null||t===void 0?void 0:t.roles.find((e=>e.name===this.roleName));if(s){this.name=s.name;this.type=s.type;this.first_name=s.first_name;this.last_name=s.last_name;this.email=s.email;this.phone=s.phone;this.delegator=s.delegator;console.log("[ROLES] Editing role",s)}}))}unlistenToTemplate(){if(this.templateListenerId){n.store.delListener(this.templateListenerId);this.templateListenerId=null}}handleCancel(e){var t,s;e.stopPropagation();const i=(t=this.template)===null||t===void 0?void 0:t.roles.find((e=>e.name===this.roleName));if(i){this.name=i.name;this.type=i.type;this.first_name=i.first_name;this.last_name=i.last_name;this.email=i.email;this.phone=i.phone;this.delegator=i.delegator}this.dirty=false;(s=this.close)===null||s===void 0?void 0:s.emit()}async handleSave(e){e.stopPropagation();this.saving=true;l(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,delegator:this.delegator}).then((async e=>{var t;console.log("[ROLES] Update result",e);this.saving=false;this.dirty=false;const s=JSON.parse(JSON.stringify(this.template));const i=s.roles.findIndex((e=>e.name===this.roleName));if(i>-1){s.roles[i]=e}n.updateTemplate(this.templateId,s);(t=this.close)===null||t===void 0?void 0:t.emit()})).catch((e=>{console.log("[ROLES Update error",e);this.saving=false}))}async handleDelete(e){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){a(this.endpoint,this.templateId,this.roleName).then((()=>{var e,t;const s=JSON.parse(JSON.stringify(this.template));s.roles=s.roles.filter((e=>e.name!==this.roleName));n.getTemplate(this.endpoint,this.templateId,true);(e=this.delete)===null||e===void 0?void 0:e.emit({templateId:this.templateId,roleName:this.roleName});(t=this.close)===null||t===void 0?void 0:t.emit()})).catch((e=>{console.log("[ROLES Deletion error",e)}))}}render(){var e;const t=(((e=this.template)===null||e===void 0?void 0:e.fields)||[]).some((e=>e.role_name===this.roleName));const o=!this.email&&!this.first_name&&!this.last_name||d(this.email)&&!!this.first_name&&!!this.last_name;return s(i,{key:"a1895798db1e9b9f63c42e79556bdb76029217c2"},s("form",{key:"8be859da1a954e4d086d630e0d5aeaa991f88640",onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},s("div",{key:"a37025fa1b286d43493bd142f77f8310b02ee701"},s("verdocs-text-input",{key:"eea1b7844b0a60c30a6ee50a123399b7fe6fac4a",id:"verdocs-role-name",label:"Role Name (Must be unique)",value:this.name,autocomplete:"off",disabled:t,placeholder:"Role Name...",onInput:e=>{this.name=e.target.value;this.dirty=true}}),t&&s("div",{key:"5945d4e7a64f9b4a513bbd975fb821f662e452a4",class:"instructions"},"This role has fields assigned and can no longer be renamed.")),s("div",{key:"14cfb01f29a5889f1fcb2c90366ba4f215341a2c"},s("div",{key:"9095e3b2f1f378c9d3937898ca68d6742d89be54",class:"input-label"},"Type:"),s("verdocs-select-input",{key:"b07e4afc086e7d1563f58bb3c43aa0d909d8a65e",value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:e=>{this.type=e.target.value;this.dirty=true}})),s("div",{key:"5e1ed5226be0707cc5430c1e7bd38ad6e4df5dd5"},s("div",{key:"fc4a467cb0da25a80c421134c8226480369d2a83",class:"input-label"},"Default Contact Info:"),s("div",{key:"f6cb36cde86b8067c374e4bf0cffa6549851888d",class:"first-last"},s("verdocs-text-input",{key:"a52d5426c87419f45482ef6004ef11597400ea87",id:"verdocs-recipient-first",value:this.first_name,autocomplete:"off",placeholder:"First...",onInput:e=>{this.first_name=e.target.value;this.dirty=true}}),s("verdocs-text-input",{key:"b9035b299231319dce05f19c15c4d427ad6cd2f3",id:"verdocs-recipient-first",value:this.last_name,autocomplete:"off",placeholder:"Last...",onInput:e=>{this.last_name=e.target.value;this.dirty=true}}))),s("div",{key:"d42c1ce5ae61db11a0ac32b3fa7bc3816e3068c6"},s("verdocs-text-input",{key:"63436a7be6b3f35c2341dc88d137bd2f6b061978",id:"verdocs-recipient-email",value:this.email,autocomplete:"off",placeholder:"Email Address...",onInput:e=>{this.email=e.target.value;this.dirty=true}}),s("div",{key:"5a7ed36cfa657fb9ee11cf62998abbab2cc641e9",style:{height:"15px"}}),s("div",{key:"c974f4e78235706788dfa54f69f6f5ec7d37d00e"},s("verdocs-text-input",{key:"2be4c29396c6e6bc4f687819646ea219fce97e82",id:"verdocs-recipient-phone",value:this.phone,autocomplete:"off",placeholder:"Phone Number...",onInput:e=>{this.phone=e.target.value;this.dirty=true}}))),s("div",{key:"a0eba03681cab8b491e5bd833c9d718d85979d92",class:"buttons"},s("button",{key:"145ae41f583a843a6e64743b9f18a0f3c23c370c",class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:m}),s("div",{key:"e81da0df0eceae434bb1fbaa5b642edacc978a4a",style:{flex:"1"}}),s("verdocs-button",{key:"bb0cd0eae3b51a84b2729531508d888cb03dad10",size:"small",label:"Save",disabled:!this.dirty||!o,onClick:e=>this.handleSave(e)}))))}};v.style=u;export{f as verdocs_menu_panel,v as verdocs_template_role_properties};
2
- //# sourceMappingURL=p-a4d94e2e.entry.js.map
1
+ import{r as e,c as t,h as s,H as i}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getTemplate as r,updateTemplateRole as l,deleteTemplateRole as a,isValidEmail as d}from"@verdocs/js-sdk";import{S as c}from"./p-fd97809c.js";import{S as n}from"./p-d4be87ef.js";const p='@-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-menu-panel-overlay{top:0;left:0;width:100%;height:100%;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.4980392157)}#verdocs-menu-panel{opacity:0;z-index:10001;position:fixed;overflow-y:scroll;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-animation:showVerdocsMenuPanel 0.35s;-webkit-animation-fill-mode:forwards}@-webkit-keyframes showVerdocsMenuPanel{0%{opacity:0;right:-300px}100%{right:0;opacity:1}}';const h=p;const f=class{constructor(s){e(this,s);this.close=t(this,"close",7);this.moved=false;this.overlayId=`verdocs-menu-panel-overlay`;this.panelId=`verdocs-menu-panel`;this.side="right";this.overlay=true;this.width=300}handleClick(e){var t;if(!this.element.contains(e.target)){this.hide();(t=this.close)===null||t===void 0?void 0:t.emit()}}componentWillLoad(){this.hide();if(this.overlay){this.portal=document.createElement("div");this.portal.setAttribute("id",this.overlayId);document.body.append(this.portal)}this.portal=document.createElement("div");this.portal.setAttribute("id",this.panelId);this.portal.style.top=`0px`;this.portal.style.bottom=`0px`;this.portal.style.width=`${this.width}px`;if(this.side==="left"){this.portal.style.left=`0px`}else{this.portal.style.right=`0px`}document.body.append(this.portal)}componentDidLoad(){this.portal.appendChild(this.element)}disconnectedCallback(){this.moved?this.portal.remove():this.moved=true}hide(){var e,t;(e=document.getElementById(this.overlayId))===null||e===void 0?void 0:e.remove();(t=document.getElementById(this.panelId))===null||t===void 0?void 0:t.remove()}render(){return s(i,{key:"1d8fd8a0d6035917184972712ab812f5c6141a1f",ref:e=>this.element=e},s("slot",{key:"696879936056ff36c4054e4a235455f9308605af"}))}};f.style=h;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-template-role-properties{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form{gap:15px;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-role-properties form .instructions{margin:7px 0 0 0;font-size:12px;font-style:italic}verdocs-template-role-properties form .input-label{display:block;font-size:14px;-ms-flex:0 0 100px;flex:0 0 100px;font-weight:700;margin:0 0 4px 0;color:#555570}verdocs-template-role-properties form .first-last{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form verdocs-help-icon{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-role-properties verdocs-select-input label{display:block}verdocs-template-role-properties verdocs-text-input{margin:0}verdocs-template-role-properties verdocs-text-input label{display:block}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';const u=b;const m=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>`;const v=class{constructor(s){e(this,s);this.close=t(this,"close",7);this.delete=t(this,"delete",7);this.sdkError=t(this,"sdkError",7);this.templateListenerId=null;this.endpoint=o.getDefault();this.templateId="";this.roleName="";this.dirty=false;this.saving=false;this.name="";this.type="signer";this.first_name="";this.last_name="";this.email="";this.phone="";this.delegator=false;this.loading=true;this.template=null}async componentWillLoad(){var e,t,s;try{this.endpoint.loadSession();if(!this.templateId){console.log(`[ROLES] Missing required template ID ${this.templateId}`);return}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return}this.listenToTemplate()}catch(i){console.log("[ROLES Error with preview session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(s=i.response)===null||s===void 0?void 0:s.data))}}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){console.log("[ROLES] Loading tempate",this.templateId);this.unlistenToTemplate();n.subscribe("templates",this.templateId,(()=>r(this.endpoint,this.templateId)),false,(e=>{var t;console.log("[BUILD] Template Updated",e);this.template=e;this.loading=false;const s=(t=this.template)===null||t===void 0?void 0:t.roles.find((e=>e.name===this.roleName));if(s){this.name=s.name;this.type=s.type;this.first_name=s.first_name;this.last_name=s.last_name;this.email=s.email;this.phone=s.phone;this.delegator=s.delegator;console.log("[ROLES] Editing role",s)}}))}unlistenToTemplate(){if(this.templateListenerId){n.store.delListener(this.templateListenerId);this.templateListenerId=null}}handleCancel(e){var t,s;e.stopPropagation();const i=(t=this.template)===null||t===void 0?void 0:t.roles.find((e=>e.name===this.roleName));if(i){this.name=i.name;this.type=i.type;this.first_name=i.first_name;this.last_name=i.last_name;this.email=i.email;this.phone=i.phone;this.delegator=i.delegator}this.dirty=false;(s=this.close)===null||s===void 0?void 0:s.emit()}async handleSave(e){e.stopPropagation();this.saving=true;l(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,delegator:this.delegator}).then((async e=>{var t;console.log("[ROLES] Update result",e);this.saving=false;this.dirty=false;const s=JSON.parse(JSON.stringify(this.template));const i=s.roles.findIndex((e=>e.name===this.roleName));if(i>-1){s.roles[i]=e}n.updateTemplate(this.templateId,s);(t=this.close)===null||t===void 0?void 0:t.emit()})).catch((e=>{console.log("[ROLES Update error",e);this.saving=false}))}async handleDelete(e){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){a(this.endpoint,this.templateId,this.roleName).then((()=>{var e,t;const s=JSON.parse(JSON.stringify(this.template));s.roles=s.roles.filter((e=>e.name!==this.roleName));n.getTemplate(this.endpoint,this.templateId,true);(e=this.delete)===null||e===void 0?void 0:e.emit({templateId:this.templateId,roleName:this.roleName});(t=this.close)===null||t===void 0?void 0:t.emit()})).catch((e=>{console.log("[ROLES Deletion error",e)}))}}render(){var e;const t=(((e=this.template)===null||e===void 0?void 0:e.fields)||[]).some((e=>e.role_name===this.roleName));const o=!this.email&&!this.first_name&&!this.last_name||d(this.email)&&!!this.first_name&&!!this.last_name;return s(i,{key:"a1895798db1e9b9f63c42e79556bdb76029217c2"},s("form",{key:"8be859da1a954e4d086d630e0d5aeaa991f88640",onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},s("div",{key:"a37025fa1b286d43493bd142f77f8310b02ee701"},s("verdocs-text-input",{key:"eea1b7844b0a60c30a6ee50a123399b7fe6fac4a",id:"verdocs-role-name",label:"Role Name (Must be unique)",value:this.name,autocomplete:"off",disabled:t,placeholder:"Role Name...",onInput:e=>{this.name=e.target.value;this.dirty=true}}),t&&s("div",{key:"5945d4e7a64f9b4a513bbd975fb821f662e452a4",class:"instructions"},"This role has fields assigned and can no longer be renamed.")),s("div",{key:"14cfb01f29a5889f1fcb2c90366ba4f215341a2c"},s("div",{key:"9095e3b2f1f378c9d3937898ca68d6742d89be54",class:"input-label"},"Type:"),s("verdocs-select-input",{key:"b07e4afc086e7d1563f58bb3c43aa0d909d8a65e",value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:e=>{this.type=e.target.value;this.dirty=true}})),s("div",{key:"5e1ed5226be0707cc5430c1e7bd38ad6e4df5dd5"},s("div",{key:"fc4a467cb0da25a80c421134c8226480369d2a83",class:"input-label"},"Default Contact Info:"),s("div",{key:"f6cb36cde86b8067c374e4bf0cffa6549851888d",class:"first-last"},s("verdocs-text-input",{key:"a52d5426c87419f45482ef6004ef11597400ea87",id:"verdocs-recipient-first",value:this.first_name,autocomplete:"off",placeholder:"First...",onInput:e=>{this.first_name=e.target.value;this.dirty=true}}),s("verdocs-text-input",{key:"b9035b299231319dce05f19c15c4d427ad6cd2f3",id:"verdocs-recipient-first",value:this.last_name,autocomplete:"off",placeholder:"Last...",onInput:e=>{this.last_name=e.target.value;this.dirty=true}}))),s("div",{key:"d42c1ce5ae61db11a0ac32b3fa7bc3816e3068c6"},s("verdocs-text-input",{key:"63436a7be6b3f35c2341dc88d137bd2f6b061978",id:"verdocs-recipient-email",value:this.email,autocomplete:"off",placeholder:"Email Address...",onInput:e=>{this.email=e.target.value;this.dirty=true}}),s("div",{key:"5a7ed36cfa657fb9ee11cf62998abbab2cc641e9",style:{height:"15px"}}),s("div",{key:"c974f4e78235706788dfa54f69f6f5ec7d37d00e"},s("verdocs-text-input",{key:"2be4c29396c6e6bc4f687819646ea219fce97e82",id:"verdocs-recipient-phone",value:this.phone,autocomplete:"off",placeholder:"Phone Number...",onInput:e=>{this.phone=e.target.value;this.dirty=true}}))),s("div",{key:"a0eba03681cab8b491e5bd833c9d718d85979d92",class:"buttons"},s("button",{key:"145ae41f583a843a6e64743b9f18a0f3c23c370c",class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:m}),s("div",{key:"e81da0df0eceae434bb1fbaa5b642edacc978a4a",style:{flex:"1"}}),s("verdocs-button",{key:"bb0cd0eae3b51a84b2729531508d888cb03dad10",size:"small",label:"Save",disabled:!this.dirty||!o,onClick:e=>this.handleSave(e)}))))}};v.style=u;export{f as verdocs_menu_panel,v as verdocs_template_role_properties};
2
+ //# sourceMappingURL=p-b8945173.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as t,H as r}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getEnvelope as s,getInPersonLink as n,formatFullName as l}from"@verdocs/js-sdk";import{V as c}from"./p-04c07b7b.js";import{S as a}from"./p-fd97809c.js";import{S as d}from"./p-3828cb31.js";const p='@-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-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;margin:0 6px 0 0;border-radius:4px;white-space:nowrap;-ms-flex-align:center;align-items:center;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';const h=p;const b=class{constructor(t){e(this,t);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=o.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.gettingLink=true;this.link="";this.loading=true;this.envelope=null;this.recipient=null}async componentWillLoad(){var e,i,t;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[RECIPIENT_LINK] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(r){console.log("[RECIPIENT_LINK] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(t=r.response)===null||t===void 0?void 0:t.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();d.subscribe("envelopes",this.envelopeId,(()=>s(this.endpoint,this.envelopeId)),false,(e=>{var i;this.envelope=e;this.loading=false;this.recipient=(((i=this.envelope)===null||i===void 0?void 0:i.recipients)||[]).find((e=>e.role_name===this.roleName));this.getLink(this.recipient)}))}unlistenToEnvelope(){if(this.envelopeListenerId){d.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}handleDone(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>c("Link copied to clipboard!",{style:"success",duration:3e3}))).catch((e=>{console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);c(`Unable to copy to clipboard: ${e.message}`,{style:"error"})}))}getLink(e){this.gettingLink=true;n(this.endpoint,e.envelope_id,e.role_name).then((e=>{this.gettingLink=false;this.link=e.link})).catch((e=>{this.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);c("Unable to get link: "+e.message,{style:"error"})}))}render(){if(this.loading||!this.recipient){return t(r,null)}const e=l(this.recipient);return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},e," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:()=>this.getLink(this.recipient)})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(this.link)}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};b.style=h;const f='@-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-switch{font-family:"Inter", "Barlow", sans-serif}verdocs-switch .switch{display:-ms-inline-flexbox;display:inline-flex;height:24px;width:44px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:12px;border:transparent;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .switch.primary[data-state=checked]{background:#55bc81}verdocs-switch .switch.primary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .switch.secondary[data-state=checked]{background:#4c56cb}verdocs-switch .switch.secondary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .slider{display:block;width:20px;height:20px;border-radius:20px;background:#ffffff;-webkit-box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .slider[data-state=checked]{-webkit-transform:translateX(22px);transform:translateX(22px)}verdocs-switch .slider[data-state=unchecked]{-webkit-transform:translateX(2px);transform:translateX(2px)}verdocs-switch .switch.disabled.primary,verdocs-switch .switch.disabled.secondary{cursor:not-allowed;background:#666666}';const x=f;const m=class{constructor(t){e(this,t);this.checkedChange=i(this,"checkedChange",7);this.checked=false;this.theme="primary";this.disabled=false}render(){return t("button",{key:"e9153549bcee6b924ce7a7d620d1096fa91782d2",value:"on",type:"button",role:"switch",class:`switch ${this.theme} ${this.disabled?"disabled":""}`,"data-state":this.checked?"checked":"unchecked","aria-checked":this.checked?"checked":"unchecked",onClick:()=>{var e;if(!this.disabled){this.checked=!this.checked;(e=this.checkedChange)===null||e===void 0?void 0:e.emit(this.checked)}}},t("span",{key:"61d97d7571b7f52f186ce44daaf0ef7132c6d5f6","data-state":this.checked?"checked":"unchecked",class:"slider"}))}};m.style=x;export{b as verdocs_envelope_recipient_link,m as verdocs_switch};
2
- //# sourceMappingURL=p-d4aff253.entry.js.map
1
+ import{r as e,c as i,h as t,H as r}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getEnvelope as s,getInPersonLink as n,formatFullName as l}from"@verdocs/js-sdk";import{V as c}from"./p-04c07b7b.js";import{S as a}from"./p-fd97809c.js";import{S as d}from"./p-d4be87ef.js";const p='@-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-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;margin:0 6px 0 0;border-radius:4px;white-space:nowrap;-ms-flex-align:center;align-items:center;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';const h=p;const b=class{constructor(t){e(this,t);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=o.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.gettingLink=true;this.link="";this.loading=true;this.envelope=null;this.recipient=null}async componentWillLoad(){var e,i,t;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[RECIPIENT_LINK] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(r){console.log("[RECIPIENT_LINK] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(t=r.response)===null||t===void 0?void 0:t.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();d.subscribe("envelopes",this.envelopeId,(()=>s(this.endpoint,this.envelopeId)),false,(e=>{var i;this.envelope=e;this.loading=false;this.recipient=(((i=this.envelope)===null||i===void 0?void 0:i.recipients)||[]).find((e=>e.role_name===this.roleName));this.getLink(this.recipient)}))}unlistenToEnvelope(){if(this.envelopeListenerId){d.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}handleDone(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>c("Link copied to clipboard!",{style:"success",duration:3e3}))).catch((e=>{console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);c(`Unable to copy to clipboard: ${e.message}`,{style:"error"})}))}getLink(e){this.gettingLink=true;n(this.endpoint,e.envelope_id,e.role_name).then((e=>{this.gettingLink=false;this.link=e.link})).catch((e=>{this.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);c("Unable to get link: "+e.message,{style:"error"})}))}render(){if(this.loading||!this.recipient){return t(r,null)}const e=l(this.recipient);return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},e," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:()=>this.getLink(this.recipient)})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(this.link)}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};b.style=h;const f='@-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-switch{font-family:"Inter", "Barlow", sans-serif}verdocs-switch .switch{display:-ms-inline-flexbox;display:inline-flex;height:24px;width:44px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:12px;border:transparent;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .switch.primary[data-state=checked]{background:#55bc81}verdocs-switch .switch.primary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .switch.secondary[data-state=checked]{background:#4c56cb}verdocs-switch .switch.secondary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .slider{display:block;width:20px;height:20px;border-radius:20px;background:#ffffff;-webkit-box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .slider[data-state=checked]{-webkit-transform:translateX(22px);transform:translateX(22px)}verdocs-switch .slider[data-state=unchecked]{-webkit-transform:translateX(2px);transform:translateX(2px)}verdocs-switch .switch.disabled.primary,verdocs-switch .switch.disabled.secondary{cursor:not-allowed;background:#666666}';const x=f;const m=class{constructor(t){e(this,t);this.checkedChange=i(this,"checkedChange",7);this.checked=false;this.theme="primary";this.disabled=false}render(){return t("button",{key:"e9153549bcee6b924ce7a7d620d1096fa91782d2",value:"on",type:"button",role:"switch",class:`switch ${this.theme} ${this.disabled?"disabled":""}`,"data-state":this.checked?"checked":"unchecked","aria-checked":this.checked?"checked":"unchecked",onClick:()=>{var e;if(!this.disabled){this.checked=!this.checked;(e=this.checkedChange)===null||e===void 0?void 0:e.emit(this.checked)}}},t("span",{key:"61d97d7571b7f52f186ce44daaf0ef7132c6d5f6","data-state":this.checked?"checked":"unchecked",class:"slider"}))}};m.style=x;export{b as verdocs_envelope_recipient_link,m as verdocs_switch};
2
+ //# sourceMappingURL=p-b9fee1a7.entry.js.map
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{a(i.next(e))}catch(e){o(e)}}function l(e){try{a(i["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):r(e.value).then(s,l)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return a([e,t])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(n=0)),n)try{if(i=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;r=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];r=0}finally{i=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-c8a15cb7.system.js","./p-65be7617.system.js"],(function(e){"use strict";var t,n,i,r,o,s,l,a,d;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H;o=e.g},function(e){s=e.VerdocsEndpoint;l=e.getTemplate},function(e){a=e.S},function(e){d=e.S}],execute:function(){var c='@-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-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .content{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}verdocs-build .preview-container{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;width:100%;background-color:#eeeeee;max-height:100%}@media all and (max-width: 450px){verdocs-build .preview-container{-ms-flex-direction:column;flex-direction:column}}verdocs-build .preview-send-wrapper{display:-ms-flexbox;display:flex;-ms-flex:0 0 300px;flex:0 0 300px;background-color:#ffffff;-webkit-box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157);box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157)}@media all and (max-width: 450px){verdocs-build .preview-send-wrapper{-ms-flex:0;flex:0}}verdocs-build .preview-preview-wrapper{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;overflow-y:scroll}';var u=c;var f=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.stepChanged=n(this,"stepChanged",7);this.send=n(this,"send",7);this.templateUpdated=n(this,"templateUpdated",7);this.templateCreated=n(this,"templateCreated",7);this.rolesUpdated=n(this,"rolesUpdated",7);this.templateListenerId=null;this.endpoint=s.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}e.prototype.onTemplateIdChanged=function(e,t){if(!t&&e&&this.step==="attachments"){this.step="preview"}this.loadTemplate(e).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.onStepChanged=function(){this.loadTemplate(this.templateId).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,r,o;return __generator(this,(function(s){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[BUILD] No template ID, activating upload mode");this.step="attachments";return[2]}try{this.loadTemplate(this.templateId).catch((function(e){return console.log("[BUILD] Unable to load template",e)}))}catch(i){console.log("[BUILD] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data))}}catch(e){console.log("[BUILD] Error with builder session",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new a(e.message,(r=e.response)===null||r===void 0?void 0:r.status,(o=e.response)===null||o===void 0?void 0:o.data))}return[2]}))}))};e.prototype.loadTemplate=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){if(e){d.subscribe("templates",this.templateId,(function(){return l(t.endpoint,t.templateId)}),false,(function(e){t.template=e;t.loading=false}))}return[2]}))}))};e.prototype.disconnectedCallback=function(){console.log("[BUILD] Disconnected");this.unlistenToTemplate()};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){d.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(){this.step="preview"};e.prototype.handleTemplateCreated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,this.loadTemplate(e)];case 1:n.sent();this.templateId=e;this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles");return[2]}}))}))};e.prototype.handleRolesUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleTemplateUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleAttachmentsNext=function(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")};e.prototype.handleRolesNext=function(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")};e.prototype.handleStepChanged=function(e){var t;this.step=e;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e)};e.prototype.render=function(){var e=this;if(this.loading){return i(r,{class:"loading"},i("verdocs-loader",null))}if(!this.endpoint.session){return i(r,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return i(r,null,i("div",{class:"content"},i("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)},onStepChanged:function(t){return e.handleStepChanged(t.detail)}}),this.step==="attachments"&&i("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(){return e.handleCancel()},onNext:function(){return e.handleAttachmentsNext()},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="roles"&&i("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(){return e.handleCancel()},onNext:function(){return e.handleRolesNext()},onRolesUpdated:function(t){return e.handleRolesUpdated(t)}}),this.step==="settings"&&i("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},i("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}})),this.step==="fields"&&i("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="preview"&&i("div",{class:"preview-container"},i("div",{class:"preview-send-wrapper"},i("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:function(t){var n;return(n=e.send)===null||n===void 0?void 0:n.emit(t.detail)},style:{width:"100%"}})),i("div",{class:"preview-preview-wrapper"},i("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}},enumerable:false,configurable:true});return e}());f.style=u}}}));
2
- //# sourceMappingURL=p-34c2298e.system.entry.js.map
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{a(i.next(e))}catch(e){o(e)}}function l(e){try{a(i["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):r(e.value).then(s,l)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return a([e,t])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(n=0)),n)try{if(i=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;r=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];r=0}finally{i=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-c8a15cb7.system.js","./p-52c3e8b0.system.js"],(function(e){"use strict";var t,n,i,r,o,s,l,a,d;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H;o=e.g},function(e){s=e.VerdocsEndpoint;l=e.getTemplate},function(e){a=e.S},function(e){d=e.S}],execute:function(){var c='@-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-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .content{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}verdocs-build .preview-container{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;width:100%;background-color:#eeeeee;max-height:100%}@media all and (max-width: 450px){verdocs-build .preview-container{-ms-flex-direction:column;flex-direction:column}}verdocs-build .preview-send-wrapper{display:-ms-flexbox;display:flex;-ms-flex:0 0 300px;flex:0 0 300px;background-color:#ffffff;-webkit-box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157);box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157)}@media all and (max-width: 450px){verdocs-build .preview-send-wrapper{-ms-flex:0;flex:0}}verdocs-build .preview-preview-wrapper{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;overflow-y:scroll}';var u=c;var f=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.stepChanged=n(this,"stepChanged",7);this.send=n(this,"send",7);this.templateUpdated=n(this,"templateUpdated",7);this.templateCreated=n(this,"templateCreated",7);this.rolesUpdated=n(this,"rolesUpdated",7);this.templateListenerId=null;this.endpoint=s.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}e.prototype.onTemplateIdChanged=function(e,t){if(!t&&e&&this.step==="attachments"){this.step="preview"}this.loadTemplate(e).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.onStepChanged=function(){this.loadTemplate(this.templateId).catch((function(e){return console.log("Unknown Error",e)}))};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,r,o;return __generator(this,(function(s){try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[BUILD] No template ID, activating upload mode");this.step="attachments";return[2]}try{this.loadTemplate(this.templateId).catch((function(e){return console.log("[BUILD] Unable to load template",e)}))}catch(i){console.log("[BUILD] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data))}}catch(e){console.log("[BUILD] Error with builder session",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new a(e.message,(r=e.response)===null||r===void 0?void 0:r.status,(o=e.response)===null||o===void 0?void 0:o.data))}return[2]}))}))};e.prototype.loadTemplate=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){if(e){d.subscribe("templates",this.templateId,(function(){return l(t.endpoint,t.templateId)}),false,(function(e){t.template=e;t.loading=false}))}return[2]}))}))};e.prototype.disconnectedCallback=function(){console.log("[BUILD] Disconnected");this.unlistenToTemplate()};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){d.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(){this.step="preview"};e.prototype.handleTemplateCreated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,this.loadTemplate(e)];case 1:n.sent();this.templateId=e;this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles");return[2]}}))}))};e.prototype.handleRolesUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleTemplateUpdated=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail);return[2]}))}))};e.prototype.handleAttachmentsNext=function(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")};e.prototype.handleRolesNext=function(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")};e.prototype.handleStepChanged=function(e){var t;this.step=e;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e)};e.prototype.render=function(){var e=this;if(this.loading){return i(r,{class:"loading"},i("verdocs-loader",null))}if(!this.endpoint.session){return i(r,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return i(r,null,i("div",{class:"content"},i("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)},onStepChanged:function(t){return e.handleStepChanged(t.detail)}}),this.step==="attachments"&&i("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(){return e.handleCancel()},onNext:function(){return e.handleAttachmentsNext()},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="roles"&&i("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:function(){return e.handleCancel()},onNext:function(){return e.handleRolesNext()},onRolesUpdated:function(t){return e.handleRolesUpdated(t)}}),this.step==="settings"&&i("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},i("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),i("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}})),this.step==="fields"&&i("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:function(t){return e.handleTemplateUpdated(t)}}),this.step==="preview"&&i("div",{class:"preview-container"},i("div",{class:"preview-send-wrapper"},i("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:function(t){var n;return(n=e.send)===null||n===void 0?void 0:n.emit(t.detail)},style:{width:"100%"}})),i("div",{class:"preview-preview-wrapper"},i("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}},enumerable:false,configurable:true});return e}());f.style=u}}}));
2
+ //# sourceMappingURL=p-cabfdb9d.system.entry.js.map
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function s(e){try{c(o.next(e))}catch(e){a(e)}}function n(e){try{c(o["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,n)}c((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,r,a,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return c([e,t])}}function c(n){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(i=0)),i)try{if(o=1,r&&(a=n[0]&2?r["return"]:n[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,n[1])).done)return a;if(r=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;r=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){i.label=n[1];break}if(n[0]===6&&i.label<a[1]){i.label=a[1];a=n;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(n);break}if(a[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];r=0}finally{o=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-f29eb00a.system.js","./p-65be7617.system.js","./p-e0ac9edf.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var t,i,o,r,a,s,n,c,l,d,u,h,p,f;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H;a=e.F;s=e.g},function(e){n=e.VerdocsEndpoint;c=e.getTemplateDocumentPageDisplayUri;l=e.getTemplate},function(e){d=e.t;u=e.j;h=e.g},function(e){p=e.S},function(e){f=e.c},function(){},function(){},function(){}],execute:function(){var 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-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";var v=b;var m=e("verdocs_template_document_page",function(){function e(e){t(this,e);this.pageRendered=i(this,"pageRendered",7);this.templateListenerId=null;this.endpoint=n.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,c(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.listenToTemplate();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(d((function(t){for(var i=0,o=t;i<o.length;i++){var r=o[i];var a=r.contentRect.width;e.renderedWidth=a;e.renderedHeight=e.virtualHeight*(a/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();p.subscribe("templates",this.templateId,(function(){return l(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){p.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})};e.prototype.render=function(){var e=this;if(this.loading){return o(r,null,o("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}var t="".concat(this.renderedHeight,"px");return o(r,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){var r;return i.type==="div"?o("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}},i.name==="controls"&&(((r=e.template)===null||r===void 0?void 0:r.fields)||[]).filter((function(t){return t&&t.page===e.pageNumber})).map((function(t){var i,r;var s=h(t);var n=t.name,c=t.type,l=t.multiline;var d=e,p=d.xScale,f=d.yScale,b=d.templateId,v=d.editable,m=d.disabled,g=d.done,y=d.pageNumber;if(((i=t["setting"])===null||i===void 0?void 0:i.leading)>0||((r=t["settings"])===null||r===void 0?void 0:r.leading)>0){c="textarea";l=true}switch(c){case"textbox":return o("verdocs-field-textbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,multiline:l,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"textarea":return o("verdocs-field-textarea",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"date":return o("verdocs-field-date",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"attachment":return o("verdocs-field-attachment",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"dropdown":return o("verdocs-field-dropdown",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"initial":return o("verdocs-field-initial",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"signature":return o("verdocs-field-signature",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,e.xScale,e.yScale)});case"timestamp":return o("verdocs-field-timestamp",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"checkbox":return o("verdocs-field-checkbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"radio":return o("verdocs-field-radio",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});default:return o(a,null,n)}}))):e.pageDisplayUri?o("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):o("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());m.style=v;var g='@-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-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var y=g;var x=e("verdocs_toolbar_icon",function(){function e(e){t(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=f(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return o(r,{key:"98b2f6b2a2711df2cf8e687e38684d495b6e7d50",class:{}},o("div",{key:"49500d4d3348e2ccd6c9cbe7867645756c6cf5ef","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),o("div",{key:"e64aa823a8a09b10a9166f96be633439d959d3ff",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,o("div",{key:"399156e882824870173ecf3e4bcc35f2ba720b8c","data-popper-arrow":"true",class:"arrow"})))};return e}());x.style=y}}}));
2
- //# sourceMappingURL=p-90690dde.system.entry.js.map
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function s(e){try{c(o.next(e))}catch(e){a(e)}}function n(e){try{c(o["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,n)}c((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,r,a,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return c([e,t])}}function c(n){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(i=0)),i)try{if(o=1,r&&(a=n[0]&2?r["return"]:n[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,n[1])).done)return a;if(r=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;r=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){i.label=n[1];break}if(n[0]===6&&i.label<a[1]){i.label=a[1];a=n;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(n);break}if(a[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];r=0}finally{o=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-f29eb00a.system.js","./p-52c3e8b0.system.js","./p-e0ac9edf.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var t,i,o,r,a,s,n,c,l,d,u,h,p,f;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H;a=e.F;s=e.g},function(e){n=e.VerdocsEndpoint;c=e.getTemplateDocumentPageDisplayUri;l=e.getTemplate},function(e){d=e.t;u=e.j;h=e.g},function(e){p=e.S},function(e){f=e.c},function(){},function(){},function(){}],execute:function(){var 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-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";var v=b;var m=e("verdocs_template_document_page",function(){function e(e){t(this,e);this.pageRendered=i(this,"pageRendered",7);this.templateListenerId=null;this.endpoint=n.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,c(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.listenToTemplate();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(d((function(t){for(var i=0,o=t;i<o.length;i++){var r=o[i];var a=r.contentRect.width;e.renderedWidth=a;e.renderedHeight=e.virtualHeight*(a/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();p.subscribe("templates",this.templateId,(function(){return l(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){p.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})};e.prototype.render=function(){var e=this;if(this.loading){return o(r,null,o("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}var t="".concat(this.renderedHeight,"px");return o(r,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){var r;return i.type==="div"?o("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}},i.name==="controls"&&(((r=e.template)===null||r===void 0?void 0:r.fields)||[]).filter((function(t){return t&&t.page===e.pageNumber})).map((function(t){var i,r;var s=h(t);var n=t.name,c=t.type,l=t.multiline;var d=e,p=d.xScale,f=d.yScale,b=d.templateId,v=d.editable,m=d.disabled,g=d.done,y=d.pageNumber;if(((i=t["setting"])===null||i===void 0?void 0:i.leading)>0||((r=t["settings"])===null||r===void 0?void 0:r.leading)>0){c="textarea";l=true}switch(c){case"textbox":return o("verdocs-field-textbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,multiline:l,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"textarea":return o("verdocs-field-textarea",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"date":return o("verdocs-field-date",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"attachment":return o("verdocs-field-attachment",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"dropdown":return o("verdocs-field-dropdown",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"initial":return o("verdocs-field-initial",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"signature":return o("verdocs-field-signature",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,e.xScale,e.yScale)});case"timestamp":return o("verdocs-field-timestamp",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"checkbox":return o("verdocs-field-checkbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"radio":return o("verdocs-field-radio",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});default:return o(a,null,n)}}))):e.pageDisplayUri?o("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):o("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());m.style=v;var g='@-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-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var y=g;var x=e("verdocs_toolbar_icon",function(){function e(e){t(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=f(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return o(r,{key:"98b2f6b2a2711df2cf8e687e38684d495b6e7d50",class:{}},o("div",{key:"49500d4d3348e2ccd6c9cbe7867645756c6cf5ef","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),o("div",{key:"e64aa823a8a09b10a9166f96be633439d959d3ff",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,o("div",{key:"399156e882824870173ecf3e4bcc35f2ba720b8c","data-popper-arrow":"true",class:"arrow"})))};return e}());x.style=y}}}));
2
+ //# sourceMappingURL=p-d1d95df4.system.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as s,H as o}from"./p-b9654a5e.js";import{VerdocsEndpoint as t,getEnvelope as r,getInPersonLink as l,getRecipientsWithActions as n,recipientCanAct as a,formatFullName as c}from"@verdocs/js-sdk";import{S as d}from"./p-fd97809c.js";import{S as p}from"./p-3828cb31.js";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-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;border-radius:4px;-ms-flex-align:center;align-items:center;white-space:nowrap;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';const u=m;const h=class{constructor(s){e(this,s);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=t.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.recipientStatusIcons=[];this.containerId=`verdocs-status-indicator-${Math.random().toString(36).substring(2,11)}`;this.gettingLinks={};this.links={};this.loading=true;this.envelope=null}async componentWillLoad(){var e,i,s;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[RECIPIENTS] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(o){console.log("[RECIPIENTS] Error loading envelope",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(o.message,(i=o.response)===null||i===void 0?void 0:i.status,(s=o.response)===null||s===void 0?void 0:s.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();p.subscribe("envelopes",this.envelopeId,(()=>r(this.endpoint,this.envelopeId)),false,(e=>{this.envelope=e;this.loading=false;this.sortEnvelopeRecipients()}))}unlistenToEnvelope(){if(this.envelopeListenerId){p.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}sortEnvelopeRecipients(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}handleAnother(e){var i;e.preventDefault();(i=this.another)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}handleView(e){var i;e.preventDefault();(i=this.view)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}handleDone(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>{})).catch((e=>{var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(e)}))}getLink(e){this.gettingLinks={...this.gettingLinks,[e.role_name]:true};l(this.endpoint,e.envelope_id,e.role_name).then((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:false};this.links={...this.links,[e.role_name]:i.link};this.copyLink(i.link)})).catch((i=>{var s;this.gettingLinks={...this.gettingLinks,[e.role_name]:false};console.log("[RECIPIENTS] Error getting link",i);(s=this.sdkError)===null||s===void 0?void 0:s.emit(i)}))}render(){var e;if(this.loading){return s(o,null)}return s(o,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"Recipient Summary"),s("div",{class:"summary-rows"},(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).map((e=>{const i=n(this.envelope);const o=a(e,i);const t=this.links[e.role_name];const r=this.gettingLinks[e.role_name];const l=c(e);return s("div",{class:"summary-recipient"},s("div",{class:"role-name"},e.role_name),s("div",{class:"role-details"},s("div",{class:"role-info"},s("div",{class:"role-full-name"},l," (",e.email||e.phone,")"),o&&!t&&s("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:r,onClick:()=>this.getLink(e)})),t&&s("div",{class:"link-wrapper"},s("div",{class:"link"},t),s("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(t)}))))}))),(this.canSendAnother||this.canView||this.canDone)&&s("div",{class:"buttons"},this.canSendAnother&&s("verdocs-button",{size:"small",label:"Send Another",onClick:e=>this.handleAnother(e)}),this.canView&&s("verdocs-button",{size:"small",label:"View Now",onClick:e=>this.handleView(e)}),this.canDone&&s("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};h.style=u;export{h as verdocs_envelope_recipient_summary};
2
- //# sourceMappingURL=p-60da8e6b.entry.js.map
1
+ import{r as e,c as i,h as s,H as o}from"./p-b9654a5e.js";import{VerdocsEndpoint as t,getEnvelope as r,getInPersonLink as l,getRecipientsWithActions as n,recipientCanAct as a,formatFullName as c}from"@verdocs/js-sdk";import{S as d}from"./p-fd97809c.js";import{S as p}from"./p-d4be87ef.js";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-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;border-radius:4px;-ms-flex-align:center;align-items:center;white-space:nowrap;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';const u=m;const h=class{constructor(s){e(this,s);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=t.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.recipientStatusIcons=[];this.containerId=`verdocs-status-indicator-${Math.random().toString(36).substring(2,11)}`;this.gettingLinks={};this.links={};this.loading=true;this.envelope=null}async componentWillLoad(){var e,i,s;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[RECIPIENTS] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(o){console.log("[RECIPIENTS] Error loading envelope",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(o.message,(i=o.response)===null||i===void 0?void 0:i.status,(s=o.response)===null||s===void 0?void 0:s.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();p.subscribe("envelopes",this.envelopeId,(()=>r(this.endpoint,this.envelopeId)),false,(e=>{this.envelope=e;this.loading=false;this.sortEnvelopeRecipients()}))}unlistenToEnvelope(){if(this.envelopeListenerId){p.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}sortEnvelopeRecipients(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}handleAnother(e){var i;e.preventDefault();(i=this.another)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}handleView(e){var i;e.preventDefault();(i=this.view)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}handleDone(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>{})).catch((e=>{var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(e)}))}getLink(e){this.gettingLinks={...this.gettingLinks,[e.role_name]:true};l(this.endpoint,e.envelope_id,e.role_name).then((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:false};this.links={...this.links,[e.role_name]:i.link};this.copyLink(i.link)})).catch((i=>{var s;this.gettingLinks={...this.gettingLinks,[e.role_name]:false};console.log("[RECIPIENTS] Error getting link",i);(s=this.sdkError)===null||s===void 0?void 0:s.emit(i)}))}render(){var e;if(this.loading){return s(o,null)}return s(o,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"Recipient Summary"),s("div",{class:"summary-rows"},(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).map((e=>{const i=n(this.envelope);const o=a(e,i);const t=this.links[e.role_name];const r=this.gettingLinks[e.role_name];const l=c(e);return s("div",{class:"summary-recipient"},s("div",{class:"role-name"},e.role_name),s("div",{class:"role-details"},s("div",{class:"role-info"},s("div",{class:"role-full-name"},l," (",e.email||e.phone,")"),o&&!t&&s("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:r,onClick:()=>this.getLink(e)})),t&&s("div",{class:"link-wrapper"},s("div",{class:"link"},t),s("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(t)}))))}))),(this.canSendAnother||this.canView||this.canDone)&&s("div",{class:"buttons"},this.canSendAnother&&s("verdocs-button",{size:"small",label:"Send Another",onClick:e=>this.handleAnother(e)}),this.canView&&s("verdocs-button",{size:"small",label:"View Now",onClick:e=>this.handleView(e)}),this.canDone&&s("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};h.style=u;export{h as verdocs_envelope_recipient_summary};
2
+ //# sourceMappingURL=p-d3a8c6b8.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{getTemplate as t}from"@verdocs/js-sdk";const n=t=>typeof t;const s="";const o=n(s);const e=n(true);const c=n(0);const l=n(n);const r="type";const a="default";const i="Listener";const u="add";const f="Has";const d="Ids";const h="Table";const b=h+"s";const g=h+d;const T="Row";const _=T+"Count";const p=T+d;const S="Cell";const w=S+d;const m="Value";const C=m+"s";const V=m+d;const I=t=>s+t;const y=isFinite;const R=(t,n)=>t instanceof n;const v=t=>t==undefined;const J=(t,n,s)=>v(t)?s?.():n(t);const L=t=>t==o||t==e;const E=t=>n(t)==l;const O=t=>Array.isArray(t);const j=(t,n,s)=>t.slice(n,s);const N=t=>t.length;const F=(t,n)=>t.test(n);const M=(t,n)=>t.includes(n);const $=(t,n)=>t.every(n);const x=(t,n)=>N(t)===N(n)&&$(t,((t,s)=>n[s]===t));const A=(t,n)=>t.sort(n);const D=(t,n)=>t.forEach(n);const P=(t,n)=>t.map(n);const k=(t,n,s)=>t.reduce(n,s);const z=(t,...n)=>t.push(...n);const H=t=>t.shift();const W=Object;const q=t=>W.getPrototypeOf(t);const B=W.entries;const G=W.isFrozen;const K=t=>!v(t)&&J(q(t),(t=>t==W.prototype||v(q(t))),(()=>true));const Q=W.keys;const U=W.freeze;const X=(t=[])=>W.fromEntries(t);const Y=(t,n)=>n in t;const Z=(t,n)=>{delete t[n];return t};const tt=(t,n)=>D(B(t),(([t,s])=>n(s,t)));const nt=(t,n)=>P(B(t),(([t,s])=>n(s,t)));const st=(t,n)=>X(nt(t,((t,s)=>[s,n(t,s)])));const ot=t=>N(Q(t));const et=t=>K(t)&&ot(t)==0;const ct=(t,n,s,o=0)=>{if(v(t)||!K(t)||!o&&et(t)||G(t)){s?.();return false}tt(t,((s,o)=>{if(!n(s,o)){Z(t,o)}}));return o?true:!et(t)};const lt=t=>n=>k(ht(n),((n,s)=>n+t(s)),0);const rt=t=>t?.size??0;const at=lt(rt);const it=lt(at);const ut=lt(it);const ft=(t,n)=>t?.has(n)??false;const dt=t=>v(t)||rt(t)==0;const ht=t=>[...t?.values()??[]];const bt=t=>t.clear();const gt=(t,n)=>t?.forEach(n);const Tt=(t,n)=>t?.delete(n);const _t=t=>new Map(t);const pt=t=>[...t?.keys()??[]];const St=(t,n)=>t?.get(n);const wt=(t,n)=>gt(t,((t,s)=>n(s,t)));const mt=(t,n)=>P([...t?.entries()??[]],(([t,s])=>n(s,t)));const Ct=(t,n,s)=>v(s)?(Tt(t,n),t):t?.set(n,s);const Vt=(t,n,s,o)=>{if(!ft(t,n)){Ct(t,n,s())}else{o?.(St(t,n))}return St(t,n)};const It=(t,n,s,o=Ct)=>{st(n,((n,o)=>s(t,o,n)));wt(t,(s=>Y(n,s)?0:o(t,s)));return t};const yt=(t,n,s,o)=>{const e={};gt(t,((t,c)=>{if(!s?.(t,c)){const s=n?n(t,c):t;if(!o?.(s)){e[c]=s}}}));return e};const Rt=(t,n,s)=>yt(t,(t=>yt(t,n,s)),dt,et);const vt=(t,n,s)=>yt(t,(t=>Rt(t,n,s)),dt,et);const Jt=(t,n)=>{const s=_t();gt(t,((t,o)=>s.set(o,n?.(t)??t)));return s};const Lt=t=>Jt(t,Jt);const Et=t=>Jt(t,Lt);const Ot=(t,n,s,o,e=0)=>J((s?Vt:St)(t,n[e],e>N(n)-2?s:_t),(c=>{if(e>N(n)-2){if(o?.(c)){Ct(t,n[e])}return c}const l=Ot(c,n,s,o,e+1);if(dt(c)){Ct(t,n[e])}return l}));const jt=t=>{const s=n(t);return L(s)||s==c&&y(t)?s:undefined};const Nt=(t,n,s,o,e)=>v(e)?t.delCell(n,s,o,true):t.setCell(n,s,o,e);const Ft=(t,n,s)=>v(s)?t.delValue(n):t.setValue(n,s);const Mt=t=>new Set(O(t)||v(t)?t:[t]);const $t=(t,n)=>t?.add(n);const xt=/^\d+$/;const At=()=>{const t=[];let n=0;return[o=>(o?H(t):null)??s+n++,n=>{if(F(xt,n)&&N(t)<1e3){z(t,n)}}]};const Dt=(t,n=[s])=>{const o=[];const e=(t,s)=>s==N(n)?z(o,t):n[s]===null?gt(t,(t=>e(t,s+1))):D([n[s],null],(n=>e(St(t,n),s+1)));e(t,0);return o};const Pt=t=>{let n;const[o,e]=At();const c=_t();const l=(e,l,r,a=[],i=(()=>[]))=>{n??=t();const u=o(1);Ct(c,u,[e,l,r,a,i]);$t(Ot(l,r??[s],Mt),u);return u};const r=(t,s,...o)=>D(Dt(t,s),(t=>gt(t,(t=>St(c,t)[0](n,...s??[],...o)))));const a=t=>J(St(c,t),(([,n,o])=>{Ot(n,o??[s],undefined,(n=>{Tt(n,t);return dt(n)?1:0}));Ct(c,t);e(t);return o}));const i=t=>J(St(c,t),(([t,,s=[],o,e])=>{const c=(...l)=>{const r=N(l);if(r==N(s)){t(n,...l,...e(l))}else if(v(s[r])){D(o[r]?.(...l)??[],(t=>c(...l,t)))}else{c(...l,s[r])}};c()}));return[l,r,a,i]};const kt=(t,n)=>(t??0)<(n??0)?-1:1;const zt=t=>[t,t];const Ht=(t,n=at)=>n(t[0])+n(t[1]);const Wt=()=>[_t(),_t()];const qt=t=>[...t];const Bt=([t,n])=>t===n;const Gt=JSON.stringify;const Kt=JSON.parse;const Qt=t=>Gt(t,((t,n)=>R(n,Map)?W.fromEntries([...n]):n));const Ut=(t,n,s)=>Ct(t,n,St(t,n)==-s?undefined:s);const Xt=()=>{let t;let n;let s=false;let o=false;let e=0;let l=[];const d=_t();const y=_t();const R=_t();const N=_t();const F=_t();const $=_t();const k=_t();const H=_t();const W=_t();const q=_t();const B=_t();const G=_t();const K=_t();const Q=_t();const X=Mt();const tt=_t();const nt=_t();const ot=_t();const lt=_t();const ht=Wt();const Ot=Wt();const xt=Wt();const Dt=Wt();const Gt=Wt();const Yt=Wt();const Zt=Wt();const tn=Wt();const nn=Wt();const sn=Wt();const on=Wt();const en=Wt();const cn=Wt();const ln=Wt();const rn=Wt();const an=Wt();const un=Wt();const fn=Wt();const dn=Wt();const hn=Wt();const bn=Wt();const gn=Wt();const Tn=_t();const _n=Wt();const[pn,Sn,wn,mn]=Pt((()=>jo));const Cn=t=>ct(t,(t=>ct(t,In)));const Vn=t=>ct(t,In);const In=t=>{if(!ct(t,((t,n)=>M([r,a],n)))){return false}const n=t[r];if(!L(n)&&n!=c){return false}if(jt(t[a])!=n){Z(t,a)}return true};const yn=O;const Rn=t=>ct(t,vn,es);const vn=(n,s)=>(!t||ft(B,s)||es(s))&&ct(n,((t,n)=>Jn(s,n,t)),(()=>es(s)));const Jn=(t,n,s,o)=>ct(o?s:jn(s,t,n),((o,e)=>J(Ln(t,n,e,o),(t=>{s[e]=t;return true}),(()=>false))),(()=>es(t,n)));const Ln=(n,s,o,e)=>t?J(St(St(B,n),o),(t=>jt(e)!=t[r]?es(n,s,o,e,t[a]):e),(()=>es(n,s,o,e))):v(jt(e))?es(n,s,o,e):e;const En=(t,n)=>ct(n?t:Nn(t),((n,s)=>J(On(s,n),(n=>{t[s]=n;return true}),(()=>false))),(()=>cs()));const On=(t,s)=>n?J(St(K,t),(n=>jt(s)!=n[r]?cs(t,s,n[a]):s),(()=>cs(t,s))):v(jt(s))?cs(t,s):s;const jn=(t,n,s)=>{J(St(G,n),(([o,e])=>{gt(o,((n,s)=>{if(!Y(t,s)){t[s]=n}}));gt(e,(o=>{if(!Y(t,o)){es(n,s,o)}}))}));return t};const Nn=t=>{if(n){gt(Q,((n,s)=>{if(!Y(t,s)){t[s]=n}}));gt(X,(n=>{if(!Y(t,n)){cs(n)}}))}return t};const Fn=t=>It(B,t,((t,n,s)=>{const o=_t();const e=Mt();It(Vt(B,n,_t),s,((t,n,s)=>{Ct(t,n,s);J(s[a],(t=>Ct(o,n,t)),(()=>$t(e,n)))}));Ct(G,n,[o,e])}),((t,n)=>{Ct(B,n);Ct(G,n)}));const Mn=t=>It(K,t,((t,n,s)=>{Ct(K,n,s);J(s[a],(t=>Ct(Q,n,t)),(()=>$t(X,n)))}),((t,n)=>{Ct(K,n);Ct(Q,n);Tt(X,n)}));const $n=t=>et(t)?eo():zs(t);const xn=([t,n])=>{(et(t)?eo:zs)(t);(et(n)?ao:Ks)(n)};const An=t=>It(ot,t,((t,n,s)=>Dn(n,s)),((t,n)=>Kn(n)));const Dn=(t,n)=>It(Vt(ot,t,(()=>{Yn(t,1);Ct(tt,t,At());Ct(nt,t,_t());return _t()})),n,((n,s,o)=>Pn(t,n,s,o)),((n,s)=>Qn(t,n,s)));const Pn=(t,n,s,o,e)=>It(Vt(n,s,(()=>{Zn(t,s,1);return _t()})),o,((n,o,e)=>kn(t,s,n,o,e)),((o,c)=>Un(t,n,s,o,c,e)));const kn=(t,n,s,o,e)=>{if(!ft(s,o)){ts(t,n,o,1)}const c=St(s,o);if(e!==c){ns(t,n,o,c,e);Ct(s,o,e)}};const zn=(t,n,s,o,e)=>J(St(n,s),(n=>kn(t,s,n,o,e)),(()=>Pn(t,n,s,jn({[o]:e},t,s))));const Hn=t=>et(t)?ao():Ks(t);const Wn=t=>It(lt,t,((t,n,s)=>qn(n,s)),((t,n)=>Xn(n)));const qn=(t,n)=>{if(!ft(lt,t)){ss(t,1)}const s=St(lt,t);if(n!==s){os(t,s,n);Ct(lt,t,n)}};const Bn=(t,n)=>{const[s]=St(tt,t);let o;do{o=s(n)}while(ft(St(ot,t),o));return o};const Gn=t=>St(ot,t)??Dn(t,{});const Kn=t=>Dn(t,{});const Qn=(t,n,s)=>{const[,o]=St(tt,t);o(s);Pn(t,n,s,{},true)};const Un=(t,n,s,o,e,c)=>{const l=St(St(G,t)?.[0],e);if(!v(l)&&!c){return kn(t,s,o,e,l)}const r=n=>{ns(t,s,n,St(o,n));ts(t,s,n,-1);Ct(o,n)};if(v(l)){r(e)}else{wt(o,r)}if(dt(o)){Zn(t,s,-1);if(dt(Ct(n,s))){Yn(t,-1);Ct(ot,t);Ct(tt,t);Ct(nt,t)}}};const Xn=t=>{const n=St(Q,t);if(!v(n)){return qn(t,n)}os(t,St(lt,t));ss(t,-1);Ct(lt,t)};const Yn=(t,n)=>Ut(d,t,n);const Zn=(t,n,s)=>Ut(Vt(N,t,_t),n,s)&&Ct(R,t,Vt(R,t,(()=>0))+s);const ts=(t,n,s,o)=>{const e=St(nt,t);const c=St(e,s)??0;if(c==0&&o==1||c==1&&o==-1){Ut(Vt(y,t,_t),s,o)}Ct(e,s,c!=-o?c+o:null);Ut(Vt(Vt(F,t,_t),n,_t),s,o)};const ns=(t,n,s,o,e)=>{Vt(Vt(Vt($,t,_t),n,_t),s,(()=>[o,0]))[1]=e;l[3]?.(t,n,s,e)};const ss=(t,n)=>Ut(k,t,n);const os=(t,n,s)=>{Vt(H,t,(()=>[n,0]))[1]=s;l[4]?.(t,s)};const es=(t,n,s,o,e)=>{z(Vt(Vt(Vt(W,t,_t),n,_t),s,(()=>[])),o);return e};const cs=(t,n,s)=>{z(Vt(q,t,(()=>[])),n);return s};const ls=(t,n,s)=>J(St(St(St($,t),n),s),(([t,n])=>[true,t,n]),(()=>[false,...zt(Is(t,n,s))]));const rs=t=>J(St(H,t),(([t,n])=>[true,t,n]),(()=>[false,...zt(vs(t))]));const as=t=>!dt(W)&&!dt(an[t])?gt(t?Et(W):W,((n,s)=>gt(n,((n,o)=>gt(n,((n,e)=>Sn(an[t],[s,o,e],n))))))):0;const is=t=>!dt(q)&&!dt(un[t])?gt(t?Jt(q):q,((n,s)=>Sn(un[t],[s],n))):0;const us=(t,n,s,o)=>{if(!dt(t)){Sn(n,o,(()=>yt(t)));wt(t,((t,n)=>Sn(s,[...o??[],t],n==1)));return 1}};const fs=t=>{const n=Js();if(n!=s){Sn(ht[t],undefined,n)}const o=dt(sn[t]);const e=dt(cn[t])&&dt(ln[t])&&dt(nn[t])&&dt(on[t])&&dt(Yt[t])&&dt(Zt[t])&&dt(tn[t])&&o&&dt(xt[t])&&dt(Dt[t]);const c=dt(rn[t])&&dt(en[t])&&dt(Gt[t])&&dt(Ot[t]);if(!e||!c){const n=t?[Jt(d),Lt(y),Jt(R),Lt(N),Et(F),Et($)]:[d,y,R,N,F,$];if(!e){us(n[0],xt[t],Dt[t]);gt(n[1],((n,s)=>us(n,Yt[t],Zt[t],[s])));gt(n[2],((n,s)=>{if(n!=0){Sn(tn[t],[s],Ss(s))}}));const s=Mt();gt(n[3],((n,e)=>{if(us(n,nn[t],on[t],[e])&&!o){Sn(sn[t],[e,null]);$t(s,e)}}));if(!o){gt(n[5],((n,o)=>{if(!ft(s,o)){const s=Mt();gt(n,(t=>gt(t,(([n,o],e)=>o!==n?$t(s,e):Tt(t,e)))));gt(s,(n=>Sn(sn[t],[o,n])))}}))}gt(n[4],((n,s)=>gt(n,((n,o)=>us(n,cn[t],ln[t],[s,o])))))}if(!c){let s;gt(n[5],((n,o)=>{let e;gt(n,((n,c)=>{let l;gt(n,(([n,r],a)=>{if(r!==n){Sn(rn[t],[o,c,a],r,n,ls);s=e=l=1}}));if(l){Sn(en[t],[o,c],ls)}}));if(e){Sn(Gt[t],[o],ls)}}));if(s){Sn(Ot[t],undefined,ls)}}}};const ds=t=>{const n=Ns();if(n!=o){Sn(fn[t],undefined,n)}const s=dt(hn[t])&&dt(bn[t]);const e=dt(gn[t])&&dt(dn[t]);if(!s||!e){const n=t?[Jt(k),Jt(H)]:[k,H];if(!s){us(n[0],hn[t],bn[t])}if(!e){let s;gt(n[1],(([n,o],e)=>{if(o!==n){Sn(gn[t],[e],o,n,rs);s=1}}));if(s){Sn(dn[t],undefined,rs)}}}};const hs=(t,...n)=>{bo((()=>t(...P(n,I))));return jo};const bs=()=>[gs(),ys()];const gs=()=>vt(ot);const Ts=()=>pt(ot);const _s=t=>Rt(St(ot,I(t)));const ps=t=>pt(St(nt,I(t)));const Ss=t=>rt(St(ot,I(t)));const ws=t=>pt(St(ot,I(t)));const ms=(t,n,s,o=0,e)=>P(j(A(mt(St(ot,I(t)),((t,s)=>[v(n)?s:St(t,I(n)),s])),(([t],[n])=>kt(t,n)*(s?-1:1))),o,v(e)?e:o+e),(([,t])=>t));const Cs=(t,n)=>yt(St(St(ot,I(t)),I(n)));const Vs=(t,n)=>pt(St(St(ot,I(t)),I(n)));const Is=(t,n,s)=>St(St(St(ot,I(t)),I(n)),I(s));const ys=()=>yt(lt);const Rs=()=>pt(lt);const vs=t=>St(lt,I(t));const Js=()=>!dt(ot);const Ls=t=>ft(ot,I(t));const Es=(t,n)=>ft(St(nt,I(t)),I(n));const Os=(t,n)=>ft(St(ot,I(t)),I(n));const js=(t,n,s)=>ft(St(St(ot,I(t)),I(n)),I(s));const Ns=()=>!dt(lt);const Fs=t=>ft(lt,I(t));const Ms=()=>Qt(ot);const $s=()=>Qt(lt);const xs=()=>Qt([ot,lt]);const As=()=>Qt(B);const Ds=()=>Qt(K);const Ps=()=>Qt([B,K]);const ks=t=>hs((()=>{const n=E(t)?t():t;if(yn(n)){xn(n)}}));const zs=t=>hs((()=>Rn(t)?An(t):0));const Hs=(t,n)=>hs((t=>vn(n,t)?Dn(t,n):0),t);const Ws=(t,n,s)=>hs(((t,n)=>Jn(t,n,s)?Pn(t,Gn(t),n,s):0),t,n);const qs=(t,n,s=true)=>bo((()=>{let o=undefined;if(Jn(t,o,n)){t=I(t);Pn(t,Gn(t),o=Bn(t,s?1:0),n)}return o}));const Bs=(t,n,s)=>hs(((t,n)=>{if(Jn(t,n,s,1)){const o=Gn(t);st(s,((s,e)=>zn(t,o,n,e,s)))}}),t,n);const Gs=(t,n,s,o)=>hs(((t,n,s)=>J(Ln(t,n,s,E(o)?o(Is(t,n,s)):o),(o=>zn(t,Gn(t),n,s,o)))),t,n,s);const Ks=t=>hs((()=>En(t)?Wn(t):0));const Qs=t=>hs((()=>En(t,1)?st(t,((t,n)=>qn(n,t))):0));const Us=(t,n)=>hs((t=>J(On(t,E(n)?n(vs(t)):n),(n=>qn(t,n)))),t);const Xs=t=>hs((()=>{st(t[0],((t,n)=>v(t)?co(n):st(t,((t,s)=>v(t)?lo(n,s):st(t,((t,o)=>Nt(jo,n,s,o,t)))))));st(t[1],((t,n)=>Ft(jo,n,t)))}));const Ys=t=>{try{$n(Kt(t))}catch{}return jo};const Zs=t=>{try{Hn(Kt(t))}catch{}return jo};const to=t=>hs((()=>{try{const[n,s]=Kt(t);$n(n);Hn(s)}catch{Ys(t)}}));const no=n=>hs((()=>{if(t=Cn(n)){Fn(n);if(!dt(ot)){const t=gs();eo();zs(t)}}}));const so=t=>hs((()=>{if(n=Vn(t)){const s=ys();fo();ao();n=true;Mn(t);Ks(s)}}));const oo=(t,n)=>hs((()=>{no(t);so(n)}));const eo=()=>hs((()=>An({})));const co=t=>hs((t=>ft(ot,t)?Kn(t):0),t);const lo=(t,n)=>hs(((t,n)=>J(St(ot,t),(s=>ft(s,n)?Qn(t,s,n):0))),t,n);const ro=(t,n,s,o)=>hs(((t,n,s)=>J(St(ot,t),(e=>J(St(e,n),(c=>ft(c,s)?Un(t,e,n,c,s,o):0))))),t,n,s);const ao=()=>hs((()=>Wn({})));const io=t=>hs((t=>ft(lt,t)?Xn(t):0),t);const uo=()=>hs((()=>{Fn({});t=false}));const fo=()=>hs((()=>{Mn({});n=false}));const ho=()=>hs((()=>{uo();fo()}));const bo=(t,n)=>{if(e!=-1){go();const s=t();po(n);return s}};const go=()=>{if(e!=-1){e++}if(e==1){l[0]?.();Sn(Tn)}return jo};const To=()=>[yt($,((t,n)=>St(d,n)===-1?undefined:yt(t,((t,s)=>St(St(N,n),s)===-1?undefined:yt(t,(([,t])=>t),(t=>Bt(t)))),dt,et)),dt,et),yt(H,(([,t])=>t),(t=>Bt(t))),1];const _o=()=>[!dt($),!dt(H),vt($,qt,Bt),vt(W),yt(H,qt,Bt),yt(q),yt(d),Rt(N),vt(F),yt(k)];const po=t=>{if(e>0){e--;if(e==0){e=1;as(1);if(!dt($)){fs(1)}is(1);if(!dt(H)){ds(1)}if(t?.(jo)){gt($,((t,n)=>gt(t,((t,s)=>gt(t,(([t],o)=>Nt(jo,n,s,o,t)))))));bt($);gt(H,(([t],n)=>Ft(jo,n,t)));bt(H)}Sn(_n[0],undefined);e=-1;as(0);if(!dt($)){fs(0)}is(0);if(!dt(H)){ds(0)}l[1]?.();Sn(_n[1],undefined);l[2]?.();e=0;s=Js();o=Ns();D([d,y,R,N,F,$,W,k,H,q],bt)}}return jo};const So=t=>gt(ot,((n,s)=>t(s,(t=>gt(n,((n,s)=>t(s,(t=>wt(n,t)))))))));const wo=(t,n)=>wt(St(nt,I(t)),n);const mo=(t,n)=>gt(St(ot,I(t)),((t,s)=>n(s,(n=>wt(t,n)))));const Co=(t,n,s)=>wt(St(St(ot,I(t)),I(n)),s);const Vo=t=>wt(lt,t);const Io=(t,n,s,o,e,c,l)=>{let r=ms(t,n,s,o,e);return pn((()=>{const l=ms(t,n,s,o,e);if(!x(l,r)){r=l;c(jo,t,n,s,o,e,r)}}),sn[l?1:0],[t,n],[Ts])};const yo=t=>pn(t,Tn);const Ro=t=>pn(t,_n[0]);const vo=t=>pn(t,_n[1]);const Jo=t=>{mn(t);return jo};const Lo=t=>{wn(t);return jo};const Eo=()=>({hasTables:Ht(ht),tables:Ht(Ot),tableIds:Ht(xt),hasTable:Ht(Dt),table:Ht(Gt),tableCellIds:Ht(Yt),hasTableCell:Ht(Zt,it),rowCount:Ht(tn),rowIds:Ht(nn),sortedRowIds:Ht(sn),hasRow:Ht(on,it),row:Ht(en,it),cellIds:Ht(cn,it),hasCell:Ht(ln,ut),cell:Ht(rn,ut),invalidCell:Ht(an,ut),hasValues:Ht(fn),values:Ht(dn),valueIds:Ht(hn),hasValue:Ht(bn),value:Ht(gn),invalidValue:Ht(un),transaction:at(Tn)+Ht(_n)});const Oo=(t,n,s,o,e)=>l=[t,n,s,o,e];const jo={getContent:bs,getTables:gs,getTableIds:Ts,getTable:_s,getTableCellIds:ps,getRowCount:Ss,getRowIds:ws,getSortedRowIds:ms,getRow:Cs,getCellIds:Vs,getCell:Is,getValues:ys,getValueIds:Rs,getValue:vs,hasTables:Js,hasTable:Ls,hasTableCell:Es,hasRow:Os,hasCell:js,hasValues:Ns,hasValue:Fs,getTablesJson:Ms,getValuesJson:$s,getJson:xs,getTablesSchemaJson:As,getValuesSchemaJson:Ds,getSchemaJson:Ps,hasTablesSchema:()=>t,hasValuesSchema:()=>n,setContent:ks,setTables:zs,setTable:Hs,setRow:Ws,addRow:qs,setPartialRow:Bs,setCell:Gs,setValues:Ks,setPartialValues:Qs,setValue:Us,applyChanges:Xs,setTablesJson:Ys,setValuesJson:Zs,setJson:to,setTablesSchema:no,setValuesSchema:so,setSchema:oo,delTables:eo,delTable:co,delRow:lo,delCell:ro,delValues:ao,delValue:io,delTablesSchema:uo,delValuesSchema:fo,delSchema:ho,transaction:bo,startTransaction:go,getTransactionChanges:To,getTransactionLog:_o,finishTransaction:po,forEachTable:So,forEachTableCell:wo,forEachRow:mo,forEachCell:Co,forEachValue:Vo,addSortedRowIdsListener:Io,addStartTransactionListener:yo,addWillFinishTransactionListener:Ro,addDidFinishTransactionListener:vo,callListener:Jo,delListener:Lo,getListenerStats:Eo,isMergeable:()=>false,createStore:Xt,addListener:pn,callListeners:Sn,setInternalListeners:Oo};st({[f+b]:[0,ht,[],()=>[Js()]],[b]:[0,Ot],[g]:[0,xt],[f+h]:[1,Dt,[Ts],t=>[Ls(...t)]],[h]:[1,Gt,[Ts]],[h+w]:[1,Yt,[Ts]],[f+h+S]:[2,Zt,[Ts,ps],t=>[Es(...t)]],[_]:[1,tn,[Ts]],[p]:[1,nn,[Ts]],[f+T]:[2,on,[Ts,ws],t=>[Os(...t)]],[T]:[2,en,[Ts,ws]],[w]:[2,cn,[Ts,ws]],[f+S]:[3,ln,[Ts,ws,Vs],t=>[js(...t)]],[S]:[3,rn,[Ts,ws,Vs],t=>zt(Is(...t))],InvalidCell:[3,an],[f+C]:[0,fn,[],()=>[Ns()]],[C]:[0,dn],[V]:[0,hn],[f+m]:[1,bn,[Rs],t=>[Fs(...t)]],[m]:[1,gn,[Rs],t=>zt(vs(t[0]))],InvalidValue:[1,un]},(([t,n,s,o],e)=>{jo[u+e+i]=(...e)=>pn(e[t],n[e[t+1]?1:0],t>0?j(e,0,t):undefined,s,o)}));return U(jo)};const Yt=Xt();Yt.delTables();Yt.delValues();console.log("[STORE] Data store initialized.");const Zt=(t,n)=>{try{return JSON.parse(t)}catch(t){return n||null}};const tn=t=>{const n={};for(let s in t){if(typeof t[s]==="string"||typeof t[s]==="number"||typeof t[s]==="boolean"){n[s]=t[s]}else if(t[s]===null){n[`__null__${s}`]=""}else if(Array.isArray(t[s])){n[`__array__${s}`]=JSON.stringify(t[s])}else if(typeof t[s]==="object"){n[`__object__${s}`]=JSON.stringify(t[s])}}return n};const nn=t=>{const n={};for(let s in t){if(s.startsWith("__null__")){n[s.replace("__null__","")]=null}else if(typeof t[s]==="string"&&s.startsWith("__array__")){n[s.replace("__array__","")]=Zt(t[s])}else if(typeof t[s]==="string"&&s.startsWith("__object__")){n[s.replace("__object__","")]=Zt(t[s])}else{n[s]=t[s]}}return n};const sn={store:Yt,subscribe(t,n,s,o,e){if(Yt.hasRow(t,n)){e(nn(Yt.getRow(t,n)))}const c=Yt.addRowListener(t,n,(()=>{const s=Yt.getRow(t,n);e(nn(s))}));if(!Yt.hasRow(t,n)||o){console.log("[STORE] Loading/reloading",{tableId:t,rowId:n});s().then((s=>{Yt.setRow(t,n,tn(s))})).catch((s=>{console.error("[STORE] Error getting row",{tableId:t,rowId:n,forceReload:o},s)}))}return c},unsubscribe(t){Yt.delListener(t)},async getTemplate(n,s,o=false){if(!o){if(!Yt.hasRow("templates",s)){return null}const t=Yt.getRow("templates",s);return nn(t)}const e=await t(n,s);console.log("[STORE] Reloading template",e);Yt.setRow("templates",s,tn(e));return e},updateTemplate(t,n){Yt.setRow("templates",t,tn(n));return n},async getEnvelope(n,s,o=false){if(!o){if(!Yt.hasRow("envelopes",s)){return null}const t=Yt.getRow("envelopes",s);return nn(t)}const e=await t(n,s);Yt.setRow("envelopes",s,tn(e));return e},updateEnvelope(t,n){Yt.setRow("envelopes",t,tn(n));return n},getField(t,n,s,o){if(t==="template"){const t=Yt.getRow("templates",n);const e=nn(t);const c=(e.fields||[]).find((t=>t.name===s));const l=(e.roles||[]).map((t=>t.name));const r=l.findIndex((t=>t===c.role_name));return{index:Math.max(r,0),field:o||c}}else{const t=Yt.getRow("envelopes",n);const e=nn(t);const c=(e.fields||[]).find((t=>t.name===s));const l=(e.recipients||[]).map((t=>t.role_name));const r=l.findIndex((t=>t===c.role_name));return{index:r,field:o||c}}}};export{sn as S};
2
+ //# sourceMappingURL=p-d4be87ef.js.map