@verdocs/web-sdk 6.10.0 → 6.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/cjs/{Environment-3vWt0C1Q.js → Environment-CP-XG6Lt.js} +2 -3
  2. package/dist/cjs/{Environment-3vWt0C1Q.js.map → Environment-CP-XG6Lt.js.map} +1 -1
  3. package/dist/cjs/_commonjsHelpers-CFO10eej.js +10 -0
  4. package/dist/cjs/_commonjsHelpers-CFO10eej.js.map +1 -0
  5. package/dist/cjs/{en-DyXpAt1T.js → en-B5Y8bwF8.js} +3 -3
  6. package/dist/cjs/{en-DyXpAt1T.js.map → en-B5Y8bwF8.js.map} +1 -1
  7. package/dist/cjs/index-DLmnUl1_.js +4 -4
  8. package/dist/cjs/{interact.min-BAnZvLwr.js → interact.min-CGi6ndGs.js} +3 -3
  9. package/dist/cjs/{interact.min-BAnZvLwr.js.map → interact.min-CGi6ndGs.js.map} +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +16 -5206
  13. package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
  14. package/dist/cjs/verdocs-date-input.cjs.entry.js +2 -2
  15. package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +3 -3
  16. package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -2
  17. package/dist/cjs/verdocs-preview_6.cjs.entry.js +3 -3
  18. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  19. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +16 -32
  20. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
  21. package/dist/components/p-161tgqin.js +2 -0
  22. package/dist/components/p-161tgqin.js.map +1 -0
  23. package/dist/components/{p-C_Xku1v2.js → p-29evahil.js} +2 -2
  24. package/dist/components/p-B85MJLTf.js +2 -0
  25. package/dist/components/{p-B_dAoCMu.js → p-BXCSHTRK.js} +2 -2
  26. package/dist/components/{p-pyA5cdVX.js → p-C-VgmSdO.js} +2 -2
  27. package/dist/{verdocs-web-sdk/p-CGNX5HqF.js → components/p-C4ygd3v_.js} +2 -2
  28. package/dist/components/{p-BxOEoXie.js → p-CD_W_8Te.js} +2 -2
  29. package/dist/components/{p-BT8wzCXz.js → p-CNS_xfUy.js} +2 -2
  30. package/dist/components/{p-DhO1wfh-.js → p-CabZXA4q.js} +2 -2
  31. package/dist/components/{p-DVGumEtx.js → p-Ct2pWzCQ.js} +2 -2
  32. package/dist/components/{p-BwEGkh_6.js → p-CwFFcX13.js} +2 -2
  33. package/dist/components/{p-Yxa93LOl.js → p-D7XKYAmn.js} +2 -2
  34. package/dist/components/{p-DwPH0TQ4.js → p-DBDp9BWW.js} +2 -2
  35. package/dist/components/{p-Dmw-lE3L.js → p-DFxdTSl_.js} +2 -2
  36. package/dist/components/{p-5E7bNT3k.js → p-DOj-ooY6.js} +2 -2
  37. package/dist/components/{p-DjOTs59Z.js → p-DYbHyMbx.js} +2 -2
  38. package/dist/components/{p-DXLcCG08.js → p-D_uebJGM.js} +2 -2
  39. package/dist/{verdocs-web-sdk/p-CjPsvAbb.js → components/p-DcAXub3q.js} +2 -2
  40. package/dist/components/{p-CnoHN1S8.js → p-DpyO-OJK.js} +2 -2
  41. package/dist/components/{p-B845hxhl.js → p-DuEnrEJr.js} +2 -2
  42. package/dist/components/{p-Cfiprngx.js → p-NAf9Gqm4.js} +2 -2
  43. package/dist/components/{p-BasWFMeN.js → p-PIdGCYte.js} +2 -2
  44. package/dist/components/verdocs-build.js +1 -1
  45. package/dist/components/verdocs-contact-picker.js +1 -1
  46. package/dist/components/verdocs-date-input.js +1 -1
  47. package/dist/components/verdocs-delegate-dialog.js +1 -1
  48. package/dist/components/verdocs-field-attachment.js +1 -1
  49. package/dist/components/verdocs-field-checkbox.js +1 -1
  50. package/dist/components/verdocs-field-date.js +1 -1
  51. package/dist/components/verdocs-field-dropdown.js +1 -1
  52. package/dist/components/verdocs-field-initial.js +1 -1
  53. package/dist/components/verdocs-field-payment.js +1 -1
  54. package/dist/components/verdocs-field-radio.js +1 -1
  55. package/dist/components/verdocs-field-signature.js +1 -1
  56. package/dist/components/verdocs-field-textarea.js +1 -1
  57. package/dist/components/verdocs-field-textbox.js +1 -1
  58. package/dist/components/verdocs-field-timestamp.js +1 -1
  59. package/dist/components/verdocs-otp-dialog.js +1 -1
  60. package/dist/components/verdocs-passcode-dialog.js +1 -1
  61. package/dist/components/verdocs-preview.js +1 -1
  62. package/dist/components/verdocs-send.js +1 -1
  63. package/dist/components/verdocs-sign.js +1 -1
  64. package/dist/components/verdocs-template-document-page.js +1 -1
  65. package/dist/components/verdocs-template-fields.js +1 -1
  66. package/dist/esm/{Environment-C_Xku1v2.js → Environment-29evahil.js} +3 -3
  67. package/dist/esm/{Environment-C_Xku1v2.js.map → Environment-29evahil.js.map} +1 -1
  68. package/dist/esm/_commonjsHelpers-B85MJLTf.js +8 -0
  69. package/dist/esm/_commonjsHelpers-B85MJLTf.js.map +1 -0
  70. package/dist/esm/{en-bsV5YfOZ.js → en-DZgdXBKq.js} +3 -3
  71. package/dist/{esm-es5/en-bsV5YfOZ.js.map → esm/en-DZgdXBKq.js.map} +1 -1
  72. package/dist/esm/index-CjTHbolG.js +4 -4
  73. package/dist/esm/{interact.min-BepJAdBZ.js → interact.min-BO_a_7pQ.js} +3 -3
  74. package/dist/{esm-es5/interact.min-BepJAdBZ.js.map → esm/interact.min-BO_a_7pQ.js.map} +1 -1
  75. package/dist/esm/loader.js +1 -1
  76. package/dist/esm/{utils-D9l-GFdv.js → utils-Bh3zb1Xs.js} +3 -3
  77. package/dist/{esm-es5/utils-D9l-GFdv.js.map → esm/utils-Bh3zb1Xs.js.map} +1 -1
  78. package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +1 -1
  79. package/dist/esm/verdocs-contact-picker.entry.js +17 -5207
  80. package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
  81. package/dist/esm/verdocs-date-input.entry.js +2 -2
  82. package/dist/esm/verdocs-download-dialog_4.entry.js +1 -1
  83. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  84. package/dist/esm/verdocs-field-attachment_11.entry.js +3 -3
  85. package/dist/esm/verdocs-field-payment.entry.js +2 -2
  86. package/dist/esm/verdocs-pagination_2.entry.js +1 -1
  87. package/dist/esm/verdocs-preview_6.entry.js +4 -4
  88. package/dist/esm/verdocs-sign.entry.js +1 -1
  89. package/dist/esm/verdocs-signing-progress.entry.js +1 -1
  90. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  91. package/dist/esm/verdocs-web-sdk.js +1 -1
  92. package/dist/esm-es5/{Environment-C_Xku1v2.js → Environment-29evahil.js} +2 -2
  93. package/dist/esm-es5/{Environment-C_Xku1v2.js.map → Environment-29evahil.js.map} +1 -1
  94. package/dist/esm-es5/_commonjsHelpers-B85MJLTf.js +2 -0
  95. package/dist/esm-es5/_commonjsHelpers-B85MJLTf.js.map +1 -0
  96. package/dist/esm-es5/{en-bsV5YfOZ.js → en-DZgdXBKq.js} +2 -2
  97. package/dist/{esm/en-bsV5YfOZ.js.map → esm-es5/en-DZgdXBKq.js.map} +1 -1
  98. package/dist/esm-es5/index-CjTHbolG.js +1 -1
  99. package/dist/esm-es5/{interact.min-BepJAdBZ.js → interact.min-BO_a_7pQ.js} +2 -2
  100. package/dist/{esm/interact.min-BepJAdBZ.js.map → esm-es5/interact.min-BO_a_7pQ.js.map} +1 -1
  101. package/dist/esm-es5/loader.js +1 -1
  102. package/dist/esm-es5/{utils-D9l-GFdv.js → utils-Bh3zb1Xs.js} +2 -2
  103. package/dist/{esm/utils-D9l-GFdv.js.map → esm-es5/utils-Bh3zb1Xs.js.map} +1 -1
  104. package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
  105. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -2
  106. package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
  107. package/dist/esm-es5/verdocs-date-input.entry.js +1 -1
  108. package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-signing-progress.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  118. package/dist/types/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.d.ts +0 -2
  119. package/dist/verdocs-web-sdk/{p-7e6d153f.system.entry.js → p-0d19368a.system.entry.js} +2 -2
  120. package/dist/verdocs-web-sdk/{p-e95723ac.entry.js → p-186984ee.entry.js} +2 -2
  121. package/dist/verdocs-web-sdk/{p-d60cfa3e.system.entry.js → p-234d351c.system.entry.js} +2 -2
  122. package/dist/verdocs-web-sdk/{p-ad40c4aa.system.entry.js → p-24e2db66.system.entry.js} +2 -2
  123. package/dist/verdocs-web-sdk/{p-C_Xku1v2.js → p-29evahil.js} +2 -2
  124. package/dist/verdocs-web-sdk/{p-C_Xku1v2.js.map → p-29evahil.js.map} +1 -1
  125. package/dist/verdocs-web-sdk/p-363d6565.system.entry.js +2 -0
  126. package/dist/verdocs-web-sdk/p-363d6565.system.entry.js.map +1 -0
  127. package/dist/verdocs-web-sdk/{p-e608d2bc.system.entry.js → p-4a2d69b9.system.entry.js} +2 -2
  128. package/dist/verdocs-web-sdk/{p-50d51d96.entry.js → p-5c2025ca.entry.js} +2 -2
  129. package/dist/verdocs-web-sdk/{p-f97ca49e.entry.js → p-5e934a5e.entry.js} +2 -2
  130. package/dist/verdocs-web-sdk/{p-33cfc977.system.entry.js → p-62e4605d.system.entry.js} +2 -2
  131. package/dist/verdocs-web-sdk/{p-edab1fed.system.entry.js → p-6af0110a.system.entry.js} +3 -3
  132. package/dist/verdocs-web-sdk/{p-b0aafc0a.entry.js → p-733acaa6.entry.js} +2 -2
  133. package/dist/verdocs-web-sdk/{p-04d2fa80.system.entry.js → p-74838066.system.entry.js} +2 -2
  134. package/dist/verdocs-web-sdk/{p-f2876180.entry.js → p-8eb09dd6.entry.js} +2 -2
  135. package/dist/verdocs-web-sdk/{p-d7284af0.entry.js → p-8f50f83f.entry.js} +2 -2
  136. package/dist/verdocs-web-sdk/p-97bdb772.entry.js +2 -0
  137. package/dist/verdocs-web-sdk/p-97bdb772.entry.js.map +1 -0
  138. package/dist/verdocs-web-sdk/p-B85MJLTf.js +2 -0
  139. package/dist/verdocs-web-sdk/p-B85MJLTf.js.map +1 -0
  140. package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
  141. package/dist/{components/p-CGNX5HqF.js → verdocs-web-sdk/p-C4ygd3v_.js} +2 -2
  142. package/dist/verdocs-web-sdk/{p-CGNX5HqF.js.map → p-C4ygd3v_.js.map} +1 -1
  143. package/dist/verdocs-web-sdk/{p-T412l3FU.js → p-CGsVCy75.js} +2 -2
  144. package/dist/verdocs-web-sdk/{p-T412l3FU.js.map → p-CGsVCy75.js.map} +1 -1
  145. package/dist/verdocs-web-sdk/p-CHg64SCg.system.js +2 -0
  146. package/dist/verdocs-web-sdk/{p-C9y1KCYV.system.js.map → p-CHg64SCg.system.js.map} +1 -1
  147. package/dist/verdocs-web-sdk/p-D6-Ny6z1.system.js +2 -0
  148. package/dist/verdocs-web-sdk/p-D6-Ny6z1.system.js.map +1 -0
  149. package/dist/verdocs-web-sdk/{p-DE0Cygqz.system.js → p-DQMNv-mt.system.js} +2 -2
  150. package/dist/verdocs-web-sdk/{p-DE0Cygqz.system.js.map → p-DQMNv-mt.system.js.map} +1 -1
  151. package/dist/{components/p-CjPsvAbb.js → verdocs-web-sdk/p-DcAXub3q.js} +2 -2
  152. package/dist/verdocs-web-sdk/{p-CjPsvAbb.js.map → p-DcAXub3q.js.map} +1 -1
  153. package/dist/verdocs-web-sdk/{p-C06jLDFm.system.js → p-RE5sZHi0.system.js} +2 -2
  154. package/dist/verdocs-web-sdk/{p-C06jLDFm.system.js.map → p-RE5sZHi0.system.js.map} +1 -1
  155. package/dist/verdocs-web-sdk/{p-297d1631.system.entry.js → p-b3ac740e.system.entry.js} +2 -2
  156. package/dist/verdocs-web-sdk/{p-1258cb3f.system.entry.js → p-c09ed2af.system.entry.js} +2 -2
  157. package/dist/verdocs-web-sdk/{p-40f5ecf3.system.entry.js → p-c4c09247.system.entry.js} +2 -2
  158. package/dist/verdocs-web-sdk/{p-2e76c944.entry.js → p-c60bf9c2.entry.js} +2 -2
  159. package/dist/verdocs-web-sdk/{p-eb8091da.system.entry.js → p-d000b2aa.system.entry.js} +2 -2
  160. package/dist/verdocs-web-sdk/{p-d0e8419b.entry.js → p-d06d9cfd.entry.js} +3 -3
  161. package/dist/verdocs-web-sdk/{p-e632e92c.entry.js → p-e624dc88.entry.js} +2 -2
  162. package/dist/verdocs-web-sdk/{p-2d72560a.entry.js → p-e910098d.entry.js} +2 -2
  163. package/dist/verdocs-web-sdk/{p-11c3e5bb.entry.js → p-f9ef8d34.entry.js} +2 -2
  164. package/dist/verdocs-web-sdk/{p-EtGQEmqo.system.js → p-nfw6V5pF.system.js} +2 -2
  165. package/dist/verdocs-web-sdk/{p-EtGQEmqo.system.js.map → p-nfw6V5pF.system.js.map} +1 -1
  166. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  167. package/package.json +1 -1
  168. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -13
  169. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js.map +0 -1
  170. package/dist/collection/utils/Unleash.js +0 -18
  171. package/dist/collection/utils/Unleash.js.map +0 -1
  172. package/dist/components/p-BFTU3MAI.js +0 -2
  173. package/dist/components/p-CPYFXW2q.js +0 -3
  174. package/dist/components/p-CPYFXW2q.js.map +0 -1
  175. package/dist/custom-elements.json +0 -2501
  176. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -10
  177. package/dist/esm/_commonjsHelpers-BFTU3MAI.js.map +0 -1
  178. package/dist/esm-es5/_commonjsHelpers-BFTU3MAI.js +0 -2
  179. package/dist/esm-es5/_commonjsHelpers-BFTU3MAI.js.map +0 -1
  180. package/dist/types/utils/Unleash.d.ts +0 -14
  181. package/dist/verdocs-web-sdk/p-1ce27c81.system.entry.js +0 -4
  182. package/dist/verdocs-web-sdk/p-1ce27c81.system.entry.js.map +0 -1
  183. package/dist/verdocs-web-sdk/p-4e84a5b6.entry.js +0 -3
  184. package/dist/verdocs-web-sdk/p-4e84a5b6.entry.js.map +0 -1
  185. package/dist/verdocs-web-sdk/p-BFTU3MAI.js +0 -2
  186. package/dist/verdocs-web-sdk/p-BFTU3MAI.js.map +0 -1
  187. package/dist/verdocs-web-sdk/p-Bzy18UgU.system.js +0 -2
  188. package/dist/verdocs-web-sdk/p-Bzy18UgU.system.js.map +0 -1
  189. package/dist/verdocs-web-sdk/p-C9y1KCYV.system.js +0 -2
  190. /package/dist/components/{p-C_Xku1v2.js.map → p-29evahil.js.map} +0 -0
  191. /package/dist/components/{p-BFTU3MAI.js.map → p-B85MJLTf.js.map} +0 -0
  192. /package/dist/components/{p-B_dAoCMu.js.map → p-BXCSHTRK.js.map} +0 -0
  193. /package/dist/components/{p-pyA5cdVX.js.map → p-C-VgmSdO.js.map} +0 -0
  194. /package/dist/components/{p-CGNX5HqF.js.map → p-C4ygd3v_.js.map} +0 -0
  195. /package/dist/components/{p-BxOEoXie.js.map → p-CD_W_8Te.js.map} +0 -0
  196. /package/dist/components/{p-BT8wzCXz.js.map → p-CNS_xfUy.js.map} +0 -0
  197. /package/dist/components/{p-DhO1wfh-.js.map → p-CabZXA4q.js.map} +0 -0
  198. /package/dist/components/{p-DVGumEtx.js.map → p-Ct2pWzCQ.js.map} +0 -0
  199. /package/dist/components/{p-BwEGkh_6.js.map → p-CwFFcX13.js.map} +0 -0
  200. /package/dist/components/{p-Yxa93LOl.js.map → p-D7XKYAmn.js.map} +0 -0
  201. /package/dist/components/{p-DwPH0TQ4.js.map → p-DBDp9BWW.js.map} +0 -0
  202. /package/dist/components/{p-Dmw-lE3L.js.map → p-DFxdTSl_.js.map} +0 -0
  203. /package/dist/components/{p-5E7bNT3k.js.map → p-DOj-ooY6.js.map} +0 -0
  204. /package/dist/components/{p-DjOTs59Z.js.map → p-DYbHyMbx.js.map} +0 -0
  205. /package/dist/components/{p-DXLcCG08.js.map → p-D_uebJGM.js.map} +0 -0
  206. /package/dist/components/{p-CjPsvAbb.js.map → p-DcAXub3q.js.map} +0 -0
  207. /package/dist/components/{p-CnoHN1S8.js.map → p-DpyO-OJK.js.map} +0 -0
  208. /package/dist/components/{p-B845hxhl.js.map → p-DuEnrEJr.js.map} +0 -0
  209. /package/dist/components/{p-Cfiprngx.js.map → p-NAf9Gqm4.js.map} +0 -0
  210. /package/dist/components/{p-BasWFMeN.js.map → p-PIdGCYte.js.map} +0 -0
  211. /package/dist/verdocs-web-sdk/{p-7e6d153f.system.entry.js.map → p-0d19368a.system.entry.js.map} +0 -0
  212. /package/dist/verdocs-web-sdk/{p-e95723ac.entry.js.map → p-186984ee.entry.js.map} +0 -0
  213. /package/dist/verdocs-web-sdk/{p-d60cfa3e.system.entry.js.map → p-234d351c.system.entry.js.map} +0 -0
  214. /package/dist/verdocs-web-sdk/{p-ad40c4aa.system.entry.js.map → p-24e2db66.system.entry.js.map} +0 -0
  215. /package/dist/verdocs-web-sdk/{p-e608d2bc.system.entry.js.map → p-4a2d69b9.system.entry.js.map} +0 -0
  216. /package/dist/verdocs-web-sdk/{p-50d51d96.entry.js.map → p-5c2025ca.entry.js.map} +0 -0
  217. /package/dist/verdocs-web-sdk/{p-f97ca49e.entry.js.map → p-5e934a5e.entry.js.map} +0 -0
  218. /package/dist/verdocs-web-sdk/{p-33cfc977.system.entry.js.map → p-62e4605d.system.entry.js.map} +0 -0
  219. /package/dist/verdocs-web-sdk/{p-edab1fed.system.entry.js.map → p-6af0110a.system.entry.js.map} +0 -0
  220. /package/dist/verdocs-web-sdk/{p-b0aafc0a.entry.js.map → p-733acaa6.entry.js.map} +0 -0
  221. /package/dist/verdocs-web-sdk/{p-04d2fa80.system.entry.js.map → p-74838066.system.entry.js.map} +0 -0
  222. /package/dist/verdocs-web-sdk/{p-f2876180.entry.js.map → p-8eb09dd6.entry.js.map} +0 -0
  223. /package/dist/verdocs-web-sdk/{p-d7284af0.entry.js.map → p-8f50f83f.entry.js.map} +0 -0
  224. /package/dist/verdocs-web-sdk/{p-297d1631.system.entry.js.map → p-b3ac740e.system.entry.js.map} +0 -0
  225. /package/dist/verdocs-web-sdk/{p-1258cb3f.system.entry.js.map → p-c09ed2af.system.entry.js.map} +0 -0
  226. /package/dist/verdocs-web-sdk/{p-40f5ecf3.system.entry.js.map → p-c4c09247.system.entry.js.map} +0 -0
  227. /package/dist/verdocs-web-sdk/{p-2e76c944.entry.js.map → p-c60bf9c2.entry.js.map} +0 -0
  228. /package/dist/verdocs-web-sdk/{p-eb8091da.system.entry.js.map → p-d000b2aa.system.entry.js.map} +0 -0
  229. /package/dist/verdocs-web-sdk/{p-d0e8419b.entry.js.map → p-d06d9cfd.entry.js.map} +0 -0
  230. /package/dist/verdocs-web-sdk/{p-e632e92c.entry.js.map → p-e624dc88.entry.js.map} +0 -0
  231. /package/dist/verdocs-web-sdk/{p-2d72560a.entry.js.map → p-e910098d.entry.js.map} +0 -0
  232. /package/dist/verdocs-web-sdk/{p-11c3e5bb.entry.js.map → p-f9ef8d34.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function o(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{s(n.next(t))}catch(t){r(t)}}function c(t){try{s(n["throw"](t))}catch(t){r(t)}}function s(t){t.done?i(t.value):o(t.value).then(a,c)}s((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=c(0),a["throw"]=c(1),a["return"]=c(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(t){return function(e){return s([t,e])}}function s(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(i=0)),i)try{if(n=1,o&&(r=c[0]&2?o["return"]:c[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;if(o=0,r)c=[c[0]&2,r.value];switch(c[0]){case 0:case 1:r=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;o=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(c[0]===6&&i.label<r[1]){i.label=r[1];r=c;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(c);break}if(r[2])i.ops.pop();i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t];o=0}finally{n=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host,g as getElement}from"./index-CjTHbolG.js";import{A as AirDatepicker,l as localeEn}from"./en-bsV5YfOZ.js";import{V as VerdocsToast}from"./Toast-D97GxsI-.js";import"./_commonjsHelpers-BFTU3MAI.js";var verdocsDateInputCss=function(){return'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}'};var VerdocsDateInput=function(){function t(t){registerInstance(this,t);this.picker=null;this.value="";this.label="";this.placeholder="";this.helpText="";this.disabled=false;this.required=false;this.showingPw=false;this.focused=false;this.containerId="verdocs-date-input-".concat(Math.random().toString(36).substring(2,11))}t.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(i){this.focused=true;(t=this.picker)===null||t===void 0?void 0:t.show();setTimeout((function(){e.focused=false}),500);return[2]}))}))};t.prototype.componentDidLoad=function(){var t=this;this.picker=new AirDatepicker("#".concat(this.containerId),{locale:localeEn,isMobile:true,autoClose:true,onShow:function(){return t.focused=true},onHide:function(){return t.focused=false},onSelect:function(e){var i=e.date,n=e.formattedDate;var o=new CustomEvent("input",{detail:{date:i,formattedDate:n}});t.hostEl.dispatchEvent(o)}})};t.prototype.copyToClipboard=function(){this.inputEl.select();navigator.clipboard.writeText(this.value).then((function(){return VerdocsToast("Copied!")})).catch((function(t){return console.log("Error copying to clipboard",t)}))};t.prototype.render=function(){var t=this;return h(Host,{key:"a71872f25c3fbfdb8837f546340edd2324f141f9",class:"input-field"},h("label",{key:"68b0b363d48c045f6a6124467c81e3c8af7f6321"},this.label&&h("div",{key:"6cfe44246b5776315772da522b27482c362df563",class:"input-label"},this.label+":",this.required&&h("span",{key:"9c02382715b89aa7c8f1c4efd6e9e1e54cec6692",class:"required"},"*")),h("div",{key:"56e31da5bc7c6206a9f1045ad6317f6b95ca2206",class:"input-container"},h("input",{key:"bdca818f5c8df445d9e63c6597cc75d0634096f1",type:"text",value:this.value,required:this.required,class:"input-element","data-lpignore":"true",id:this.containerId,disabled:this.disabled,placeholder:this.placeholder,ref:function(e){return t.inputEl=e},onInput:function(e){return t.value=e.target.value}})),this.helpText&&h("verdocs-help-icon",{key:"712354ce917bb818033fa6cd95dc2bf50daf678f",text:this.helpText})))};Object.defineProperty(t.prototype,"hostEl",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();VerdocsDateInput.style=verdocsDateInputCss();export{VerdocsDateInput as verdocs_date_input};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function o(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{s(n.next(t))}catch(t){r(t)}}function c(t){try{s(n["throw"](t))}catch(t){r(t)}}function s(t){t.done?i(t.value):o(t.value).then(a,c)}s((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=c(0),a["throw"]=c(1),a["return"]=c(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(t){return function(e){return s([t,e])}}function s(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(i=0)),i)try{if(n=1,o&&(r=c[0]&2?o["return"]:c[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;if(o=0,r)c=[c[0]&2,r.value];switch(c[0]){case 0:case 1:r=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;o=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(c[0]===6&&i.label<r[1]){i.label=r[1];r=c;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(c);break}if(r[2])i.ops.pop();i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t];o=0}finally{n=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host,g as getElement}from"./index-CjTHbolG.js";import{A as AirDatepicker,l as localeEn}from"./en-DZgdXBKq.js";import{V as VerdocsToast}from"./Toast-D97GxsI-.js";import"./_commonjsHelpers-B85MJLTf.js";var verdocsDateInputCss=function(){return'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}'};var VerdocsDateInput=function(){function t(t){registerInstance(this,t);this.picker=null;this.value="";this.label="";this.placeholder="";this.helpText="";this.disabled=false;this.required=false;this.showingPw=false;this.focused=false;this.containerId="verdocs-date-input-".concat(Math.random().toString(36).substring(2,11))}t.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){var t;var e=this;return __generator(this,(function(i){this.focused=true;(t=this.picker)===null||t===void 0?void 0:t.show();setTimeout((function(){e.focused=false}),500);return[2]}))}))};t.prototype.componentDidLoad=function(){var t=this;this.picker=new AirDatepicker("#".concat(this.containerId),{locale:localeEn,isMobile:true,autoClose:true,onShow:function(){return t.focused=true},onHide:function(){return t.focused=false},onSelect:function(e){var i=e.date,n=e.formattedDate;var o=new CustomEvent("input",{detail:{date:i,formattedDate:n}});t.hostEl.dispatchEvent(o)}})};t.prototype.copyToClipboard=function(){this.inputEl.select();navigator.clipboard.writeText(this.value).then((function(){return VerdocsToast("Copied!")})).catch((function(t){return console.log("Error copying to clipboard",t)}))};t.prototype.render=function(){var t=this;return h(Host,{key:"a71872f25c3fbfdb8837f546340edd2324f141f9",class:"input-field"},h("label",{key:"68b0b363d48c045f6a6124467c81e3c8af7f6321"},this.label&&h("div",{key:"6cfe44246b5776315772da522b27482c362df563",class:"input-label"},this.label+":",this.required&&h("span",{key:"9c02382715b89aa7c8f1c4efd6e9e1e54cec6692",class:"required"},"*")),h("div",{key:"56e31da5bc7c6206a9f1045ad6317f6b95ca2206",class:"input-container"},h("input",{key:"bdca818f5c8df445d9e63c6597cc75d0634096f1",type:"text",value:this.value,required:this.required,class:"input-element","data-lpignore":"true",id:this.containerId,disabled:this.disabled,placeholder:this.placeholder,ref:function(e){return t.inputEl=e},onInput:function(e){return t.value=e.target.value}})),this.helpText&&h("verdocs-help-icon",{key:"712354ce917bb818033fa6cd95dc2bf50daf678f",text:this.helpText})))};Object.defineProperty(t.prototype,"hostEl",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();VerdocsDateInput.style=verdocsDateInputCss();export{VerdocsDateInput as verdocs_date_input};
2
2
  //# sourceMappingURL=verdocs-date-input.entry.js.map
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{d(n.next(e))}catch(e){s(e)}}function a(e){try{d(n["throw"](e))}catch(e){s(e)}}function d(e){e.done?t(e.value):i(e.value).then(r,a)}d((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return d([e,o])}}function d(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-CjTHbolG.js";import{D as DownloadAction}from"./Types-CIxfEdV7.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri,getEnvelope}from"@verdocs/js-sdk";import{t as throttle}from"./utils-D9l-GFdv.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-C7hFgM52.js";import"./index-BglCURB-.js";var verdocsDownloadDialogCss=function(){return'verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .spinner-inline{display:-ms-flexbox;display:flex;color:#9ca3af;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}'};var DocumentIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M13 2V9H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var CertificateIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.21 13.89L7 23L12 20L17 23L15.79 13.88" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var ZipIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 16V22H14V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 16H18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 22H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 10L12 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 12L12 16L16 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 16V4H20V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var CheckIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var RefreshIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23 4V10H17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.49 15A9 9 0 1 1 21.23 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var VerdocsDownloadDialog=function(){function e(e){registerInstance(this,e);this.download=createEvent(this,"download");this.exit=createEvent(this,"exit");this.signed=false;this.polling=false;this.documents=[];this.hasCertificate=false}e.prototype.handleOptionClick=function(e,o){var t=this.documents.some((function(e){return e.type==="certificate"}))||this.hasCertificate;var n=this.signed&&t;var i=e===DownloadAction.certificate&&!n;var s=e===DownloadAction.zip&&(this.polling||!n);var r=e===DownloadAction.combined&&(this.polling||!n||!o);if(i||s||r)return;this.download.emit({action:e,documentId:o})};e.prototype.render=function(){var e=this;var o=this.documents.filter((function(e){return e.type==="attachment"})).sort((function(e,o){return e.order!==o.order?e.order-o.order:e.created_at.localeCompare(o.created_at)}));var t=this.documents.find((function(e){return e.type==="certificate"}));var n=!!t||this.hasCertificate;var i=this.signed&&n;var s=!this.polling&&i;var r=s&&!!(t===null||t===void 0?void 0:t.id);var a=!this.signed;return h("verdocs-dialog",{key:"09670a45a18cf110462390fd0ef2f705b3577f31",onExit:function(){return e.exit.emit()}},h("div",{key:"2b01ee1c71aa51f80d9ecf1ec16a62af146342cd",slot:"heading",class:"heading-container"},h("h3",{key:"1ddb9cf369621aeafebc0ce3511f1e59579ee471",style:{margin:"0",fontSize:"1.25rem",fontWeight:"600",padding:"16px 24px"}},"Download")),h("div",{key:"c62c72d8eeb5bc7cde8791370bcc2f5a46978dd1",slot:"content",class:"content"},o.length<=2&&o.map((function(o){return h("div",{class:"download-option",onClick:function(){return e.handleOptionClick(DownloadAction.document,o.id)}},h("div",{class:"icon-container",innerHTML:DocumentIcon}),h("div",{class:"text-container"},h("div",{class:"label"},o.name),h("div",{class:"description"},"Download the document")),a?h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon})):h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Signed")))})),o.length>2&&h("div",{key:"10f6f2b1a7197533e5ad1d8b00cdfb14b465eec1",class:"info-message"},"Multiple documents attached. Please use the ZIP option below to download all files."),h("div",{key:"8a0c4c5a3e7c5f99626b2f2ece050b3c66f53006",class:{"download-option":true,disabled:!i},onClick:function(){return e.handleOptionClick(DownloadAction.certificate)},title:!i?"Certificate not yet available":""},h("div",{key:"f44f22a0655603d2af1785fd306aea4b99e168a9",class:"icon-container",innerHTML:CertificateIcon}),h("div",{key:"fa99982c36808621b10dd30a72412be02b2ac0c7",class:"text-container"},h("div",{key:"66d6d8d832ca66f17d2b6074fe80f0a573539aa7",class:"label"},"Certificate"),h("div",{key:"a7c6c02afdf06fb59622f41e80946e9ad0feb231",class:"description"},"Download the certificate")),i?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon}))),h("div",{key:"d6c7a9d4ffa660869730292e8981b7fca9ec2d7a",class:{"download-option":true,disabled:!r},onClick:function(){return e.handleOptionClick(DownloadAction.combined,t===null||t===void 0?void 0:t.id)},title:!r?"Waiting for all documents to be ready":""},h("div",{key:"c49585f9f2995bf90a6a7a7f1006ff62e1c4ff75",class:"icon-container",innerHTML:ZipIcon}),h("div",{key:"c886fb02b282f9e3e8bbc932652e85acadba3620",class:"text-container"},h("div",{key:"cd321c5acde3b28048549f8dfb4ae576e21b0b71",class:"label"},"Combined"),h("div",{key:"cbb9b3280585382ad606611fd07ab040b9176d69",class:"description"},"Merge envelopes & certificate into a single PDF")),r?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon}))),h("div",{key:"33e022ea22d4aa4b9e4169ec8709243d143c9320",class:{"download-option":true,disabled:!s},onClick:function(){return e.handleOptionClick(DownloadAction.zip)},title:!s?"Waiting for all documents to be ready":""},h("div",{key:"96af105f93ed2cf4903466df246d9be3eeebbbdc",class:"icon-container",innerHTML:ZipIcon}),h("div",{key:"f4ca89d84a10444d9db3b3745779a5eee05cf73d",class:"text-container"},h("div",{key:"c48b2b5a6184162b59123981ac2bdbe2d358f8b9",class:"label"},"All Files"),h("div",{key:"72620fada50c48437eaa40983f7b6e8c84e4f35a",class:"description"},"Download everything as a ZIP file")),s?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon})))),h("div",{key:"0f10d2c47891ad31a70d5ef412377a35c58f840d",slot:"footer",style:{display:"none"}}))};return e}();VerdocsDownloadDialog.style=verdocsDownloadDialogCss();var verdocsEnvelopeDocumentPageCss=function(){return"verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}"};var VerdocsEnvelopeDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered");this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:e=this;return[4,getEnvelopeDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber,this.type)];case 1:e.pageDisplayUri=o.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(o){for(var t=0,n=o;t<n.length;t++){var i=n[t];var s=i.contentRect.width;e.renderedWidth=s;e.renderedHeight=e.virtualHeight*(s/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};e.prototype.render=function(){var e=this;var o="".concat(this.renderedHeight,"px");return h(Host,{key:"7ed2187dfb4ef248411d777ad2837ba18a85ec45",id:"".concat(this.containerId),style:{height:o,flex:"0 0 ".concat(o)}},this.layers.map((function(t){return t.type==="div"?h("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(t.name),style:{height:o}}):e.pageDisplayUri?h("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(t.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(o){e.naturalWidth=o.target.naturalWidth;e.naturalHeight=o.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=o.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsEnvelopeDocumentPage.style=verdocsEnvelopeDocumentPageCss();var verdocsQuestionDialogCss=function(){return'verdocs-question-dialog{top:0;left:0;right:0;bottom:0;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-question-dialog.closed{display:none}verdocs-question-dialog textarea{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:14px;padding:9px;outline:none}verdocs-question-dialog .heading .title{font-size:18px}verdocs-question-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;border-radius:6px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button.cancel{background-color:#654dcb}verdocs-question-dialog .buttons button.ok{background-color:#55bc81}verdocs-question-dialog .buttons button.ok.single{max-width:150px}verdocs-question-dialog .buttons button:disabled{background-color:#6c727f}'};var QuestionIcon$1='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#ffffff"/></svg>';var VerdocsQuestionDialog=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next");this.exit=createEvent(this,"exit");this.question="";this.closed=false}e.prototype.handleOk=function(){this.next.emit({question:this.question})};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}};e.prototype.render=function(){var e=this;return h("verdocs-dialog",{key:"2697b58a7c65243705c15993e5a967894b725196",onExit:function(o){return e.handleDismiss(o)}},h("div",{key:"0c6d340d05717b4580e001e8cff4d544f3dac072",slot:"heading",class:"heading"},h("div",{key:"e5e3c323b48a90431f2593a062715d316608dc71",class:"icon",innerHTML:QuestionIcon$1}),h("div",{key:"8ebc86de76b84cf255efbf6bc8db8876142e858d",class:"title"},"Ask the Sender a Question")),h("div",{key:"c3f96587257dbd2e0ce98eba44a8ef7c3bba7c88",slot:"content",class:"content"},h("textarea",{key:"22c2c8dd80e41e77e0bed92f0b48a81f85466532",name:"question",rows:6,placeholder:"Enter your question...",onInput:function(o){return e.question=o.target.value}},this.question)),h("div",{key:"11a32d726ead166b7b9bfa994a31de4c4998fdec",class:"footer",slot:"footer"},h("div",{key:"3fa336237b33537b9154c1eb7dfcd6b929a28e1e",class:"buttons"},h("button",{key:"aedcec8fc3948515d93adce69f15eb048bdd824e",class:"cancel",onClick:function(){return e.handleCancel()}},"Cancel"),h("button",{key:"2bd012fe2e6866922edde4a4abadb943c78f44ef",class:"ok",onClick:function(){return e.handleOk()}},"OK"))))};return e}();VerdocsQuestionDialog.style=verdocsQuestionDialogCss();var verdocsSignFooterCss=function(){return'verdocs-sign-footer{left:0;right:0;bottom:0;height:48px;display:-ms-flexbox;display:flex;color:#616161;position:fixed;font-size:12px;padding:0 24px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;background:#ffffff;container-type:inline-size;border-top:1px solid #e0e0e0;-ms-flex-pack:justify;justify-content:space-between;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-sign-footer a{color:#616161;cursor:pointer;text-decoration:none;border-bottom:1px dotted #616161}verdocs-sign-footer.loading{display:none}verdocs-sign-footer .powered-by{white-space:nowrap}verdocs-sign-footer .buttons{-ms-flex:0;flex:0;gap:16px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;white-space:nowrap;-ms-flex-align:center;align-items:center}verdocs-sign-footer .buttons button{gap:4px;border:none;display:-ms-flexbox;display:flex;outline:none;cursor:pointer;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent}verdocs-sign-footer .buttons div{gap:4px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign-footer .links{-ms-flex:0;flex:0;gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;white-space:nowrap}verdocs-sign-footer.just-buttons .buttons{-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center}@container (max-width: 720px){verdocs-sign-footer.has-buttons .powered-by{display:none}}@container (max-width: 540px){verdocs-sign-footer.no-buttons .powered-by{display:none}verdocs-sign-footer.has-buttons .links{display:none}verdocs-sign-footer .buttons{-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center}}'};var QuestionIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#424242"/></svg>';var DeclineIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z" fill="#424242"/></svg>';var SaveIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z" fill="#424242"/></svg>';var VerdocsSignFooter=function(){function e(e){registerInstance(this,e);this.askQuestion=createEvent(this,"askQuestion");this.decline=createEvent(this,"decline");this.finishLater=createEvent(this,"finishLater");this.sdkError=createEvent(this,"sdkError");this.envelopeListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.isDone=false;this.askingQuestion=false;this.declinine=false;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(n){try{if(!this.envelopeId){console.log("[FOOTER] Missing required envelope ID ".concat(this.envelopeId));return[2]}this.listenToEnvelope()}catch(n){console.log("[FOOTER] Error loading envelope",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(n.message,(o=n.response)===null||o===void 0?void 0:o.status,(t=n.response)===null||t===void 0?void 0:t.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(o){console.log("[FOOTER] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),false,(function(o){e.envelope=o}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.render=function(){var e=this;var o,t,n,i,s,r,a,d,c,l,f,u,v,b,p,g,x,w,k,m,y,C,L,H;var D=!!((t=(o=this.envelope)===null||o===void 0?void 0:o.organization)===null||t===void 0?void 0:t.powered_by_label);var V=!!((i=(n=this.envelope)===null||n===void 0?void 0:n.organization)===null||i===void 0?void 0:i.terms_use_url)||!!((r=(s=this.envelope)===null||s===void 0?void 0:s.organization)===null||r===void 0?void 0:r.privacy_policy_url);var M=!this.isDone;return h(Host,{key:"2016c55a9196cb3ec96678038df0db7daa21b64d",class:{"has-buttons":M,"no-buttons":!M,"has-powered-by":D,"has-links":V,"just-buttons":!D&&!V}},((d=(a=this.envelope)===null||a===void 0?void 0:a.organization)===null||d===void 0?void 0:d.powered_by_label)&&h("div",{key:"47d03008c756feb7d7d4ba55d3f7ebd14c46634f",class:"powered-by"},((l=(c=this.envelope)===null||c===void 0?void 0:c.organization)===null||l===void 0?void 0:l.powered_by_url)?h("a",{href:(u=(f=this.envelope)===null||f===void 0?void 0:f.organization)===null||u===void 0?void 0:u.powered_by_url,target:"_blank",rel:"noopener noreferrer"},h("span",null,(b=(v=this.envelope)===null||v===void 0?void 0:v.organization)===null||b===void 0?void 0:b.powered_by_label)):h("span",null,(g=(p=this.envelope)===null||p===void 0?void 0:p.organization)===null||g===void 0?void 0:g.powered_by_label)),!this.isDone&&h("div",{key:"ec4243adcc09cd5ec12a91d0eb5164a05e1a15d0",class:"buttons"},h("button",{key:"6783fd9a0a9c9b36d476291f2e7f8dd63c8fa66b",onClick:function(){return e.askingQuestion=true}},h("span",{key:"28d3a5b206498f12c4e18f64f00f7a75963172f7",innerHTML:QuestionIcon}),"Ask Sender a Question"),h("button",{key:"69509c288e80a550705880b66abb01bbc12b7a61",onClick:function(){var o;return(o=e.decline)===null||o===void 0?void 0:o.emit()}},h("span",{key:"7bad75a4ff16fd23168045626cb579e78db9851d",innerHTML:DeclineIcon}),"Decline Signing"),h("button",{key:"d5a61e976c924b04905f90117a3ffcb61a750a68",onClick:function(){var o;return(o=e.finishLater)===null||o===void 0?void 0:o.emit()}},h("span",{key:"7ba6413299135e1731048ae3368df0ff5640a750",innerHTML:SaveIcon}),"Finish Later")),h("div",{key:"1e77fd76a189e1dfdc60ef8d60b79fba5905ae22",class:"links"},((w=(x=this.envelope)===null||x===void 0?void 0:x.organization)===null||w===void 0?void 0:w.terms_use_url)&&h("a",{key:"57f9055f96d0a4bc6d0b2881a035156d1a3e1df2",href:(m=(k=this.envelope)===null||k===void 0?void 0:k.organization)===null||m===void 0?void 0:m.terms_use_url,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"8f07d35eff0a44bf56a3557c269830fe789573ec"},"Terms of Use")),((C=(y=this.envelope)===null||y===void 0?void 0:y.organization)===null||C===void 0?void 0:C.privacy_policy_url)&&h("a",{key:"89c5bbbc7d7a0c16cbe1b2116842696e357afaa0",href:(H=(L=this.envelope)===null||L===void 0?void 0:L.organization)===null||H===void 0?void 0:H.privacy_policy_url,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"bdf20919570db98342527b912aca3508f952c3d0"},"Privacy Policy"))),this.askingQuestion&&h("verdocs-question-dialog",{key:"925d2470a33d987ec5ede9b6ab39125a00115309",onNext:function(o){var t;(t=e.askQuestion)===null||t===void 0?void 0:t.emit({question:o.detail.question});e.askingQuestion=false},onExit:function(){return e.askingQuestion=false}}))};return e}();VerdocsSignFooter.style=verdocsSignFooterCss();export{VerdocsDownloadDialog as verdocs_download_dialog,VerdocsEnvelopeDocumentPage as verdocs_envelope_document_page,VerdocsQuestionDialog as verdocs_question_dialog,VerdocsSignFooter as verdocs_sign_footer};
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{d(n.next(e))}catch(e){s(e)}}function a(e){try{d(n["throw"](e))}catch(e){s(e)}}function d(e){e.done?t(e.value):i(e.value).then(r,a)}d((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return d([e,o])}}function d(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-CjTHbolG.js";import{D as DownloadAction}from"./Types-CIxfEdV7.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri,getEnvelope}from"@verdocs/js-sdk";import{t as throttle}from"./utils-Bh3zb1Xs.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-C7hFgM52.js";import"./index-BglCURB-.js";var verdocsDownloadDialogCss=function(){return'verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .spinner-inline{display:-ms-flexbox;display:flex;color:#9ca3af;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}'};var DocumentIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M13 2V9H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var CertificateIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.21 13.89L7 23L12 20L17 23L15.79 13.88" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var ZipIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 16V22H14V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 16H18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 22H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 10L12 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 12L12 16L16 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 16V4H20V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var CheckIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var RefreshIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23 4V10H17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.49 15A9 9 0 1 1 21.23 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var VerdocsDownloadDialog=function(){function e(e){registerInstance(this,e);this.download=createEvent(this,"download");this.exit=createEvent(this,"exit");this.signed=false;this.polling=false;this.documents=[];this.hasCertificate=false}e.prototype.handleOptionClick=function(e,o){var t=this.documents.some((function(e){return e.type==="certificate"}))||this.hasCertificate;var n=this.signed&&t;var i=e===DownloadAction.certificate&&!n;var s=e===DownloadAction.zip&&(this.polling||!n);var r=e===DownloadAction.combined&&(this.polling||!n||!o);if(i||s||r)return;this.download.emit({action:e,documentId:o})};e.prototype.render=function(){var e=this;var o=this.documents.filter((function(e){return e.type==="attachment"})).sort((function(e,o){return e.order!==o.order?e.order-o.order:e.created_at.localeCompare(o.created_at)}));var t=this.documents.find((function(e){return e.type==="certificate"}));var n=!!t||this.hasCertificate;var i=this.signed&&n;var s=!this.polling&&i;var r=s&&!!(t===null||t===void 0?void 0:t.id);var a=!this.signed;return h("verdocs-dialog",{key:"09670a45a18cf110462390fd0ef2f705b3577f31",onExit:function(){return e.exit.emit()}},h("div",{key:"2b01ee1c71aa51f80d9ecf1ec16a62af146342cd",slot:"heading",class:"heading-container"},h("h3",{key:"1ddb9cf369621aeafebc0ce3511f1e59579ee471",style:{margin:"0",fontSize:"1.25rem",fontWeight:"600",padding:"16px 24px"}},"Download")),h("div",{key:"c62c72d8eeb5bc7cde8791370bcc2f5a46978dd1",slot:"content",class:"content"},o.length<=2&&o.map((function(o){return h("div",{class:"download-option",onClick:function(){return e.handleOptionClick(DownloadAction.document,o.id)}},h("div",{class:"icon-container",innerHTML:DocumentIcon}),h("div",{class:"text-container"},h("div",{class:"label"},o.name),h("div",{class:"description"},"Download the document")),a?h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon})):h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Signed")))})),o.length>2&&h("div",{key:"10f6f2b1a7197533e5ad1d8b00cdfb14b465eec1",class:"info-message"},"Multiple documents attached. Please use the ZIP option below to download all files."),h("div",{key:"8a0c4c5a3e7c5f99626b2f2ece050b3c66f53006",class:{"download-option":true,disabled:!i},onClick:function(){return e.handleOptionClick(DownloadAction.certificate)},title:!i?"Certificate not yet available":""},h("div",{key:"f44f22a0655603d2af1785fd306aea4b99e168a9",class:"icon-container",innerHTML:CertificateIcon}),h("div",{key:"fa99982c36808621b10dd30a72412be02b2ac0c7",class:"text-container"},h("div",{key:"66d6d8d832ca66f17d2b6074fe80f0a573539aa7",class:"label"},"Certificate"),h("div",{key:"a7c6c02afdf06fb59622f41e80946e9ad0feb231",class:"description"},"Download the certificate")),i?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon}))),h("div",{key:"d6c7a9d4ffa660869730292e8981b7fca9ec2d7a",class:{"download-option":true,disabled:!r},onClick:function(){return e.handleOptionClick(DownloadAction.combined,t===null||t===void 0?void 0:t.id)},title:!r?"Waiting for all documents to be ready":""},h("div",{key:"c49585f9f2995bf90a6a7a7f1006ff62e1c4ff75",class:"icon-container",innerHTML:ZipIcon}),h("div",{key:"c886fb02b282f9e3e8bbc932652e85acadba3620",class:"text-container"},h("div",{key:"cd321c5acde3b28048549f8dfb4ae576e21b0b71",class:"label"},"Combined"),h("div",{key:"cbb9b3280585382ad606611fd07ab040b9176d69",class:"description"},"Merge envelopes & certificate into a single PDF")),r?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon}))),h("div",{key:"33e022ea22d4aa4b9e4169ec8709243d143c9320",class:{"download-option":true,disabled:!s},onClick:function(){return e.handleOptionClick(DownloadAction.zip)},title:!s?"Waiting for all documents to be ready":""},h("div",{key:"96af105f93ed2cf4903466df246d9be3eeebbbdc",class:"icon-container",innerHTML:ZipIcon}),h("div",{key:"f4ca89d84a10444d9db3b3745779a5eee05cf73d",class:"text-container"},h("div",{key:"c48b2b5a6184162b59123981ac2bdbe2d358f8b9",class:"label"},"All Files"),h("div",{key:"72620fada50c48437eaa40983f7b6e8c84e4f35a",class:"description"},"Download everything as a ZIP file")),s?h("div",{class:"status-indicator"},h("div",{class:"signed",innerHTML:CheckIcon}),h("span",null,"Ready")):h("div",{class:"status-indicator"},h("div",{class:"spinner-inline",innerHTML:RefreshIcon})))),h("div",{key:"0f10d2c47891ad31a70d5ef412377a35c58f840d",slot:"footer",style:{display:"none"}}))};return e}();VerdocsDownloadDialog.style=verdocsDownloadDialogCss();var verdocsEnvelopeDocumentPageCss=function(){return"verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}"};var VerdocsEnvelopeDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered");this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:e=this;return[4,getEnvelopeDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber,this.type)];case 1:e.pageDisplayUri=o.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(o){for(var t=0,n=o;t<n.length;t++){var i=n[t];var s=i.contentRect.width;e.renderedWidth=s;e.renderedHeight=e.virtualHeight*(s/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};e.prototype.render=function(){var e=this;var o="".concat(this.renderedHeight,"px");return h(Host,{key:"7ed2187dfb4ef248411d777ad2837ba18a85ec45",id:"".concat(this.containerId),style:{height:o,flex:"0 0 ".concat(o)}},this.layers.map((function(t){return t.type==="div"?h("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(t.name),style:{height:o}}):e.pageDisplayUri?h("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(t.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(o){e.naturalWidth=o.target.naturalWidth;e.naturalHeight=o.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=o.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsEnvelopeDocumentPage.style=verdocsEnvelopeDocumentPageCss();var verdocsQuestionDialogCss=function(){return'verdocs-question-dialog{top:0;left:0;right:0;bottom:0;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-question-dialog.closed{display:none}verdocs-question-dialog textarea{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:14px;padding:9px;outline:none}verdocs-question-dialog .heading .title{font-size:18px}verdocs-question-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;border-radius:6px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button.cancel{background-color:#654dcb}verdocs-question-dialog .buttons button.ok{background-color:#55bc81}verdocs-question-dialog .buttons button.ok.single{max-width:150px}verdocs-question-dialog .buttons button:disabled{background-color:#6c727f}'};var QuestionIcon$1='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#ffffff"/></svg>';var VerdocsQuestionDialog=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next");this.exit=createEvent(this,"exit");this.question="";this.closed=false}e.prototype.handleOk=function(){this.next.emit({question:this.question})};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}};e.prototype.render=function(){var e=this;return h("verdocs-dialog",{key:"2697b58a7c65243705c15993e5a967894b725196",onExit:function(o){return e.handleDismiss(o)}},h("div",{key:"0c6d340d05717b4580e001e8cff4d544f3dac072",slot:"heading",class:"heading"},h("div",{key:"e5e3c323b48a90431f2593a062715d316608dc71",class:"icon",innerHTML:QuestionIcon$1}),h("div",{key:"8ebc86de76b84cf255efbf6bc8db8876142e858d",class:"title"},"Ask the Sender a Question")),h("div",{key:"c3f96587257dbd2e0ce98eba44a8ef7c3bba7c88",slot:"content",class:"content"},h("textarea",{key:"22c2c8dd80e41e77e0bed92f0b48a81f85466532",name:"question",rows:6,placeholder:"Enter your question...",onInput:function(o){return e.question=o.target.value}},this.question)),h("div",{key:"11a32d726ead166b7b9bfa994a31de4c4998fdec",class:"footer",slot:"footer"},h("div",{key:"3fa336237b33537b9154c1eb7dfcd6b929a28e1e",class:"buttons"},h("button",{key:"aedcec8fc3948515d93adce69f15eb048bdd824e",class:"cancel",onClick:function(){return e.handleCancel()}},"Cancel"),h("button",{key:"2bd012fe2e6866922edde4a4abadb943c78f44ef",class:"ok",onClick:function(){return e.handleOk()}},"OK"))))};return e}();VerdocsQuestionDialog.style=verdocsQuestionDialogCss();var verdocsSignFooterCss=function(){return'verdocs-sign-footer{left:0;right:0;bottom:0;height:48px;display:-ms-flexbox;display:flex;color:#616161;position:fixed;font-size:12px;padding:0 24px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;background:#ffffff;container-type:inline-size;border-top:1px solid #e0e0e0;-ms-flex-pack:justify;justify-content:space-between;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-sign-footer a{color:#616161;cursor:pointer;text-decoration:none;border-bottom:1px dotted #616161}verdocs-sign-footer.loading{display:none}verdocs-sign-footer .powered-by{white-space:nowrap}verdocs-sign-footer .buttons{-ms-flex:0;flex:0;gap:16px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;white-space:nowrap;-ms-flex-align:center;align-items:center}verdocs-sign-footer .buttons button{gap:4px;border:none;display:-ms-flexbox;display:flex;outline:none;cursor:pointer;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent}verdocs-sign-footer .buttons div{gap:4px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-sign-footer .links{-ms-flex:0;flex:0;gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;white-space:nowrap}verdocs-sign-footer.just-buttons .buttons{-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center}@container (max-width: 720px){verdocs-sign-footer.has-buttons .powered-by{display:none}}@container (max-width: 540px){verdocs-sign-footer.no-buttons .powered-by{display:none}verdocs-sign-footer.has-buttons .links{display:none}verdocs-sign-footer .buttons{-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center}}'};var QuestionIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#424242"/></svg>';var DeclineIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z" fill="#424242"/></svg>';var SaveIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z" fill="#424242"/></svg>';var VerdocsSignFooter=function(){function e(e){registerInstance(this,e);this.askQuestion=createEvent(this,"askQuestion");this.decline=createEvent(this,"decline");this.finishLater=createEvent(this,"finishLater");this.sdkError=createEvent(this,"sdkError");this.envelopeListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.isDone=false;this.askingQuestion=false;this.declinine=false;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(n){try{if(!this.envelopeId){console.log("[FOOTER] Missing required envelope ID ".concat(this.envelopeId));return[2]}this.listenToEnvelope()}catch(n){console.log("[FOOTER] Error loading envelope",n);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(n.message,(o=n.response)===null||o===void 0?void 0:o.status,(t=n.response)===null||t===void 0?void 0:t.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(o){console.log("[FOOTER] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),false,(function(o){e.envelope=o}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.render=function(){var e=this;var o,t,n,i,s,r,a,d,c,l,f,u,v,b,p,g,x,w,k,m,y,C,L,H;var D=!!((t=(o=this.envelope)===null||o===void 0?void 0:o.organization)===null||t===void 0?void 0:t.powered_by_label);var V=!!((i=(n=this.envelope)===null||n===void 0?void 0:n.organization)===null||i===void 0?void 0:i.terms_use_url)||!!((r=(s=this.envelope)===null||s===void 0?void 0:s.organization)===null||r===void 0?void 0:r.privacy_policy_url);var M=!this.isDone;return h(Host,{key:"2016c55a9196cb3ec96678038df0db7daa21b64d",class:{"has-buttons":M,"no-buttons":!M,"has-powered-by":D,"has-links":V,"just-buttons":!D&&!V}},((d=(a=this.envelope)===null||a===void 0?void 0:a.organization)===null||d===void 0?void 0:d.powered_by_label)&&h("div",{key:"47d03008c756feb7d7d4ba55d3f7ebd14c46634f",class:"powered-by"},((l=(c=this.envelope)===null||c===void 0?void 0:c.organization)===null||l===void 0?void 0:l.powered_by_url)?h("a",{href:(u=(f=this.envelope)===null||f===void 0?void 0:f.organization)===null||u===void 0?void 0:u.powered_by_url,target:"_blank",rel:"noopener noreferrer"},h("span",null,(b=(v=this.envelope)===null||v===void 0?void 0:v.organization)===null||b===void 0?void 0:b.powered_by_label)):h("span",null,(g=(p=this.envelope)===null||p===void 0?void 0:p.organization)===null||g===void 0?void 0:g.powered_by_label)),!this.isDone&&h("div",{key:"ec4243adcc09cd5ec12a91d0eb5164a05e1a15d0",class:"buttons"},h("button",{key:"6783fd9a0a9c9b36d476291f2e7f8dd63c8fa66b",onClick:function(){return e.askingQuestion=true}},h("span",{key:"28d3a5b206498f12c4e18f64f00f7a75963172f7",innerHTML:QuestionIcon}),"Ask Sender a Question"),h("button",{key:"69509c288e80a550705880b66abb01bbc12b7a61",onClick:function(){var o;return(o=e.decline)===null||o===void 0?void 0:o.emit()}},h("span",{key:"7bad75a4ff16fd23168045626cb579e78db9851d",innerHTML:DeclineIcon}),"Decline Signing"),h("button",{key:"d5a61e976c924b04905f90117a3ffcb61a750a68",onClick:function(){var o;return(o=e.finishLater)===null||o===void 0?void 0:o.emit()}},h("span",{key:"7ba6413299135e1731048ae3368df0ff5640a750",innerHTML:SaveIcon}),"Finish Later")),h("div",{key:"1e77fd76a189e1dfdc60ef8d60b79fba5905ae22",class:"links"},((w=(x=this.envelope)===null||x===void 0?void 0:x.organization)===null||w===void 0?void 0:w.terms_use_url)&&h("a",{key:"57f9055f96d0a4bc6d0b2881a035156d1a3e1df2",href:(m=(k=this.envelope)===null||k===void 0?void 0:k.organization)===null||m===void 0?void 0:m.terms_use_url,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"8f07d35eff0a44bf56a3557c269830fe789573ec"},"Terms of Use")),((C=(y=this.envelope)===null||y===void 0?void 0:y.organization)===null||C===void 0?void 0:C.privacy_policy_url)&&h("a",{key:"89c5bbbc7d7a0c16cbe1b2116842696e357afaa0",href:(H=(L=this.envelope)===null||L===void 0?void 0:L.organization)===null||H===void 0?void 0:H.privacy_policy_url,target:"_blank",rel:"noopener noreferrer"},h("span",{key:"bdf20919570db98342527b912aca3508f952c3d0"},"Privacy Policy"))),this.askingQuestion&&h("verdocs-question-dialog",{key:"925d2470a33d987ec5ede9b6ab39125a00115309",onNext:function(o){var t;(t=e.askQuestion)===null||t===void 0?void 0:t.emit({question:o.detail.question});e.askingQuestion=false},onExit:function(){return e.askingQuestion=false}}))};return e}();VerdocsSignFooter.style=verdocsSignFooterCss();export{VerdocsDownloadDialog as verdocs_download_dialog,VerdocsEnvelopeDocumentPage as verdocs_envelope_document_page,VerdocsQuestionDialog as verdocs_question_dialog,VerdocsSignFooter as verdocs_sign_footer};
2
2
  //# sourceMappingURL=verdocs-download-dialog_4.entry.js.map
@@ -1,2 +1,2 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?n(e.value):s(e.value).then(o,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,s,r,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=a(0),o["throw"]=a(1),o["return"]=a(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(n=0)),n)try{if(i=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:n.label++;return{value:a[1],done:false};case 5:n.label++;s=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){n.label=a[1];break}if(a[0]===6&&n.label<r[1]){n.label=r[1];r=a;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(a);break}if(r[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];s=0}finally{i=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,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,r;i<s;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-CjTHbolG.js";import{VerdocsEndpoint,getEnvelopes,integerSequence,getRecipientsWithActions,userCanCancelEnvelope,userCanAct,formatFullName,cancelEnvelope}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-D9l-GFdv.js";import{V as VerdocsToast}from"./Toast-D97GxsI-.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import"./index-BglCURB-.js";import"./Types-CIxfEdV7.js";var verdocsEnvelopesListCss=function(){return'verdocs-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}'};var DocumentIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var ViewFilters=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var StatusFilters=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var SortFilters=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var VerdocsEnvelopesList=function(){function e(e){registerInstance(this,e);this.changeView=createEvent(this,"changeView");this.changeStatus=createEvent(this,"changeStatus");this.changeSort=createEvent(this,"changeSort");this.changeMatch=createEvent(this,"changeMatch");this.sdkError=createEvent(this,"sdkError");this.viewEnvelope=createEvent(this,"viewEnvelope");this.finishEnvelope=createEvent(this,"finishEnvelope");this.endpoint=VerdocsEndpoint.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.onSessionChanged((function(e,t,n){console.log("[ENVELOPES_LIST] onSessionChanged",t,n)}));this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,s,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.loading=true;i={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":i=__assign({},i);break;case"sent":i=__assign({},i);break;case"action":i=__assign(__assign({},i),{status:["pending","in progress"]});break;case"waiting":i=__assign(__assign({},i),{status:["pending","in progress"]});break;case"completed":i=__assign(__assign({},i),{status:["complete"]});break;default:i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){i.status=[this.status]}}if(this.match.trim());return[4,getEnvelopes(this.endpoint,i)];case 1:s=o.sent();this.envelopes=s.envelopes;this.count=s.count;this.loading=false;return[3,3];case 2:r=o.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;saveEnvelopesAsZip(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);VerdocsToast("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){saveEnvelopesAsZip(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);VerdocsToast("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return h(Host,{key:"670d91a559776494b57004fc08016e789469a1c7"},h("div",{key:"be4836499937e06836195f6101a3583cd9f197c0",class:"header"},h("div",{key:"35e6eda21ffd20a5201577dd16150881e4564902",class:"filter"},h("verdocs-text-input",{key:"0720e5c8c93c45ca309d3d0bc30863bde154c60f",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(t){var n;e.match=t.target.value.trim();(n=e.changeMatch)===null||n===void 0?void 0:n.emit(e.match)}})),h("verdocs-quick-filter",{key:"365c5b3a488525b76164521da851a9113e36bb40",label:"View",value:this.view,options:ViewFilters,onOptionSelected:function(t){e.view=t.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"9823ac419c1e7229e51323628c77e9ef9c7d78db",label:"Status",value:this.status,options:StatusFilters,onOptionSelected:function(t){e.status=t.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"f49ba86610fc8812d458c5c86479956dea52e03c",label:"Sort By",value:this.sort,options:SortFilters,onOptionSelected:function(t){e.sort=t.detail.value}}),this.loading&&h("verdocs-spinner",{key:"a88edd64d6927db773914471f4efebd349218bcd",mode:"dark",size:24}),h("div",{key:"fb72473467e8e81aa79ce5dd9b4144d1ea52f230",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&h("verdocs-button",{key:"49beca7f63347b970fe41552886856e47c1c8cb0",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(t){var n;var i=getRecipientsWithActions(t);var s=userCanCancelEnvelope(e.endpoint.profile,t);var r=i.find((function(t){var n;return t.email===((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||""}));var o=r&&s&&userCanAct(((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||"",i);var a=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!o},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!s}];return h("div",{class:"envelope",key:t.id,onClick:function(){var n;return(n=e.viewEnvelope)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,envelope:t})}},h("div",{class:"inner"},h("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===t.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(n){if(n.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[t],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==t.id}))}}}),h("div",{class:"vert-spacer"}),h("span",{innerHTML:DocumentIcon,class:"envelope-icon"}),h("div",{class:"envelope-name"},t.name,":  ",h("div",{class:"envelope-recipients"},t.recipients.map((function(e){return formatFullName(e)})))),h("div",{class:"vert-spacer"}),h("verdocs-status-indicator",{envelope:t,style:{width:"125px"}}),h("div",{class:"vert-spacer"}),h("div",{class:"last-modified"},new Date(t.updated_at).toLocaleString()),h("div",{class:"vert-spacer"}),h("verdocs-dropdown",{options:a,onOptionSelected:function(n){var i,s;switch(n.detail.id){case"view":(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:t});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:t});break;case"download":e.downloadEnvelope(t);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){cancelEnvelope(e.endpoint,t.id).then((function(){return VerdocsToast("Envelope canceled")})).catch((function(e){return VerdocsToast("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&h("div",{key:"6f6c42bf8500f88e062bce7f43b241523d2e9cfe",style:{width:"100%"}},integerSequence(0,this.rowsPerPage).map((function(){return h("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&h("div",{key:"eea9bc23011bb03621c74dba0fc7c8794c176012",class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?h("div",{style:{marginTop:"20px"}},h("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):h("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:[{handleViewUpdated:0}],status:[{handleStatusUpdated:0}],sort:[{handleSortUpdated:0}],match:[{handleMatchUpdated:0}],selectedPage:[{handlePageUpdated:0}]}},enumerable:false,configurable:true});return e}();VerdocsEnvelopesList.style=verdocsEnvelopesListCss();export{VerdocsEnvelopesList as verdocs_envelopes_list};
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?n(e.value):s(e.value).then(o,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,s,r,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=a(0),o["throw"]=a(1),o["return"]=a(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(n=0)),n)try{if(i=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:n.label++;return{value:a[1],done:false};case 5:n.label++;s=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){n.label=a[1];break}if(a[0]===6&&n.label<r[1]){n.label=r[1];r=a;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(a);break}if(r[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];s=0}finally{i=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,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,r;i<s;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-CjTHbolG.js";import{VerdocsEndpoint,getEnvelopes,integerSequence,getRecipientsWithActions,userCanCancelEnvelope,userCanAct,formatFullName,cancelEnvelope}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-Bh3zb1Xs.js";import{V as VerdocsToast}from"./Toast-D97GxsI-.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import"./index-BglCURB-.js";import"./Types-CIxfEdV7.js";var verdocsEnvelopesListCss=function(){return'verdocs-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}'};var DocumentIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var ViewFilters=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var StatusFilters=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var SortFilters=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var VerdocsEnvelopesList=function(){function e(e){registerInstance(this,e);this.changeView=createEvent(this,"changeView");this.changeStatus=createEvent(this,"changeStatus");this.changeSort=createEvent(this,"changeSort");this.changeMatch=createEvent(this,"changeMatch");this.sdkError=createEvent(this,"sdkError");this.viewEnvelope=createEvent(this,"viewEnvelope");this.finishEnvelope=createEvent(this,"finishEnvelope");this.endpoint=VerdocsEndpoint.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.onSessionChanged((function(e,t,n){console.log("[ENVELOPES_LIST] onSessionChanged",t,n)}));this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,s,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.loading=true;i={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":i=__assign({},i);break;case"sent":i=__assign({},i);break;case"action":i=__assign(__assign({},i),{status:["pending","in progress"]});break;case"waiting":i=__assign(__assign({},i),{status:["pending","in progress"]});break;case"completed":i=__assign(__assign({},i),{status:["complete"]});break;default:i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){i.status=[this.status]}}if(this.match.trim());return[4,getEnvelopes(this.endpoint,i)];case 1:s=o.sent();this.envelopes=s.envelopes;this.count=s.count;this.loading=false;return[3,3];case 2:r=o.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;saveEnvelopesAsZip(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);VerdocsToast("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){saveEnvelopesAsZip(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);VerdocsToast("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return h(Host,{key:"670d91a559776494b57004fc08016e789469a1c7"},h("div",{key:"be4836499937e06836195f6101a3583cd9f197c0",class:"header"},h("div",{key:"35e6eda21ffd20a5201577dd16150881e4564902",class:"filter"},h("verdocs-text-input",{key:"0720e5c8c93c45ca309d3d0bc30863bde154c60f",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(t){var n;e.match=t.target.value.trim();(n=e.changeMatch)===null||n===void 0?void 0:n.emit(e.match)}})),h("verdocs-quick-filter",{key:"365c5b3a488525b76164521da851a9113e36bb40",label:"View",value:this.view,options:ViewFilters,onOptionSelected:function(t){e.view=t.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"9823ac419c1e7229e51323628c77e9ef9c7d78db",label:"Status",value:this.status,options:StatusFilters,onOptionSelected:function(t){e.status=t.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"f49ba86610fc8812d458c5c86479956dea52e03c",label:"Sort By",value:this.sort,options:SortFilters,onOptionSelected:function(t){e.sort=t.detail.value}}),this.loading&&h("verdocs-spinner",{key:"a88edd64d6927db773914471f4efebd349218bcd",mode:"dark",size:24}),h("div",{key:"fb72473467e8e81aa79ce5dd9b4144d1ea52f230",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&h("verdocs-button",{key:"49beca7f63347b970fe41552886856e47c1c8cb0",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(t){var n;var i=getRecipientsWithActions(t);var s=userCanCancelEnvelope(e.endpoint.profile,t);var r=i.find((function(t){var n;return t.email===((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||""}));var o=r&&s&&userCanAct(((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||"",i);var a=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!o},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!s}];return h("div",{class:"envelope",key:t.id,onClick:function(){var n;return(n=e.viewEnvelope)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,envelope:t})}},h("div",{class:"inner"},h("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===t.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(n){if(n.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[t],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==t.id}))}}}),h("div",{class:"vert-spacer"}),h("span",{innerHTML:DocumentIcon,class:"envelope-icon"}),h("div",{class:"envelope-name"},t.name,":  ",h("div",{class:"envelope-recipients"},t.recipients.map((function(e){return formatFullName(e)})))),h("div",{class:"vert-spacer"}),h("verdocs-status-indicator",{envelope:t,style:{width:"125px"}}),h("div",{class:"vert-spacer"}),h("div",{class:"last-modified"},new Date(t.updated_at).toLocaleString()),h("div",{class:"vert-spacer"}),h("verdocs-dropdown",{options:a,onOptionSelected:function(n){var i,s;switch(n.detail.id){case"view":(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:t});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:t});break;case"download":e.downloadEnvelope(t);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){cancelEnvelope(e.endpoint,t.id).then((function(){return VerdocsToast("Envelope canceled")})).catch((function(e){return VerdocsToast("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&h("div",{key:"6f6c42bf8500f88e062bce7f43b241523d2e9cfe",style:{width:"100%"}},integerSequence(0,this.rowsPerPage).map((function(){return h("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&h("div",{key:"eea9bc23011bb03621c74dba0fc7c8794c176012",class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?h("div",{style:{marginTop:"20px"}},h("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):h("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:[{handleViewUpdated:0}],status:[{handleStatusUpdated:0}],sort:[{handleSortUpdated:0}],match:[{handleMatchUpdated:0}],selectedPage:[{handlePageUpdated:0}]}},enumerable:false,configurable:true});return e}();VerdocsEnvelopesList.style=verdocsEnvelopesListCss();export{VerdocsEnvelopesList as verdocs_envelopes_list};
2
2
  //# sourceMappingURL=verdocs-envelopes-list.entry.js.map