@verdocs/web-sdk 6.5.0-beta.2 → 6.5.0-beta.3

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 (177) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/{utils-4rWXSNpE.js → utils-LPO6l9nR.js} +2 -3
  3. package/dist/{components/p-Btmt1DxH.js.map → cjs/utils-LPO6l9nR.js.map} +1 -1
  4. package/dist/cjs/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-signing-progress.verdocs-view.entry.cjs.js.map +1 -1
  5. package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +11 -10
  6. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-envelope-document-page_3.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +39 -2
  10. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-preview_7.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-sign.cjs.entry.js +76 -17
  13. package/dist/cjs/verdocs-sign.entry.cjs.js.map +1 -1
  14. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  16. package/dist/collection/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.js +11 -10
  17. package/dist/collection/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.js.map +1 -1
  18. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +1 -1
  19. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +77 -17
  20. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  21. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +38 -1
  22. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js.map +1 -1
  23. package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +39 -1
  24. package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js.map +1 -1
  25. package/dist/collection/utils/utils.js +0 -1
  26. package/dist/collection/utils/utils.js.map +1 -1
  27. package/dist/components/{p-kbW0me2Y.js → p-0lrmfxFN.js} +3 -3
  28. package/dist/components/{p-kbW0me2Y.js.map → p-0lrmfxFN.js.map} +1 -1
  29. package/dist/components/{p-Btmt1DxH.js → p-B3TbYvlU.js} +2 -3
  30. package/dist/components/p-B3TbYvlU.js.map +1 -0
  31. package/dist/components/{p-0p8NaKpS.js → p-B9DM7wD0.js} +23 -3
  32. package/dist/components/p-B9DM7wD0.js.map +1 -0
  33. package/dist/components/{p-C5xpynM2.js → p-BXwiCpEb.js} +3 -3
  34. package/dist/components/{p-C5xpynM2.js.map → p-BXwiCpEb.js.map} +1 -1
  35. package/dist/components/{p-QjwQw9ZJ.js → p-C7xRBNX9.js} +3 -3
  36. package/dist/components/{p-QjwQw9ZJ.js.map → p-C7xRBNX9.js.map} +1 -1
  37. package/dist/components/{p-DqqO4T0y.js → p-DCXdeiPc.js} +13 -12
  38. package/dist/components/p-DCXdeiPc.js.map +1 -0
  39. package/dist/components/{p-C1KzzI_w.js → p-DNGq3wZS.js} +3 -3
  40. package/dist/components/{p-C1KzzI_w.js.map → p-DNGq3wZS.js.map} +1 -1
  41. package/dist/components/{p-Z1wZ6-IT.js → p-DZv79sQs.js} +5 -5
  42. package/dist/components/{p-Z1wZ6-IT.js.map → p-DZv79sQs.js.map} +1 -1
  43. package/dist/components/{p-BToCx2ri.js → p-Dl45UNf-.js} +22 -3
  44. package/dist/components/p-Dl45UNf-.js.map +1 -0
  45. package/dist/components/{p-Dr4C7GlH.js → p-DzLB0MYu.js} +6 -6
  46. package/dist/components/{p-Dr4C7GlH.js.map → p-DzLB0MYu.js.map} +1 -1
  47. package/dist/components/{p-IcDkT207.js → p-INlr_V_p.js} +5 -5
  48. package/dist/components/{p-IcDkT207.js.map → p-INlr_V_p.js.map} +1 -1
  49. package/dist/components/{p-_CWDgKqX.js → p-rWeRsA_5.js} +3 -3
  50. package/dist/components/{p-_CWDgKqX.js.map → p-rWeRsA_5.js.map} +1 -1
  51. package/dist/components/verdocs-adopt-signature-dialog.js +1 -1
  52. package/dist/components/verdocs-build.js +7 -7
  53. package/dist/components/verdocs-contact-picker.js +1 -1
  54. package/dist/components/verdocs-envelope-document-page.js +1 -1
  55. package/dist/components/verdocs-envelopes-list.js +2 -2
  56. package/dist/components/verdocs-field-initial.js +1 -1
  57. package/dist/components/verdocs-field-signature.js +1 -1
  58. package/dist/components/verdocs-preview.js +1 -1
  59. package/dist/components/verdocs-quick-filter.js +1 -1
  60. package/dist/components/verdocs-send.js +1 -1
  61. package/dist/components/verdocs-sign.js +82 -22
  62. package/dist/components/verdocs-sign.js.map +1 -1
  63. package/dist/components/verdocs-template-document-page.js +1 -1
  64. package/dist/components/verdocs-template-fields.js +1 -1
  65. package/dist/components/verdocs-templates-list.js +1 -1
  66. package/dist/components/verdocs-view.js +1 -1
  67. package/dist/custom-elements.json +2422 -0
  68. package/dist/esm/loader.js +1 -1
  69. package/dist/esm/{utils-NHDsmnv8.js → utils-UeubfAI_.js} +2 -3
  70. package/dist/{esm-es5/utils-NHDsmnv8.js.map → esm/utils-UeubfAI_.js.map} +1 -1
  71. package/dist/esm/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +1 -1
  72. package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +11 -10
  73. package/dist/esm/verdocs-contact-picker.entry.js +1 -1
  74. package/dist/esm/verdocs-envelope-document-page_3.entry.js +1 -1
  75. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  76. package/dist/esm/verdocs-field-attachment_13.entry.js +39 -2
  77. package/dist/esm/verdocs-pagination_2.entry.js +1 -1
  78. package/dist/esm/verdocs-preview_7.entry.js +1 -1
  79. package/dist/esm/verdocs-sign.entry.js +76 -17
  80. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  81. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  82. package/dist/esm/verdocs-web-sdk.js +1 -1
  83. package/dist/esm-es5/loader.js +1 -1
  84. package/dist/esm-es5/{utils-NHDsmnv8.js → utils-UeubfAI_.js} +2 -2
  85. package/dist/{esm/utils-NHDsmnv8.js.map → esm-es5/utils-UeubfAI_.js.map} +1 -1
  86. package/dist/esm-es5/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +1 -1
  87. package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
  88. package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js.map +1 -1
  89. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  90. package/dist/esm-es5/verdocs-envelope-document-page_3.entry.js +1 -1
  91. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  92. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  93. package/dist/esm-es5/verdocs-field-attachment_13.entry.js.map +1 -1
  94. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  95. package/dist/esm-es5/verdocs-preview_7.entry.js +1 -1
  96. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  97. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  98. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  99. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  100. package/dist/types/components/dialogs/verdocs-adopt-signature-dialog/verdocs-adopt-signature-dialog.d.ts +1 -0
  101. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +3 -2
  102. package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +5 -0
  103. package/dist/types/components/fields/verdocs-field-signature/verdocs-field-signature.d.ts +5 -0
  104. package/dist/types/components.d.ts +16 -0
  105. package/dist/verdocs-web-sdk/p-0029decb.entry.js +2 -0
  106. package/dist/verdocs-web-sdk/p-0029decb.entry.js.map +1 -0
  107. package/dist/verdocs-web-sdk/p-2439e530.entry.js +2 -0
  108. package/dist/verdocs-web-sdk/p-2439e530.entry.js.map +1 -0
  109. package/dist/verdocs-web-sdk/{p-7e580691.entry.js → p-2898f573.entry.js} +2 -2
  110. package/dist/verdocs-web-sdk/{p-94e4d921.system.entry.js → p-2ecec6ed.system.entry.js} +2 -2
  111. package/dist/verdocs-web-sdk/{p-2adc75a7.system.entry.js → p-415fa16f.system.entry.js} +2 -2
  112. package/dist/verdocs-web-sdk/{p-0c567c7d.entry.js → p-464ef358.entry.js} +2 -2
  113. package/dist/verdocs-web-sdk/{p-fe64576a.system.entry.js → p-46991fe7.system.entry.js} +2 -2
  114. package/dist/verdocs-web-sdk/{p-9a7a9d7b.system.entry.js → p-4a19fbe3.system.entry.js} +2 -2
  115. package/dist/verdocs-web-sdk/{p-0b57c1ef.system.entry.js → p-605b48fa.system.entry.js} +2 -2
  116. package/dist/verdocs-web-sdk/p-64d8ea72.entry.js +2 -0
  117. package/dist/verdocs-web-sdk/p-64d8ea72.entry.js.map +1 -0
  118. package/dist/verdocs-web-sdk/p-64e896e9.system.entry.js +2 -0
  119. package/dist/verdocs-web-sdk/p-64e896e9.system.entry.js.map +1 -0
  120. package/dist/verdocs-web-sdk/{p-0709e936.system.entry.js → p-78e8e398.system.entry.js} +3 -3
  121. package/dist/verdocs-web-sdk/p-99ba5e3b.system.entry.js +2 -0
  122. package/dist/verdocs-web-sdk/p-99ba5e3b.system.entry.js.map +1 -0
  123. package/dist/verdocs-web-sdk/{p-303ed47f.entry.js → p-9cdc0980.entry.js} +3 -3
  124. package/dist/verdocs-web-sdk/{p-BRVQ3Epx.system.js.map → p-B0XOGp0Z.system.js.map} +1 -1
  125. package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
  126. package/dist/verdocs-web-sdk/{p-BU5y2rcs.system.js → p-BAU98X36.system.js} +2 -2
  127. package/dist/verdocs-web-sdk/{p-BU5y2rcs.system.js.map → p-BAU98X36.system.js.map} +1 -1
  128. package/dist/verdocs-web-sdk/p-BgTW-H9_.system.js.map +1 -0
  129. package/dist/verdocs-web-sdk/p-CAlOUHPb.system.js.map +1 -0
  130. package/dist/verdocs-web-sdk/{p-nK4J4UFK.js → p-CmnR51jO.js} +2 -2
  131. package/dist/verdocs-web-sdk/{p-nK4J4UFK.js.map → p-CmnR51jO.js.map} +1 -1
  132. package/dist/verdocs-web-sdk/{p-CogJ52UV.system.js.map → p-D-LZAEE-.system.js.map} +1 -1
  133. package/dist/verdocs-web-sdk/p-Dj3cajbH.system.js.map +1 -0
  134. package/dist/verdocs-web-sdk/{p-B_fwtKg3.system.js.map → p-O_JBau3u.system.js.map} +1 -1
  135. package/dist/verdocs-web-sdk/{p-B8lqLcUJ.system.js.map → p-XPySISfx.system.js.map} +1 -1
  136. package/dist/verdocs-web-sdk/{p-831ff4eb.entry.js → p-ab8ba727.entry.js} +2 -2
  137. package/dist/verdocs-web-sdk/{p-d06e0bce.entry.js → p-ae75565d.entry.js} +2 -2
  138. package/dist/verdocs-web-sdk/{p-acc245e6.entry.js → p-d5fc15ee.entry.js} +3 -3
  139. package/dist/verdocs-web-sdk/p-db5c9ec4.system.entry.js +2 -0
  140. package/dist/verdocs-web-sdk/p-db5c9ec4.system.entry.js.map +1 -0
  141. package/dist/verdocs-web-sdk/{p-CyjSP4tG.system.js.map → p-k2jmkyZp.system.js.map} +1 -1
  142. package/dist/verdocs-web-sdk/{p-C9hmmFhm.system.js.map → p-xFl_XV91.system.js.map} +1 -1
  143. package/dist/verdocs-web-sdk/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-signing-progress.verdocs-view.entry.esm.js.map +1 -1
  144. package/dist/verdocs-web-sdk/verdocs-sign.entry.esm.js.map +1 -1
  145. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  146. package/package.json +2 -2
  147. package/dist/cjs/utils-4rWXSNpE.js.map +0 -1
  148. package/dist/components/p-0p8NaKpS.js.map +0 -1
  149. package/dist/components/p-BToCx2ri.js.map +0 -1
  150. package/dist/components/p-DqqO4T0y.js.map +0 -1
  151. package/dist/verdocs-web-sdk/p-0dfacde9.system.entry.js +0 -2
  152. package/dist/verdocs-web-sdk/p-0dfacde9.system.entry.js.map +0 -1
  153. package/dist/verdocs-web-sdk/p-3c45dd79.entry.js +0 -2
  154. package/dist/verdocs-web-sdk/p-3c45dd79.entry.js.map +0 -1
  155. package/dist/verdocs-web-sdk/p-8ad09d97.system.entry.js +0 -2
  156. package/dist/verdocs-web-sdk/p-8ad09d97.system.entry.js.map +0 -1
  157. package/dist/verdocs-web-sdk/p-BcrrIlhF.system.js.map +0 -1
  158. package/dist/verdocs-web-sdk/p-DZW111-z.system.js.map +0 -1
  159. package/dist/verdocs-web-sdk/p-c676d027.entry.js +0 -2
  160. package/dist/verdocs-web-sdk/p-c676d027.entry.js.map +0 -1
  161. package/dist/verdocs-web-sdk/p-dc1eaf38.entry.js +0 -2
  162. package/dist/verdocs-web-sdk/p-dc1eaf38.entry.js.map +0 -1
  163. package/dist/verdocs-web-sdk/p-fef8b6b5.system.entry.js +0 -2
  164. package/dist/verdocs-web-sdk/p-fef8b6b5.system.entry.js.map +0 -1
  165. package/dist/verdocs-web-sdk/p-gCoMHihf.system.js.map +0 -1
  166. /package/dist/verdocs-web-sdk/{p-7e580691.entry.js.map → p-2898f573.entry.js.map} +0 -0
  167. /package/dist/verdocs-web-sdk/{p-94e4d921.system.entry.js.map → p-2ecec6ed.system.entry.js.map} +0 -0
  168. /package/dist/verdocs-web-sdk/{p-2adc75a7.system.entry.js.map → p-415fa16f.system.entry.js.map} +0 -0
  169. /package/dist/verdocs-web-sdk/{p-0c567c7d.entry.js.map → p-464ef358.entry.js.map} +0 -0
  170. /package/dist/verdocs-web-sdk/{p-fe64576a.system.entry.js.map → p-46991fe7.system.entry.js.map} +0 -0
  171. /package/dist/verdocs-web-sdk/{p-9a7a9d7b.system.entry.js.map → p-4a19fbe3.system.entry.js.map} +0 -0
  172. /package/dist/verdocs-web-sdk/{p-0b57c1ef.system.entry.js.map → p-605b48fa.system.entry.js.map} +0 -0
  173. /package/dist/verdocs-web-sdk/{p-0709e936.system.entry.js.map → p-78e8e398.system.entry.js.map} +0 -0
  174. /package/dist/verdocs-web-sdk/{p-303ed47f.entry.js.map → p-9cdc0980.entry.js.map} +0 -0
  175. /package/dist/verdocs-web-sdk/{p-831ff4eb.entry.js.map → p-ab8ba727.entry.js.map} +0 -0
  176. /package/dist/verdocs-web-sdk/{p-d06e0bce.entry.js.map → p-ae75565d.entry.js.map} +0 -0
  177. /package/dist/verdocs-web-sdk/{p-acc245e6.entry.js.map → p-d5fc15ee.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,a,i){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function d(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?a(e.value):n(e.value).then(d,o)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,d=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return d.next=o(0),d["throw"]=o(1),d["return"]=o(2),typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(e){return function(t){return l([e,t])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(a=0)),a)try{if(i=1,n&&(s=o[0]&2?n["return"]:o[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;if(n=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;n=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(s=a.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){a.label=o[1];break}if(o[0]===6&&a.label<s[1]){a.label=s[1];s=o;break}if(s&&a.label<s[2]){a.label=s[2];a.ops.push(o);break}if(s[2])a.ops.pop();a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e];n=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-BO6MZhlp.system.js","./p-BbPAtVJG.system.js"],(function(e,t){"use strict";var a,i,n;return{setters:[function(t){a=t.p;i=t.b;e("setNonce",t.s)},function(e){n=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return a(i)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:e.sent();return[2,i(JSON.parse('[["p-0472a40b.system",[[256,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["p-0dfacde9.system",[[256,"verdocs-sign",{"endpoint":[1040],"envelopeId":[513,"envelope-id"],"roleId":[513,"role-id"],"inviteCode":[513,"invite-code"],"headerTargetId":[1,"header-target-id"],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"fatalErrorHeader":[32],"fatalErrorMessage":[32],"focusedField":[32],"disclosures":[32],"submitting":[32],"submitted":[32],"isDone":[32],"showDone":[32],"showAdoptSignature":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32],"authStep":[32],"authMethodStates":[32],"kbaQuestions":[32],"showSpinner":[32],"declining":[32],"delegating":[32],"delegated":[32],"startedSigning":[32],"kbaChoices":[32],"loading":[32],"envelope":[32]}]]],["p-9a7a9d7b.system",[[256,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-ead7ce15.system",[[256,"verdocs-templates-list",{"endpoint":[16],"visibility":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]},null,{"sharing":["handleSharingUpdated"],"starred":["handleStarredUpdated"],"sort":["handleSortUpdated"],"name":["handleNameUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-ff26d6ca.system",[[256,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"showReinviteDialog":[32],"showUpdateDialog":[32],"remindersEnabled":[32],"updatingReminders":[32],"initialReminder":[32],"followupReminders":[32],"loading":[32],"envelope":[32]}]]],["p-ba66ef0e.system",[[256,"verdocs-field-payment",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"signed":[4],"roleindex":[2],"showingProperties":[32],"focused":[32],"preparedMessage":[32],"signatureUrl":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-3c41b526.system",[[256,"verdocs-template-create",{"endpoint":[16],"maxSize":[1026,"max-size"],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32],"errorMessage":[32]}]]],["p-cd3b9687.system",[[256,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"displayMode":[1025,"display-mode"],"org_name":[32],"first_name":[32],"last_name":[32],"email":[32],"verificationCode":[32],"newPassword":[32],"password":[32],"confirmpass":[32],"submitting":[32],"resendDisabled":[32],"session":[32],"profile":[32]}]]],["p-14c53f80.system",[[256,"verdocs-date-input",{"value":[1537],"label":[1],"placeholder":[1],"helpText":[1,"help-text"],"disabled":[4],"required":[4],"showingPw":[32],"focused":[32],"containerId":[32],"focusField":[64]}]]],["p-ec6f161e.system",[[256,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32],"loading":[32],"envelope":[32]}]]],["p-314a958b.system",[[256,"verdocs-multiselect",{"label":[1],"placeholder":[1],"options":[16],"selectedOptions":[16],"showPicker":[32]}]]],["p-84c0b47c.system",[[256,"verdocs-quick-functions",{"endpoint":[16]}]]],["p-9f11b87b.system",[[256,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["p-d71a77b4.system",[[256,"verdocs-search-tabs",{"selected":[32]}]]],["p-6987434e.system",[[256,"verdocs-table",{"columns":[16],"data":[16]}]]],["p-7816a3e8.system",[[256,"verdocs-template-card",{"template":[16]}]]],["p-c997753e.system",[[256,"verdocs-template-tags",{"tags":[16]}]]],["p-755119da.system",[[256,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["p-59576595.system",[[256,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["p-daf326e4.system",[[256,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["p-a4b44720.system",[[256,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["p-fb1f1d76.system",[[256,"verdocs-envelope-update-recipient",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"gettingLink":[32],"link":[32],"loading":[32],"envelope":[32],"originalRecipient":[32],"updatedRecipient":[32]}],[256,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"gettingLink":[32],"link":[32],"loading":[32],"envelope":[32],"recipient":[32]}]]],["p-0709e936.system",[[256,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"zip":[32],"address":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"auth_methods":[32],"passcode":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32],"featureFlags":[32],"activeEntitlements":[32]}]]],["p-f49c3b8b.system",[[256,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["p-3bfc0986.system",[[256,"verdocs-switch",{"checked":[1028],"theme":[1],"disabled":[4]}]]],["p-e6015dfb.system",[[256,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"dirty":[32],"saving":[32],"name":[32],"type":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"delegator":[32],"loading":[32],"template":[32]}],[260,"verdocs-menu-panel",{"side":[1],"overlay":[4],"width":[2]},[[4,"click","handleClick"]]]]],["p-94e4d921.system",[[256,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}],[256,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}]]],["p-ecff1ca4.system",[[260,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[260,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["p-210a0cc0.system",[[256,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"description":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}],[256,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[256,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["p-685f42ba.system",[[256,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[256,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["p-97dd9902.system",[[256,"verdocs-dropdown",{"options":[16],"containerId":[32],"showPicker":[32]}]]],["p-3ce33930.system",[[256,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["p-3255c6d0.system",[[256,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["p-0aa25058.system",[[256,"verdocs-flag",{"variant":[1],"label":[1],"showSkip":[4,"show-skip"]}]]],["p-36efc89a.system",[[260,"verdocs-dialog"]]],["p-fef8b6b5.system",[[256,"verdocs-field-attachment",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"dialogOpen":[32],"selectedFile":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-signature",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"name":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-initial",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"initials":[513],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-checkbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-date",{"source":[513],"sourceid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-dropdown",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-radio",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"required":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-textarea",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-textbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"multiline":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-timestamp",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[256,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32],"isDrawing":[32],"hasDrawnSignature":[32],"hasUploadedImage":[32],"uploadedFileName":[32]}],[256,"verdocs-upload-dialog",{"maxSize":[1026,"max-size"],"existingFile":[1032,"existing-file"],"draggingOver":[32],"confirmDelete":[32],"selectedFiles":[32],"errorMessage":[32]}]]],["p-0b57c1ef.system",[[256,"verdocs-template-fields",{"endpoint":[16],"templateId":[1537,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32],"template":[32]},[[4,"keydown","handleKeyDown"]],{"templateId":["onTemplateIdChanged"]}],[256,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"]}],[256,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"showCancel":[4,"show-cancel"],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"loading":[32],"template":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[256,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"sender":[32],"dragging":[32],"loading":[32],"template":[32]}],[256,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"loading":[32],"template":[32]}],[256,"verdocs-template-settings",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"visibility":[32],"sender":[32],"sendReminders":[32],"initialReminder":[32],"followupReminders":[32],"dirty":[32],"loading":[32],"template":[32]}],[256,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["p-fe64576a.system",[[256,"verdocs-sign-footer",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"isDone":[4,"is-done"],"askingQuestion":[32],"declinine":[32],"envelope":[32]}],[256,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}],[256,"verdocs-question-dialog",{"question":[1025],"closed":[32]}]]],["p-b518d80b.system",[[256,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[260,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["p-aa39fd5b.system",[[256,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"label":[32],"type":[32],"name":[32],"required":[32],"readonly":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32],"loading":[32],"template":[32]}],[256,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[256,"verdocs-component-error",{"message":[1]}],[256,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"size":[1],"disabled":[4]}],[256,"verdocs-loader"]]],["p-2adc75a7.system",[[256,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[256,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32],"loading":[32],"template":[32]}]]],["p-8ad09d97.system",[[256,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"showCancelDone":[32],"showLoadError":[32],"loading":[32],"envelope":[32]}],[256,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"recipient":[16],"choices":[16],"agreed":[32],"response":[32],"updatedRecipient":[32],"dobContainerId":[32]}],[256,"verdocs-adopt-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"enteredInitials":[32],"mode":[32],"isDrawing":[32],"hasDrawnSignature":[32]}],[256,"verdocs-disclosure-dialog",{"disclosures":[1],"delegator":[4],"accepted":[32]}],[256,"verdocs-delegate-dialog",{"endpoint":[1040],"envelope":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"message":[32]}],[256,"verdocs-otp-dialog",{"endpoint":[1040],"method":[1],"recipient":[16],"resendDisabled":[32],"response":[32]}],[256,"verdocs-signing-progress",{"current":[2],"total":[2],"mode":[1],"fieldLabel":[1,"field-label"],"fieldCompleted":[4,"field-completed"]}]]]]'),t)]}}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,a){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function d(e){try{l(a.next(e))}catch(e){s(e)}}function o(e){try{l(a["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):n(e.value).then(d,o)}l((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,n,s,d=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return d.next=o(0),d["throw"]=o(1),d["return"]=o(2),typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(e){return function(t){return l([e,t])}}function l(o){if(a)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(i=0)),i)try{if(a=1,n&&(s=o[0]&2?n["return"]:o[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;if(n=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){i.label=o[1];break}if(o[0]===6&&i.label<s[1]){i.label=s[1];s=o;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(o);break}if(s[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];n=0}finally{a=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-BO6MZhlp.system.js","./p-BbPAtVJG.system.js"],(function(e,t){"use strict";var i,a,n;return{setters:[function(t){i=t.p;a=t.b;e("setNonce",t.s)},function(e){n=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var a={};if(e!==""){a.resourcesUrl=new URL(".",e).href}return i(a)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:e.sent();return[2,a(JSON.parse('[["p-0472a40b.system",[[256,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["p-db5c9ec4.system",[[256,"verdocs-sign",{"endpoint":[1040],"envelopeId":[513,"envelope-id"],"roleId":[513,"role-id"],"inviteCode":[513,"invite-code"],"headerTargetId":[1,"header-target-id"],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"fatalErrorHeader":[32],"fatalErrorMessage":[32],"focusedField":[32],"disclosures":[32],"submitting":[32],"submitted":[32],"isDone":[32],"showDone":[32],"adoptingSignature":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"signatureId":[32],"initialId":[32],"documentsSingularPlural":[32],"authStep":[32],"authMethodStates":[32],"kbaQuestions":[32],"showSpinner":[32],"declining":[32],"delegating":[32],"delegated":[32],"kbaChoices":[32],"loading":[32],"envelope":[32]}]]],["p-4a19fbe3.system",[[256,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-ead7ce15.system",[[256,"verdocs-templates-list",{"endpoint":[16],"visibility":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]},null,{"sharing":["handleSharingUpdated"],"starred":["handleStarredUpdated"],"sort":["handleSortUpdated"],"name":["handleNameUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-ff26d6ca.system",[[256,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"showReinviteDialog":[32],"showUpdateDialog":[32],"remindersEnabled":[32],"updatingReminders":[32],"initialReminder":[32],"followupReminders":[32],"loading":[32],"envelope":[32]}]]],["p-ba66ef0e.system",[[256,"verdocs-field-payment",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"signed":[4],"roleindex":[2],"showingProperties":[32],"focused":[32],"preparedMessage":[32],"signatureUrl":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-3c41b526.system",[[256,"verdocs-template-create",{"endpoint":[16],"maxSize":[1026,"max-size"],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32],"errorMessage":[32]}]]],["p-cd3b9687.system",[[256,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"displayMode":[1025,"display-mode"],"org_name":[32],"first_name":[32],"last_name":[32],"email":[32],"verificationCode":[32],"newPassword":[32],"password":[32],"confirmpass":[32],"submitting":[32],"resendDisabled":[32],"session":[32],"profile":[32]}]]],["p-14c53f80.system",[[256,"verdocs-date-input",{"value":[1537],"label":[1],"placeholder":[1],"helpText":[1,"help-text"],"disabled":[4],"required":[4],"showingPw":[32],"focused":[32],"containerId":[32],"focusField":[64]}]]],["p-ec6f161e.system",[[256,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32],"loading":[32],"envelope":[32]}]]],["p-314a958b.system",[[256,"verdocs-multiselect",{"label":[1],"placeholder":[1],"options":[16],"selectedOptions":[16],"showPicker":[32]}]]],["p-84c0b47c.system",[[256,"verdocs-quick-functions",{"endpoint":[16]}]]],["p-9f11b87b.system",[[256,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["p-d71a77b4.system",[[256,"verdocs-search-tabs",{"selected":[32]}]]],["p-6987434e.system",[[256,"verdocs-table",{"columns":[16],"data":[16]}]]],["p-7816a3e8.system",[[256,"verdocs-template-card",{"template":[16]}]]],["p-c997753e.system",[[256,"verdocs-template-tags",{"tags":[16]}]]],["p-755119da.system",[[256,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["p-59576595.system",[[256,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["p-daf326e4.system",[[256,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["p-a4b44720.system",[[256,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["p-fb1f1d76.system",[[256,"verdocs-envelope-update-recipient",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"gettingLink":[32],"link":[32],"loading":[32],"envelope":[32],"originalRecipient":[32],"updatedRecipient":[32]}],[256,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"gettingLink":[32],"link":[32],"loading":[32],"envelope":[32],"recipient":[32]}]]],["p-78e8e398.system",[[256,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"zip":[32],"address":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"auth_methods":[32],"passcode":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32],"featureFlags":[32],"activeEntitlements":[32]}]]],["p-f49c3b8b.system",[[256,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["p-3bfc0986.system",[[256,"verdocs-switch",{"checked":[1028],"theme":[1],"disabled":[4]}]]],["p-e6015dfb.system",[[256,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"dirty":[32],"saving":[32],"name":[32],"type":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"delegator":[32],"loading":[32],"template":[32]}],[260,"verdocs-menu-panel",{"side":[1],"overlay":[4],"width":[2]},[[4,"click","handleClick"]]]]],["p-2ecec6ed.system",[[256,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}],[256,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}]]],["p-ecff1ca4.system",[[260,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[260,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["p-210a0cc0.system",[[256,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"description":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}],[256,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[256,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["p-685f42ba.system",[[256,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[256,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["p-97dd9902.system",[[256,"verdocs-dropdown",{"options":[16],"containerId":[32],"showPicker":[32]}]]],["p-3ce33930.system",[[256,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["p-3255c6d0.system",[[256,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["p-0aa25058.system",[[256,"verdocs-flag",{"variant":[1],"label":[1],"showSkip":[4,"show-skip"]}]]],["p-36efc89a.system",[[260,"verdocs-dialog"]]],["p-64e896e9.system",[[256,"verdocs-field-attachment",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"dialogOpen":[32],"selectedFile":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-signature",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"name":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"signatureid":[513],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-initial",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"initials":[513],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"initialid":[513],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-checkbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-date",{"source":[513],"sourceid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-dropdown",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-radio",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"required":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-textarea",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-textbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"multiline":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-field-timestamp",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[256,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[256,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32],"isDrawing":[32],"hasDrawnSignature":[32],"hasUploadedImage":[32],"uploadedFileName":[32]}],[256,"verdocs-upload-dialog",{"maxSize":[1026,"max-size"],"existingFile":[1032,"existing-file"],"draggingOver":[32],"confirmDelete":[32],"selectedFiles":[32],"errorMessage":[32]}]]],["p-605b48fa.system",[[256,"verdocs-template-fields",{"endpoint":[16],"templateId":[1537,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32],"template":[32]},[[4,"keydown","handleKeyDown"]],{"templateId":["onTemplateIdChanged"]}],[256,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"]}],[256,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"showCancel":[4,"show-cancel"],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"loading":[32],"template":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[256,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"sender":[32],"dragging":[32],"loading":[32],"template":[32]}],[256,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"loading":[32],"template":[32]}],[256,"verdocs-template-settings",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"visibility":[32],"sender":[32],"sendReminders":[32],"initialReminder":[32],"followupReminders":[32],"dirty":[32],"loading":[32],"template":[32]}],[256,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["p-46991fe7.system",[[256,"verdocs-sign-footer",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"isDone":[4,"is-done"],"askingQuestion":[32],"declinine":[32],"envelope":[32]}],[256,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}],[256,"verdocs-question-dialog",{"question":[1025],"closed":[32]}]]],["p-b518d80b.system",[[256,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[260,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["p-aa39fd5b.system",[[256,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"label":[32],"type":[32],"name":[32],"required":[32],"readonly":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32],"loading":[32],"template":[32]}],[256,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[256,"verdocs-component-error",{"message":[1]}],[256,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"size":[1],"disabled":[4]}],[256,"verdocs-loader"]]],["p-415fa16f.system",[[256,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[256,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32],"loading":[32],"template":[32]}]]],["p-99ba5e3b.system",[[256,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"showCancelDone":[32],"showLoadError":[32],"loading":[32],"envelope":[32]}],[256,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"recipient":[16],"choices":[16],"agreed":[32],"response":[32],"updatedRecipient":[32],"dobContainerId":[32]}],[256,"verdocs-adopt-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"enteredInitials":[32],"mode":[32],"isDrawing":[32],"hasDrawnSignature":[32]}],[256,"verdocs-disclosure-dialog",{"disclosures":[1],"delegator":[4],"accepted":[32]}],[256,"verdocs-delegate-dialog",{"endpoint":[1040],"envelope":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"message":[32]}],[256,"verdocs-otp-dialog",{"endpoint":[1040],"method":[1],"recipient":[16],"resendDisabled":[32],"response":[32]}],[256,"verdocs-signing-progress",{"current":[2],"total":[2],"mode":[1],"fieldLabel":[1,"field-label"],"fieldCompleted":[4,"field-completed"]}]]]]'),t)]}}))}))}))}}}));
2
2
  //# sourceMappingURL=p-B8zpaHu-.system.js.map
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function c(e){try{u(n["throw"](e))}catch(e){i(e)}}function u(e){e.done?r(e.value):a(e.value).then(o,c)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=c(0),o["throw"]=c(1),o["return"]=c(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return u([e,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(r=0)),r)try{if(n=1,a&&(i=c[0]&2?a["return"]:c[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;if(a=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;a=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1];i=c;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(c);break}if(i[2])r.ops.pop();r.trys.pop();continue}c=t.call(e,r)}catch(e){c=[6,e];a=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-DmF0GSqu.system.js","@verdocs/js-sdk","./p-CgZsFvRv.system.js"],(function(e){"use strict";var t,r,n,a,i,o;return{setters:[function(e){t=e.d},function(e){r=e.getEnvelopesZip;n=e.downloadBlob;a=e.getEnvelopeFile;i=e.rescale},function(e){o=e.F}],execute:function(){var c=this;var u=e("k",(function(e){switch(e){case"textarea":return 150;case"textbox":return 150;case"timestamp":return 105;case"date":return 75;case"dropdown":return 85;case"attachment":case"payment":return 24;case"radio":case"checkbox":return 14;case"signature":case"initial":return 71}return 150}));var s=e("d",(function(e){switch(e){case"textarea":return 41;case"textbox":return 15;case"timestamp":return 15;case"date":return 15;case"dropdown":return 20;case"attachment":case"payment":return 24;case"radio":case"checkbox":return 14;case"signature":case"initial":return 36}return 50}));var d=e("j",(function(e,t,r,n){var a=t.x,o=a===void 0?0:a,c=t.y,d=c===void 0?0:c,f=t.width,v=f===void 0?u(t.type):f,l=t.height,p=l===void 0?s(t.type):l;e.style.width="".concat(v,"px");e.style.height="".concat(p,"px");e.style.position="absolute";e.style.left="".concat(i(r,o),"px");e.style.bottom="".concat(i(n,d),"px");e.style.transform="scale(".concat(r,", ").concat(n,")")}));var f=e("e",(function(e,t,r){var n=e.x,a=n===void 0?0:n,o=e.y,c=o===void 0?0:o,d=e.width,f=d===void 0?u(e.type):d,v=e.height,l=v===void 0?s(e.type):v;return{zIndex:"100",width:"".concat(f,"px"),height:"".concat(l,"px"),position:"absolute",left:"".concat(i(t,a),"px"),bottom:"".concat(i(r,c),"px"),transform:"scale(".concat(t,", ").concat(r,")")}}));var v=e("g",(function(e){return"verdocs-doc-fld-".concat(e.name)}));var l=e("u",(function(e){var t=v(e);var r=document.getElementById(t);if(r){r.field=e;r.roleindex=e;r.setAttribute("id",t);r.setAttribute("disabled",true);r.setAttribute("disabled",false)}}));var p=e("b",(function(e,t,r,n,a){if(a===void 0){a=1}var i,o;var c=n.disabled,u=c===void 0?false:c,s=n.editable,f=s===void 0?false:s,l=n.draggable,p=l===void 0?false:l,m=n.done,b=m===void 0?false:m;var h=document.getElementById(r.containerId+"-controls");if(!h){console.log("[renderDocumentField] No controls DIV found",r.containerId+"-controls",r);return}switch(t.type){case"attachment":case"date":case"dropdown":case"initial":case"payment":case"signature":case"timestamp":case"textarea":case"textbox":{var x=v(t);var w=document.getElementById(x);if(w){d(w,t,r.xScale,r.yScale);return w}var g=t.type;if(g==="textbox"){if(((i=t["setting"])===null||i===void 0?void 0:i.leading)>0||((o=t["settings"])===null||o===void 0?void 0:o.leading)>0){g="textarea"}}var y=document.createElement("verdocs-field-".concat(g));y.field=t;y.setAttribute("id",x);y.setAttribute("fieldname",t.name);y.setAttribute("source",e);y.setAttribute("sourceid","template_id"in t?t.template_id:t.envelope_id);if(u){y.setAttribute("tabindex",-1);y.setAttribute("disabled",true)}else{y.setAttribute("tabIndex",a)}y.setAttribute("editable",f);y.setAttribute("draggable",p);y.setAttribute("done",b);d(y,t,r.xScale,r.yScale);h.appendChild(y);return y}case"checkbox":{var x=v(t);var w=document.getElementById(x);if(w){d(w,t,r.xScale,r.yScale);return w}var _=document.createElement("verdocs-field-checkbox");_.field=t;_.setAttribute("id",x);_.setAttribute("option",0);_.setAttribute("source",e);_.setAttribute("sourceid","template_id"in t?t.template_id:t.envelope_id);if(u){_.setAttribute("disabled",true)}if(b){_.setAttribute("done",true)}if(f){_.setAttribute("editable",true)}if(p){_.setAttribute("draggable",true)}d(_,t,r.xScale,r.yScale);h.appendChild(_);return _}case"radio":{var x=v(t);var w=document.getElementById(x);if(w){d(w,t,r.xScale,r.yScale);return w}var k=document.createElement("verdocs-field-radio");k.field=t;k.setAttribute("id",x);k.setAttribute("option",0);k.setAttribute("source",e);k.setAttribute("sourceid","template_id"in t?t.template_id:t.envelope_id);if(u){k.setAttribute("disabled",true)}if(b){k.setAttribute("done",true)}if(f){k.setAttribute("editable",true)}if(p){k.setAttribute("draggable",true)}d(k,t,r.xScale,r.yScale);h.appendChild(k);return k}default:console.log("[PREVIEW] Skipping unsupported field type",t);return null}}));var m=e("h",(function(e,t,r){var n=e.style.transform||"";var a="".concat(t,"(").concat(r,")");if(n.includes(t)){e.style.transform=n.replace(new RegExp("".concat(t,"\\(.+?\\)")),a)}else{e.style.transform=n+" "+a}}));var b=e("i",(function(e){e.style.transform=e.style.transform.split(")")[0]+")"}));var h=e("a",(function(e,r,i){return __awaiter(c,void 0,void 0,(function(){var c,u,s;return __generator(this,(function(d){switch(d.label){case 0:c=t.format(new Date(r.updated_at),o);u="".concat(r.name," - ").concat(c,".pdf");return[4,a(e,i)];case 1:s=d.sent();n(s,u);return[2]}}))}))}));var x=e("s",(function(e,a){return __awaiter(c,void 0,void 0,(function(){var i,c,u;return __generator(this,(function(s){switch(s.label){case 0:i=t.format(a.length===1?new Date(a[0].updated_at):new Date,o);c=a.length===1?"".concat(a[0].name," - ").concat(i,".zip"):"Verdocs-Envelopes-".concat(i);console.log("Downloading envelopes as ZIP",a,c);return[4,r(e,a.map((function(e){return e.id})))];case 1:u=s.sent();n(u.data,c);return[2]}}))}))}));var w=e("t",(function(e,t){var r=0;return function(){var n=this;var a=[];for(var i=0;i<arguments.length;i++){a[i]=arguments[i]}clearTimeout(r);r=setTimeout((function(){return e.apply(n,a)}),t)}}));var g=e("c",(function(e,t){if(t===void 0){t="16px Arial"}var r=document.createElement("canvas");var n=r.getContext("2d");n.font=t;return n.measureText(e).width}));var y=e("f",(function(e){var t=(e||"").trim();if(!t||t.startsWith("+")){return t}t=t.replace(/[^0-9]/g,"");t=t.replace(/^0/g,"");return"+1".concat(t)}));var _=e("r",(function(e,t,r,n){var a=document.getElementById(e.containerId+"-controls");if(!a){return}var o=document.createElement("verdocs-flag");o.variant=n.variant;o.label=n.label;o.showSkip=n.showSkip;if(n.id){o.setAttribute("id",n.id)}o.classList.add("verdocs-flag-instance");if(n.onSkip){o.addEventListener("skip",n.onSkip)}if(n.onClick){o.addEventListener("flagClick",n.onClick)}o.style.position="absolute";o.style.left="calc(100% - 14px)";var c=i(e.yScale,t);var u=i(e.yScale,r);var s=c+u;o.style.bottom="".concat(s,"px");console.log("[FLAG-V4] ".concat(n.label," y=").concat(t," h=").concat(r," scY=").concat(c," scH=").concat(u," bottom=").concat(s));a.appendChild(o);return o}))}}}));
2
- //# sourceMappingURL=p-BU5y2rcs.system.js.map
1
+ var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function c(e){try{u(n["throw"](e))}catch(e){i(e)}}function u(e){e.done?r(e.value):a(e.value).then(o,c)}u((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=c(0),o["throw"]=c(1),o["return"]=c(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return u([e,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(r=0)),r)try{if(n=1,a&&(i=c[0]&2?a["return"]:c[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;if(a=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;a=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1];i=c;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(c);break}if(i[2])r.ops.pop();r.trys.pop();continue}c=t.call(e,r)}catch(e){c=[6,e];a=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-DmF0GSqu.system.js","@verdocs/js-sdk","./p-CgZsFvRv.system.js"],(function(e){"use strict";var t,r,n,a,i,o;return{setters:[function(e){t=e.d},function(e){r=e.getEnvelopesZip;n=e.downloadBlob;a=e.getEnvelopeFile;i=e.rescale},function(e){o=e.F}],execute:function(){var c=this;var u=e("k",(function(e){switch(e){case"textarea":return 150;case"textbox":return 150;case"timestamp":return 105;case"date":return 75;case"dropdown":return 85;case"attachment":case"payment":return 24;case"radio":case"checkbox":return 14;case"signature":case"initial":return 71}return 150}));var s=e("d",(function(e){switch(e){case"textarea":return 41;case"textbox":return 15;case"timestamp":return 15;case"date":return 15;case"dropdown":return 20;case"attachment":case"payment":return 24;case"radio":case"checkbox":return 14;case"signature":case"initial":return 36}return 50}));var d=e("j",(function(e,t,r,n){var a=t.x,o=a===void 0?0:a,c=t.y,d=c===void 0?0:c,f=t.width,v=f===void 0?u(t.type):f,l=t.height,p=l===void 0?s(t.type):l;e.style.width="".concat(v,"px");e.style.height="".concat(p,"px");e.style.position="absolute";e.style.left="".concat(i(r,o),"px");e.style.bottom="".concat(i(n,d),"px");e.style.transform="scale(".concat(r,", ").concat(n,")")}));var f=e("e",(function(e,t,r){var n=e.x,a=n===void 0?0:n,o=e.y,c=o===void 0?0:o,d=e.width,f=d===void 0?u(e.type):d,v=e.height,l=v===void 0?s(e.type):v;return{zIndex:"100",width:"".concat(f,"px"),height:"".concat(l,"px"),position:"absolute",left:"".concat(i(t,a),"px"),bottom:"".concat(i(r,c),"px"),transform:"scale(".concat(t,", ").concat(r,")")}}));var v=e("g",(function(e){return"verdocs-doc-fld-".concat(e.name)}));var l=e("u",(function(e){var t=v(e);var r=document.getElementById(t);if(r){r.field=e;r.roleindex=e;r.setAttribute("id",t);r.setAttribute("disabled",true);r.setAttribute("disabled",false)}}));var p=e("b",(function(e,t,r,n,a){if(a===void 0){a=1}var i,o;var c=n.disabled,u=c===void 0?false:c,s=n.editable,f=s===void 0?false:s,l=n.draggable,p=l===void 0?false:l,m=n.done,b=m===void 0?false:m;var h=document.getElementById(r.containerId+"-controls");if(!h){console.log("[renderDocumentField] No controls DIV found",r.containerId+"-controls",r);return}switch(t.type){case"attachment":case"date":case"dropdown":case"initial":case"payment":case"signature":case"timestamp":case"textarea":case"textbox":{var x=v(t);var w=document.getElementById(x);if(w){d(w,t,r.xScale,r.yScale);return w}var g=t.type;if(g==="textbox"){if(((i=t["setting"])===null||i===void 0?void 0:i.leading)>0||((o=t["settings"])===null||o===void 0?void 0:o.leading)>0){g="textarea"}}var y=document.createElement("verdocs-field-".concat(g));y.field=t;y.setAttribute("id",x);y.setAttribute("fieldname",t.name);y.setAttribute("source",e);y.setAttribute("sourceid","template_id"in t?t.template_id:t.envelope_id);if(u){y.setAttribute("tabindex",-1);y.setAttribute("disabled",true)}else{y.setAttribute("tabIndex",a)}y.setAttribute("editable",f);y.setAttribute("draggable",p);y.setAttribute("done",b);d(y,t,r.xScale,r.yScale);h.appendChild(y);return y}case"checkbox":{var x=v(t);var w=document.getElementById(x);if(w){d(w,t,r.xScale,r.yScale);return w}var _=document.createElement("verdocs-field-checkbox");_.field=t;_.setAttribute("id",x);_.setAttribute("option",0);_.setAttribute("source",e);_.setAttribute("sourceid","template_id"in t?t.template_id:t.envelope_id);if(u){_.setAttribute("disabled",true)}if(b){_.setAttribute("done",true)}if(f){_.setAttribute("editable",true)}if(p){_.setAttribute("draggable",true)}d(_,t,r.xScale,r.yScale);h.appendChild(_);return _}case"radio":{var x=v(t);var w=document.getElementById(x);if(w){d(w,t,r.xScale,r.yScale);return w}var k=document.createElement("verdocs-field-radio");k.field=t;k.setAttribute("id",x);k.setAttribute("option",0);k.setAttribute("source",e);k.setAttribute("sourceid","template_id"in t?t.template_id:t.envelope_id);if(u){k.setAttribute("disabled",true)}if(b){k.setAttribute("done",true)}if(f){k.setAttribute("editable",true)}if(p){k.setAttribute("draggable",true)}d(k,t,r.xScale,r.yScale);h.appendChild(k);return k}default:console.log("[PREVIEW] Skipping unsupported field type",t);return null}}));var m=e("h",(function(e,t,r){var n=e.style.transform||"";var a="".concat(t,"(").concat(r,")");if(n.includes(t)){e.style.transform=n.replace(new RegExp("".concat(t,"\\(.+?\\)")),a)}else{e.style.transform=n+" "+a}}));var b=e("i",(function(e){e.style.transform=e.style.transform.split(")")[0]+")"}));var h=e("a",(function(e,r,i){return __awaiter(c,void 0,void 0,(function(){var c,u,s;return __generator(this,(function(d){switch(d.label){case 0:c=t.format(new Date(r.updated_at),o);u="".concat(r.name," - ").concat(c,".pdf");return[4,a(e,i)];case 1:s=d.sent();n(s,u);return[2]}}))}))}));var x=e("s",(function(e,a){return __awaiter(c,void 0,void 0,(function(){var i,c,u;return __generator(this,(function(s){switch(s.label){case 0:i=t.format(a.length===1?new Date(a[0].updated_at):new Date,o);c=a.length===1?"".concat(a[0].name," - ").concat(i,".zip"):"Verdocs-Envelopes-".concat(i);console.log("Downloading envelopes as ZIP",a,c);return[4,r(e,a.map((function(e){return e.id})))];case 1:u=s.sent();n(u.data,c);return[2]}}))}))}));var w=e("t",(function(e,t){var r=0;return function(){var n=this;var a=[];for(var i=0;i<arguments.length;i++){a[i]=arguments[i]}clearTimeout(r);r=setTimeout((function(){return e.apply(n,a)}),t)}}));var g=e("c",(function(e,t){if(t===void 0){t="16px Arial"}var r=document.createElement("canvas");var n=r.getContext("2d");n.font=t;return n.measureText(e).width}));var y=e("f",(function(e){var t=(e||"").trim();if(!t||t.startsWith("+")){return t}t=t.replace(/[^0-9]/g,"");t=t.replace(/^0/g,"");return"+1".concat(t)}));var _=e("r",(function(e,t,r,n){var a=document.getElementById(e.containerId+"-controls");if(!a){return}var o=document.createElement("verdocs-flag");o.variant=n.variant;o.label=n.label;o.showSkip=n.showSkip;if(n.id){o.setAttribute("id",n.id)}o.classList.add("verdocs-flag-instance");if(n.onSkip){o.addEventListener("skip",n.onSkip)}if(n.onClick){o.addEventListener("flagClick",n.onClick)}o.style.position="absolute";o.style.left="calc(100% - 14px)";var c=i(e.yScale,t);var u=i(e.yScale,r);var s=c+u;o.style.bottom="".concat(s,"px");a.appendChild(o);return o}))}}}));
2
+ //# sourceMappingURL=p-BAU98X36.system.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-BU5y2rcs.system.js","sources":["src/utils/utils.ts"],"sourcesContent":["import {format} from 'date-fns';\nimport {downloadBlob, getEnvelopeFile, getEnvelopesZip, IEnvelope, IEnvelopeField, ITemplateField, rescale, TFieldType, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {FORMAT_DATE, IDocumentPageInfo} from './Types';\n\nexport const defaultWidth = (type: TFieldType) => {\n // checkbox was a legacy field type\n switch (type as any) {\n case 'textarea':\n return 150;\n case 'textbox':\n return 150;\n case 'timestamp':\n return 105;\n case 'date':\n return 75;\n case 'dropdown':\n return 85;\n case 'attachment':\n case 'payment':\n return 24;\n case 'radio':\n case 'checkbox':\n return 14;\n case 'signature':\n case 'initial':\n return 71;\n }\n\n return 150;\n};\n\nexport const defaultHeight = (type: TFieldType) => {\n switch (type as any) {\n case 'textarea':\n return 41;\n case 'textbox':\n return 15;\n case 'timestamp':\n return 15;\n case 'date':\n return 15;\n case 'dropdown':\n return 20;\n case 'attachment':\n case 'payment':\n return 24;\n case 'radio':\n case 'checkbox':\n return 14;\n case 'signature':\n case 'initial':\n return 36;\n }\n\n return 50;\n};\n\nexport const setControlStyles = (el: HTMLElement, field: ITemplateField | IEnvelopeField, xScale: number, yScale: number) => {\n let {x = 0, y = 0, width = defaultWidth(field.type), height = defaultHeight(field.type)} = field;\n\n el.style.width = `${width}px`;\n el.style.height = `${height}px`;\n el.style.position = 'absolute';\n el.style.left = `${rescale(xScale, x)}px`;\n el.style.bottom = `${rescale(yScale, y)}px`;\n el.style.transform = `scale(${xScale}, ${yScale})`;\n};\n\nexport const getControlStyles = (field: ITemplateField | IEnvelopeField, xScale: number, yScale: number) => {\n let {x = 0, y = 0, width = defaultWidth(field.type), height = defaultHeight(field.type)} = field;\n\n return {\n zIndex: '100',\n width: `${width}px`,\n height: `${height}px`,\n position: 'absolute',\n left: `${rescale(xScale, x)}px`,\n bottom: `${rescale(yScale, y)}px`,\n transform: `scale(${xScale}, ${yScale})`,\n };\n};\n\nexport const getFieldId = (field: ITemplateField | IEnvelopeField) => {\n return `verdocs-doc-fld-${field.name}`;\n};\n\ninterface IFieldOptions {\n disabled?: boolean;\n editable?: boolean;\n draggable?: boolean;\n done?: boolean;\n}\n\nexport const updateDocumentFieldValue = (field: ITemplateField | IEnvelopeField) => {\n const id = getFieldId(field);\n const existingField = document.getElementById(id) as any;\n if (existingField) {\n existingField.field = field;\n existingField.roleindex = field;\n existingField.setAttribute('id', id); // We need this to trigger a re-render\n existingField.setAttribute('disabled', true); // We need this to trigger a re-render\n existingField.setAttribute('disabled', false); // We need this to trigger a re-render\n }\n};\n\nexport const renderDocumentField = (\n source: 'envelope' | 'template',\n field: ITemplateField | IEnvelopeField,\n docPage: IDocumentPageInfo,\n fieldOptions: IFieldOptions,\n tabIndex: number = 1,\n) => {\n const {disabled = false, editable = false, draggable = false, done = false} = fieldOptions;\n const controlsDiv = document.getElementById(docPage.containerId + '-controls');\n if (!controlsDiv) {\n console.log('[renderDocumentField] No controls DIV found', docPage.containerId + '-controls', docPage);\n return;\n }\n\n // console.log('[renderDocumentField] Rendering field', field);\n\n switch (field.type as any) {\n case 'attachment':\n case 'date':\n case 'dropdown':\n case 'initial':\n case 'payment':\n case 'signature':\n case 'timestamp':\n case 'textarea':\n case 'textbox': {\n const id = getFieldId(field);\n const existingField = document.getElementById(id);\n if (existingField) {\n setControlStyles(existingField, field, docPage.xScale, docPage.yScale);\n return existingField;\n }\n\n let {type} = field;\n if (type === 'textbox') {\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n }\n }\n\n const el: any = document.createElement(`verdocs-field-${type}`);\n el.field = field;\n el.setAttribute('id', id);\n el.setAttribute('fieldname', field.name);\n el.setAttribute('source', source);\n el.setAttribute('sourceid', 'template_id' in field ? field.template_id : field.envelope_id);\n\n if (disabled) {\n el.setAttribute('tabindex', -1);\n el.setAttribute('disabled', true);\n } else {\n el.setAttribute('tabIndex', tabIndex);\n }\n\n el.setAttribute('editable', editable);\n el.setAttribute('draggable', draggable);\n el.setAttribute('done', done);\n\n setControlStyles(el, field, docPage.xScale, docPage.yScale);\n controlsDiv.appendChild(el);\n\n return el;\n }\n\n case 'checkbox': {\n const id = getFieldId(field);\n const existingField = document.getElementById(id);\n if (existingField) {\n setControlStyles(existingField, field, docPage.xScale, docPage.yScale);\n return existingField;\n }\n\n const cbEl: any = document.createElement(`verdocs-field-checkbox`);\n cbEl.field = field;\n cbEl.setAttribute('id', id);\n cbEl.setAttribute('option', 0);\n cbEl.setAttribute('source', source);\n cbEl.setAttribute('sourceid', 'template_id' in field ? field.template_id : field.envelope_id);\n if (disabled) {\n cbEl.setAttribute('disabled', true);\n }\n if (done) {\n cbEl.setAttribute('done', true);\n }\n if (editable) {\n cbEl.setAttribute('editable', true);\n }\n if (draggable) {\n cbEl.setAttribute('draggable', true);\n }\n setControlStyles(cbEl, field, docPage.xScale, docPage.yScale);\n controlsDiv.appendChild(cbEl);\n\n return cbEl;\n }\n\n case 'radio': {\n const id = getFieldId(field);\n const existingField = document.getElementById(id);\n if (existingField) {\n setControlStyles(existingField, field, docPage.xScale, docPage.yScale);\n return existingField;\n }\n\n const radioEl: any = document.createElement(`verdocs-field-radio`);\n radioEl.field = field;\n radioEl.setAttribute('id', id);\n radioEl.setAttribute('option', 0);\n radioEl.setAttribute('source', source);\n radioEl.setAttribute('sourceid', 'template_id' in field ? field.template_id : field.envelope_id);\n if (disabled) {\n radioEl.setAttribute('disabled', true);\n }\n if (done) {\n radioEl.setAttribute('done', true);\n }\n if (editable) {\n radioEl.setAttribute('editable', true);\n }\n if (draggable) {\n radioEl.setAttribute('draggable', true);\n }\n setControlStyles(radioEl, field, docPage.xScale, docPage.yScale);\n controlsDiv.appendChild(radioEl);\n\n return radioEl;\n }\n\n default:\n console.log('[PREVIEW] Skipping unsupported field type', field);\n return null;\n }\n};\n\n/**\n * Helper function to safely set/update components in a CSS transform attribute. Transform is normally set as a string of\n * `operation1(param) operation2(param) ...` components, which makes updating them a bit of a pain. This will remove the\n * specified component if it's already set and replace it with the new value, without touching the other components that\n * may already be set. Note that this operation moves the component to the end of the transform chain so it's not meant\n * to be used for order-sensitive components e.g. translate-then-rotate.\n */\nexport const updateCssTransform = (el: HTMLElement, key: string, value: string) => {\n const currentTransform = el.style.transform || '';\n\n const newValue = `${key}(${value})`;\n if (currentTransform.includes(key)) {\n el.style.transform = currentTransform.replace(new RegExp(`${key}\\\\(.+?\\\\)`), newValue);\n } else {\n el.style.transform = currentTransform + ' ' + newValue;\n }\n};\n\nexport const removeCssTransform = (el: HTMLElement) => {\n // const currentTransform = el.style.transform || '';\n el.style.transform = el.style.transform.split(')')[0] + ')';\n // TODO: This is not working\n // el.style.transform = currentTransform.replace(new RegExp(`\\(${key}\\\\(.+?\\\\)\\)`), '');\n};\n\n// TODO: Shift to getDownloadLilnk\nexport const saveAttachment = async (endpoint: VerdocsEndpoint, envelope: IEnvelope, documentId: string) => {\n // e.g. \"Colorado-Motor-Vehicle-Bill-of-Sale.pdf\"\n const date = format(new Date(envelope.updated_at), FORMAT_DATE);\n const fileName = `${envelope.name} - ${date}.pdf`;\n const data = await getEnvelopeFile(endpoint, documentId);\n downloadBlob(data, fileName);\n};\n\nexport const saveEnvelopesAsZip = async (endpoint: VerdocsEndpoint, envelopes: IEnvelope[]) => {\n const formattedDate = format(envelopes.length === 1 ? new Date(envelopes[0].updated_at) : new Date(), FORMAT_DATE);\n const zipFileName = envelopes.length === 1 ? `${envelopes[0].name} - ${formattedDate}.zip` : `Verdocs-Envelopes-${formattedDate}`;\n console.log('Downloading envelopes as ZIP', envelopes, zipFileName);\n const result = await getEnvelopesZip(\n endpoint,\n envelopes.map(e => e.id),\n );\n downloadBlob(result.data, zipFileName);\n};\n\n/**\n * Throttle a given function by a delay value. Useful for things like resizeObserver.\n */\nexport const throttle = (f: Function, delay: number) => {\n let timer: any = 0;\n return function (...args) {\n clearTimeout(timer);\n timer = setTimeout(() => f.apply(this, args), delay);\n };\n};\n\n/**\n * Compute the rendered width of a given text string, using a given font.\n */\nexport const renderedTextWidth = (text: string, font: string = '16px Arial') => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n ctx.font = font;\n return ctx.measureText(text).width;\n};\n\n// \"(212) 555-1212\" => +12125551212\n// \"+46766861004\" => \"+46766861004\"\n// \"212-555-1212\" => +12125551212\n// \"212.555.1212\" => +12125551212\n// \"212 555 1212\" => +12125551212\n// @see https://46elks.com/kb/e164\nexport const convertToE164 = (input: string) => {\n let temp = (input || '').trim();\n // If we are already prefixed, assume the user did it deliberately and attempt to use what they entered. We also short-circuit blanks.\n if (!temp || temp.startsWith('+')) {\n return temp;\n }\n\n // Remove any spaces, parenthesis or other punctuation.\n temp = temp.replace(/[^0-9]/g, '');\n\n // If the number begins with a zero, remove the leading zero. Do not combine this with the previous step because it needs to be removed\n // whether it's the actual first character e.g. `0(5)` or just the first digit e.g. `(05`.\n temp = temp.replace(/^0/g, '');\n\n // Prepend the country code and +. We're assuming US in this case given the target demographic. Users in other countries would/should be\n // already entering a prefix so they'd shortcut out of this routine via the + prefix check.\n return `+1${temp}`;\n};\n\nexport interface IFlagOptions {\n variant: 'fill' | 'next';\n label: string;\n showSkip?: boolean;\n onSkip?: () => void;\n onClick?: () => void;\n id?: string;\n}\n\nexport const renderDocumentFlag = (\n docPage: IDocumentPageInfo,\n y: number, // Bottom position from field\n height: number, // Field height\n options: IFlagOptions,\n) => {\n const controlsDiv = document.getElementById(docPage.containerId + '-controls');\n if (!controlsDiv) {\n return;\n }\n\n const el: any = document.createElement('verdocs-flag');\n el.variant = options.variant;\n el.label = options.label;\n el.showSkip = options.showSkip;\n if (options.id) {\n el.setAttribute('id', options.id);\n }\n el.classList.add('verdocs-flag-instance'); // Marker class for easy removal\n\n if (options.onSkip) {\n el.addEventListener('skip', options.onSkip);\n }\n if (options.onClick) {\n el.addEventListener('flagClick', options.onClick);\n }\n\n // Position the flag to stick out of the right edge of the page\n el.style.position = 'absolute';\n\n // The flag has a left-pointing arrow that is 14px wide (15% of 97px ~= 14.5px).\n // We want the \"body\" of the rectangle (starting after the arrow) to align with the\n // right edge of the page.\n el.style.left = 'calc(100% - 14px)';\n\n /*\n * Positioning Logic:\n * Field Y is distance from bottom.\n * Fields have `transform-origin: bottom left`.\n * Visual Bottom = y * scale.\n * Visual Top = (y * scale) + (height * scale).\n * Visual Center = (y * scale) + (height * scale) / 2.\n */\n // const flagHeight = 24; // Matches CSS\n const scaledY = rescale(docPage.yScale, y);\n const scaledHeight = rescale(docPage.yScale, height);\n\n // Align Flag Bottom with Field Top\n const bottom = scaledY + scaledHeight;\n\n el.style.bottom = `${bottom}px`;\n\n console.log(`[FLAG-V4] ${options.label} y=${y} h=${height} scY=${scaledY} scH=${scaledHeight} bottom=${bottom}`);\n\n controlsDiv.appendChild(el);\n return el;\n};\n"],"names":["format"],"mappings":";;;;;;;;;;;;;;;;AAIa,kBAAA,YAAY,gBAAG,CAAC,IAAgB,KAAI;;gBAE/C,QAAQ,IAAW;YACjB,QAAA,KAAK,UAAU;YACb,YAAA,OAAO,GAAG;YACZ,QAAA,KAAK,SAAS;YACZ,YAAA,OAAO,GAAG;YACZ,QAAA,KAAK,WAAW;YACd,YAAA,OAAO,GAAG;YACZ,QAAA,KAAK,MAAM;YACT,YAAA,OAAO,EAAE;YACX,QAAA,KAAK,UAAU;YACb,YAAA,OAAO,EAAE;YACX,QAAA,KAAK,YAAY;YACjB,QAAA,KAAK,SAAS;YACZ,YAAA,OAAO,EAAE;YACX,QAAA,KAAK,OAAO;YACZ,QAAA,KAAK,UAAU;YACb,YAAA,OAAO,EAAE;YACX,QAAA,KAAK,WAAW;YAChB,QAAA,KAAK,SAAS;YACZ,YAAA,OAAO,EAAE;;YAGb,IAAA,OAAO,GAAG;YACZ;AAEa,kBAAA,aAAa,gBAAG,CAAC,IAAgB,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AAE;oBAClB,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;;YAE7C,IAAA,IAAI,OAAO,CAAC,OAAO,EAAE;oBACnB,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC;;;YAInD,IAAA,EAAE,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU;;;;YAK9B,IAAA,EAAE,CAAC,KAAK,CAAC,IAAI,GAAG,mBAAmB;YAEnC;;;;;;;YAOG;;gBAEH,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;gBAC1C,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC;;YAGpD,IAAA,MAAM,MAAM,GAAG,OAAO,GAAG,YAAY;gBAErC,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAG,EAAA,MAAM,IAAI;YAE/B,IAAA,OAAO,CAAC,GAAG,CAAC,aAAa,OAAO,CAAC,KAAK,CAAM,GAAA,EAAA,CAAC,MAAM,MAAM,CAAA,KAAA,EAAQ,OAAO,CAAQ,KAAA,EAAA,YAAY,WAAW,MAAM,CAAA,CAAE,CAAC;YAEhH,IAAA,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC;YAC3B,IAAA,OAAO,EAAE;YACX;;;;;;;;"}
1
+ {"version":3,"file":"p-BAU98X36.system.js","sources":["src/utils/utils.ts"],"sourcesContent":["import {format} from 'date-fns';\nimport {downloadBlob, getEnvelopeFile, getEnvelopesZip, IEnvelope, IEnvelopeField, ITemplateField, rescale, TFieldType, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {FORMAT_DATE, IDocumentPageInfo} from './Types';\n\nexport const defaultWidth = (type: TFieldType) => {\n // checkbox was a legacy field type\n switch (type as any) {\n case 'textarea':\n return 150;\n case 'textbox':\n return 150;\n case 'timestamp':\n return 105;\n case 'date':\n return 75;\n case 'dropdown':\n return 85;\n case 'attachment':\n case 'payment':\n return 24;\n case 'radio':\n case 'checkbox':\n return 14;\n case 'signature':\n case 'initial':\n return 71;\n }\n\n return 150;\n};\n\nexport const defaultHeight = (type: TFieldType) => {\n switch (type as any) {\n case 'textarea':\n return 41;\n case 'textbox':\n return 15;\n case 'timestamp':\n return 15;\n case 'date':\n return 15;\n case 'dropdown':\n return 20;\n case 'attachment':\n case 'payment':\n return 24;\n case 'radio':\n case 'checkbox':\n return 14;\n case 'signature':\n case 'initial':\n return 36;\n }\n\n return 50;\n};\n\nexport const setControlStyles = (el: HTMLElement, field: ITemplateField | IEnvelopeField, xScale: number, yScale: number) => {\n let {x = 0, y = 0, width = defaultWidth(field.type), height = defaultHeight(field.type)} = field;\n\n el.style.width = `${width}px`;\n el.style.height = `${height}px`;\n el.style.position = 'absolute';\n el.style.left = `${rescale(xScale, x)}px`;\n el.style.bottom = `${rescale(yScale, y)}px`;\n el.style.transform = `scale(${xScale}, ${yScale})`;\n};\n\nexport const getControlStyles = (field: ITemplateField | IEnvelopeField, xScale: number, yScale: number) => {\n let {x = 0, y = 0, width = defaultWidth(field.type), height = defaultHeight(field.type)} = field;\n\n return {\n zIndex: '100',\n width: `${width}px`,\n height: `${height}px`,\n position: 'absolute',\n left: `${rescale(xScale, x)}px`,\n bottom: `${rescale(yScale, y)}px`,\n transform: `scale(${xScale}, ${yScale})`,\n };\n};\n\nexport const getFieldId = (field: ITemplateField | IEnvelopeField) => {\n return `verdocs-doc-fld-${field.name}`;\n};\n\ninterface IFieldOptions {\n disabled?: boolean;\n editable?: boolean;\n draggable?: boolean;\n done?: boolean;\n}\n\nexport const updateDocumentFieldValue = (field: ITemplateField | IEnvelopeField) => {\n const id = getFieldId(field);\n const existingField = document.getElementById(id) as any;\n if (existingField) {\n existingField.field = field;\n existingField.roleindex = field;\n existingField.setAttribute('id', id); // We need this to trigger a re-render\n existingField.setAttribute('disabled', true); // We need this to trigger a re-render\n existingField.setAttribute('disabled', false); // We need this to trigger a re-render\n }\n};\n\nexport const renderDocumentField = (\n source: 'envelope' | 'template',\n field: ITemplateField | IEnvelopeField,\n docPage: IDocumentPageInfo,\n fieldOptions: IFieldOptions,\n tabIndex: number = 1,\n) => {\n const {disabled = false, editable = false, draggable = false, done = false} = fieldOptions;\n const controlsDiv = document.getElementById(docPage.containerId + '-controls');\n if (!controlsDiv) {\n console.log('[renderDocumentField] No controls DIV found', docPage.containerId + '-controls', docPage);\n return;\n }\n\n // console.log('[renderDocumentField] Rendering field', field);\n\n switch (field.type as any) {\n case 'attachment':\n case 'date':\n case 'dropdown':\n case 'initial':\n case 'payment':\n case 'signature':\n case 'timestamp':\n case 'textarea':\n case 'textbox': {\n const id = getFieldId(field);\n const existingField = document.getElementById(id);\n if (existingField) {\n setControlStyles(existingField, field, docPage.xScale, docPage.yScale);\n return existingField;\n }\n\n let {type} = field;\n if (type === 'textbox') {\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n }\n }\n\n const el: any = document.createElement(`verdocs-field-${type}`);\n el.field = field;\n el.setAttribute('id', id);\n el.setAttribute('fieldname', field.name);\n el.setAttribute('source', source);\n el.setAttribute('sourceid', 'template_id' in field ? field.template_id : field.envelope_id);\n\n if (disabled) {\n el.setAttribute('tabindex', -1);\n el.setAttribute('disabled', true);\n } else {\n el.setAttribute('tabIndex', tabIndex);\n }\n\n el.setAttribute('editable', editable);\n el.setAttribute('draggable', draggable);\n el.setAttribute('done', done);\n\n setControlStyles(el, field, docPage.xScale, docPage.yScale);\n controlsDiv.appendChild(el);\n\n return el;\n }\n\n case 'checkbox': {\n const id = getFieldId(field);\n const existingField = document.getElementById(id);\n if (existingField) {\n setControlStyles(existingField, field, docPage.xScale, docPage.yScale);\n return existingField;\n }\n\n const cbEl: any = document.createElement(`verdocs-field-checkbox`);\n cbEl.field = field;\n cbEl.setAttribute('id', id);\n cbEl.setAttribute('option', 0);\n cbEl.setAttribute('source', source);\n cbEl.setAttribute('sourceid', 'template_id' in field ? field.template_id : field.envelope_id);\n if (disabled) {\n cbEl.setAttribute('disabled', true);\n }\n if (done) {\n cbEl.setAttribute('done', true);\n }\n if (editable) {\n cbEl.setAttribute('editable', true);\n }\n if (draggable) {\n cbEl.setAttribute('draggable', true);\n }\n setControlStyles(cbEl, field, docPage.xScale, docPage.yScale);\n controlsDiv.appendChild(cbEl);\n\n return cbEl;\n }\n\n case 'radio': {\n const id = getFieldId(field);\n const existingField = document.getElementById(id);\n if (existingField) {\n setControlStyles(existingField, field, docPage.xScale, docPage.yScale);\n return existingField;\n }\n\n const radioEl: any = document.createElement(`verdocs-field-radio`);\n radioEl.field = field;\n radioEl.setAttribute('id', id);\n radioEl.setAttribute('option', 0);\n radioEl.setAttribute('source', source);\n radioEl.setAttribute('sourceid', 'template_id' in field ? field.template_id : field.envelope_id);\n if (disabled) {\n radioEl.setAttribute('disabled', true);\n }\n if (done) {\n radioEl.setAttribute('done', true);\n }\n if (editable) {\n radioEl.setAttribute('editable', true);\n }\n if (draggable) {\n radioEl.setAttribute('draggable', true);\n }\n setControlStyles(radioEl, field, docPage.xScale, docPage.yScale);\n controlsDiv.appendChild(radioEl);\n\n return radioEl;\n }\n\n default:\n console.log('[PREVIEW] Skipping unsupported field type', field);\n return null;\n }\n};\n\n/**\n * Helper function to safely set/update components in a CSS transform attribute. Transform is normally set as a string of\n * `operation1(param) operation2(param) ...` components, which makes updating them a bit of a pain. This will remove the\n * specified component if it's already set and replace it with the new value, without touching the other components that\n * may already be set. Note that this operation moves the component to the end of the transform chain so it's not meant\n * to be used for order-sensitive components e.g. translate-then-rotate.\n */\nexport const updateCssTransform = (el: HTMLElement, key: string, value: string) => {\n const currentTransform = el.style.transform || '';\n\n const newValue = `${key}(${value})`;\n if (currentTransform.includes(key)) {\n el.style.transform = currentTransform.replace(new RegExp(`${key}\\\\(.+?\\\\)`), newValue);\n } else {\n el.style.transform = currentTransform + ' ' + newValue;\n }\n};\n\nexport const removeCssTransform = (el: HTMLElement) => {\n // const currentTransform = el.style.transform || '';\n el.style.transform = el.style.transform.split(')')[0] + ')';\n // TODO: This is not working\n // el.style.transform = currentTransform.replace(new RegExp(`\\(${key}\\\\(.+?\\\\)\\)`), '');\n};\n\n// TODO: Shift to getDownloadLilnk\nexport const saveAttachment = async (endpoint: VerdocsEndpoint, envelope: IEnvelope, documentId: string) => {\n // e.g. \"Colorado-Motor-Vehicle-Bill-of-Sale.pdf\"\n const date = format(new Date(envelope.updated_at), FORMAT_DATE);\n const fileName = `${envelope.name} - ${date}.pdf`;\n const data = await getEnvelopeFile(endpoint, documentId);\n downloadBlob(data, fileName);\n};\n\nexport const saveEnvelopesAsZip = async (endpoint: VerdocsEndpoint, envelopes: IEnvelope[]) => {\n const formattedDate = format(envelopes.length === 1 ? new Date(envelopes[0].updated_at) : new Date(), FORMAT_DATE);\n const zipFileName = envelopes.length === 1 ? `${envelopes[0].name} - ${formattedDate}.zip` : `Verdocs-Envelopes-${formattedDate}`;\n console.log('Downloading envelopes as ZIP', envelopes, zipFileName);\n const result = await getEnvelopesZip(\n endpoint,\n envelopes.map(e => e.id),\n );\n downloadBlob(result.data, zipFileName);\n};\n\n/**\n * Throttle a given function by a delay value. Useful for things like resizeObserver.\n */\nexport const throttle = (f: Function, delay: number) => {\n let timer: any = 0;\n return function (...args) {\n clearTimeout(timer);\n timer = setTimeout(() => f.apply(this, args), delay);\n };\n};\n\n/**\n * Compute the rendered width of a given text string, using a given font.\n */\nexport const renderedTextWidth = (text: string, font: string = '16px Arial') => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n ctx.font = font;\n return ctx.measureText(text).width;\n};\n\n// \"(212) 555-1212\" => +12125551212\n// \"+46766861004\" => \"+46766861004\"\n// \"212-555-1212\" => +12125551212\n// \"212.555.1212\" => +12125551212\n// \"212 555 1212\" => +12125551212\n// @see https://46elks.com/kb/e164\nexport const convertToE164 = (input: string) => {\n let temp = (input || '').trim();\n // If we are already prefixed, assume the user did it deliberately and attempt to use what they entered. We also short-circuit blanks.\n if (!temp || temp.startsWith('+')) {\n return temp;\n }\n\n // Remove any spaces, parenthesis or other punctuation.\n temp = temp.replace(/[^0-9]/g, '');\n\n // If the number begins with a zero, remove the leading zero. Do not combine this with the previous step because it needs to be removed\n // whether it's the actual first character e.g. `0(5)` or just the first digit e.g. `(05`.\n temp = temp.replace(/^0/g, '');\n\n // Prepend the country code and +. We're assuming US in this case given the target demographic. Users in other countries would/should be\n // already entering a prefix so they'd shortcut out of this routine via the + prefix check.\n return `+1${temp}`;\n};\n\nexport interface IFlagOptions {\n variant: 'fill' | 'next';\n label: string;\n showSkip?: boolean;\n onSkip?: () => void;\n onClick?: () => void;\n id?: string;\n}\n\nexport const renderDocumentFlag = (\n docPage: IDocumentPageInfo,\n y: number, // Bottom position from field\n height: number, // Field height\n options: IFlagOptions,\n) => {\n const controlsDiv = document.getElementById(docPage.containerId + '-controls');\n if (!controlsDiv) {\n return;\n }\n\n const el: any = document.createElement('verdocs-flag');\n el.variant = options.variant;\n el.label = options.label;\n el.showSkip = options.showSkip;\n if (options.id) {\n el.setAttribute('id', options.id);\n }\n el.classList.add('verdocs-flag-instance'); // Marker class for easy removal\n\n if (options.onSkip) {\n el.addEventListener('skip', options.onSkip);\n }\n if (options.onClick) {\n el.addEventListener('flagClick', options.onClick);\n }\n\n // Position the flag to stick out of the right edge of the page\n el.style.position = 'absolute';\n\n // The flag has a left-pointing arrow that is 14px wide (15% of 97px ~= 14.5px).\n // We want the \"body\" of the rectangle (starting after the arrow) to align with the\n // right edge of the page.\n el.style.left = 'calc(100% - 14px)';\n\n /*\n * Positioning Logic:\n * Field Y is distance from bottom.\n * Fields have `transform-origin: bottom left`.\n * Visual Bottom = y * scale.\n * Visual Top = (y * scale) + (height * scale).\n * Visual Center = (y * scale) + (height * scale) / 2.\n */\n // const flagHeight = 24; // Matches CSS\n const scaledY = rescale(docPage.yScale, y);\n const scaledHeight = rescale(docPage.yScale, height);\n\n // Align Flag Bottom with Field Top\n const bottom = scaledY + scaledH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