@verdocs/web-sdk 5.0.24 → 5.0.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. package/dist/cjs/{Datastore-931fd77e.js → Datastore-e39f8315.js} +29 -24
  2. package/dist/cjs/Datastore-e39f8315.js.map +1 -0
  3. package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-checkbox_6.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +25 -1
  8. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js.map +1 -1
  9. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-preview_6.cjs.entry.js +5 -2
  14. package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
  15. package/dist/cjs/verdocs-sign.cjs.entry.js +7 -7
  16. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  17. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  18. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +1 -1
  19. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +5 -5
  20. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  21. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +24 -0
  22. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js.map +1 -1
  23. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +4 -1
  24. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js.map +1 -1
  25. package/dist/components/{p-78de9e65.js → p-0e4ebc84.js} +3 -3
  26. package/dist/components/{p-78de9e65.js.map → p-0e4ebc84.js.map} +1 -1
  27. package/dist/components/{p-e4a97ad5.js → p-143a763f.js} +3 -3
  28. package/dist/components/{p-e4a97ad5.js.map → p-143a763f.js.map} +1 -1
  29. package/dist/components/{p-2d8b46e5.js → p-16b073b8.js} +2 -2
  30. package/dist/components/{p-2d8b46e5.js.map → p-16b073b8.js.map} +1 -1
  31. package/dist/components/{p-e9528d9f.js → p-1d4829fb.js} +3 -3
  32. package/dist/components/{p-e9528d9f.js.map → p-1d4829fb.js.map} +1 -1
  33. package/dist/components/{p-ca3e45f3.js → p-27a8eef0.js} +2 -2
  34. package/dist/components/{p-ca3e45f3.js.map → p-27a8eef0.js.map} +1 -1
  35. package/dist/components/{p-fcf13666.js → p-550377ba.js} +13 -13
  36. package/dist/components/{p-fcf13666.js.map → p-550377ba.js.map} +1 -1
  37. package/dist/components/{p-1ce18a42.js → p-619747d7.js} +2 -2
  38. package/dist/components/{p-1ce18a42.js.map → p-619747d7.js.map} +1 -1
  39. package/dist/components/{p-e95ded6b.js → p-631808d5.js} +18 -15
  40. package/dist/components/p-631808d5.js.map +1 -0
  41. package/dist/components/{p-e4799d51.js → p-7bd7baa6.js} +3 -3
  42. package/dist/components/{p-e4799d51.js.map → p-7bd7baa6.js.map} +1 -1
  43. package/dist/components/{p-1ab01232.js → p-813ed998.js} +3 -3
  44. package/dist/components/{p-1ab01232.js.map → p-813ed998.js.map} +1 -1
  45. package/dist/components/{p-a415ce22.js → p-8c965486.js} +3 -3
  46. package/dist/components/{p-a415ce22.js.map → p-8c965486.js.map} +1 -1
  47. package/dist/components/{p-681e7dd4.js → p-99128b47.js} +3 -3
  48. package/dist/components/{p-681e7dd4.js.map → p-99128b47.js.map} +1 -1
  49. package/dist/components/{p-53168eec.js → p-ac7694c0.js} +2 -2
  50. package/dist/components/{p-53168eec.js.map → p-ac7694c0.js.map} +1 -1
  51. package/dist/components/{p-ecfc85ae.js → p-b5e479db.js} +3 -3
  52. package/dist/components/{p-ecfc85ae.js.map → p-b5e479db.js.map} +1 -1
  53. package/dist/components/{p-f6156f7a.js → p-c422d9a0.js} +3 -3
  54. package/dist/components/{p-f6156f7a.js.map → p-c422d9a0.js.map} +1 -1
  55. package/dist/components/{p-c4c9feda.js → p-c4310332.js} +3 -3
  56. package/dist/components/{p-c4c9feda.js.map → p-c4310332.js.map} +1 -1
  57. package/dist/components/{p-91d65fde.js → p-c5045788.js} +3 -3
  58. package/dist/components/{p-91d65fde.js.map → p-c5045788.js.map} +1 -1
  59. package/dist/components/{p-3828cb31.js → p-d4be87ef.js} +29 -24
  60. package/dist/components/p-d4be87ef.js.map +1 -0
  61. package/dist/components/{p-28e3b2e3.js → p-d54466ed.js} +14 -14
  62. package/dist/components/{p-28e3b2e3.js.map → p-d54466ed.js.map} +1 -1
  63. package/dist/components/{p-eb2ad8d0.js → p-e39c327c.js} +2 -2
  64. package/dist/components/{p-eb2ad8d0.js.map → p-e39c327c.js.map} +1 -1
  65. package/dist/components/{p-eb12a71c.js → p-f238b25b.js} +2 -2
  66. package/dist/components/{p-eb12a71c.js.map → p-f238b25b.js.map} +1 -1
  67. package/dist/components/{p-bfed2f8d.js → p-f7cf2401.js} +2 -2
  68. package/dist/components/{p-bfed2f8d.js.map → p-f7cf2401.js.map} +1 -1
  69. package/dist/components/verdocs-build.js +20 -20
  70. package/dist/components/verdocs-envelope-recipient-link.js +1 -1
  71. package/dist/components/verdocs-envelope-recipient-summary.js +1 -1
  72. package/dist/components/verdocs-envelope-sidebar.js +26 -2
  73. package/dist/components/verdocs-envelope-sidebar.js.map +1 -1
  74. package/dist/components/verdocs-field-attachment.js +1 -1
  75. package/dist/components/verdocs-field-checkbox.js +1 -1
  76. package/dist/components/verdocs-field-date.js +1 -1
  77. package/dist/components/verdocs-field-dropdown.js +1 -1
  78. package/dist/components/verdocs-field-initial.js +1 -1
  79. package/dist/components/verdocs-field-payment.js +2 -2
  80. package/dist/components/verdocs-field-radio.js +1 -1
  81. package/dist/components/verdocs-field-signature.js +1 -1
  82. package/dist/components/verdocs-field-textarea.js +1 -1
  83. package/dist/components/verdocs-field-textbox.js +1 -1
  84. package/dist/components/verdocs-field-timestamp.js +1 -1
  85. package/dist/components/verdocs-preview.js +1 -1
  86. package/dist/components/verdocs-send.js +1 -1
  87. package/dist/components/verdocs-sign.js +8 -8
  88. package/dist/components/verdocs-sign.js.map +1 -1
  89. package/dist/components/verdocs-template-attachments.js +1 -1
  90. package/dist/components/verdocs-template-build-tabs.js +1 -1
  91. package/dist/components/verdocs-template-document-page.js +1 -1
  92. package/dist/components/verdocs-template-field-properties.js +1 -1
  93. package/dist/components/verdocs-template-fields.js +1 -1
  94. package/dist/components/verdocs-template-role-properties.js +1 -1
  95. package/dist/components/verdocs-template-roles.js +1 -1
  96. package/dist/components/verdocs-view.js +1 -1
  97. package/dist/esm/{Datastore-3f924d94.js → Datastore-77cb8d9c.js} +29 -24
  98. package/dist/esm/Datastore-77cb8d9c.js.map +1 -0
  99. package/dist/esm/verdocs-build.entry.js +1 -1
  100. package/dist/esm/verdocs-checkbox_6.entry.js +1 -1
  101. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  102. package/dist/esm/verdocs-envelope-recipient-summary.entry.js +1 -1
  103. package/dist/esm/verdocs-envelope-sidebar.entry.js +25 -1
  104. package/dist/esm/verdocs-envelope-sidebar.entry.js.map +1 -1
  105. package/dist/esm/verdocs-field-attachment_13.entry.js +1 -1
  106. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  107. package/dist/esm/verdocs-kba-dialog_2.entry.js +1 -1
  108. package/dist/esm/verdocs-menu-panel_2.entry.js +1 -1
  109. package/dist/esm/verdocs-preview_6.entry.js +5 -2
  110. package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
  111. package/dist/esm/verdocs-sign.entry.js +7 -7
  112. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  113. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  114. package/dist/esm-es5/Datastore-77cb8d9c.js +2 -0
  115. package/dist/esm-es5/Datastore-77cb8d9c.js.map +1 -0
  116. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-checkbox_6.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js.map +1 -1
  122. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
  128. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  130. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  131. package/dist/verdocs-web-sdk/{p-f6ed768d.entry.js → p-00063a35.entry.js} +2 -2
  132. package/dist/verdocs-web-sdk/{p-1902bf04.entry.js → p-104863b5.entry.js} +2 -2
  133. package/dist/verdocs-web-sdk/p-1f2c019d.system.entry.js +2 -0
  134. package/dist/verdocs-web-sdk/p-1f2c019d.system.entry.js.map +1 -0
  135. package/dist/verdocs-web-sdk/{p-fc29a754.entry.js → p-25aa3bd3.entry.js} +2 -2
  136. package/dist/verdocs-web-sdk/{p-b1a9dc79.entry.js → p-4e9a8e8e.entry.js} +2 -2
  137. package/dist/verdocs-web-sdk/p-4e9a8e8e.entry.js.map +1 -0
  138. package/dist/verdocs-web-sdk/p-52c3e8b0.system.js +2 -0
  139. package/dist/verdocs-web-sdk/p-52c3e8b0.system.js.map +1 -0
  140. package/dist/verdocs-web-sdk/{p-7975ec40.system.entry.js → p-578e65d4.system.entry.js} +2 -2
  141. package/dist/verdocs-web-sdk/{p-407c0725.system.entry.js → p-5bcf921b.system.entry.js} +2 -2
  142. package/dist/verdocs-web-sdk/{p-26106576.system.entry.js → p-5c065719.system.entry.js} +2 -2
  143. package/dist/verdocs-web-sdk/{p-7ffebea3.entry.js → p-5ebfe76c.entry.js} +2 -2
  144. package/dist/verdocs-web-sdk/{p-80952d72.system.entry.js → p-6e93814f.system.entry.js} +2 -2
  145. package/dist/verdocs-web-sdk/p-6e93814f.system.entry.js.map +1 -0
  146. package/dist/verdocs-web-sdk/{p-086ee7f1.system.entry.js → p-6eee289a.system.entry.js} +2 -2
  147. package/dist/verdocs-web-sdk/{p-cc230abf.entry.js → p-6f1e2f2f.entry.js} +2 -2
  148. package/dist/verdocs-web-sdk/p-70247599.system.entry.js +2 -0
  149. package/dist/verdocs-web-sdk/p-70247599.system.entry.js.map +1 -0
  150. package/dist/verdocs-web-sdk/{p-e84cf41e.entry.js → p-8369273d.entry.js} +2 -2
  151. package/dist/verdocs-web-sdk/p-a285560f.entry.js +2 -0
  152. package/dist/verdocs-web-sdk/p-a285560f.entry.js.map +1 -0
  153. package/dist/verdocs-web-sdk/p-b7799ec0.entry.js +2 -0
  154. package/dist/verdocs-web-sdk/p-b7799ec0.entry.js.map +1 -0
  155. package/dist/verdocs-web-sdk/{p-a4d94e2e.entry.js → p-b8945173.entry.js} +2 -2
  156. package/dist/verdocs-web-sdk/{p-d4aff253.entry.js → p-b9fee1a7.entry.js} +2 -2
  157. package/dist/verdocs-web-sdk/{p-34c2298e.system.entry.js → p-cabfdb9d.system.entry.js} +2 -2
  158. package/dist/verdocs-web-sdk/{p-90690dde.system.entry.js → p-d1d95df4.system.entry.js} +2 -2
  159. package/dist/verdocs-web-sdk/{p-60da8e6b.entry.js → p-d3a8c6b8.entry.js} +2 -2
  160. package/dist/verdocs-web-sdk/p-d4be87ef.js +2 -0
  161. package/dist/verdocs-web-sdk/p-d4be87ef.js.map +1 -0
  162. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
  163. package/dist/verdocs-web-sdk/{p-208a8b41.system.entry.js → p-e3efeb57.system.entry.js} +2 -2
  164. package/dist/verdocs-web-sdk/{p-dc5c275f.system.entry.js → p-e83d06d4.system.entry.js} +2 -2
  165. package/dist/verdocs-web-sdk/{p-32cf09f0.system.entry.js → p-ecfe8987.system.entry.js} +2 -2
  166. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  167. package/package.json +3 -3
  168. package/dist/cjs/Datastore-931fd77e.js.map +0 -1
  169. package/dist/components/p-3828cb31.js.map +0 -1
  170. package/dist/components/p-e95ded6b.js.map +0 -1
  171. package/dist/esm/Datastore-3f924d94.js.map +0 -1
  172. package/dist/esm-es5/Datastore-3f924d94.js +0 -2
  173. package/dist/esm-es5/Datastore-3f924d94.js.map +0 -1
  174. package/dist/verdocs-web-sdk/p-2175c81a.system.entry.js +0 -2
  175. package/dist/verdocs-web-sdk/p-2175c81a.system.entry.js.map +0 -1
  176. package/dist/verdocs-web-sdk/p-23d6f064.entry.js +0 -2
  177. package/dist/verdocs-web-sdk/p-23d6f064.entry.js.map +0 -1
  178. package/dist/verdocs-web-sdk/p-3828cb31.js +0 -2
  179. package/dist/verdocs-web-sdk/p-3828cb31.js.map +0 -1
  180. package/dist/verdocs-web-sdk/p-65be7617.system.js +0 -2
  181. package/dist/verdocs-web-sdk/p-65be7617.system.js.map +0 -1
  182. package/dist/verdocs-web-sdk/p-80952d72.system.entry.js.map +0 -1
  183. package/dist/verdocs-web-sdk/p-b1a9dc79.entry.js.map +0 -1
  184. package/dist/verdocs-web-sdk/p-c4a10e58.system.entry.js +0 -2
  185. package/dist/verdocs-web-sdk/p-c4a10e58.system.entry.js.map +0 -1
  186. package/dist/verdocs-web-sdk/p-db1faf41.entry.js +0 -2
  187. package/dist/verdocs-web-sdk/p-db1faf41.entry.js.map +0 -1
  188. /package/dist/verdocs-web-sdk/{p-f6ed768d.entry.js.map → p-00063a35.entry.js.map} +0 -0
  189. /package/dist/verdocs-web-sdk/{p-1902bf04.entry.js.map → p-104863b5.entry.js.map} +0 -0
  190. /package/dist/verdocs-web-sdk/{p-fc29a754.entry.js.map → p-25aa3bd3.entry.js.map} +0 -0
  191. /package/dist/verdocs-web-sdk/{p-7975ec40.system.entry.js.map → p-578e65d4.system.entry.js.map} +0 -0
  192. /package/dist/verdocs-web-sdk/{p-407c0725.system.entry.js.map → p-5bcf921b.system.entry.js.map} +0 -0
  193. /package/dist/verdocs-web-sdk/{p-26106576.system.entry.js.map → p-5c065719.system.entry.js.map} +0 -0
  194. /package/dist/verdocs-web-sdk/{p-7ffebea3.entry.js.map → p-5ebfe76c.entry.js.map} +0 -0
  195. /package/dist/verdocs-web-sdk/{p-086ee7f1.system.entry.js.map → p-6eee289a.system.entry.js.map} +0 -0
  196. /package/dist/verdocs-web-sdk/{p-cc230abf.entry.js.map → p-6f1e2f2f.entry.js.map} +0 -0
  197. /package/dist/verdocs-web-sdk/{p-e84cf41e.entry.js.map → p-8369273d.entry.js.map} +0 -0
  198. /package/dist/verdocs-web-sdk/{p-a4d94e2e.entry.js.map → p-b8945173.entry.js.map} +0 -0
  199. /package/dist/verdocs-web-sdk/{p-d4aff253.entry.js.map → p-b9fee1a7.entry.js.map} +0 -0
  200. /package/dist/verdocs-web-sdk/{p-34c2298e.system.entry.js.map → p-cabfdb9d.system.entry.js.map} +0 -0
  201. /package/dist/verdocs-web-sdk/{p-90690dde.system.entry.js.map → p-d1d95df4.system.entry.js.map} +0 -0
  202. /package/dist/verdocs-web-sdk/{p-60da8e6b.entry.js.map → p-d3a8c6b8.entry.js.map} +0 -0
  203. /package/dist/verdocs-web-sdk/{p-208a8b41.system.entry.js.map → p-e3efeb57.system.entry.js.map} +0 -0
  204. /package/dist/verdocs-web-sdk/{p-dc5c275f.system.entry.js.map → p-e83d06d4.system.entry.js.map} +0 -0
  205. /package/dist/verdocs-web-sdk/{p-32cf09f0.system.entry.js.map → p-ecfe8987.system.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,n=1,t=arguments.length;n<t;n++){i=arguments[n];for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r))e[r]=i[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,i,n,t){function r(e){return e instanceof n?e:new n((function(i){i(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function l(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):r(e.value).then(s,l)}a((t=t.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(i){return a([e,i])}}function a(l){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(n=0)),n)try{if(t=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;r=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=i.call(e,n)}catch(e){l=[6,e];r=0}finally{t=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-c8a15cb7.system.js","./p-65be7617.system.js"],(function(e){"use strict";var i,n,t,r,o,s,l,a,c,u,f,d;return{setters:[function(e){i=e.r;n=e.c;t=e.h;r=e.H},function(e){o=e.VerdocsEndpoint;s=e.getEnvelope;l=e.getInPersonLink;a=e.getRecipientsWithActions;c=e.recipientCanAct;u=e.formatFullName},function(e){f=e.S},function(e){d=e.S}],execute:function(){var p='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;border-radius:4px;-ms-flex-align:center;align-items:center;white-space:nowrap;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var m=p;var v=e("verdocs_envelope_recipient_summary",function(){function e(e){i(this,e);this.another=n(this,"another",7);this.view=n(this,"view",7);this.next=n(this,"next",7);this.sdkError=n(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=o.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={};this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n;return __generator(this,(function(t){try{this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}this.listenToEnvelope()}catch(t){console.log("[RECIPIENTS] Error loading envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new f(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(n=t.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();d.subscribe("envelopes",this.envelopeId,(function(){return s(e.endpoint,e.envelopeId)}),false,(function(i){e.envelope=i;e.loading=false;e.sortEnvelopeRecipients()}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){d.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.sortEnvelopeRecipients=function(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.handleAnother=function(e){var i;e.preventDefault();(i=this.another)===null||i===void 0?void 0:i.emit({envelope:this.envelope})};e.prototype.handleView=function(e){var i;e.preventDefault();(i=this.view)===null||i===void 0?void 0:i.emit({envelope:this.envelope})};e.prototype.handleDone=function(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})};e.prototype.copyLink=function(e){var i=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var n;console.warn("[RECIPIENTS] Error copying to clipboard",e);(n=i.sdkError)===null||n===void 0?void 0:n.emit(e)}))};e.prototype.getLink=function(e){var i;var n=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(i={},i[e.role_name]=true,i));l(this.endpoint,e.envelope_id,e.role_name).then((function(i){var t,r;n.gettingLinks=__assign(__assign({},n.gettingLinks),(t={},t[e.role_name]=false,t));n.links=__assign(__assign({},n.links),(r={},r[e.role_name]=i.link,r));n.copyLink(i.link)})).catch((function(i){var t;var r;n.gettingLinks=__assign(__assign({},n.gettingLinks),(t={},t[e.role_name]=false,t));console.log("[RECIPIENTS] Error getting link",i);(r=n.sdkError)===null||r===void 0?void 0:r.emit(i)}))};e.prototype.render=function(){var e=this;var i;if(this.loading){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"Recipient Summary"),t("div",{class:"summary-rows"},(((i=this.envelope)===null||i===void 0?void 0:i.recipients)||[]).map((function(i){var n=a(e.envelope);var r=c(i,n);var o=e.links[i.role_name];var s=e.gettingLinks[i.role_name];var l=u(i);return t("div",{class:"summary-recipient"},t("div",{class:"role-name"},i.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},l," (",i.email||i.phone,")"),r&&!o&&t("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(i)}})),o&&t("div",{class:"link-wrapper"},t("div",{class:"link"},o),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&t("div",{class:"buttons"},this.canSendAnother&&t("verdocs-button",{size:"small",label:"Send Another",onClick:function(i){return e.handleAnother(i)}}),this.canView&&t("verdocs-button",{size:"small",label:"View Now",onClick:function(i){return e.handleView(i)}}),this.canDone&&t("verdocs-button",{size:"small",label:"Done",onClick:function(i){return e.handleDone(i)}}))))};return e}());v.style=m}}}));
2
- //# sourceMappingURL=p-086ee7f1.system.entry.js.map
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,n=1,t=arguments.length;n<t;n++){i=arguments[n];for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r))e[r]=i[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,i,n,t){function r(e){return e instanceof n?e:new n((function(i){i(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function l(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):r(e.value).then(s,l)}a((t=t.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(i){return a([e,i])}}function a(l){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(n=0)),n)try{if(t=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;r=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=i.call(e,n)}catch(e){l=[6,e];r=0}finally{t=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-c8a15cb7.system.js","./p-52c3e8b0.system.js"],(function(e){"use strict";var i,n,t,r,o,s,l,a,c,u,f,d;return{setters:[function(e){i=e.r;n=e.c;t=e.h;r=e.H},function(e){o=e.VerdocsEndpoint;s=e.getEnvelope;l=e.getInPersonLink;a=e.getRecipientsWithActions;c=e.recipientCanAct;u=e.formatFullName},function(e){f=e.S},function(e){d=e.S}],execute:function(){var p='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:rgba(0, 0, 0, 0.4980392157)}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;overflow:hidden;border-radius:4px;-ms-flex-align:center;align-items:center;white-space:nowrap;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var m=p;var v=e("verdocs_envelope_recipient_summary",function(){function e(e){i(this,e);this.another=n(this,"another",7);this.view=n(this,"view",7);this.next=n(this,"next",7);this.sdkError=n(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=o.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={};this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,n;return __generator(this,(function(t){try{this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}this.listenToEnvelope()}catch(t){console.log("[RECIPIENTS] Error loading envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new f(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(n=t.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();d.subscribe("envelopes",this.envelopeId,(function(){return s(e.endpoint,e.envelopeId)}),false,(function(i){e.envelope=i;e.loading=false;e.sortEnvelopeRecipients()}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){d.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.sortEnvelopeRecipients=function(){var e;(((e=this.envelope)===null||e===void 0?void 0:e.recipients)||[]).sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.handleAnother=function(e){var i;e.preventDefault();(i=this.another)===null||i===void 0?void 0:i.emit({envelope:this.envelope})};e.prototype.handleView=function(e){var i;e.preventDefault();(i=this.view)===null||i===void 0?void 0:i.emit({envelope:this.envelope})};e.prototype.handleDone=function(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})};e.prototype.copyLink=function(e){var i=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var n;console.warn("[RECIPIENTS] Error copying to clipboard",e);(n=i.sdkError)===null||n===void 0?void 0:n.emit(e)}))};e.prototype.getLink=function(e){var i;var n=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(i={},i[e.role_name]=true,i));l(this.endpoint,e.envelope_id,e.role_name).then((function(i){var t,r;n.gettingLinks=__assign(__assign({},n.gettingLinks),(t={},t[e.role_name]=false,t));n.links=__assign(__assign({},n.links),(r={},r[e.role_name]=i.link,r));n.copyLink(i.link)})).catch((function(i){var t;var r;n.gettingLinks=__assign(__assign({},n.gettingLinks),(t={},t[e.role_name]=false,t));console.log("[RECIPIENTS] Error getting link",i);(r=n.sdkError)===null||r===void 0?void 0:r.emit(i)}))};e.prototype.render=function(){var e=this;var i;if(this.loading){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"Recipient Summary"),t("div",{class:"summary-rows"},(((i=this.envelope)===null||i===void 0?void 0:i.recipients)||[]).map((function(i){var n=a(e.envelope);var r=c(i,n);var o=e.links[i.role_name];var s=e.gettingLinks[i.role_name];var l=u(i);return t("div",{class:"summary-recipient"},t("div",{class:"role-name"},i.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},l," (",i.email||i.phone,")"),r&&!o&&t("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(i)}})),o&&t("div",{class:"link-wrapper"},t("div",{class:"link"},o),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&t("div",{class:"buttons"},this.canSendAnother&&t("verdocs-button",{size:"small",label:"Send Another",onClick:function(i){return e.handleAnother(i)}}),this.canView&&t("verdocs-button",{size:"small",label:"View Now",onClick:function(i){return e.handleView(i)}}),this.canDone&&t("verdocs-button",{size:"small",label:"Done",onClick:function(i){return e.handleDone(i)}}))))};return e}());v.style=m}}}));
2
+ //# sourceMappingURL=p-6eee289a.system.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as s,H as i,g as l}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getTemplate as d}from"@verdocs/js-sdk";import{S as a}from"./p-fd97809c.js";import{S as r}from"./p-3828cb31.js";const n='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .content{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}verdocs-build .preview-container{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;width:100%;background-color:#eeeeee;max-height:100%}@media all and (max-width: 450px){verdocs-build .preview-container{-ms-flex-direction:column;flex-direction:column}}verdocs-build .preview-send-wrapper{display:-ms-flexbox;display:flex;-ms-flex:0 0 300px;flex:0 0 300px;background-color:#ffffff;-webkit-box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157);box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157)}@media all and (max-width: 450px){verdocs-build .preview-send-wrapper{-ms-flex:0;flex:0}}verdocs-build .preview-preview-wrapper{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;overflow-y:scroll}';const p=n;const c=class{constructor(s){e(this,s);this.sdkError=t(this,"sdkError",7);this.stepChanged=t(this,"stepChanged",7);this.send=t(this,"send",7);this.templateUpdated=t(this,"templateUpdated",7);this.templateCreated=t(this,"templateCreated",7);this.rolesUpdated=t(this,"rolesUpdated",7);this.templateListenerId=null;this.endpoint=o.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}onTemplateIdChanged(e,t){if(!t&&e&&this.step==="attachments"){this.step="preview"}this.loadTemplate(e).catch((e=>console.log("Unknown Error",e)))}onStepChanged(){this.loadTemplate(this.templateId).catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,t,s,i,l,o;try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return}if(!this.templateId){console.log(`[BUILD] No template ID, activating upload mode`);this.step="attachments";return}try{this.loadTemplate(this.templateId).catch((e=>console.log("[BUILD] Unable to load template",e)))}catch(i){console.log("[BUILD] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(s=i.response)===null||s===void 0?void 0:s.data))}}catch(e){console.log("[BUILD] Error with builder session",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new a(e.message,(l=e.response)===null||l===void 0?void 0:l.status,(o=e.response)===null||o===void 0?void 0:o.data))}}async loadTemplate(e){if(e){r.subscribe("templates",this.templateId,(()=>d(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}}disconnectedCallback(){console.log("[BUILD] Disconnected");this.unlistenToTemplate()}unlistenToTemplate(){if(this.templateListenerId){r.store.delListener(this.templateListenerId);this.templateListenerId=null}}handleCancel(){this.step="preview"}async handleTemplateCreated(e){var t;await this.loadTemplate(e);this.templateId=e;this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles")}async handleRolesUpdated(e){var t;(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail)}async handleTemplateUpdated(e){var t;(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail)}handleAttachmentsNext(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")}handleRolesNext(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")}handleStepChanged(e){var t;this.step=e;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e)}render(){if(this.loading){return s(i,{class:"loading"},s("verdocs-loader",null))}if(!this.endpoint.session){return s(i,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return s(i,null,s("div",{class:"content"},s("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:e=>{var t;return(t=this.sdkError)===null||t===void 0?void 0:t.emit(e.detail)},onStepChanged:e=>this.handleStepChanged(e.detail)}),this.step==="attachments"&&s("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:()=>this.handleCancel(),onNext:()=>this.handleAttachmentsNext(),onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),this.step==="roles"&&s("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:()=>this.handleCancel(),onNext:()=>this.handleRolesNext(),onRolesUpdated:e=>this.handleRolesUpdated(e)}),this.step==="settings"&&s("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},s("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),s("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),s("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)})),this.step==="fields"&&s("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),this.step==="preview"&&s("div",{class:"preview-container"},s("div",{class:"preview-send-wrapper"},s("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:e=>{var t;return(t=this.send)===null||t===void 0?void 0:t.emit(e.detail)},style:{width:"100%"}})),s("div",{class:"preview-preview-wrapper"},s("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))}get el(){return l(this)}static get watchers(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}}};c.style=p;export{c as verdocs_build};
2
- //# sourceMappingURL=p-cc230abf.entry.js.map
1
+ import{r as e,c as t,h as s,H as i,g as l}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getTemplate as d}from"@verdocs/js-sdk";import{S as a}from"./p-fd97809c.js";import{S as r}from"./p-d4be87ef.js";const n='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-build .content{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}verdocs-build .preview-container{-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;width:100%;background-color:#eeeeee;max-height:100%}@media all and (max-width: 450px){verdocs-build .preview-container{-ms-flex-direction:column;flex-direction:column}}verdocs-build .preview-send-wrapper{display:-ms-flexbox;display:flex;-ms-flex:0 0 300px;flex:0 0 300px;background-color:#ffffff;-webkit-box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157);box-shadow:1px 1px 6px -2px rgba(0, 0, 0, 0.4980392157)}@media all and (max-width: 450px){verdocs-build .preview-send-wrapper{-ms-flex:0;flex:0}}verdocs-build .preview-preview-wrapper{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;overflow-y:scroll}';const p=n;const c=class{constructor(s){e(this,s);this.sdkError=t(this,"sdkError",7);this.stepChanged=t(this,"stepChanged",7);this.send=t(this,"send",7);this.templateUpdated=t(this,"templateUpdated",7);this.templateCreated=t(this,"templateCreated",7);this.rolesUpdated=t(this,"rolesUpdated",7);this.templateListenerId=null;this.endpoint=o.getDefault();this.templateId=null;this.step="preview";this.loading=true;this.template=null}onTemplateIdChanged(e,t){if(!t&&e&&this.step==="attachments"){this.step="preview"}this.loadTemplate(e).catch((e=>console.log("Unknown Error",e)))}onStepChanged(){this.loadTemplate(this.templateId).catch((e=>console.log("Unknown Error",e)))}async componentWillLoad(){var e,t,s,i,l,o;try{this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return}if(!this.templateId){console.log(`[BUILD] No template ID, activating upload mode`);this.step="attachments";return}try{this.loadTemplate(this.templateId).catch((e=>console.log("[BUILD] Unable to load template",e)))}catch(i){console.log("[BUILD] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(s=i.response)===null||s===void 0?void 0:s.data))}}catch(e){console.log("[BUILD] Error with builder session",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new a(e.message,(l=e.response)===null||l===void 0?void 0:l.status,(o=e.response)===null||o===void 0?void 0:o.data))}}async loadTemplate(e){if(e){r.subscribe("templates",this.templateId,(()=>d(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}}disconnectedCallback(){console.log("[BUILD] Disconnected");this.unlistenToTemplate()}unlistenToTemplate(){if(this.templateListenerId){r.store.delListener(this.templateListenerId);this.templateListenerId=null}}handleCancel(){this.step="preview"}async handleTemplateCreated(e){var t;await this.loadTemplate(e);this.templateId=e;this.step="roles";(t=this.stepChanged)===null||t===void 0?void 0:t.emit("roles")}async handleRolesUpdated(e){var t;(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail)}async handleTemplateUpdated(e){var t;(t=this.templateUpdated)===null||t===void 0?void 0:t.emit(e.detail)}handleAttachmentsNext(){var e;this.step="roles";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("roles")}handleRolesNext(){var e;this.step="fields";(e=this.stepChanged)===null||e===void 0?void 0:e.emit("fields")}handleStepChanged(e){var t;this.step=e;(t=this.stepChanged)===null||t===void 0?void 0:t.emit(e)}render(){if(this.loading){return s(i,{class:"loading"},s("verdocs-loader",null))}if(!this.endpoint.session){return s(i,null,s("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return s(i,null,s("div",{class:"content"},s("verdocs-template-build-tabs",{endpoint:this.endpoint,templateId:this.templateId,step:this.step,onSdkError:e=>{var t;return(t=this.sdkError)===null||t===void 0?void 0:t.emit(e.detail)},onStepChanged:e=>this.handleStepChanged(e.detail)}),this.step==="attachments"&&s("verdocs-template-attachments",{templateId:this.templateId,endpoint:this.endpoint,onExit:()=>this.handleCancel(),onNext:()=>this.handleAttachmentsNext(),onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),this.step==="roles"&&s("verdocs-template-roles",{templateId:this.templateId,endpoint:this.endpoint,onExit:()=>this.handleCancel(),onNext:()=>this.handleRolesNext(),onRolesUpdated:e=>this.handleRolesUpdated(e)}),this.step==="settings"&&s("div",{style:{flexDirection:"column",gap:"20px",display:"flex",maxWidth:"400px",margin:"20px"}},s("verdocs-template-name",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),s("verdocs-template-reminders",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),s("verdocs-template-visibility",{templateId:this.templateId,endpoint:this.endpoint,style:{backgroundColor:"#ffffff",padding:"20px"},onTemplateUpdated:e=>this.handleTemplateUpdated(e)})),this.step==="fields"&&s("verdocs-template-fields",{templateId:this.templateId,endpoint:this.endpoint,onTemplateUpdated:e=>this.handleTemplateUpdated(e)}),this.step==="preview"&&s("div",{class:"preview-container"},s("div",{class:"preview-send-wrapper"},s("verdocs-send",{templateId:this.templateId,endpoint:this.endpoint,onSend:e=>{var t;return(t=this.send)===null||t===void 0?void 0:t.emit(e.detail)},style:{width:"100%"}})),s("div",{class:"preview-preview-wrapper"},s("verdocs-preview",{templateId:this.templateId,endpoint:this.endpoint,style:{display:"flex",flex:"1",maxWidth:"1000px"}})))))}get el(){return l(this)}static get watchers(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}}};c.style=p;export{c as verdocs_build};
2
+ //# sourceMappingURL=p-6f1e2f2f.entry.js.map
@@ -0,0 +1,2 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,i,t,n){function s(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?t(e.value):s(e.value).then(o,a)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(t=0)),t)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,i,t){if(t||arguments.length===2)for(var n=0,s=i.length,r;n<s;n++){if(r||!(n in i)){if(!r)r=Array.prototype.slice.call(i,0,n);r[n]=i[n]}}return e.concat(r||Array.prototype.slice.call(i))};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-f29eb00a.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-52c3e8b0.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var i,t,n,s,r,o,a,l,c,d,u,h,f,v,p,g,x,m,b,y,w,S,k,_,I,N,G,P,z,A,T,E,U,D,j;return{setters:[function(e){i=e.r;t=e.c;n=e.h;s=e.H;r=e.F},function(e){o=e.VerdocsEndpoint;a=e.startSigningSession;l=e.getKbaStep;c=e.envelopeRecipientAgree;d=e.envelopeRecipientDecline;u=e.updateEnvelopeField;h=e.createSignature;f=e.updateEnvelopeFieldSignature;v=e.createInitials;p=e.updateEnvelopeFieldInitials;g=e.isValidPhone;x=e.isValidEmail;m=e.sortFields;b=e.envelopeRecipientSubmit;y=e.getEnvelope;w=e.uploadEnvelopeFieldAttachment;S=e.deleteEnvelopeFieldAttachment;k=e.formatFullName;_=e.fullNameToInitials;I=e.submitKbaPin;N=e.submitKbaIdentity;G=e.submitKbaChallengeResponse;P=e.integerSequence},function(e){z=e.a;A=e.u;T=e.r;E=e.g},function(e){U=e.V},function(e){D=e.S},function(e){j=e.S},function(){},function(){},function(){}],execute:function(){var L='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);margin-top:15px}verdocs-sign .fatal-error .message{max-width:50%;width:50%;font-size:16px;background:white;border-radius:5px;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';var V=L;var Y=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var C=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var F=e("verdocs_sign",function(){function e(e){i(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeLoaded=t(this,"envelopeLoaded",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.recipientIndex=-1;this.endpoint=null;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.roleNames=[];this.sortedRecipients=[];this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.kbaStep="";this.kbaQuestions=[];this.showSpinner=false;this.kbaChoices=[];this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new o({sessionType:"signing"})}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,s,r,o,c,d,u,h;var f=this;return __generator(this,(function(v){switch(v.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new D("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new D("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new D("[SIGN] Missing required inviteCode",500,""));return[2]}v.label=1;case 1:v.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,a(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:c=v.sent(),d=c.envelope,u=c.recipient;console.log("[SIGN] Loaded signing session",d,u);this.recipient=u;this.envelope=d;j.updateEnvelope(this.envelopeId,d);this.sortedRecipients=__spreadArray([],this.envelope.recipients,true);this.sortedRecipients.sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}));this.roleNames=this.sortedRecipients.map((function(e){return e.role_name}));if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.recipientIndex=this.roleNames.findIndex((function(e){return e==f.roleId}));if(this.recipientIndex>-1){this.recipient=this.sortedRecipients[this.recipientIndex];this.agreed=this.recipient.agreed}else{console.warn("[SIGN] Could not find our recipient record",this.roleId,this.sortedRecipients)}this.submitted=this.recipient.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(this.recipient.status==="declined"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(n=this.envelopeLoaded)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope});if(!this.isDone){l(this.endpoint,this.envelopeId,this.roleId).then((function(e){var i;console.log("[SIGN] KBA Step",e);f.kbaStep=e.kba_step;if(f.kbaStep==="failed"){f.fatalErrorHeader="Identity Verification Failed";f.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";f.isDone=true}else{f.kbaQuestions=((i=e.questions)===null||i===void 0?void 0:i.question)||[];f.kbaChoices=[]}})).catch((function(e){return console.log("Error getting KBA step",e)}))}return[3,4];case 3:h=v.sent();console.log("[SIGN] Error with signing session",h);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new D(h.message,(r=h.response)===null||r===void 0?void 0:r.status,(o=h.response)===null||o===void 0?void 0:o.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var i=document.getElementById("verdocs-sign-header");if(e&&i){console.log("[SIGN] Moving header");i.remove();e.append(i)}};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;c(this.endpoint,this.envelopeId,this.roleId,true).then((function(){var i;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(i=e.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(i){var t,n,s;console.log("[SIGN] Update failure",i);e.submitting=false;(t=e.sdkError)===null||t===void 0?void 0:t.emit(new D(i.message,(n=i.response)===null||n===void 0?void 0:n.status,(s=i.response)===null||s===void 0?void 0:s.data))}))};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t,n,s,r,o,a,l;return __generator(this,(function(c){switch(c.label){case 0:o=e.detail.id;switch(o){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});return[3,7];case 2:U("This feature will be available in an upcoming release.");(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});return[3,7];case 3:this.submitting=true;return[4,d(this.endpoint,this.envelopeId,this.roleId)];case 4:a=c.sent();console.log("[SIGN] Decline result",a);(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified.";return[3,7];case 5:window.print();(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,7];case 6:{l=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(l){z(this.endpoint,this.envelope,l.id).catch((function(e){console.log("[SIGN] Error downloading PDF",e)}));(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,i){var t=this;console.log("[SIGN] updateRecipientFieldValue",e,i);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=i.value;n.settings=i.settings;A(n);t.checkRecipientFields()}}))};e.prototype.saveFieldChange=function(e,i){var t=this;console.log("[SIGN] saveFieldChange",e,i);u(this.endpoint,this.envelopeId,e,i).then((function(i){return t.updateRecipientFieldValue(e,i)})).catch((function(e){var i,n,s,r,o,a;if(((i=e.response)===null||i===void 0?void 0:i.status)===401&&((s=(n=e.response)===null||n===void 0?void 0:n.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");t.fatalErrorHeader="Signing Session Expired";t.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(r=t.sdkError)===null||r===void 0?void 0:r.emit(new D(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,i){return __awaiter(this,void 0,void 0,(function(){var t,n,s,r,o,a,l;var c=this;return __generator(this,(function(d){switch(d.label){case 0:t=i.target,n=t.value,s=t.checked;r=e.type;switch(r){case"textarea":return[3,1];case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:n})];case 2:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(i.target.checked)})]}d.label=3;case 3:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(i.target.checked)})]}d.label=4;case 4:console.log("Saving dropdown",e.name,i.detail);return[2,this.saveFieldChange(e.name,{prepared:false,value:i.detail})];case 5:if(!i.detail){return[2]}this.showSpinner=true;return[4,fetch(i.detail)];case 6:return[4,d.sent().blob()];case 7:o=d.sent();return[2,v(this.endpoint,"initial",o).then((function(i){return __awaiter(c,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,p(this.endpoint,this.envelopeId,e.name,i.id)];case 1:t=n.sent();this.updateRecipientFieldValue(e.name,t);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);c.showSpinner=false}))];case 8:if(!i.detail){return[2]}this.showSpinner=true;return[4,fetch(i.detail)];case 9:return[4,d.sent().blob()];case 10:a=d.sent();return[2,h(this.endpoint,"signature",a).then((function(i){return __awaiter(c,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",i);return[4,f(this.endpoint,this.envelopeId,e.name,i.id)];case 1:t=n.sent();this.updateRecipientFieldValue(e.name,t);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);c.showSpinner=false}))];case 11:l=i.detail.formattedDate;if(l){return[2,this.saveFieldChange(e.name,{prepared:false,value:l})]}return[3,14];case 12:console.log("[SIGN] Updating timestamp",{value:n,ts:i.target.getAttribute("timestamp")});return[3,14];case 13:console.log("[SIGN] Unhandled field update",{value:n,checked:s},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldFilled=function(e){var i=e.value,t=i===void 0?"":i;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return x(t);case"phone":return g(t);default:return(t||"").trim()!==""}case"signature":return t==="signed";case"initial":return t==="initialed";case"timestamp":return true;case"date":return!!t;case"attachment":return t==="attached";case"dropdown":return t!=="";case"checkbox":return t==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((function(i){return i.group===e.group})).some((function(e){return e.value==="true"}))}return e.value==="true";default:return false}};e.prototype.isFieldValid=function(e){return!e.required||this.isFieldFilled(e)};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));m(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,s,r,o,a,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:if(!this.nextSubmits)return[3,5];u.label=1;case 1:u.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,b(this.endpoint,this.envelopeId,this.roleId)];case 2:i=u.sent();console.log("[SIGN] Submitted successfully",i);this.recipient.status="submitted";this.showDone=true;console.log("[SIGN] Reloading envelope");y(this.endpoint,this.envelopeId).then((function(e){d.envelope=e;d.submitting=false})).catch((function(e){console.log("[SIGN] Error reloading envelope",e);d.submitting=false}));return[3,4];case 3:t=u.sent();console.log("[SIGN] Error submitting",t);return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return e.required&&!d.isFieldFilled(e)}));m(n);s=n.findIndex((function(e){return e.name===d.focusedField}));r=s+1;if(r>=n.length){r=0}o=n[r];a=0;if(a<n.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){a++;r++;if(r>=n.length){r=0}o=n[r]}if(a>=n.length){o=null}if(o){l=E(o);c=document.getElementById(l);c===null||c===void 0?void 0:c.scrollIntoView({behavior:"smooth"});c===null||c===void 0?void 0:c.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.getRecipientFields=function(){var e=this;return this.envelope.fields.filter((function(i){return i.role_name===e.recipient.role_name}))};e.prototype.checkRecipientFields=function(){var e=this;var i=this.getRecipientFields().filter((function(i){return!e.isFieldValid(i)}));if(i.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",i.map((function(e){return e.name})));this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,i,t){var n=this;if(t.getAttribute("attached")==="1"){return}t.setAttribute("attached","1");t.addEventListener("input",(function(e){if(e.target.type==="radio"||e.target.type==="checkbox"){n.handleFieldChange(i,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));t.addEventListener("attached",(function(t){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onAttached",t.detail,t.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,w(this.endpoint,this.envelopeId,i.name,t.detail)];case 2:n=o.sent();this.updateRecipientFieldValue(i.name,n);this.checkRecipientFields();s=T("envelope",i,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,i,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);U("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));t.addEventListener("deleted",(function(t){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onDeleted",t.detail,t.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,S(this.endpoint,this.envelopeId,i.name)];case 2:n=o.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(i.name,n);this.checkRecipientFields();s=T("envelope",i,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,i,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);U("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));t.addEventListener("focusout",(function(e){if(i.type!=="dropdown"&&i.type!=="attachment"){n.handleFieldChange(i,e).finally((function(){return n.checkRecipientFields()}))}}));t.addEventListener("fieldChange",(function(e){n.handleFieldChange(i,e).finally((function(){return n.checkRecipientFields()}))}));t.setAttribute("templateid",this.envelope.template_id);t.setAttribute("fieldname",i.name);t.setAttribute("page",e.pageNumber);t.setAttribute("xScale",e.xScale);t.setAttribute("yScale",e.yScale);var s=k(this.recipient);t.setAttribute("initials",_(s));t.setAttribute("name",s)};e.prototype.handlePageRendered=function(e){var i=this;var t=e.detail;var n=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",t.pageNumber,n);n.forEach((function(e,n){if(e.page!==t.pageNumber){return}var s=T("envelope",e,t,{disabled:false,editable:false,draggable:false,done:i.isDone},n);if(!s){return}if(Array.isArray(s)){s.map((function(n){return i.attachFieldAttributes(t,e,n)}))}else{i.attachFieldAttributes(t,e,s)}}));this.sortedRecipients.filter((function(e){return e.role_name!==i.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){i.getRecipientFields().filter((function(e){return e.page===t.pageNumber})).forEach((function(e){var n=T("envelope",e,t,{disabled:true,editable:false,draggable:false,done:i.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return i.attachFieldAttributes(t,e,n)}))}else{i.attachFieldAttributes(t,e,n)}}))}));this.checkRecipientFields()};e.prototype.render=function(){var e=this;if(this.showLoadError){return n(s,null,n("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:"Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.",buttonLabel:"OK",onNext:function(){window.location.reload()}}))}if(!this.envelope){return n(s,null,n("verdocs-loader",null))}if(this.fatalErrorMessage){return n(s,{class:{agreed:this.agreed}},n("div",{class:"fatal-error"},n("div",{class:"message"},n("div",{class:"header"},this.fatalErrorHeader),n("p",null,this.fatalErrorMessage))))}if(this.isDone){return n(s,{class:{agreed:this.agreed}},n("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(i){var t;return(t=e.sdkError)===null||t===void 0?void 0:t.emit(i.detail)}}),this.showDone&&n("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(i){i.preventDefault();i.stopPropagation();e.showDone=false;e.isDone=true}}),this.submitting&&n("div",{class:"loading-indicator"},n("verdocs-loader",null)))}if(!this.agreed){return n(s,{class:"agreed"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"agree"},n("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:function(){return e.handleClickAgree()}}),n("ul",null,n("li",null,"Agree to use electronic records and signatures, and confirm you have read the"," ",n("a",{href:"https://verdocs.com/en/electronic-record-signature-disclosure/",target:"_blank"},"Electronic Record and Signatures Disclosure"),"."),n("li",null,"Agree to Verdocs'"," ",n("a",{href:"https://verdocs.com/en/eula",target:"_blank"},"End User License Agreement")," ","and confirm you have read Verdocs'"," ",n("a",{href:"https://verdocs.com/en/privacy-policy/",target:"_blank"},"Privacy Policy"),".")))))}if(this.kbaStep==="pin"){return n(s,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"kba"},n("verdocs-kba-dialog",{mode:"text",step:1,steps:1,helptitle:"Document is protected by a PIN code",helptext:"Please enter your PIN code to proceed. If you do not have one, please contact the sender.",label:"PIN Code",onNext:function(i){return __awaiter(e,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){I(this.endpoint,this.envelopeId,this.roleId,i.detail).then((function(i){console.log("[SIGN] PIN code submission result",i);if(i.kba_step==="complete"){e.kbaStep=""}})).catch((function(e){var i,t;console.log("[SIGN] Error submitting PIN",e);U(((t=(i=e.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)||"Unable to verify PIN code. Please try again.",{style:"error"})}));return[2]}))}))}}))))}if(this.kbaStep==="identity"){return n(s,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"kba"},n("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:function(i){return __awaiter(e,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(n){e=i.detail;N(this.endpoint,this.envelopeId,this.roleId,{firstName:e.first_name,lastName:e.last_name,address:e.address,city:e.city,state:e.state,zip:e.zip,ssnLast4:e.ssn_last_4}).then((function(e){console.log("[SIGN] Identity submission result",e);t.kbaStep=e.kba_step})).catch((function(e){var i,t;console.log("[SIGN] Error submitting identity",e);U(((t=(i=e.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)||"Unable to verify identity.",{style:"error"})}));return[2]}))}))}}))))}if(this.kbaStep==="challenge"){var i=this.kbaChoices.length;var t=this.kbaQuestions[i];return n(s,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?n("verdocs-spinner",null):n("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(t===null||t===void 0?void 0:t.prompt)||"Please select one of the options below.",choices:(t===null||t===void 0?void 0:t.answer)||["Skip Question"],step:i+1,steps:this.kbaQuestions.length,onNext:function(i){return __awaiter(e,void 0,void 0,(function(){var e,t,n,s,r,o,a;var l=this;return __generator(this,(function(c){switch(c.label){case 0:s=i.detail;this.kbaChoices=__spreadArray(__spreadArray([],this.kbaChoices,true),[s],false);if(!(this.kbaChoices.length>=this.kbaQuestions.length))return[3,4];r=this.kbaQuestions.map((function(e,i){return{type:e.type,answer:l.kbaChoices[i]}}));console.log("Submitting KBA responses",this.kbaChoices,r);c.label=1;case 1:c.trys.push([1,3,,4]);return[4,G(this.endpoint,this.envelopeId,this.roleId,r)];case 2:o=c.sent();console.log("KBA challenge response",o);this.kbaStep=o.kba_step;if(this.kbaStep==="failed"){this.fatalErrorHeader="Identity Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}else{this.kbaQuestions=((e=o.questions)===null||e===void 0?void 0:e.question)||[];this.kbaChoices=[]}return[3,4];case 3:a=c.sent();console.log("Error submitting KBA challenge",a);this.kbaStep="";this.fatalErrorHeader="Unable to Verify Identity";this.fatalErrorMessage=((n=(t=a.response)===null||t===void 0?void 0:t.data)===null||n===void 0?void 0:n.error)||"Please try again later.";this.isDone=true;return[3,4];case 4:return[2]}}))}))}}))))}return n(s,null,n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name),n("div",{style:{flex:"1"}}),!this.finishLater&&n("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed,onClick:function(){return e.handleNext()}}),n("div",{style:{marginLeft:"10px"}}),n("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?Y:C,onOptionSelected:function(i){return e.handleOptionSelected(i)}}))),n("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((function(i){var t=P(1,i.pages);return n(r,null,t.map((function(t){var s;var r=((s=i.page_sizes)===null||s===void 0?void 0:s[t])||{width:612,height:792};return n("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:i.id,endpoint:e.endpoint,virtualWidth:r.width,virtualHeight:r.height,pageNumber:t,onPageRendered:function(i){return e.handlePageRendered(i)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&n("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.showDone&&n("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.submitting||this.showSpinner&&n("verdocs-portal",null,n("div",{class:"spinner-overlay"},n("verdocs-spinner",null))))};return e}());F.style=V}}}));
2
+ //# sourceMappingURL=p-70247599.system.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["verdocsSignCss","VerdocsSignStyle0","inProgressMenuOptions","id","label","doneMenuOptions","VerdocsSign","exports","this","recipientIndex","class_1","prototype","componentWillLoad","endpoint","console","log","VerdocsEndpoint","sessionType","componentDidLoad","envelopeId","_a","sdkError","emit","SDKError","roleId","_b","inviteCode","_c","concat","startSigningSession","_h","_j","sent","envelope","recipient","Store","updateEnvelope","sortedRecipients","__spreadArray","recipients","sort","a","b","sequence","order","roleNames","map","r","role_name","documents","length","documentsSingularPlural","findIndex","roleName","_this","agreed","warn","submitted","status","isDone","showDone","fatalErrorHeader","fatalErrorMessage","nextButtonLabel","checkRecipientFields","_d","envelopeLoaded","getKbaStep","then","kbaStep","kba_step","kbaQuestions","questions","question","kbaChoices","catch","e","e_1","_e","message","_f","response","_g","data","showLoadError","componentDidRender","headerTarget","headerTargetId","document","getElementById","headerEl","remove","append","handleClickAgree","submitting","envelopeRecipientAgree","envelopeUpdated","event","handleOptionSelected","detail","finishLater","showFinishLater","VerdocsToast","envelopeRecipientDecline","declineResult","window","print","firstDoc","find","doc","type","saveAttachment","updateRecipientFieldValue","fieldName","updateResult","getRecipientFields","forEach","oldField","name","value","settings","updateDocumentFieldValue","saveFieldChange","fields","updateEnvelopeField","error","handleFieldChange","field","target","checked","prepared","String","showSpinner","fetch","_k","blob","initialsBlob","createInitials","newInitials","__awaiter","updateEnvelopeFieldInitials","signatureBlob","createSignature","newSignature","updateEnvelopeFieldSignature","formattedDate","ts","getAttribute","isFieldFilled","validator","isValidEmail","isValidPhone","trim","group","filter","f","some","isFieldValid","required","getSortedFillableFields","recipientFields","sortFields","handleNext","nextSubmits","envelopeRecipientSubmit","result","getEnvelope","e_2","emptyFields","focusedIndex","focusedField","nextFocusedIndex","nextRequiredField","skips","includes","getFieldId","el","scrollIntoView","behavior","focusField","invalidFields","attachFieldAttributes","pageInfo","setAttribute","addEventListener","finally","uploadEnvelopeFieldAttachment","newEl","renderDocumentField","disabled","editable","draggable","done","e_3","style","deleteEnvelopeFieldAttachment","e_4","template_id","pageNumber","xScale","yScale","fullName","formatFullName","fullNameToInitials","handlePageRendered","tabIndex","page","Array","isArray","render","h","Host","heading","buttonLabel","onNext","location","reload","class","onSdkError","preventDefault","stopPropagation","src","alt","paddingTop","width","height","boxShadow","marginTop","onInput","href","mode","step","steps","helptitle","helptext","submitKbaPin","recipDetails","submitKbaIdentity","firstName","first_name","lastName","last_name","address","city","state","zip","ssnLast4","ssn_last_4","questionNumber","kbaQuestion","prompt","choices","answer","responses","q","i","submitKbaChallengeResponse","e_5","flex","size","onClick","marginLeft","options","onOptionSelected","envelopeDocument","pageNumbers","integerSequence","pages","Fragment","pageSize","page_sizes","documentId","virtualWidth","virtualHeight","onPageRendered","layers"],"sources":["src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n //.intro {\n // width: 100%;\n // display: flex;\n // flex: 0 0 60px;\n // color: #111111;\n // font-size: 18px;\n // font-weight: 500;\n // line-height: 28px;\n // flex-direction: row;\n // background: #ffffff;\n //\n // .inner {\n // width: 100%;\n // display: flex;\n // margin: 0 auto;\n // padding: 0 20px;\n // max-width: 1200px;\n // flex-direction: row;\n // align-items: center;\n // }\n //}\n\n > .document {\n flex: 1;\n width: 100%;\n height: 100%;\n align-self: center;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n max-width: 1200px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n //justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 5000;\n position: absolute;\n padding-top: 100px;\n align-items: center;\n flex-direction: column;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .agree {\n flex: 0;\n width: 600px;\n display: flex;\n max-width: 90%;\n padding: 30px 15px;\n flex-direction: column;\n background-color: #ffffff;\n\n .header {\n flex: 0 0 56px;\n }\n\n li {\n margin: 0.5em 0;\n }\n }\n\n verdocs-ok-dialog .background-overlay {\n align-items: flex-start;\n padding-top: 100px;\n }\n\n .loading-indicator {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 10000;\n position: fixed;\n background-color: rgba(0, 0, 0, 0.7);\n }\n\n .fatal-error {\n position: absolute;\n z-index: 100;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #4a4a4a;\n display: flex;\n align-items: center;\n justify-content: center;\n\n .placeholder {\n position: absolute;\n opacity: 0.1;\n z-index: -1;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n margin-top: 15px;\n }\n\n .message {\n max-width: 50%;\n width: 50%;\n font-size: 16px;\n background: white;\n border-radius: 5px;\n box-shadow: 3px 3px 9px -1px #0000003f;\n }\n\n .header {\n color: white;\n font-size: 18px;\n font-weight: 500;\n padding: 5px 10px;\n margin: 0 0 10px 0;\n background: $verdocs-purple-shade;\n }\n\n p {\n margin: 1rem;\n font-size: 14px;\n font-weight: 400;\n padding: 0 10px;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n\n#verdocs-sign-header {\n color: #fff;\n width: 100%;\n display: flex;\n z-index: 1000;\n flex: 0 0 46px;\n font-size: 12px;\n column-gap: 15px;\n align-items: center;\n flex-direction: row;\n transition: all 0.25s;\n background-color: $medium-bg;\n box-shadow:\n 0 4px 4px 0 rgb(0 0 0 / 24%),\n 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .inner {\n width: 100%;\n display: flex;\n margin: 0 auto;\n padding: 0 12px;\n max-width: 1200px;\n align-items: center;\n flex-direction: row;\n }\n\n .logo {\n width: 80px;\n display: none;\n margin: -6px 0 0 0;\n }\n\n .title {\n font-size: 18px;\n font-weight: 500;\n overflow: hidden;\n white-space: nowrap;\n padding: 0 10px 0 0;\n text-overflow: ellipsis;\n }\n}\n\n.spinner-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n background: #0000007f;\n justify-content: center;\n}\n","import type {IEnvelope, IEnvelopeField, IRecipient} from '@verdocs/js-sdk';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {updateEnvelopeFieldSignature, uploadEnvelopeFieldAttachment, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {updateEnvelopeField, sortFields, submitKbaIdentity, submitKbaChallengeResponse} from '@verdocs/js-sdk';\nimport {fullNameToInitials, startSigningSession, deleteEnvelopeFieldAttachment, getKbaStep} from '@verdocs/js-sdk';\nimport {getEnvelope, integerSequence, isValidEmail, isValidPhone, submitKbaPin, updateEnvelopeFieldInitials} from '@verdocs/js-sdk';\nimport {createInitials, createSignature, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit, formatFullName} from '@verdocs/js-sdk';\nimport {getFieldId, renderDocumentField, saveAttachment, updateDocumentFieldValue} from '../../../utils/utils';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst inProgressMenuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing'},\n {id: 'download', label: 'Download'},\n];\n\nconst doneMenuOptions = [\n {id: 'print', label: 'Print'},\n {id: 'download', label: 'Download'},\n];\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop({mutable: true}) endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop({reflect: true}) envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop({reflect: true}) roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop({reflect: true}) inviteCode: string | null = null;\n\n /**\n * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this\n * component renders, the header will be removed from its default location and placed in the target element.\n * This allows the parent application to more easily control its placement and scroll effects (e.g. \"fixed\").\n *\n * The movement of the header to the target container is not dynamic - it is performed only on the initial\n * render. Host applications should not conditionally render this container. If the header's visibility must\n * be externally controlled, use CSS display options to hide/show it instead.\n */\n @Prop() headerTargetId: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() roleNames: string[] = [];\n @State() sortedRecipients: IRecipient[] = [];\n @State() recipient: IRecipient | null = null;\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() fatalErrorHeader = '';\n @State() fatalErrorMessage = '';\n @State() focusedField = '';\n @State() submitting = false;\n @State() submitted = false;\n @State() isDone = false;\n @State() showDone = false;\n @State() showLoadError = false;\n @State() finishLater = false;\n @State() showFinishLater = false;\n @State() agreed = false;\n @State() documentsSingularPlural = 'document';\n @State() kbaStep = '';\n @State() kbaQuestions: any[] = [];\n @State() showSpinner = false;\n @State() kbaChoices = [];\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n\n recipientIndex: number = -1;\n\n componentWillLoad() {\n if (!this.endpoint) {\n console.log('[SIGN] Creating signing endpoint');\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n\n // NOTE: We don't listen to the store here because we are often an independent\n // session and might have a different \"view\" of the envelope.\n const {envelope, recipient} = await startSigningSession(this.endpoint, this.envelopeId, this.roleId, this.inviteCode);\n console.log(`[SIGN] Loaded signing session`, envelope, recipient);\n this.recipient = recipient;\n this.envelope = envelope;\n\n Store.updateEnvelope(this.envelopeId, envelope);\n\n // TODO: Can be cleaned up shortly.\n this.sortedRecipients = [...this.envelope.recipients];\n this.sortedRecipients.sort((a, b) => {\n return a.sequence === b.sequence ? a.order - b.order : a.sequence - b.sequence;\n });\n\n this.roleNames = this.sortedRecipients.map(r => r.role_name);\n\n if (this.envelope.documents.length > 0) {\n this.documentsSingularPlural = 'document(s)';\n }\n\n this.recipientIndex = this.roleNames.findIndex(roleName => roleName == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = this.sortedRecipients[this.recipientIndex];\n this.agreed = this.recipient.agreed;\n } else {\n console.warn('[SIGN] Could not find our recipient record', this.roleId, this.sortedRecipients);\n }\n\n // TODO: Envelope \"complete\" | \"declined\" | \"canceled\"\n // TODO: Recipient \"canceled\"\n this.submitted = this.recipient.status === 'submitted';\n this.isDone = this.submitted;\n this.showDone = this.submitted;\n\n if (this.envelope.status === 'canceled') {\n this.fatalErrorHeader = 'Unable to Start Signing Session';\n this.fatalErrorMessage = 'This envelope has been canceled. The sender has been notified.';\n } else if (this.recipient.status === 'declined') {\n this.fatalErrorHeader = 'Unable to Start Signing Session';\n this.fatalErrorMessage = 'You have declined to sign this envelope. The sender has been notified.';\n } else if (this.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n this.checkRecipientFields();\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: this.envelope});\n\n if (!this.isDone) {\n getKbaStep(this.endpoint, this.envelopeId, this.roleId)\n .then(r => {\n console.log('[SIGN] KBA Step', r);\n this.kbaStep = r.kba_step;\n if (this.kbaStep === 'failed') {\n this.fatalErrorHeader = 'Identity Verification Failed';\n this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n this.isDone = true;\n } else {\n this.kbaQuestions = (r as any).questions?.question || [];\n this.kbaChoices = [];\n }\n })\n .catch(e => console.log('Error getting KBA step', e));\n }\n } catch (e) {\n console.log('[SIGN] Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n this.showLoadError = true;\n }\n }\n\n componentDidRender() {\n const headerTarget = this.headerTargetId ? document.getElementById(this.headerTargetId) : null;\n const headerEl = document.getElementById('verdocs-sign-header');\n if (headerTarget && headerEl) {\n console.log('[SIGN] Moving header');\n headerEl.remove();\n headerTarget.append(headerEl);\n }\n }\n\n handleClickAgree() {\n this.submitting = true;\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(() => {\n this.nextButtonLabel = 'Next';\n this.recipient.agreed = true;\n this.submitting = false;\n this.agreed = true; // The server returns a recipient object but it's not \"deep\" so we track this locally\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('[SIGN] Update failure', e);\n this.submitting = false;\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e: any) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'later'});\n break;\n\n case 'claim':\n VerdocsToast('This feature will be available in an upcoming release.');\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'claimed'});\n break;\n\n case 'decline':\n {\n this.submitting = true;\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Decline result', declineResult);\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'declined'});\n this.submitting = false;\n this.fatalErrorHeader = 'Declined';\n this.fatalErrorMessage = 'You have declined to sign this envelope. The sender has been notified.';\n }\n break;\n\n case 'print':\n window.print();\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'printed'});\n break;\n\n case 'download':\n {\n const firstDoc = this.envelope.documents.find(doc => doc.type === 'attachment');\n if (firstDoc) {\n saveAttachment(this.endpoint, this.envelope, firstDoc.id).catch(e => {\n console.log('[SIGN] Error downloading PDF', e);\n });\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n }\n }\n break;\n }\n }\n\n updateRecipientFieldValue(fieldName: string, updateResult: any) {\n console.log('[SIGN] updateRecipientFieldValue', fieldName, updateResult);\n this.getRecipientFields().forEach(oldField => {\n if (oldField.name === fieldName) {\n oldField.value = updateResult.value;\n // TODO: Keeping this while attachments still rely on it\n oldField.settings = updateResult.settings;\n updateDocumentFieldValue(oldField);\n this.checkRecipientFields();\n }\n });\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n console.log('[SIGN] saveFieldChange', fieldName, fields);\n updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .then(updateResult => this.updateRecipientFieldValue(fieldName, updateResult))\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n console.log('[SIGN] Signing session expired');\n this.fatalErrorHeader = 'Signing Session Expired';\n this.fatalErrorMessage = 'Please reload your browser to continue.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IEnvelopeField, e: any) {\n const {value, checked} = e.target;\n\n switch (field.type as any) {\n // TODO: Remove legacy type when no longer needed\n case 'textarea':\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox': {\n return this.saveFieldChange(field.name, {prepared: false, value: String(e.target.checked)});\n }\n\n case 'radio': {\n return this.saveFieldChange(field.name, {prepared: false, value: String(e.target.checked)});\n }\n\n case 'dropdown':\n // TODO: Set prepared to false server-side.\n console.log('Saving dropdown', field.name, e.detail);\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n // This can be caused by a focus-out event if the user clicks the field\n // after it's already filled in, then clicks something else like a textbox.\n // We don't visually indicate the focus, but it's still there.\n if (!e.detail) {\n return;\n }\n\n this.showSpinner = true;\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(async newInitials => {\n const updateResult = await updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.showSpinner = false;\n })\n .catch(e => {\n console.log('Error updating initials', e);\n this.showSpinner = false;\n });\n\n case 'signature':\n // This can be caused by a focus-out event if the user clicks the field\n // after it's already filled in, then clicks something else like a textbox.\n // We don't visually indicate the focus, but it's still there.\n if (!e.detail) {\n return;\n }\n\n this.showSpinner = true;\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(async newSignature => {\n console.log('Signature update result', newSignature);\n const updateResult = await updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.showSpinner = false;\n })\n .catch(e => {\n console.warn('[SIGN] Error updating signature', e);\n this.showSpinner = false;\n });\n\n case 'date':\n const {formattedDate} = e.detail;\n if (formattedDate) {\n return this.saveFieldChange(field.name, {prepared: false, value: formattedDate});\n }\n break;\n\n case 'timestamp':\n console.log('[SIGN] Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('[SIGN] Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldFilled(field: IEnvelopeField) {\n const {value = ''} = field;\n switch (field.type as any) {\n case 'textarea':\n case 'textbox':\n switch (field.validator || '') {\n case 'email':\n return isValidEmail(value);\n case 'phone':\n return isValidPhone(value);\n default:\n return (value || '').trim() !== '';\n }\n\n case 'signature':\n return value === 'signed';\n\n case 'initial':\n return value === 'initialed';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'date':\n return !!value;\n\n case 'attachment':\n return value === 'attached';\n\n case 'dropdown':\n return value !== '';\n\n case 'checkbox':\n return value === 'true';\n\n case 'radio':\n if (!!field.group) {\n return this.getRecipientFields()\n .filter(f => f.group === field.group)\n .some(field => field.value === 'true');\n }\n\n return field.value === 'true';\n\n default:\n return false;\n }\n }\n\n isFieldValid(field: IEnvelopeField) {\n return !field.required || this.isFieldFilled(field);\n }\n\n getSortedFillableFields() {\n const recipientFields = this.getRecipientFields().filter(field => field.type !== 'timestamp');\n sortFields(recipientFields);\n return recipientFields;\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n // Patches the date picker to be forcibly removed if still showing during submission\n document.getElementById('air-datepicker-global-container')?.remove();\n\n this.submitting = true;\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.recipient.status = 'submitted';\n this.showDone = true;\n console.log('[SIGN] Reloading envelope');\n getEnvelope(this.endpoint, this.envelopeId)\n .then(envelope => {\n this.envelope = envelope;\n // The show-done dialog does this\n // this.isDone = true;\n this.submitting = false;\n })\n .catch(e => {\n // this.isDone = true;\n console.log('[SIGN] Error reloading envelope', e);\n this.submitting = false;\n });\n } catch (e) {\n console.log('[SIGN] Error submitting', e);\n }\n\n return;\n }\n\n // Find and focus the next incomplete field (that is fillable)\n const emptyFields = this.getSortedFillableFields().filter(field => field.required && !this.isFieldFilled(field));\n sortFields(emptyFields);\n\n const focusedIndex = emptyFields.findIndex(field => field.name === this.focusedField);\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= emptyFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = emptyFields[nextFocusedIndex];\n // console.log('Next field', nextRequiredField, emptyFields);\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < emptyFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && ['initialed', 'signed'].includes(nextRequiredField.value)) {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= emptyFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = emptyFields[nextFocusedIndex];\n }\n\n if (skips >= emptyFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.scrollIntoView({behavior: 'smooth'});\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n getRecipientFields() {\n return this.envelope.fields.filter(field => field.role_name === this.recipient.role_name);\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const invalidFields = this.getRecipientFields().filter(field => !this.isFieldValid(field));\n if (invalidFields.length < 1) {\n this.nextButtonLabel = 'Finish';\n if (!this.nextSubmits) {\n this.nextSubmits = true;\n }\n } else {\n console.log(\n '[SIGN] Invalid fields remaining',\n invalidFields.map(field => field.name),\n );\n this.nextButtonLabel = 'Next';\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, el) {\n // We can get called multiple times as rendering completes and it's hard to avoid that\n // because it's a ton of work for the callers to know it's been done already. But we\n // don't want to attach multiple event listeners or we get dupe event handling, like\n // calling the server twice on every field update. Since JS has no removeAllEventListeners()\n // option, using removeEventListener() isn't reliable the way Stencil binds local function\n // contexts, and cloneNode messes up the rest of the rendering, we just track it with a flag.\n if (el.getAttribute('attached') === '1') {\n return;\n }\n el.setAttribute('attached', '1');\n\n el.addEventListener('input', (e: any) => {\n // console.log('[SIGN] onfieldInput', e.detail, e.target.value);\n // These field types don't emit fieldChange. Should we standardize on that? We don't tap \"input\" for fields like\n // text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.\n if (e.target.type === 'radio' || e.target.type === 'checkbox') {\n // if (e.target.type === 'radio' || e.target.name.includes('date') || e.target.name.includes('checkbox')) {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n } else {\n this.checkRecipientFields();\n }\n });\n el.addEventListener('attached', async (e: any) => {\n console.log('[SIGN] onAttached', e.detail, e.target.value);\n this.showSpinner = true;\n try {\n const updateResult = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name, e.detail);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.checkRecipientFields();\n\n const newEl = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone});\n this.attachFieldAttributes(pageInfo, field, newEl);\n\n this.showSpinner = false;\n } catch (e) {\n console.log('Error uploading attachment', e);\n VerdocsToast('Unable to upload attachment, please try again later', {style: 'error'});\n this.showSpinner = false;\n }\n });\n el.addEventListener('deleted', async (e: any) => {\n console.log('[SIGN] onDeleted', e.detail, e.target.value);\n this.showSpinner = true;\n try {\n const updateResult = await deleteEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name);\n console.log('[SIGN] Deleted attachment', updateResult);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.checkRecipientFields();\n\n const newEl = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone});\n this.attachFieldAttributes(pageInfo, field, newEl);\n\n this.showSpinner = false;\n } catch (e) {\n console.log('Error uploading attachment', e);\n VerdocsToast('Unable to upload attachment, please try again later', {style: 'error'});\n this.showSpinner = false;\n }\n });\n el.addEventListener('focusout', e => {\n // These field types trigger focusout as they're used, even without a value change\n if (field.type !== 'dropdown' && field.type !== 'attachment') {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n }\n });\n el.addEventListener('fieldChange', e => {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n });\n\n el.setAttribute('templateid', this.envelope.template_id);\n el.setAttribute('fieldname', field.name);\n el.setAttribute('page', pageInfo.pageNumber);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n\n const fullName = formatFullName(this.recipient);\n el.setAttribute('initials', fullNameToInitials(fullName));\n el.setAttribute('name', fullName);\n }\n\n handlePageRendered(e: any) {\n const pageInfo = e.detail as IDocumentPageInfo;\n\n // NOTE: We don't filter on pageNumber here because we need the position in the\n // entire list to set the tabIndex.\n const recipientFields = this.getSortedFillableFields();\n console.log('[SIGN] Rendering fields for page', pageInfo.pageNumber, recipientFields);\n\n // First render the fields for the signer\n recipientFields.forEach((field, tabIndex) => {\n if (field.page !== pageInfo.pageNumber) {\n return;\n }\n\n const el = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone}, tabIndex);\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, el);\n }\n });\n\n // Now render the fields for other signers who have yet to act\n this.sortedRecipients\n .filter(r => r.role_name !== this.recipient.role_name && (r.status === 'invited' || r.status === 'opened' || r.status === 'pending'))\n .forEach(() => {\n this.getRecipientFields()\n .filter(field => field.page === pageInfo.pageNumber)\n .forEach(field => {\n const el = renderDocumentField('envelope', field, pageInfo, {disabled: true, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, el);\n }\n });\n });\n\n this.checkRecipientFields();\n }\n\n render() {\n if (this.showLoadError) {\n return (\n <Host>\n <verdocs-ok-dialog\n heading=\"Unable to Start Signing\"\n message={`Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`}\n buttonLabel=\"OK\"\n onNext={() => {\n window.location.reload();\n }}\n />\n </Host>\n );\n }\n\n if (!this.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (this.fatalErrorMessage) {\n return (\n <Host class={{agreed: this.agreed}}>\n <div class=\"fatal-error\">\n <div class=\"message\">\n <div class=\"header\">{this.fatalErrorHeader}</div>\n <p>{this.fatalErrorMessage}</p>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.isDone) {\n return (\n <Host class={{agreed: this.agreed}}>\n <verdocs-view endpoint={this.endpoint} envelopeId={this.envelopeId} onSdkError={e => this.sdkError?.emit(e.detail)} />\n\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message={`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`}\n onNext={(e: any) => {\n e.preventDefault();\n e.stopPropagation();\n this.showDone = false;\n this.isDone = true;\n }}\n />\n )}\n\n {this.submitting && (\n <div class=\"loading-indicator\">\n <verdocs-loader />\n </div>\n )}\n </Host>\n );\n }\n\n if (!this.agreed) {\n return (\n <Host class=\"agreed\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"By checking this box, you:\" onInput={() => this.handleClickAgree()} />\n <ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the{' '}\n <a href=\"https://verdocs.com/en/electronic-record-signature-disclosure/\" target=\"_blank\">\n Electronic Record and Signatures Disclosure\n </a>\n .\n </li>\n <li>\n Agree to Verdocs'{' '}\n <a href=\"https://verdocs.com/en/eula\" target=\"_blank\">\n End User License Agreement\n </a>{' '}\n and confirm you have read Verdocs'{' '}\n <a href=\"https://verdocs.com/en/privacy-policy/\" target=\"_blank\">\n Privacy Policy\n </a>\n .\n </li>\n </ul>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.kbaStep === 'pin') {\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n <verdocs-kba-dialog\n mode=\"text\"\n step={1}\n steps={1}\n helptitle=\"Document is protected by a PIN code\"\n helptext=\"Please enter your PIN code to proceed. If you do not have one, please contact the sender.\"\n label=\"PIN Code\"\n onNext={async e => {\n submitKbaPin(this.endpoint, this.envelopeId, this.roleId, e.detail as string)\n .then(r => {\n console.log('[SIGN] PIN code submission result', r);\n if (r.kba_step === 'complete') {\n this.kbaStep = '';\n }\n })\n .catch(e => {\n console.log('[SIGN] Error submitting PIN', e);\n VerdocsToast(e.response?.data?.error || 'Unable to verify PIN code. Please try again.', {style: 'error'});\n });\n }}\n />\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.kbaStep === 'identity') {\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n <verdocs-kba-dialog\n mode=\"identity\"\n helptitle=\"Document requires identity verification\"\n helptext=\"Please complete your contact details to proceed.\"\n recipient={this.recipient}\n onNext={async e => {\n const recipDetails = e.detail as IRecipient;\n submitKbaIdentity(this.endpoint, this.envelopeId, this.roleId, {\n firstName: recipDetails.first_name,\n lastName: recipDetails.last_name,\n address: recipDetails.address,\n city: recipDetails.city,\n state: recipDetails.state,\n zip: recipDetails.zip,\n ssnLast4: recipDetails.ssn_last_4,\n })\n .then(r => {\n console.log('[SIGN] Identity submission result', r);\n this.kbaStep = r.kba_step;\n })\n .catch(e => {\n console.log('[SIGN] Error submitting identity', e);\n VerdocsToast(e.response?.data?.error || 'Unable to verify identity.', {style: 'error'});\n });\n }}\n />\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.kbaStep === 'challenge') {\n const questionNumber = this.kbaChoices.length;\n const kbaQuestion = this.kbaQuestions[questionNumber];\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n {this.kbaChoices.length >= this.kbaQuestions.length ? (\n <verdocs-spinner />\n ) : (\n <verdocs-kba-dialog\n mode=\"choice\"\n helptitle=\"Your identity requires additional verification\"\n helptext={kbaQuestion?.prompt || 'Please select one of the options below.'}\n choices={kbaQuestion?.answer || ['Skip Question']}\n step={questionNumber + 1}\n steps={this.kbaQuestions.length}\n onNext={async (e: any) => {\n const answer = e.detail as string;\n this.kbaChoices = [...this.kbaChoices, answer];\n if (this.kbaChoices.length >= this.kbaQuestions.length) {\n const responses = this.kbaQuestions.map((q, i) => ({type: q.type, answer: this.kbaChoices[i]}));\n console.log('Submitting KBA responses', this.kbaChoices, responses);\n try {\n const response = await submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);\n console.log('KBA challenge response', response);\n this.kbaStep = response.kba_step;\n if (this.kbaStep === 'failed') {\n this.fatalErrorHeader = 'Identity Verification Failed';\n this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n this.isDone = true;\n } else {\n this.kbaQuestions = (response as any).questions?.question || [];\n this.kbaChoices = [];\n }\n } catch (e) {\n console.log('Error submitting KBA challenge', e);\n this.kbaStep = '';\n this.fatalErrorHeader = 'Unable to Verify Identity';\n this.fatalErrorMessage = e.response?.data?.error || 'Please try again later.';\n this.isDone = true;\n }\n }\n }}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n\n return (\n <Host>\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n <div style={{flex: '1'}} />\n\n {!this.finishLater && <verdocs-button size=\"xsmall\" label={this.nextButtonLabel} disabled={!this.agreed} onClick={() => this.handleNext()} />}\n\n <div style={{marginLeft: '10px'}} />\n <verdocs-dropdown options={!this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n {(this.envelope.documents || []).map(envelopeDocument => {\n const pageNumbers = integerSequence(1, envelopeDocument.pages);\n\n return (\n <Fragment>\n {pageNumbers.map(pageNumber => {\n const pageSize = envelopeDocument.page_sizes?.[pageNumber] || {width: 612, height: 792};\n\n // In signing mode we show the original template page with all the recipient fields so we can show source formatting and\n // where everything went. This is also a visual indicator when optional fields weren't filled in by previous actors, or\n // future signers still need to act. Once we're \"done\" we flip to showing the envelope's documents which have the final\n // field vales (so far) stamped into them.\n // TODO: Confirm that a pure page-number match is good enough to find the matching template page. We need to make sure\n // we either don't reset our page numbers for additional attachments, or add match-on identifiers to work around that.\n // console.log('tp', templatePage, page);\n return (\n <verdocs-envelope-document-page\n envelopeId={this.envelopeId}\n documentId={envelopeDocument.id}\n endpoint={this.endpoint}\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n pageNumber={pageNumber}\n onPageRendered={e => this.handlePageRendered(e)}\n type=\"filled\"\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message={`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`}\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message={`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`}\n onNext={() => {\n this.showDone = false;\n this.isDone = true;\n }}\n />\n )}\n\n {this.submitting ||\n (this.showSpinner && (\n <verdocs-portal>\n <div class=\"spinner-overlay\">\n <verdocs-spinner />\n </div>\n </verdocs-portal>\n ))}\n </Host>\n );\n }\n}\n"],"mappings":"ywFAAA,IAAMA,EAAiB,sgIACvB,IAAAC,EAAeD,ECYf,IAAME,EAAwB,CAC5B,CAACC,GAAI,QAASC,MAAO,gBAErB,CAACD,GAAI,UAAWC,MAAO,mBACvB,CAACD,GAAI,QAASC,MAAO,yBACrB,CAACD,GAAI,WAAYC,MAAO,aAG1B,IAAMC,EAAkB,CACtB,CAACF,GAAI,QAASC,MAAO,SACrB,CAACD,GAAI,WAAYC,MAAO,a,IAyBbE,EAAWC,EAAA,0B,2JA0EtBC,KAAAC,gBAA0B,E,cAtEyB,K,gBAKA,K,YAKJ,K,gBAKI,K,oBAWX,K,eAkBT,G,sBACW,G,eACF,K,kBAChB,M,qBACG,Q,iBACJ,M,sBACK,G,uBACC,G,kBACL,G,gBACF,M,eACD,M,YACH,M,cACE,M,mBACK,M,iBACF,M,qBACI,M,YACT,M,6BACiB,W,aAChB,G,kBACY,G,iBACR,M,gBACD,G,aAEH,K,cACmB,I,CAItCC,EAAAC,UAAAC,kBAAA,WACE,IAAKJ,KAAKK,SAAU,CAClBC,QAAQC,IAAI,oCACZP,KAAKK,SAAW,IAAIG,EAAgB,CAACC,YAAa,W,GAIhDP,EAAAC,UAAAO,iBAAN,W,iJACE,IAAKV,KAAKW,WAAY,EACpBC,EAAAZ,KAAKa,YAAQ,MAAAD,SAAA,SAAAA,EAAEE,KAAK,IAAIC,EAAS,oCAAqC,IAAK,KAC3E,S,CAGF,IAAKf,KAAKgB,OAAQ,EAChBC,EAAAjB,KAAKa,YAAQ,MAAAI,SAAA,SAAAA,EAAEH,KAAK,IAAIC,EAAS,iCAAkC,IAAK,KACxE,S,CAGF,IAAKf,KAAKkB,WAAY,EACpBC,EAAAnB,KAAKa,YAAQ,MAAAM,SAAA,SAAAA,EAAEL,K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pB,KAAK2C,wBAAuB,qGACxDmK,OAAQ,kBAAOhK,EAAK+C,gBAAkB,KAA9B,IAIX7F,KAAKoD,UACJsJ,EAAA,qBACEE,QAAQ,eACRrI,QAAS,sBAAAnD,OAAsBpB,KAAK2C,wBAAuB,gNAC3DmK,OAAQ,WACNhK,EAAKM,SAAW,MAChBN,EAAKK,OAAS,I,IAKnBnD,KAAKsF,YACHtF,KAAK4H,aACJ8E,EAAA,sBACEA,EAAA,OAAKO,MAAM,mBACTP,EAAA,0B,WA79BQ,I","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,h as a,H as t,c as o,g as r}from"./p-b9654a5e.js";import{VerdocsEndpoint as m,getTemplate as i,updateField as s,deleteField as l}from"@verdocs/js-sdk";import{S as d}from"./p-fd97809c.js";import{S as c}from"./p-3828cb31.js";import{V as n}from"./p-04c07b7b.js";const b='@charset "UTF-8";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const p=b;const g=class{constructor(a){e(this,a);this.checked=false;this.name="";this.label="";this.value="";this.theme="light";this.disabled=false}render(){return a(t,{key:"008593a13b7353d959884be116c33130195afc1d",class:{disabled:this.disabled,[this.theme]:true}},a("label",{key:"a09444ec1e7d5670095623f3eac2f808ce622f84"},a("input",{key:"ec157d44ab08722eb04e44c0a863ac1968110b35",type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),a("span",{key:"b2a9e3dec69778c2ef38e8cfa1a3ecf6ac891db4"},this.label)))}};g.style=p;const h='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const f=h;const u=class{constructor(a){e(this,a);this.message=""}render(){return a(t,{key:"b852ad72093698987e6142e1d87b7d4522395c79"},a("div",{key:"5bb10a4aa2f551b7edd88d5ae119a201ee90f289",class:"inner"},this.message))}};u.style=f;const x="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-loader{display:block;position:absolute;top:50%;left:50%;margin-left:-20px;margin-top:-20px;font-size:24px;width:24px;height:24px;border-radius:50%;text-indent:-9999em;-webkit-animation:load5 1.1s infinite ease;animation:verdocs-loader-kf 1.1s infinite ease;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes verdocs-loader-kf{0%,100%{-webkit-box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4)}12.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3)}25%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}37.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}50%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}62.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}75%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}87.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa;box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa}}@keyframes verdocs-loader-kf{0%,100%{-webkit-box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4)}12.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3)}25%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}37.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}50%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}62.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}75%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}87.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa;box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa}}";const v=x;const k=class{constructor(a){e(this,a)}render(){return a(t,{key:"3bba8f5f53c7070e8444e40146633d193bdf070a"})}};k.style=v;const w='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:34px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';const y=w;const I=class{constructor(a){e(this,a);this.value="";this.label="";this.options=undefined;this.disabled=false}render(){return a(t,{key:"ca4f1230a989eaf3f74261d288f08a2e07a7314c",class:"input-field"},a("label",{key:"e9cc9c779a14ff70768f434edc41e30d260bb699"},this.label?a("div",{class:"input-label"},this.label+":"):a("div",null),a("select",{key:"01e3fd6a456778d17ea0f756fa8cee64991c97c5",class:"input-element",disabled:this.disabled},this.options.map((e=>a("option",{value:e.value,selected:e.value===this.value},e.label))))))}};I.style=y;const z='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0 rgba(0, 0, 0, 0.1215686275);box-shadow:2px 2px 10px 0 rgba(0, 0, 0, 0.1215686275)}@media all and (max-width: 600px){verdocs-template-field-properties{padding:10px;-webkit-transform:scale(0.8);transform:scale(0.8)}}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-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-field-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-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-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-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-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-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .options-header{gap:10px;margin:0 0 5px 0;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;padding:5px 8px;font-weight:700;text-align:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;background-color:#333333}verdocs-template-field-properties .options-header-label{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;font-weight:700;font-size:14px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;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-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:rgb(165, 0, 33)}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 1px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';const L=z;const E=e=>e.charAt(0).toUpperCase()+e.slice(1);const T=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>`;const q='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';const S=class{constructor(a){e(this,a);this.close=o(this,"close",7);this.delete=o(this,"delete",7);this.settingsChanged=o(this,"settingsChanged",7);this.sdkError=o(this,"sdkError",7);this.templateListenerId=null;this.endpoint=m.getDefault();this.templateId="";this.fieldName="";this.helpText="";this.dirty=false;this.label="";this.type="textbox";this.name="";this.required=false;this.roleName="";this.group="";this.fieldType="";this.options=[];this.placeholder="";this.defaultValue="";this.showingHelp=false;this.loading=true;this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){console.log("[SENT] Loading template",this.templateId);this.unlistenToTemplate();c.subscribe("templates",this.templateId,(()=>i(this.endpoint,this.templateId)),false,(e=>{console.log("[SEND] Template Updated",e);this.template=e;this.loading=false;this.resetForm()}))}unlistenToTemplate(){if(this.templateListenerId){c.store.delListener(this.templateListenerId);this.templateListenerId=null}}async componentWillLoad(){var e,a,t;try{this.endpoint.loadSession();if(!this.templateId){console.log(`[FIELD PROPERTIES] Missing required template ID ${this.templateId}`);return}if(!this.fieldName){console.error(`[FIELD PROPERTIES] Missing required field name`);return}if(!this.endpoint.session){console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");return}this.listenToTemplate()}catch(o){console.log("[FIELD PROPERTIES] Error loading template",o);this.loading=false;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(o.message,(a=o.response)===null||a===void 0?void 0:a.status,(t=o.response)===null||t===void 0?void 0:t.data))}}resetForm(){var e;const a=(((e=this.template)===null||e===void 0?void 0:e.fields)||[]).find((e=>e.name===this.fieldName));if(!a){console.log(`[FIELD PROPERTIES] Unable to find field "${this.fieldName}" in fields`);return}this.type=a.type;this.name=a.name;this.label=a.label;this.group=a.group;this.roleName=a.role_name;this.required=a.required;this.fieldType=a.type;this.options=a.options||[];this.placeholder=a.placeholder||"";this.defaultValue=a.default||"";this.dirty=false;this.loading=false;this.cleanupOptions()}handleCancel(e){var a,t;e.stopPropagation();this.resetForm();(a=this.close)===null||a===void 0?void 0:a.emit();(t=document.getElementById("verdocs-template-field-properties"))===null||t===void 0?void 0:t.remove()}handleSave(e){e.stopPropagation();const a={name:this.name,role_name:this.roleName,required:this.required,label:this.label,group:this.group,placeholder:this.placeholder,default:this.defaultValue,options:this.options};this.cleanupOptions();console.log("[FIELD PROPERTIES] Will update",this.fieldName,a);s(this.endpoint,this.templateId,this.fieldName,a).then((e=>{var a,t,o;console.log("[FIELD PROPERTIES] Updated",e);const r=JSON.parse(JSON.stringify(this.template));const m=r.fields.findIndex((e=>e.name===this.fieldName));if(m>-1){r.fields[m]=e}c.updateTemplate(this.templateId,r);(a=this.settingsChanged)===null||a===void 0?void 0:a.emit({fieldName:this.fieldName,field:e});(t=this.close)===null||t===void 0?void 0:t.emit();(o=document.getElementById("verdocs-template-field-properties"))===null||o===void 0?void 0:o.remove()})).catch((()=>{console.log("[FIELD PROPERTIES] Update failed",e)}))}async handleDelete(e){e.stopPropagation();l(this.endpoint,this.templateId,this.fieldName).then((()=>{var e,a;const t=JSON.parse(JSON.stringify(this.template));t.fields=t.fields.filter((e=>e.name!==this.fieldName));c.updateTemplate(this.templateId,t);(e=this.delete)===null||e===void 0?void 0:e.emit({templateId:this.templateId,roleName:this.roleName});(a=document.getElementById("verdocs-template-field-properties"))===null||a===void 0?void 0:a.remove()})).catch((e=>{console.log("[FIELD PROPERTIES] Deletion error",e)}))}cleanupOptions(){this.options=[...this.options.filter((e=>(e.id||"").trim()!==""||(e.label||"").trim()!==""))];if(!this.options.find((e=>!e.id&&!e.label))){this.options=[...this.options,{id:"",label:""}]}}render(){var e,o;if(this.loading){return a(t,null,a("verdocs-loader",null))}if(!this.endpoint.session){return a(t,null,a("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!(((e=this.template)===null||e===void 0?void 0:e.fields)||[]).some((e=>e.name===this.fieldName))){return a(t,{class:"empty"})}if(this.helpText&&this.showingHelp){return a(t,null,a("h6",null,E(this.fieldType)," Settings ",a("div",{style:{flex:"1"}}),a("div",{class:"help-icon",innerHTML:q,onClick:()=>this.showingHelp=false})),a("p",{class:"instructions",innerHTML:this.helpText}))}const r=this.options.filter((e=>(e.id||"").trim()!==""||(e.label||"").trim()!=="")).length>0;const m=!this.dirty||this.type==="dropdown"&&!r;return a(t,{id:"verdocs-template-field-properties"},a("h6",null,E(this.fieldType.replace(/_/g," "))," Settings ",a("div",{style:{flex:"1"}}),this.helpText&&a("div",{class:"help-icon",innerHTML:q,onClick:()=>this.showingHelp=true})),a("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},a("div",{class:"row"},a("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:e=>{this.name=e.target.value;this.dirty=true}})),a("div",{class:"row"},a("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:e=>{this.label=e.target.value;this.dirty=true}})),a("div",{class:"row"},a("div",{class:"input-label"},"Role:"),a("verdocs-select-input",{value:this.roleName,options:(((o=this.template)===null||o===void 0?void 0:o.roles)||[]).map((e=>({label:e.name,value:e.name}))),onInput:e=>{this.roleName=e.target.value;this.dirty=true}})),["textbox","textarea"].includes(this.type)&&a("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},a("verdocs-text-input",{id:"verdocs-field-value",label:"Default Value",value:this.defaultValue,autocomplete:"off",placeholder:"Pre-filled value...",onInput:e=>{this.defaultValue=e.target.value;this.dirty=true}})),this.type==="radio"&&a("div",{class:"row"},a("verdocs-text-input",{id:"verdocs-field-label",label:"Group",value:this.group,autocomplete:"off",helpText:"Enable exclusive selections. Only one option within the same group may be selected at a time.",placeholder:"Group...",onInput:e=>{this.group=(e.target.value||"").trim().toLowerCase().replace(/[^a-z0-9]/g,"");this.dirty=true}})),["textbox","textarea"].includes(this.type)&&a("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},a("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:e=>{this.placeholder=e.target.value;this.dirty=true}})),a("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},a("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),a("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:e=>{this.required=e.target.checked;this.dirty=true}})),this.type==="dropdown"&&a("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},a("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Options")),this.type==="dropdown"&&a("div",{class:"options"},a("div",{class:"options-header"},a("div",{class:"options-header-label"},"ID"),a("dev",{class:"options-header-label"},"Label")),this.options.map(((e,t)=>a("div",{class:"row option-row",key:t},a("verdocs-text-input",{value:e.id,placeholder:"Unique ID",onInput:e=>{this.options[t].id=e.target.value;this.dirty=true;this.cleanupOptions()}}),a("verdocs-text-input",{value:e.label,placeholder:"Display label",onInput:e=>{this.options[t].label=e.target.value;this.dirty=true;this.cleanupOptions()}}),a("button",{innerHTML:T,class:"remove-button",onClick:()=>{this.options=this.options.filter((a=>a.id!==e.id));this.dirty=true;this.cleanupOptions()}}))))),a("div",{class:"buttons"},a("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:T}),a("div",{style:{flex:"1"}}),a("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),a("verdocs-button",{size:"small",label:"Save",disabled:m,onClick:e=>!m&&this.handleSave(e)}))))}get el(){return r(this)}};S.style=L;const C='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-text-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:34px;padding:0 9px;outline:none}verdocs-text-input .input-element:disabled{cursor:not-allowed;background:#aeb4bf;border:1px solid #33364b}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input .required{color:red;margin-left:2px;display:inline-block}verdocs-text-input [data-lastpass-icon-root]{display:none !important}verdocs-text-input .input-container{position:relative}verdocs-text-input .clear{top:7px;right:5px;width:18px;height:18px;fill:#cccccc;position:absolute}verdocs-text-input .clear:hover{fill:#720101;cursor:pointer}verdocs-text-input .copy{top:7px;right:5px;width:18px;height:18px;fill:#cccccc;position:absolute}verdocs-text-input .copy:hover{fill:#654dcb;cursor:pointer}verdocs-text-input .toggle-pw{top:5px;right:7px;width:18px;height:18px;stroke:#cccccc;position:absolute}verdocs-text-input .toggle-pw:hover{fill:#654dcb;cursor:pointer}verdocs-text-input.clearable .input-element,verdocs-text-input.copyable .input-element{padding-right:32px}';const M=C;const R=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.881 122.88"><g><path fill-rule="evenodd" clip-rule="evenodd" d="M61.44,0c33.933,0,61.441,27.507,61.441,61.439 c0,33.933-27.508,61.44-61.441,61.44C27.508,122.88,0,95.372,0,61.439C0,27.507,27.508,0,61.44,0L61.44,0z M81.719,36.226 c1.363-1.363,3.572-1.363,4.936,0c1.363,1.363,1.363,3.573,0,4.936L66.375,61.439l20.279,20.278c1.363,1.363,1.363,3.573,0,4.937 c-1.363,1.362-3.572,1.362-4.936,0L61.44,66.376L41.162,86.654c-1.362,1.362-3.573,1.362-4.936,0c-1.363-1.363-1.363-3.573,0-4.937 l20.278-20.278L36.226,41.162c-1.363-1.363-1.363-3.573,0-4.936c1.363-1.363,3.573-1.363,4.936,0L61.44,56.504L81.719,36.226 L81.719,36.226z"/></g></svg>`;const P=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M15.988 3.012A2.25 2.25 0 0118 5.25v6.5A2.25 2.25 0 0115.75 14H13.5V7A2.5 2.5 0 0011 4.5H8.128a2.252 2.252 0 011.884-1.488A2.25 2.25 0 0112.25 1h1.5a2.25 2.25 0 012.238 2.012zM11.5 3.25a.75.75 0 01.75-.75h1.5a.75.75 0 01.75.75v.25h-3v-.25z" clip-rule="evenodd" /><path fill-rule="evenodd" d="M2 7a1 1 0 011-1h8a1 1 0 011 1v10a1 1 0 01-1 1H3a1 1 0 01-1-1V7zm2 3.25a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75zm0 3.5a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75z" clip-rule="evenodd" /></svg>`;const O=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /></svg>`;const D=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" /></svg>`;const H=class{constructor(a){e(this,a);this.value="";this.label="";this.placeholder="";this.autocomplete="";this.helpText="";this.clearable=false;this.copyable=false;this.type="text";this.disabled=false;this.required=false;this.showingPw=false}copyToClipboard(){this.inputEl.select();navigator.clipboard.writeText(this.value).then((()=>n("Copied!"))).catch((e=>console.log("Error copying to clipboard",e)))}render(){return a(t,{key:"fd1c28f5f4060bae39986f6aaa7288bf89da9788",class:`input-field ${this.clearable?"clearable":""} ${this.copyable?"copyable":""}`},a("label",{key:"5eb25f8d3ca74d32e36bf255ff6344c39903318c"},this.label&&a("div",{key:"476ebfacd42626faedd3dbf139ad0f205a395c1c",class:"input-label"},this.label+":",this.required&&a("span",{key:"b16bc0649a6185dc25ede728bb46041b5d3c5ceb",class:"required"},"*")),a("div",{key:"6e97205750cc921cc4d0fdb2d7262869fe0b433d",class:"input-container"},a("input",{key:"3ab6dc65769856cc5cb6a79fa3fa408c9c64123d",type:this.type==="password"&&this.showingPw?"text":this.type,value:this.value,required:this.required,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete,ref:e=>this.inputEl=e,onInput:e=>this.value=e.target.value}),this.clearable&&this.value&&a("span",{key:"635b6289fefc3a250ae47463bfa5e9acb16988e2",innerHTML:R,class:"clear",onClick:()=>{setTimeout((()=>{var e;this.value="";(e=this.inputEl)===null||e===void 0?void 0:e.setAttribute("value","");setTimeout((()=>{var e,a;(e=this.inputEl)===null||e===void 0?void 0:e.dispatchEvent(new window.Event("focusout"));(a=this.inputEl)===null||a===void 0?void 0:a.blur()}),50)}),50)}}),this.type==="password"&&a("span",{key:"6f1f225d19651aba333c7bd92260ddb0110fce81",innerHTML:this.showingPw?O:D,class:"toggle-pw",onClick:()=>{this.showingPw=!this.showingPw}}),!this.clearable&&this.copyable&&this.value&&a("span",{key:"dabff5508725721a4dedbe4d4c0f37ed789e35c8",innerHTML:P,class:"copy",onClick:()=>this.copyToClipboard()})),this.helpText&&a("verdocs-help-icon",{key:"5e93a8b8cf44da47463f3e0d59f560bb137820f6",text:this.helpText})))}get hostEl(){return r(this)}};H.style=M;export{g as verdocs_checkbox,u as verdocs_component_error,k as verdocs_loader,I as verdocs_select_input,S as verdocs_template_field_properties,H as verdocs_text_input};
2
- //# sourceMappingURL=p-e84cf41e.entry.js.map
1
+ import{r as e,h as a,H as t,c as o,g as r}from"./p-b9654a5e.js";import{VerdocsEndpoint as m,getTemplate as i,updateField as s,deleteField as l}from"@verdocs/js-sdk";import{S as d}from"./p-fd97809c.js";import{S as c}from"./p-d4be87ef.js";import{V as n}from"./p-04c07b7b.js";const b='@charset "UTF-8";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const p=b;const g=class{constructor(a){e(this,a);this.checked=false;this.name="";this.label="";this.value="";this.theme="light";this.disabled=false}render(){return a(t,{key:"008593a13b7353d959884be116c33130195afc1d",class:{disabled:this.disabled,[this.theme]:true}},a("label",{key:"a09444ec1e7d5670095623f3eac2f808ce622f84"},a("input",{key:"ec157d44ab08722eb04e44c0a863ac1968110b35",type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),a("span",{key:"b2a9e3dec69778c2ef38e8cfa1a3ecf6ac891db4"},this.label)))}};g.style=p;const h='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const f=h;const u=class{constructor(a){e(this,a);this.message=""}render(){return a(t,{key:"b852ad72093698987e6142e1d87b7d4522395c79"},a("div",{key:"5bb10a4aa2f551b7edd88d5ae119a201ee90f289",class:"inner"},this.message))}};u.style=f;const x="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-loader{display:block;position:absolute;top:50%;left:50%;margin-left:-20px;margin-top:-20px;font-size:24px;width:24px;height:24px;border-radius:50%;text-indent:-9999em;-webkit-animation:load5 1.1s infinite ease;animation:verdocs-loader-kf 1.1s infinite ease;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes verdocs-loader-kf{0%,100%{-webkit-box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4)}12.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3)}25%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}37.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}50%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}62.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}75%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}87.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa;box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa}}@keyframes verdocs-loader-kf{0%,100%{-webkit-box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4)}12.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3)}25%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}37.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}50%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}62.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}75%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}87.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa;box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa}}";const v=x;const k=class{constructor(a){e(this,a)}render(){return a(t,{key:"3bba8f5f53c7070e8444e40146633d193bdf070a"})}};k.style=v;const w='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:34px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';const y=w;const I=class{constructor(a){e(this,a);this.value="";this.label="";this.options=undefined;this.disabled=false}render(){return a(t,{key:"ca4f1230a989eaf3f74261d288f08a2e07a7314c",class:"input-field"},a("label",{key:"e9cc9c779a14ff70768f434edc41e30d260bb699"},this.label?a("div",{class:"input-label"},this.label+":"):a("div",null),a("select",{key:"01e3fd6a456778d17ea0f756fa8cee64991c97c5",class:"input-element",disabled:this.disabled},this.options.map((e=>a("option",{value:e.value,selected:e.value===this.value},e.label))))))}};I.style=y;const z='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0 rgba(0, 0, 0, 0.1215686275);box-shadow:2px 2px 10px 0 rgba(0, 0, 0, 0.1215686275)}@media all and (max-width: 600px){verdocs-template-field-properties{padding:10px;-webkit-transform:scale(0.8);transform:scale(0.8)}}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-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-field-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-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-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-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-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-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .options-header{gap:10px;margin:0 0 5px 0;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;padding:5px 8px;font-weight:700;text-align:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;background-color:#333333}verdocs-template-field-properties .options-header-label{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;font-weight:700;font-size:14px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;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-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:rgb(165, 0, 33)}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 1px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';const L=z;const E=e=>e.charAt(0).toUpperCase()+e.slice(1);const T=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>`;const q='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';const S=class{constructor(a){e(this,a);this.close=o(this,"close",7);this.delete=o(this,"delete",7);this.settingsChanged=o(this,"settingsChanged",7);this.sdkError=o(this,"sdkError",7);this.templateListenerId=null;this.endpoint=m.getDefault();this.templateId="";this.fieldName="";this.helpText="";this.dirty=false;this.label="";this.type="textbox";this.name="";this.required=false;this.roleName="";this.group="";this.fieldType="";this.options=[];this.placeholder="";this.defaultValue="";this.showingHelp=false;this.loading=true;this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){console.log("[SENT] Loading template",this.templateId);this.unlistenToTemplate();c.subscribe("templates",this.templateId,(()=>i(this.endpoint,this.templateId)),false,(e=>{console.log("[SEND] Template Updated",e);this.template=e;this.loading=false;this.resetForm()}))}unlistenToTemplate(){if(this.templateListenerId){c.store.delListener(this.templateListenerId);this.templateListenerId=null}}async componentWillLoad(){var e,a,t;try{this.endpoint.loadSession();if(!this.templateId){console.log(`[FIELD PROPERTIES] Missing required template ID ${this.templateId}`);return}if(!this.fieldName){console.error(`[FIELD PROPERTIES] Missing required field name`);return}if(!this.endpoint.session){console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");return}this.listenToTemplate()}catch(o){console.log("[FIELD PROPERTIES] Error loading template",o);this.loading=false;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(o.message,(a=o.response)===null||a===void 0?void 0:a.status,(t=o.response)===null||t===void 0?void 0:t.data))}}resetForm(){var e;const a=(((e=this.template)===null||e===void 0?void 0:e.fields)||[]).find((e=>e.name===this.fieldName));if(!a){console.log(`[FIELD PROPERTIES] Unable to find field "${this.fieldName}" in fields`);return}this.type=a.type;this.name=a.name;this.label=a.label;this.group=a.group;this.roleName=a.role_name;this.required=a.required;this.fieldType=a.type;this.options=a.options||[];this.placeholder=a.placeholder||"";this.defaultValue=a.default||"";this.dirty=false;this.loading=false;this.cleanupOptions()}handleCancel(e){var a,t;e.stopPropagation();this.resetForm();(a=this.close)===null||a===void 0?void 0:a.emit();(t=document.getElementById("verdocs-template-field-properties"))===null||t===void 0?void 0:t.remove()}handleSave(e){e.stopPropagation();const a={name:this.name,role_name:this.roleName,required:this.required,label:this.label,group:this.group,placeholder:this.placeholder,default:this.defaultValue,options:this.options};this.cleanupOptions();console.log("[FIELD PROPERTIES] Will update",this.fieldName,a);s(this.endpoint,this.templateId,this.fieldName,a).then((e=>{var a,t,o;console.log("[FIELD PROPERTIES] Updated",e);const r=JSON.parse(JSON.stringify(this.template));const m=r.fields.findIndex((e=>e.name===this.fieldName));if(m>-1){r.fields[m]=e}c.updateTemplate(this.templateId,r);(a=this.settingsChanged)===null||a===void 0?void 0:a.emit({fieldName:this.fieldName,field:e});(t=this.close)===null||t===void 0?void 0:t.emit();(o=document.getElementById("verdocs-template-field-properties"))===null||o===void 0?void 0:o.remove()})).catch((()=>{console.log("[FIELD PROPERTIES] Update failed",e)}))}async handleDelete(e){e.stopPropagation();l(this.endpoint,this.templateId,this.fieldName).then((()=>{var e,a;const t=JSON.parse(JSON.stringify(this.template));t.fields=t.fields.filter((e=>e.name!==this.fieldName));c.updateTemplate(this.templateId,t);(e=this.delete)===null||e===void 0?void 0:e.emit({templateId:this.templateId,roleName:this.roleName});(a=document.getElementById("verdocs-template-field-properties"))===null||a===void 0?void 0:a.remove()})).catch((e=>{console.log("[FIELD PROPERTIES] Deletion error",e)}))}cleanupOptions(){this.options=[...this.options.filter((e=>(e.id||"").trim()!==""||(e.label||"").trim()!==""))];if(!this.options.find((e=>!e.id&&!e.label))){this.options=[...this.options,{id:"",label:""}]}}render(){var e,o;if(this.loading){return a(t,null,a("verdocs-loader",null))}if(!this.endpoint.session){return a(t,null,a("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!(((e=this.template)===null||e===void 0?void 0:e.fields)||[]).some((e=>e.name===this.fieldName))){return a(t,{class:"empty"})}if(this.helpText&&this.showingHelp){return a(t,null,a("h6",null,E(this.fieldType)," Settings ",a("div",{style:{flex:"1"}}),a("div",{class:"help-icon",innerHTML:q,onClick:()=>this.showingHelp=false})),a("p",{class:"instructions",innerHTML:this.helpText}))}const r=this.options.filter((e=>(e.id||"").trim()!==""||(e.label||"").trim()!=="")).length>0;const m=!this.dirty||this.type==="dropdown"&&!r;return a(t,{id:"verdocs-template-field-properties"},a("h6",null,E(this.fieldType.replace(/_/g," "))," Settings ",a("div",{style:{flex:"1"}}),this.helpText&&a("div",{class:"help-icon",innerHTML:q,onClick:()=>this.showingHelp=true})),a("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},a("div",{class:"row"},a("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:e=>{this.name=e.target.value;this.dirty=true}})),a("div",{class:"row"},a("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:e=>{this.label=e.target.value;this.dirty=true}})),a("div",{class:"row"},a("div",{class:"input-label"},"Role:"),a("verdocs-select-input",{value:this.roleName,options:(((o=this.template)===null||o===void 0?void 0:o.roles)||[]).map((e=>({label:e.name,value:e.name}))),onInput:e=>{this.roleName=e.target.value;this.dirty=true}})),["textbox","textarea"].includes(this.type)&&a("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},a("verdocs-text-input",{id:"verdocs-field-value",label:"Default Value",value:this.defaultValue,autocomplete:"off",placeholder:"Pre-filled value...",onInput:e=>{this.defaultValue=e.target.value;this.dirty=true}})),this.type==="radio"&&a("div",{class:"row"},a("verdocs-text-input",{id:"verdocs-field-label",label:"Group",value:this.group,autocomplete:"off",helpText:"Enable exclusive selections. Only one option within the same group may be selected at a time.",placeholder:"Group...",onInput:e=>{this.group=(e.target.value||"").trim().toLowerCase().replace(/[^a-z0-9]/g,"");this.dirty=true}})),["textbox","textarea"].includes(this.type)&&a("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},a("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:e=>{this.placeholder=e.target.value;this.dirty=true}})),a("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},a("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),a("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:e=>{this.required=e.target.checked;this.dirty=true}})),this.type==="dropdown"&&a("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},a("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Options")),this.type==="dropdown"&&a("div",{class:"options"},a("div",{class:"options-header"},a("div",{class:"options-header-label"},"ID"),a("dev",{class:"options-header-label"},"Label")),this.options.map(((e,t)=>a("div",{class:"row option-row",key:t},a("verdocs-text-input",{value:e.id,placeholder:"Unique ID",onInput:e=>{this.options[t].id=e.target.value;this.dirty=true;this.cleanupOptions()}}),a("verdocs-text-input",{value:e.label,placeholder:"Display label",onInput:e=>{this.options[t].label=e.target.value;this.dirty=true;this.cleanupOptions()}}),a("button",{innerHTML:T,class:"remove-button",onClick:()=>{this.options=this.options.filter((a=>a.id!==e.id));this.dirty=true;this.cleanupOptions()}}))))),a("div",{class:"buttons"},a("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:T}),a("div",{style:{flex:"1"}}),a("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),a("verdocs-button",{size:"small",label:"Save",disabled:m,onClick:e=>!m&&this.handleSave(e)}))))}get el(){return r(this)}};S.style=L;const C='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-text-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:34px;padding:0 9px;outline:none}verdocs-text-input .input-element:disabled{cursor:not-allowed;background:#aeb4bf;border:1px solid #33364b}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input .required{color:red;margin-left:2px;display:inline-block}verdocs-text-input [data-lastpass-icon-root]{display:none !important}verdocs-text-input .input-container{position:relative}verdocs-text-input .clear{top:7px;right:5px;width:18px;height:18px;fill:#cccccc;position:absolute}verdocs-text-input .clear:hover{fill:#720101;cursor:pointer}verdocs-text-input .copy{top:7px;right:5px;width:18px;height:18px;fill:#cccccc;position:absolute}verdocs-text-input .copy:hover{fill:#654dcb;cursor:pointer}verdocs-text-input .toggle-pw{top:5px;right:7px;width:18px;height:18px;stroke:#cccccc;position:absolute}verdocs-text-input .toggle-pw:hover{fill:#654dcb;cursor:pointer}verdocs-text-input.clearable .input-element,verdocs-text-input.copyable .input-element{padding-right:32px}';const M=C;const R=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.881 122.88"><g><path fill-rule="evenodd" clip-rule="evenodd" d="M61.44,0c33.933,0,61.441,27.507,61.441,61.439 c0,33.933-27.508,61.44-61.441,61.44C27.508,122.88,0,95.372,0,61.439C0,27.507,27.508,0,61.44,0L61.44,0z M81.719,36.226 c1.363-1.363,3.572-1.363,4.936,0c1.363,1.363,1.363,3.573,0,4.936L66.375,61.439l20.279,20.278c1.363,1.363,1.363,3.573,0,4.937 c-1.363,1.362-3.572,1.362-4.936,0L61.44,66.376L41.162,86.654c-1.362,1.362-3.573,1.362-4.936,0c-1.363-1.363-1.363-3.573,0-4.937 l20.278-20.278L36.226,41.162c-1.363-1.363-1.363-3.573,0-4.936c1.363-1.363,3.573-1.363,4.936,0L61.44,56.504L81.719,36.226 L81.719,36.226z"/></g></svg>`;const P=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M15.988 3.012A2.25 2.25 0 0118 5.25v6.5A2.25 2.25 0 0115.75 14H13.5V7A2.5 2.5 0 0011 4.5H8.128a2.252 2.252 0 011.884-1.488A2.25 2.25 0 0112.25 1h1.5a2.25 2.25 0 012.238 2.012zM11.5 3.25a.75.75 0 01.75-.75h1.5a.75.75 0 01.75.75v.25h-3v-.25z" clip-rule="evenodd" /><path fill-rule="evenodd" d="M2 7a1 1 0 011-1h8a1 1 0 011 1v10a1 1 0 01-1 1H3a1 1 0 01-1-1V7zm2 3.25a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75zm0 3.5a.75.75 0 01.75-.75h4.5a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75z" clip-rule="evenodd" /></svg>`;const O=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /></svg>`;const D=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" /></svg>`;const H=class{constructor(a){e(this,a);this.value="";this.label="";this.placeholder="";this.autocomplete="";this.helpText="";this.clearable=false;this.copyable=false;this.type="text";this.disabled=false;this.required=false;this.showingPw=false}copyToClipboard(){this.inputEl.select();navigator.clipboard.writeText(this.value).then((()=>n("Copied!"))).catch((e=>console.log("Error copying to clipboard",e)))}render(){return a(t,{key:"fd1c28f5f4060bae39986f6aaa7288bf89da9788",class:`input-field ${this.clearable?"clearable":""} ${this.copyable?"copyable":""}`},a("label",{key:"5eb25f8d3ca74d32e36bf255ff6344c39903318c"},this.label&&a("div",{key:"476ebfacd42626faedd3dbf139ad0f205a395c1c",class:"input-label"},this.label+":",this.required&&a("span",{key:"b16bc0649a6185dc25ede728bb46041b5d3c5ceb",class:"required"},"*")),a("div",{key:"6e97205750cc921cc4d0fdb2d7262869fe0b433d",class:"input-container"},a("input",{key:"3ab6dc65769856cc5cb6a79fa3fa408c9c64123d",type:this.type==="password"&&this.showingPw?"text":this.type,value:this.value,required:this.required,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete,ref:e=>this.inputEl=e,onInput:e=>this.value=e.target.value}),this.clearable&&this.value&&a("span",{key:"635b6289fefc3a250ae47463bfa5e9acb16988e2",innerHTML:R,class:"clear",onClick:()=>{setTimeout((()=>{var e;this.value="";(e=this.inputEl)===null||e===void 0?void 0:e.setAttribute("value","");setTimeout((()=>{var e,a;(e=this.inputEl)===null||e===void 0?void 0:e.dispatchEvent(new window.Event("focusout"));(a=this.inputEl)===null||a===void 0?void 0:a.blur()}),50)}),50)}}),this.type==="password"&&a("span",{key:"6f1f225d19651aba333c7bd92260ddb0110fce81",innerHTML:this.showingPw?O:D,class:"toggle-pw",onClick:()=>{this.showingPw=!this.showingPw}}),!this.clearable&&this.copyable&&this.value&&a("span",{key:"dabff5508725721a4dedbe4d4c0f37ed789e35c8",innerHTML:P,class:"copy",onClick:()=>this.copyToClipboard()})),this.helpText&&a("verdocs-help-icon",{key:"5e93a8b8cf44da47463f3e0d59f560bb137820f6",text:this.helpText})))}get hostEl(){return r(this)}};H.style=M;export{g as verdocs_checkbox,u as verdocs_component_error,k as verdocs_loader,I as verdocs_select_input,S as verdocs_template_field_properties,H as verdocs_text_input};
2
+ //# sourceMappingURL=p-8369273d.entry.js.map