@verdocs/web-sdk 2.2.25 → 2.2.26

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 (361) hide show
  1. package/dist/cjs/{EnvelopeStore-74bc60d0.js → EnvelopeStore-ac58a485.js} +2 -2
  2. package/dist/cjs/{Envelopes-49db8324.js → Envelopes-a06cab96.js} +11 -0
  3. package/dist/cjs/{TemplateStore-a5fa2b0c.js → TemplateStore-9026139c.js} +3 -4
  4. package/dist/cjs/{VerdocsEndpoint-45deeb6a.js → VerdocsEndpoint-a15d322b.js} +203 -35
  5. package/dist/cjs/{index-5463795e.js → index-39554143.js} +3 -0
  6. package/dist/cjs/{index-f712049c.js → index-7d1c0557.js} +1 -1
  7. package/dist/cjs/ipc-test.cjs.entry.js +4 -5
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{utils-010a1697.js → utils-c5675274.js} +1 -1
  10. package/dist/cjs/verdocs-activity-box.cjs.entry.js +3 -3
  11. package/dist/cjs/verdocs-auth.cjs.entry.js +2 -2
  12. package/dist/cjs/verdocs-build.cjs.entry.js +4 -5
  13. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +4 -5
  14. package/dist/cjs/verdocs-button_3.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-checkbox_3.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +4 -4
  17. package/dist/cjs/verdocs-dialog_2.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +4 -4
  20. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +5 -5
  21. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +5 -5
  22. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +4 -4
  23. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +3 -3
  24. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -3
  25. package/dist/cjs/verdocs-field-date.cjs.entry.js +3 -3
  26. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -3
  27. package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -3
  28. package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
  29. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -3
  30. package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -3
  31. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +4 -4
  32. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +4 -4
  33. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +3 -3
  34. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +2 -2
  35. package/dist/cjs/verdocs-floating-menu.cjs.entry.js +2 -2
  36. package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
  37. package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +1 -1
  38. package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
  39. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
  40. package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
  41. package/dist/cjs/verdocs-pagination_3.cjs.entry.js +3 -3
  42. package/dist/cjs/verdocs-preview_8.cjs.entry.js +9 -10
  43. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +3 -4
  44. package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
  45. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  46. package/dist/cjs/verdocs-search.cjs.entry.js +2 -2
  47. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +4 -4
  48. package/dist/cjs/verdocs-settings.cjs.entry.js +2 -2
  49. package/dist/cjs/verdocs-sign.cjs.entry.js +4 -4
  50. package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +1 -1
  51. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
  52. package/dist/cjs/verdocs-tabs.cjs.entry.js +1 -1
  53. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  54. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +4 -4
  55. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +7 -8
  56. package/dist/cjs/verdocs-template-star.cjs.entry.js +2 -2
  57. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  58. package/dist/cjs/verdocs-templates-list.cjs.entry.js +4 -5
  59. package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
  60. package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +1 -1
  61. package/dist/cjs/verdocs-view.cjs.entry.js +6 -4
  62. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  63. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +3 -1
  64. package/dist/components/EnvelopeStore.js +1 -1
  65. package/dist/components/Envelopes.js +11 -1
  66. package/dist/components/TemplateStore.js +1 -2
  67. package/dist/components/VerdocsEndpoint.js +198 -36
  68. package/dist/components/utils.js +1 -1
  69. package/dist/components/verdocs-search-activity2.js +1 -2
  70. package/dist/components/verdocs-template-create2.js +1 -2
  71. package/dist/components/verdocs-template-name2.js +1 -2
  72. package/dist/components/verdocs-template-sender2.js +1 -2
  73. package/dist/components/verdocs-template-visibility2.js +1 -2
  74. package/dist/components/verdocs-templates-list.js +1 -2
  75. package/dist/components/verdocs-view2.js +3 -1
  76. package/dist/custom-elements.json +2059 -0
  77. package/dist/docs.json +1 -1
  78. package/dist/esm/{EnvelopeStore-3ede5a1d.js → EnvelopeStore-6476418d.js} +2 -2
  79. package/dist/esm/{Envelopes-9dcb88d1.js → Envelopes-2d89a065.js} +11 -1
  80. package/dist/esm/{TemplateStore-e8cf5a15.js → TemplateStore-4918792b.js} +2 -3
  81. package/dist/esm/{VerdocsEndpoint-d58d5544.js → VerdocsEndpoint-750b24e4.js} +198 -36
  82. package/dist/esm/{index-4439b0d1.js → index-1ce2872b.js} +1 -1
  83. package/dist/esm/{index-172625c5.js → index-d5ba09f3.js} +3 -1
  84. package/dist/esm/ipc-test.entry.js +4 -5
  85. package/dist/esm/loader.js +1 -1
  86. package/dist/esm/{utils-1a753ca5.js → utils-a0bb69d7.js} +1 -1
  87. package/dist/esm/verdocs-activity-box.entry.js +3 -3
  88. package/dist/esm/verdocs-auth.entry.js +2 -2
  89. package/dist/esm/verdocs-build.entry.js +4 -5
  90. package/dist/esm/verdocs-button-panel_2.entry.js +4 -5
  91. package/dist/esm/verdocs-button_3.entry.js +1 -1
  92. package/dist/esm/verdocs-checkbox_3.entry.js +1 -1
  93. package/dist/esm/verdocs-contact-picker_2.entry.js +4 -4
  94. package/dist/esm/verdocs-dialog_2.entry.js +1 -1
  95. package/dist/esm/verdocs-dropdown.entry.js +1 -1
  96. package/dist/esm/verdocs-envelope-document-page.entry.js +4 -4
  97. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +5 -5
  98. package/dist/esm/verdocs-envelope-sidebar.entry.js +5 -5
  99. package/dist/esm/verdocs-envelopes-list.entry.js +4 -4
  100. package/dist/esm/verdocs-field-attachment.entry.js +3 -3
  101. package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
  102. package/dist/esm/verdocs-field-date.entry.js +3 -3
  103. package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
  104. package/dist/esm/verdocs-field-initial.entry.js +3 -3
  105. package/dist/esm/verdocs-field-payment.entry.js +3 -3
  106. package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
  107. package/dist/esm/verdocs-field-signature.entry.js +3 -3
  108. package/dist/esm/verdocs-field-textarea.entry.js +4 -4
  109. package/dist/esm/verdocs-field-textbox.entry.js +4 -4
  110. package/dist/esm/verdocs-field-timestamp.entry.js +3 -3
  111. package/dist/esm/verdocs-file-chooser_2.entry.js +2 -2
  112. package/dist/esm/verdocs-floating-menu.entry.js +2 -2
  113. package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
  114. package/dist/esm/verdocs-kba-dialog.entry.js +1 -1
  115. package/dist/esm/verdocs-loader.entry.js +1 -1
  116. package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
  117. package/dist/esm/verdocs-organization-card.entry.js +1 -1
  118. package/dist/esm/verdocs-pagination_3.entry.js +3 -3
  119. package/dist/esm/verdocs-preview_8.entry.js +6 -7
  120. package/dist/esm/verdocs-quick-functions_3.entry.js +2 -3
  121. package/dist/esm/verdocs-radio-button.entry.js +1 -1
  122. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  123. package/dist/esm/verdocs-search.entry.js +2 -2
  124. package/dist/esm/verdocs-settings-api-keys_4.entry.js +4 -4
  125. package/dist/esm/verdocs-settings.entry.js +2 -2
  126. package/dist/esm/verdocs-sign.entry.js +4 -4
  127. package/dist/esm/verdocs-signature-dialog.entry.js +1 -1
  128. package/dist/esm/verdocs-status-indicator.entry.js +1 -1
  129. package/dist/esm/verdocs-tabs.entry.js +1 -1
  130. package/dist/esm/verdocs-template-card.entry.js +1 -1
  131. package/dist/esm/verdocs-template-document-page_2.entry.js +4 -4
  132. package/dist/esm/verdocs-template-fields_4.entry.js +6 -7
  133. package/dist/esm/verdocs-template-star.entry.js +2 -2
  134. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  135. package/dist/esm/verdocs-templates-list.entry.js +2 -3
  136. package/dist/esm/verdocs-toggle.entry.js +1 -1
  137. package/dist/esm/verdocs-upload-dialog.entry.js +1 -1
  138. package/dist/esm/verdocs-view.entry.js +6 -4
  139. package/dist/esm/verdocs-web-sdk.js +1 -1
  140. package/dist/esm-es5/{EnvelopeStore-3ede5a1d.js → EnvelopeStore-6476418d.js} +1 -1
  141. package/dist/esm-es5/Envelopes-2d89a065.js +1 -0
  142. package/dist/esm-es5/TemplateStore-4918792b.js +1 -0
  143. package/dist/esm-es5/VerdocsEndpoint-750b24e4.js +1 -0
  144. package/dist/esm-es5/{index-4439b0d1.js → index-1ce2872b.js} +1 -1
  145. package/dist/esm-es5/index-d5ba09f3.js +2 -0
  146. package/dist/esm-es5/ipc-test.entry.js +1 -1
  147. package/dist/esm-es5/loader.js +1 -1
  148. package/dist/esm-es5/{utils-1a753ca5.js → utils-a0bb69d7.js} +1 -1
  149. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  150. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  151. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  152. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  153. package/dist/esm-es5/verdocs-button_3.entry.js +1 -1
  154. package/dist/esm-es5/verdocs-checkbox_3.entry.js +1 -1
  155. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  156. package/dist/esm-es5/verdocs-dialog_2.entry.js +1 -1
  157. package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
  158. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  159. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  160. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  161. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  162. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
  163. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  164. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  165. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  166. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  167. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  168. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  169. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  170. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  171. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  172. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  173. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  174. package/dist/esm-es5/verdocs-floating-menu.entry.js +1 -1
  175. package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
  176. package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
  177. package/dist/esm-es5/verdocs-loader.entry.js +1 -1
  178. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  179. package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
  180. package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
  181. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  182. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  183. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -1
  184. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  185. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  186. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  187. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  188. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  189. package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
  190. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  191. package/dist/esm-es5/verdocs-tabs.entry.js +1 -1
  192. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  193. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  194. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  195. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  196. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  197. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  198. package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
  199. package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
  200. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  201. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  202. package/dist/verdocs-web-sdk/{p-402c3762.js → p-044d38be.js} +1 -1
  203. package/dist/verdocs-web-sdk/p-047b4bd1.js +1 -0
  204. package/dist/verdocs-web-sdk/{p-af3a01d5.system.entry.js → p-0733c3e1.system.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/{p-99694a88.entry.js → p-09b05f65.entry.js} +1 -1
  206. package/dist/verdocs-web-sdk/{p-43231ac2.system.entry.js → p-0d6462e0.system.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/p-0de7f044.js +1 -0
  208. package/dist/verdocs-web-sdk/{p-38aa6656.entry.js → p-10f9133d.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/p-1184e653.entry.js +1 -0
  210. package/dist/verdocs-web-sdk/{p-7c7c56da.system.entry.js → p-16242585.system.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/p-1921f008.system.entry.js +1 -0
  212. package/dist/verdocs-web-sdk/p-19c3bb25.system.entry.js +1 -0
  213. package/dist/verdocs-web-sdk/{p-d9318890.entry.js → p-1b1f4fd2.entry.js} +1 -1
  214. package/dist/verdocs-web-sdk/{p-ba87f33c.system.entry.js → p-1fbd8615.system.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/{p-9569539d.system.entry.js → p-216bbc4c.system.entry.js} +1 -1
  216. package/dist/verdocs-web-sdk/p-2174e539.js +1 -0
  217. package/dist/verdocs-web-sdk/p-218a42f0.entry.js +1 -0
  218. package/dist/verdocs-web-sdk/p-22a86241.js +1 -0
  219. package/dist/verdocs-web-sdk/p-240d814a.system.js +1 -0
  220. package/dist/verdocs-web-sdk/{p-64d4ada6.system.entry.js → p-247325a5.system.entry.js} +1 -1
  221. package/dist/verdocs-web-sdk/p-24f0c391.system.js +1 -0
  222. package/dist/verdocs-web-sdk/{p-a5e3c8ee.entry.js → p-2568de0e.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-ae971bb4.system.entry.js → p-2b8644a1.system.entry.js} +1 -1
  224. package/dist/verdocs-web-sdk/p-2cc908f8.system.entry.js +1 -0
  225. package/dist/verdocs-web-sdk/{p-7d5e91f5.entry.js → p-2d631b6f.entry.js} +1 -1
  226. package/dist/verdocs-web-sdk/{p-013d1556.system.entry.js → p-2d71c20a.system.entry.js} +1 -1
  227. package/dist/verdocs-web-sdk/{p-77ecee31.entry.js → p-2f3eacbb.entry.js} +1 -1
  228. package/dist/verdocs-web-sdk/p-330f7d43.entry.js +1 -0
  229. package/dist/verdocs-web-sdk/{p-20986706.entry.js → p-36458469.entry.js} +1 -1
  230. package/dist/verdocs-web-sdk/{p-143fc189.entry.js → p-390b7f97.entry.js} +1 -1
  231. package/dist/verdocs-web-sdk/{p-e092b25d.entry.js → p-39145cce.entry.js} +1 -1
  232. package/dist/verdocs-web-sdk/p-39e8600d.system.js +1 -0
  233. package/dist/verdocs-web-sdk/{p-7bab7252.entry.js → p-40db9709.entry.js} +1 -1
  234. package/dist/verdocs-web-sdk/{p-e2fe0aa5.system.entry.js → p-4157d80b.system.entry.js} +1 -1
  235. package/dist/verdocs-web-sdk/{p-24de06b4.system.entry.js → p-44209a2a.system.entry.js} +1 -1
  236. package/dist/verdocs-web-sdk/{p-ab889005.system.entry.js → p-4720767e.system.entry.js} +1 -1
  237. package/dist/verdocs-web-sdk/p-52f4ddf3.entry.js +1 -0
  238. package/dist/verdocs-web-sdk/{p-64411279.entry.js → p-56270b66.entry.js} +1 -1
  239. package/dist/verdocs-web-sdk/{p-eae47487.entry.js → p-584928fe.entry.js} +1 -1
  240. package/dist/verdocs-web-sdk/{p-a5f450a1.system.entry.js → p-58a4d8ad.system.entry.js} +1 -1
  241. package/dist/verdocs-web-sdk/{p-0edfbbb9.entry.js → p-5a0d4098.entry.js} +1 -1
  242. package/dist/verdocs-web-sdk/{p-2a0ed0ab.entry.js → p-5b789032.entry.js} +1 -1
  243. package/dist/verdocs-web-sdk/{p-a6048cc9.system.entry.js → p-5d16cfed.system.entry.js} +1 -1
  244. package/dist/verdocs-web-sdk/{p-f04bf956.system.js → p-5e203333.system.js} +1 -1
  245. package/dist/verdocs-web-sdk/{p-9bbf0bc5.system.entry.js → p-5f0afd02.system.entry.js} +1 -1
  246. package/dist/verdocs-web-sdk/{p-0b2102df.entry.js → p-636c6fdd.entry.js} +1 -1
  247. package/dist/verdocs-web-sdk/{p-bbbbddab.entry.js → p-665fd61c.entry.js} +1 -1
  248. package/dist/verdocs-web-sdk/{p-71eefe0e.entry.js → p-672fad08.entry.js} +1 -1
  249. package/dist/verdocs-web-sdk/{p-a28c7836.entry.js → p-6c75ea76.entry.js} +1 -1
  250. package/dist/verdocs-web-sdk/p-6d4d4760.system.entry.js +1 -0
  251. package/dist/verdocs-web-sdk/{p-4f8a7884.system.entry.js → p-6f70e215.system.entry.js} +1 -1
  252. package/dist/verdocs-web-sdk/{p-cb9f22d7.entry.js → p-734c32bc.entry.js} +1 -1
  253. package/dist/verdocs-web-sdk/{p-45bee3f6.system.entry.js → p-740d5a16.system.entry.js} +1 -1
  254. package/dist/verdocs-web-sdk/{p-7efaf5de.system.entry.js → p-741b2436.system.entry.js} +1 -1
  255. package/dist/verdocs-web-sdk/{p-b68d2dba.entry.js → p-741c0a94.entry.js} +1 -1
  256. package/dist/verdocs-web-sdk/{p-6896477a.system.entry.js → p-789c8c91.system.entry.js} +1 -1
  257. package/dist/verdocs-web-sdk/{p-5079bd15.system.entry.js → p-7b0874c1.system.entry.js} +1 -1
  258. package/dist/verdocs-web-sdk/{p-521a3fec.entry.js → p-7e5ee08a.entry.js} +1 -1
  259. package/dist/verdocs-web-sdk/{p-6ff8759f.entry.js → p-7fbcd534.entry.js} +1 -1
  260. package/dist/verdocs-web-sdk/{p-66d45c89.system.js → p-802bd493.system.js} +1 -1
  261. package/dist/verdocs-web-sdk/p-821c78c4.system.js +1 -0
  262. package/dist/verdocs-web-sdk/{p-5c01f483.system.entry.js → p-83c052a3.system.entry.js} +1 -1
  263. package/dist/verdocs-web-sdk/{p-2f3263a3.system.entry.js → p-853489f8.system.entry.js} +1 -1
  264. package/dist/verdocs-web-sdk/{p-7648c449.js → p-85d0e79d.js} +1 -1
  265. package/dist/verdocs-web-sdk/{p-14b44491.js → p-876d3ff3.js} +2 -2
  266. package/dist/verdocs-web-sdk/{p-ab917e6a.entry.js → p-88000f71.entry.js} +1 -1
  267. package/dist/verdocs-web-sdk/{p-4583338b.system.entry.js → p-897ccc19.system.entry.js} +1 -1
  268. package/dist/verdocs-web-sdk/{p-506754d5.system.entry.js → p-8b4633ae.system.entry.js} +1 -1
  269. package/dist/verdocs-web-sdk/{p-c230e3d1.entry.js → p-8c92254d.entry.js} +1 -1
  270. package/dist/verdocs-web-sdk/{p-1d0342e6.system.entry.js → p-8df64e0a.system.entry.js} +1 -1
  271. package/dist/verdocs-web-sdk/{p-49042f24.system.entry.js → p-8f7aca9f.system.entry.js} +1 -1
  272. package/dist/verdocs-web-sdk/p-930f2b08.entry.js +1 -0
  273. package/dist/verdocs-web-sdk/{p-c82b9978.entry.js → p-94ea5e96.entry.js} +1 -1
  274. package/dist/verdocs-web-sdk/{p-3c798272.entry.js → p-96f0ba19.entry.js} +1 -1
  275. package/dist/verdocs-web-sdk/{p-3ce7e733.system.entry.js → p-96f3cfd3.system.entry.js} +1 -1
  276. package/dist/verdocs-web-sdk/{p-272933c6.system.entry.js → p-972004c2.system.entry.js} +1 -1
  277. package/dist/verdocs-web-sdk/{p-d4857f9e.system.entry.js → p-9a5904a9.system.entry.js} +1 -1
  278. package/dist/verdocs-web-sdk/{p-f0f27520.entry.js → p-9cb5d470.entry.js} +1 -1
  279. package/dist/verdocs-web-sdk/{p-79b0c643.entry.js → p-9dec146d.entry.js} +1 -1
  280. package/dist/verdocs-web-sdk/p-9f4f2ad3.system.entry.js +1 -0
  281. package/dist/verdocs-web-sdk/{p-36ed1c79.entry.js → p-a051e533.entry.js} +1 -1
  282. package/dist/verdocs-web-sdk/p-a13a4ae6.system.entry.js +1 -0
  283. package/dist/verdocs-web-sdk/{p-e27ec758.entry.js → p-a57c46bd.entry.js} +1 -1
  284. package/dist/verdocs-web-sdk/{p-f9e89b56.system.entry.js → p-aa51dac9.system.entry.js} +1 -1
  285. package/dist/verdocs-web-sdk/{p-4f914da5.system.entry.js → p-aa8d725f.system.entry.js} +1 -1
  286. package/dist/verdocs-web-sdk/{p-248bbf52.entry.js → p-aab15290.entry.js} +1 -1
  287. package/dist/verdocs-web-sdk/{p-450a3908.entry.js → p-abf16c2b.entry.js} +1 -1
  288. package/dist/verdocs-web-sdk/{p-2b8493be.entry.js → p-aded66bf.entry.js} +1 -1
  289. package/dist/verdocs-web-sdk/{p-04580be0.entry.js → p-b136d75e.entry.js} +1 -1
  290. package/dist/verdocs-web-sdk/{p-48f74a4f.system.entry.js → p-b1ba251d.system.entry.js} +1 -1
  291. package/dist/verdocs-web-sdk/{p-27a3d731.entry.js → p-b2631a37.entry.js} +1 -1
  292. package/dist/verdocs-web-sdk/{p-5cb5d39c.system.entry.js → p-b3d43687.system.entry.js} +1 -1
  293. package/dist/verdocs-web-sdk/{p-c41a65a9.entry.js → p-b58505d4.entry.js} +1 -1
  294. package/dist/verdocs-web-sdk/{p-b2c72f5a.entry.js → p-b7789921.entry.js} +1 -1
  295. package/dist/verdocs-web-sdk/{p-6e62913f.entry.js → p-b7c4f1d8.entry.js} +1 -1
  296. package/dist/verdocs-web-sdk/{p-38891eeb.system.entry.js → p-ba610846.system.entry.js} +1 -1
  297. package/dist/verdocs-web-sdk/{p-e16816bf.entry.js → p-ba9e472b.entry.js} +1 -1
  298. package/dist/verdocs-web-sdk/{p-9ea2f211.system.entry.js → p-baf0f5b0.system.entry.js} +1 -1
  299. package/dist/verdocs-web-sdk/{p-37e647a4.system.entry.js → p-bf90e11b.system.entry.js} +1 -1
  300. package/dist/verdocs-web-sdk/{p-c3ff8afd.system.js → p-c027e0e1.system.js} +1 -1
  301. package/dist/verdocs-web-sdk/p-c2690e79.entry.js +1 -0
  302. package/dist/verdocs-web-sdk/{p-ceceebec.entry.js → p-c2a628e8.entry.js} +1 -1
  303. package/dist/verdocs-web-sdk/p-c2ae8a0b.system.entry.js +1 -0
  304. package/dist/verdocs-web-sdk/{p-7cb3209d.system.entry.js → p-c73ba4ca.system.entry.js} +1 -1
  305. package/dist/verdocs-web-sdk/{p-70685224.entry.js → p-c7b34331.entry.js} +1 -1
  306. package/dist/verdocs-web-sdk/p-c808a3de.entry.js +1 -0
  307. package/dist/verdocs-web-sdk/p-cb8b910c.system.entry.js +1 -0
  308. package/dist/verdocs-web-sdk/{p-fbb8023f.system.js → p-cd61fea7.system.js} +2 -2
  309. package/dist/verdocs-web-sdk/{p-6ba66b2c.system.entry.js → p-ce7c4eb0.system.entry.js} +1 -1
  310. package/dist/verdocs-web-sdk/{p-2284d430.system.entry.js → p-cfe6b8c9.system.entry.js} +1 -1
  311. package/dist/verdocs-web-sdk/{p-9009e136.entry.js → p-d3c4d7da.entry.js} +1 -1
  312. package/dist/verdocs-web-sdk/p-d5941fd4.entry.js +1 -0
  313. package/dist/verdocs-web-sdk/{p-3bf6619b.entry.js → p-dac44c07.entry.js} +1 -1
  314. package/dist/verdocs-web-sdk/{p-7516bd57.system.entry.js → p-dffa796e.system.entry.js} +1 -1
  315. package/dist/verdocs-web-sdk/{p-aad7ef50.system.entry.js → p-e2b6a8ae.system.entry.js} +1 -1
  316. package/dist/verdocs-web-sdk/{p-f5829c68.system.entry.js → p-e3bd1b4c.system.entry.js} +1 -1
  317. package/dist/verdocs-web-sdk/p-e8cf4ad9.system.entry.js +1 -0
  318. package/dist/verdocs-web-sdk/{p-84b2c661.entry.js → p-f61573a3.entry.js} +1 -1
  319. package/dist/verdocs-web-sdk/{p-45343cef.system.entry.js → p-f9f2b4c6.system.entry.js} +1 -1
  320. package/dist/verdocs-web-sdk/{p-ecfa94fb.system.entry.js → p-fb35b11f.system.entry.js} +1 -1
  321. package/dist/verdocs-web-sdk/{p-41cd34db.system.entry.js → p-fb65a186.system.entry.js} +1 -1
  322. package/dist/verdocs-web-sdk/p-fd174087.entry.js +1 -0
  323. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  324. package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
  325. package/package.json +2 -2
  326. package/dist/cjs/Templates-f6e75719.js +0 -134
  327. package/dist/components/Templates.js +0 -127
  328. package/dist/esm/Templates-f90883f7.js +0 -127
  329. package/dist/esm-es5/Envelopes-9dcb88d1.js +0 -1
  330. package/dist/esm-es5/TemplateStore-e8cf5a15.js +0 -1
  331. package/dist/esm-es5/Templates-f90883f7.js +0 -1
  332. package/dist/esm-es5/VerdocsEndpoint-d58d5544.js +0 -1
  333. package/dist/esm-es5/index-172625c5.js +0 -2
  334. package/dist/verdocs-web-sdk/p-07f1748c.entry.js +0 -1
  335. package/dist/verdocs-web-sdk/p-15df3998.system.entry.js +0 -1
  336. package/dist/verdocs-web-sdk/p-1753f57b.system.js +0 -1
  337. package/dist/verdocs-web-sdk/p-1dda2d09.entry.js +0 -1
  338. package/dist/verdocs-web-sdk/p-2fdb7348.system.js +0 -1
  339. package/dist/verdocs-web-sdk/p-3af6b910.system.js +0 -1
  340. package/dist/verdocs-web-sdk/p-4017b53a.system.entry.js +0 -1
  341. package/dist/verdocs-web-sdk/p-41388344.system.entry.js +0 -1
  342. package/dist/verdocs-web-sdk/p-4422958b.system.js +0 -1
  343. package/dist/verdocs-web-sdk/p-4a500a3f.system.entry.js +0 -1
  344. package/dist/verdocs-web-sdk/p-51979353.entry.js +0 -1
  345. package/dist/verdocs-web-sdk/p-5ab837bf.entry.js +0 -1
  346. package/dist/verdocs-web-sdk/p-65c99d51.system.entry.js +0 -1
  347. package/dist/verdocs-web-sdk/p-79f99e83.system.entry.js +0 -1
  348. package/dist/verdocs-web-sdk/p-7b6c0cc5.entry.js +0 -1
  349. package/dist/verdocs-web-sdk/p-976ec9e8.js +0 -1
  350. package/dist/verdocs-web-sdk/p-9caf7709.system.entry.js +0 -1
  351. package/dist/verdocs-web-sdk/p-a881fe6b.js +0 -1
  352. package/dist/verdocs-web-sdk/p-a894761f.system.entry.js +0 -1
  353. package/dist/verdocs-web-sdk/p-af048fad.js +0 -1
  354. package/dist/verdocs-web-sdk/p-ba04698a.entry.js +0 -1
  355. package/dist/verdocs-web-sdk/p-be3e42bf.entry.js +0 -1
  356. package/dist/verdocs-web-sdk/p-ccb2c794.js +0 -1
  357. package/dist/verdocs-web-sdk/p-cd64b223.system.entry.js +0 -1
  358. package/dist/verdocs-web-sdk/p-d4d8858f.js +0 -1
  359. package/dist/verdocs-web-sdk/p-daebb9e6.system.js +0 -1
  360. package/dist/verdocs-web-sdk/p-f2deae25.entry.js +0 -1
  361. package/dist/verdocs-web-sdk/p-f520ee27.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as s}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as o}from"./p-af048fad.js";import{r as l,b as a}from"./p-402c3762.js";import{g as n,a as r}from"./p-d4d8858f.js";import{S as d}from"./p-7a1b2643.js";import{j as c}from"./p-ccb2c794.js";import{a as p,i as h}from"./p-e8ce0b6f.js";import{g as v}from"./p-6de76553.js";import{c as m,d as u}from"./p-567a6e7c.js";import{D as x,P as f,J as b,a as g,F as y,b as w,T as k}from"./p-637fee9b.js";import{c as S,u as E}from"./p-976ec9e8.js";import{V as z}from"./p-ed416acf.js";import"./p-eab67c09.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-c220af42.js";import"./p-7648c449.js";const C=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=o.getDefault(),this.templateId=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[PREVIEW] Unable to start builder session, must be authenticated");this.store=await n(this.endpoint,this.templateId,!0),console.log(`[PREVIEW] Loading template ${this.templateId}`,this.endpoint.session)}catch(s){console.log("[PREVIEW] Error with preview session",s),null===(e=this.sdkError)||void 0===e||e.emit(new d(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handlePageRendered(e){var t,i;const s=e.detail;(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.fields.filter((e=>e.page_sequence===s.pageNumber))).forEach((e=>l(e,s,a(r(this.store),e.role_name),{disabled:!0,editable:!1,draggable:!1})))}render(){var e,t,o,l;if(!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded))return i(s,null,i("verdocs-loader",null));const a=[...null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.pages];return a.sort(((e,t)=>e.sequence-t.sequence)),i(s,null,a.map((e=>i("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}};C.style='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';const T='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><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.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>',I=class{constructor(i){e(this,i),this.send=t(this,"send",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.searchContacts=t(this,"searchContacts",7),this.levels=[],this.store=null,this.endpoint=o.getDefault(),this.templateId=null,this.environment="web",this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`,this.rolesAtLevel={},this.showPickerForId="",this.sessionContacts=[],this.sending=!1,this.rolesCompleted={}}async reset(){this.rolesCompleted={}}async componentWillLoad(){var e,t,i,s,o,l,a,r,c,p;try{const r=this.endpoint.loadSession();if(!this.templateId)return void console.log(`[SEND] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[SEND] Unable to start builder session, must be authenticated");if(this.store=await n(this.endpoint,this.templateId,!0),(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_sendable)||console.warn("[SEND] Template is not sendable",this.templateId),null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.roles){const e={};this.rolesCompleted={},null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l||l.roles.forEach((t=>{const i=t.sequence-1;e[i]||(e[i]=[]);const s=`r-${i}-${e[i].length}`;e[i].push({...t,id:s})})),this.rolesAtLevel=e,this.levels=Object.keys(e).map((e=>+e)),this.levels.sort(((e,t)=>e-t))}(null===(a=null==r?void 0:r.session)||void 0===a?void 0:a.profile)&&this.sessionContacts.push({id:r.session.profile.id,name:`${r.session.profile.first_name} ${r.session.profile.last_name}`,email:r.session.profile.email,phone:r.session.profile.phone})}catch(e){console.log("[SEND] Error with preview session",e),null===(r=this.sdkError)||void 0===r||r.emit(new d(e.message,null===(c=e.response)||void 0===c?void 0:c.status,null===(p=e.response)||void 0===p?void 0:p.data))}}getLevelIcon(e){return i("div",e<0?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}:e>=this.levels.length?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-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.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}:{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'})}handleSelectContact(e,t){e.preventDefault(),this.rolesCompleted[t.id]={...t,...e.detail},this.showPickerForId=""}handleClickRole(e,t){e.stopPropagation(),this.showPickerForId=t.id}handleSend(e){var t,i;console.log("Sending",e),e.preventDefault(),e.stopPropagation(),this.sending=!0;const s={template_id:this.templateId,name:null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,environment:this.environment,roles:Object.values(this.rolesCompleted),prepared_fields:[]};console.log("[SEND] Creating envelope",s),c(this.endpoint,s).then((e=>{var t;console.log("[SEND] Send envelope",e),this.reset().catch((e=>console.log("Unknown Error",e))),this.sending=!1,null===(t=this.send)||void 0===t||t.emit(s)})).catch((e=>{console.log("Send error",e),this.sending=!1}))}handleCancel(e){var t;e.stopPropagation(),null===(t=this.exit)||void 0===t||t.emit()}render(){var e,t,o,l;const n=((null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||[]).map((e=>e.name))||[],r=Object.values(this.rolesCompleted).filter((e=>p(e.email)||h(e.phone))).length>=n.length;return i(s,{class:{sendable:null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),this.levels.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var t,s,o,l,r,d;return e.email?i("div",{class:"recipient",style:{borderColor:v(a(n,e.name))},onClick:t=>this.handleClickRole(t,e)},null!==(r=null===(l=this.rolesCompleted[e.id])||void 0===l?void 0:l.full_name)&&void 0!==r?r:e.full_name,i("div",{class:"icon",innerHTML:T}),this.showPickerForId===e.id&&i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(d=this.rolesCompleted[e.id])&&void 0!==d?d:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}})):i("div",{class:"recipient",style:{backgroundColor:v(a(n,e.name))},onClick:t=>this.handleClickRole(t,e)},null!==(s=null===(t=this.rolesCompleted[e.id])||void 0===t?void 0:t.full_name)&&void 0!==s?s:e.name,i("div",{class:"icon",innerHTML:T}),this.showPickerForId===e.id&&i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(o=this.rolesCompleted[e.id])&&void 0!==o?o:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}}))}))))),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e)}),i("verdocs-button",{label:"Send",size:"small",disabled:!r,onClick:e=>this.handleSend(e)})))}};I.style='verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:none}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';const L=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.templateUpdated=t(this,"templateUpdated",7),this.sdkError=t(this,"sdkError",7),this.endpoint=o.getDefault(),this.templateId="",this.uploading=!1,this.progressLabel="Uploading...",this.progressPercent=0,this.showDeleteError=!1,this.confirmDeleteDocument=null,this.store=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await n(this.endpoint,this.templateId,!1)}catch(s){console.log("[TEMPLATE ATTACHMENTS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new d(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}handleCancel(e){e.stopPropagation(),this.exit.emit()}handleUploadProgress(e){e>=99?(this.progressPercent=100,this.progressLabel="Processing..."):this.progressPercent=e}async handleUpload(e){var t,i,s,o;e.stopPropagation();const l=e.detail.file;if(l){console.log("[ATTACHMENTS] Uploading...",l),this.uploading=!0,this.progressLabel="Uploading...";try{const e=await m(this.endpoint,this.templateId,l,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e),this.store=await n(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] Updated template",this.store.state),null===(t=this.templateUpdated)||void 0===t||t.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"}),this.uploading=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e),null===(i=this.sdkError)||void 0===i||i.emit(new d(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data)),this.uploading=!1}}}handleNext(e){var t;e.stopPropagation(),this.uploading=!1,this.progressLabel="",this.progressPercent=0,null===(t=this.next)||void 0===t||t.emit({template:this.store.state})}async confirmDelete(){await u(this.endpoint,this.templateId,this.confirmDeleteDocument.id),this.store=await n(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] New template",this.store.state),this.confirmDeleteDocument=null}async handleDelete(e){var t;(null===(t=this.store.state)||void 0===t?void 0:t.template_documents.length)>1?this.confirmDeleteDocument=e:this.showDeleteError=!0}getFileIcon(e){switch(e.mime){case"application/pdf":return g;case"image/jpeg":return b;case"image/png":return f;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return x}return y}render(){var e,t,o;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));const l=null===(e=this.store)||void 0===e?void 0:e.state;return l.isLoaded?this.endpoint.session&&l.profile_id?i(s,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},null===(t=this.store)||void 0===t?void 0:t.state.template_documents.map((e=>i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:this.getFileIcon(e)}),i("div",{class:"filename",title:e.name},e.name),i("div",{class:"pages"},i("div",{class:"count"},e.page_numbers),i("div",{class:"pages-icon",innerHTML:w})),i("div",{class:"trash-icon",innerHTML:k,onClick:()=>this.handleDelete(e)}))))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:e=>this.handleUpload(e)}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleNext(e),disabled:!(null===(o=this.store)||void 0===o?void 0:o.state.template_documents.length)||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:()=>this.showDeleteError=!1}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:()=>this.confirmDelete(),showCancel:!0,onExit:()=>{this.confirmDeleteDocument=null}})):i(s,{class:"empty"}):i(s,{class:"loading"},i("verdocs-loader",null))}};L.style='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';const U=["attachments","roles","settings","fields","preview"],M=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.stepChanged=t(this,"stepChanged",7),this.endpoint=o.getDefault(),this.templateId=null,this.step="preview",this.store=null}onStepChanged(){console.log("Step changed",this.step,this.templateId),this.loadTemplate().catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.endpoint.session)return void console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");if(!this.templateId)return void(this.step="preview");this.loadTemplate().catch((e=>console.log("[BUILD_TABS] Unable to load template",e)))}catch(s){console.log("[BUILD_TABS] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new d(s.message,null===(t=s.response)||void 0===t?void 0:t.status,null===(i=s.response)||void 0===i?void 0:i.data))}}async loadTemplate(){this.templateId&&(this.store=await n(this.endpoint,this.templateId,!1))}setStep(e){var t;console.log("Selected step",e.detail.tab.id),e.stopPropagation(),e.preventDefault(),this.step=e.detail.tab.id,null===(t=this.stepChanged)||void 0===t||t.emit(e.detail.tab.id)}render(){var e,t,o,l,a,n,r,d,c,p,h,v;if(!this.endpoint.session)return i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));let m=!1,u=!1,x=!1;this.templateId&&this.store&&(console.log("lengths",null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.template_documents.length,null===(l=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===l?void 0:l.roles.length,null===(n=null===(a=this.store)||void 0===a?void 0:a.state)||void 0===n?void 0:n.fields.length),x=(null===(d=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===d?void 0:d.template_documents.length)>0,u=x&&(null===(p=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===p?void 0:p.roles.length)>0,m=u&&(null===(v=null===(h=this.store)||void 0===h?void 0:h.state)||void 0===v?void 0:v.fields.length)>0);let f=Math.max(U.indexOf(this.step),0);return!m&&f>=4&&(f=3),!u&&f>=3&&(f=1),!x&&f>=1&&(f=0),console.log({selectedStepIndex:f,canPreview:m,canEditFields:u,canEditRoles:x}),console.log("[BUILD_TABS] Rendering",this.step,f),i(s,null,i("verdocs-tabs",{onSelectTab:e=>this.setStep(e),selectedTab:f,tabs:[{id:"attachments",disabled:!1,label:this.templateId&&this.store?"Attachment(s)":"Upload Attachment(s)"},{id:"roles",disabled:!x,label:"Roles"},{id:"settings",disabled:!u,label:"Settings"},{id:"fields",disabled:!u,label:"Fields"},{id:"preview",disabled:!m,label:"Preview/Send"}]}))}static get watchers(){return{step:["onStepChanged"]}}};M.style='verdocs-template-build-tabs{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}';const N=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.templateCreated=t(this,"templateCreated",7),this.endpoint=o.getDefault(),this.file=void 0,this.creating=!1,this.progressLabel="Uploading...",this.progressPercent=0}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("[CREATE] Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){e.stopPropagation(),this.exit.emit()}async handleSubmit(e){var t,i,s,o,l;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await S(this.endpoint,{name:this.file.name,documents:[this.file]},(e=>{e>=99?(this.progressLabel="Processing...",this.progressPercent=100):this.progressPercent=e}));console.log("[CREATE] Created template",e),null===(t=this.templateCreated)||void 0===t||t.emit({endpoint:this.endpoint,template:e,templateId:e.id}),null===(i=this.next)||void 0===i||i.emit(e),this.creating=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[CREATE] Error creating template",e),null===(s=this.sdkError)||void 0===s||s.emit(new d(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(l=e.response)||void 0===l?void 0:l.data)),this.creating=!1}}}render(){return i(s,null,this.endpoint.session?i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("div",{class:"upload-box",onDrop:e=>{e.preventDefault(),e.target.classList.remove("drag-over"),this.file=e.dataTransfer.files[0]},onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"},onDragEnter:e=>e.target.classList.add("drag-over"),onDragLeave:e=>e.target.classList.remove("drag-over")},i("div",null,i("span",{innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>'})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};N.style='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';const R=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.name="",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await n(this.endpoint,this.templateId,!1),this.name=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.name,this.dirty=!1}catch(e){console.log("[TEMPLATE NAME] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new d(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.name=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name,this.dirty=!1,console.log("Closing"),null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await E(this.endpoint,this.templateId,{name:this.name}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.name=this.name),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"name"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoading)?i(s,{class:"loading"},i("verdocs-loader",null)):i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("label",{htmlFor:"verdocs-template-name"},"Template Name"),i("verdocs-text-input",{id:"verdocs-template-name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:e=>{var t,i;this.name=e.target.value,this.dirty=this.name!==(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.name)}}),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};R.style="";const A=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.showPlanBlocker=!1,this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1",this.dirty=!1}async componentWillLoad(){var e,t,i,s,o;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await n(this.endpoint,this.templateId,!0),this.sendReminders=!!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.reminder_id),this.dirty=!1}catch(e){console.log("[TEMPLATE REMINDERS] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new d(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(o=e.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.sendReminders=!!(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s,o,l,a,r,c,p,h,v,m;e.stopPropagation();try{if(this.sendReminders){const e={setup_time:+this.firstReminderDays,interval_time:+this.reminderDays};(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id)?(await function(e,t,i,s){return e.api.put("/templates/".concat(t,"/reminder/").concat(i),s).then((function(e){return e.data}))}(this.endpoint,this.templateId,null===(s=this.store)||void 0===s?void 0:s.state.reminder_id,e),this.store=await n(this.endpoint,this.templateId,!0)):(await function(e,t,i){return e.api.post("/templates/".concat(t,"/reminder/"),i).then((function(e){return e.data}))}(this.endpoint,this.templateId,e),this.store=await n(this.endpoint,this.templateId,!0))}else await(h=this.endpoint,v=this.templateId,m=null===(o=this.store)||void 0===o?void 0:o.state.reminder_id,h.api.delete("/templates/".concat(v,"/reminder/").concat(m)).then((function(e){return e.data}))),this.store=await n(this.endpoint,this.templateId,!0);null===(l=this.templateUpdated)||void 0===l||l.emit({endpoint:this.endpoint,template:this.store.state,event:"attachments"})}catch(e){console.log("[TEMPLATE REMINDERS] Unable to update reminders",e),z(e.message),null===(a=this.sdkError)||void 0===a||a.emit(new d(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(c=e.response)||void 0===c?void 0:c.data))}this.dirty=!1,null===(p=this.close)||void 0===p||p.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Reminders"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),i("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>{this.sendReminders=e.target.checked,this.dirty=!0}})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),i("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:e=>{this.firstReminderDays=e.target.value,this.dirty=!0},disabled:!this.sendReminders})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),i("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:e=>{this.reminderDays=e.target.value,this.dirty=!0},disabled:!this.sendReminders})),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))),this.showPlanBlocker&&i("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:()=>this.showPlanBlocker=!1})):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};A.style='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';const D=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.store=null,this.endpoint=o.getDefault(),this.templateId="",this.dirty=!1,this.personal=!1,this.public=!1}async componentWillLoad(){var e,t,i,s,o,l,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[VISIBILITY] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[VISIBILITY] Unable to start builder session, must be authenticated");this.store=await n(this.endpoint,this.templateId,!1),this.personal=(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.is_personal)||!0,this.public=(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.is_public)||!1,this.dirty=!1}catch(e){console.log("[TEMPLATE VISIBILITY] Error loading template",e),null===(o=this.sdkError)||void 0===o||o.emit(new d(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(a=e.response)||void 0===a?void 0:a.data))}}handleCancel(e){var t,i,s,o,l;e.stopPropagation(),this.personal=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.is_personal,this.public=null===(o=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===o?void 0:o.is_public,this.dirty=!1,null===(l=this.close)||void 0===l||l.emit()}async handleSave(e){var t,i,s;e.stopPropagation(),await E(this.endpoint,this.templateId,{is_personal:this.personal,is_public:this.public}),(null===(t=this.store)||void 0===t?void 0:t.state)&&(this.store.state.is_personal=this.personal,this.store.state.is_public=this.public),this.dirty=!1,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:this.store.state,event:"visibility"}),null===(s=this.close)||void 0===s||s.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Visibility"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-shared"},"Shared"),i("verdocs-checkbox",{id:"verdocs-is-shared",name:"is-shared",checked:!this.personal,value:"on",onInput:e=>{this.personal=!e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Shared templates are visible to other members of your Organization (if any)."),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-is-public"},"Public"),i("verdocs-checkbox",{id:"verdocs-is-public",name:"is-public",checked:this.public,value:"on",onInput:e=>{this.public=e.target.checked,this.dirty=!0}})),i("div",{class:"description"},"Public templates may appear in results when any other user searches for templates. Note that a template may be both Personal and Public, which may be useful if you want your template to be found via search but not otherwise displayed to other members of your Organization (if any)."),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};D.style='verdocs-template-visibility{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}';export{C as verdocs_preview,I as verdocs_send,L as verdocs_template_attachments,M as verdocs_template_build_tabs,N as verdocs_template_create,R as verdocs_template_name,A as verdocs_template_reminders,D as verdocs_template_visibility}
@@ -1 +0,0 @@
1
- import{d as n}from"./p-05788c2b.js";var e=function(n,e,t,r){return new(t||(t=Promise))((function(o,i){function u(n){try{f(r.next(n))}catch(n){i(n)}}function c(n){try{f(r.throw(n))}catch(n){i(n)}}function f(n){var e;n.done?o(n.value):(e=n.value,e instanceof t?e:new t((function(n){n(e)}))).then(u,c)}f((r=r.apply(n,e||[])).next())}))},t=function(n,e){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(f){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(u=0)),u;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return u.label++,{value:c[1],done:!1};case 5:u.label++,r=c[1],c=[0];continue;case 7:c=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){u=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){u.label=c[1];break}if(6===c[0]&&u.label<o[1]){u.label=o[1],o=c;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(c);break}o[2]&&u.ops.pop(),u.trys.pop();continue}c=e.call(n,u)}catch(n){c=[6,n],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,f])}}},r=function(n,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.post("/envelopes",r).then((function(n){return n.data}))]}))}))},o=function(n,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.post("/envelopes/summary",{page:r}).then((function(n){return n.data}))]}))}))},i=function(r,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,r.api.get("/envelopes/".concat(o.envelopeId,"/recipients/").concat(encodeURIComponent(o.roleId),"/invitation/").concat(o.inviteCode)).then((function(e){var t,o=(null===(t=e.headers)||void 0===t?void 0:t.signer_token)||"",i=n(o);return r.setToken(o),{recipient:e.data,session:i,signerToken:o}}))]}))}))},u=function(n,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(r)).then((function(n){return n.data}))]}))}))},c=function(n,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(r),{action:"cancel"}).then((function(n){return n.data}))]}))}))},f=function(n,r,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(r,"/envelope_documents/").concat(o,"?file=true"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))},s=function(n,r,o,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(r,"/fields/").concat(o),i).then((function(n){return n.data}))]}))}))},v=function(n,r,o,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(r,"/fields/").concat(o,"/signature/").concat(i)).then((function(n){return n.data}))]}))}))},a=function(n,r,o,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(r,"/fields/").concat(o,"/initial/").concat(i)).then((function(n){return n.data}))]}))}))},d=function(n,r,o,i,u){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(){return(e=new FormData).append("document",i,i.name),[2,n.api.put("/envelopes/".concat(r,"/fields/").concat(o),e,{timeout:12e4,onUploadProgress:function(n){var e=n.total||1,t=n.loaded||0;null==u||u(Math.floor(100*t/(e||1)),t,e||1)}}).then((function(n){return n.data}))]}))}))},l=function(n,r,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(r,"/fields/").concat(o,"/document"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))},p=function(n,r,o,i,u){return void 0===u&&(u="original"),e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(r,"/envelope_documents/").concat(o,"/pages/").concat(i,"/image?type=").concat(u),{timeout:2e4,"axios-retry":{retries:5}}).then((function(n){return n.data}))]}))}))},h={},m=function(n,e){return h[e]&&h[e].loaded+2e3<(new Date).getTime()?h[e].envelope:u(n,e).then((function(n){return h[e]={loaded:(new Date).getTime(),envelope:n},n}))},y=function(n,e){return n.api.post("/envelopes/list",e,{baseURL:n.getBaseURLv2()}).then((function(n){return n.data}))};export{u as a,f as b,c,l as d,i as e,v as f,o as g,a as h,d as i,r as j,p as k,y as l,m as t,s as u}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-4422958b.system.js","./p-2fdb7348.system.js"],(function(e){"use strict";var t,n,r,i,o;return{setters:[function(e){t=e.r;n=e.c;r=e.h},function(){},function(e){i=e.V},function(e){o=e.a}],execute:function(){var s=undefined&&undefined.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};var a=undefined&&undefined.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var c=function(e){return s(void 0,void 0,void 0,(function(){return a(this,(function(t){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))}))};var l='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 h='<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 u=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=i.getDefault()}e.prototype.handleCreateTemplate=function(){this.createTemplate.emit()};e.prototype.handleCreateDocument=function(){this.createDocument.emit()};e.prototype.render=function(){var e=this;return r("div",{class:"container"},r("p",{class:"title"},"Quick Create"),r("button",{onClick:function(){return e.handleCreateTemplate()},innerHTML:f},"Template"),r("button",{onClick:function(){return e.handleCreateDocument()},innerHTML:h},"Document"))};return e}());u.style=l;var p='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:#1e2031}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#cccccc}';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="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 x=e("verdocs_search_activity",function(){function e(e){t(this,e);this.entrySelected=n(this,"entrySelected",7);this.endpoint=i.getDefault();this.type="recent";this.options=undefined;this.emptyMessage="You do not have any starred searches.";this.authFailure=false;this.title="Recent Searches";this.recent=[];this.saved=[];this.starred=[]}e.prototype.componentWillLoad=function(){var e=this;this.endpoint.loadSession();var t=function(t){var n;console.warn("[Verdocs/search-activity] Error getting search data",t);if(((n=t===null||t===void 0?void 0:t.response)===null||n===void 0?void 0:n.status)===401){e.authFailure=true}};switch(this.type){case"recent":this.title="Recent Searches";this.emptyMessage="You do not have any recent searches.";c(this.endpoint).then((function(t){return e.recent=t.recent})).catch(t);break;case"saved":this.title="Saved Searches";this.emptyMessage="You do not have any saved searches.";c(this.endpoint).then((function(t){return e.saved=t.saved})).catch(t);break;case"starred":this.title="My Starred items";this.emptyMessage="You do not have any starred templates.";o(this.endpoint,{is_starred:true}).then((function(t){return e.starred=t})).catch(t);break}};e.prototype.handleSelectEntry=function(e){this.entrySelected.emit(e)};e.prototype.computePagesText=function(e){if(e<2){return"".concat(e," Page")}else{return"".concat(e," Pages")}};e.prototype.computeRecipientsText=function(e){if(typeof e==="object"){return e.join(", ")}else if(e>1){return"".concat(e," Recipients")}else{return"".concat(e," Recipient")}};e.prototype.render=function(){var e=this;var t=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return r("div",{class:"container"},r("p",{class:"title"},this.title),r("div",{class:"items"},this.recent.map((function(t){return r("button",{class:"item",onClick:function(){return e.handleSelectEntry(t)}},r("div",{class:"icon",innerHTML:d}),r("div",{class:"details"},r("div",{class:"item-title"},t.params.q),r("div",{class:"info"},"Test")))})),this.saved.map((function(t){return r("button",{class:"item",onClick:function(){return e.handleSelectEntry(t)}},r("div",{class:"icon",innerHTML:d}),r("div",{class:"details"},r("div",{class:"item-title"},t.params.q),r("div",{class:"info"})))})),t&&r("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))};return e}());x.style=p;var v='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';var y='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>';var m='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>';var b=e("verdocs_search_box",function(){function e(e){t(this,e);this.searchClicked=n(this,"searchClicked",7);this.typeChanged=n(this,"typeChanged",7);this.queryChanged=n(this,"queryChanged",7);this.endpoint=i.getDefault();this.placeholder="Search envelopes, templates, organizations...";this.type="all";this.query="";this.grabsFocus=false}e.prototype.focusField=function(){return s(this,void 0,void 0,(function(){return a(this,(function(e){this.inputEl.focus();return[2]}))}))};e.prototype.componentDidRender=function(){if(this.grabsFocus){this.inputEl.focus()}};e.prototype.handleSearch=function(e){this.searchClicked.emit({type:this.type,query:this.query});e.preventDefault();return false};e.prototype.handleChange=function(e){this.queryChanged.emit(e.target.value)};e.prototype.handleClearFilter=function(){this.typeChanged.emit("all")};e.prototype.handleKeyUp=function(e){if(e.key==="Enter"){this.searchClicked.emit({type:this.type,query:this.query})}};e.prototype.render=function(){var e=this;return r("form",{onSubmit:function(t){return e.handleSearch(t)}},this.type!==undefined&&this.type!=="all"&&r("span",{class:"type"},this.type,"s ",r("button",{class:"remove",innerHTML:m,onClick:function(){return e.handleClearFilter()}})),r("input",{type:"text",value:this.query,placeholder:this.placeholder,onInput:function(t){return e.handleChange(t)},onKeyUp:function(t){return e.handleKeyUp(t)},ref:function(t){return e.inputEl=t}}),r("button",{onClick:function(t){return e.handleSearch(t)},class:"search"},r("span",{innerHTML:y}),"Search"))};return e}());b.style=v}}}));
@@ -1 +0,0 @@
1
- import{c as e}from"./p-7648c449.js";import{g as o}from"./p-976ec9e8.js";import{T as t}from"./p-af048fad.js";const r={},a=async(a,s,n=!1)=>{let i=!1;r[s]||(console.debug("[TEMPLATES] No template store found for ID, creating",s),r[s]=(o=>{const r=(new Date).toISOString();return e({isLoading:!0,isLoaded:!1,isError:!1,error:null,updateCount:0,roleNames:[],id:o,name:"",description:"",sender:t.CREATOR,profile_id:"",organization_id:"",counter:0,star_counter:0,is_sendable:!1,is_personal:!0,is_public:!1,created_at:r,updated_at:r,last_used_at:r,token:"",reminder_id:"",reminder:void 0,processed:!1,organization:void 0,roles:[],pages:[],template_document:void 0,template_documents:[]})})(s),i=!0);const d=r[s];if(d.use({reset:()=>console.debug("[TEMPLATES] Store got reset"),dispose:()=>console.debug("[TEMPLATES] Store got disposed")}),i||n){console.debug("[TEMPLATES] Reloading template",{templateId:s,created:i,forceReload:n}),d.state.isLoading=!0,d.state.isLoaded=!1,d.state.isError=!1,d.state.error=void 0;try{const e=await o(a,s);console.debug("[TEMPLATES] Got template",e),Object.assign(d.state,e),d.state.isLoaded=!0,d.state.isError=!1,d.state.error=void 0}catch(e){throw console.error("[TEMPLATES] Error loading template",e),d.state.isLoaded=!1,d.state.isError=!0,d.state.error=e,e}d.state.isLoading=!1,d.state.updateCount++}return d},s=e=>{var o;return((null===(o=null==e?void 0:e.state)||void 0===o?void 0:o.roles)||[]).map((e=>e.name))};export{s as a,a as g}
@@ -1 +0,0 @@
1
- System.register(["./p-54498887.system.js"],(function(n){"use strict";var t;return{setters:[function(n){t=n.d}],execute:function(){var e=undefined&&undefined.__awaiter||function(n,t,e,o){function r(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,i){function u(n){try{c(o.next(n))}catch(n){i(n)}}function a(n){try{c(o["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):r(n.value).then(u,a)}c((o=o.apply(n,t||[])).next())}))};var o=undefined&&undefined.__generator||function(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(t){return c([n,t])}}function c(a){if(o)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(e=0)),e)try{if(o=1,r&&(i=a[0]&2?r["return"]:a[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;if(r=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;r=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){e.label=a[1];break}if(a[0]===6&&e.label<i[1]){e.label=i[1];i=a;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(a);break}if(i[2])e.ops.pop();e.trys.pop();continue}a=t.call(n,e)}catch(n){a=[6,n];r=0}finally{o=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var r=n("j",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.post("/envelopes",t).then((function(n){return n.data}))]}))}))}));var i=n("g",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.post("/envelopes/summary",{page:t}).then((function(n){return n.data}))]}))}))}));var u=n("e",(function(n,r){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(r.envelopeId,"/recipients/").concat(encodeURIComponent(r.roleId),"/invitation/").concat(r.inviteCode)).then((function(e){var o;var r=((o=e.headers)===null||o===void 0?void 0:o.signer_token)||"";var i=t(r);n.setToken(r);return{recipient:e.data,session:i,signerToken:r}}))]}))}))}));var a=n("a",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t)).then((function(n){return n.data}))]}))}))}));var c=n("c",(function(n,t){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t),{action:"cancel"}).then((function(n){return n.data}))]}))}))}));var f=n("b",(function(n,t,r){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/envelope_documents/").concat(r,"?file=true"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))}));var d=n("u",(function(n,t,r,i){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r),i).then((function(n){return n.data}))]}))}))}));var v=n("f",(function(n,t,r,i){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r,"/signature/").concat(i)).then((function(n){return n.data}))]}))}))}));var s=n("h",(function(n,t,r,i){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r,"/initial/").concat(i)).then((function(n){return n.data}))]}))}))}));var l=n("i",(function(n,t,r,i,u){return e(void 0,void 0,void 0,(function(){var e;return o(this,(function(o){e=new FormData;e.append("document",i,i.name);return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(r),e,{timeout:12e4,onUploadProgress:function(n){var t=n.total||1;var e=n.loaded||0;u===null||u===void 0?void 0:u(Math.floor(e*100/(t||1)),e,t||1)}}).then((function(n){return n.data}))]}))}))}));var p=n("d",(function(n,t,r){return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/fields/").concat(r,"/document"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))}));var h=n("k",(function(n,t,r,i,u){if(u===void 0){u="original"}return e(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/envelope_documents/").concat(r,"/pages/").concat(i,"/image?type=").concat(u),{timeout:2e4,"axios-retry":{retries:5}}).then((function(n){return n.data}))]}))}))}));var g={};var y=n("t",(function(n,t){if(g[t]&&g[t].loaded+2e3<(new Date).getTime()){return g[t].envelope}return a(n,t).then((function(n){g[t]={loaded:(new Date).getTime(),envelope:n};return n}))}));var b=n("l",(function(n,t){return n.api.post("/envelopes/list",t,{baseURL:n.getBaseURLv2()}).then((function(n){return n.data}))}))}}}));
@@ -1 +0,0 @@
1
- import{r as t,h as s,H as e}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as i}from"./p-af048fad.js";import{g as l}from"./p-d4d8858f.js";import"./p-7648c449.js";import"./p-976ec9e8.js";const o=class{constructor(s){t(this,s),this.store=null,this.endpoint=i.getDefault(),this.templateId="e997b94c-9d1b-4c85-8552-dedd24e35550"}async componentWillLoad(){try{this.endpoint.loadSession(),this.store=await l(this.endpoint,this.templateId,!1)}catch(t){console.log("[TEMPLATE VISIBILITY] Error loading template",t)}}render(){return console.log("[IPC] Rendering"),s(e,null,s("div",null,s("pre",null,s("code",null,JSON.stringify(this.store.state,null,2)))),s("verdocs-template-roles",{templateId:this.templateId}),s("verdocs-template-fields",{templateId:this.templateId}))}};o.style="ipc-test{max-width:800px;display:block}";export{o as ipc_test}
@@ -1 +0,0 @@
1
- import{r as t,c as o,h as e,a as n,H as i}from"./p-14b44491.js";const s=class{constructor(e){t(this,e),this.optionSelected=o(this,"optionSelected",7),this.menuContainer=null,this.scrollParent=null,this.scrollParentParent=null,this.options=[]}componentDidLoad(){this.menuContainer=document.createElement("div"),this.menuContainer.id="verdocs-floating-menu";let t=document.createElement("div");t.className="trigger",t.innerText="+",this.menuContainer.append(t),t=document.createElement("div"),t.className="options",this.menuContainer.append(t);const o=this.handleSelect.bind(this);this.options.forEach((e=>{const n=document.createElement("div");n.className="option",n.addEventListener("click",(()=>o(e))),t.append(n);const i=document.createElement("verdocs-toolbar-icon");i.setAttribute("icon",e.icon),i.setAttribute("text",e.tooltip),i.setAttribute("placement","left"),n.append(i)})),document.body.append(this.menuContainer),this.scrollParent=(t=>{const o=/(auto|scroll)/,e=(t,o)=>null===t.parentNode?o:e(t.parentNode,o.concat([t])),n=(t,o)=>getComputedStyle(t,null).getPropertyValue(o),i=t=>o.test((t=>n(t,"overflow")+n(t,"overflow-y")+n(t,"overflow-x"))(t));return(t=>{if(!(t instanceof HTMLElement||t instanceof SVGElement))return;const o=e(t.parentNode,[]);for(let t=0;t<o.length;t+=1)if(i(o[t]))return o[t];return document.scrollingElement||document.documentElement})(t)})(this.el),this.scrollParent&&(this.scrollParentParent=this.scrollParent.parentElement,this.repositionTrigger(this.scrollParent))}disconnectedCallback(){var t;null===(t=this.menuContainer)||void 0===t||t.remove()}handleSelect(t){var o;null===(o=this.optionSelected)||void 0===o||o.emit(t);const e=document.getElementById("verdocs-floating-menu");e&&(e.className="force-closed",setTimeout((()=>{e.className=""}),100))}repositionTrigger(t){const o=t.parentElement;if(o){const t=o.getBoundingClientRect(),e=document.getElementById("verdocs-floating-menu");e&&(e.style.bottom=document.documentElement.clientHeight-(document.documentElement.scrollTop+t.bottom)+10+"px",e.style.left=t.right-80+"px")}}render(){return e(i,null)}get el(){return n(this)}};s.style="verdocs-floating-menu{display:none}#verdocs-floating-menu{position:absolute;width:56px;height:56px;display:-ms-flexbox;display:flex;-ms-flex:0 0 fit-content;flex:0 0 fit-content}#verdocs-floating-menu:not(.force-closed):hover{height:500px}#verdocs-floating-menu:not(.force-closed):hover .trigger{-webkit-box-shadow:0 10px 25px #4c56cb;box-shadow:0 10px 25px #4c56cb;-webkit-transform:translatey(2px);transform:translatey(2px);-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu:not(.force-closed):hover .options{display:-ms-flexbox;display:flex}#verdocs-floating-menu:not(.force-closed):hover .options .option{-webkit-animation:vfm-appear 0.1s forwards 0.2s;animation:vfm-appear 0.1s forwards 0.2s}#verdocs-floating-menu .trigger{position:absolute;width:56px;height:56px;background:#654dcb;bottom:0;border-radius:50%;left:0;right:0;margin:auto;color:white;line-height:52px;text-align:center;font-size:44px;z-index:100;-webkit-box-shadow:0 10px 25px -5px #4c56cb;box-shadow:0 10px 25px -5px #4c56cb;cursor:pointer;-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu .options{width:56px;-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 fit-content;flex:0 0 fit-content;position:absolute;bottom:70px;display:none}#verdocs-floating-menu .option{background:#654dcb;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:50%;width:36px;height:36px;margin:5px auto;color:white;font-weight:500;text-align:center;line-height:36px;opacity:0}#verdocs-floating-menu verdocs-toolbar-icon .icon{display:-ms-flexbox;display:flex}#verdocs-floating-menu verdocs-toolbar-icon .icon svg{fill:#ffffff}@-webkit-keyframes vfm-appear{0%{opacity:0}30%{-webkit-transform:scale(0.4);transform:scale(0.4);opacity:0.3}70%{-webkit-transform:scale(1.2);transform:scale(1.2);opacity:0.6}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes vfm-appear{0%{opacity:0}30%{-webkit-transform:scale(0.4);transform:scale(0.4);opacity:0.3}70%{-webkit-transform:scale(1.2);transform:scale(1.2);opacity:0.6}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}";export{s as verdocs_floating_menu}