@verdocs/web-sdk 5.0.2 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/dist/cjs/{Datastore-b1742da2.js → Datastore-5b860927.js} +2 -2
  2. package/dist/cjs/index-ccac8641.js +4 -4
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{utils-ba1e95e0.js → utils-30de2530.js} +2 -4
  5. package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-button_2.cjs.entry.js +2 -2
  7. package/dist/cjs/verdocs-checkbox_6.cjs.entry.js +8 -8
  8. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +2 -2
  9. package/dist/cjs/verdocs-dialog.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +2 -2
  11. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +3 -3
  12. package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +7 -7
  15. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +4 -4
  16. package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +2 -2
  19. package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +241 -0
  20. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-organization-card_2.cjs.entry.js +2 -2
  22. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
  23. package/dist/cjs/verdocs-preview_6.cjs.entry.js +2865 -158
  24. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  27. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  28. package/dist/cjs/verdocs-spinner.cjs.entry.js +1 -1
  29. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
  30. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  31. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +3 -3
  32. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  33. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  34. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  35. package/dist/collection/collection-manifest.json +1 -0
  36. package/dist/collection/components/controls/verdocs-help-icon/verdocs-help-icon.css +1 -1
  37. package/dist/collection/components/controls/verdocs-help-icon/verdocs-help-icon.js +1 -1
  38. package/dist/collection/components/controls/verdocs-menu-panel/verdocs-menu-panel.css +42 -0
  39. package/dist/collection/components/controls/verdocs-menu-panel/verdocs-menu-panel.js +159 -0
  40. package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.js +1 -1
  41. package/dist/collection/components/controls/verdocs-pagination/verdocs-pagination.js +1 -1
  42. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js +1 -1
  43. package/dist/collection/components/controls/verdocs-progress-bar/verdocs-progress-bar.js +1 -1
  44. package/dist/collection/components/controls/verdocs-radio-button/verdocs-radio-button.js +1 -1
  45. package/dist/collection/components/controls/verdocs-select-input/verdocs-select-input.css +2 -2
  46. package/dist/collection/components/controls/verdocs-select-input/verdocs-select-input.js +1 -1
  47. package/dist/collection/components/controls/verdocs-spinner/verdocs-spinner.js +1 -1
  48. package/dist/collection/components/controls/verdocs-switch/verdocs-switch.js +2 -2
  49. package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.css +2 -2
  50. package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.js +4 -4
  51. package/dist/collection/components/controls/verdocs-toggle-button/verdocs-toggle-button.js +1 -1
  52. package/dist/collection/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.js +1 -1
  53. package/dist/collection/components/dialogs/verdocs-dialog/verdocs-dialog.js +1 -1
  54. package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +1 -1
  55. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +1 -1
  56. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +1 -1
  57. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +1 -1
  58. package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
  59. package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
  60. package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
  61. package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
  62. package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
  63. package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
  64. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.css +1 -0
  65. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.css +27 -42
  66. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +12 -14
  67. package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.css +74 -120
  68. package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +145 -101
  69. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
  70. package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
  71. package/dist/collection/utils/Datastore.js +2 -2
  72. package/dist/collection/utils/utils.js +2 -4
  73. package/dist/components/index.js +2 -0
  74. package/dist/components/{p-ed88b8d2.js → p-005c3387.js} +3 -3
  75. package/dist/components/{p-0d063bf9.js → p-052fcdac.js} +4 -4
  76. package/dist/components/{p-0a69031f.js → p-053a0408.js} +6 -6
  77. package/dist/components/{p-4bc5ac82.js → p-093d51c8.js} +2 -4
  78. package/dist/components/{p-5d82a9f3.js → p-15b1e7a0.js} +10 -8
  79. package/dist/components/{p-6400f542.js → p-1a77c51b.js} +6 -6
  80. package/dist/components/{p-f990140a.js → p-2ef2d490.js} +2 -2
  81. package/dist/components/{p-c8fedb4e.js → p-325b3828.js} +6 -6
  82. package/dist/components/{p-8d3c0b4c.js → p-332a97b3.js} +2 -2
  83. package/dist/components/{p-b0c02eb8.js → p-3a621e5d.js} +7 -7
  84. package/dist/components/{p-18999830.js → p-41a75ad6.js} +1 -1
  85. package/dist/components/{p-5eb45a4f.js → p-44ae3c75.js} +1 -1
  86. package/dist/components/{p-1e2e8b1c.js → p-4d3b9ee9.js} +1 -1
  87. package/dist/components/{p-1e67ebdf.js → p-53585e13.js} +18 -26
  88. package/dist/components/{p-c7b00ce6.js → p-5654568d.js} +1 -1
  89. package/dist/components/{p-ecc818bb.js → p-5df09a0d.js} +6 -6
  90. package/dist/components/{p-315d6592.js → p-62743fd3.js} +2 -2
  91. package/dist/components/{p-dd701894.js → p-6506ddb4.js} +6 -6
  92. package/dist/components/{p-5d4bbcd0.js → p-6719b0d7.js} +1 -1
  93. package/dist/components/{p-d9704a51.js → p-6c18617e.js} +6 -6
  94. package/dist/components/{p-fd96322b.js → p-7246d2ee.js} +6 -6
  95. package/dist/components/{p-0ca7012b.js → p-7f32e087.js} +2 -2
  96. package/dist/components/{p-22e52874.js → p-987a8392.js} +24 -24
  97. package/dist/components/{p-b9034018.js → p-9c0b30f8.js} +3 -3
  98. package/dist/components/{p-b16c202a.js → p-9cfd8022.js} +1 -1
  99. package/dist/components/{p-a3e12c74.js → p-9fb98ea2.js} +1 -1
  100. package/dist/components/p-a06a0184.js +3055 -0
  101. package/dist/components/{p-f72b9c45.js → p-a2f6d2c6.js} +1 -1
  102. package/dist/components/{p-1ca705bc.js → p-b36c979b.js} +6 -6
  103. package/dist/components/{p-da4d4eed.js → p-b712e729.js} +2 -2
  104. package/dist/components/{p-cf6ea837.js → p-b7d080eb.js} +1 -1
  105. package/dist/components/p-be261487.js +79 -0
  106. package/dist/components/{p-9bb47a5a.js → p-c00770e6.js} +1 -1
  107. package/dist/components/{p-4afcdc84.js → p-c9a4ef35.js} +6 -6
  108. package/dist/components/{p-9c3fd545.js → p-ca8e3721.js} +8 -8
  109. package/dist/components/{p-5a9cea40.js → p-cce871bf.js} +3 -3
  110. package/dist/components/{p-a22a3b1b.js → p-cef9df4b.js} +21 -21
  111. package/dist/components/{p-15d530b8.js → p-d9074622.js} +4 -4
  112. package/dist/components/{p-ec894daf.js → p-ed4f91be.js} +1 -1
  113. package/dist/components/{p-c25e82b9.js → p-f0f1ed82.js} +21 -21
  114. package/dist/components/{p-58c2bd5d.js → p-f0f6e862.js} +2 -2
  115. package/dist/components/{p-49153610.js → p-f21ef4fb.js} +7 -7
  116. package/dist/components/{p-fcad60f5.js → p-f4e068a9.js} +2 -2
  117. package/dist/components/{p-2548f3f0.js → p-f7462b26.js} +1 -1
  118. package/dist/components/verdocs-auth.js +2 -2
  119. package/dist/components/verdocs-build.js +64 -58
  120. package/dist/components/verdocs-contact-picker.js +1 -1
  121. package/dist/components/verdocs-dialog.js +1 -1
  122. package/dist/components/verdocs-dropdown.js +1 -1
  123. package/dist/components/verdocs-envelope-document-page.js +1 -1
  124. package/dist/components/verdocs-envelope-recipient-link.js +1 -1
  125. package/dist/components/verdocs-envelope-recipient-summary.js +1 -1
  126. package/dist/components/verdocs-envelope-sidebar.js +8 -8
  127. package/dist/components/verdocs-envelopes-list.js +15 -15
  128. package/dist/components/verdocs-field-attachment.js +1 -1
  129. package/dist/components/verdocs-field-checkbox.js +1 -1
  130. package/dist/components/verdocs-field-date.js +1 -1
  131. package/dist/components/verdocs-field-dropdown.js +1 -1
  132. package/dist/components/verdocs-field-initial.js +1 -1
  133. package/dist/components/verdocs-field-payment.js +6 -6
  134. package/dist/components/verdocs-field-radio.js +1 -1
  135. package/dist/components/verdocs-field-signature.js +1 -1
  136. package/dist/components/verdocs-field-textarea.js +1 -1
  137. package/dist/components/verdocs-field-textbox.js +1 -1
  138. package/dist/components/verdocs-field-timestamp.js +1 -1
  139. package/dist/components/verdocs-help-icon.js +1 -1
  140. package/dist/components/verdocs-initial-dialog.js +1 -1
  141. package/dist/components/verdocs-menu-panel.d.ts +11 -0
  142. package/dist/components/verdocs-menu-panel.js +6 -0
  143. package/dist/components/verdocs-ok-dialog.js +1 -1
  144. package/dist/components/verdocs-organization-card.js +2 -2
  145. package/dist/components/verdocs-pagination.js +1 -1
  146. package/dist/components/verdocs-portal.js +1 -1
  147. package/dist/components/verdocs-preview.js +1 -1
  148. package/dist/components/verdocs-progress-bar.js +1 -1
  149. package/dist/components/verdocs-quick-filter.js +1 -1
  150. package/dist/components/verdocs-quick-functions.js +1 -1
  151. package/dist/components/verdocs-radio-button.js +1 -1
  152. package/dist/components/verdocs-search-tabs.js +1 -1
  153. package/dist/components/verdocs-select-input.js +1 -1
  154. package/dist/components/verdocs-send.js +1 -1
  155. package/dist/components/verdocs-sign.js +7 -7
  156. package/dist/components/verdocs-signature-dialog.js +1 -1
  157. package/dist/components/verdocs-spinner.js +1 -1
  158. package/dist/components/verdocs-status-indicator.js +1 -1
  159. package/dist/components/verdocs-switch.js +1 -1
  160. package/dist/components/verdocs-template-attachments.js +1 -1
  161. package/dist/components/verdocs-template-build-tabs.js +1 -1
  162. package/dist/components/verdocs-template-card.js +1 -1
  163. package/dist/components/verdocs-template-create.js +1 -1
  164. package/dist/components/verdocs-template-document-page.js +1 -1
  165. package/dist/components/verdocs-template-field-properties.js +1 -1
  166. package/dist/components/verdocs-template-fields.js +1 -1
  167. package/dist/components/verdocs-template-role-properties.js +1 -1
  168. package/dist/components/verdocs-template-roles.js +1 -1
  169. package/dist/components/verdocs-template-star.js +1 -1
  170. package/dist/components/verdocs-template-tags.js +1 -1
  171. package/dist/components/verdocs-templates-list.js +9 -9
  172. package/dist/components/verdocs-text-input.js +1 -1
  173. package/dist/components/verdocs-toggle-button.js +1 -1
  174. package/dist/components/verdocs-toolbar-icon.js +1 -1
  175. package/dist/components/verdocs-upload-dialog.js +1 -1
  176. package/dist/components/verdocs-view.js +1 -1
  177. package/dist/custom-elements.json +31 -2
  178. package/dist/esm/{Datastore-52fcbac6.js → Datastore-d29d4aeb.js} +2 -2
  179. package/dist/esm/index-272d51a4.js +4 -4
  180. package/dist/esm/loader.js +1 -1
  181. package/dist/esm/{utils-47de6f79.js → utils-a5f5c427.js} +2 -4
  182. package/dist/esm/verdocs-build.entry.js +1 -1
  183. package/dist/esm/verdocs-button_2.entry.js +2 -2
  184. package/dist/esm/verdocs-checkbox_6.entry.js +8 -8
  185. package/dist/esm/verdocs-contact-picker_2.entry.js +2 -2
  186. package/dist/esm/verdocs-dialog.entry.js +1 -1
  187. package/dist/esm/verdocs-envelope-document-page.entry.js +2 -2
  188. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +3 -3
  189. package/dist/esm/verdocs-envelope-recipient-summary.entry.js +1 -1
  190. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  191. package/dist/esm/verdocs-envelopes-list.entry.js +7 -7
  192. package/dist/esm/verdocs-field-attachment_13.entry.js +4 -4
  193. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  194. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  195. package/dist/esm/verdocs-kba-dialog_2.entry.js +2 -2
  196. package/dist/esm/verdocs-menu-panel_2.entry.js +236 -0
  197. package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
  198. package/dist/esm/verdocs-organization-card_2.entry.js +2 -2
  199. package/dist/esm/verdocs-pagination_2.entry.js +2 -2
  200. package/dist/esm/verdocs-preview_6.entry.js +2813 -106
  201. package/dist/esm/verdocs-quick-functions.entry.js +1 -1
  202. package/dist/esm/verdocs-radio-button.entry.js +1 -1
  203. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  204. package/dist/esm/verdocs-sign.entry.js +1 -1
  205. package/dist/esm/verdocs-spinner.entry.js +1 -1
  206. package/dist/esm/verdocs-status-indicator.entry.js +2 -2
  207. package/dist/esm/verdocs-template-card.entry.js +1 -1
  208. package/dist/esm/verdocs-template-document-page_2.entry.js +3 -3
  209. package/dist/esm/verdocs-template-star.entry.js +1 -1
  210. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  211. package/dist/esm/verdocs-web-sdk.js +1 -1
  212. package/dist/esm-es5/{Datastore-52fcbac6.js → Datastore-d29d4aeb.js} +1 -1
  213. package/dist/esm-es5/index-272d51a4.js +1 -1
  214. package/dist/esm-es5/loader.js +1 -1
  215. package/dist/esm-es5/{utils-47de6f79.js → utils-a5f5c427.js} +1 -1
  216. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  217. package/dist/esm-es5/verdocs-button_2.entry.js +1 -1
  218. package/dist/esm-es5/verdocs-checkbox_6.entry.js +1 -1
  219. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  220. package/dist/esm-es5/verdocs-dialog.entry.js +1 -1
  221. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  222. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  223. package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
  224. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  225. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  226. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  227. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  228. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  229. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
  230. package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -0
  231. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  232. package/dist/esm-es5/verdocs-organization-card_2.entry.js +1 -1
  233. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  234. package/dist/esm-es5/verdocs-preview_6.entry.js +7 -1
  235. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  236. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -1
  237. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  238. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  239. package/dist/esm-es5/verdocs-spinner.entry.js +1 -1
  240. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  241. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  242. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  243. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  244. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  245. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  246. package/dist/types/components/controls/verdocs-menu-panel/verdocs-menu-panel.d.ts +38 -0
  247. package/dist/types/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.d.ts +1 -1
  248. package/dist/types/components/templates/verdocs-template-roles/verdocs-template-roles.d.ts +5 -3
  249. package/dist/types/components.d.ts +101 -8
  250. package/dist/verdocs-web-sdk/{p-65c5398e.entry.js → p-152b9acd.entry.js} +1 -1
  251. package/dist/verdocs-web-sdk/{p-c9f40726.system.entry.js → p-1d5b9103.system.entry.js} +1 -1
  252. package/dist/verdocs-web-sdk/{p-3364cc13.system.entry.js → p-1e191c20.system.entry.js} +1 -1
  253. package/dist/verdocs-web-sdk/{p-7464b84f.entry.js → p-1e495c60.entry.js} +1 -1
  254. package/dist/verdocs-web-sdk/{p-167e3d7e.entry.js → p-2224ca6d.entry.js} +1 -1
  255. package/dist/verdocs-web-sdk/{p-bd7406ae.entry.js → p-27da4a2b.entry.js} +1 -1
  256. package/dist/verdocs-web-sdk/{p-914e131c.system.entry.js → p-2eae32d9.system.entry.js} +1 -1
  257. package/dist/verdocs-web-sdk/p-306bde40.system.entry.js +1 -0
  258. package/dist/verdocs-web-sdk/{p-0e9de098.entry.js → p-30c3f624.entry.js} +1 -1
  259. package/dist/verdocs-web-sdk/{p-8d401072.system.entry.js → p-3268dad0.system.entry.js} +1 -1
  260. package/dist/verdocs-web-sdk/p-365ed258.entry.js +1 -0
  261. package/dist/verdocs-web-sdk/{p-ddb17b3e.entry.js → p-39b72c10.entry.js} +1 -1
  262. package/dist/verdocs-web-sdk/{p-f5d01982.system.entry.js → p-417f71da.system.entry.js} +1 -1
  263. package/dist/verdocs-web-sdk/{p-b8737f7b.entry.js → p-42b157d2.entry.js} +1 -1
  264. package/dist/verdocs-web-sdk/{p-771c2f92.entry.js → p-47f32221.entry.js} +1 -1
  265. package/dist/verdocs-web-sdk/p-48ff3cce.system.entry.js +1 -0
  266. package/dist/verdocs-web-sdk/{p-3a1fa556.system.entry.js → p-4c807fe2.system.entry.js} +1 -1
  267. package/dist/verdocs-web-sdk/{p-b0b958a0.entry.js → p-51c97029.entry.js} +1 -1
  268. package/dist/verdocs-web-sdk/{p-c18c718f.system.js → p-55de8cd1.system.js} +1 -1
  269. package/dist/verdocs-web-sdk/{p-7c8938e7.system.entry.js → p-5824962b.system.entry.js} +1 -1
  270. package/dist/verdocs-web-sdk/{p-aebb0cd9.system.entry.js → p-5aa76635.system.entry.js} +1 -1
  271. package/dist/verdocs-web-sdk/{p-89cdecac.system.entry.js → p-5b0cd815.system.entry.js} +1 -1
  272. package/dist/verdocs-web-sdk/{p-a08886c1.system.entry.js → p-5ce491ac.system.entry.js} +1 -1
  273. package/dist/verdocs-web-sdk/{p-c6fd3e53.system.entry.js → p-6237ce51.system.entry.js} +1 -1
  274. package/dist/verdocs-web-sdk/{p-c7cd6843.entry.js → p-660bda06.entry.js} +1 -1
  275. package/dist/verdocs-web-sdk/{p-2be751c4.system.js → p-736a2c41.system.js} +1 -1
  276. package/dist/verdocs-web-sdk/{p-97b00cae.system.entry.js → p-7e73805f.system.entry.js} +1 -1
  277. package/dist/verdocs-web-sdk/{p-8c03fc69.entry.js → p-8025cac7.entry.js} +1 -1
  278. package/dist/verdocs-web-sdk/{p-584113d1.entry.js → p-87ac8456.entry.js} +1 -1
  279. package/dist/verdocs-web-sdk/{p-9d0b0e36.system.entry.js → p-899617aa.system.entry.js} +1 -1
  280. package/dist/verdocs-web-sdk/{p-2a1287ec.entry.js → p-899fa588.entry.js} +1 -1
  281. package/dist/verdocs-web-sdk/{p-511a4ecc.system.entry.js → p-90bc3ad0.system.entry.js} +1 -1
  282. package/dist/verdocs-web-sdk/{p-a242aa80.system.entry.js → p-917aab58.system.entry.js} +1 -1
  283. package/dist/verdocs-web-sdk/{p-524f37a0.entry.js → p-92364765.entry.js} +1 -1
  284. package/dist/verdocs-web-sdk/{p-f9b37af2.system.entry.js → p-94fe5817.system.entry.js} +1 -1
  285. package/dist/verdocs-web-sdk/{p-41cbf650.entry.js → p-99b819ad.entry.js} +1 -1
  286. package/dist/verdocs-web-sdk/{p-df04f0ca.entry.js → p-a8809e33.entry.js} +1 -1
  287. package/dist/verdocs-web-sdk/{p-a9635106.system.entry.js → p-ac6ecfad.system.entry.js} +1 -1
  288. package/dist/verdocs-web-sdk/{p-62f15675.system.entry.js → p-ad3d07a6.system.entry.js} +1 -1
  289. package/dist/verdocs-web-sdk/{p-df392ef9.entry.js → p-af1802b6.entry.js} +1 -1
  290. package/dist/verdocs-web-sdk/p-b712e729.js +1 -0
  291. package/dist/verdocs-web-sdk/{p-a165607e.entry.js → p-be4ec401.entry.js} +1 -1
  292. package/dist/verdocs-web-sdk/{p-bcc23811.entry.js → p-bea73364.entry.js} +1 -1
  293. package/dist/verdocs-web-sdk/{p-e5d291f3.system.entry.js → p-c253ae24.system.entry.js} +1 -1
  294. package/dist/verdocs-web-sdk/{p-0ca1e87c.entry.js → p-c2766b5a.entry.js} +1 -1
  295. package/dist/verdocs-web-sdk/{p-6ced37ed.entry.js → p-c3593d47.entry.js} +1 -1
  296. package/dist/verdocs-web-sdk/{p-ca712f40.system.entry.js → p-c60743ac.system.entry.js} +1 -1
  297. package/dist/verdocs-web-sdk/{p-37d747fb.system.entry.js → p-c94b0dc5.system.entry.js} +1 -1
  298. package/dist/verdocs-web-sdk/{p-78191329.system.entry.js → p-cb7aa6b8.system.entry.js} +1 -1
  299. package/dist/verdocs-web-sdk/{p-650697bd.js → p-cfed8cc1.js} +1 -1
  300. package/dist/verdocs-web-sdk/p-d6104d4b.system.entry.js +7 -0
  301. package/dist/verdocs-web-sdk/{p-54f085d1.entry.js → p-db4c36aa.entry.js} +1 -1
  302. package/dist/verdocs-web-sdk/{p-d475fff3.entry.js → p-dc558be5.entry.js} +1 -1
  303. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
  304. package/dist/verdocs-web-sdk/{p-8221a48f.entry.js → p-e2de6329.entry.js} +1 -1
  305. package/dist/verdocs-web-sdk/{p-80ce3711.system.entry.js → p-e6d711e0.system.entry.js} +1 -1
  306. package/dist/verdocs-web-sdk/p-f1e2ec72.entry.js +8 -0
  307. package/dist/verdocs-web-sdk/{p-860b9f94.system.entry.js → p-f3b5052f.system.entry.js} +1 -1
  308. package/dist/verdocs-web-sdk/{p-8a2ff048.entry.js → p-f40fe8d7.entry.js} +1 -1
  309. package/dist/verdocs-web-sdk/{p-e83cd333.entry.js → p-f6b77cd1.entry.js} +1 -1
  310. package/dist/verdocs-web-sdk/{p-d98cbd0f.system.entry.js → p-f84932fd.system.entry.js} +1 -1
  311. package/dist/verdocs-web-sdk/{p-f4fcf7a5.entry.js → p-fc90cc87.entry.js} +1 -1
  312. package/dist/verdocs-web-sdk/{p-386d789c.system.entry.js → p-ff8143df.system.entry.js} +1 -1
  313. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  314. package/package.json +5 -4
  315. package/dist/cjs/verdocs-template-role-properties.cjs.entry.js +0 -184
  316. package/dist/components/p-8fbc64e9.js +0 -349
  317. package/dist/components/p-ea5954bd.js +0 -4
  318. package/dist/esm/verdocs-template-role-properties.entry.js +0 -180
  319. package/dist/esm-es5/verdocs-template-role-properties.entry.js +0 -1
  320. package/dist/verdocs-web-sdk/p-81c8663f.entry.js +0 -1
  321. package/dist/verdocs-web-sdk/p-9567cb7d.system.entry.js +0 -1
  322. package/dist/verdocs-web-sdk/p-982f1b36.system.entry.js +0 -1
  323. package/dist/verdocs-web-sdk/p-bb0effe1.entry.js +0 -1
  324. package/dist/verdocs-web-sdk/p-da4d4eed.js +0 -1
  325. package/dist/verdocs-web-sdk/p-edfb1951.system.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as t,h as o,F as i,H as s}from"./p-b9654a5e.js";import{VerdocsEndpoint as a,formatFullName as c,isValidEmail as r}from"@verdocs/js-sdk";import{h as d}from"./p-650697bd.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";const l=class{constructor(o){e(this,o),this.searchContacts=t(this,"searchContacts",7),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.endpoint=a.getDefault(),this.templateRole=null,this.contactSuggestions=[],this.first_name=void 0,this.last_name=void 0,this.email=void 0,this.phone=void 0,this.zip=void 0,this.address=void 0,this.message=void 0,this.showSuggestions=!1,this.showMessage=!1,this.delegator=!1,this.showKba=!1,this.kba_method="",this.kba_pin="",this.nameFieldId=`verdocs-contact-picker-name-${Math.random().toString(36).substring(2,11)}`,this.firstNameFieldId=`verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2,11)}`,this.lastNameFieldId=`verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2,11)}`,this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`,this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`}componentWillLoad(){if(this.templateRole){const e=c(this.templateRole).split(" "),t=this.templateRole.first_name||e.shift()||"",o=this.templateRole.last_name||e.join(" ")||"";this.first_name=t,this.last_name=o,this.email=this.templateRole.email||"",this.phone=this.templateRole.phone||"",this.delegator=this.templateRole.delegator||!1,this.message=this.templateRole.message||"",this.showMessage=""!==this.message,this.kba_method=this.templateRole.kba_method||"",this.kba_pin=this.templateRole.kba_pin||"",this.showKba=!!this.kba_method}}handleFirstNameChange(e){var t;this.first_name=e.target.value,null===(t=this.searchContacts)||void 0===t||t.emit({query:this.first_name})}handleLastNameChange(e){var t;this.last_name=e.target.value,null===(t=this.searchContacts)||void 0===t||t.emit({query:this.last_name})}handleCancel(e){var t;e.stopPropagation(),this.showSuggestions=!1,null===(t=this.exit)||void 0===t||t.emit()}handleSubmit(e){var t;e.stopPropagation(),this.showSuggestions=!1,null===(t=this.next)||void 0===t||t.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,kba_method:this.kba_method,kba_pin:this.kba_pin,address:this.address,zip:this.zip})}handleSelectSuggestion(e,t){e.stopPropagation(),this.first_name=t.first_name,this.last_name=t.last_name,this.email=t.email,this.phone=t.phone,this.showSuggestions=!1}render(){const e=this.first_name&&this.last_name&&r(this.email)&&(!this.kba_method||"pin"===this.kba_method&&this.kba_pin||"identity"===this.kba_method);return o("form",{key:"2ce99d1c3ae979f25dde56e4a9dc7ec56cec2542",onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},o("div",{key:"6257ebf610c9ea9a8f6238311ad1b4ed0095e498",class:"row"},o("label",{key:"c36d51599847033b0c096c9d5de7d8af49e05c7d",htmlFor:this.nameFieldId},"Name:"),o("div",{key:"23cdb2afffff2ede3429c8591093eb89ca89d4b6",class:"names-row"},o("input",{key:"d281392383863edbcfc14440e18631b97962ea2f",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.first_name,placeholder:"First...",onFocus:()=>{var e;return this.showSuggestions=(null===(e=this.contactSuggestions)||void 0===e?void 0:e.length)>0},onInput:e=>this.handleFirstNameChange(e)}),o("input",{key:"eea0626eb854ae95c32ad7e98d479a614e7df81c",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.last_name,placeholder:"Last...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.handleLastNameChange(e)})),this.showSuggestions&&o("div",{key:"2e3fc57f42e3281b83b03e53b92c07243dcff544",class:"dropdown"},this.contactSuggestions.filter((e=>!this.first_name||e.first_name.toLowerCase().includes(this.first_name.toLowerCase()))).map((e=>{var t;return o("div",{key:null!==(t=e.id)&&void 0!==t?t:e.email,class:"suggestion",onClick:t=>this.handleSelectSuggestion(t,e)},e.picture?o("img",{alt:"Avatar",class:"avatar",src:e.picture}):o("div",{class:"avatar",innerHTML:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-user"><path d="M15 13a3 3 0 1 0-6 0"/><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/><circle cx="12" cy="8" r="2"/></svg>'}),o("div",{class:"details"},o("div",{class:"name"},c(e)),e.email&&o("div",{class:"destination"},e.email),e.phone&&o("div",{class:"destination"},e.phone)))})))),o("div",{key:"f18fd6d889ea70f8a5e51bd1780007b3ff061b56",class:"row"},o("label",{key:"5cda3922bb705ed0d3af00644df9ef8d42042021",htmlFor:this.emailFieldId},"Email:"),o("input",{key:"34474c4c8bbbde2802b3c2f58ea3abed4b3e27f6",id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email address...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.email=e.target.value})),o("div",{key:"c757b186ca60272855ed5701c59857856dcd863f",class:"row"},o("label",{key:"1d971705ab36609db6a4e9cb7d24281d98441cd5",htmlFor:this.phoneFieldId},"Phone:"),o("input",{key:"2a516e28498a6727409ef51e61ca3fe912c65789",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone (SMS)...",onFocus:()=>this.showSuggestions=!1,onInput:e=>{this.phone=d(e.target.value)}})),this.showKba&&o(i,{key:"05cdb2c78abc3156d04a012c40a52f2c6ab24a86"},o("div",{key:"56d53a04ba6ab45ecc30f11e44669ad503400a49",class:"kba-row"},o("label",{key:"8af91071db065071bb40e931ea92231f31e9c0c9"},"KBA:"),o("verdocs-select-input",{key:"3f2eec31ee0078779eeed5d3f2fbd222fcdbaa42",value:this.kba_method,onInput:e=>{this.kba_method=e.target.value,this.zip="",this.address="",this.kba_pin=""},options:[{label:"None",value:""},{label:"PIN Code",value:"pin"},{label:"Full Verification",value:"identity"}]}),o("div",{key:"33e9efc07399e6930264b4b79f73a5497728c7c7",style:{flex:"1"}}),o("verdocs-help-icon",{key:"bc5ec8ad3fcf22a4f9a0f4659b574e238526574a",text:"Knowledge-Based Authentication adds additional authentication for this user either via a simple PIN code or full address validation. NOTE: There may be a fee for using this feature."})),"pin"===this.kba_method&&o("div",{key:"cd07404e1e9cd0a344c0975bdd23b2374d97ad61",class:"row pin-code"},o("input",{key:"92909cedb50e11bffe60dcd032b2d8c3dd901834",id:"verdocs-pin-code",name:"verdocs-pin-code",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.kba_pin,placeholder:"PIN Code...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.kba_pin=e.target.value})),"identity"===this.kba_method&&o("div",{key:"6ad1983ac8f9394bb9f35a8a9bba2f16d48d7bcd",class:"row address"},o("input",{key:"d598a1fb52b77eb85f17bda65f1730900d1d94e5",id:"verdocs-address",name:"verdocs-address",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.address,placeholder:"Address...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.address=e.target.value}),o("verdocs-help-icon",{key:"09d3cfa8e92c6c59cda2cff599ae474296de35a0",text:"Pre-fill the recipient's current street address. They will still be asked ID challenge questions."})),"identity"===this.kba_method&&o("div",{key:"1ccb3caa35f5474f40245ca1fe9c11aa175b4cc2",class:"row zip-code"},o("input",{key:"e967aba3ffac6e25f359c56c0bd5cd057394ad82",id:"verdocs-zip-code",name:"verdocs-zip-code",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.zip,placeholder:"Zip Code...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.zip=e.target.value}),o("verdocs-help-icon",{key:"b4075b320d84028e8717e8383113751155a6aebf",text:"Pre-fill the recipient's current zip code. They will still be asked ID challenge questions."}))),this.showMessage&&o("div",{key:"8212baa1274eb1dd98deeec972afeeb5bfb3c400",class:"row message"},o("label",{key:"1b1c58c77ebd0dfd1e193e68a9bf472d93b8914f",htmlFor:"verdocs-contact-picker-message"},"Message:"),o("input",{key:"d5525496367b3fa0bde52a91bad7f68964454a3c",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Message shown in invitation...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.message=e.target.value})),o("div",{key:"c39a19e49ea3ae82ecb287bf2acb87734237fdb9",class:"buttons"},o("verdocs-toggle-button",{key:"311f86449b98cad74d5811473578ab223237d39e",icon:'<svg focusable="false" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M4.5 3.75a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3h-15Zm4.125 3a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Zm-3.873 8.703a4.126 4.126 0 0 1 7.746 0 .75.75 0 0 1-.351.92 7.47 7.47 0 0 1-3.522.877 7.47 7.47 0 0 1-3.522-.877.75.75 0 0 1-.351-.92ZM15 8.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15ZM14.25 12a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15Z" clip-rule="evenodd" /></svg>',size:"small",active:this.showKba,onToggle:e=>{this.showKba=e.detail.active,e.detail.active||(this.kba_pin="",this.kba_method="",this.zip=""),this.showSuggestions=!1}}),o("verdocs-toggle-button",{key:"c51c8bba37758ad6ada6946d9c2df9880204b1be",icon:'<svg focusable="false" viewBox="0 0 24 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-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>',size:"small",active:this.showMessage,onToggle:e=>{this.showMessage=e.detail.active,this.showSuggestions=!1}}),o("div",{key:"747951c6d9273bf5142be1f20b6e51a2cc4239d5",class:"flex-fill"}),o("verdocs-button",{key:"12f60448cac7f6bb6804119ad620bdc77d4c0c9c",variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),o("verdocs-button",{key:"507b52e7904d9e5c31e1ba40c7ffa0ccba7763f2",label:"OK",size:"small",disabled:!e,onClick:e?e=>this.handleSubmit(e):()=>{}})))}};l.style='@-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-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{gap:12px;width:300px;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#f5f5fa}verdocs-contact-picker form .row{gap:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-contact-picker form .row.message{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}verdocs-contact-picker form .names-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .names-row>input{font-size:14px;width:103px}verdocs-contact-picker form .kba-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .kba-row verdocs-select-input{margin:0}verdocs-contact-picker form .pin-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .pin-code>input{-ms-flex:0;flex:0;width:133px;font-size:14px;margin-left:58px}verdocs-contact-picker form .address{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .address>input{-ms-flex:1;flex:1;font-size:14px;margin-left:58px}verdocs-contact-picker form .zip-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .zip-code>input{-ms-flex:1;flex:1;font-size:14px;margin-left:58px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;font-size:14px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message label{-ms-flex:0;flex:0}verdocs-contact-picker form .row.message input{width:100%}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;background:rgba(0, 0, 0, 0.0196078431);border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;max-height:225px;overflow-y:scroll;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{width:32px;height:32px}verdocs-contact-picker form .dropdown .suggestion .avatar{width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';const n=class{constructor(o){e(this,o),this.toggle=t(this,"toggle",7),this.active=!1,this.icon=null,this.label=null,this.size="normal",this._active=!1}componentWillLoad(){this._active=this.active}handleToggle(e){var t;e.stopPropagation();const o=!this._active;this._active=o,null===(t=this.toggle)||void 0===t||t.emit({active:o})}render(){return o(s,{key:"90f073b58425c92fade3871d8d605407f43dc671",class:`size-${this.size}`},this.icon?o("button",{innerHTML:this.icon,class:{active:this._active},onClick:e=>this.handleToggle(e)}):o("button",{class:{active:this._active},onClick:e=>this.handleToggle(e)},this.label))}};n.style='@-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-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';export{l as verdocs_contact_picker,n as verdocs_toggle_button}
