@verdocs/web-sdk 1.11.4 → 1.11.5

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 (302) hide show
  1. package/dist/cjs/{Envelopes-9886af0f.js → Envelopes-2350fcf1.js} +1 -1
  2. package/dist/cjs/{Templates-7a63d848.js → Templates-a94ae841.js} +1 -1
  3. package/dist/cjs/{index-1329d89c.js → index-5e4233b0.js} +57 -0
  4. package/dist/cjs/{index-eb130f52.js → index-cfa67e73.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/{templateStore-198752d5.js → templateStore-4abb214a.js} +1 -1
  7. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-build.cjs.entry.js +4 -4
  9. package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +4 -4
  10. package/dist/cjs/verdocs-button.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-document-page_2.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +3 -3
  15. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +3 -3
  16. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -3
  17. package/dist/cjs/verdocs-field-date.cjs.entry.js +3 -3
  18. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -3
  19. package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -3
  20. package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
  21. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -3
  22. package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -3
  23. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -3
  24. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -3
  25. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +3 -3
  26. package/dist/cjs/verdocs-floating-menu.cjs.entry.js +1 -1
  27. package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
  28. package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +1 -1
  29. package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
  30. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
  31. package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
  32. package/dist/cjs/verdocs-preview.cjs.entry.js +6 -6
  33. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  34. package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
  35. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  36. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  37. package/dist/cjs/verdocs-send.cjs.entry.js +4 -4
  38. package/dist/cjs/verdocs-sign.cjs.entry.js +3 -3
  39. package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +1 -1
  40. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
  41. package/dist/cjs/verdocs-template-attachments.cjs.entry.js +4 -4
  42. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  43. package/dist/cjs/verdocs-template-create_2.cjs.entry.js +42 -21
  44. package/dist/cjs/verdocs-template-document-page.cjs.entry.js +1 -1
  45. package/dist/cjs/verdocs-template-name.cjs.entry.js +4 -4
  46. package/dist/cjs/verdocs-template-properties.cjs.entry.js +3 -3
  47. package/dist/cjs/verdocs-template-recipients.cjs.entry.js +4 -4
  48. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +4 -4
  49. package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +4 -4
  50. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  51. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +4 -4
  52. package/dist/cjs/verdocs-toggle-button.cjs.entry.js +1 -1
  53. package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
  54. package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +1 -1
  55. package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +1 -1
  56. package/dist/cjs/verdocs-view.cjs.entry.js +3 -3
  57. package/dist/cjs/verdocs-web-sdk.cjs.js +2 -2
  58. package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +2 -2
  59. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.css +2 -2
  60. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +22 -12
  61. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +24 -4
  62. package/dist/components/verdocs-preview.js +2 -2
  63. package/dist/components/verdocs-template-create2.js +23 -13
  64. package/dist/components/verdocs-template-fields2.js +16 -5
  65. package/dist/docs.json +9 -2
  66. package/dist/esm/{Envelopes-b8945309.js → Envelopes-7f3b60de.js} +1 -1
  67. package/dist/esm/{Templates-e288e682.js → Templates-a693b275.js} +1 -1
  68. package/dist/esm/{index-fd7b8a34.js → index-24fd1580.js} +1 -1
  69. package/dist/esm/{index-f78d163d.js → index-e64d45e2.js} +57 -0
  70. package/dist/esm/loader.js +2 -2
  71. package/dist/esm/{templateStore-a7a5149a.js → templateStore-a399f366.js} +1 -1
  72. package/dist/esm/verdocs-auth.entry.js +1 -1
  73. package/dist/esm/verdocs-build.entry.js +4 -4
  74. package/dist/esm/verdocs-button-panel_3.entry.js +4 -4
  75. package/dist/esm/verdocs-button.entry.js +1 -1
  76. package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
  77. package/dist/esm/verdocs-contact-picker.entry.js +1 -1
  78. package/dist/esm/verdocs-document-page_2.entry.js +1 -1
  79. package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -3
  80. package/dist/esm/verdocs-field-attachment.entry.js +3 -3
  81. package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
  82. package/dist/esm/verdocs-field-date.entry.js +3 -3
  83. package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
  84. package/dist/esm/verdocs-field-initial.entry.js +3 -3
  85. package/dist/esm/verdocs-field-payment.entry.js +3 -3
  86. package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
  87. package/dist/esm/verdocs-field-signature.entry.js +3 -3
  88. package/dist/esm/verdocs-field-textarea.entry.js +3 -3
  89. package/dist/esm/verdocs-field-textbox.entry.js +3 -3
  90. package/dist/esm/verdocs-field-timestamp.entry.js +3 -3
  91. package/dist/esm/verdocs-floating-menu.entry.js +1 -1
  92. package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
  93. package/dist/esm/verdocs-kba-dialog.entry.js +1 -1
  94. package/dist/esm/verdocs-loader.entry.js +1 -1
  95. package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
  96. package/dist/esm/verdocs-organization-card.entry.js +1 -1
  97. package/dist/esm/verdocs-preview.entry.js +6 -6
  98. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  99. package/dist/esm/verdocs-radio-button.entry.js +1 -1
  100. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  101. package/dist/esm/verdocs-search.entry.js +1 -1
  102. package/dist/esm/verdocs-send.entry.js +4 -4
  103. package/dist/esm/verdocs-sign.entry.js +3 -3
  104. package/dist/esm/verdocs-signature-dialog.entry.js +1 -1
  105. package/dist/esm/verdocs-status-indicator.entry.js +1 -1
  106. package/dist/esm/verdocs-template-attachments.entry.js +4 -4
  107. package/dist/esm/verdocs-template-card.entry.js +1 -1
  108. package/dist/esm/verdocs-template-create_2.entry.js +42 -21
  109. package/dist/esm/verdocs-template-document-page.entry.js +1 -1
  110. package/dist/esm/verdocs-template-name.entry.js +4 -4
  111. package/dist/esm/verdocs-template-properties.entry.js +3 -3
  112. package/dist/esm/verdocs-template-recipients.entry.js +4 -4
  113. package/dist/esm/verdocs-template-reminders.entry.js +4 -4
  114. package/dist/esm/verdocs-template-role-properties_2.entry.js +4 -4
  115. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  116. package/dist/esm/verdocs-template-visibility.entry.js +4 -4
  117. package/dist/esm/verdocs-toggle-button.entry.js +1 -1
  118. package/dist/esm/verdocs-toggle.entry.js +1 -1
  119. package/dist/esm/verdocs-toolbar-icon.entry.js +1 -1
  120. package/dist/esm/verdocs-upload-dialog.entry.js +1 -1
  121. package/dist/esm/verdocs-view.entry.js +3 -3
  122. package/dist/esm/verdocs-web-sdk.js +2 -2
  123. package/dist/esm-es5/{Envelopes-b8945309.js → Envelopes-7f3b60de.js} +1 -1
  124. package/dist/esm-es5/{Templates-e288e682.js → Templates-a693b275.js} +1 -1
  125. package/dist/esm-es5/{index-fd7b8a34.js → index-24fd1580.js} +1 -1
  126. package/dist/esm-es5/index-e64d45e2.js +2 -0
  127. package/dist/esm-es5/loader.js +1 -1
  128. package/dist/esm-es5/{templateStore-a7a5149a.js → templateStore-a399f366.js} +1 -1
  129. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
  132. package/dist/esm-es5/verdocs-button.entry.js +1 -1
  133. package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
  134. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-document-page_2.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
  138. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  139. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  140. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  141. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  142. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  143. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  144. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  145. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  146. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  147. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  148. package/dist/esm-es5/verdocs-floating-menu.entry.js +1 -1
  149. package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
  150. package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
  151. package/dist/esm-es5/verdocs-loader.entry.js +1 -1
  152. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  153. package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
  154. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  155. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  156. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -1
  157. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  158. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  159. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  160. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  161. package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
  162. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  163. package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
  164. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  165. package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
  166. package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -1
  167. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  168. package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
  169. package/dist/esm-es5/verdocs-template-recipients.entry.js +1 -1
  170. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  171. package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -1
  172. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  173. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  174. package/dist/esm-es5/verdocs-toggle-button.entry.js +1 -1
  175. package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
  176. package/dist/esm-es5/verdocs-toolbar-icon.entry.js +1 -1
  177. package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
  178. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  179. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  180. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +2 -1
  181. package/dist/verdocs-web-sdk/{p-fb69732f.entry.js → p-0031154e.entry.js} +1 -1
  182. package/dist/verdocs-web-sdk/{p-f0022cf0.entry.js → p-02951f09.entry.js} +1 -1
  183. package/dist/verdocs-web-sdk/{p-6121f103.system.entry.js → p-04bf80c2.system.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/{p-f9f0d3b4.system.js → p-0513c8c3.system.js} +1 -1
  185. package/dist/verdocs-web-sdk/{p-ab500634.system.entry.js → p-05581b87.system.entry.js} +1 -1
  186. package/dist/verdocs-web-sdk/{p-7d909ce4.entry.js → p-0ccb837b.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/{p-9fc9596b.system.entry.js → p-0fff0dbd.system.entry.js} +1 -1
  188. package/dist/verdocs-web-sdk/{p-f6aa16f3.system.entry.js → p-114d885d.system.entry.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-a6c3fcb6.system.entry.js → p-137837c5.system.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/{p-96f838ea.system.entry.js → p-13b8ea53.system.entry.js} +1 -1
  191. package/dist/verdocs-web-sdk/{p-896f1614.entry.js → p-140e1871.entry.js} +1 -1
  192. package/dist/verdocs-web-sdk/{p-190394ec.system.entry.js → p-219174fc.system.entry.js} +1 -1
  193. package/dist/verdocs-web-sdk/{p-8012b6c0.entry.js → p-284ceaf4.entry.js} +1 -1
  194. package/dist/verdocs-web-sdk/{p-07f254ef.system.entry.js → p-2a6d69c2.system.entry.js} +1 -1
  195. package/dist/verdocs-web-sdk/{p-479d7e1f.entry.js → p-30cf9417.entry.js} +1 -1
  196. package/dist/verdocs-web-sdk/{p-7e58e898.system.js → p-340316cb.system.js} +1 -1
  197. package/dist/verdocs-web-sdk/{p-17d70035.entry.js → p-36dff44e.entry.js} +1 -1
  198. package/dist/verdocs-web-sdk/{p-8175a794.system.entry.js → p-3b3ba829.system.entry.js} +1 -1
  199. package/dist/verdocs-web-sdk/{p-aa7f6376.entry.js → p-3d4b366c.entry.js} +1 -1
  200. package/dist/verdocs-web-sdk/{p-f12e0150.entry.js → p-3db71b58.entry.js} +1 -1
  201. package/dist/verdocs-web-sdk/{p-71cce0f0.entry.js → p-408caf2e.entry.js} +1 -1
  202. package/dist/verdocs-web-sdk/{p-741a34fc.entry.js → p-4340cdc2.entry.js} +1 -1
  203. package/dist/verdocs-web-sdk/{p-7c2ce3ba.system.entry.js → p-44feafae.system.entry.js} +1 -1
  204. package/dist/verdocs-web-sdk/{p-1aa26bbb.entry.js → p-45447db5.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/{p-d85e61ee.system.entry.js → p-457d3af9.system.entry.js} +1 -1
  206. package/dist/verdocs-web-sdk/{p-edcd7d44.entry.js → p-46c17ff0.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-b6e6f993.system.entry.js → p-486d9b7d.system.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-50a2bf7b.system.entry.js → p-49a34d3f.system.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-939190da.system.entry.js → p-49d9e761.system.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-68c780bd.system.entry.js → p-4c5b7410.system.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/{p-74401f2e.system.entry.js → p-4faa7ff3.system.entry.js} +1 -1
  212. package/dist/verdocs-web-sdk/{p-b365612a.entry.js → p-5342a0bb.entry.js} +1 -1
  213. package/dist/verdocs-web-sdk/{p-150a172e.system.entry.js → p-5777de38.system.entry.js} +1 -1
  214. package/dist/verdocs-web-sdk/{p-623e2beb.entry.js → p-58b858fc.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/{p-3f01debd.system.entry.js → p-591432e9.system.entry.js} +1 -1
  216. package/dist/verdocs-web-sdk/{p-7ede7934.system.entry.js → p-5ba5c607.system.entry.js} +1 -1
  217. package/dist/verdocs-web-sdk/{p-99942818.entry.js → p-5c39e66b.entry.js} +1 -1
  218. package/dist/verdocs-web-sdk/{p-608de9cf.system.entry.js → p-5cb8b228.system.entry.js} +1 -1
  219. package/dist/verdocs-web-sdk/{p-fedfe011.entry.js → p-5e932394.entry.js} +1 -1
  220. package/dist/verdocs-web-sdk/{p-3046d912.entry.js → p-64275bfd.entry.js} +1 -1
  221. package/dist/verdocs-web-sdk/{p-36fe1557.system.entry.js → p-69ded49f.system.entry.js} +1 -1
  222. package/dist/verdocs-web-sdk/{p-74207eb0.system.entry.js → p-6affb629.system.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-0f6da8c7.system.js → p-71c7e1ba.system.js} +1 -1
  224. package/dist/verdocs-web-sdk/p-7239d28d.js +2 -0
  225. package/dist/verdocs-web-sdk/{p-353b8e87.system.entry.js → p-7b82f0f2.system.entry.js} +1 -1
  226. package/dist/verdocs-web-sdk/{p-7efc60cc.entry.js → p-7cb46b17.entry.js} +1 -1
  227. package/dist/verdocs-web-sdk/p-7e6d7c07.system.js +1 -0
  228. package/dist/verdocs-web-sdk/{p-18bb4152.system.entry.js → p-82a78fe5.system.entry.js} +1 -1
  229. package/dist/verdocs-web-sdk/{p-113a45d3.entry.js → p-833d6274.entry.js} +1 -1
  230. package/dist/verdocs-web-sdk/{p-2699042e.system.entry.js → p-837d3790.system.entry.js} +1 -1
  231. package/dist/verdocs-web-sdk/p-8466a97d.js +1 -0
  232. package/dist/verdocs-web-sdk/p-85ab335b.entry.js +1 -0
  233. package/dist/verdocs-web-sdk/{p-80345c52.system.entry.js → p-87362bbf.system.entry.js} +1 -1
  234. package/dist/verdocs-web-sdk/{p-11161d87.entry.js → p-87e5b9b3.entry.js} +1 -1
  235. package/dist/verdocs-web-sdk/{p-6619bc62.js → p-89b9fd4f.js} +1 -1
  236. package/dist/verdocs-web-sdk/{p-5ea05a1d.js → p-8b2040be.js} +1 -1
  237. package/dist/verdocs-web-sdk/{p-d2af1be8.system.entry.js → p-8b68678c.system.entry.js} +1 -1
  238. package/dist/verdocs-web-sdk/{p-28620067.system.entry.js → p-9191190c.system.entry.js} +1 -1
  239. package/dist/verdocs-web-sdk/p-9422b807.system.js +2 -0
  240. package/dist/verdocs-web-sdk/{p-0c3d9831.entry.js → p-966a3108.entry.js} +1 -1
  241. package/dist/verdocs-web-sdk/{p-2ae1b96d.js → p-9760d335.js} +1 -1
  242. package/dist/verdocs-web-sdk/p-9775a49a.entry.js +1 -0
  243. package/dist/verdocs-web-sdk/{p-deed17c8.entry.js → p-9871f509.entry.js} +1 -1
  244. package/dist/verdocs-web-sdk/{p-37146bc0.system.entry.js → p-996ce975.system.entry.js} +1 -1
  245. package/dist/verdocs-web-sdk/{p-a3a9fcba.entry.js → p-9d063e59.entry.js} +1 -1
  246. package/dist/verdocs-web-sdk/{p-dc8aa1f0.entry.js → p-9f532d65.entry.js} +1 -1
  247. package/dist/verdocs-web-sdk/{p-23255004.system.entry.js → p-a20ba40a.system.entry.js} +1 -1
  248. package/dist/verdocs-web-sdk/{p-4125b8e7.system.entry.js → p-a275f3b8.system.entry.js} +1 -1
  249. package/dist/verdocs-web-sdk/{p-40dfb545.entry.js → p-a8a3bcb0.entry.js} +1 -1
  250. package/dist/verdocs-web-sdk/{p-d1cb1151.entry.js → p-aa1d72b7.entry.js} +1 -1
  251. package/dist/verdocs-web-sdk/{p-9f6b4f8c.entry.js → p-ab2ab46e.entry.js} +1 -1
  252. package/dist/verdocs-web-sdk/{p-9ba92e4f.entry.js → p-ac530c28.entry.js} +1 -1
  253. package/dist/verdocs-web-sdk/{p-c3922dbb.system.entry.js → p-ac91d81d.system.entry.js} +1 -1
  254. package/dist/verdocs-web-sdk/{p-1654be9f.system.entry.js → p-aec28fc8.system.entry.js} +1 -1
  255. package/dist/verdocs-web-sdk/{p-c30fa791.entry.js → p-af1eb1d8.entry.js} +1 -1
  256. package/dist/verdocs-web-sdk/{p-d250b3b4.entry.js → p-b154b9b9.entry.js} +1 -1
  257. package/dist/verdocs-web-sdk/{p-67f1cc29.system.entry.js → p-b3ea279b.system.entry.js} +1 -1
  258. package/dist/verdocs-web-sdk/{p-a0d235a3.system.entry.js → p-b4c56faa.system.entry.js} +1 -1
  259. package/dist/verdocs-web-sdk/{p-4c7a531c.system.entry.js → p-b62bf4bb.system.entry.js} +1 -1
  260. package/dist/verdocs-web-sdk/{p-c6e0cc16.entry.js → p-b716d448.entry.js} +1 -1
  261. package/dist/verdocs-web-sdk/{p-d36ae684.entry.js → p-b71f26f2.entry.js} +1 -1
  262. package/dist/verdocs-web-sdk/{p-7f0e6545.entry.js → p-be65a712.entry.js} +1 -1
  263. package/dist/verdocs-web-sdk/{p-1d787be7.entry.js → p-c11a681f.entry.js} +1 -1
  264. package/dist/verdocs-web-sdk/{p-c37913b6.entry.js → p-c296f86f.entry.js} +1 -1
  265. package/dist/verdocs-web-sdk/{p-1872ef41.system.entry.js → p-c5502771.system.entry.js} +1 -1
  266. package/dist/verdocs-web-sdk/{p-673304f6.system.entry.js → p-c6e8e485.system.entry.js} +1 -1
  267. package/dist/verdocs-web-sdk/{p-49bc1855.system.entry.js → p-cb2dd06d.system.entry.js} +1 -1
  268. package/dist/verdocs-web-sdk/{p-11967343.system.entry.js → p-d0ed3251.system.entry.js} +1 -1
  269. package/dist/verdocs-web-sdk/{p-91df3bb9.entry.js → p-d2711cd7.entry.js} +1 -1
  270. package/dist/verdocs-web-sdk/{p-86bd8c38.system.entry.js → p-d8cea42e.system.entry.js} +1 -1
  271. package/dist/verdocs-web-sdk/{p-2b86f106.entry.js → p-d9aab909.entry.js} +1 -1
  272. package/dist/verdocs-web-sdk/{p-8b3cf06c.system.entry.js → p-dc5875be.system.entry.js} +1 -1
  273. package/dist/verdocs-web-sdk/{p-2d9225e9.system.entry.js → p-dff92a1d.system.entry.js} +1 -1
  274. package/dist/verdocs-web-sdk/p-e1b674e6.system.entry.js +1 -0
  275. package/dist/verdocs-web-sdk/{p-dcd59898.entry.js → p-e1fb61bb.entry.js} +1 -1
  276. package/dist/verdocs-web-sdk/{p-dd4589d9.entry.js → p-e5c28d78.entry.js} +1 -1
  277. package/dist/verdocs-web-sdk/{p-49a1c436.entry.js → p-ed9528b1.entry.js} +1 -1
  278. package/dist/verdocs-web-sdk/{p-d0bac2b8.entry.js → p-ef4081e9.entry.js} +1 -1
  279. package/dist/verdocs-web-sdk/{p-0be7122f.entry.js → p-f063451d.entry.js} +1 -1
  280. package/dist/verdocs-web-sdk/{p-98ce58df.system.entry.js → p-f0d35695.system.entry.js} +1 -1
  281. package/dist/verdocs-web-sdk/{p-23842282.entry.js → p-f1465d29.entry.js} +1 -1
  282. package/dist/verdocs-web-sdk/{p-5b114f68.system.entry.js → p-f2ff8d0e.system.entry.js} +1 -1
  283. package/dist/verdocs-web-sdk/{p-37a75b0e.system.entry.js → p-f3169208.system.entry.js} +1 -1
  284. package/dist/verdocs-web-sdk/{p-66384a4c.system.entry.js → p-f61da49f.system.entry.js} +1 -1
  285. package/dist/verdocs-web-sdk/{p-6f53c098.system.js → p-f8eddf94.system.js} +1 -1
  286. package/dist/verdocs-web-sdk/{p-2783520a.entry.js → p-f93d3324.entry.js} +1 -1
  287. package/dist/verdocs-web-sdk/{p-fba99ad6.entry.js → p-fa977600.entry.js} +1 -1
  288. package/dist/verdocs-web-sdk/{p-b859bbb4.entry.js → p-facf681e.entry.js} +1 -1
  289. package/dist/verdocs-web-sdk/{p-a5237a8c.system.entry.js → p-fb8c654e.system.entry.js} +1 -1
  290. package/dist/verdocs-web-sdk/{p-99c75b7d.system.entry.js → p-fbb9b6e2.system.entry.js} +1 -1
  291. package/dist/verdocs-web-sdk/{p-e40012b6.entry.js → p-ffcd34e8.entry.js} +1 -1
  292. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  293. package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
  294. package/package.json +1 -1
  295. package/dist/esm-es5/index-f78d163d.js +0 -2
  296. package/dist/verdocs-web-sdk/p-3d4b187a.js +0 -1
  297. package/dist/verdocs-web-sdk/p-442b0dca.entry.js +0 -1
  298. package/dist/verdocs-web-sdk/p-61dbd1ed.system.entry.js +0 -1
  299. package/dist/verdocs-web-sdk/p-8f61a9ee.entry.js +0 -1
  300. package/dist/verdocs-web-sdk/p-97329951.system.js +0 -2
  301. package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +0 -1
  302. package/dist/verdocs-web-sdk/p-ff1278ed.js +0 -2
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,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 l([e,t])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,r&&(i=s[0]&2?r["return"]:s[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;if(r=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-97329951.system.js","./p-80fe8ac3.system.js","./p-8229e6df.system.js","./p-4f63fae0.system.js","./p-05eb4fed.system.js","./p-f9f0d3b4.system.js","./p-7e58e898.system.js","./p-38d00c38.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-0f6da8c7.system.js","./p-d50523fd.system.js","./p-69912cbf.system.js","./p-e764098e.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,n,o,r,i,s,a,l,c,d,p,u,f,m,v,g;return{setters:[function(e){t=e.r;n=e.c;o=e.h;r=e.H;i=e.F;s=e.a},function(e){a=e.i},function(e){l=e.u;c=e.c},function(e){d=e.V;p=e.T},function(e){u=e.g},function(e){f=e.s},function(e){m=e.l},function(e){v=e.a},function(e){g=e.S},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var h;var x='verdocs-template-recipients{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-recipients>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-recipients>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-recipients>form .participants{position:relative}verdocs-template-recipients>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-recipients>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-recipients>form .row .row-recipients{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-direction:row;flex-direction:row}verdocs-template-recipients>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-recipients>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 5px 0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-recipients>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-recipients>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-recipients>form .row .settings-button{margin:4px 0 0 9px;cursor:pointer}verdocs-template-recipients>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:1px solid #aeb4bf}verdocs-template-recipients>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:4px 12px 0 0}verdocs-template-recipients>form .row .recipient.dragging{position:absolute}verdocs-template-recipients>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-recipients>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-recipients>form .row .dropzone svg{fill:#cccccc}verdocs-template-recipients>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-recipients>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-recipients>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-recipients>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-recipients>form input:focus{outline:none}verdocs-template-recipients .row.add-sequence{display:none}verdocs-template-recipients .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-recipients .add-role:hover{opacity:1}verdocs-template-recipients .add-role svg{width:32px;height:32px}verdocs-template-recipients .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-recipients .add-step:hover{opacity:1}verdocs-template-recipients .add-step svg{width:32px;height:32px}verdocs-template-recipients.dragging .add-role{display:none}verdocs-template-recipients.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-recipients.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-recipients.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-recipients.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-recipients .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-recipients .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-recipients .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-recipients ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-moz-placeholder{color:#aaaaaa}verdocs-template-recipients :-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::placeholder{color:#aaaaaa}';var b=(h={},h[p.EVERYONE]="Everyone",h[p.EVERYONE_AS_CREATOR]="Everyone as Me",h[p.ORGANIZATION_MEMBER]="Organization member",h[p.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",h[p.CREATOR]="Me",h);var w='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';var y='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>';var q='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>';var R='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>';var z='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var k='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var E='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>';var L='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>';var T=e("verdocs_template_recipients",function(){function e(e){t(this,e);this.next=n(this,"next",7);this.cancel=n(this,"cancel",7);this.sdkError=n(this,"sdkError",7);this.templateUpdated=n(this,"templateUpdated",7);this.sequences=[];this.endpoint=d.getDefault();this.templateId="";this.showingRoleDialog=null;this.showingSenderDialog=false;this.sender=null;this.forceRerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,o,r,i,s,a;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[RECIPIENTS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[RECIPIENTS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,m(this.endpoint,this.templateId,true)];case 2:l.sent();return[3,4];case 3:s=l.sent();console.log("[RECIPIENTS] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new g(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:this.sortTemplateRoles();this.renumberTemplateRoles();return[3,6];case 5:a=l.sent();console.log("[FIELDS] Error with preview session",a);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new g(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);a(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var n=+(t.target.getAttribute("posX")||0);var o=+(t.target.getAttribute("posY")||0);var r=t.dx+n;var i=t.dy+o;t.target.setAttribute("posX",r);t.target.setAttribute("posy",i);t.target.style.transform="translate(".concat(r+100,"px, ").concat(i-40,"px)")}.bind(this),end:function e(t){t.target.classList.remove("dragging");this.el.classList.remove("dragging");t.target.setAttribute("posX",0);t.target.setAttribute("posy",0);t.target.style.transform="translate(0px, 0px)"}.bind(this)}});a(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var n=this;var o,r;t.target.classList.remove("active");var i=t.relatedTarget.dataset.rolename;var s=+t.target.dataset.sequence;var a=+t.target.dataset.order;var c=(o=f.template)===null||o===void 0?void 0:o.roles.find((function(e){return e.name===i}));if(c){c.sequence=s;c.order=a;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all((r=f.template)===null||r===void 0?void 0:r.roles.map((function(e){return l(n.endpoint,n.templateId,e.name,{sequence:e.sequence,order:e.order})}))).then((function(){return console.log("[RECIPIENTS] Updated roles")})).catch((function(e){return console.log("[RECIPIENTS] Role updates failed",e)}))}}.bind(this),ondropactivate:function(e){e.target.classList.add("visible")},ondropdeactivate:function(e){e.target.classList.remove("visible")},ondragenter:function(e){e.target.classList.add("active")},ondragleave:function(e){e.target.classList.remove("active")}})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();(t=this.next)===null||t===void 0?void 0:t.emit()};e.prototype.sortTemplateRoles=function(){var e;(e=f.template)===null||e===void 0?void 0:e.roles.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.extractSequenceNumbers=function(){var e=this;var t;this.sequences=[];(t=f.template)===null||t===void 0?void 0:t.roles.forEach((function(t){if(!e.sequences.includes(t.sequence)){e.sequences.push(t.sequence)}}))};e.prototype.renumberTemplateRoles=function(){this.extractSequenceNumbers();var e=[];this.sequences.sort((function(e,t){return e-t}));this.sequences.forEach((function(t,n){var o;(o=f.template)===null||o===void 0?void 0:o.roles.filter((function(e){return e.sequence===t})).forEach((function(t,o){if(!e.includes(t.name)){t.sequence=n+1;t.order=o+1;e.push(t.name)}}))}));this.extractSequenceNumbers()};e.prototype.getNextRecipientName=function(){var e,t;var n="";var o=(e=f.template)===null||e===void 0?void 0:e.roles.length;do{o++;n="Recipient ".concat(o)}while(!n||((t=f.template)===null||t===void 0?void 0:t.roles.some((function(e){return e.name===n}))));return n};e.prototype.handleAddRole=function(e,t){var n=this;e.stopPropagation();var o=f.template.roles.filter((function(e){return e.sequence===t})).length+1;var r=this.getNextRecipientName();console.log("Will create",r,t,o);c(this.endpoint,this.templateId,{template_id:this.templateId,name:r,full_name:"",email:"",phone:"",sequence:t,order:o,type:"signer",delegator:false}).then((function(e){console.log("Created role",e);f.template.roles.push(e);n.renumberTemplateRoles();n.forceRerender++})).catch((function(e){console.log("Error creating role",e)}))};e.prototype.handleAddStep=function(e,t){var n=this;e.stopPropagation();var o=1;var r=this.getNextRecipientName();console.log("Will create",r,t,o);c(this.endpoint,this.templateId,{template_id:this.templateId,name:r,full_name:"",email:"",phone:"",sequence:t,order:o,type:"signer",delegator:false}).then((function(e){console.log("Created role",e);f.template.roles.push(e);n.renumberTemplateRoles();n.forceRerender++})).catch((function(e){console.log("Error creating role",e)}))};e.prototype.render=function(){var e=this;var t;if(!this.endpoint.session){return o(r,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(f.loading||!f.template){return o(r,null,o("verdocs-loader",null))}var n=(((t=f.template)===null||t===void 0?void 0:t.roles)||[]).map((function(e){return e.name}));console.log("s",this.sequences);return o(r,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":this.forceRerender},o("h5",null,"Roles"),o("div",{class:"participants"},o("div",{class:"left-line"}),o("div",{class:"row"},o("div",{class:"icon",innerHTML:y}),o("div",{class:"row-recipients"},o("div",{class:"sender"},o("span",{class:"label"},"Sender:")," ",b[f.template.sender]," ",o("div",{class:"settings-button",innerHTML:w,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),o("div",{class:"row add-sequence","data-sequence":0},o("div",{class:"icon",innerHTML:z}),o("div",{class:"row-recipients"},o("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(t){return o(i,null,o("div",{class:"row"},o("div",{class:"icon",innerHTML:q}),o("div",{class:"row-recipients"},o("div",{class:"dropzone","data-order":.5,"data-sequence":t}),f.template.roles.filter((function(e){return e.sequence===t})).map((function(r){return o(i,null,o("div",{class:"recipient",style:{backgroundColor:u(v(n,r.name))},"data-rolename":r.name},o("span",{class:"type-icon",innerHTML:r.type==="signer"?k:r.type==="cc"?L:E}),r.name," ",o("div",{class:"settings-button",innerHTML:w,onClick:function(){return e.showingRoleDialog=r.name},"aria-role":"button"})),o("div",{class:"dropzone","data-order":r.order+.5,"data-sequence":t}))})),o("button",{class:"add-role",innerHTML:z,onClick:function(n){return e.handleAddRole(n,t)}}))),e.sequences.length>0&&o("div",{class:"row add-sequence","data-sequence":t},o("div",{class:"row-recipients"},o("div",{class:"icon",innerHTML:z}),o("div",{class:"dropzone","data-sequence":t+1,"data-order":1},"Add Step"))))})),o("div",{class:"row","data-sequence":this.sequences.length+1},o("div",{class:"row-recipients"},o("div",{class:"icon",innerHTML:z}),o("button",{class:"add-step",innerHTML:z,onClick:function(t){return e.handleAddStep(t,e.sequences.length+1)}}))),this.sequences.length<1&&o(i,null,o("div",{class:"row"},o("div",{class:"icon",innerHTML:q}),o("div",{class:"row-recipients"},o("button",{class:"add-role",innerHTML:z,onClick:function(t){return e.handleAddRole(t,1)}})))),o("div",{class:"row"},o("div",{class:"icon",innerHTML:R}),o("div",{class:"row-recipients"},o("div",{class:"complete"},"Document Complete")))),n.length<1&&o("div",{class:"empty"},"You must add at least one Role before proceeding.",o("br",null)," Click the ",o("span",{innerHTML:z})," Add button above to get started."),o("div",{class:"buttons"},o("div",{class:"flex-fill"}),o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:n.length<1}))),this.showingRoleDialog&&o("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null;e.forceRerender++},onDelete:function(t){console.log("deleted",t.detail);e.renumberTemplateRoles();e.showingRoleDialog=null;e.forceRerender++}}),this.showingSenderDialog&&o("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());T.style=x}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,o){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function s(e){try{l(o.next(e))}catch(e){i(e)}}function a(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,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 l([e,t])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,r&&(i=s[0]&2?r["return"]:s[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;if(r=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-80fe8ac3.system.js","./p-8229e6df.system.js","./p-4f63fae0.system.js","./p-05eb4fed.system.js","./p-0513c8c3.system.js","./p-340316cb.system.js","./p-38d00c38.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js","./p-69912cbf.system.js","./p-e764098e.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,n,o,r,i,s,a,l,c,d,p,u,m,f,v,g;return{setters:[function(e){t=e.r;n=e.c;o=e.h;r=e.H;i=e.F;s=e.a},function(e){a=e.i},function(e){l=e.u;c=e.c},function(e){d=e.V;p=e.T},function(e){u=e.g},function(e){m=e.s},function(e){f=e.l},function(e){v=e.a},function(e){g=e.S},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var h;var x='verdocs-template-recipients{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-recipients>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-recipients>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-recipients>form .participants{position:relative}verdocs-template-recipients>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-recipients>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-recipients>form .row .row-recipients{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-direction:row;flex-direction:row}verdocs-template-recipients>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-recipients>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 5px 0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-recipients>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-recipients>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-recipients>form .row .settings-button{margin:4px 0 0 9px;cursor:pointer}verdocs-template-recipients>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:1px solid #aeb4bf}verdocs-template-recipients>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:4px 12px 0 0}verdocs-template-recipients>form .row .recipient.dragging{position:absolute}verdocs-template-recipients>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-recipients>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-recipients>form .row .dropzone svg{fill:#cccccc}verdocs-template-recipients>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-recipients>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-recipients>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-recipients>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-recipients>form input:focus{outline:none}verdocs-template-recipients .row.add-sequence{display:none}verdocs-template-recipients .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-recipients .add-role:hover{opacity:1}verdocs-template-recipients .add-role svg{width:32px;height:32px}verdocs-template-recipients .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-recipients .add-step:hover{opacity:1}verdocs-template-recipients .add-step svg{width:32px;height:32px}verdocs-template-recipients.dragging .add-role{display:none}verdocs-template-recipients.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-recipients.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-recipients.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-recipients.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-recipients .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-recipients .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-recipients .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-recipients ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-moz-placeholder{color:#aaaaaa}verdocs-template-recipients :-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-recipients ::placeholder{color:#aaaaaa}';var b=(h={},h[p.EVERYONE]="Everyone",h[p.EVERYONE_AS_CREATOR]="Everyone as Me",h[p.ORGANIZATION_MEMBER]="Organization member",h[p.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",h[p.CREATOR]="Me",h);var w='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';var y='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>';var q='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>';var R='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>';var z='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var k='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var E='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>';var L='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>';var T=e("verdocs_template_recipients",function(){function e(e){t(this,e);this.next=n(this,"next",7);this.cancel=n(this,"cancel",7);this.sdkError=n(this,"sdkError",7);this.templateUpdated=n(this,"templateUpdated",7);this.sequences=[];this.endpoint=d.getDefault();this.templateId="";this.showingRoleDialog=null;this.showingSenderDialog=false;this.sender=null;this.forceRerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,o,r,i,s,a;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[RECIPIENTS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[RECIPIENTS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,f(this.endpoint,this.templateId,true)];case 2:l.sent();return[3,4];case 3:s=l.sent();console.log("[RECIPIENTS] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new g(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:this.sortTemplateRoles();this.renumberTemplateRoles();return[3,6];case 5:a=l.sent();console.log("[FIELDS] Error with preview session",a);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new g(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){a.dynamicDrop(true);a(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var n=+(t.target.getAttribute("posX")||0);var o=+(t.target.getAttribute("posY")||0);var r=t.dx+n;var i=t.dy+o;t.target.setAttribute("posX",r);t.target.setAttribute("posy",i);t.target.style.transform="translate(".concat(r+100,"px, ").concat(i-40,"px)")}.bind(this),end:function e(t){t.target.classList.remove("dragging");this.el.classList.remove("dragging");t.target.setAttribute("posX",0);t.target.setAttribute("posy",0);t.target.style.transform="translate(0px, 0px)"}.bind(this)}});a(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var n=this;var o,r;t.target.classList.remove("active");var i=t.relatedTarget.dataset.rolename;var s=+t.target.dataset.sequence;var a=+t.target.dataset.order;var c=(o=m.template)===null||o===void 0?void 0:o.roles.find((function(e){return e.name===i}));if(c){c.sequence=s;c.order=a;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all((r=m.template)===null||r===void 0?void 0:r.roles.map((function(e){return l(n.endpoint,n.templateId,e.name,{sequence:e.sequence,order:e.order})}))).then((function(){return console.log("[RECIPIENTS] Updated roles")})).catch((function(e){return console.log("[RECIPIENTS] Role updates failed",e)}))}}.bind(this),ondropactivate:function(e){e.target.classList.add("visible")},ondropdeactivate:function(e){e.target.classList.remove("visible")},ondragenter:function(e){e.target.classList.add("active")},ondragleave:function(e){e.target.classList.remove("active")}})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();(t=this.next)===null||t===void 0?void 0:t.emit()};e.prototype.sortTemplateRoles=function(){var e;(e=m.template)===null||e===void 0?void 0:e.roles.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.extractSequenceNumbers=function(){var e=this;var t;this.sequences=[];(t=m.template)===null||t===void 0?void 0:t.roles.forEach((function(t){if(!e.sequences.includes(t.sequence)){e.sequences.push(t.sequence)}}))};e.prototype.renumberTemplateRoles=function(){this.extractSequenceNumbers();var e=[];this.sequences.sort((function(e,t){return e-t}));this.sequences.forEach((function(t,n){var o;(o=m.template)===null||o===void 0?void 0:o.roles.filter((function(e){return e.sequence===t})).forEach((function(t,o){if(!e.includes(t.name)){t.sequence=n+1;t.order=o+1;e.push(t.name)}}))}));this.extractSequenceNumbers()};e.prototype.getNextRecipientName=function(){var e,t;var n="";var o=(e=m.template)===null||e===void 0?void 0:e.roles.length;do{o++;n="Recipient ".concat(o)}while(!n||((t=m.template)===null||t===void 0?void 0:t.roles.some((function(e){return e.name===n}))));return n};e.prototype.handleAddRole=function(e,t){var n=this;e.stopPropagation();var o=m.template.roles.filter((function(e){return e.sequence===t})).length+1;var r=this.getNextRecipientName();console.log("Will create",r,t,o);c(this.endpoint,this.templateId,{template_id:this.templateId,name:r,full_name:"",email:"",phone:"",sequence:t,order:o,type:"signer",delegator:false}).then((function(e){console.log("Created role",e);m.template.roles.push(e);n.renumberTemplateRoles();n.forceRerender++})).catch((function(e){console.log("Error creating role",e)}))};e.prototype.handleAddStep=function(e,t){var n=this;e.stopPropagation();var o=1;var r=this.getNextRecipientName();console.log("Will create",r,t,o);c(this.endpoint,this.templateId,{template_id:this.templateId,name:r,full_name:"",email:"",phone:"",sequence:t,order:o,type:"signer",delegator:false}).then((function(e){console.log("Created role",e);m.template.roles.push(e);n.renumberTemplateRoles();n.forceRerender++})).catch((function(e){console.log("Error creating role",e)}))};e.prototype.render=function(){var e=this;var t;if(!this.endpoint.session){return o(r,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(m.loading||!m.template){return o(r,null,o("verdocs-loader",null))}var n=(((t=m.template)===null||t===void 0?void 0:t.roles)||[]).map((function(e){return e.name}));console.log("s",this.sequences);return o(r,null,o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":this.forceRerender},o("h5",null,"Roles"),o("div",{class:"participants"},o("div",{class:"left-line"}),o("div",{class:"row"},o("div",{class:"icon",innerHTML:y}),o("div",{class:"row-recipients"},o("div",{class:"sender"},o("span",{class:"label"},"Sender:")," ",b[m.template.sender]," ",o("div",{class:"settings-button",innerHTML:w,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),o("div",{class:"row add-sequence","data-sequence":0},o("div",{class:"icon",innerHTML:z}),o("div",{class:"row-recipients"},o("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(t){return o(i,null,o("div",{class:"row"},o("div",{class:"icon",innerHTML:q}),o("div",{class:"row-recipients"},o("div",{class:"dropzone","data-order":.5,"data-sequence":t}),m.template.roles.filter((function(e){return e.sequence===t})).map((function(r){return o(i,null,o("div",{class:"recipient",style:{backgroundColor:u(v(n,r.name))},"data-rolename":r.name},o("span",{class:"type-icon",innerHTML:r.type==="signer"?k:r.type==="cc"?L:E}),r.name," ",o("div",{class:"settings-button",innerHTML:w,onClick:function(){return e.showingRoleDialog=r.name},"aria-role":"button"})),o("div",{class:"dropzone","data-order":r.order+.5,"data-sequence":t}))})),o("button",{class:"add-role",innerHTML:z,onClick:function(n){return e.handleAddRole(n,t)}}))),e.sequences.length>0&&o("div",{class:"row add-sequence","data-sequence":t},o("div",{class:"row-recipients"},o("div",{class:"icon",innerHTML:z}),o("div",{class:"dropzone","data-sequence":t+1,"data-order":1},"Add Step"))))})),o("div",{class:"row","data-sequence":this.sequences.length+1},o("div",{class:"row-recipients"},o("div",{class:"icon",innerHTML:z}),o("button",{class:"add-step",innerHTML:z,onClick:function(t){return e.handleAddStep(t,e.sequences.length+1)}}))),this.sequences.length<1&&o(i,null,o("div",{class:"row"},o("div",{class:"icon",innerHTML:q}),o("div",{class:"row-recipients"},o("button",{class:"add-role",innerHTML:z,onClick:function(t){return e.handleAddRole(t,1)}})))),o("div",{class:"row"},o("div",{class:"icon",innerHTML:R}),o("div",{class:"row-recipients"},o("div",{class:"complete"},"Document Complete")))),n.length<1&&o("div",{class:"empty"},"You must add at least one Role before proceeding.",o("br",null)," Click the ",o("span",{innerHTML:z})," Add button above to get started."),o("div",{class:"buttons"},o("div",{class:"flex-fill"}),o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:n.length<1}))),this.showingRoleDialog&&o("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null;e.forceRerender++},onDelete:function(t){console.log("deleted",t.detail);e.renumberTemplateRoles();e.showingRoleDialog=null;e.forceRerender++}}),this.showingSenderDialog&&o("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());T.style=x}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function r(e){try{c(n["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):s(e.value).then(o,r)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(a=o[0]&2?s["return"]:o[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,o[1])).done)return a;if(s=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-97329951.system.js","./p-4f63fae0.system.js","./p-6f53c098.system.js","./p-187b20b7.system.js","./p-51a3ea62.system.js","./p-af2c2f79.system.js","./p-e764098e.system.js","./p-0f6da8c7.system.js","./p-69912cbf.system.js"],(function(e){"use strict";var t,i,n,s,a,o,r,c,l;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(e){a=e.V},function(e){o=e.g;r=e.s},function(e){c=e.S},function(e){l=e.f},function(){},function(){},function(){},function(){}],execute:function(){var d='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';var p='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var h='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var u={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var f=e("verdocs_envelope_sidebar",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.endpoint=a.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n;return __generator(this,(function(s){switch(s.label){case 0:if(!this.envelopeId){console.error("[SIDEBAR] Missing required envelopeId");return[2]}s.label=1;case 1:s.trys.push([1,3,,4]);return[4,o(this.endpoint,this.envelopeId)];case 2:s.sent();return[3,4];case 3:n=s.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(i=n.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[2]}}))}))};e.prototype.setTab=function(e){this.panelOpen=e!==this.activeTab||!this.panelOpen;this.activeTab=e};e.prototype.canResendRecipient=function(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.canModifyRecipient=function(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.handleRecipientAction=function(e,t){var i;console.log("recipient action",t,e);(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:r.envelope,event:t})};e.prototype.prepareHistoryEntries=function(){var e=[];var t=r.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(r.envelope.created_at)});if(r.envelope.status==="complete"){e.push({icon:"pencil",message:"Envelope completed.",date:new Date(r.envelope.updated_at)})}var i=t.some((function(e){return e.event==="owner:canceled"}));if(r.envelope.status==="canceled"&&!i){e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(r.envelope.canceled_at)})}t.forEach((function(t){var i=r.envelope.recipients.find((function(e){return e.role_name===t.role_name}));var n=(i===null||i===void 0?void 0:i.full_name)||"";switch(t.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:"Signed by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:"Declined by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:opened":switch(t.event_detail){case"email":case"mail":e.push({icon:"visibility",message:"Opened by ".concat(n,", via email."),date:new Date(t.created_at)});break;case"sms":e.push({icon:"visibility",message:"Opened by ".concat(n,", via SMS."),date:new Date(t.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:"Opened by ".concat(n,", via In-person link."),date:new Date(t.created_at)});break;case"in_app":e.push({icon:"visibility",message:"Opened by ".concat(n,", via dashboard."),date:new Date(t.created_at)});break;default:e.push({icon:"visibility",message:"Opened by ".concat(n,"."),date:new Date(t.created_at)})}break;case"recipient:submitted":switch(t.event_detail){case"approver":e.push({icon:"check_circle",message:"Approved by ".concat(n,"."),date:new Date(t.created_at)});break;default:e.push({icon:"send",message:"Submitted by ".concat(n,"."),date:new Date(t.created_at)});break}break;case"recipient:prepared":e.push({icon:"send",message:"Prepared by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:claimed":if(t.event_detail==="guest"){e.push({icon:"account_circle",message:"".concat(n," claimed the Verdoc as a guest."),date:new Date(t.created_at)})}else if(t.event_detail==="profile"){e.push({icon:"verified_user",message:"".concat(n," claimed the Verdoc as a verified user."),date:new Date(t.created_at)})}break;case"recipient:agreed":e.push({icon:"done",message:"".concat(n," agreed to use electronic records and signatures."),date:new Date(t.created_at)});break;case"recipient:invited":if(t.event_detail==="sms"){e.push({icon:"textsms",message:"".concat(n," has been invited via SMS."),date:new Date(t.created_at)})}else{e.push({icon:"mail",message:"".concat(n," has been invited via email."),date:new Date(t.created_at)})}break;case"invitation:resent":e.push({icon:"mail",message:"Invitation was resent to ".concat(n," ").concat(t.event_detail==="reminder"?" by reminder":"","."),date:new Date(t.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:"A copy has been sent to ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:t.event_detail,date:new Date(t.created_at)});break;case"recipient:updated_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(t.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(t.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(t.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:"Owner accessed the In-person link for ".concat(i,"."),date:new Date(t.created_at)});break;default:console.log("unknown",t);break}}));e.sort((function(e,t){return t.date.getTime()-e.date.getTime()}));return e};e.prototype.render=function(){var e=this;var t,i,a;if(!r.envelope){return n(s,null)}var o=this.endpoint.getSession();var c=o.profile_id===r.envelope.profile_id;var d=this.prepareHistoryEntries();return n(s,{class:this.panelOpen?"open":"","data-r":r.updateCount},n("div",{class:"buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:p}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:v}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:h})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},r.envelope.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},l(new Date(r.envelope.created_at),"PP pp")),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},l(new Date(r.envelope.updated_at),"PP pp")),n("div",{class:"label"},"Status"),n("div",{class:"value"},r.envelope.status),n("div",{class:"label"},"Verdoc Owner UUID"),n("div",{class:"value"},r.envelope.profile_id),n("div",{class:"label"},"Verdoc Owner Name"),n("div",{class:"value"},(t=r.envelope.profile)===null||t===void 0?void 0:t.first_name," ",(i=r.envelope.profile)===null||i===void 0?void 0:i.last_name),n("div",{class:"label"},"Verdoc Owner Email"),n("div",{class:"value"},(a=r.envelope.profile)===null||a===void 0?void 0:a.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),r.envelope.recipients.map((function(t,i){var s;return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},i+1),n("div",{class:"recipient-type"},t.type),n("div",{class:(s={"recipient-status":true},s[t.status]=true,s)},t.status),c&&n("verdocs-dropdown",{onOptionSelected:function(i){return e.handleRecipientAction(t,i.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!e.canResendRecipient(t)},{id:"modify",label:"Modify Recipient",disabled:!e.canModifyRecipient(t)},{id:"inperson",label:"Get In-Person Link",disabled:!e.canModifyRecipient(t)||!["invited","opened"].includes(t.status)}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},t.full_name),n("div",{class:"recipient-name"},t.email),n("div",{class:"recipient-name"},t.phone)))}))),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),d.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:u[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},l(e.date,"PP pp"))))}))))};return e}());f.style=d}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function r(e){try{c(n["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):s(e.value).then(o,r)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(t){return c([e,t])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(a=o[0]&2?s["return"]:o[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,o[1])).done)return a;if(s=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;s=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];s=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-4f63fae0.system.js","./p-f8eddf94.system.js","./p-187b20b7.system.js","./p-51a3ea62.system.js","./p-af2c2f79.system.js","./p-e764098e.system.js","./p-71c7e1ba.system.js","./p-69912cbf.system.js"],(function(e){"use strict";var t,i,n,s,a,o,r,c,l;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H},function(e){a=e.V},function(e){o=e.g;r=e.s},function(e){c=e.S},function(e){l=e.f},function(){},function(){},function(){},function(){}],execute:function(){var d='verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';var p='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var h='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var u={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var f=e("verdocs_envelope_sidebar",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.endpoint=a.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n;return __generator(this,(function(s){switch(s.label){case 0:if(!this.envelopeId){console.error("[SIDEBAR] Missing required envelopeId");return[2]}s.label=1;case 1:s.trys.push([1,3,,4]);return[4,o(this.endpoint,this.envelopeId)];case 2:s.sent();return[3,4];case 3:n=s.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(n.message,(t=n.response)===null||t===void 0?void 0:t.status,(i=n.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[2]}}))}))};e.prototype.setTab=function(e){this.panelOpen=e!==this.activeTab||!this.panelOpen;this.activeTab=e};e.prototype.canResendRecipient=function(e){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.canModifyRecipient=function(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(r.envelope.status)};e.prototype.handleRecipientAction=function(e,t){var i;console.log("recipient action",t,e);(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:r.envelope,event:t})};e.prototype.prepareHistoryEntries=function(){var e=[];var t=r.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(r.envelope.created_at)});if(r.envelope.status==="complete"){e.push({icon:"pencil",message:"Envelope completed.",date:new Date(r.envelope.updated_at)})}var i=t.some((function(e){return e.event==="owner:canceled"}));if(r.envelope.status==="canceled"&&!i){e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(r.envelope.canceled_at)})}t.forEach((function(t){var i=r.envelope.recipients.find((function(e){return e.role_name===t.role_name}));var n=(i===null||i===void 0?void 0:i.full_name)||"";switch(t.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:"Signed by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:"Declined by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:opened":switch(t.event_detail){case"email":case"mail":e.push({icon:"visibility",message:"Opened by ".concat(n,", via email."),date:new Date(t.created_at)});break;case"sms":e.push({icon:"visibility",message:"Opened by ".concat(n,", via SMS."),date:new Date(t.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:"Opened by ".concat(n,", via In-person link."),date:new Date(t.created_at)});break;case"in_app":e.push({icon:"visibility",message:"Opened by ".concat(n,", via dashboard."),date:new Date(t.created_at)});break;default:e.push({icon:"visibility",message:"Opened by ".concat(n,"."),date:new Date(t.created_at)})}break;case"recipient:submitted":switch(t.event_detail){case"approver":e.push({icon:"check_circle",message:"Approved by ".concat(n,"."),date:new Date(t.created_at)});break;default:e.push({icon:"send",message:"Submitted by ".concat(n,"."),date:new Date(t.created_at)});break}break;case"recipient:prepared":e.push({icon:"send",message:"Prepared by ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:claimed":if(t.event_detail==="guest"){e.push({icon:"account_circle",message:"".concat(n," claimed the Verdoc as a guest."),date:new Date(t.created_at)})}else if(t.event_detail==="profile"){e.push({icon:"verified_user",message:"".concat(n," claimed the Verdoc as a verified user."),date:new Date(t.created_at)})}break;case"recipient:agreed":e.push({icon:"done",message:"".concat(n," agreed to use electronic records and signatures."),date:new Date(t.created_at)});break;case"recipient:invited":if(t.event_detail==="sms"){e.push({icon:"textsms",message:"".concat(n," has been invited via SMS."),date:new Date(t.created_at)})}else{e.push({icon:"mail",message:"".concat(n," has been invited via email."),date:new Date(t.created_at)})}break;case"invitation:resent":e.push({icon:"mail",message:"Invitation was resent to ".concat(n," ").concat(t.event_detail==="reminder"?" by reminder":"","."),date:new Date(t.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:"A copy has been sent to ".concat(n,"."),date:new Date(t.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:t.event_detail,date:new Date(t.created_at)});break;case"recipient:updated_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:t.event_detail,date:new Date(t.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(t.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(t.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(t.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:"Owner accessed the In-person link for ".concat(i,"."),date:new Date(t.created_at)});break;default:console.log("unknown",t);break}}));e.sort((function(e,t){return t.date.getTime()-e.date.getTime()}));return e};e.prototype.render=function(){var e=this;var t,i,a;if(!r.envelope){return n(s,null)}var o=this.endpoint.getSession();var c=o.profile_id===r.envelope.profile_id;var d=this.prepareHistoryEntries();return n(s,{class:this.panelOpen?"open":"","data-r":r.updateCount},n("div",{class:"buttons"},n("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:p}),n("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:v}),n("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:h})),this.activeTab===1&&n("div",{class:"content"},n("div",{class:"title"},"Details"),n("div",{class:"label"},"Envelope ID"),n("div",{class:"value"},r.envelope.id),n("div",{class:"label"},"Date Created"),n("div",{class:"value"},l(new Date(r.envelope.created_at),"PP pp")),n("div",{class:"label"},"Last Modified"),n("div",{class:"value"},l(new Date(r.envelope.updated_at),"PP pp")),n("div",{class:"label"},"Status"),n("div",{class:"value"},r.envelope.status),n("div",{class:"label"},"Verdoc Owner UUID"),n("div",{class:"value"},r.envelope.profile_id),n("div",{class:"label"},"Verdoc Owner Name"),n("div",{class:"value"},(t=r.envelope.profile)===null||t===void 0?void 0:t.first_name," ",(i=r.envelope.profile)===null||i===void 0?void 0:i.last_name),n("div",{class:"label"},"Verdoc Owner Email"),n("div",{class:"value"},(a=r.envelope.profile)===null||a===void 0?void 0:a.email)),this.activeTab===2&&n("div",{class:"content"},n("div",{class:"title"},"Recipients"),r.envelope.recipients.map((function(t,i){var s;return n("div",{class:"recipient-detail"},n("div",{class:"recipient-header"},n("div",{class:"recipient-number"},i+1),n("div",{class:"recipient-type"},t.type),n("div",{class:(s={"recipient-status":true},s[t.status]=true,s)},t.status),c&&n("verdocs-dropdown",{onOptionSelected:function(i){return e.handleRecipientAction(t,i.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!e.canResendRecipient(t)},{id:"modify",label:"Modify Recipient",disabled:!e.canModifyRecipient(t)},{id:"inperson",label:"Get In-Person Link",disabled:!e.canModifyRecipient(t)||!["invited","opened"].includes(t.status)}]})),n("dic",{class:"recipient-content"},n("div",{class:"recipient-name"},t.full_name),n("div",{class:"recipient-name"},t.email),n("div",{class:"recipient-name"},t.phone)))}))),this.activeTab===3&&n("div",{class:"content"},n("div",{class:"title"},"History"),d.map((function(e){return n("div",{class:"history-entry"},n("div",{class:"activity-icon",innerHTML:u[e.icon]||e.icon}),n("div",{class:"activity-details"},n("div",{class:"activity-text"},e.message),n("div",{class:"activity-date"},l(e.date,"PP pp"))))}))))};return e}());f.style=d}}}));
@@ -1 +1 @@
1
- System.register(["./p-97329951.system.js"],(function(t){"use strict";var e,r,n;return{setters:[function(t){e=t.r;r=t.h;n=t.H}],execute:function(){var o='verdocs-template-tags{font-family:"Barlow", sans-serif}verdocs-template-tags span{margin:0 4px;height:28px;font-size:12px;font-weight:600;padding:5px 12px 7px;border-radius:5px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:uppercase;color:#33364b;border:1px solid #707ae5;background-color:#f5f5fa}';var s=t("verdocs_template_tags",function(){function t(t){e(this,t);this.tags=undefined}t.prototype.render=function(){var t;return r(n,null,(t=this.tags)===null||t===void 0?void 0:t.map((function(t){return r("span",null,t)})))};return t}());s.style=o}}}));
1
+ System.register(["./p-9422b807.system.js"],(function(t){"use strict";var e,r,n;return{setters:[function(t){e=t.r;r=t.h;n=t.H}],execute:function(){var o='verdocs-template-tags{font-family:"Barlow", sans-serif}verdocs-template-tags span{margin:0 4px;height:28px;font-size:12px;font-weight:600;padding:5px 12px 7px;border-radius:5px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:uppercase;color:#33364b;border:1px solid #707ae5;background-color:#f5f5fa}';var s=t("verdocs_template_tags",function(){function t(t){e(this,t);this.tags=undefined}t.prototype.render=function(){var t;return r(n,null,(t=this.tags)===null||t===void 0?void 0:t.map((function(t){return r("span",null,t)})))};return t}());s.style=o}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function s(e){try{l(o.next(e))}catch(e){n(e)}}function a(e){try{l(o["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):r(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,r,n,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 l([e,t])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,r&&(n=s[0]&2?r["return"]:s[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;if(r=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){i.label=s[1];break}if(s[0]===6&&i.label<n[1]){i.label=n[1];n=s;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(s);break}if(n[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];r=0}finally{o=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-97329951.system.js","./p-69912cbf.system.js","./p-4f63fae0.system.js","./p-187b20b7.system.js","./p-f9f0d3b4.system.js","./p-af2c2f79.system.js","./p-0f6da8c7.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,o,r,n,s,a,l;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H},function(e){n=e.g},function(e){s=e.V},function(e){a=e.S},function(e){l=e.s},function(){},function(){},function(){}],execute:function(){var p='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties 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-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties 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-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .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-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';var c=e("verdocs_template_properties",function(){function e(e){t(this,e);this.cancel=i(this,"cancel",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=s.getDefault();this.templateId="";this.template=null;this.name="";this.visibility="";this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,r;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();console.log("[PROPERTIES] Loading template ".concat(this.templateId));return[4,n(this.endpoint,this.templateId)];case 1:o=s.sent();if(!o){console.log("[PREVIEW] Unable to load template");return[2]}console.log("[PROPERTIES] Got template",o);this.template=o;l.template=o;this.name=o.name;this.sendReminders=o.reminder_id!==null;return[3,3];case 2:r=s.sent();console.log("[PROPERTIES] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();(t=this.next)===null||t===void 0?void 0:t.emit({name:this.name,firstReminderDays:+this.firstReminderDays,reminderDays:+this.reminderDays,sendReminders:this.sendReminders})};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return o(r,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("h5",null,"Template Name"),o("fieldset",null,o("verdocs-text-input",{value:this.name,autocomplete:"off",onInput:function(t){return e.name=t.target.value}})),o("h5",null,"Reminders"),o("fieldset",null,o("div",{class:"input-row"},o("label",null,"Send Automatic Reminders"),o("verdocs-checkbox",{name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){return e.sendReminders=t.target.checked}})),o("div",{class:"input-row"},o("label",null,"Days Before First Reminder"),o("verdocs-text-input",{value:this.firstReminderDays,onInput:function(t){return e.firstReminderDays=t.target.value}})),o("div",{class:"input-row"},o("label",null,"Days Between Reminders"),o("verdocs-text-input",{value:this.reminderDays,onInput:function(t){return e.reminderDays=t.target.value}}))),o("h5",null,"Template Visibility"),o("fieldset",null,o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:true,value:"private",onChange:function(){return e.visibility="private"}}),o("label",{htmlFor:"verdocs-radio-button-visibility-private"},o("div",{class:"title"},"Private"),o("div",{class:"description"},"Only you can share and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:true,value:"shared",onChange:function(){return e.visibility="shared"}}),o("label",{htmlFor:"verdocs-radio-button-visibility-shared"},o("div",{class:"title"},"Shared to your organization"),o("div",{class:"description"},"Give access to your organization to share and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:true,value:"shared_public",onChange:function(){return e.visibility="shared_public"}}),o("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},o("div",{class:"title"},"Shared to your organization and Public"),o("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:this.visibility==="public",value:"public",onChange:function(){return e.visibility="public"}}),o("label",{htmlFor:"verdocs-radio-button-visibility-public"},o("div",{class:"title"},"Public"),o("div",{class:"description"},"Anyone on the Web can find and use this template")))),o("div",{class:"buttons"},o("div",{class:"flex-fill"}),o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}());c.style=p}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function s(e){try{l(o.next(e))}catch(e){n(e)}}function a(e){try{l(o["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):r(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,r,n,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 l([e,t])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(i)try{if(o=1,r&&(n=s[0]&2?r["return"]:s[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;if(r=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){i.label=s[1];break}if(s[0]===6&&i.label<n[1]){i.label=n[1];n=s;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(s);break}if(n[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];r=0}finally{o=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-69912cbf.system.js","./p-4f63fae0.system.js","./p-187b20b7.system.js","./p-0513c8c3.system.js","./p-af2c2f79.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,o,r,n,s,a,l;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H},function(e){n=e.g},function(e){s=e.V},function(e){a=e.S},function(e){l=e.s},function(){},function(){},function(){}],execute:function(){var p='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties 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-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties 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-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .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-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';var c=e("verdocs_template_properties",function(){function e(e){t(this,e);this.cancel=i(this,"cancel",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=s.getDefault();this.templateId="";this.template=null;this.name="";this.visibility="";this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o,r;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();console.log("[PROPERTIES] Loading template ".concat(this.templateId));return[4,n(this.endpoint,this.templateId)];case 1:o=s.sent();if(!o){console.log("[PREVIEW] Unable to load template");return[2]}console.log("[PROPERTIES] Got template",o);this.template=o;l.template=o;this.name=o.name;this.sendReminders=o.reminder_id!==null;return[3,3];case 2:r=s.sent();console.log("[PROPERTIES] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();(t=this.next)===null||t===void 0?void 0:t.emit({name:this.name,firstReminderDays:+this.firstReminderDays,reminderDays:+this.reminderDays,sendReminders:this.sendReminders})};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return o(r,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("h5",null,"Template Name"),o("fieldset",null,o("verdocs-text-input",{value:this.name,autocomplete:"off",onInput:function(t){return e.name=t.target.value}})),o("h5",null,"Reminders"),o("fieldset",null,o("div",{class:"input-row"},o("label",null,"Send Automatic Reminders"),o("verdocs-checkbox",{name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){return e.sendReminders=t.target.checked}})),o("div",{class:"input-row"},o("label",null,"Days Before First Reminder"),o("verdocs-text-input",{value:this.firstReminderDays,onInput:function(t){return e.firstReminderDays=t.target.value}})),o("div",{class:"input-row"},o("label",null,"Days Between Reminders"),o("verdocs-text-input",{value:this.reminderDays,onInput:function(t){return e.reminderDays=t.target.value}}))),o("h5",null,"Template Visibility"),o("fieldset",null,o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:true,value:"private",onChange:function(){return e.visibility="private"}}),o("label",{htmlFor:"verdocs-radio-button-visibility-private"},o("div",{class:"title"},"Private"),o("div",{class:"description"},"Only you can share and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:true,value:"shared",onChange:function(){return e.visibility="shared"}}),o("label",{htmlFor:"verdocs-radio-button-visibility-shared"},o("div",{class:"title"},"Shared to your organization"),o("div",{class:"description"},"Give access to your organization to share and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:true,value:"shared_public",onChange:function(){return e.visibility="shared_public"}}),o("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},o("div",{class:"title"},"Shared to your organization and Public"),o("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:this.visibility==="public",value:"public",onChange:function(){return e.visibility="public"}}),o("label",{htmlFor:"verdocs-radio-button-visibility-public"},o("div",{class:"title"},"Public"),o("div",{class:"description"},"Anyone on the Web can find and use this template")))),o("div",{class:"buttons"},o("div",{class:"flex-fill"}),o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}());c.style=p}}}));
@@ -1 +1 @@
1
- import{r as i,c as t,h as s,H as o,a as e}from"./p-ff1278ed.js";import{t as r}from"./p-25fa36d7.js";import{c as d}from"./p-ec26fc38.js";import"./p-388b771c.js";import"./p-21603661.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const n=class{constructor(s){i(this,s),this.pageRendered=t(this,"pageRendered",7),this.pageImageUri="",this.pageNumber=1,this.virtualWidth=612,this.virtualHeight=792,this.layers=[{name:"page",type:"canvas"}],this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`,this.renderedWidth=this.virtualWidth,this.renderedHeight=this.virtualHeight,this.naturalWidth=this.virtualWidth,this.naturalHeight=this.virtualHeight,this.aspectRatio=this.virtualWidth/this.virtualHeight,this.skipFirstNotification=!0}componentDidLoad(){this.resizeObserver=new ResizeObserver(r((i=>{for(const t of i){const i=t.contentRect.width;this.renderedWidth=i,this.renderedHeight=this.virtualHeight*(i/this.virtualWidth)}this.notifyRenderedSize()}),100)),this.resizeObserver.observe(this.container)}disconnectedCallback(){var i;null===(i=this.resizeObserver)||void 0===i||i.disconnect()}notifyRenderedSize(){this.skipFirstNotification?this.skipFirstNotification=!1:this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const i=`${this.renderedHeight}px`;return s(o,{id:`${this.containerId}`,style:{height:i}},this.layers.map((t=>"div"===t.type?s("div",{class:"verdocs-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:i}}):s("img",{class:"verdocs-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageImageUri,alt:`Page ${this.pageNumber}`,"aria-hidden":!0,onLoad:i=>{this.naturalWidth=i.target.naturalWidth,this.naturalHeight=i.target.naturalHeight,this.aspectRatio=this.naturalWidth/this.naturalHeight,this.virtualHeight=this.virtualWidth/this.aspectRatio}}))))}get container(){return e(this)}};n.style="verdocs-document-page{width:100%;position:relative}verdocs-document-page .verdocs-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-document-page .verdocs-document-page-layer.img{width:100%}";const a=class{constructor(s){i(this,s),this.optionSelected=t(this,"optionSelected",7),this.clickListenerSymbol=new AbortController,this.options=[],this.open=void 0}componentDidLoad(){this.popper=d(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,6]}}]}),window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})}disconnectedCallback(){this.clickListenerSymbol.abort()}clickListener(i){i.target!=this.el&&!this.el.contains(i.target)&&this.hide()}handleSelectOption(i,t){i.stopPropagation(),this.optionSelected.emit(t),this.hide()}showDropdown(){var i,t;this.open=!0,this.dropdownMenu.setAttribute("data-show",""),this.dropdownMenu.removeAttribute("aria-hidden"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!0}]}))).catch((()=>{})),null===(t=this.popper)||void 0===t||t.update().catch((()=>{}))}handleHideDropdown(i){var t,s;"button"===(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.localName)&&"arrow"===(null===(s=null==i?void 0:i.target)||void 0===s?void 0:s.className)||this.hide()}toggleDropdown(i){i.stopPropagation(),this.open?this.hide():this.showDropdown()}hide(){var i;this.open=!1,this.dropdownMenu.removeAttribute("data-show"),this.dropdownMenu.setAttribute("aria-hidden","true"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!1}]}))).catch((()=>{}))}render(){var i;return s(o,{class:{open:!!this.open}},s("button",{class:"arrow",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#50BE80"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>',"aria-label":"Open Menu",onClick:i=>this.toggleDropdown(i),onBlur:i=>this.handleHideDropdown(i),ref:i=>this.dropdownButton=i}),s("div",{class:"items","aria-hidden":!this.open,ref:i=>this.dropdownMenu=i},null===(i=this.options)||void 0===i?void 0:i.map((i=>i.label?s("button",{onClick:t=>this.handleSelectOption(t,i),class:"option",disabled:i.disabled},i.label):s("div",{class:"separator"})))))}get el(){return e(this)}};a.style='verdocs-dropdown{font-family:"Barlow", sans-serif;display:block}verdocs-dropdown .arrow{width:32px;height:26px;background:#fff;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #cccccc;-ms-flex-pack:center;justify-content:center}verdocs-dropdown .arrow svg{fill:#55bc81;-webkit-transition:0.3s;transition:0.3s}verdocs-dropdown .items{width:200px;display:none;z-index:10000;border-radius:5px;background:#33354c;border:1px solid #654dcb}verdocs-dropdown .items[data-show]{display:block}verdocs-dropdown .option{width:100%;color:#fff;border:none;display:block;text-align:left;background:none;padding:10px 20px}verdocs-dropdown .option:hover{cursor:pointer;background:#55bc81}verdocs-dropdown .option[disabled]{color:#aaaaaa}verdocs-dropdown .option[disabled]:hover{color:#aaaaaa;cursor:inherit;background:transparent}verdocs-dropdown .separator{border-top:1px solid #ffffff5f;height:1px;padding-top:5px;margin-top:5px}verdocs-dropdown.open .items{display:block}verdocs-dropdown.open .arrow{background:#4c56cb;border:1px solid #707ae5}verdocs-dropdown.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1);fill:#fff}';export{n as verdocs_document_page,a as verdocs_dropdown}
1
+ import{r as i,c as t,h as s,H as o,a as e}from"./p-7239d28d.js";import{t as r}from"./p-25fa36d7.js";import{c as d}from"./p-ec26fc38.js";import"./p-388b771c.js";import"./p-21603661.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const n=class{constructor(s){i(this,s),this.pageRendered=t(this,"pageRendered",7),this.pageImageUri="",this.pageNumber=1,this.virtualWidth=612,this.virtualHeight=792,this.layers=[{name:"page",type:"canvas"}],this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`,this.renderedWidth=this.virtualWidth,this.renderedHeight=this.virtualHeight,this.naturalWidth=this.virtualWidth,this.naturalHeight=this.virtualHeight,this.aspectRatio=this.virtualWidth/this.virtualHeight,this.skipFirstNotification=!0}componentDidLoad(){this.resizeObserver=new ResizeObserver(r((i=>{for(const t of i){const i=t.contentRect.width;this.renderedWidth=i,this.renderedHeight=this.virtualHeight*(i/this.virtualWidth)}this.notifyRenderedSize()}),100)),this.resizeObserver.observe(this.container)}disconnectedCallback(){var i;null===(i=this.resizeObserver)||void 0===i||i.disconnect()}notifyRenderedSize(){this.skipFirstNotification?this.skipFirstNotification=!1:this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const i=`${this.renderedHeight}px`;return s(o,{id:`${this.containerId}`,style:{height:i}},this.layers.map((t=>"div"===t.type?s("div",{class:"verdocs-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:i}}):s("img",{class:"verdocs-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageImageUri,alt:`Page ${this.pageNumber}`,"aria-hidden":!0,onLoad:i=>{this.naturalWidth=i.target.naturalWidth,this.naturalHeight=i.target.naturalHeight,this.aspectRatio=this.naturalWidth/this.naturalHeight,this.virtualHeight=this.virtualWidth/this.aspectRatio}}))))}get container(){return e(this)}};n.style="verdocs-document-page{width:100%;position:relative}verdocs-document-page .verdocs-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-document-page .verdocs-document-page-layer.img{width:100%}";const a=class{constructor(s){i(this,s),this.optionSelected=t(this,"optionSelected",7),this.clickListenerSymbol=new AbortController,this.options=[],this.open=void 0}componentDidLoad(){this.popper=d(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,6]}}]}),window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})}disconnectedCallback(){this.clickListenerSymbol.abort()}clickListener(i){i.target!=this.el&&!this.el.contains(i.target)&&this.hide()}handleSelectOption(i,t){i.stopPropagation(),this.optionSelected.emit(t),this.hide()}showDropdown(){var i,t;this.open=!0,this.dropdownMenu.setAttribute("data-show",""),this.dropdownMenu.removeAttribute("aria-hidden"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!0}]}))).catch((()=>{})),null===(t=this.popper)||void 0===t||t.update().catch((()=>{}))}handleHideDropdown(i){var t,s;"button"===(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.localName)&&"arrow"===(null===(s=null==i?void 0:i.target)||void 0===s?void 0:s.className)||this.hide()}toggleDropdown(i){i.stopPropagation(),this.open?this.hide():this.showDropdown()}hide(){var i;this.open=!1,this.dropdownMenu.removeAttribute("data-show"),this.dropdownMenu.setAttribute("aria-hidden","true"),null===(i=this.popper)||void 0===i||i.setOptions((i=>({...i,modifiers:[...i.modifiers,{name:"eventListeners",enabled:!1}]}))).catch((()=>{}))}render(){var i;return s(o,{class:{open:!!this.open}},s("button",{class:"arrow",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#50BE80"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>',"aria-label":"Open Menu",onClick:i=>this.toggleDropdown(i),onBlur:i=>this.handleHideDropdown(i),ref:i=>this.dropdownButton=i}),s("div",{class:"items","aria-hidden":!this.open,ref:i=>this.dropdownMenu=i},null===(i=this.options)||void 0===i?void 0:i.map((i=>i.label?s("button",{onClick:t=>this.handleSelectOption(t,i),class:"option",disabled:i.disabled},i.label):s("div",{class:"separator"})))))}get el(){return e(this)}};a.style='verdocs-dropdown{font-family:"Barlow", sans-serif;display:block}verdocs-dropdown .arrow{width:32px;height:26px;background:#fff;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #cccccc;-ms-flex-pack:center;justify-content:center}verdocs-dropdown .arrow svg{fill:#55bc81;-webkit-transition:0.3s;transition:0.3s}verdocs-dropdown .items{width:200px;display:none;z-index:10000;border-radius:5px;background:#33354c;border:1px solid #654dcb}verdocs-dropdown .items[data-show]{display:block}verdocs-dropdown .option{width:100%;color:#fff;border:none;display:block;text-align:left;background:none;padding:10px 20px}verdocs-dropdown .option:hover{cursor:pointer;background:#55bc81}verdocs-dropdown .option[disabled]{color:#aaaaaa}verdocs-dropdown .option[disabled]:hover{color:#aaaaaa;cursor:inherit;background:transparent}verdocs-dropdown .separator{border-top:1px solid #ffffff5f;height:1px;padding-top:5px;margin-top:5px}verdocs-dropdown.open .items{display:block}verdocs-dropdown.open .arrow{background:#4c56cb;border:1px solid #707ae5}verdocs-dropdown.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1);fill:#fff}';export{n as verdocs_document_page,a as verdocs_dropdown}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,s){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function l(e){try{a(s["throw"](e))}catch(e){i(e)}}function a(e){e.done?n(e.value):o(e.value).then(r,l)}a((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,o,i,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,o&&(i=r[0]&2?o["return"]:r[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;if(o=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){n.label=r[1];break}if(r[0]===6&&n.label<i[1]){n.label=i[1];i=r;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(r);break}if(i[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{s=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-97329951.system.js","./p-4f63fae0.system.js","./p-7e58e898.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-69912cbf.system.js","./p-f9f0d3b4.system.js","./p-0f6da8c7.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,n,s,o,i,r,l;return{setters:[function(e){t=e.r;n=e.c;s=e.h;o=e.H},function(e){i=e.V},function(e){r=e.l},function(e){l=e.S},function(){},function(){},function(){},function(){},function(){}],execute:function(){var a='verdocs-build{display:-ms-flexbox;display:flex;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}';var c=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.fields=[];this.endpoint=i.getDefault();this.templateId=null;this.step="create";this.pdfUrl=null;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s;return __generator(this,(function(o){switch(o.label){case 0:this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[BUILD] No template ID specified, showing upload option");this.step="create";return[2]}o.label=1;case 1:o.trys.push([1,3,,4]);console.log("[BUILD] Loading template ".concat(this.templateId));return[4,r(this.endpoint,this.templateId)];case 2:o.sent();this.step="fields";return[3,4];case 3:s=o.sent();console.log("[BUILD] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handleCancel=function(e){console.log("Cancel",e.detail);this.step=""};e.prototype.handleTemplateCreated=function(e){console.log("Created",e.detail);this.step="fields"};e.prototype.handlePropertiesUpdated=function(e){console.log("updated",e.detail);this.step="recipients"};e.prototype.handleRecipientsUpdated=function(e){console.log("updated",e.detail);this.step="fields"};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return s(o,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return s(o,null,this.step==="create"&&s("verdocs-template-create",{onCancel:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleTemplateCreated(t)}}),this.step==="fields"&&s("verdocs-template-fields",{onCancel:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleCancel(t)}}))};return e}());c.style=a}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,s){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function r(e){try{a(s.next(e))}catch(e){i(e)}}function l(e){try{a(s["throw"](e))}catch(e){i(e)}}function a(e){e.done?n(e.value):o(e.value).then(r,l)}a((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,o,i,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,o&&(i=r[0]&2?o["return"]:r[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;if(o=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){n.label=r[1];break}if(r[0]===6&&n.label<i[1]){n.label=i[1];i=r;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(r);break}if(i[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{s=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-9422b807.system.js","./p-4f63fae0.system.js","./p-340316cb.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-69912cbf.system.js","./p-0513c8c3.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,n,s,o,i,r,l;return{setters:[function(e){t=e.r;n=e.c;s=e.h;o=e.H},function(e){i=e.V},function(e){r=e.l},function(e){l=e.S},function(){},function(){},function(){},function(){},function(){}],execute:function(){var a='verdocs-build{display:-ms-flexbox;display:flex;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}';var c=e("verdocs_build",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.fields=[];this.endpoint=i.getDefault();this.templateId=null;this.step="create";this.pdfUrl=null;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s;return __generator(this,(function(o){switch(o.label){case 0:this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}if(!this.templateId){console.log("[BUILD] No template ID specified, showing upload option");this.step="create";return[2]}o.label=1;case 1:o.trys.push([1,3,,4]);console.log("[BUILD] Loading template ".concat(this.templateId));return[4,r(this.endpoint,this.templateId)];case 2:o.sent();this.step="fields";return[3,4];case 3:s=o.sent();console.log("[BUILD] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handleCancel=function(e){console.log("Cancel",e.detail);this.step=""};e.prototype.handleTemplateCreated=function(e){console.log("Created",e.detail);this.step="fields"};e.prototype.handlePropertiesUpdated=function(e){console.log("updated",e.detail);this.step="recipients"};e.prototype.handleRecipientsUpdated=function(e){console.log("updated",e.detail);this.step="fields"};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return s(o,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return s(o,null,this.step==="create"&&s("verdocs-template-create",{onCancel:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleTemplateCreated(t)}}),this.step==="fields"&&s("verdocs-template-fields",{onCancel:function(t){return e.handleCancel(t)},onNext:function(t){return e.handleCancel(t)}}))};return e}());c.style=a}}}));
@@ -1 +1 @@
1
- import{r as o,h as t}from"./p-ff1278ed.js";const s=class{constructor(t){o(this,t),this.options=void 0,this.theme=void 0,this.selectedOption=0}componentWillLoad(){var o;this.selectedOption=(null===(o=this.options)||void 0===o?void 0:o.defaultSelection)||0}render(){return t("div",{class:"container"},t("span",{class:"label"},`${this.options.label}:`),t("div",{class:"buttons"},this.options.buttons.map(((o,s)=>t("button",{id:o.id,key:o.id,innerHTML:o.icon,class:s===this.selectedOption?"selected":"",onClick:()=>{console.log("clicked",s),this.selectedOption=s}})))))}};s.style='verdocs-toggle{font-family:"Barlow", sans-serif}verdocs-toggle .container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background-color:#f5f5fa}verdocs-toggle .label{font-size:24px;font-weight:700;color:#33354c;-ms-flex-item-align:center;align-self:center;margin-right:27px;font-family:sans-serif}verdocs-toggle .buttons{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap}verdocs-toggle .buttons button{width:60px;height:60px;border:2px solid #654dcb;border-radius:5px;cursor:pointer}verdocs-toggle .buttons button:not(:last-child){margin-right:11px}verdocs-toggle .buttons svg{width:30px;height:30px}verdocs-toggle .buttons button:hover{background-color:#654dcb;-webkit-transition:0.25s;transition:0.25s}verdocs-toggle .buttons button:hover svg{fill:#f5f5fa;-webkit-transition:0.25s;transition:0.25s}verdocs-toggle .selected{background-color:#707ae5;-webkit-transition:0.25s;transition:0.25s}verdocs-toggle .selected svg{fill:#ffffff;-webkit-transition:0.25s;transition:0.25s}';export{s as verdocs_toggle}
1
+ import{r as o,h as t}from"./p-7239d28d.js";const s=class{constructor(t){o(this,t),this.options=void 0,this.theme=void 0,this.selectedOption=0}componentWillLoad(){var o;this.selectedOption=(null===(o=this.options)||void 0===o?void 0:o.defaultSelection)||0}render(){return t("div",{class:"container"},t("span",{class:"label"},`${this.options.label}:`),t("div",{class:"buttons"},this.options.buttons.map(((o,s)=>t("button",{id:o.id,key:o.id,innerHTML:o.icon,class:s===this.selectedOption?"selected":"",onClick:()=>{console.log("clicked",s),this.selectedOption=s}})))))}};s.style='verdocs-toggle{font-family:"Barlow", sans-serif}verdocs-toggle .container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background-color:#f5f5fa}verdocs-toggle .label{font-size:24px;font-weight:700;color:#33354c;-ms-flex-item-align:center;align-self:center;margin-right:27px;font-family:sans-serif}verdocs-toggle .buttons{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap}verdocs-toggle .buttons button{width:60px;height:60px;border:2px solid #654dcb;border-radius:5px;cursor:pointer}verdocs-toggle .buttons button:not(:last-child){margin-right:11px}verdocs-toggle .buttons svg{width:30px;height:30px}verdocs-toggle .buttons button:hover{background-color:#654dcb;-webkit-transition:0.25s;transition:0.25s}verdocs-toggle .buttons button:hover svg{fill:#f5f5fa;-webkit-transition:0.25s;transition:0.25s}verdocs-toggle .selected{background-color:#707ae5;-webkit-transition:0.25s;transition:0.25s}verdocs-toggle .selected svg{fill:#ffffff;-webkit-transition:0.25s;transition:0.25s}';export{s as verdocs_toggle}
@@ -1 +1 @@
1
- System.register(["./p-97329951.system.js","./p-4f63fae0.system.js","./p-af2c2f79.system.js"],(function(e){"use strict";var s,r,t;return{setters:[function(e){s=e.r;r=e.h},function(e){t=e.V},function(){}],execute:function(){var i='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';var n=e("verdocs_search",function(){function e(e){s(this,e);this.endpoint=t.getDefault()}e.prototype.render=function(){return r("div",{class:"container"},r("verdocs-search-box",{endpoint:this.endpoint}),r("div",{class:"boxes"},r("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),r("verdocs-quick-functions",{endpoint:this.endpoint})))};return e}());n.style=i}}}));
1
+ System.register(["./p-9422b807.system.js","./p-4f63fae0.system.js","./p-af2c2f79.system.js"],(function(e){"use strict";var s,r,t;return{setters:[function(e){s=e.r;r=e.h},function(e){t=e.V},function(){}],execute:function(){var i='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';var n=e("verdocs_search",function(){function e(e){s(this,e);this.endpoint=t.getDefault()}e.prototype.render=function(){return r("div",{class:"container"},r("verdocs-search-box",{endpoint:this.endpoint}),r("div",{class:"boxes"},r("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),r("verdocs-quick-functions",{endpoint:this.endpoint})))};return e}());n.style=i}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,n){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function r(e){try{a(n.next(e))}catch(e){s(e)}}function l(e){try{a(n["throw"](e))}catch(e){s(e)}}function a(e){e.done?o(e.value):i(e.value).then(r,l)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(n)throw new TypeError("Generator is already executing.");while(o)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;i=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(r[0]===6&&o.label<s[1]){o.label=s[1];s=r;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(r);break}if(s[2])o.ops.pop();o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++){if(s||!(n in t)){if(!s)s=Array.prototype.slice.call(t,0,n);s[n]=t[n]}}return e.concat(s||Array.prototype.slice.call(t))};System.register(["./p-97329951.system.js","./p-8229e6df.system.js","./p-4f63fae0.system.js","./p-f9f0d3b4.system.js","./p-7e58e898.system.js","./p-187b20b7.system.js","./p-69912cbf.system.js","./p-af2c2f79.system.js","./p-0f6da8c7.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,o,n,i,s,r,l,a,d,c,p,u;return{setters:[function(e){t=e.r;o=e.c;n=e.h;i=e.H},function(e){s=e.u;r=e.d},function(e){l=e.V;a=e.T},function(e){d=e.s},function(e){c=e.l},function(e){p=e.S},function(e){u=e.u},function(){},function(){},function(){}],execute:function(){var m='verdocs-template-role-properties{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-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}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var h=e("verdocs_template_role_properties",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.delete=o(this,"delete",7);this.sdkError=o(this,"sdkError",7);this.endpoint=l.getDefault();this.templateId="";this.roleName="";this.sender=a.EVERYONE;this.dirty=false;this.saving=false;this.name="";this.type="signer";this.fullName="";this.email="";this.phone="";this.allowDelegation=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,n,i,s,r,l,a;var u=this;return __generator(this,(function(m){switch(m.label){case 0:m.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[TEMPLATE ROLE PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[TEMPLATE ROLE PROPERTIES] Unable to start builder session, must be authenticated");return[2]}m.label=1;case 1:m.trys.push([1,3,,4]);console.log("[TEMPLATE ROLE PROPERTIES] Loading template ".concat(this.templateId),this.endpoint.session);return[4,c(this.endpoint,this.templateId)];case 2:m.sent();return[3,4];case 3:r=m.sent();console.log("[TEMPLATE ROLE PROPERTIES] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(o=r.response)===null||o===void 0?void 0:o.data));return[3,4];case 4:l=d.template.roles.find((function(e){return e.name===u.roleName}));if(l){this.name=l.name;this.type=l.type;this.fullName=l.full_name;this.email=l.email;this.phone=l.phone;this.allowDelegation=l.delegator;console.log("Got role",l)}return[3,6];case 5:a=m.sent();console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new p(a.message,(i=a.response)===null||i===void 0?void 0:i.status,(s=a.response)===null||s===void 0?void 0:s.data));return[3,6];case 6:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.name=d.template.name;this.dirty=false;(t=this.close)===null||t===void 0?void 0:t.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();this.saving=true;s(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((function(e){var o;console.log("Update result",e);t.saving=false;t.dirty=false;d.template.roles.forEach((function(e){if(e.name===t.roleName){e.name=t.name;e.type=t.type;e.full_name=t.fullName;e.email=t.email;e.phone=t.phone;e.delegator=t.allowDelegation}}));(o=t.close)===null||o===void 0?void 0:o.emit()})).catch((function(e){console.log("Uopdate error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){r(this.endpoint,this.templateId,this.roleName).then((function(e){var o;console.log("Role deleted",e);d.template.roles=__spreadArray([],d.template.roles.filter((function(e){return e.name!==t.roleName})),true);(o=t.delete)===null||o===void 0?void 0:o.emit({templateId:t.templateId,roleName:t.roleName})})).catch((function(e){console.log("Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;return n(i,null,n("div",{class:"background-overlay",onClick:function(t){return e.handleCancel(t)}},n("div",{class:"dialog"},n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",helpText:"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),n("div",{class:"row"},n("div",{class:"input-label"},"Type:"),n("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}}),n("verdocs-help-icon",{text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),n("verdocs-text-input",{id:"verdocs-recipient-email",label:"Full Name",value:this.fullName,autocomplete:"off",helpText:"The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Full Name...",onInput:function(t){e.fullName=t.target.value;e.dirty=true}}),n("verdocs-text-input",{id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),n("verdocs-text-input",{id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}),n("div",{class:"row"},n("div",{class:"input-label"},"May Delegate:"),n("div",{class:"checkbox-wrapper"},n("verdocs-checkbox",{checked:this.allowDelegation,onInput:function(t){e.allowDelegation=t.target.checked;e.dirty=true}})),n("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),n("div",{class:"buttons"},n("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:f}),n("div",{style:{flex:"1"}}),n("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))))};return e}());h.style=m;var v='verdocs-template-sender{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';var x=e("verdocs_template_sender",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.endpoint=l.getDefault();this.templateId="";this.sender=a.EVERYONE;this.saving=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,n,i,s,r,l;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[TEMPLATE SENDER] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[TEMPLATE SENDER] Unable to start builder session, must be authenticated");return[2]}a.label=1;case 1:a.trys.push([1,3,,4]);console.log("[TEMPLATE SENDER] Loading template ".concat(this.templateId),this.endpoint.session);return[4,c(this.endpoint,this.templateId)];case 2:a.sent();return[3,4];case 3:r=a.sent();console.log("[TEMPLATE SENDER] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(o=r.response)===null||o===void 0?void 0:o.data));return[3,4];case 4:this.sender=d.template.sender;console.log("s",this.sender);return[3,6];case 5:l=a.sent();console.log("[TEMPLATE SENDER] Error with preview session",l);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new p(l.message,(i=l.response)===null||i===void 0?void 0:i.status,(s=l.response)===null||s===void 0?void 0:s.data));return[3,6];case 6:return[2]}}))}))};e.prototype.handleClose=function(){this.close.emit()};e.prototype.handleDismiss=function(e){if(e.target.className==="background-overlay"){e.preventDefault();this.handleClose()}};e.prototype.handleSelectSetting=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){this.saving=true;u(this.endpoint,this.templateId,{sender:e}).then((function(o){console.log("Update result",o);d.template.sender=e;t.saving=false;t.sender=e})).catch((function(e){console.log("Error saving",e);t.saving=false}));return[2]}))}))};e.prototype.render=function(){var e=this;return n(i,null,n("div",{class:"background-overlay",onClick:function(t){return e.handleDismiss(t)}},n("div",{class:"dialog"},n("div",{class:"options"},n("div",{class:"option"},n("verdocs-radio-button",{name:"template-sender",value:a.EVERYONE,checked:this.sender===a.EVERYONE,onInput:function(){return e.handleSelectSetting(a.EVERYONE)}}),n("div",{class:"description"},n("div",{class:"name"},"Anyone on the Web"),n("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),n("div",{class:"option"},n("verdocs-radio-button",{name:"template-sender",value:a.EVERYONE_AS_CREATOR,checked:this.sender===a.EVERYONE_AS_CREATOR,onInput:function(){return e.handleSelectSetting(a.EVERYONE_AS_CREATOR)}}),n("div",{class:"description"},n("div",{class:"name"},"Anyone on the Web as me"),n("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),n("div",{class:"option"},n("verdocs-radio-button",{name:"template-sender",value:a.ORGANIZATION_MEMBER,checked:this.sender===a.ORGANIZATION_MEMBER,onInput:function(){return e.handleSelectSetting(a.ORGANIZATION_MEMBER)}}),n("div",{class:"description"},n("div",{class:"name"},"Anyone in my organization"),n("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),n("div",{class:"option"},n("verdocs-radio-button",{name:"template-sender",value:a.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===a.ORGANIZATION_MEMBER_AS_CREATOR,onInput:function(){return e.handleSelectSetting(a.ORGANIZATION_MEMBER_AS_CREATOR)}}),n("div",{class:"description"},n("div",{class:"name"},"Anyone in my organization as me"),n("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),n("div",{class:"option"},n("verdocs-radio-button",{name:"template-sender",value:a.CREATOR,checked:this.sender===a.CREATOR,onInput:function(){return e.handleSelectSetting(a.CREATOR)}}),n("div",{class:"description"},n("div",{class:"name"},"Me"),n("verdocs-help-icon",{text:"Only I can use this template."})))),n("div",{class:"buttons"},n("verdocs-button",{label:"Close",onClick:function(){return e.handleClose()}})))))};return e}());x.style=v}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,o,n){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function r(e){try{a(n.next(e))}catch(e){s(e)}}function l(e){try{a(n["throw"](e))}catch(e){s(e)}}function a(e){e.done?o(e.value):i(e.value).then(r,l)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(t){return a([e,t])}}function a(r){if(n)throw new TypeError("Generator is already executing.");while(o)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:o.label++;return{value:r[1],done:false};case 5:o.label++;i=r[1];r=[0];continue;case 7:r=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){o=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){o.label=r[1];break}if(r[0]===6&&o.label<s[1]){o.label=s[1];s=r;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(r);break}if(s[2])o.ops.pop();o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++){if(s||!(n in t)){if(!s)s=Array.prototype.slice.call(t,0,n);s[n]=t[n]}}return e.concat(s||Array.prototype.slice.call(t))};System.register(["./p-9422b807.system.js","./p-8229e6df.system.js","./p-4f63fae0.system.js","./p-0513c8c3.system.js","./p-340316cb.system.js","./p-187b20b7.system.js","./p-69912cbf.system.js","./p-af2c2f79.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,o,n,i,s,r,l,a,d,c,p,u;return{setters:[function(e){t=e.r;o=e.c;n=e.h;i=e.H},function(e){s=e.u;r=e.d},function(e){l=e.V;a=e.T},function(e){d=e.s},function(e){c=e.l},function(e){p=e.S},function(e){u=e.u},function(){},function(){},function(){}],execute:function(){var m='verdocs-template-role-properties{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-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}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var h=e("verdocs_template_role_properties",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.delete=o(this,"delete",7);this.sdkError=o(this,"sdkError",7);this.endpoint=l.getDefault();this.templateId="";this.roleName="";this.sender=a.EVERYONE;this.dirty=false;this.saving=false;this.name="";this.type="signer";this.fullName="";this.email="";this.phone="";this.allowDelegation=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,n,i,s,r,l,a;var u=this;return __generator(this,(function(m){switch(m.label){case 0:m.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[TEMPLATE ROLE PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[TEMPLATE ROLE PROPERTIES] Unable to start builder session, must be authenticated");return[2]}m.label=1;case 1:m.trys.push([1,3,,4]);console.log("[TEMPLATE ROLE PROPERTIES] Loading template ".concat(this.templateId),this.endpoint.session);return[4,c(this.endpoint,this.templateId)];case 2:m.sent();return[3,4];case 3:r=m.sent();console.log("[TEMPLATE ROLE PROPERTIES] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(o=r.response)===null||o===void 0?void 0:o.data));return[3,4];case 4:l=d.template.roles.find((function(e){return e.name===u.roleName}));if(l){this.name=l.name;this.type=l.type;this.fullName=l.full_name;this.email=l.email;this.phone=l.phone;this.allowDelegation=l.delegator;console.log("Got role",l)}return[3,6];case 5:a=m.sent();console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new p(a.message,(i=a.response)===null||i===void 0?void 0:i.status,(s=a.response)===null||s===void 0?void 0:s.data));return[3,6];case 6:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.name=d.template.name;this.dirty=false;(t=this.close)===null||t===void 0?void 0:t.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();this.saving=true;s(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((function(e){var o;console.log("Update result",e);t.saving=false;t.dirty=false;d.template.roles.forEach((function(e){if(e.name===t.roleName){e.name=t.name;e.type=t.type;e.full_name=t.fullName;e.email=t.email;e.phone=t.phone;e.delegator=t.allowDelegation}}));(o=t.close)===null||o===void 0?void 0:o.emit()})).catch((function(e){console.log("Uopdate error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){r(this.endpoint,this.templateId,this.roleName).then((function(e){var o;console.log("Role deleted",e);d.template.roles=__spreadArray([],d.template.roles.filter((function(e){return e.name!==t.roleName})),true);(o=t.delete)===null||o===void 0?void 0:o.emit({templateId:t.templateId,roleName:t.roleName})})).catch((function(e){console.log("Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;return n(i,null,n("div",{class:"background-overlay",onClick:function(t){return e.handleCancel(t)}},n("div",{class:"dialog"},n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",helpText:"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),n("div",{class:"row"},n("div",{class:"input-label"},"Type:"),n("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}}),n("verdocs-help-icon",{text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),n("verdocs-text-input",{id:"verdocs-recipient-email",label:"Full Name",value:this.fullName,autocomplete:"off",helpText:"The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Full Name...",onInput:function(t){e.fullName=t.target.value;e.dirty=true}}),n("verdocs-text-input",{id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),n("verdocs-text-input",{id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}),n("div",{class:"row"},n("div",{class:"input-label"},"May Delegate:"),n("div",{class:"checkbox-wrapper"},n("verdocs-checkbox",{checked:this.allowDelegation,onInput:function(t){e.allowDelegation=t.target.checked;e.dirty=true}})),n("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),n("div",{class:"buttons"},n("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:f}),n("div",{style:{flex:"1"}}),n("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))))};return e}());h.style=m;var v='verdocs-template-sender{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';var x=e("verdocs_template_sender",function(){function e(e){t(this,e);this.close=o(this,"close",7);this.sdkError=o(this,"sdkError",7);this.endpoint=l.getDefault();this.templateId="";this.sender=a.EVERYONE;this.saving=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,n,i,s,r,l;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[TEMPLATE SENDER] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[TEMPLATE SENDER] Unable to start builder session, must be authenticated");return[2]}a.label=1;case 1:a.trys.push([1,3,,4]);console.log("[TEMPLATE SENDER] Loading template ".concat(this.templateId),this.endpoint.session);return[4,c(this.endpoint,this.templateId)];case 2:a.sent();return[3,4];case 3:r=a.sent();console.log("[TEMPLATE SENDER] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(o=r.response)===null||o===void 0?void 0:o.data));return[3,4];case 4:this.sender=d.template.sender;console.log("s",this.sender);return[3,6];case 5:l=a.sent();console.log("[TEMPLATE SENDER] Error with preview session",l);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new p(l.message,(i=l.response)===null||i===void 0?void 0:i.status,(s=l.response)===null||s===void 0?void 0:s.data));return[3,6];case 6:return[2]}}))}))};e.prototype.handleClose=function(){this.close.emit()};e.prototype.handleDismiss=function(e){if(e.target.className==="background-overlay"){e.preventDefault();this.handleClose()}};e.prototype.handleSelectSetting=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){this.saving=true;u(this.endpoint,this.templateId,{sender:e}).then((function(o){console.log("Update result",o);d.template.sender=e;t.saving=false;t.sender=e})).catch((function(e){console.log("Error saving",e);t.saving=false}));return[2]}))}))};e.prototype.render=function(){var e=this;return n(i,null,n("div",{class:"background-overlay",onClick:function(t){return e.handleDismiss(t)}},n("div",{class:"dialog"},n("div",{class:"options"},n("div",{class:"option"},n("verdocs-radio-button",{name:"template-sender",value:a.EVERYONE,checked:this.sender===a.EVERYONE,onInput:function(){return e.handleSelectSetting(a.EVERYONE)}}),n("div",{class:"description"},n("div",{class:"name"},"Anyone on the Web"),n("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),n("div",{class:"option"},n("verdocs-radio-button",{name:"template-sender",value:a.EVERYONE_AS_CREATOR,checked:this.sender===a.EVERYONE_AS_CREATOR,onInput:function(){return e.handleSelectSetting(a.EVERYONE_AS_CREATOR)}}),n("div",{class:"description"},n("div",{class:"name"},"Anyone on the Web as me"),n("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),n("div",{class:"option"},n("verdocs-radio-button",{name:"template-sender",value:a.ORGANIZATION_MEMBER,checked:this.sender===a.ORGANIZATION_MEMBER,onInput:function(){return e.handleSelectSetting(a.ORGANIZATION_MEMBER)}}),n("div",{class:"description"},n("div",{class:"name"},"Anyone in my organization"),n("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),n("div",{class:"option"},n("verdocs-radio-button",{name:"template-sender",value:a.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===a.ORGANIZATION_MEMBER_AS_CREATOR,onInput:function(){return e.handleSelectSetting(a.ORGANIZATION_MEMBER_AS_CREATOR)}}),n("div",{class:"description"},n("div",{class:"name"},"Anyone in my organization as me"),n("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),n("div",{class:"option"},n("verdocs-radio-button",{name:"template-sender",value:a.CREATOR,checked:this.sender===a.CREATOR,onInput:function(){return e.handleSelectSetting(a.CREATOR)}}),n("div",{class:"description"},n("div",{class:"name"},"Me"),n("verdocs-help-icon",{text:"Only I can use this template."})))),n("div",{class:"buttons"},n("verdocs-button",{label:"Close",onClick:function(){return e.handleClose()}})))))};return e}());x.style=v}}}));
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function r(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return l([e,t])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;o=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(r[0]===6&&i.label<a[1]){i.label=a[1];a=r;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(r);break}if(a[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];o=0}finally{n=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++){if(a||!(n in t)){if(!a)a=Array.prototype.slice.call(t,0,n);a[n]=t[n]}}return e.concat(a||Array.prototype.slice.call(t))};System.register(["./p-9422b807.system.js","./p-69912cbf.system.js","./p-0522edd2.system.js","./p-4f63fae0.system.js","./p-187b20b7.system.js","./p-80fe8ac3.system.js","./p-b1288daf.system.js","./p-38d00c38.system.js","./p-0513c8c3.system.js","./p-340316cb.system.js","./p-af2c2f79.system.js","./p-e764098e.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,n,o,a,r,s,l,d,c,p,h,u,g,f,m,v,x,w;return{setters:[function(e){t=e.r;i=e.c;n=e.h;o=e.H},function(e){a=e.c;r=e.g},function(e){s=e.c},function(e){l=e.V},function(e){d=e.S},function(e){c=e.i},function(e){p=e.u;h=e.c},function(e){u=e.a;g=e.r;f=e.e;m=e.f;v=e.h},function(e){x=e.s},function(e){w=e.l},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var b='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 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;padding:0 0 30px 0}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}';var y=" ";var q='<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>';var C=e("verdocs_template_create",function(){function e(e){t(this,e);this.cancel=i(this,"cancel",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=l.getDefault();this.file=undefined;this.creating=false}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,o,l,c,p,h;var u=this;return __generator(this,(function(g){switch(g.label){case 0:e.stopPropagation();if(!this.file){return[2]}this.creating=true;g.label=1;case 1:g.trys.push([1,4,,5]);return[4,a(this.endpoint,{name:this.file.name})];case 2:o=g.sent();console.log("[CREATE] Created template",o);return[4,s(this.endpoint,o.id,this.file)];case 3:l=g.sent();console.log("[CREATE] Created document",l);c=null;p=setInterval((function(){return __awaiter(u,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:console.log("[CREATE] Waiting for template to be processed...",l);return[4,r(this.endpoint,o.id)];case 1:c=t.sent();if(c===null||c===void 0?void 0:c.processed){console.log("[CREATE] Retrieved new template",c);if(p){clearInterval(p)}(e=this.next)===null||e===void 0?void 0:e.emit(c);this.creating=false}return[2]}}))}))}),3e3);return[3,5];case 4:h=g.sent();console.log("[CREATE] Error creating template",h);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new d(h.message,(i=h.response)===null||i===void 0?void 0:i.status,(n=h.response)===null||n===void 0?void 0:n.data));this.creating=false;return[3,5];case 5:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return n(o,null,n("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?n("div",{class:"loader-wrapper"},n("verdocs-loader",null),n("div",{class:"loading-text"},"Processing, please wait...")):n("div",{class:"upload-box"},n("div",null,n("span",{innerHTML:q})),n("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold"}},this.file?this.file.name:"Drag a file here"),n("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?y:"Or, if you prefer..."),n("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),n("div",{class:"buttons"},n("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),n("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating})))};return e}());C.style=b;var E="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{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-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 0 14, pointer}";var Z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var k='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>';var _='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var V='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var H='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var I='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var S='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var L='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path fill="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var M='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var A=[{id:"checkbox",tooltip:"Check Box",icon:_},{id:"date",tooltip:"Date",icon:H},{id:"dropdown",tooltip:"Dropdown",icon:M},{id:"initial",tooltip:"Initials",icon:S},{id:"radio",tooltip:"Radio Button",icon:V},{id:"signature",tooltip:"Signature",icon:I},{id:"textarea",tooltip:"Text Area",icon:k},{id:"textbox",tooltip:"Text Box",icon:Z},{id:"timestamp",tooltip:"Timestamp",icon:L}];var P=e("verdocs_template_fields",function(){function e(e){t(this,e);this.next=i(this,"next",7);this.cancel=i(this,"cancel",7);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.pageHeights={};this.cachedPageInfo={};this.endpoint=l.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,a,r,s;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[FIELDS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,w(this.endpoint,this.templateId,true)];case 2:l.sent();this.selectedRoleName=x.roleNames[0];console.log("Starting with role",this.selectedRoleName);return[3,4];case 3:r=l.sent();console.log("[FIELDS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[3,6];case 5:s=l.sent();console.log("[FIELDS] Error with preview session",s);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new d(s.message,(o=s.response)===null||o===void 0?void 0:o.status,(a=s.response)===null||a===void 0?void 0:a.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){c.dynamicDrop(true);var e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){console.log("[FIELDS] Moving toolbar");t.remove();e.append(t)}};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){console.log("[FIELDS] handleFieldChange",e,t,i);this.rerender++;return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,i,n){var o=this;n.addEventListener("input",(function(e){return o.handleFieldChange(t,e)}));n.addEventListener("settingsChanged",(function(){var e;console.log("settings changed",o,t);n.setAttribute("roleindex",u(x.roleNames,t.role_name));o.rerender++;(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:o.endpoint,template:x.template,event:"updated-field"})}));n.addEventListener("deleted",(function(){var e;console.log("deleted",o,t);n.remove();o.rerender++;(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:o.endpoint,template:x.template,event:"updated-field"})}));n.setAttribute("roleindex",i);n.setAttribute("pageNumber",e.pageNumber);n.setAttribute("xScale",e.xScale);n.setAttribute("yScale",e.yScale);n.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;console.log("[FIELDS] Page rendered",i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var n=x.fields.filter((function(e){return e.page_sequence===i.pageNumber}));console.log("[FIELDS] Fields on page",n);n.forEach((function(e){var n=u(x.roleNames,e.role_name);var o=g(e,i,n,{disabled:true,editable:true,draggable:true});if(!o){return}if(Array.isArray(o)){o.map((function(o){return t.attachFieldAttributes(i,e,n,o)}))}else{t.attachFieldAttributes(i,e,n,o)}c(o).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var i=+(e.target.getAttribute("posY")||0);var n=+(e.target.getAttribute("xScale")||1);var o=+(e.target.getAttribute("yScale")||1);var a=e.dx/n+t;var r=e.dy/o+i;e.target.setAttribute("posX",a);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(a,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}))};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,o,a,r,s,l,d,c,h,u,g,f,m,v,w,b;return __generator(this,(function(y){switch(y.label){case 0:t=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[t],n=i.naturalWidth,o=n===void 0?612:n,a=i.naturalHeight,r=a===void 0?792:a,s=i.renderedHeight,l=s===void 0?792:s;console.log("[FIELDS] Drag ended",t,e.target);d=e.target.getBoundingClientRect();c=e.target.parentElement;h=c.getBoundingClientRect();u=Math.max(d.left-h.left,0);g=Math.max(l-(h.bottom-d.bottom),0);f=this.viewCoordinatesToPageCoordinates(u,g,t,o-e.rect.width,r-e.rect.height),m=f.x,v=f.y;w=e.target.getAttribute("name");b=x.fields.find((function(e){return e.name===w}));if(!b)return[3,2];b.setting.x=m;b.setting.y=v;return[4,p(this.endpoint,this.templateId,w,b)];case 1:y.sent();this.handlePageRendered({detail:this.cachedPageInfo[t]});y.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var i=1;var n;do{n="".concat(e,"P").concat(t,"-").concat(i);i++}while(x.fields.some((function(e){return e.name===n})));console.log("Field name",n);return n};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,i,n,o){var a=this.cachedPageInfo[i],r=a.xScale,s=r===void 0?1:r,l=a.yScale,d=l===void 0?1:l,c=a.renderedHeight,p=c===void 0?792:c;var h=Math.floor(Math.min(e/s,n));var u=Math.floor(Math.min(Math.max(p-t,0)/d,o));return{x:h,y:u}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,o,a,r,s,l,d,c,p,u,g,f,w,b,y;return __generator(this,(function(q){switch(q.label){case 0:if(!this.placing)return[3,2];console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);n=t.sequence;o=e.offsetX;a=e.offsetY;r=m(this.placing);s=v(this.placing);l=this.cachedPageInfo[n],d=l.naturalWidth,c=d===void 0?612:d,p=l.naturalHeight,u=p===void 0?792:p;g=this.viewCoordinatesToPageCoordinates(o,a,n,c-r,u-s),f=g.x,w=g.y;b={name:this.generateFieldName(this.placing,n),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:true,page_sequence:n,validator:null,setting:{x:f,y:w}};switch(b.type){case"attachment":case"payment":b.setting={x:f,y:w};break;case"initial":case"signature":b.setting={x:f,y:w,result:""};break;case"checkbox_group":b.setting={x:f,y:w,minimum_checked:0,maximum_checked:1e3};break;case"date":b.setting={x:f,y:w,width:r,height:s,result:""};break;case"dropdown":b.setting={x:f,y:w,width:r,height:s,value:"",placeholder:"Select a value"};break;case"radio_button_group":b.setting={x:f,y:w};break;case"textbox":b.setting={x:f,y:w,width:r,height:s,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":b.setting={x:f,y:w,width:r,height:s};break}return[4,h(this.endpoint,this.templateId,b)];case 1:y=q.sent();console.log("Saved field",y);x.fields.push(y);this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:x.template,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[n]});q.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;if(!this.endpoint.session){return n(o,null,n("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(x.loading||!x.template){return n(o,null,n("verdocs-loader",null))}var i=__spreadArray([],x.template.pages,true);i.sort((function(e,t){return e.sequence-t.sequence}));return n(o,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},n("div",{id:"verdocs-template-fields-toolbar"},A.map((function(e){return n("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){return t.placing=e.id}})}))),n("div",{class:"pages"},i.map((function(e){return n("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onClick:function(i){return t.handleClickPage(i,e)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))))};return e}());P.style=E}}}));
@@ -1 +1 @@
1
- import{r as e,h as s}from"./p-ff1278ed.js";import{V as r}from"./p-4e49fb12.js";import"./p-21603661.js";const c=class{constructor(s){e(this,s),this.endpoint=r.getDefault()}render(){return s("div",{class:"container"},s("verdocs-search-box",{endpoint:this.endpoint}),s("div",{class:"boxes"},s("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),s("verdocs-quick-functions",{endpoint:this.endpoint})))}};c.style='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';export{c as verdocs_search}
1
+ import{r as e,h as s}from"./p-7239d28d.js";import{V as r}from"./p-4e49fb12.js";import"./p-21603661.js";const c=class{constructor(s){e(this,s),this.endpoint=r.getDefault()}render(){return s("div",{class:"container"},s("verdocs-search-box",{endpoint:this.endpoint}),s("div",{class:"boxes"},s("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),s("verdocs-quick-functions",{endpoint:this.endpoint})))}};c.style='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';export{c as verdocs_search}
@@ -1 +1 @@
1
- import{r as o,h as t,H as i}from"./p-ff1278ed.js";import{c as r}from"./p-ec26fc38.js";const e=class{constructor(t){o(this,t),this.text="",this.icon="",this.placement="bottom",this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=r(this.iconEl,this.tooltip,{placement:this.placement,modifiers:"left"===this.placement?[{name:"offset",options:{offset:[0,20]}}]:[]})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}show(){var o,t;null===(o=this.tooltip)||void 0===o||o.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{}))}hide(){var o;null===(o=this.tooltip)||void 0===o||o.removeAttribute("data-show")}render(){return t(i,{class:{}},t("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:o=>this.iconEl=o}),t("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:o=>this.tooltip=o},this.text,t("div",{"data-popper-arrow":"true",class:"arrow"})))}};e.style='verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';export{e as verdocs_toolbar_icon}
1
+ import{r as o,h as t,H as i}from"./p-7239d28d.js";import{c as r}from"./p-ec26fc38.js";const e=class{constructor(t){o(this,t),this.text="",this.icon="",this.placement="bottom",this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=r(this.iconEl,this.tooltip,{placement:this.placement,modifiers:"left"===this.placement?[{name:"offset",options:{offset:[0,20]}}]:[]})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}show(){var o,t;null===(o=this.tooltip)||void 0===o||o.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{}))}hide(){var o;null===(o=this.tooltip)||void 0===o||o.removeAttribute("data-show")}render(){return t(i,{class:{}},t("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:o=>this.iconEl=o}),t("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:o=>this.tooltip=o},this.text,t("div",{"data-popper-arrow":"true",class:"arrow"})))}};e.style='verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';export{e as verdocs_toolbar_icon}