1
+ import{r as e,c as t,h as o,F as i,H as s}from"./p-b9654a5e.js";import{VerdocsEndpoint as a,formatFullName as c,isValidEmail as r}from"@verdocs/js-sdk";import{h as d}from"./p-cfed8cc1.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";const l=class{constructor(o){e(this,o),this.searchContacts=t(this,"searchContacts",7),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.endpoint=a.getDefault(),this.templateRole=null,this.contactSuggestions=[],this.first_name=void 0,this.last_name=void 0,this.email=void 0,this.phone=void 0,this.zip=void 0,this.address=void 0,this.message=void 0,this.showSuggestions=!1,this.showMessage=!1,this.delegator=!1,this.showKba=!1,this.kba_method="",this.kba_pin="",this.nameFieldId=`verdocs-contact-picker-name-${Math.random().toString(36).substring(2,11)}`,this.firstNameFieldId=`verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2,11)}`,this.lastNameFieldId=`verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2,11)}`,this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`,this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`}componentWillLoad(){if(this.templateRole){const e=c(this.templateRole).split(" "),t=this.templateRole.first_name||e.shift()||"",o=this.templateRole.last_name||e.join(" ")||"";this.first_name=t,this.last_name=o,this.email=this.templateRole.email||"",this.phone=this.templateRole.phone||"",this.delegator=this.templateRole.delegator||!1,this.message=this.templateRole.message||"",this.showMessage=""!==this.message,this.kba_method=this.templateRole.kba_method||"",this.kba_pin=this.templateRole.kba_pin||"",this.showKba=!!this.kba_method}}handleFirstNameChange(e){var t;this.first_name=e.target.value,null===(t=this.searchContacts)||void 0===t||t.emit({query:this.first_name})}handleLastNameChange(e){var t;this.last_name=e.target.value,null===(t=this.searchContacts)||void 0===t||t.emit({query:this.last_name})}handleCancel(e){var t;e.stopPropagation(),this.showSuggestions=!1,null===(t=this.exit)||void 0===t||t.emit()}handleSubmit(e){var t;e.stopPropagation(),this.showSuggestions=!1,null===(t=this.next)||void 0===t||t.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,kba_method:this.kba_method,kba_pin:this.kba_pin,address:this.address,zip:this.zip})}handleSelectSuggestion(e,t){e.stopPropagation(),this.first_name=t.first_name,this.last_name=t.last_name,this.email=t.email,this.phone=t.phone,this.showSuggestions=!1}render(){const e=this.first_name&&this.last_name&&r(this.email)&&(!this.kba_method||"pin"===this.kba_method&&this.kba_pin||"identity"===this.kba_method);return o("form",{key:"2ce99d1c3ae979f25dde56e4a9dc7ec56cec2542",onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},o("div",{key:"6257ebf610c9ea9a8f6238311ad1b4ed0095e498",class:"row"},o("label",{key:"c36d51599847033b0c096c9d5de7d8af49e05c7d",htmlFor:this.nameFieldId},"Name:"),o("div",{key:"23cdb2afffff2ede3429c8591093eb89ca89d4b6",class:"names-row"},o("input",{key:"d281392383863edbcfc14440e18631b97962ea2f",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.first_name,placeholder:"First...",onFocus:()=>{var e;return this.showSuggestions=(null===(e=this.contactSuggestions)||void 0===e?void 0:e.length)>0},onInput:e=>this.handleFirstNameChange(e)}),o("input",{key:"eea0626eb854ae95c32ad7e98d479a614e7df81c",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.last_name,placeholder:"Last...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.handleLastNameChange(e)})),this.showSuggestions&&o("div",{key:"2e3fc57f42e3281b83b03e53b92c07243dcff544",class:"dropdown"},this.contactSuggestions.filter((e=>!this.first_name||e.first_name.toLowerCase().includes(this.first_name.toLowerCase()))).map((e=>{var t;return o("div",{key:null!==(t=e.id)&&void 0!==t?t:e.email,class:"suggestion",onClick:t=>this.handleSelectSuggestion(t,e)},e.picture?o("img",{alt:"Avatar",class:"avatar",src:e.picture}):o("div",{class:"avatar",innerHTML:'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-user"><path d="M15 13a3 3 0 1 0-6 0"/><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/><circle cx="12" cy="8" r="2"/></svg>'}),o("div",{class:"details"},o("div",{class:"name"},c(e)),e.email&&o("div",{class:"destination"},e.email),e.phone&&o("div",{class:"destination"},e.phone)))})))),o("div",{key:"f18fd6d889ea70f8a5e51bd1780007b3ff061b56",class:"row"},o("label",{key:"5cda3922bb705ed0d3af00644df9ef8d42042021",htmlFor:this.emailFieldId},"Email:"),o("input",{key:"34474c4c8bbbde2802b3c2f58ea3abed4b3e27f6",id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email address...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.email=e.target.value})),o("div",{key:"c757b186ca60272855ed5701c59857856dcd863f",class:"row"},o("label",{key:"1d971705ab36609db6a4e9cb7d24281d98441cd5",htmlFor:this.phoneFieldId},"Phone:"),o("input",{key:"2a516e28498a6727409ef51e61ca3fe912c65789",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone (SMS)...",onFocus:()=>this.showSuggestions=!1,onInput:e=>{this.phone=d(e.target.value)}})),this.showKba&&o(i,{key:"05cdb2c78abc3156d04a012c40a52f2c6ab24a86"},o("div",{key:"56d53a04ba6ab45ecc30f11e44669ad503400a49",class:"kba-row"},o("label",{key:"8af91071db065071bb40e931ea92231f31e9c0c9"},"KBA:"),o("verdocs-select-input",{key:"3f2eec31ee0078779eeed5d3f2fbd222fcdbaa42",value:this.kba_method,onInput:e=>{this.kba_method=e.target.value,this.zip="",this.address="",this.kba_pin=""},options:[{label:"None",value:""},{label:"PIN Code",value:"pin"},{label:"Full Verification",value:"identity"}]}),o("div",{key:"33e9efc07399e6930264b4b79f73a5497728c7c7",style:{flex:"1"}}),o("verdocs-help-icon",{key:"bc5ec8ad3fcf22a4f9a0f4659b574e238526574a",text:"Knowledge-Based Authentication adds additional authentication for this user either via a simple PIN code or full address validation. NOTE: There may be a fee for using this feature."})),"pin"===this.kba_method&&o("div",{key:"cd07404e1e9cd0a344c0975bdd23b2374d97ad61",class:"row pin-code"},o("input",{key:"92909cedb50e11bffe60dcd032b2d8c3dd901834",id:"verdocs-pin-code",name:"verdocs-pin-code",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.kba_pin,placeholder:"PIN Code...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.kba_pin=e.target.value})),"identity"===this.kba_method&&o("div",{key:"6ad1983ac8f9394bb9f35a8a9bba2f16d48d7bcd",class:"row address"},o("input",{key:"d598a1fb52b77eb85f17bda65f1730900d1d94e5",id:"verdocs-address",name:"verdocs-address",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.address,placeholder:"Address...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.address=e.target.value}),o("verdocs-help-icon",{key:"09d3cfa8e92c6c59cda2cff599ae474296de35a0",text:"Pre-fill the recipient's current street address. They will still be asked ID challenge questions."})),"identity"===this.kba_method&&o("div",{key:"1ccb3caa35f5474f40245ca1fe9c11aa175b4cc2",class:"row zip-code"},o("input",{key:"e967aba3ffac6e25f359c56c0bd5cd057394ad82",id:"verdocs-zip-code",name:"verdocs-zip-code",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.zip,placeholder:"Zip Code...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.zip=e.target.value}),o("verdocs-help-icon",{key:"b4075b320d84028e8717e8383113751155a6aebf",text:"Pre-fill the recipient's current zip code. They will still be asked ID challenge questions."}))),this.showMessage&&o("div",{key:"8212baa1274eb1dd98deeec972afeeb5bfb3c400",class:"row message"},o("label",{key:"1b1c58c77ebd0dfd1e193e68a9bf472d93b8914f",htmlFor:"verdocs-contact-picker-message"},"Message:"),o("input",{key:"d5525496367b3fa0bde52a91bad7f68964454a3c",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Message shown in invitation...",onFocus:()=>this.showSuggestions=!1,onInput:e=>this.message=e.target.value})),o("div",{key:"c39a19e49ea3ae82ecb287bf2acb87734237fdb9",class:"buttons"},o("verdocs-toggle-button",{key:"311f86449b98cad74d5811473578ab223237d39e",icon:'<svg focusable="false" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M4.5 3.75a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3h-15Zm4.125 3a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Zm-3.873 8.703a4.126 4.126 0 0 1 7.746 0 .75.75 0 0 1-.351.92 7.47 7.47 0 0 1-3.522.877 7.47 7.47 0 0 1-3.522-.877.75.75 0 0 1-.351-.92ZM15 8.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15ZM14.25 12a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15Z" clip-rule="evenodd" /></svg>',size:"small",active:this.showKba,onToggle:e=>{this.showKba=e.detail.active,e.detail.active||(this.kba_pin="",this.kba_method="",this.zip=""),this.showSuggestions=!1}}),o("verdocs-toggle-button",{key:"c51c8bba37758ad6ada6946d9c2df9880204b1be",icon:'<svg focusable="false" viewBox="0 0 24 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-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>',size:"small",active:this.showMessage,onToggle:e=>{this.showMessage=e.detail.active,this.showSuggestions=!1}}),o("div",{key:"747951c6d9273bf5142be1f20b6e51a2cc4239d5",class:"flex-fill"}),o("verdocs-button",{key:"12f60448cac7f6bb6804119ad620bdc77d4c0c9c",variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),o("verdocs-button",{key:"507b52e7904d9e5c31e1ba40c7ffa0ccba7763f2",label:"OK",size:"small",disabled:!e,onClick:e?e=>this.handleSubmit(e):()=>{}})))}};l.style='@-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-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{gap:12px;width:300px;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#f5f5fa}verdocs-contact-picker form .row{gap:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-contact-picker form .row.message{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}verdocs-contact-picker form .names-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .names-row>input{font-size:14px;width:103px}verdocs-contact-picker form .kba-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .kba-row verdocs-select-input{margin:0}verdocs-contact-picker form .pin-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .pin-code>input{-ms-flex:0;flex:0;width:133px;font-size:14px;margin-left:58px}verdocs-contact-picker form .address{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .address>input{-ms-flex:1;flex:1;font-size:14px;margin-left:58px}verdocs-contact-picker form .zip-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .zip-code>input{-ms-flex:1;flex:1;font-size:14px;margin-left:58px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;font-size:14px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message label{-ms-flex:0;flex:0}verdocs-contact-picker form .row.message input{width:100%}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;background:rgba(0, 0, 0, 0.0196078431);border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;max-height:225px;overflow-y:scroll;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{width:32px;height:32px}verdocs-contact-picker form .dropdown .suggestion .avatar{width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';const n=class{constructor(o){e(this,o),this.toggle=t(this,"toggle",7),this.active=!1,this.icon=null,this.label=null,this.size="normal",this._active=!1}componentWillLoad(){this._active=this.active}handleToggle(e){var t;e.stopPropagation();const o=!this._active;this._active=o,null===(t=this.toggle)||void 0===t||t.emit({active:o})}render(){return o(s,{key:"57d988cf0335a521279382d8c91be3b7af3b1f87",class:`size-${this.size}`},this.icon?o("button",{innerHTML:this.icon,class:{active:this._active},onClick:e=>this.handleToggle(e)}):o("button",{class:{active:this._active},onClick:e=>this.handleToggle(e)},this.label))}};n.style='@-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-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';export{l as verdocs_contact_picker,n as verdocs_toggle_button}
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))e[s]=n[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function s(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{l(t.next(e))}catch(e){a(e)}}function r(e){try{l(t["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,r)}l((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(n){return l([e,n])}}function l(r){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,r[0]&&(i=0)),i)try{if(t=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;s=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(r[0]===6&&i.label<a[1]){i.label=a[1];a=r;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(r);break}if(a[2])i.ops.pop();i.trys.pop();continue}r=n.call(e,i)}catch(e){r=[6,e];s=0}finally{t=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,i){if(i||arguments.length===2)for(var t=0,s=n.length,a;t<s;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-2be751c4.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var n,i,t,s,a,o,r,l,c,d,f,p,u,v,h;return{setters:[function(e){n=e.r;i=e.c;t=e.h;s=e.H},function(e){a=e.VerdocsEndpoint;o=e.getEnvelopes;r=e.integerSequence;l=e.getRecipientsWithActions;c=e.userCanCancelEnvelope;d=e.userCanAct;f=e.formatFullName;p=e.cancelEnvelope},function(e){u=e.s},function(e){v=e.V},function(e){h=e.S},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-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}';var x=b;var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var m=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var w=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var y=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var _=e("verdocs_envelopes_list",function(){function e(e){n(this,e);this.changeView=i(this,"changeView",7);this.changeStatus=i(this,"changeStatus",7);this.changeSort=i(this,"changeSort",7);this.changeMatch=i(this,"changeMatch",7);this.sdkError=i(this,"sdkError",7);this.viewEnvelope=i(this,"viewEnvelope",7);this.finishEnvelope=i(this,"finishEnvelope",7);this.endpoint=a.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.onSessionChanged((function(e,n,i){console.log("[ENVELOPES_LIST] onSessionChanged",n,i)}));this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,s,a;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.loading=true;t={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":t=__assign({},t);break;case"sent":t=__assign({},t);break;case"action":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"waiting":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"completed":t=__assign(__assign({},t),{status:["complete"]});break;default:t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){t.status=[this.status]}}if(this.match.trim());return[4,o(this.endpoint,t)];case 1:s=r.sent();this.envelopes=s.envelopes;this.count=s.count;this.loading=false;return[3,3];case 2:a=r.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;u(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){u(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return t(s,{key:"6f4f98311ffbedefc96cbc2f1208e4f471ee1b01"},t("div",{key:"97383aa90edf3bf8cf77ab3f6986bdd7502de1a9",class:"header"},t("div",{key:"1af40727c235e732ba7c1265be6d2a6e1d33a4a1",class:"filter"},t("verdocs-text-input",{key:"23beddb65b55f24545f9dc812655d9c63d96e4f9",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(n){var i;e.match=n.target.value.trim();(i=e.changeMatch)===null||i===void 0?void 0:i.emit(e.match)}})),t("verdocs-quick-filter",{key:"2628e51157d28b5ebe6a9aeb01c526876f6c34ef",label:"View",value:this.view,options:m,onOptionSelected:function(n){e.view=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"959f6844e39181e0cddd5f616e13818e5ab47e65",label:"Status",value:this.status,options:w,onOptionSelected:function(n){e.status=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"168930d3039992fc11a6f2715562ecfe714b78f0",label:"Sort By",value:this.sort,options:y,onOptionSelected:function(n){e.sort=n.detail.value}}),this.loading&&t("verdocs-spinner",{key:"541adb9e433da92dc7bdb10a7c0945f98e5afaae",mode:"dark",size:24}),t("div",{key:"2642cb449ab2e21154f18d6b4e7aec445b41a953",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&t("verdocs-button",{key:"98ad50d3aa6859e0415401fd883127fd8b93cc5c",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(n){var i;var s=l(n);var a=c(e.endpoint.profile,n);var o=s.find((function(n){var i;return n.email===((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||""}));var r=o&&a&&d(((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||"",s);var u=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!r},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!a}];return t("div",{class:"envelope",key:n.id,onClick:function(){var i;return(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:n})}},t("div",{class:"inner"},t("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===n.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(i){if(i.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[n],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==n.id}))}}}),t("div",{class:"vert-spacer"}),t("span",{innerHTML:g,class:"envelope-icon"}),t("div",{class:"envelope-name"},n.name,":  ",t("div",{class:"envelope-recipients"},n.recipients.map((function(e){return f(e)})))),t("div",{class:"vert-spacer"}),t("verdocs-status-indicator",{envelope:n,style:{width:"125px"}}),t("div",{class:"vert-spacer"}),t("div",{class:"last-modified"},new Date(n.updated_at).toLocaleString()),t("div",{class:"vert-spacer"}),t("verdocs-dropdown",{options:u,onOptionSelected:function(i){var t,s;switch(i.detail.id){case"view":(t=e.viewEnvelope)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:n});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:n});break;case"download":e.downloadEnvelope(n);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){p(e.endpoint,n.id).then((function(){return v("Envelope canceled")})).catch((function(e){return v("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&t("div",{key:"163ec5137181c5a7349c74502a29696da9e8dcf2",style:{width:"100%"}},r(0,this.rowsPerPage).map((function(){return t("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&t("div",{key:"dcfc7cfc78b21072662437b6020ca155ff936334",class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?t("div",{style:{marginTop:"20px"}},t("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(n){e.selectedPage=n.detail.selectedPage}})):t("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:["handleViewUpdated"],status:["handleStatusUpdated"],sort:["handleSortUpdated"],match:["handleMatchUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());_.style=x}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))e[s]=n[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function s(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{l(t.next(e))}catch(e){a(e)}}function r(e){try{l(t["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,r)}l((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(n){return l([e,n])}}function l(r){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,r[0]&&(i=0)),i)try{if(t=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;s=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(r[0]===6&&i.label<a[1]){i.label=a[1];a=r;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(r);break}if(a[2])i.ops.pop();i.trys.pop();continue}r=n.call(e,i)}catch(e){r=[6,e];s=0}finally{t=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,i){if(i||arguments.length===2)for(var t=0,s=n.length,a;t<s;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-736a2c41.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var n,i,t,s,a,o,r,l,c,d,f,p,u,v,h;return{setters:[function(e){n=e.r;i=e.c;t=e.h;s=e.H},function(e){a=e.VerdocsEndpoint;o=e.getEnvelopes;r=e.integerSequence;l=e.getRecipientsWithActions;c=e.userCanCancelEnvelope;d=e.userCanAct;f=e.formatFullName;p=e.cancelEnvelope},function(e){u=e.s},function(e){v=e.V},function(e){h=e.S},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-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}';var x=b;var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var m=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var w=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var y=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var _=e("verdocs_envelopes_list",function(){function e(e){n(this,e);this.changeView=i(this,"changeView",7);this.changeStatus=i(this,"changeStatus",7);this.changeSort=i(this,"changeSort",7);this.changeMatch=i(this,"changeMatch",7);this.sdkError=i(this,"sdkError",7);this.viewEnvelope=i(this,"viewEnvelope",7);this.finishEnvelope=i(this,"finishEnvelope",7);this.endpoint=a.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.onSessionChanged((function(e,n,i){console.log("[ENVELOPES_LIST] onSessionChanged",n,i)}));this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,s,a;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.loading=true;t={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":t=__assign({},t);break;case"sent":t=__assign({},t);break;case"action":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"waiting":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"completed":t=__assign(__assign({},t),{status:["complete"]});break;default:t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){t.status=[this.status]}}if(this.match.trim());return[4,o(this.endpoint,t)];case 1:s=r.sent();this.envelopes=s.envelopes;this.count=s.count;this.loading=false;return[3,3];case 2:a=r.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;u(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){u(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return t(s,{key:"13cff825b9a325bb5b45e7c26420276bfb7da9ed"},t("div",{key:"1c5373c8a470db467d32597647aa386efb1b9e17",class:"header"},t("div",{key:"4c394a9bf835ce0145b5b11f0bb2d5386134d1fe",class:"filter"},t("verdocs-text-input",{key:"24a0f7b03fa759478824ca79a1e1939ee986fb6a",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(n){var i;e.match=n.target.value.trim();(i=e.changeMatch)===null||i===void 0?void 0:i.emit(e.match)}})),t("verdocs-quick-filter",{key:"437393b3d6019e0891def40a6d3eba7fa3d480e9",label:"View",value:this.view,options:m,onOptionSelected:function(n){e.view=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"aec9971bcdfa2a7f444f22e0a6bba6b9007eef04",label:"Status",value:this.status,options:w,onOptionSelected:function(n){e.status=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"10bb4001fadd7ca49547a7343a7322bcc941c3f6",label:"Sort By",value:this.sort,options:y,onOptionSelected:function(n){e.sort=n.detail.value}}),this.loading&&t("verdocs-spinner",{key:"2181c646258f4c9949eec73fd83ca83d16186170",mode:"dark",size:24}),t("div",{key:"ba7761ae3b1e9e503c00efb2107883e2ea7e0682",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&t("verdocs-button",{key:"7124f4e1533b0f76d9bc098504063d360f49107e",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(n){var i;var s=l(n);var a=c(e.endpoint.profile,n);var o=s.find((function(n){var i;return n.email===((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||""}));var r=o&&a&&d(((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||"",s);var u=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!r},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!a}];return t("div",{class:"envelope",key:n.id,onClick:function(){var i;return(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:n})}},t("div",{class:"inner"},t("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===n.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(i){if(i.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[n],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==n.id}))}}}),t("div",{class:"vert-spacer"}),t("span",{innerHTML:g,class:"envelope-icon"}),t("div",{class:"envelope-name"},n.name,":  ",t("div",{class:"envelope-recipients"},n.recipients.map((function(e){return f(e)})))),t("div",{class:"vert-spacer"}),t("verdocs-status-indicator",{envelope:n,style:{width:"125px"}}),t("div",{class:"vert-spacer"}),t("div",{class:"last-modified"},new Date(n.updated_at).toLocaleString()),t("div",{class:"vert-spacer"}),t("verdocs-dropdown",{options:u,onOptionSelected:function(i){var t,s;switch(i.detail.id){case"view":(t=e.viewEnvelope)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:n});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:n});break;case"download":e.downloadEnvelope(n);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){p(e.endpoint,n.id).then((function(){return v("Envelope canceled")})).catch((function(e){return v("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&t("div",{key:"598ffddf4adeb704ba272938b41cf2403e97f169",style:{width:"100%"}},r(0,this.rowsPerPage).map((function(){return t("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&t("div",{key:"dde715119c5f62fd0dab1b960ec8ea25ae815c3e",class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?t("div",{style:{marginTop:"20px"}},t("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(n){e.selectedPage=n.detail.selectedPage}})):t("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:["handleViewUpdated"],status:["handleStatusUpdated"],sort:["handleSortUpdated"],match:["handleMatchUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());_.style=x}}}));
@@ -1 +1 @@
1
- import{r,h as e}from"./p-b9654a5e.js";const o=class{constructor(e){r(this,e),this.selected="all"}render(){return e("div",{key:"94316e73f4d9ec80389a8442a8bb3e2b95b91840"}," ")}};o.style='@-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-search-tabs{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:block}';export{o as verdocs_search_tabs}
1
+ import{r,h as e}from"./p-b9654a5e.js";const o=class{constructor(e){r(this,e),this.selected="all"}render(){return e("div",{key:"4c809496e5ade75145e1e3c5b5d9b4749078b3e6"}," ")}};o.style='@-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-search-tabs{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:block}';export{o as verdocs_search_tabs}
@@ -1 +1 @@
1
- System.register(["./p-9186f42e.system.js","@verdocs/js-sdk"],(function(e){"use strict";var t,n,o,c;return{setters:[function(e){t=e.r;n=e.c;o=e.h},function(e){c=e.VerdocsEndpoint}],execute:function(){var i='@-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-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';var r=i;var s='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var f='<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>';var a=e("verdocs_quick_functions",function(){function e(e){t(this,e);this.createTemplate=n(this,"createTemplate",7);this.createDocument=n(this,"createDocument",7);this.endpoint=c.getDefault()}e.prototype.handleCreateTemplate=function(){this.createTemplate.emit()};e.prototype.handleCreateDocument=function(){this.createDocument.emit()};e.prototype.render=function(){var e=this;return o("div",{key:"5477198aad675bd449cd36d7511db21ed9dae613",class:"container"},o("p",{key:"b7e436210675f73956d2b72de2683b22e9ad1def",class:"title"},"Quick Create"),o("button",{key:"638c4c831fc83d8d6e5c73ff67807c79b02d8c74",onClick:function(){return e.handleCreateTemplate()},innerHTML:f},"Template"),o("button",{key:"16d21850165b9b35129d12533dbe32d958093e0b",onClick:function(){return e.handleCreateDocument()},innerHTML:s},"Document"))};return e}());a.style=r}}}));
1
+ System.register(["./p-9186f42e.system.js","@verdocs/js-sdk"],(function(e){"use strict";var t,n,o,c;return{setters:[function(e){t=e.r;n=e.c;o=e.h},function(e){c=e.VerdocsEndpoint}],execute:function(){var i='@-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-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';var r=i;var s='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var a='<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>';var f=e("verdocs_quick_functions",function(){function e(e){t(this,e);this.createTemplate=n(this,"createTemplate",7);this.createDocument=n(this,"createDocument",7);this.endpoint=c.getDefault()}e.prototype.handleCreateTemplate=function(){this.createTemplate.emit()};e.prototype.handleCreateDocument=function(){this.createDocument.emit()};e.prototype.render=function(){var e=this;return o("div",{key:"9dc60eeb3d9357d121e53a7fb3050ee4d25a0a36",class:"container"},o("p",{key:"51860a235d912a4dc6d166add4b982c71805fc8d",class:"title"},"Quick Create"),o("button",{key:"9f530aa3e54655cbf1ce9d95ae7a08fa5b57f644",onClick:function(){return e.handleCreateTemplate()},innerHTML:a},"Template"),o("button",{key:"e3e33afb47acf64ba78d9b156c5dc986d977f881",onClick:function(){return e.handleCreateDocument()},innerHTML:s},"Document"))};return e}());f.style=r}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,i,t,n){function s(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?t(e.value):s(e.value).then(r,a)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){t.label=a[1];break}if(a[0]===6&&t.label<o[1]){t.label=o[1];o=a;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(a);break}if(o[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-d738b5db.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-c18c718f.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var i,t,n,s,o,r,a,l,c,d,v,p,h,f,u,w,m,g;return{setters:[function(e){i=e.r;t=e.c;n=e.h;s=e.F;o=e.H},function(e){r=e.VerdocsEndpoint;a=e.getEnvelope;l=e.resendInvitation;c=e.cancelEnvelope;d=e.formatFullName;v=e.updateEnvelope;p=e.userIsEnvelopeOwner;h=e.capitalize},function(e){f=e.F},function(e){u=e.V},function(e){w=e.S},function(e){m=e.S},function(e){g=e.f}],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-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;font-size:14px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;gap:6px;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-name{-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:0 0 100px;flex:0 0 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}verdocs-envelope-sidebar .reminders{margin:15px 0 30px 0}verdocs-envelope-sidebar .reminders .form-row{margin:8px 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-sidebar .reminders .form-row .reminders-label{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row .form-label{-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row verdocs-text-input{margin:0;width:100px}';var x=b;var y=24*60*60*1e3;var 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>';var z='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var M='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var D={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>'};var _=e("verdocs_envelope_sidebar",function(){function e(e){i(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.toggle=t(this,"toggle",7);this.another=t(this,"another",7);this.envelopeListenerId=null;this.endpoint=r.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false;this.showRecipientDialog="";this.showCancelDialog=false;this.remindersEnabled=false;this.updatingReminders=false;this.initialReminder=null;this.followupReminders=null;this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t;return __generator(this,(function(n){try{this.endpoint.loadSession();if(!this.envelopeId){console.log("[SIDEBAR] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return[2]}this.listenToEnvelope()}catch(n){console.log("[SIDEBAR] Error loading envelope",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(t=n.response)===null||t===void 0?void 0:t.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();m.subscribe("envelopes",this.envelopeId,(function(){return a(e.endpoint,e.envelopeId)}),false,(function(i){var t,n;e.envelope=i;e.loading=false;e.sortEnvelopeRecipients();e.initialReminder=(t=e.envelope)===null||t===void 0?void 0:t.initial_reminder;e.followupReminders=(n=e.envelope)===null||n===void 0?void 0:n.followup_reminders;e.remindersEnabled=!!e.initialReminder}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){m.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.sortEnvelopeRecipients=function(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.setTab=function(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen;(i=this.toggle)===null||i===void 0?void 0:i.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){var i;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes((i=this.envelope)===null||i===void 0?void 0:i.status)};e.prototype.handleRecipientAction=function(e,i){var t;console.log("[SIDEBAR] Recipient action",i,e);switch(i){case"reminder":l(this.endpoint,this.envelopeId,e.role_name).then((function(){u("Reminder Sent",{style:"success"})})).catch((function(e){console.log("[SIDEBAR] Error resending invitation",e);u("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":u("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":u("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:i})};e.prototype.handleCancelEnvelope=function(){var e=this;this.loading=true;c(this.endpoint,this.envelopeId).then((function(i){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){console.log("[SIDEBAR] Envelope canceled",i);u("Envelope canceled",{style:"success"});t=JSON.parse(JSON.stringify(this.envelope));t.status="canceled";m.updateEnvelope(this.envelopeId,t);this.loading=false;this.panelOpen=false;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:t,event:"canceled"});return[2]}))}))})).catch((function(i){console.log("[SIDEBAR] Error canceling envelope",i);e.loading=false;u("Error canceling envelope: "+i.message,{style:"error"})}))};e.prototype.prepareHistoryEntries=function(){var e=this;var i,t,n,s,o,r;var a=[];var l=((i=this.envelope)===null||i===void 0?void 0:i.history_entries)||[];a.push({icon:"pencil",message:"Envelope created.",date:new Date((t=this.envelope)===null||t===void 0?void 0:t.created_at)});if(((n=this.envelope)===null||n===void 0?void 0:n.status)==="complete"){a.push({icon:"pencil",message:"Envelope completed.",date:new Date((s=this.envelope)===null||s===void 0?void 0:s.updated_at)})}var c=l.some((function(e){return e.event==="owner:canceled"}));if(((o=this.envelope)===null||o===void 0?void 0:o.status)==="canceled"&&!c){a.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((r=this.envelope)===null||r===void 0?void 0:r.canceled_at)})}l.forEach((function(i){var t;var n=(((t=e.envelope)===null||t===void 0?void 0:t.recipients)||[]).find((function(e){return e.role_name===i.role_name}));var s=d(n);switch(i.event.toLowerCase()){case"recipient:signed":a.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:declined":a.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":a.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(i.created_at)});break;case"sms":a.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(i.created_at)});break;case"in_person_link":a.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(i.created_at)});break;case"in_app":a.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(i.created_at)});break;default:a.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":a.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(i.created_at)});break;default:a.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(i.created_at)});break}break;case"recipient:prepared":a.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:claimed":if(i.event_detail==="guest"){a.push({icon:"account_circle",message:"".concat(s," claimed the Envelope as a guest."),date:new Date(i.created_at)})}else if(i.event_detail==="profile"){a.push({icon:"verified_user",message:"".concat(s," claimed the Envelope as a verified user."),date:new Date(i.created_at)})}break;case"recipient:agreed":a.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(i.created_at)});break;case"recipient:invited":if(i.event_detail==="sms"){a.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(i.created_at)})}else{a.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(i.created_at)})}break;case"recipient:reminder":if(i.event_detail==="sms"){a.push({icon:"textsms",message:"".concat(s," sent a reminder via SMS."),date:new Date(i.created_at)})}else{a.push({icon:"mail",message:"".concat(s," sent a reminder via email."),date:new Date(i.created_at)})}break;case"invitation:resent":a.push({icon:"mail",message:"Invitation was resent to ".concat(s).concat(i.event_detail==="reminder"?" by reminder":"","."),date:new Date(i.created_at)});break;case"envelope:cc":a.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:delegated":a.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":a.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"owner:updated_recipient_info":a.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":a.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":a.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"envelope:canceled":case"envelope_canceled":case"canceled":case"owner:canceled":a.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":a.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i);break}}));a.sort((function(e,i){return i.date.getTime()-e.date.getTime()}));return a};e.prototype.handleToggleReminders=function(){if(this.remindersEnabled){return this.handleSetReminders(null,null)}else{return this.handleSetReminders(y,3*y)}};e.prototype.handleSetReminders=function(e,i){var t=this;console.log("Updating reminders...");this.updatingReminders=true;v(this.endpoint,this.envelopeId,{initial_reminder:e,followup_reminders:i}).then((function(e){console.log("Updated",e);m.updateEnvelope(t.envelopeId,e);t.initialReminder=e.initial_reminder;t.followupReminders=e.followup_reminders;t.remindersEnabled=!!e.initial_reminder;t.updatingReminders=false})).catch((function(e){var i,n,s;console.log("Error updating envelope",e);t.initialReminder=(i=t.envelope)===null||i===void 0?void 0:i.initial_reminder;t.followupReminders=(n=t.envelope)===null||n===void 0?void 0:n.followup_reminders;t.remindersEnabled=!!((s=t.envelope)===null||s===void 0?void 0:s.initial_reminder);t.updatingReminders=false;alert(e.response.data.error)}))};e.prototype.render=function(){var e=this;var i,t,r,a,l,c,v,u,w,m,b,x;if(this.loading){return n(o,null)}var _=p(this.endpoint.profile,this.envelope);var S=this.prepareHistoryEntries();var B=((i=this.envelope)===null||i===void 0?void 0:i.status)!=="pending"&&((t=this.envelope)===null||t===void 0?void 0:t.status)!=="in progress";return n(o,{class:this.panelOpen?"open":""},n("div",{class:"side-buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:k}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:z}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:M})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},(r=this.envelope)===null||r===void 0?void 0:r.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},g(new Date((a=this.envelope)===null||a===void 0?void 0:a.created_at),f)),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},g(new Date((l=this.envelope)===null||l===void 0?void 0:l.updated_at),f)),n("div",{class:"label"},"Status"),n("div",{class:"value"},h((c=this.envelope)===null||c===void 0?void 0:c.status)),n("div",{class:"label"},"Owner ID"),n("div",{class:"value"},(v=this.envelope)===null||v===void 0?void 0:v.profile_id),n("div",{class:"label"},"Owner Name"),n("div",{class:"value"},d((u=this.envelope)===null||u===void 0?void 0:u.profile)),n("div",{class:"label"},"Owner Email"),n("div",{class:"value"},(m=(w=this.envelope)===null||w===void 0?void 0:w.profile)===null||m===void 0?void 0:m.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),(b=this.envelope)===null||b===void 0?void 0:b.recipients.map((function(i,t){var s;var o=i.status!=="submitted"&&i.status!=="canceled"&&i.status!=="declined";var r=e.canResendRecipient(i);var a=d(i);return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},t+1),n("div",{class:"recipient-name"},i.role_name),n("div",{class:(s={"recipient-status":true},s[i.status]=true,s)},i.status),_&&!B&&n("verdocs-dropdown",{onOptionSelected:function(t){return e.handleRecipientAction(i,t.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!r},{id:"inperson",label:"Get In-Person Link",disabled:!o}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},a),n("div",{class:"recipient-name"},i.email),n("div",{class:"recipient-name"},i.phone)))})),_&&n("div",{class:"reminders"},n("div",{class:"form-row"},n("div",{class:"reminders-label"},"Reminders"),n("verdocs-switch",{disabled:B||this.updatingReminders,checked:this.remindersEnabled,onCheckedChange:function(){return e.handleToggleReminders()}})),this.remindersEnabled&&n(s,null,n("div",{class:"form-row"},"NOTE: Reminders will only be sent for up to 14 days."),n("div",{class:"form-row"},n("div",{class:"form-label"},"Initial Reminder (days):"),n("verdocs-text-input",{placeholder:"In hours...",disabled:B||this.updatingReminders,value:String(Math.floor(this.initialReminder/y)),onBlur:function(i){e.initialReminder=Number(i.target.value)*y;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),n("div",{class:"form-row"},n("div",{class:"form-label"},"Follow-up Reminders:"),n("verdocs-text-input",{placeholder:"In hours...",disabled:B||this.updatingReminders,value:String(Math.floor(this.followupReminders/y)),onBlur:function(i){e.followupReminders=Number(i.target.value)*y;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),n("div",{class:"form-row"},n("div",{class:"form-label"},"Next Reminder:"),n("div",{style:{color:"#dddddd"}},g(new Date((x=this.envelope)===null||x===void 0?void 0:x.next_reminder),"P p"))))),_&&n("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Envelope",onClick:function(){return e.showCancelDialog=!B},disabled:B})),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),S.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:D[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},g(e.date,f))))}))),this.showRecipientDialog&&n("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:function(){return e.showRecipientDialog=""}}),this.showCancelDialog&&n("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:function(){e.showCancelDialog=false;e.handleCancelEnvelope()}}))};return e}());_.style=x}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,i,t,n){function s(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?t(e.value):s(e.value).then(r,a)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){t.label=a[1];break}if(a[0]===6&&t.label<o[1]){t.label=o[1];o=a;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(a);break}if(o[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-d738b5db.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-55de8cd1.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var i,t,n,s,o,r,a,l,d,c,v,p,h,f,u,w,m,g;return{setters:[function(e){i=e.r;t=e.c;n=e.h;s=e.F;o=e.H},function(e){r=e.VerdocsEndpoint;a=e.getEnvelope;l=e.resendInvitation;d=e.cancelEnvelope;c=e.formatFullName;v=e.updateEnvelope;p=e.userIsEnvelopeOwner;h=e.capitalize},function(e){f=e.F},function(e){u=e.V},function(e){w=e.S},function(e){m=e.S},function(e){g=e.f}],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-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;font-size:14px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;gap:6px;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-name{-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:0 0 100px;flex:0 0 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}verdocs-envelope-sidebar .reminders{margin:15px 0 30px 0}verdocs-envelope-sidebar .reminders .form-row{margin:8px 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-sidebar .reminders .form-row .reminders-label{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row .form-label{-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row verdocs-text-input{margin:0;width:100px}';var x=b;var y=24*60*60*1e3;var 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>';var z='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var M='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var D={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>'};var _=e("verdocs_envelope_sidebar",function(){function e(e){i(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.toggle=t(this,"toggle",7);this.another=t(this,"another",7);this.envelopeListenerId=null;this.endpoint=r.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false;this.showRecipientDialog="";this.showCancelDialog=false;this.remindersEnabled=false;this.updatingReminders=false;this.initialReminder=null;this.followupReminders=null;this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t;return __generator(this,(function(n){try{this.endpoint.loadSession();if(!this.envelopeId){console.log("[SIDEBAR] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return[2]}this.listenToEnvelope()}catch(n){console.log("[SIDEBAR] Error loading envelope",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(t=n.response)===null||t===void 0?void 0:t.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();m.subscribe("envelopes",this.envelopeId,(function(){return a(e.endpoint,e.envelopeId)}),false,(function(i){var t,n;e.envelope=i;e.loading=false;e.sortEnvelopeRecipients();e.initialReminder=(t=e.envelope)===null||t===void 0?void 0:t.initial_reminder;e.followupReminders=(n=e.envelope)===null||n===void 0?void 0:n.followup_reminders;e.remindersEnabled=!!e.initialReminder}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){m.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.sortEnvelopeRecipients=function(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.setTab=function(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen;(i=this.toggle)===null||i===void 0?void 0:i.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){var i;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes((i=this.envelope)===null||i===void 0?void 0:i.status)};e.prototype.handleRecipientAction=function(e,i){var t;console.log("[SIDEBAR] Recipient action",i,e);switch(i){case"reminder":l(this.endpoint,this.envelopeId,e.role_name).then((function(){u("Reminder Sent",{style:"success"})})).catch((function(e){console.log("[SIDEBAR] Error resending invitation",e);u("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":u("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":u("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:i})};e.prototype.handleCancelEnvelope=function(){var e=this;this.loading=true;d(this.endpoint,this.envelopeId).then((function(i){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){console.log("[SIDEBAR] Envelope canceled",i);u("Envelope canceled",{style:"success"});t=JSON.parse(JSON.stringify(this.envelope));t.status="canceled";m.updateEnvelope(this.envelopeId,t);this.loading=false;this.panelOpen=false;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:t,event:"canceled"});return[2]}))}))})).catch((function(i){console.log("[SIDEBAR] Error canceling envelope",i);e.loading=false;u("Error canceling envelope: "+i.message,{style:"error"})}))};e.prototype.prepareHistoryEntries=function(){var e=this;var i,t,n,s,o,r;var a=[];var l=((i=this.envelope)===null||i===void 0?void 0:i.history_entries)||[];a.push({icon:"pencil",message:"Envelope created.",date:new Date((t=this.envelope)===null||t===void 0?void 0:t.created_at)});if(((n=this.envelope)===null||n===void 0?void 0:n.status)==="complete"){a.push({icon:"pencil",message:"Envelope completed.",date:new Date((s=this.envelope)===null||s===void 0?void 0:s.updated_at)})}var d=l.some((function(e){return e.event==="owner:canceled"}));if(((o=this.envelope)===null||o===void 0?void 0:o.status)==="canceled"&&!d){a.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((r=this.envelope)===null||r===void 0?void 0:r.canceled_at)})}l.forEach((function(i){var t;var n=(((t=e.envelope)===null||t===void 0?void 0:t.recipients)||[]).find((function(e){return e.role_name===i.role_name}));var s=c(n);switch(i.event.toLowerCase()){case"recipient:signed":a.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:declined":a.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":a.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(i.created_at)});break;case"sms":a.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(i.created_at)});break;case"in_person_link":a.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(i.created_at)});break;case"in_app":a.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(i.created_at)});break;default:a.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":a.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(i.created_at)});break;default:a.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(i.created_at)});break}break;case"recipient:prepared":a.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:claimed":if(i.event_detail==="guest"){a.push({icon:"account_circle",message:"".concat(s," claimed the Envelope as a guest."),date:new Date(i.created_at)})}else if(i.event_detail==="profile"){a.push({icon:"verified_user",message:"".concat(s," claimed the Envelope as a verified user."),date:new Date(i.created_at)})}break;case"recipient:agreed":a.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(i.created_at)});break;case"recipient:invited":if(i.event_detail==="sms"){a.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(i.created_at)})}else{a.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(i.created_at)})}break;case"recipient:reminder":if(i.event_detail==="sms"){a.push({icon:"textsms",message:"".concat(s," sent a reminder via SMS."),date:new Date(i.created_at)})}else{a.push({icon:"mail",message:"".concat(s," sent a reminder via email."),date:new Date(i.created_at)})}break;case"invitation:resent":a.push({icon:"mail",message:"Invitation was resent to ".concat(s).concat(i.event_detail==="reminder"?" by reminder":"","."),date:new Date(i.created_at)});break;case"envelope:cc":a.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:delegated":a.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":a.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"owner:updated_recipient_info":a.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":a.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":a.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"envelope:canceled":case"envelope_canceled":case"canceled":case"owner:canceled":a.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":a.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i);break}}));a.sort((function(e,i){return i.date.getTime()-e.date.getTime()}));return a};e.prototype.handleToggleReminders=function(){if(this.remindersEnabled){return this.handleSetReminders(null,null)}else{return this.handleSetReminders(y,3*y)}};e.prototype.handleSetReminders=function(e,i){var t=this;console.log("Updating reminders...");this.updatingReminders=true;v(this.endpoint,this.envelopeId,{initial_reminder:e,followup_reminders:i}).then((function(e){console.log("Updated",e);m.updateEnvelope(t.envelopeId,e);t.initialReminder=e.initial_reminder;t.followupReminders=e.followup_reminders;t.remindersEnabled=!!e.initial_reminder;t.updatingReminders=false})).catch((function(e){var i,n,s;console.log("Error updating envelope",e);t.initialReminder=(i=t.envelope)===null||i===void 0?void 0:i.initial_reminder;t.followupReminders=(n=t.envelope)===null||n===void 0?void 0:n.followup_reminders;t.remindersEnabled=!!((s=t.envelope)===null||s===void 0?void 0:s.initial_reminder);t.updatingReminders=false;alert(e.response.data.error)}))};e.prototype.render=function(){var e=this;var i,t,r,a,l,d,v,u,w,m,b,x;if(this.loading){return n(o,null)}var _=p(this.endpoint.profile,this.envelope);var S=this.prepareHistoryEntries();var B=((i=this.envelope)===null||i===void 0?void 0:i.status)!=="pending"&&((t=this.envelope)===null||t===void 0?void 0:t.status)!=="in progress";return n(o,{class:this.panelOpen?"open":""},n("div",{class:"side-buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:k}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:z}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:M})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},(r=this.envelope)===null||r===void 0?void 0:r.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},g(new Date((a=this.envelope)===null||a===void 0?void 0:a.created_at),f)),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},g(new Date((l=this.envelope)===null||l===void 0?void 0:l.updated_at),f)),n("div",{class:"label"},"Status"),n("div",{class:"value"},h((d=this.envelope)===null||d===void 0?void 0:d.status)),n("div",{class:"label"},"Owner ID"),n("div",{class:"value"},(v=this.envelope)===null||v===void 0?void 0:v.profile_id),n("div",{class:"label"},"Owner Name"),n("div",{class:"value"},c((u=this.envelope)===null||u===void 0?void 0:u.profile)),n("div",{class:"label"},"Owner Email"),n("div",{class:"value"},(m=(w=this.envelope)===null||w===void 0?void 0:w.profile)===null||m===void 0?void 0:m.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),(b=this.envelope)===null||b===void 0?void 0:b.recipients.map((function(i,t){var s;var o=i.status!=="submitted"&&i.status!=="canceled"&&i.status!=="declined";var r=e.canResendRecipient(i);var a=c(i);return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},t+1),n("div",{class:"recipient-name"},i.role_name),n("div",{class:(s={"recipient-status":true},s[i.status]=true,s)},i.status),_&&!B&&n("verdocs-dropdown",{onOptionSelected:function(t){return e.handleRecipientAction(i,t.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!r},{id:"inperson",label:"Get In-Person Link",disabled:!o}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},a),n("div",{class:"recipient-name"},i.email),n("div",{class:"recipient-name"},i.phone)))})),_&&n("div",{class:"reminders"},n("div",{class:"form-row"},n("div",{class:"reminders-label"},"Reminders"),n("verdocs-switch",{disabled:B||this.updatingReminders,checked:this.remindersEnabled,onCheckedChange:function(){return e.handleToggleReminders()}})),this.remindersEnabled&&n(s,null,n("div",{class:"form-row"},"NOTE: Reminders will only be sent for up to 14 days."),n("div",{class:"form-row"},n("div",{class:"form-label"},"Initial Reminder (days):"),n("verdocs-text-input",{placeholder:"In hours...",disabled:B||this.updatingReminders,value:String(Math.floor(this.initialReminder/y)),onBlur:function(i){e.initialReminder=Number(i.target.value)*y;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),n("div",{class:"form-row"},n("div",{class:"form-label"},"Follow-up Reminders:"),n("verdocs-text-input",{placeholder:"In hours...",disabled:B||this.updatingReminders,value:String(Math.floor(this.followupReminders/y)),onBlur:function(i){e.followupReminders=Number(i.target.value)*y;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),n("div",{class:"form-row"},n("div",{class:"form-label"},"Next Reminder:"),n("div",{style:{color:"#dddddd"}},g(new Date((x=this.envelope)===null||x===void 0?void 0:x.next_reminder),"P p"))))),_&&n("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Envelope",onClick:function(){return e.showCancelDialog=!B},disabled:B})),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),S.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:D[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},g(e.date,f))))}))),this.showRecipientDialog&&n("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:function(){return e.showRecipientDialog=""}}),this.showCancelDialog&&n("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:function(){e.showCancelDialog=false;e.handleCancelEnvelope()}}))};return e}());_.style=x}}}));
@@ -1 +1 @@
1
- import{r as e,c as o,h as d,H as a}from"./p-b9654a5e.js";const r=class{constructor(d){e(this,d),this.exit=o(this,"exit",7)}handleDismiss(e){var o;"background-overlay"===e.target.className&&(e.preventDefault(),null===(o=this.exit)||void 0===o||o.emit())}render(){return d(a,{key:"6af3d8e041c352f4125a67488a311751fd8c1401"},d("div",{key:"c00e484f1564cf12ee69a9b44c479fc0bc48a788",class:"background-overlay",onClick:e=>this.handleDismiss(e)},d("div",{key:"603b57d62c4d9b28d3dc63146d39cc52ec58d479",class:"dialog"},d("slot",{key:"0808d13eef9177505e77cb4d4b013520b9bbab7d",name:"title"},d("div",{key:"aa4ac24cd90fa930b72c2a9e71d61296a1b67802",class:"heading"},"Please Confirm")),d("div",{key:"3420c0f08d411ae7765f2bdbfb3f93775ef5459f",class:"content"},d("slot",{key:"6f0c8648d2494b35a7a352ca483b996990dce72b"})))))}};r.style='@-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-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-dialog .background-overlay{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:absolute;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}verdocs-dialog .dialog{width:420px;display:-ms-flexbox;display:flex;max-width:100%;overflow:hidden;border-radius:4px;-ms-flex-direction:column;flex-direction:column;background:#ffffff;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;padding:8px 16px;-ms-flex-direction:row;flex-direction:row;color:#ffffff;background:#46497d}verdocs-dialog .content{padding:16px}verdocs-dialog .content p{margin:0 0 1em 0}verdocs-dialog .buttons{gap:14px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}';export{r as verdocs_dialog}
1
+ import{r as e,c as o,h as d,H as a}from"./p-b9654a5e.js";const r=class{constructor(d){e(this,d),this.exit=o(this,"exit",7)}handleDismiss(e){var o;"background-overlay"===e.target.className&&(e.preventDefault(),null===(o=this.exit)||void 0===o||o.emit())}render(){return d(a,{key:"9ee9b83be4834965eed43634ae021252907d18c8"},d("div",{key:"a3c7aeaf894330126beb05d61d9b733cc7e3a725",class:"background-overlay",onClick:e=>this.handleDismiss(e)},d("div",{key:"eb6af5e6d72572e8850fbfbc50d2272ddf5fc5f4",class:"dialog"},d("slot",{key:"e8a994ffbb3bdfb911a8b6ac1157d0d8620becf7",name:"title"},d("div",{key:"14af814347cdeddac4a6e678106d6b850f0d4293",class:"heading"},"Please Confirm")),d("div",{key:"88835df2b8e30210a94a56f15967b116a1ab483c",class:"content"},d("slot",{key:"58172bc033fba67424073693a150bae44dd84751"})))))}};r.style='@-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-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-dialog .background-overlay{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:absolute;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}verdocs-dialog .dialog{width:420px;display:-ms-flexbox;display:flex;max-width:100%;overflow:hidden;border-radius:4px;-ms-flex-direction:column;flex-direction:column;background:#ffffff;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;padding:8px 16px;-ms-flex-direction:row;flex-direction:row;color:#ffffff;background:#46497d}verdocs-dialog .content{padding:16px}verdocs-dialog .content p{margin:0 0 1em 0}verdocs-dialog .buttons{gap:14px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}';export{r as verdocs_dialog}
@@ -1 +1 @@
1
- System.register(["./p-9186f42e.system.js"],(function(e){"use strict";var o,i,a,d;return{setters:[function(e){o=e.r;i=e.c;a=e.h;d=e.H}],execute:function(){var n='@-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-ok-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-ok-dialog.closed{display:none}verdocs-ok-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-ok-dialog .dialog{max-width:60%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-ok-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;-ms-flex-direction:row;flex-direction:row;padding:8px 16px;font-weight:bold;color:#ffffff;background:#46497d}verdocs-ok-dialog .content{font-size:16px;background:#ffffff;padding:20px}verdocs-ok-dialog .buttons{display:-ms-flexbox;display:flex;margin:30px 0 0 0;padding:0 20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons verdocs-button{margin-left:16px}';var s=n;var t=e("verdocs_ok_dialog",function(){function e(e){o(this,e);this.next=i(this,"next",7);this.exit=i(this,"exit",7);this.heading="";this.message="";this.buttonLabel="OK";this.showCancel=false;this.closed=false}e.prototype.handleOk=function(){this.next.emit()};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}};e.prototype.render=function(){var e=this;return a(d,{key:"f41613ca32a9471277c816d753e7f818ef427fd0",class:this.closed?"closed":""},a("div",{key:"570538e2743b23b5f18a1ec6ea3db51dfd314f02",class:"background-overlay",onClick:function(o){return e.handleDismiss(o)}},a("div",{key:"17bfc3cfaadc8d10fe27211cd4a0eb48083f7a4b",class:"dialog"},a("div",{key:"bc88208d6897a191ef5fda323a74acd3e3c2620e",class:"heading"},this.heading),a("div",{key:"bc794df180672198964f32a6c71eff9dd1180db9",class:"content"},a("div",{key:"d8618e9b479e64b457bca57838437f91a0677560",class:"message",innerHTML:this.message}),a("div",{key:"101f7819fa69c3cf8f8958a5582835b56cf94775",class:"buttons"},this.showCancel?a("verdocs-button",{label:"CANCEL",variant:"outline",onClick:function(){return e.handleCancel()}}):a("div",{style:{display:"none"}}),a("verdocs-button",{key:"e755590fdd93cb9cc7b23a3812377d5216a70aae",label:this.buttonLabel,onClick:function(){return e.handleOk()}}))))))};return e}());t.style=s}}}));
1
+ System.register(["./p-9186f42e.system.js"],(function(e){"use strict";var o,i,d,n;return{setters:[function(e){o=e.r;i=e.c;d=e.h;n=e.H}],execute:function(){var s='@-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-ok-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-ok-dialog.closed{display:none}verdocs-ok-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-ok-dialog .dialog{max-width:60%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-ok-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;-ms-flex-direction:row;flex-direction:row;padding:8px 16px;font-weight:bold;color:#ffffff;background:#46497d}verdocs-ok-dialog .content{font-size:16px;background:#ffffff;padding:20px}verdocs-ok-dialog .buttons{display:-ms-flexbox;display:flex;margin:30px 0 0 0;padding:0 20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons verdocs-button{margin-left:16px}';var a=s;var c=e("verdocs_ok_dialog",function(){function e(e){o(this,e);this.next=i(this,"next",7);this.exit=i(this,"exit",7);this.heading="";this.message="";this.buttonLabel="OK";this.showCancel=false;this.closed=false}e.prototype.handleOk=function(){this.next.emit()};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}};e.prototype.render=function(){var e=this;return d(n,{key:"1269b0b3d50a444204a0fdd4221d5a14ab431e55",class:this.closed?"closed":""},d("div",{key:"bf4fdee46a53cdcb05b4d8a43ec02a0bd101d92b",class:"background-overlay",onClick:function(o){return e.handleDismiss(o)}},d("div",{key:"7c83cc38d84fc7648a8ecc6d8b84b1bc3b31200d",class:"dialog"},d("div",{key:"a5bd6abf4c3b296225b042774da73df20cc0c2a3",class:"heading"},this.heading),d("div",{key:"875c81191820b9c7dbc107c99e0e6d4b9881353a",class:"content"},d("div",{key:"0bbf1de8cc0455ef01238923a9928702b55971d7",class:"message",innerHTML:this.message}),d("div",{key:"79d409dd9768b5a12d2734cfc5138a4057c9ff0a",class:"buttons"},this.showCancel?d("verdocs-button",{label:"CANCEL",variant:"outline",onClick:function(){return e.handleCancel()}}):d("div",{style:{display:"none"}}),d("verdocs-button",{key:"8ae36e25d466e6e074544f3bb75f972bcfdc11a3",label:this.buttonLabel,onClick:function(){return e.handleOk()}}))))))};return e}());c.style=a}}}));
@@ -1 +1 @@
1
- import{r as e,c as o,h as a,H as d}from"./p-b9654a5e.js";const s=class{constructor(a){e(this,a),this.next=o(this,"next",7),this.exit=o(this,"exit",7),this.heading="",this.message="",this.buttonLabel="OK",this.showCancel=!1,this.closed=!1}handleOk(){this.next.emit()}handleCancel(){this.exit.emit()}handleDismiss(e){this.closed=!0,"background-overlay"===e.target.className&&(e.preventDefault(),this.exit.emit())}render(){return a(d,{key:"f41613ca32a9471277c816d753e7f818ef427fd0",class:this.closed?"closed":""},a("div",{key:"570538e2743b23b5f18a1ec6ea3db51dfd314f02",class:"background-overlay",onClick:e=>this.handleDismiss(e)},a("div",{key:"17bfc3cfaadc8d10fe27211cd4a0eb48083f7a4b",class:"dialog"},a("div",{key:"bc88208d6897a191ef5fda323a74acd3e3c2620e",class:"heading"},this.heading),a("div",{key:"bc794df180672198964f32a6c71eff9dd1180db9",class:"content"},a("div",{key:"d8618e9b479e64b457bca57838437f91a0677560",class:"message",innerHTML:this.message}),a("div",{key:"101f7819fa69c3cf8f8958a5582835b56cf94775",class:"buttons"},this.showCancel?a("verdocs-button",{label:"CANCEL",variant:"outline",onClick:()=>this.handleCancel()}):a("div",{style:{display:"none"}}),a("verdocs-button",{key:"e755590fdd93cb9cc7b23a3812377d5216a70aae",label:this.buttonLabel,onClick:()=>this.handleOk()}))))))}};s.style='@-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-ok-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-ok-dialog.closed{display:none}verdocs-ok-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-ok-dialog .dialog{max-width:60%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-ok-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;-ms-flex-direction:row;flex-direction:row;padding:8px 16px;font-weight:bold;color:#ffffff;background:#46497d}verdocs-ok-dialog .content{font-size:16px;background:#ffffff;padding:20px}verdocs-ok-dialog .buttons{display:-ms-flexbox;display:flex;margin:30px 0 0 0;padding:0 20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons verdocs-button{margin-left:16px}';export{s as verdocs_ok_dialog}
1
+ import{r as e,c as o,h as d,H as s}from"./p-b9654a5e.js";const i=class{constructor(d){e(this,d),this.next=o(this,"next",7),this.exit=o(this,"exit",7),this.heading="",this.message="",this.buttonLabel="OK",this.showCancel=!1,this.closed=!1}handleOk(){this.next.emit()}handleCancel(){this.exit.emit()}handleDismiss(e){this.closed=!0,"background-overlay"===e.target.className&&(e.preventDefault(),this.exit.emit())}render(){return d(s,{key:"1269b0b3d50a444204a0fdd4221d5a14ab431e55",class:this.closed?"closed":""},d("div",{key:"bf4fdee46a53cdcb05b4d8a43ec02a0bd101d92b",class:"background-overlay",onClick:e=>this.handleDismiss(e)},d("div",{key:"7c83cc38d84fc7648a8ecc6d8b84b1bc3b31200d",class:"dialog"},d("div",{key:"a5bd6abf4c3b296225b042774da73df20cc0c2a3",class:"heading"},this.heading),d("div",{key:"875c81191820b9c7dbc107c99e0e6d4b9881353a",class:"content"},d("div",{key:"0bbf1de8cc0455ef01238923a9928702b55971d7",class:"message",innerHTML:this.message}),d("div",{key:"79d409dd9768b5a12d2734cfc5138a4057c9ff0a",class:"buttons"},this.showCancel?d("verdocs-button",{label:"CANCEL",variant:"outline",onClick:()=>this.handleCancel()}):d("div",{style:{display:"none"}}),d("verdocs-button",{key:"8ae36e25d466e6e074544f3bb75f972bcfdc11a3",label:this.buttonLabel,onClick:()=>this.handleOk()}))))))}};i.style='@-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-ok-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-ok-dialog.closed{display:none}verdocs-ok-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-ok-dialog .dialog{max-width:60%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-ok-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;-ms-flex-direction:row;flex-direction:row;padding:8px 16px;font-weight:bold;color:#ffffff;background:#46497d}verdocs-ok-dialog .content{font-size:16px;background:#ffffff;padding:20px}verdocs-ok-dialog .buttons{display:-ms-flexbox;display:flex;margin:30px 0 0 0;padding:0 20px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons verdocs-button{margin-left:16px}';export{i as verdocs_ok_dialog}
@@ -1 +1 @@
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-da4d4eed.js";const m=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=!0,this.canView=!0,this.canDone=!0,this.isOpen=void 0,this.recipientStatusIcons=[],this.containerId=`verdocs-status-indicator-${Math.random().toString(36).substring(2,11)}`,this.gettingLinks={},this.links={},this.loading=!0,this.envelope=null}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[RECIPIENTS] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[RECIPIENTS] Unable to start session, must be authenticated");this.listenToEnvelope()}catch(o){console.log("[RECIPIENTS] Error loading envelope",o),null===(e=this.sdkError)||void 0===e||e.emit(new d(o.message,null===(i=o.response)||void 0===i?void 0:i.status,null===(s=o.response)||void 0===s?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)),!1,(e=>{this.envelope=e,this.loading=!1,this.sortEnvelopeRecipients()}))}unlistenToEnvelope(){this.envelopeListenerId&&(p.store.delListener(this.envelopeListenerId),this.envelopeListenerId=null)}sortEnvelopeRecipients(){var e;((null===(e=this.envelope)||void 0===e?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(),null===(i=this.another)||void 0===i||i.emit({envelope:this.envelope})}handleView(e){var i;e.preventDefault(),null===(i=this.view)||void 0===i||i.emit({envelope:this.envelope})}handleDone(e){var i;e.preventDefault(),null===(i=this.next)||void 0===i||i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>{})).catch((e=>{var i;console.warn("[RECIPIENTS] Error copying to clipboard",e),null===(i=this.sdkError)||void 0===i||i.emit(e)}))}getLink(e){this.gettingLinks={...this.gettingLinks,[e.role_name]:!0},l(this.endpoint,e.envelope_id,e.role_name).then((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},this.links={...this.links,[e.role_name]:i.link},this.copyLink(i.link)})).catch((i=>{var s;this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},console.log("[RECIPIENTS] Error getting link",i),null===(s=this.sdkError)||void 0===s||s.emit(i)}))}render(){var e;return this.loading?s(o,null):s(o,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"Recipient Summary"),s("div",{class:"summary-rows"},((null===(e=this.envelope)||void 0===e?void 0:e.recipients)||[]).map((e=>{const i=n(this.envelope),o=a(e,i),t=this.links[e.role_name],r=this.gettingLinks[e.role_name],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)}))))}};m.style='@-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%}';export{m as verdocs_envelope_recipient_summary}
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-b712e729.js";const m=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=!0,this.canView=!0,this.canDone=!0,this.isOpen=void 0,this.recipientStatusIcons=[],this.containerId=`verdocs-status-indicator-${Math.random().toString(36).substring(2,11)}`,this.gettingLinks={},this.links={},this.loading=!0,this.envelope=null}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[RECIPIENTS] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[RECIPIENTS] Unable to start session, must be authenticated");this.listenToEnvelope()}catch(o){console.log("[RECIPIENTS] Error loading envelope",o),null===(e=this.sdkError)||void 0===e||e.emit(new d(o.message,null===(i=o.response)||void 0===i?void 0:i.status,null===(s=o.response)||void 0===s?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)),!1,(e=>{this.envelope=e,this.loading=!1,this.sortEnvelopeRecipients()}))}unlistenToEnvelope(){this.envelopeListenerId&&(p.store.delListener(this.envelopeListenerId),this.envelopeListenerId=null)}sortEnvelopeRecipients(){var e;((null===(e=this.envelope)||void 0===e?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(),null===(i=this.another)||void 0===i||i.emit({envelope:this.envelope})}handleView(e){var i;e.preventDefault(),null===(i=this.view)||void 0===i||i.emit({envelope:this.envelope})}handleDone(e){var i;e.preventDefault(),null===(i=this.next)||void 0===i||i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>{})).catch((e=>{var i;console.warn("[RECIPIENTS] Error copying to clipboard",e),null===(i=this.sdkError)||void 0===i||i.emit(e)}))}getLink(e){this.gettingLinks={...this.gettingLinks,[e.role_name]:!0},l(this.endpoint,e.envelope_id,e.role_name).then((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},this.links={...this.links,[e.role_name]:i.link},this.copyLink(i.link)})).catch((i=>{var s;this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},console.log("[RECIPIENTS] Error getting link",i),null===(s=this.sdkError)||void 0===s||s.emit(i)}))}render(){var e;return this.loading?s(o,null):s(o,null,s("div",{class:"summary-content"},s("h1",{class:"summary-title"},"Recipient Summary"),s("div",{class:"summary-rows"},((null===(e=this.envelope)||void 0===e?void 0:e.recipients)||[]).map((e=>{const i=n(this.envelope),o=a(e,i),t=this.links[e.role_name],r=this.gettingLinks[e.role_name],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)}))))}};m.style='@-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%}';export{m as verdocs_envelope_recipient_summary}
@@ -1 +1 @@
1
- System.register(["./p-9186f42e.system.js"],(function(e){"use strict";var r,o;return{setters:[function(e){r=e.r;o=e.h}],execute:function(){var a='@-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-search-tabs{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:block}';var c=a;var s=e("verdocs_search_tabs",function(){function e(e){r(this,e);this.selected="all"}e.prototype.render=function(){return o("div",{key:"94316e73f4d9ec80389a8442a8bb3e2b95b91840"}," ")};return e}());s.style=c}}}));
1
+ System.register(["./p-9186f42e.system.js"],(function(e){"use strict";var r,o;return{setters:[function(e){r=e.r;o=e.h}],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-search-tabs{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:block}';var a=c;var s=e("verdocs_search_tabs",function(){function e(e){r(this,e);this.selected="all"}e.prototype.render=function(){return o("div",{key:"4c809496e5ade75145e1e3c5b5d9b4749078b3e6"}," ")};return e}());s.style=a}}}));
@@ -1 +1 @@
1
- System.register(["./p-9186f42e.system.js"],(function(e){"use strict";var a,o,t;return{setters:[function(e){a=e.r;o=e.h;t=e.H}],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-template-card{font-family:"Inter", "Barlow", sans-serif;width:320px;height:320px;display:-ms-flexbox;display:flex;padding:25px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;-webkit-box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05);box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05)}verdocs-template-card .thumbnail{width:272px;height:158px;-o-object-fit:cover;object-fit:cover;margin-bottom:22px;-o-object-position:-20% 0;object-position:-20% 0}verdocs-template-card .name{font-size:18px;font-weight:700;margin-bottom:7px}verdocs-template-card .org-name{font-size:14px;font-weight:700;margin-bottom:6px}verdocs-template-card hr{width:100%;margin-bottom:17px;background-color:#aeb4bf}verdocs-template-card .controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;text-align:center;font-size:16px}verdocs-template-card .controls .control{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;margin-right:8px;-ms-flex-align:start;align-items:flex-start;border-right:1px solid #aeb4bf}verdocs-template-card .controls .control.secondary{-ms-flex-pack:center;justify-content:center}verdocs-template-card .controls .control svg{fill:#aeb4bf;height:16px;max-width:16px;margin:0 8px -2px 0}verdocs-template-card .additional-controls svg{margin-right:0;fill:#654dcb}';var r=c;var s='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>';var d='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"/></svg>';var i='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"/></svg>';var l='<svg width="31" height="29" viewBox="0 0 31 29" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_31553_1553)"><path d="M30.886 11.4917C30.8916 11.0917 30.753 10.7034 30.4962 10.3993C30.2394 10.0953 29.882 9.8964 29.4908 9.83995L29.5182 9.65005L29.4908 9.83995L21.0938 8.60261L17.3412 0.912551C17.2067 0.638179 16.9992 0.407285 16.7421 0.245866C16.485 0.0844465 16.1885 -0.00111389 15.886 -0.00111389C15.5835 -0.00111389 15.287 0.0844465 15.0299 0.245866C14.7728 0.407285 14.5653 0.638179 14.4308 0.912551L10.6781 8.60261L2.28121 9.8392C1.89206 9.89475 1.53611 10.0916 1.2796 10.3931C1.02308 10.6945 0.88348 11.08 0.886776 11.4779C0.886447 11.6961 0.929977 11.912 1.01472 12.1125C1.09946 12.3131 1.22363 12.4941 1.37968 12.6445L7.45563 18.5744L6.01943 27.0241C6.00289 27.1258 5.99449 27.2287 5.99435 27.3317C5.99313 27.7717 6.16395 28.1943 6.4695 28.5071C6.77505 28.82 7.19045 28.9976 7.62496 29.0013C7.88846 29.0008 8.14779 28.9345 8.37992 28.8083L15.8883 24.8217L23.3967 28.8114C23.6287 28.9361 23.8873 29.0015 24.15 29.002C24.5752 28.9998 24.9832 28.8318 25.2893 28.5329C25.4452 28.3832 25.5695 28.2029 25.6544 28.003C25.7392 27.8031 25.783 27.5878 25.783 27.3702C25.7827 27.2731 25.7743 27.176 25.7579 27.0803L24.3209 18.6296L30.3931 12.7022C30.7094 12.3809 30.8867 11.9454 30.886 11.4917ZM22.0759 17.53L21.9437 17.3916L22.0759 17.53C22.0072 17.5977 21.9525 17.6787 21.9152 17.7681C21.8779 17.8575 21.8587 17.9536 21.8587 18.0506L21.8693 18.1737L23.2037 26.0237L16.2164 22.3148C16.1136 22.2602 15.9994 22.2317 15.8833 22.2317C15.7673 22.2317 15.653 22.2602 15.5503 22.3148L8.57132 26.0245L9.90651 18.1745L9.91712 18.0506C9.91696 17.9536 9.89768 17.8576 9.86038 17.7682C9.82308 17.6788 9.76851 17.5978 9.6999 17.53L4.05538 11.9724L11.8576 10.8258C11.9725 10.8088 12.0816 10.7638 12.1755 10.6947C12.2695 10.6256 12.3454 10.5344 12.3969 10.429L15.886 3.27721L19.3797 10.429C19.4313 10.5344 19.5074 10.6256 19.6014 10.6948C19.6955 10.7639 19.8047 10.8088 19.9197 10.8258L27.7197 11.9747L22.0759 17.53Z" fill="#ADB6BD"/></g><defs><clipPath id="clip0_31553_1553"><rect width="30" height="29" fill="white" transform="translate(0.886719)"/></clipPath></defs></svg>';var n=e("verdocs_template_card",function(){function e(e){a(this,e);this.template=undefined}e.prototype.render=function(){var e,a,c,r;return o(t,{key:"8c1e1c635b1baa655956acdb25c0dadf7aa7fb37"},o("span",{key:"27f70562114c4b477a39d2c592ac970958308b6a",class:"name"},this.template.name),o("span",{key:"e7d9da9cef9ead160a65a4cee49f030d52b20eb3",class:"org-name"},((e=this.template.organization)===null||e===void 0?void 0:e.name)||"Public"),o("hr",{key:"ae53a4cb7e75c6b2af578e2518b601e742aecfb8"}),o("div",{key:"f493a7d3641fe90d6bf35649664f76b5fc1ee3d3",class:"controls"},o("div",{key:"f0ef5225ff60e056166eede4ba69d4999c1a9887",class:"control"},o("span",{key:"5f3f45383a81584741ee04b1fce6b4720bab9063",class:"icon",innerHTML:l}),o("span",{key:"9faf96a64292b6529e29186a4bd1e12d9ad3b42b",class:"value"},this.template.star_counter)),o("div",{key:"2b605818b05ddf5ea9c3ac28f1bad3d0c8a3e3fb",class:"control secondary"},o("span",{key:"c12a8f975614144c72060cf9213a7e8081636602",class:"icon",innerHTML:i}),o("span",{key:"53dd14ec4e8c0c57bbff3866901d10baa61abc31",class:"value"},((r=(c=(a=this.template)===null||a===void 0?void 0:a.documents)===null||c===void 0?void 0:c[0])===null||r===void 0?void 0:r.pages)||1)),o("div",{key:"c2e72a02dcb918fe595f2fd7228728bd29b1c816",class:"control secondary"},o("span",{key:"9ed65ee6703d3db204c7f9619884615d3595f9f2",class:"icon",innerHTML:d}),o("span",{key:"805565cdc082e8d76e2dd2db98aeede1eee9810f",class:"value"},this.template.counter)),o("span",{key:"8914f5b5d9d2395bd60f7fded9d58b4c48f85100",class:"additional-controls",innerHTML:s})))};return e}());n.style=r}}}));
1
+ System.register(["./p-9186f42e.system.js"],(function(e){"use strict";var a,c,o;return{setters:[function(e){a=e.r;c=e.h;o=e.H}],execute:function(){var t='@-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-card{font-family:"Inter", "Barlow", sans-serif;width:320px;height:320px;display:-ms-flexbox;display:flex;padding:25px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;-webkit-box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05);box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05)}verdocs-template-card .thumbnail{width:272px;height:158px;-o-object-fit:cover;object-fit:cover;margin-bottom:22px;-o-object-position:-20% 0;object-position:-20% 0}verdocs-template-card .name{font-size:18px;font-weight:700;margin-bottom:7px}verdocs-template-card .org-name{font-size:14px;font-weight:700;margin-bottom:6px}verdocs-template-card hr{width:100%;margin-bottom:17px;background-color:#aeb4bf}verdocs-template-card .controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;text-align:center;font-size:16px}verdocs-template-card .controls .control{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;margin-right:8px;-ms-flex-align:start;align-items:flex-start;border-right:1px solid #aeb4bf}verdocs-template-card .controls .control.secondary{-ms-flex-pack:center;justify-content:center}verdocs-template-card .controls .control svg{fill:#aeb4bf;height:16px;max-width:16px;margin:0 8px -2px 0}verdocs-template-card .additional-controls svg{margin-right:0;fill:#654dcb}';var r=t;var s='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>';var i='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"/></svg>';var l='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"/></svg>';var n='<svg width="31" height="29" viewBox="0 0 31 29" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_31553_1553)"><path d="M30.886 11.4917C30.8916 11.0917 30.753 10.7034 30.4962 10.3993C30.2394 10.0953 29.882 9.8964 29.4908 9.83995L29.5182 9.65005L29.4908 9.83995L21.0938 8.60261L17.3412 0.912551C17.2067 0.638179 16.9992 0.407285 16.7421 0.245866C16.485 0.0844465 16.1885 -0.00111389 15.886 -0.00111389C15.5835 -0.00111389 15.287 0.0844465 15.0299 0.245866C14.7728 0.407285 14.5653 0.638179 14.4308 0.912551L10.6781 8.60261L2.28121 9.8392C1.89206 9.89475 1.53611 10.0916 1.2796 10.3931C1.02308 10.6945 0.88348 11.08 0.886776 11.4779C0.886447 11.6961 0.929977 11.912 1.01472 12.1125C1.09946 12.3131 1.22363 12.4941 1.37968 12.6445L7.45563 18.5744L6.01943 27.0241C6.00289 27.1258 5.99449 27.2287 5.99435 27.3317C5.99313 27.7717 6.16395 28.1943 6.4695 28.5071C6.77505 28.82 7.19045 28.9976 7.62496 29.0013C7.88846 29.0008 8.14779 28.9345 8.37992 28.8083L15.8883 24.8217L23.3967 28.8114C23.6287 28.9361 23.8873 29.0015 24.15 29.002C24.5752 28.9998 24.9832 28.8318 25.2893 28.5329C25.4452 28.3832 25.5695 28.2029 25.6544 28.003C25.7392 27.8031 25.783 27.5878 25.783 27.3702C25.7827 27.2731 25.7743 27.176 25.7579 27.0803L24.3209 18.6296L30.3931 12.7022C30.7094 12.3809 30.8867 11.9454 30.886 11.4917ZM22.0759 17.53L21.9437 17.3916L22.0759 17.53C22.0072 17.5977 21.9525 17.6787 21.9152 17.7681C21.8779 17.8575 21.8587 17.9536 21.8587 18.0506L21.8693 18.1737L23.2037 26.0237L16.2164 22.3148C16.1136 22.2602 15.9994 22.2317 15.8833 22.2317C15.7673 22.2317 15.653 22.2602 15.5503 22.3148L8.57132 26.0245L9.90651 18.1745L9.91712 18.0506C9.91696 17.9536 9.89768 17.8576 9.86038 17.7682C9.82308 17.6788 9.76851 17.5978 9.6999 17.53L4.05538 11.9724L11.8576 10.8258C11.9725 10.8088 12.0816 10.7638 12.1755 10.6947C12.2695 10.6256 12.3454 10.5344 12.3969 10.429L15.886 3.27721L19.3797 10.429C19.4313 10.5344 19.5074 10.6256 19.6014 10.6948C19.6955 10.7639 19.8047 10.8088 19.9197 10.8258L27.7197 11.9747L22.0759 17.53Z" fill="#ADB6BD"/></g><defs><clipPath id="clip0_31553_1553"><rect width="30" height="29" fill="white" transform="translate(0.886719)"/></clipPath></defs></svg>';var d=e("verdocs_template_card",function(){function e(e){a(this,e);this.template=undefined}e.prototype.render=function(){var e,a,t,r;return c(o,{key:"a0120b0a9d3430b7e8692bc24b8f3636dd37ab91"},c("span",{key:"cecadc6292764c38b76d4739bcef8b8465ee3ae6",class:"name"},this.template.name),c("span",{key:"942d609f2b0897e05630560dbeb0c4c5545cc60d",class:"org-name"},((e=this.template.organization)===null||e===void 0?void 0:e.name)||"Public"),c("hr",{key:"82c428c9e9ce82a85b0a2f3b3c4b60d2fe59339a"}),c("div",{key:"021c22798331eed52c972456a91c242281c0292d",class:"controls"},c("div",{key:"124aa6c01f9e20ba5358f17810a5cd5ad27384db",class:"control"},c("span",{key:"ece894c92186f75d2e5bf2c7fed96ea3d0eb4c90",class:"icon",innerHTML:n}),c("span",{key:"142b1848c47efafa5bf7201ed8f0bfa9d86d37b8",class:"value"},this.template.star_counter)),c("div",{key:"7c83ac1b26f8c90df8a3e6ca8b3a2032ca75e464",class:"control secondary"},c("span",{key:"33574402f74338520c77348573531488b402c794",class:"icon",innerHTML:l}),c("span",{key:"c9788324cddccc57425e97a8b132ba8ab1014355",class:"value"},((r=(t=(a=this.template)===null||a===void 0?void 0:a.documents)===null||t===void 0?void 0:t[0])===null||r===void 0?void 0:r.pages)||1)),c("div",{key:"9c0b2a91e21cd80bcc8219f7cdd669a9ed2e827e",class:"control secondary"},c("span",{key:"fffbbe3031a9eec3ff83c68033420f9219134080",class:"icon",innerHTML:i}),c("span",{key:"8d8655d9da311ec254ba77243b239c5da14b7516",class:"value"},this.template.counter)),c("span",{key:"774cfe8937b7c894f3c9d6ae308d2a48bac9f513",class:"additional-controls",innerHTML:s})))};return e}());d.style=r}}}));
@@ -1 +1 @@
1
- import{r as e,c as o,h as r,H as s}from"./p-b9654a5e.js";import{VerdocsEndpoint as l}from"@verdocs/js-sdk";import{u as c}from"./p-b0766439.js";const d=class{constructor(r){e(this,r),this.fileSelected=o(this,"fileSelected",7),this.endpoint=l.getDefault(),this.file=void 0}handleFileChanged(e){var o,r;this.file=(null===(o=e.target.files)||void 0===o?void 0:o[0])||null,null===(r=this.fileSelected)||void 0===r||r.emit({file:this.file}),console.debug("[CHOOSER] Selected file",this.file)}handleSelectFile(e){var o,r;e.stopPropagation(),this.file=null,null===(o=this.fileSelected)||void 0===o||o.emit({file:null}),null===(r=document.getElementById("verdocs-file-chooser"))||void 0===r||r.click()}render(){const e=this.file?"Select a different file":"Select a file from your computer";return r(s,{key:"be9ae4e6e32d7c284001b7fea41d96f39b642005"},r("input",{key:"0bc7cd1766b630372ea380300575dfd239bc86e4",type:"file",multiple:!0,id:"verdocs-file-chooser",accept:"application/pdf,.pdf,.doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),r("div",{key:"dbd3aa4e9d64b4bd427f4c6e198d92b10e94dfff",class:"upload-box"},r("div",{key:"41a10b9ffbe862bedc300cdbb8d2a366dc00414e",class:"selected-filename"},this.file?this.file.name:"Drag a file here"),r("div",{key:"128679d890e1c68ff1c7fb47abd4f638db453b87",class:"or-prefer"},this.file?c:"Or, if you prefer..."),r("verdocs-button",{key:"277c4246513e40dc2bc5e7f0f7d7130d52904813",label:e,size:"small",onClick:e=>this.handleSelectFile(e)})))}};d.style='@-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-file-chooser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-file-chooser .upload-box{text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 15px;color:rgba(0, 0, 0, 0.54)}verdocs-file-chooser .upload-box svg{width:64px;height:64px;fill:#5c6575}verdocs-file-chooser .selected-filename{font-size:20px;font-weight:bold;overflow-wrap:anywhere}verdocs-file-chooser .or-prefer{height:20px;margin:20px 0;font-size:16px}';const i=class{constructor(o){e(this,o),this.label="",this.showPercent=!1,this.percent=0}render(){const e=Math.ceil(100*Math.min(this.percent,100)/100);return console.log("Rendering progress bar",{widthPercent:e,label:this.label,showPercent:this.showPercent,percent:this.percent}),r(s,{key:"c57b566587b7fe5f95f7082964dc7d27c46008cb"},r("div",{key:"b44243b4c65cdd5ddb7a47028db07e47e1c9373b",class:"labels"},this.label&&r("div",{key:"58715d2cd0a47260618472ed06d3eeda095ea852",class:"label"},this.label),this.showPercent&&r("div",{key:"38b9fa2f2180eee29cdc6aff0562475c9d6cc943",class:"label"},this.percent,"%")),r("div",{key:"1258f3696cb5852865e7d1af59bf2acb7acfda50",class:"bar"},r("div",{key:"eb1346d2b9f7ccce786c358ef247fd3ec62de67f",class:"slider",style:{width:`${e}%`}})))}};i.style='@-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-progress-bar{font-family:"Inter", "Barlow", sans-serif;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-progress-bar .labels{display:-ms-flexbox;display:flex;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-progress-bar .labels .label{display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin-right:8px;color:#33364b}verdocs-progress-bar .bar{display:-ms-flexbox;display:flex;-ms-flex:0 0 10px;flex:0 0 10px;border-radius:5px;background-color:#cccccc}verdocs-progress-bar .bar .slider{display:-ms-flexbox;display:flex;border-radius:5px;background-color:#55bc81}';export{d as verdocs_file_chooser,i as verdocs_progress_bar}
1
+ import{r as e,c as o,h as r,H as s}from"./p-b9654a5e.js";import{VerdocsEndpoint as l}from"@verdocs/js-sdk";import{u as c}from"./p-b0766439.js";const i=class{constructor(r){e(this,r),this.fileSelected=o(this,"fileSelected",7),this.endpoint=l.getDefault(),this.file=void 0}handleFileChanged(e){var o,r;this.file=(null===(o=e.target.files)||void 0===o?void 0:o[0])||null,null===(r=this.fileSelected)||void 0===r||r.emit({file:this.file}),console.debug("[CHOOSER] Selected file",this.file)}handleSelectFile(e){var o,r;e.stopPropagation(),this.file=null,null===(o=this.fileSelected)||void 0===o||o.emit({file:null}),null===(r=document.getElementById("verdocs-file-chooser"))||void 0===r||r.click()}render(){const e=this.file?"Select a different file":"Select a file from your computer";return r(s,{key:"be9ae4e6e32d7c284001b7fea41d96f39b642005"},r("input",{key:"0bc7cd1766b630372ea380300575dfd239bc86e4",type:"file",multiple:!0,id:"verdocs-file-chooser",accept:"application/pdf,.pdf,.doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),r("div",{key:"dbd3aa4e9d64b4bd427f4c6e198d92b10e94dfff",class:"upload-box"},r("div",{key:"41a10b9ffbe862bedc300cdbb8d2a366dc00414e",class:"selected-filename"},this.file?this.file.name:"Drag a file here"),r("div",{key:"128679d890e1c68ff1c7fb47abd4f638db453b87",class:"or-prefer"},this.file?c:"Or, if you prefer..."),r("verdocs-button",{key:"277c4246513e40dc2bc5e7f0f7d7130d52904813",label:e,size:"small",onClick:e=>this.handleSelectFile(e)})))}};i.style='@-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-file-chooser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-file-chooser .upload-box{text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 15px;color:rgba(0, 0, 0, 0.54)}verdocs-file-chooser .upload-box svg{width:64px;height:64px;fill:#5c6575}verdocs-file-chooser .selected-filename{font-size:20px;font-weight:bold;overflow-wrap:anywhere}verdocs-file-chooser .or-prefer{height:20px;margin:20px 0;font-size:16px}';const a=class{constructor(o){e(this,o),this.label="",this.showPercent=!1,this.percent=0}render(){const e=Math.ceil(100*Math.min(this.percent,100)/100);return console.log("Rendering progress bar",{widthPercent:e,label:this.label,showPercent:this.showPercent,percent:this.percent}),r(s,{key:"14a4f7cd07957fee25343222ec781ba6e6304059"},r("div",{key:"07dfc3395766807af984d521f2b2be8eea1a27d4",class:"labels"},this.label&&r("div",{key:"26dd439a1506bff22f4b8568f40a2a4e597b556e",class:"label"},this.label),this.showPercent&&r("div",{key:"f73d067c6b6b5afcd7b3f703b5e6055c703bb3c0",class:"label"},this.percent,"%")),r("div",{key:"1a95c48e82676e63edc1a190911c4f9823681612",class:"bar"},r("div",{key:"505638049abc86f9516b37644a883f7bd1e8a232",class:"slider",style:{width:`${e}%`}})))}};a.style='@-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-progress-bar{font-family:"Inter", "Barlow", sans-serif;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-progress-bar .labels{display:-ms-flexbox;display:flex;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-progress-bar .labels .label{display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin-right:8px;color:#33364b}verdocs-progress-bar .bar{display:-ms-flexbox;display:flex;-ms-flex:0 0 10px;flex:0 0 10px;border-radius:5px;background-color:#cccccc}verdocs-progress-bar .bar .slider{display:-ms-flexbox;display:flex;border-radius:5px;background-color:#55bc81}';export{i as verdocs_file_chooser,a as verdocs_progress_bar}
@@ -0,0 +1 @@
1
+ import{getTemplate as e}from"@verdocs/js-sdk";const t=e=>typeof e,s="",n=t(s),l=t(!0),a=t(0),o=t(t),r="type",c="default",i="Has",u="Ids",d="Table",h=d+"s",f=d+u,b="Row",g=b+"Count",T=b+u,_="Cell",p=_+u,v="Value",S=v+"s",w=v+u,m=e=>s+e,C=isFinite,V=e=>null==e,I=(e,t,s)=>V(e)?s?.():t(e),y=e=>e==n||e==l,R=e=>t(e)==o,J=e=>Array.isArray(e),L=(e,t,s)=>e.slice(t,s),E=e=>e.length,O=(e,t)=>e.forEach(t),j=(e,t)=>e.map(t),N=(e,...t)=>e.push(...t),F=Object,M=e=>F.getPrototypeOf(e),$=F.entries,x=F.isFrozen,A=e=>!V(e)&&I(M(e),(e=>e==F.prototype||V(M(e))),(()=>!0)),D=F.keys,P=F.freeze,k=(e,t)=>t in e,z=(e,t)=>(delete e[t],e),H=(e,t)=>j($(e),(([e,s])=>t(s,e))),W=e=>A(e)&&0==(e=>E(D(e)))(e),q=(e,t,s,n=0)=>V(e)||!A(e)||!n&&W(e)||x(e)?(s?.(),!1):(H(e,((s,n)=>{t(s,n)||z(e,n)})),!!n||!W(e)),B=e=>t=>Z(t).reduce(((t,s)=>t+e(s)),0),G=e=>e?.size??0,K=B(G),Q=B(K),U=B(Q),X=(e,t)=>e?.has(t)??!1,Y=e=>V(e)||0==G(e),Z=e=>[...e?.values()??[]],ee=e=>e.clear(),te=(e,t)=>e?.forEach(t),se=(e,t)=>e?.delete(t),ne=e=>new Map(e),le=e=>[...e?.keys()??[]],ae=(e,t)=>e?.get(t),oe=(e,t)=>te(e,((e,s)=>t(s,e))),re=(e,t,s)=>V(s)?(se(e,t),e):e?.set(t,s),ce=(e,t,s,n)=>(X(e,t)?n?.(ae(e,t)):re(e,t,s()),ae(e,t)),ie=(e,t,s,n=re)=>(H(t,((t,n)=>s(e,n,t))),oe(e,(s=>k(t,s)?0:n(e,s))),e),ue=(e,t,s,n)=>{const l={};return te(e,((e,a)=>{if(!s?.(e,a)){const s=t?t(e,a):e;n?.(s)||(l[a]=s)}})),l},de=(e,t,s)=>ue(e,(e=>ue(e,t,s)),Y,W),he=(e,t,s)=>ue(e,(e=>de(e,t,s)),Y,W),fe=(e,t)=>{const s=ne();return te(e,((e,n)=>s.set(n,t?.(e)??e))),s},be=e=>fe(e,fe),ge=e=>fe(e,be),Te=(e,t,s,n,l=0)=>I((s?ce:ae)(e,t[l],l>E(t)-2?s:ne),(a=>{if(l>E(t)-2)return n?.(a)&&re(e,t[l]),a;const o=Te(a,t,s,n,l+1);return Y(a)&&re(e,t[l]),o})),_e=e=>{const s=t(e);return y(s)||s==a&&C(e)?s:void 0},pe=(e,t,s,n,l)=>V(l)?e.delCell(t,s,n,!0):e.setCell(t,s,n,l),ve=(e,t,s)=>V(s)?e.delValue(t):e.setValue(t,s),Se=e=>new Set(J(e)||V(e)?e:[e]),we=(e,t)=>e?.add(t),me=/^\d+$/,Ce=()=>{const e=[];let t=0;return[n=>(n?e.shift():null)??s+t++,t=>{me.test(t)&&E(e)<1e3&&N(e,t)}]},Ve=e=>[e,e],Ie=(e,t=K)=>t(e[0])+t(e[1]),ye=()=>[ne(),ne()],Re=e=>[...e],Je=([e,t])=>e===t,Le=JSON.stringify,Ee=JSON.parse,Oe=e=>Le(e,((e,t)=>t instanceof Map?F.fromEntries([...t]):t)),je=(e,t,s)=>re(e,t,ae(e,t)==-s?void 0:s),Ne=()=>{let e,t,n=!1,l=!1,o=0,u=[];const C=ne(),F=ne(),M=ne(),$=ne(),x=ne(),A=ne(),D=ne(),B=ne(),Z=ne(),me=ne(),Le=ne(),Fe=ne(),Me=ne(),$e=ne(),xe=Se(),Ae=ne(),De=ne(),Pe=ne(),ke=ne(),ze=ye(),He=ye(),We=ye(),qe=ye(),Be=ye(),Ge=ye(),Ke=ye(),Qe=ye(),Ue=ye(),Xe=ye(),Ye=ye(),Ze=ye(),et=ye(),tt=ye(),st=ye(),nt=ye(),lt=ye(),at=ye(),ot=ye(),rt=ye(),ct=ye(),it=ye(),ut=ne(),dt=ye(),[ht,ft,bt,gt]=(e=>{let t;const[n,l]=Ce(),a=ne();return[(l,o,r,c=[],i=(()=>[]))=>{t??=e();const u=n(1);return re(a,u,[l,o,r,c,i]),we(Te(o,r??[s],Se),u),u},(e,n,...l)=>O(((e,t=[s])=>{const n=[],l=(e,s)=>s==E(t)?N(n,e):null===t[s]?te(e,(e=>l(e,s+1))):O([t[s],null],(t=>l(ae(e,t),s+1)));return l(e,0),n})(e,n),(e=>te(e,(e=>ae(a,e)[0](t,...n??[],...l))))),e=>I(ae(a,e),(([,t,n])=>(Te(t,n??[s],void 0,(t=>(se(t,e),Y(t)?1:0))),re(a,e),l(e),n))),e=>I(ae(a,e),(([e,,s=[],n,l])=>{const a=(...o)=>{const r=E(o);r==E(s)?e(t,...o,...l(o)):V(s[r])?O(n[r]?.(...o)??[],(e=>a(...o,e))):a(...o,s[r])};a()}))]})((()=>Ms)),Tt=e=>{if(!q(e,((e,t)=>[r,c].includes(t))))return!1;const t=e[r];return!(!y(t)&&t!=a||(_e(e[c])!=t&&z(e,c),0))},_t=J,pt=(t,s)=>(!e||X(Le,s)||Gt(s))&&q(t,((e,t)=>vt(s,t,e)),(()=>Gt(s))),vt=(e,t,s,n)=>q(n?s:Ct(s,e,t),((n,l)=>I(St(e,t,l,n),(e=>(s[l]=e,!0)),(()=>!1))),(()=>Gt(e,t))),St=(t,s,n,l)=>e?I(ae(ae(Le,t),n),(e=>_e(l)!=e[r]?Gt(t,s,n,l,e[c]):l),(()=>Gt(t,s,n,l))):V(_e(l))?Gt(t,s,n,l):l,wt=(e,t)=>q(t?e:Vt(e),((t,s)=>I(mt(s,t),(t=>(e[s]=t,!0)),(()=>!1))),(()=>Kt())),mt=(e,s)=>t?I(ae(Me,e),(t=>_e(s)!=t[r]?Kt(e,s,t[c]):s),(()=>Kt(e,s))):V(_e(s))?Kt(e,s):s,Ct=(e,t,s)=>(I(ae(Fe,t),(([n,l])=>{te(n,((t,s)=>{k(e,s)||(e[s]=t)})),te(l,(n=>{k(e,n)||Gt(t,s,n)}))})),e),Vt=e=>(t&&(te($e,((t,s)=>{k(e,s)||(e[s]=t)})),te(xe,(t=>{k(e,t)||Kt(t)}))),e),It=e=>ie(Le,e,((e,t,s)=>{const n=ne(),l=Se();ie(ce(Le,t,ne),s,((e,t,s)=>{re(e,t,s),I(s[c],(e=>re(n,t,e)),(()=>we(l,t)))})),re(Fe,t,[n,l])}),((e,t)=>{re(Le,t),re(Fe,t)})),yt=e=>ie(Me,e,((e,t,s)=>{re(Me,t,s),I(s[c],(e=>re($e,t,e)),(()=>we(xe,t)))}),((e,t)=>{re(Me,t),re($e,t),se(xe,t)})),Rt=e=>W(e)?ys():ws(e),Jt=e=>ie(Pe,e,((e,t,s)=>Lt(t,s)),((e,t)=>xt(t))),Lt=(e,t)=>ie(ce(Pe,e,(()=>(kt(e,1),re(Ae,e,Ce()),re(De,e,ne()),ne()))),t,((t,s,n)=>Et(e,t,s,n)),((t,s)=>At(e,t,s))),Et=(e,t,s,n,l)=>ie(ce(t,s,(()=>(zt(e,s,1),ne()))),n,((t,n,l)=>Ot(e,s,t,n,l)),((n,a)=>Dt(e,t,s,n,a,l))),Ot=(e,t,s,n,l)=>{X(s,n)||Ht(e,t,n,1);const a=ae(s,n);l!==a&&(Wt(e,t,n,a,l),re(s,n,l))},jt=(e,t,s,n,l)=>I(ae(t,s),(t=>Ot(e,s,t,n,l)),(()=>Et(e,t,s,Ct({[n]:l},e,s)))),Nt=e=>W(e)?Ls():ms(e),Ft=e=>ie(ke,e,((e,t,s)=>Mt(t,s)),((e,t)=>Pt(t))),Mt=(e,t)=>{X(ke,e)||qt(e,1);const s=ae(ke,e);t!==s&&(Bt(e,s,t),re(ke,e,t))},$t=e=>ae(Pe,e)??Lt(e,{}),xt=e=>Lt(e,{}),At=(e,t,s)=>{const[,n]=ae(Ae,e);n(s),Et(e,t,s,{},!0)},Dt=(e,t,s,n,l,a)=>{const o=ae(ae(Fe,e)?.[0],l);if(!V(o)&&!a)return Ot(e,s,n,l,o);const r=t=>{Wt(e,s,t,ae(n,t)),Ht(e,s,t,-1),re(n,t)};V(o)?r(l):oe(n,r),Y(n)&&(zt(e,s,-1),Y(re(t,s))&&(kt(e,-1),re(Pe,e),re(Ae,e),re(De,e)))},Pt=e=>{const t=ae($e,e);if(!V(t))return Mt(e,t);Bt(e,ae(ke,e)),qt(e,-1),re(ke,e)},kt=(e,t)=>je(C,e,t),zt=(e,t,s)=>je(ce($,e,ne),t,s)&&re(M,e,ce(M,e,(()=>0))+s),Ht=(e,t,s,n)=>{const l=ae(De,e),a=ae(l,s)??0;(0==a&&1==n||1==a&&-1==n)&&je(ce(F,e,ne),s,n),re(l,s,a!=-n?a+n:null),je(ce(ce(x,e,ne),t,ne),s,n)},Wt=(e,t,s,n,l)=>{ce(ce(ce(A,e,ne),t,ne),s,(()=>[n,0]))[1]=l,u[3]?.(e,t,s,l)},qt=(e,t)=>je(D,e,t),Bt=(e,t,s)=>{ce(B,e,(()=>[t,0]))[1]=s,u[4]?.(e,s)},Gt=(e,t,s,n,l)=>(N(ce(ce(ce(Z,e,ne),t,ne),s,(()=>[])),n),l),Kt=(e,t,s)=>(N(ce(me,e,(()=>[])),t),s),Qt=(e,t,s)=>I(ae(ae(ae(A,e),t),s),(([e,t])=>[!0,e,t]),(()=>[!1,...Ve(us(e,t,s))])),Ut=e=>I(ae(B,e),(([e,t])=>[!0,e,t]),(()=>[!1,...Ve(fs(e))])),Xt=e=>Y(Z)||Y(nt[e])?0:te(e?ge(Z):Z,((t,s)=>te(t,((t,n)=>te(t,((t,l)=>ft(nt[e],[s,n,l],t))))))),Yt=e=>Y(me)||Y(lt[e])?0:te(e?fe(me):me,((t,s)=>ft(lt[e],[s],t))),Zt=(e,t,s,n)=>{if(!Y(e))return ft(t,n,(()=>ue(e))),oe(e,((e,t)=>ft(s,[...n??[],e],1==t))),1},es=e=>{const t=bs();t!=n&&ft(ze[e],void 0,t);const s=Y(Xe[e]),l=Y(et[e])&&Y(tt[e])&&Y(Ue[e])&&Y(Ye[e])&&Y(Ge[e])&&Y(Ke[e])&&Y(Qe[e])&&s&&Y(We[e])&&Y(qe[e]),a=Y(st[e])&&Y(Ze[e])&&Y(Be[e])&&Y(He[e]);if(!l||!a){const t=e?[fe(C),be(F),fe(M),be($),ge(x),ge(A)]:[C,F,M,$,x,A];if(!l){Zt(t[0],We[e],qe[e]),te(t[1],((t,s)=>Zt(t,Ge[e],Ke[e],[s]))),te(t[2],((t,s)=>{0!=t&&ft(Qe[e],[s],os(s))}));const n=Se();te(t[3],((t,l)=>{Zt(t,Ue[e],Ye[e],[l])&&!s&&(ft(Xe[e],[l,null]),we(n,l))})),s||te(t[5],((t,s)=>{if(!X(n,s)){const n=Se();te(t,(e=>te(e,(([t,s],l)=>s!==t?we(n,l):se(e,l))))),te(n,(t=>ft(Xe[e],[s,t])))}})),te(t[4],((t,s)=>te(t,((t,n)=>Zt(t,et[e],tt[e],[s,n])))))}if(!a){let s;te(t[5],((t,n)=>{let l;te(t,((t,a)=>{let o;te(t,(([t,r],c)=>{r!==t&&(ft(st[e],[n,a,c],r,t,Qt),s=l=o=1)})),o&&ft(Ze[e],[n,a],Qt)})),l&&ft(Be[e],[n],Qt)})),s&&ft(He[e],void 0,Qt)}}},ts=e=>{const t=vs();t!=l&&ft(at[e],void 0,t);const s=Y(rt[e])&&Y(ct[e]),n=Y(it[e])&&Y(ot[e]);if(!s||!n){const t=e?[fe(D),fe(B)]:[D,B];if(s||Zt(t[0],rt[e],ct[e]),!n){let s;te(t[1],(([t,n],l)=>{n!==t&&(ft(it[e],[l],n,t,Ut),s=1)})),s&&ft(ot[e],void 0,Ut)}}},ss=(e,...t)=>(js((()=>e(...j(t,m)))),Ms),ns=()=>he(Pe),ls=()=>le(Pe),as=e=>le(ae(De,m(e))),os=e=>G(ae(Pe,m(e))),rs=e=>le(ae(Pe,m(e))),cs=(e,t,s,n=0,l)=>{return j(L((a=ae(Pe,m(e)),o=(e,s)=>[V(t)?s:ae(e,m(t)),s],j([...a?.entries()??[]],(([e,t])=>o(t,e))).sort((([e],[t])=>((e??0)<(t??0)?-1:1)*(s?-1:1)))),n,V(l)?l:n+l),(([,e])=>e));var a,o},is=(e,t)=>le(ae(ae(Pe,m(e)),m(t))),us=(e,t,s)=>ae(ae(ae(Pe,m(e)),m(t)),m(s)),ds=()=>ue(ke),hs=()=>le(ke),fs=e=>ae(ke,m(e)),bs=()=>!Y(Pe),gs=e=>X(Pe,m(e)),Ts=(e,t)=>X(ae(De,m(e)),m(t)),_s=(e,t)=>X(ae(Pe,m(e)),m(t)),ps=(e,t,s)=>X(ae(ae(Pe,m(e)),m(t)),m(s)),vs=()=>!Y(ke),Ss=e=>X(ke,m(e)),ws=e=>ss((()=>(e=>q(e,pt,Gt))(e)?Jt(e):0)),ms=e=>ss((()=>wt(e)?Ft(e):0)),Cs=e=>{try{Rt(Ee(e))}catch{}return Ms},Vs=t=>ss((()=>{if((e=q(t,(e=>q(e,Tt))))&&(It(t),!Y(Pe))){const e=ns();ys(),ws(e)}})),Is=e=>ss((()=>{if(t=(e=>q(e,Tt))(e)){const s=ds();Os(),Ls(),t=!0,yt(e),ms(s)}})),ys=()=>ss((()=>Jt({}))),Rs=e=>ss((e=>X(Pe,e)?xt(e):0),e),Js=(e,t)=>ss(((e,t)=>I(ae(Pe,e),(s=>X(s,t)?At(e,s,t):0))),e,t),Ls=()=>ss((()=>Ft({}))),Es=()=>ss((()=>{It({}),e=!1})),Os=()=>ss((()=>{yt({}),t=!1})),js=(e,t)=>{if(-1!=o){Ns();const s=e();return Fs(t),s}},Ns=()=>(-1!=o&&o++,1==o&&(u[0]?.(),ft(ut)),Ms),Fs=e=>(o>0&&(o--,0==o&&(o=1,Xt(1),Y(A)||es(1),Yt(1),Y(B)||ts(1),e?.(Ms)&&(te(A,((e,t)=>te(e,((e,s)=>te(e,(([e],n)=>pe(Ms,t,s,n,e))))))),ee(A),te(B,(([e],t)=>ve(Ms,t,e))),ee(B)),ft(dt[0],void 0),o=-1,Xt(0),Y(A)||es(0),Yt(0),Y(B)||ts(0),u[1]?.(),ft(dt[1],void 0),u[2]?.(),o=0,n=bs(),l=vs(),O([C,F,M,$,x,A,Z,D,B,me],ee))),Ms),Ms={getContent:()=>[ns(),ds()],getTables:ns,getTableIds:ls,getTable:e=>de(ae(Pe,m(e))),getTableCellIds:as,getRowCount:os,getRowIds:rs,getSortedRowIds:cs,getRow:(e,t)=>ue(ae(ae(Pe,m(e)),m(t))),getCellIds:is,getCell:us,getValues:ds,getValueIds:hs,getValue:fs,hasTables:bs,hasTable:gs,hasTableCell:Ts,hasRow:_s,hasCell:ps,hasValues:vs,hasValue:Ss,getTablesJson:()=>Oe(Pe),getValuesJson:()=>Oe(ke),getJson:()=>Oe([Pe,ke]),getTablesSchemaJson:()=>Oe(Le),getValuesSchemaJson:()=>Oe(Me),getSchemaJson:()=>Oe([Le,Me]),hasTablesSchema:()=>e,hasValuesSchema:()=>t,setContent:e=>ss((()=>_t(e)?(([e,t])=>{(W(e)?ys:ws)(e),(W(t)?Ls:ms)(t)})(e):0)),setTables:ws,setTable:(e,t)=>ss((e=>pt(t,e)?Lt(e,t):0),e),setRow:(e,t,s)=>ss(((e,t)=>vt(e,t,s)?Et(e,$t(e),t,s):0),e,t),addRow:(e,t,s=!0)=>js((()=>{let n;return vt(e,n,t)&&(e=m(e),Et(e,$t(e),n=((e,t)=>{const[s]=ae(Ae,e);let n;do{n=s(t)}while(X(ae(Pe,e),n));return n})(e,s?1:0),t)),n})),setPartialRow:(e,t,s)=>ss(((e,t)=>{if(vt(e,t,s,1)){const n=$t(e);H(s,((s,l)=>jt(e,n,t,l,s)))}}),e,t),setCell:(e,t,s,n)=>ss(((e,t,s)=>I(St(e,t,s,R(n)?n(us(e,t,s)):n),(n=>jt(e,$t(e),t,s,n)))),e,t,s),setValues:ms,setPartialValues:e=>ss((()=>wt(e,1)?H(e,((e,t)=>Mt(t,e))):0)),setValue:(e,t)=>ss((e=>I(mt(e,R(t)?t(fs(e)):t),(t=>Mt(e,t)))),e),applyChanges:e=>ss((()=>{H(e[0],((e,t)=>V(e)?Rs(t):H(e,((e,s)=>V(e)?Js(t,s):H(e,((e,n)=>pe(Ms,t,s,n,e))))))),H(e[1],((e,t)=>ve(Ms,t,e)))})),setTablesJson:Cs,setValuesJson:e=>{try{Nt(Ee(e))}catch{}return Ms},setJson:e=>ss((()=>{try{const[t,s]=Ee(e);Rt(t),Nt(s)}catch{Cs(e)}})),setTablesSchema:Vs,setValuesSchema:Is,setSchema:(e,t)=>ss((()=>{Vs(e),Is(t)})),delTables:ys,delTable:Rs,delRow:Js,delCell:(e,t,s,n)=>ss(((e,t,s)=>I(ae(Pe,e),(l=>I(ae(l,t),(a=>X(a,s)?Dt(e,l,t,a,s,n):0))))),e,t,s),delValues:Ls,delValue:e=>ss((e=>X(ke,e)?Pt(e):0),e),delTablesSchema:Es,delValuesSchema:Os,delSchema:()=>ss((()=>{Es(),Os()})),transaction:js,startTransaction:Ns,getTransactionChanges:()=>[ue(A,((e,t)=>-1===ae(C,t)?void 0:ue(e,((e,s)=>-1===ae(ae($,t),s)?void 0:ue(e,(([,e])=>e),(e=>Je(e)))),Y,W)),Y,W),ue(B,(([,e])=>e),(e=>Je(e))),1],getTransactionLog:()=>[!Y(A),!Y(B),he(A,Re,Je),he(Z),ue(B,Re,Je),ue(me),ue(C),de($),he(x),ue(D)],finishTransaction:Fs,forEachTable:e=>te(Pe,((t,s)=>e(s,(e=>te(t,((t,s)=>e(s,(e=>oe(t,e))))))))),forEachTableCell:(e,t)=>oe(ae(De,m(e)),t),forEachRow:(e,t)=>te(ae(Pe,m(e)),((e,s)=>t(s,(t=>oe(e,t))))),forEachCell:(e,t,s)=>oe(ae(ae(Pe,m(e)),m(t)),s),forEachValue:e=>oe(ke,e),addSortedRowIdsListener:(e,t,s,n,l,a,o)=>{let r=cs(e,t,s,n,l);return ht((()=>{const o=cs(e,t,s,n,l);var c,i;i=r,E(c=o)===E(i)&&c.every(((e,t)=>i[t]===e))||(r=o,a(Ms,e,t,s,n,l,r))}),Xe[o?1:0],[e,t],[ls])},addStartTransactionListener:e=>ht(e,ut),addWillFinishTransactionListener:e=>ht(e,dt[0]),addDidFinishTransactionListener:e=>ht(e,dt[1]),callListener:e=>(gt(e),Ms),delListener:e=>(bt(e),Ms),getListenerStats:()=>({hasTables:Ie(ze),tables:Ie(He),tableIds:Ie(We),hasTable:Ie(qe),table:Ie(Be),tableCellIds:Ie(Ge),hasTableCell:Ie(Ke,Q),rowCount:Ie(Qe),rowIds:Ie(Ue),sortedRowIds:Ie(Xe),hasRow:Ie(Ye,Q),row:Ie(Ze,Q),cellIds:Ie(et,Q),hasCell:Ie(tt,U),cell:Ie(st,U),invalidCell:Ie(nt,U),hasValues:Ie(at),values:Ie(ot),valueIds:Ie(rt),hasValue:Ie(ct),value:Ie(it),invalidValue:Ie(lt),transaction:K(ut)+Ie(dt)}),isMergeable:()=>!1,createStore:Ne,addListener:ht,callListeners:ft,setInternalListeners:(e,t,s,n,l)=>u=[e,t,s,n,l]};return H({[i+h]:[0,ze,[],()=>[bs()]],[h]:[0,He],[f]:[0,We],[i+d]:[1,qe,[ls],e=>[gs(...e)]],[d]:[1,Be,[ls]],[d+p]:[1,Ge,[ls]],[i+d+_]:[2,Ke,[ls,as],e=>[Ts(...e)]],[g]:[1,Qe,[ls]],[T]:[1,Ue,[ls]],[i+b]:[2,Ye,[ls,rs],e=>[_s(...e)]],[b]:[2,Ze,[ls,rs]],[p]:[2,et,[ls,rs]],[i+_]:[3,tt,[ls,rs,is],e=>[ps(...e)]],[_]:[3,st,[ls,rs,is],e=>Ve(us(...e))],InvalidCell:[3,nt],[i+S]:[0,at,[],()=>[vs()]],[S]:[0,ot],[w]:[0,rt],[i+v]:[1,ct,[hs],e=>[Ss(...e)]],[v]:[1,it,[hs],e=>Ve(fs(e[0]))],InvalidValue:[1,lt]},(([e,t,s,n],l)=>{Ms["add"+l+"Listener"]=(...l)=>ht(l[e],t[l[e+1]?1:0],e>0?L(l,0,e):void 0,s,n)})),P(Ms)},Fe=Ne();Fe.delTables(),Fe.delValues(),console.log("[STORE] Data store initialized.");const Me=(e,t)=>{try{return JSON.parse(e)}catch(e){return t||null}},$e=e=>{const t={};for(let s in e)"string"==typeof e[s]||"number"==typeof e[s]||"boolean"==typeof e[s]?t[s]=e[s]:null===e[s]?t[`__null__${s}`]="":Array.isArray(e[s])?t[`__array__${s}`]=JSON.stringify(e[s]):"object"==typeof e[s]&&(t[`__object__${s}`]=JSON.stringify(e[s]));return t},xe=e=>{const t={};for(let s in e)s.startsWith("__null__")?t[s.replace("__null__","")]=null:"string"==typeof e[s]&&s.startsWith("__array__")?t[s.replace("__array__","")]=Me(e[s]):"string"==typeof e[s]&&s.startsWith("__object__")?t[s.replace("__object__","")]=Me(e[s]):t[s]=e[s];return t},Ae={store:Fe,subscribe(e,t,s,n,l){Fe.hasRow(e,t)&&l(xe(Fe.getRow(e,t)));const a=Fe.addRowListener(e,t,(()=>{const s=Fe.getRow(e,t);l(xe(s))}));return Fe.hasRow(e,t)&&!n||(console.log("[STORE] Loading/reloading",{tableId:e,rowId:t}),s().then((s=>{Fe.setRow(e,t,$e(s))})).catch((s=>{console.error("[STORE] Error getting row",{tableId:e,rowId:t,forceReload:n},s)}))),a},unsubscribe(e){Fe.delListener(e)},async getTemplate(t,s,n=!1){if(!n){if(!Fe.hasRow("templates",s))return null;const e=Fe.getRow("templates",s);return xe(e)}const l=await e(t,s);return console.log("[STORE] Reloading template",l),Fe.setRow("templates",s,$e(l)),l},updateTemplate:(e,t)=>(Fe.setRow("templates",e,$e(t)),t),async getEnvelope(t,s,n=!1){if(!n){if(!Fe.hasRow("envelopes",s))return null;const e=Fe.getRow("envelopes",s);return xe(e)}const l=await e(t,s);return Fe.setRow("envelopes",s,$e(l)),l},updateEnvelope:(e,t)=>(Fe.setRow("envelopes",e,$e(t)),t),getField(e,t,s){if("template"===e){const e=Fe.getRow("templates",t),n=xe(e),l=(n.fields||[]).find((e=>e.name===s)),a=(n.roles||[]).map((e=>e.name)).findIndex((e=>e===l.role_name));return{index:Math.max(a,0),field:l}}{const e=Fe.getRow("envelopes",t),n=xe(e),l=(n.fields||[]).find((e=>e.name===s));return{index:(n.recipients||[]).map((e=>e.role_name)).findIndex((e=>e===l.role_name)),field:l}}}};export{Ae as S}