@verdocs/web-sdk 4.2.117 → 4.2.119

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 (74) hide show
  1. package/dist/cjs/{utils-c878d0c2.js → utils-469e8fc5.js} +1 -0
  2. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  3. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-preview_9.cjs.entry.js +28 -16
  10. package/dist/cjs/verdocs-sign.cjs.entry.js +3 -27
  11. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  12. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +2 -1
  13. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +1 -1
  14. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +4 -28
  15. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +27 -15
  16. package/dist/collection/utils/utils.js +1 -0
  17. package/dist/components/utils.js +1 -0
  18. package/dist/components/verdocs-auth.js +1 -1
  19. package/dist/components/verdocs-sign.js +3 -27
  20. package/dist/components/verdocs-template-fields2.js +27 -15
  21. package/dist/components/verdocs-upload-dialog2.js +1 -1
  22. package/dist/esm/{utils-0a9eb6f8.js → utils-06448b9b.js} +1 -0
  23. package/dist/esm/verdocs-auth.entry.js +1 -1
  24. package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
  25. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  26. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  27. package/dist/esm/verdocs-field-attachment_13.entry.js +1 -1
  28. package/dist/esm/verdocs-kba-dialog_2.entry.js +1 -1
  29. package/dist/esm/verdocs-pagination_2.entry.js +1 -1
  30. package/dist/esm/verdocs-preview_9.entry.js +28 -16
  31. package/dist/esm/verdocs-sign.entry.js +4 -28
  32. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  33. package/dist/esm-es5/{utils-0a9eb6f8.js → utils-06448b9b.js} +1 -1
  34. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  35. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  36. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  37. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  38. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  39. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
  40. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  41. package/dist/esm-es5/verdocs-preview_9.entry.js +1 -1
  42. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  43. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  44. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -1
  45. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +0 -1
  46. package/dist/types/utils/utils.d.ts +1 -0
  47. package/dist/verdocs-web-sdk/p-1151b8f6.system.entry.js +1 -0
  48. package/dist/verdocs-web-sdk/p-195fbae1.entry.js +1 -0
  49. package/dist/verdocs-web-sdk/{p-9ee3f90d.entry.js → p-1cf84ac4.entry.js} +1 -1
  50. package/dist/verdocs-web-sdk/p-267df026.system.js +1 -1
  51. package/dist/verdocs-web-sdk/{p-d41c5eae.entry.js → p-345f08c2.entry.js} +1 -1
  52. package/dist/verdocs-web-sdk/{p-3a0db043.entry.js → p-35fa7834.entry.js} +1 -1
  53. package/dist/verdocs-web-sdk/{p-d1241532.entry.js → p-3bd8fbaa.entry.js} +1 -1
  54. package/dist/verdocs-web-sdk/{p-b57446bb.system.entry.js → p-4af90836.system.entry.js} +1 -1
  55. package/dist/verdocs-web-sdk/{p-97e16d5d.entry.js → p-4d9b8926.entry.js} +1 -1
  56. package/dist/verdocs-web-sdk/{p-98b60918.system.entry.js → p-6465a990.system.entry.js} +1 -1
  57. package/dist/verdocs-web-sdk/{p-8f29bffd.system.entry.js → p-75079e4e.system.entry.js} +1 -1
  58. package/dist/verdocs-web-sdk/{p-476996a3.system.entry.js → p-77feaf73.system.entry.js} +1 -1
  59. package/dist/verdocs-web-sdk/{p-fd27aa1a.system.entry.js → p-79d28740.system.entry.js} +1 -1
  60. package/dist/verdocs-web-sdk/{p-1f4feeff.system.entry.js → p-8ac88c27.system.entry.js} +1 -1
  61. package/dist/verdocs-web-sdk/{p-a583ffe0.system.entry.js → p-8f68db2b.system.entry.js} +1 -1
  62. package/dist/verdocs-web-sdk/{p-7b5c1bd5.system.entry.js → p-952f4967.system.entry.js} +1 -1
  63. package/dist/verdocs-web-sdk/{p-7933fc15.system.js → p-b96a9a0f.system.js} +1 -1
  64. package/dist/verdocs-web-sdk/{p-123768d7.entry.js → p-ba49517a.entry.js} +1 -1
  65. package/dist/verdocs-web-sdk/{p-e0d7224c.system.entry.js → p-bab9ba61.system.entry.js} +1 -1
  66. package/dist/verdocs-web-sdk/{p-5c903ba4.entry.js → p-c97702db.entry.js} +1 -1
  67. package/dist/verdocs-web-sdk/p-cbac8750.entry.js +1 -0
  68. package/dist/verdocs-web-sdk/{p-925f6ad5.js → p-ddcffa6b.js} +1 -1
  69. package/dist/verdocs-web-sdk/{p-c7606304.entry.js → p-fb70eb59.entry.js} +1 -1
  70. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  71. package/package.json +2 -2
  72. package/dist/verdocs-web-sdk/p-226ae566.entry.js +0 -1
  73. package/dist/verdocs-web-sdk/p-a24ad229.system.entry.js +0 -1
  74. package/dist/verdocs-web-sdk/p-e5b0751b.entry.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,i,t,n){function o(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?t(e.value):o(e.value).then(a,s)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(i){return l([e,i])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(n=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;o=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){t.label=s[1];break}if(s[0]===6&&t.label<r[1]){t.label=r[1];r=s;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(s);break}if(r[2])t.ops.pop();t.trys.pop();continue}s=i.call(e,t)}catch(e){s=[6,e];o=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-7933fc15.system.js","./p-c8a15cb7.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-db854498.system.js"],(function(e){"use strict";var i,t,n,o,r,a,s,l,c,d,f,u,h,p;return{setters:[function(e){i=e.r;t=e.c;n=e.h;o=e.F;r=e.H;a=e.g},function(e){s=e.VerdocsEndpoint;l=e.getEnvelope;c=e.getDocumentDownloadLink;d=e.cancelEnvelope;f=e.userCanCancelEnvelope;u=e.integerSequence},function(e){h=e.s},function(e){p=e.S},function(){},function(){},function(){}],execute:function(){var x='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';var b=x;var v='<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>';var g=e("verdocs_kba_dialog",function(){function e(e){i(this,e);this.exit=t(this,"exit",7);this.next=t(this,"next",7);this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.response=""}e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){if(e.target.className==="background-overlay"){e.preventDefault();this.handleCancel()}};e.prototype.handleDone=function(){this.next.emit(this.response)};e.prototype.render=function(){var e=this;return n(r,{key:"f9a083bccfb6207ec3be7e30e9555df493ceabe4"},n("div",{key:"3bf629c7e6e0fd1e42f11748c8e0137df77271a1",class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},n("div",{key:"9d422b2e5895311095251d9cc538803ec9225a9f",class:"dialog"},n("div",{key:"acc9993b406f7dfef86cd59699afaf2157c59df6",class:"heading"},"Confirm Your Identity",this.steps>1?n("span",{class:"step"},"(",this.step,"/",this.steps,")"):n(o,null)),!!this.helptitle&&n("div",{key:"46eda39009fab8d07eaa48d90b1a6492792ab42a",class:"help-box"},n("div",{key:"29c1540850ccdb8cca5ad84dc8e25de37cac7202",class:"help-icon",innerHTML:v}),n("div",{key:"4d9d5b06f5b6f98c2584e520d1a88103eac108bb",class:"help-details"},n("div",{key:"127cd0963876ca5674f8233685857b5a90d4331f",class:"help-title"},this.helptitle),n("div",{key:"8104f492a91470844fa2cc2cfd3727aa84d74d59",class:"help-text"},this.helptext))),this.mode==="choice"?n("div",{class:"choices"},this.choices.map((function(i){return n("div",{class:"choice ".concat(i===e.response?"selected":""),onClick:function(){return e.response=i}},i)}))):n("div",{class:"input"},n("label",{htmlFor:"verdocs-kba-input"},this.label),n("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:function(i){return e.response=i.target.value}})),n("div",{key:"6f65266320dd0f9ca8ff2a0abe8b0c75cadf2bcb",class:"buttons"},n("verdocs-button",{key:"5baa530487b8264910f9cc3927479271bdef428d",label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),n("verdocs-button",{key:"7a64f46c176edaa9e82872d5ef6226b8bfd3e0f2",label:"Done",onClick:function(){return e.handleDone()},disabled:!this.response})))))};return e}());g.style=b;var m='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var w=m;var y=e("verdocs_view",function(){function e(e){i(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.another=t(this,"another",7);this.view=t(this,"view",7);this.next=t(this,"next",7);this.endpoint=null;this.envelopeId="";this.envelope=null;this.headerTargetId=null;this.canceling=false;this.roleNames=[];this.showCancelDone=false;this.showLoadError=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,o;return __generator(this,(function(r){switch(r.label){case 0:if(!this.endpoint){this.endpoint=s.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}if(!!this.envelope)return[3,4];r.label=1;case 1:r.trys.push([1,3,,4]);console.log("[VIEW] Loading envelope...");n=this;return[4,l(this.endpoint,this.envelopeId)];case 2:n.envelope=r.sent();console.log("[VIEW] Loaded envelope",this.envelope);this.roleNames=this.envelope.recipients.map((function(e){return e.role_name}));return[3,4];case 3:o=r.sent();this.showLoadError=true;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(o.message,(i=o.response)===null||i===void 0?void 0:i.status,(t=o.response)===null||t===void 0?void 0:t.data));return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var i=document.getElementById("verdocs-view-header");if(e&&i){console.log("[VIEW] Moving header");i.remove();e.append(i)}};e.prototype.handlePageRendered=function(e){var i=e.detail;console.log("[VIEW] Page rendered",i)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t,n,o,r,a,r;var s=this;return __generator(this,(function(f){switch(f.label){case 0:n=e.detail.id;switch(n){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,6];case"download-all":return[3,9]}return[3,10];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;d(this.endpoint,this.envelopeId).then((function(e){s.canceling=false;console.log("[VIEW] Envelope canceled",e);return l(s.endpoint,s.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);s.envelope=e})).catch((function(e){var i,t,n;s.canceling=false;console.log("[VIEW] Error canceling envelope",e);(i=s.sdkError)===null||i===void 0?void 0:i.emit(new p(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(n=e.response)===null||n===void 0?void 0:n.data))}));this.showCancelDone=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,10];case 2:window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,10];case 3:o=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(!o)return[3,5];return[4,c(this.endpoint,this.envelopeId,o.id)];case 4:r=f.sent();window.open(r,"_blank");f.label=5;case 5:return[3,10];case 6:a=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!a)return[3,8];return[4,c(this.endpoint,this.envelopeId,a.id)];case 7:r=f.sent();window.open(r,"_blank");f.label=8;case 8:return[3,10];case 9:h(this.endpoint,[this.envelope]).then((function(){var e;(e=s.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:s.endpoint,envelope:s.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,10];case 10:return[2]}}))}))};e.prototype.render=function(){var e=this;var i;if(this.showLoadError){return n(r,null,n("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:"Sorry, that envelope is not valid.",buttonLabel:"OK",onNext:function(){e.showLoadError=false}}))}if(!this.envelope){return n(r,null,n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var t=[{id:"print",label:"Print"}];if(f(this.endpoint.profile,this.envelope)){t.push({id:"cancel",label:"Cancel"})}var a=this.envelope.documents.length>0;var s=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var l=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(a||l){t.push({label:""});if(a){t.push({id:"download-attachments",label:s>1?"Download Documents":"Download Document"})}if(l){t.push({id:"download-certificate",label:"Download Certificate"})}if(a&&l){t.push({id:"download-all",label:"Download All Files"})}}return n(r,null,n("div",{id:"verdocs-view-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name),n("div",{style:{flex:"1"}}),n("div",{style:{marginLeft:"10px"}}),n("verdocs-dropdown",{options:t,onOptionSelected:function(i){return e.handleOptionSelected(i)}}))),n("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((i=this.envelope)===null||i===void 0?void 0:i.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(i){var t=u(1,i.pages);return n(o,null,t.map((function(t){return n("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:i.id,endpoint:e.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:t,onPageRendered:function(i){return e.handlePageRendered(i)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&n("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&n("div",{class:"loading-indicator"},n("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());y.style=w}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,i,t,n){function o(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?t(e.value):o(e.value).then(a,s)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(i){return l([e,i])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(n=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;o=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){t.label=s[1];break}if(s[0]===6&&t.label<r[1]){t.label=r[1];r=s;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(s);break}if(r[2])t.ops.pop();t.trys.pop();continue}s=i.call(e,t)}catch(e){s=[6,e];o=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-b96a9a0f.system.js","./p-c8a15cb7.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-db854498.system.js"],(function(e){"use strict";var i,t,n,o,r,a,s,l,c,d,f,u,h,p;return{setters:[function(e){i=e.r;t=e.c;n=e.h;o=e.F;r=e.H;a=e.g},function(e){s=e.VerdocsEndpoint;l=e.getEnvelope;c=e.getDocumentDownloadLink;d=e.cancelEnvelope;f=e.userCanCancelEnvelope;u=e.integerSequence},function(e){h=e.s},function(e){p=e.S},function(){},function(){},function(){}],execute:function(){var b='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';var x=b;var v='<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>';var g=e("verdocs_kba_dialog",function(){function e(e){i(this,e);this.exit=t(this,"exit",7);this.next=t(this,"next",7);this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.response=""}e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){if(e.target.className==="background-overlay"){e.preventDefault();this.handleCancel()}};e.prototype.handleDone=function(){this.next.emit(this.response)};e.prototype.render=function(){var e=this;return n(r,{key:"f9a083bccfb6207ec3be7e30e9555df493ceabe4"},n("div",{key:"3bf629c7e6e0fd1e42f11748c8e0137df77271a1",class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},n("div",{key:"9d422b2e5895311095251d9cc538803ec9225a9f",class:"dialog"},n("div",{key:"acc9993b406f7dfef86cd59699afaf2157c59df6",class:"heading"},"Confirm Your Identity",this.steps>1?n("span",{class:"step"},"(",this.step,"/",this.steps,")"):n(o,null)),!!this.helptitle&&n("div",{key:"46eda39009fab8d07eaa48d90b1a6492792ab42a",class:"help-box"},n("div",{key:"29c1540850ccdb8cca5ad84dc8e25de37cac7202",class:"help-icon",innerHTML:v}),n("div",{key:"4d9d5b06f5b6f98c2584e520d1a88103eac108bb",class:"help-details"},n("div",{key:"127cd0963876ca5674f8233685857b5a90d4331f",class:"help-title"},this.helptitle),n("div",{key:"8104f492a91470844fa2cc2cfd3727aa84d74d59",class:"help-text"},this.helptext))),this.mode==="choice"?n("div",{class:"choices"},this.choices.map((function(i){return n("div",{class:"choice ".concat(i===e.response?"selected":""),onClick:function(){return e.response=i}},i)}))):n("div",{class:"input"},n("label",{htmlFor:"verdocs-kba-input"},this.label),n("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:function(i){return e.response=i.target.value}})),n("div",{key:"6f65266320dd0f9ca8ff2a0abe8b0c75cadf2bcb",class:"buttons"},n("verdocs-button",{key:"5baa530487b8264910f9cc3927479271bdef428d",label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),n("verdocs-button",{key:"7a64f46c176edaa9e82872d5ef6226b8bfd3e0f2",label:"Done",onClick:function(){return e.handleDone()},disabled:!this.response})))))};return e}());g.style=x;var m='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var w=m;var y=e("verdocs_view",function(){function e(e){i(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.another=t(this,"another",7);this.view=t(this,"view",7);this.next=t(this,"next",7);this.endpoint=null;this.envelopeId="";this.envelope=null;this.headerTargetId=null;this.canceling=false;this.roleNames=[];this.showCancelDone=false;this.showLoadError=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,o;return __generator(this,(function(r){switch(r.label){case 0:if(!this.endpoint){this.endpoint=s.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}if(!!this.envelope)return[3,4];r.label=1;case 1:r.trys.push([1,3,,4]);console.log("[VIEW] Loading envelope...");n=this;return[4,l(this.endpoint,this.envelopeId)];case 2:n.envelope=r.sent();console.log("[VIEW] Loaded envelope",this.envelope);this.roleNames=this.envelope.recipients.map((function(e){return e.role_name}));return[3,4];case 3:o=r.sent();this.showLoadError=true;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(o.message,(i=o.response)===null||i===void 0?void 0:i.status,(t=o.response)===null||t===void 0?void 0:t.data));return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var i=document.getElementById("verdocs-view-header");if(e&&i){console.log("[VIEW] Moving header");i.remove();e.append(i)}};e.prototype.handlePageRendered=function(e){var i=e.detail;console.log("[VIEW] Page rendered",i)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t,n,o,r,a,r;var s=this;return __generator(this,(function(f){switch(f.label){case 0:n=e.detail.id;switch(n){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,6];case"download-all":return[3,9]}return[3,10];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;d(this.endpoint,this.envelopeId).then((function(e){s.canceling=false;console.log("[VIEW] Envelope canceled",e);return l(s.endpoint,s.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);s.envelope=e})).catch((function(e){var i,t,n;s.canceling=false;console.log("[VIEW] Error canceling envelope",e);(i=s.sdkError)===null||i===void 0?void 0:i.emit(new p(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(n=e.response)===null||n===void 0?void 0:n.data))}));this.showCancelDone=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,10];case 2:window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,10];case 3:o=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(!o)return[3,5];return[4,c(this.endpoint,this.envelopeId,o.id)];case 4:r=f.sent();window.open(r,"_blank");f.label=5;case 5:return[3,10];case 6:a=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!a)return[3,8];return[4,c(this.endpoint,this.envelopeId,a.id)];case 7:r=f.sent();window.open(r,"_blank");f.label=8;case 8:return[3,10];case 9:h(this.endpoint,[this.envelope]).then((function(){var e;(e=s.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:s.endpoint,envelope:s.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,10];case 10:return[2]}}))}))};e.prototype.render=function(){var e=this;var i;if(this.showLoadError){return n(r,null,n("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:"Sorry, that envelope is not valid.",buttonLabel:"OK",onNext:function(){e.showLoadError=false}}))}if(!this.envelope){return n(r,null,n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var t=[{id:"print",label:"Print"}];if(f(this.endpoint.profile,this.envelope)){t.push({id:"cancel",label:"Cancel"})}var a=this.envelope.documents.length>0;var s=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var l=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(a||l){t.push({label:""});if(a){t.push({id:"download-attachments",label:s>1?"Download Documents":"Download Document"})}if(l){t.push({id:"download-certificate",label:"Download Certificate"})}if(a&&l){t.push({id:"download-all",label:"Download All Files"})}}return n(r,null,n("div",{id:"verdocs-view-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name),n("div",{style:{flex:"1"}}),n("div",{style:{marginLeft:"10px"}}),n("verdocs-dropdown",{options:t,onOptionSelected:function(i){return e.handleOptionSelected(i)}}))),n("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((i=this.envelope)===null||i===void 0?void 0:i.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(i){var t=u(1,i.pages);return n(o,null,t.map((function(t){return n("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:i.id,endpoint:e.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:t,onPageRendered:function(i){return e.handlePageRendered(i)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&n("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&n("div",{class:"loading-indicator"},n("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());y.style=w}}}));
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))e[s]=n[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function s(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{l(t.next(e))}catch(e){a(e)}}function r(e){try{l(t["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,r)}l((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(n){return l([e,n])}}function l(r){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,r[0]&&(i=0)),i)try{if(t=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;s=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(r[0]===6&&i.label<a[1]){i.label=a[1];a=r;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(r);break}if(a[2])i.ops.pop();i.trys.pop();continue}r=n.call(e,i)}catch(e){r=[6,e];s=0}finally{t=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,i){if(i||arguments.length===2)for(var t=0,s=n.length,a;t<s;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-7933fc15.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-db854498.system.js"],(function(e){"use strict";var n,i,t,s,a,o,r,l,c,d,p,f,u,v,h;return{setters:[function(e){n=e.r;i=e.c;t=e.h;s=e.H},function(e){a=e.VerdocsEndpoint;o=e.getEnvelopes;r=e.integerSequence;l=e.getRecipientsWithActions;c=e.userCanCancelEnvelope;d=e.userCanAct;p=e.formatFullName;f=e.cancelEnvelope},function(e){u=e.s},function(e){v=e.V},function(e){h=e.S},function(){},function(){},function(){}],execute:function(){var x='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}';var b=x;var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var m=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var w=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var y=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var _=e("verdocs_envelopes_list",function(){function e(e){n(this,e);this.changeView=i(this,"changeView",7);this.changeStatus=i(this,"changeStatus",7);this.changeSort=i(this,"changeSort",7);this.changeMatch=i(this,"changeMatch",7);this.sdkError=i(this,"sdkError",7);this.viewEnvelope=i(this,"viewEnvelope",7);this.finishEnvelope=i(this,"finishEnvelope",7);this.endpoint=a.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.onSessionChanged((function(e,n,i){console.log("[ENVELOPES_LIST] onSessionChanged",n,i)}));this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,s,a;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.loading=true;t={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":t=__assign({},t);break;case"sent":t=__assign({},t);break;case"action":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"waiting":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"completed":t=__assign(__assign({},t),{status:["complete"]});break;default:t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){t.status=[this.status]}}if(this.match.trim());return[4,o(this.endpoint,t)];case 1:s=r.sent();this.envelopes=s.envelopes;this.count=s.count;this.loading=false;return[3,3];case 2:a=r.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;u(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){u(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return t(s,{key:"afc4e894ffe975884de4740ab191141f45ae8dd3"},t("div",{key:"a31c5d67b40c79977ef398ade34906083386a6df",class:"header"},t("div",{key:"4c9e4e53ad08e7ac14d6567da0bc9d8e076f3550",class:"filter"},t("verdocs-text-input",{key:"ea20a5b962b13f678a333c246cde83ce6d8ee9d7",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(n){var i;e.match=n.target.value.trim();(i=e.changeMatch)===null||i===void 0?void 0:i.emit(e.match)}})),t("verdocs-quick-filter",{key:"32a191d2d8e67c2d6633e4ae43ed16d82bc9fa8d",label:"View",value:this.view,options:m,onOptionSelected:function(n){e.view=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"41ff33e406d7c7b40512e1ce3bbfbcc883b4871a",label:"Status",value:this.status,options:w,onOptionSelected:function(n){e.status=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"28ca07defeb30f227345dd691a1672200c071c9f",label:"Sort By",value:this.sort,options:y,onOptionSelected:function(n){e.sort=n.detail.value}}),this.loading&&t("verdocs-spinner",{key:"8cac7f3bd1c013d04a355e38ff8d299f33de8d71",mode:"dark",size:24}),t("div",{key:"f3e30dd1d638900f27b618c467b2e954de3da4a6",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&t("verdocs-button",{key:"afa9d35d7c33ea1d6a6dcb44572d83f9195ffaed",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(n){var i;var s=l(n);var a=c(e.endpoint.profile,n);var o=s.find((function(n){var i;return n.email===((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||""}));var r=o&&a&&d(((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||"",s);var u=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!r},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!a}];return t("div",{class:"envelope",key:n.id,onClick:function(){var i;return(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:n})}},t("div",{class:"inner"},t("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===n.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(i){if(i.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[n],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==n.id}))}}}),t("div",{class:"vert-spacer"}),t("span",{innerHTML:g,class:"envelope-icon"}),t("div",{class:"envelope-name"},n.name,":  ",t("div",{class:"envelope-recipients"},n.recipients.map((function(e){return p(e)})))),t("div",{class:"vert-spacer"}),t("verdocs-status-indicator",{envelope:n,style:{width:"125px"}}),t("div",{class:"vert-spacer"}),t("div",{class:"last-modified"},new Date(n.updated_at).toLocaleString()),t("div",{class:"vert-spacer"}),t("verdocs-dropdown",{options:u,onOptionSelected:function(i){var t,s;switch(i.detail.id){case"view":(t=e.viewEnvelope)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:n});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:n});break;case"download":e.downloadEnvelope(n);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){f(e.endpoint,n.id).then((function(){return v("Envelope canceled")})).catch((function(e){return v("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&t("div",{key:"c9208b59bfe96f706bfb30e5ced6e9024e2d93a4",style:{width:"100%"}},r(0,this.rowsPerPage).map((function(){return t("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&t("div",{key:"169424956740f02d92be417c370cbce2621a233c",class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?t("div",{style:{marginTop:"20px"}},t("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(n){e.selectedPage=n.detail.selectedPage}})):t("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:["handleViewUpdated"],status:["handleStatusUpdated"],sort:["handleSortUpdated"],match:["handleMatchUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());_.style=b}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))e[s]=n[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function s(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{l(t.next(e))}catch(e){a(e)}}function r(e){try{l(t["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,r)}l((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(n){return l([e,n])}}function l(r){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,r[0]&&(i=0)),i)try{if(t=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;s=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(r[0]===6&&i.label<a[1]){i.label=a[1];a=r;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(r);break}if(a[2])i.ops.pop();i.trys.pop();continue}r=n.call(e,i)}catch(e){r=[6,e];s=0}finally{t=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,i){if(i||arguments.length===2)for(var t=0,s=n.length,a;t<s;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-b96a9a0f.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-db854498.system.js"],(function(e){"use strict";var n,i,t,s,a,o,r,l,c,d,p,f,u,v,h;return{setters:[function(e){n=e.r;i=e.c;t=e.h;s=e.H},function(e){a=e.VerdocsEndpoint;o=e.getEnvelopes;r=e.integerSequence;l=e.getRecipientsWithActions;c=e.userCanCancelEnvelope;d=e.userCanAct;p=e.formatFullName;f=e.cancelEnvelope},function(e){u=e.s},function(e){v=e.V},function(e){h=e.S},function(){},function(){},function(){}],execute:function(){var b='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}';var x=b;var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var m=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var w=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var y=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var _=e("verdocs_envelopes_list",function(){function e(e){n(this,e);this.changeView=i(this,"changeView",7);this.changeStatus=i(this,"changeStatus",7);this.changeSort=i(this,"changeSort",7);this.changeMatch=i(this,"changeMatch",7);this.sdkError=i(this,"sdkError",7);this.viewEnvelope=i(this,"viewEnvelope",7);this.finishEnvelope=i(this,"finishEnvelope",7);this.endpoint=a.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.onSessionChanged((function(e,n,i){console.log("[ENVELOPES_LIST] onSessionChanged",n,i)}));this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,s,a;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.loading=true;t={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":t=__assign({},t);break;case"sent":t=__assign({},t);break;case"action":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"waiting":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"completed":t=__assign(__assign({},t),{status:["complete"]});break;default:t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){t.status=[this.status]}}if(this.match.trim());return[4,o(this.endpoint,t)];case 1:s=r.sent();this.envelopes=s.envelopes;this.count=s.count;this.loading=false;return[3,3];case 2:a=r.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;u(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){u(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return t(s,{key:"afc4e894ffe975884de4740ab191141f45ae8dd3"},t("div",{key:"a31c5d67b40c79977ef398ade34906083386a6df",class:"header"},t("div",{key:"4c9e4e53ad08e7ac14d6567da0bc9d8e076f3550",class:"filter"},t("verdocs-text-input",{key:"ea20a5b962b13f678a333c246cde83ce6d8ee9d7",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(n){var i;e.match=n.target.value.trim();(i=e.changeMatch)===null||i===void 0?void 0:i.emit(e.match)}})),t("verdocs-quick-filter",{key:"32a191d2d8e67c2d6633e4ae43ed16d82bc9fa8d",label:"View",value:this.view,options:m,onOptionSelected:function(n){e.view=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"41ff33e406d7c7b40512e1ce3bbfbcc883b4871a",label:"Status",value:this.status,options:w,onOptionSelected:function(n){e.status=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"28ca07defeb30f227345dd691a1672200c071c9f",label:"Sort By",value:this.sort,options:y,onOptionSelected:function(n){e.sort=n.detail.value}}),this.loading&&t("verdocs-spinner",{key:"8cac7f3bd1c013d04a355e38ff8d299f33de8d71",mode:"dark",size:24}),t("div",{key:"f3e30dd1d638900f27b618c467b2e954de3da4a6",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&t("verdocs-button",{key:"afa9d35d7c33ea1d6a6dcb44572d83f9195ffaed",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(n){var i;var s=l(n);var a=c(e.endpoint.profile,n);var o=s.find((function(n){var i;return n.email===((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||""}));var r=o&&a&&d(((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||"",s);var u=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!r},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!a}];return t("div",{class:"envelope",key:n.id,onClick:function(){var i;return(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:n})}},t("div",{class:"inner"},t("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===n.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(i){if(i.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[n],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==n.id}))}}}),t("div",{class:"vert-spacer"}),t("span",{innerHTML:g,class:"envelope-icon"}),t("div",{class:"envelope-name"},n.name,":  ",t("div",{class:"envelope-recipients"},n.recipients.map((function(e){return p(e)})))),t("div",{class:"vert-spacer"}),t("verdocs-status-indicator",{envelope:n,style:{width:"125px"}}),t("div",{class:"vert-spacer"}),t("div",{class:"last-modified"},new Date(n.updated_at).toLocaleString()),t("div",{class:"vert-spacer"}),t("verdocs-dropdown",{options:u,onOptionSelected:function(i){var t,s;switch(i.detail.id){case"view":(t=e.viewEnvelope)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:n});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:n});break;case"download":e.downloadEnvelope(n);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){f(e.endpoint,n.id).then((function(){return v("Envelope canceled")})).catch((function(e){return v("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&t("div",{key:"c9208b59bfe96f706bfb30e5ced6e9024e2d93a4",style:{width:"100%"}},r(0,this.rowsPerPage).map((function(){return t("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&t("div",{key:"169424956740f02d92be417c370cbce2621a233c",class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?t("div",{style:{marginTop:"20px"}},t("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(n){e.selectedPage=n.detail.selectedPage}})):t("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:["handleViewUpdated"],status:["handleStatusUpdated"],sort:["handleSortUpdated"],match:["handleMatchUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());_.style=x}}}));
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,r=1,t=arguments.length;r<t;r++){i=arguments[r];for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))e[s]=i[s]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,i,r){if(r||arguments.length===2)for(var t=0,s=i.length,o;t<s;t++){if(o||!(t in i)){if(!o)o=Array.prototype.slice.call(i,0,t);o[t]=i[t]}}return e.concat(o||Array.prototype.slice.call(i))};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-7933fc15.system.js","./p-e0ac9edf.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-db854498.system.js"],(function(e){"use strict";var i,r,t,s,o,n,a,c;return{setters:[function(e){i=e.r;r=e.c;t=e.h;s=e.H;o=e.g},function(e){n=e.integerSequence},function(e){a=e.h},function(e){c=e.c},function(){},function(){},function(){}],execute:function(){var l='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';var d=l;var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>';var u='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>';var b=5;var p=function(e){var i=e.page,r=e.selected,s=e.onClick;var o;if(i==="first"){o=f}else if(i==="last"){o=u}else{o=String(i+1)}return t("div",{class:"page-button ".concat(i===r?"selected":""),onClick:function(){return s(i)},innerHTML:o})};var h=e("verdocs_pagination",function(){function e(e){i(this,e);this.selectPage=r(this,"selectPage",7);this.selectedPage=0;this.itemCount=1;this.perPage=10}e.prototype.handleSelectPage=function(e){var i;this.selectedPage=e;(i=this.selectPage)===null||i===void 0?void 0:i.emit({selectedPage:e})};e.prototype.render=function(){var e=this;var i=Math.max(0,this.selectedPage-2);var r=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0;var o=n(0,Math.ceil(this.itemCount/this.perPage)).slice(i,i+b);return t(s,{key:"e8281a2f8d40512479595b6f10355d65d4ece855"},this.selectedPage>0&&t(p,{key:"0ced00072d3046ef74ecc2f9c80e1deddaa6182d",page:"first",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(0)}}),i>0&&t("div",{key:"e6eeb99d7c42081bc0b1e010fa6c015c6ea58b3e",class:"ellipsis"},"..."),o.map((function(i){return t(p,{page:i,selected:e.selectedPage,onClick:function(i){return e.handleSelectPage(+i)}})})),this.selectedPage<r-1&&t("div",{key:"0ce4734579ec250c1d9d7a6f8171a94f8a1c2088",class:"ellipsis"},"..."),this.selectedPage<r-1&&t(p,{key:"542ad8c6646d22fa1f5e399918202b173323fa6d",page:"last",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(r-1)}}))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());h.style=d;var v='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:rgba(76, 86, 203, 0.2470588235)}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';var g=v;var x='<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>';var k=e("verdocs_quick_filter",function(){function e(e){i(this,e);this.optionSelected=r(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.label="Filter";this.value="";this.placeholder="Select...";this.open=undefined}e.prototype.componentDidLoad=function(){this.popper=c(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};e.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};e.prototype.clickListener=function(e){var i=!(e.target==this.el||this.el.contains(e.target));if(i){this.hide()}};e.prototype.handleSelectOption=function(e,i){e.stopPropagation();this.optionSelected.emit(i);this.value=i.value;this.hide()};e.prototype.showDropdown=function(){var e,i;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(i=this.popper)===null||i===void 0?void 0:i.update().catch((function(){}))};e.prototype.handleHideDropdown=function(e){var i,r;if(((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.localName)==="button"&&((r=e===null||e===void 0?void 0:e.target)===null||r===void 0?void 0:r.className)==="arrow"){return}this.hide()};e.prototype.toggleDropdown=function(e){e.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};e.prototype.hide=function(){var e;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};e.prototype.render=function(){var e=this;var i,r,o;var n=(i=this.options)===null||i===void 0?void 0:i.find((function(i){return i.value===e.value}));var c=(r=this.options)===null||r===void 0?void 0:r.reduce((function(e,i){return e.label.length>i.label.length?e:i}));var l=a((c===null||c===void 0?void 0:c.label)||"FILLER","14px Inter, Barlow, sans-serif");var d=a(this.label,"14px Inter, Barlow, sans-serif");var f="".concat(l+d+40,"px");return t(s,{key:"003157b49ca0a97cf1d7741862b343f7032bf37e",class:{open:!!this.open},style:{minWidth:f,display:"inline-block"}},t("div",{key:"e3a45fb1a5e8962c732159f145b398e7fb1f0c7d",class:"control",onClick:function(i){return e.toggleDropdown(i)},onBlur:function(i){return e.handleHideDropdown(i)}},t("div",{key:"79b1d5d2b9dc52d4e364a3e8c56a175280d493d5",class:"title",ref:function(i){return e.dropdownButton=i}},t("span",{key:"760645cc99eb63f9b90afa75b8cb787ec80ace05",class:"prefix"},this.label,":"),n?n.label:this.placeholder),t("div",{key:"dec25f104674e82f91781e53edcedb6112741f86",style:{flex:"1"}}),t("div",{key:"47f17166fad9fd3f6eba46b8589cfb935cd20222",class:"separator"}),t("div",{key:"d6deb3811ad209885a7f973ace22fbeb7784cd0f",class:"arrow",innerHTML:x,"aria-label":"Open Menu"})),t("div",{key:"be8116461c9edcc6f9ee25ff1941eda3c9f2387d",class:"items","aria-hidden":!this.open,ref:function(i){return e.dropdownMenu=i},style:{minWidth:f}},(o=this.options)===null||o===void 0?void 0:o.map((function(i){return i.label?t("button",{onClick:function(r){return e.handleSelectOption(r,i)},class:"option ".concat(i.value===e.value?"selected":""),disabled:i.disabled},i.label):t("div",{class:"separator"})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());k.style=g}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,r=1,t=arguments.length;r<t;r++){i=arguments[r];for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))e[s]=i[s]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,i,r){if(r||arguments.length===2)for(var t=0,s=i.length,o;t<s;t++){if(o||!(t in i)){if(!o)o=Array.prototype.slice.call(i,0,t);o[t]=i[t]}}return e.concat(o||Array.prototype.slice.call(i))};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-b96a9a0f.system.js","./p-e0ac9edf.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-db854498.system.js"],(function(e){"use strict";var i,r,t,s,o,n,a,c;return{setters:[function(e){i=e.r;r=e.c;t=e.h;s=e.H;o=e.g},function(e){n=e.integerSequence},function(e){a=e.h},function(e){c=e.c},function(){},function(){},function(){}],execute:function(){var l='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';var d=l;var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>';var u='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>';var b=5;var p=function(e){var i=e.page,r=e.selected,s=e.onClick;var o;if(i==="first"){o=f}else if(i==="last"){o=u}else{o=String(i+1)}return t("div",{class:"page-button ".concat(i===r?"selected":""),onClick:function(){return s(i)},innerHTML:o})};var h=e("verdocs_pagination",function(){function e(e){i(this,e);this.selectPage=r(this,"selectPage",7);this.selectedPage=0;this.itemCount=1;this.perPage=10}e.prototype.handleSelectPage=function(e){var i;this.selectedPage=e;(i=this.selectPage)===null||i===void 0?void 0:i.emit({selectedPage:e})};e.prototype.render=function(){var e=this;var i=Math.max(0,this.selectedPage-2);var r=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0;var o=n(0,Math.ceil(this.itemCount/this.perPage)).slice(i,i+b);return t(s,{key:"e8281a2f8d40512479595b6f10355d65d4ece855"},this.selectedPage>0&&t(p,{key:"0ced00072d3046ef74ecc2f9c80e1deddaa6182d",page:"first",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(0)}}),i>0&&t("div",{key:"e6eeb99d7c42081bc0b1e010fa6c015c6ea58b3e",class:"ellipsis"},"..."),o.map((function(i){return t(p,{page:i,selected:e.selectedPage,onClick:function(i){return e.handleSelectPage(+i)}})})),this.selectedPage<r-1&&t("div",{key:"0ce4734579ec250c1d9d7a6f8171a94f8a1c2088",class:"ellipsis"},"..."),this.selectedPage<r-1&&t(p,{key:"542ad8c6646d22fa1f5e399918202b173323fa6d",page:"last",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(r-1)}}))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());h.style=d;var v='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:rgba(76, 86, 203, 0.2470588235)}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';var g=v;var x='<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>';var k=e("verdocs_quick_filter",function(){function e(e){i(this,e);this.optionSelected=r(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.label="Filter";this.value="";this.placeholder="Select...";this.open=undefined}e.prototype.componentDidLoad=function(){this.popper=c(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};e.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};e.prototype.clickListener=function(e){var i=!(e.target==this.el||this.el.contains(e.target));if(i){this.hide()}};e.prototype.handleSelectOption=function(e,i){e.stopPropagation();this.optionSelected.emit(i);this.value=i.value;this.hide()};e.prototype.showDropdown=function(){var e,i;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(i=this.popper)===null||i===void 0?void 0:i.update().catch((function(){}))};e.prototype.handleHideDropdown=function(e){var i,r;if(((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.localName)==="button"&&((r=e===null||e===void 0?void 0:e.target)===null||r===void 0?void 0:r.className)==="arrow"){return}this.hide()};e.prototype.toggleDropdown=function(e){e.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};e.prototype.hide=function(){var e;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};e.prototype.render=function(){var e=this;var i,r,o;var n=(i=this.options)===null||i===void 0?void 0:i.find((function(i){return i.value===e.value}));var c=(r=this.options)===null||r===void 0?void 0:r.reduce((function(e,i){return e.label.length>i.label.length?e:i}));var l=a((c===null||c===void 0?void 0:c.label)||"FILLER","14px Inter, Barlow, sans-serif");var d=a(this.label,"14px Inter, Barlow, sans-serif");var f="".concat(l+d+40,"px");return t(s,{key:"003157b49ca0a97cf1d7741862b343f7032bf37e",class:{open:!!this.open},style:{minWidth:f,display:"inline-block"}},t("div",{key:"e3a45fb1a5e8962c732159f145b398e7fb1f0c7d",class:"control",onClick:function(i){return e.toggleDropdown(i)},onBlur:function(i){return e.handleHideDropdown(i)}},t("div",{key:"79b1d5d2b9dc52d4e364a3e8c56a175280d493d5",class:"title",ref:function(i){return e.dropdownButton=i}},t("span",{key:"760645cc99eb63f9b90afa75b8cb787ec80ace05",class:"prefix"},this.label,":"),n?n.label:this.placeholder),t("div",{key:"dec25f104674e82f91781e53edcedb6112741f86",style:{flex:"1"}}),t("div",{key:"47f17166fad9fd3f6eba46b8589cfb935cd20222",class:"separator"}),t("div",{key:"d6deb3811ad209885a7f973ace22fbeb7784cd0f",class:"arrow",innerHTML:x,"aria-label":"Open Menu"})),t("div",{key:"be8116461c9edcc6f9ee25ff1941eda3c9f2387d",class:"items","aria-hidden":!this.open,ref:function(i){return e.dropdownMenu=i},style:{minWidth:f}},(o=this.options)===null||o===void 0?void 0:o.map((function(i){return i.label?t("button",{onClick:function(r){return e.handleSelectOption(r,i)},class:"option ".concat(i.value===e.value?"selected":""),disabled:i.disabled},i.label):t("div",{class:"separator"})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());k.style=g}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,s){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function o(e){try{l(s.next(e))}catch(e){n(e)}}function a(e){try{l(s["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},s,r,n,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(s)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(s=1,r&&(n=a[0]&2?r["return"]:a[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;if(r=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(a[0]===6&&i.label<n[1]){i.label=n[1];n=a;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(a);break}if(n[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{s=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js"],(function(e){"use strict";var t,i,s,r,n,o,a,l,u,c,d,h;return{setters:[function(e){t=e.r;i=e.c;s=e.h},function(e){r=e.VerdocsEndpoint;n=e.createProfile;o=e.verifyEmail;a=e.authenticate;l=e.getMyUser;u=e.resendVerification;c=e.resetPassword},function(e){d=e.V},function(e){h=e.S}],execute:function(){var f='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{width:320px;display:-ms-flexbox;display:flex;padding:20px;max-width:90%;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;background:#ffffff}verdocs-auth .logo{width:128px;max-width:100%;margin:20px 0 30px}verdocs-auth h3{text-align:center;font-weight:400;font-size:18px;line-height:1.75;margin:0}verdocs-auth em{font-size:14px;margin:15px 0}verdocs-auth .buttons{gap:20px;margin:20px 0 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p{margin:1em 0;font-size:14px}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}verdocs-auth .already-have{margin:0.5em 0;font-size:14px}';var p=f;var v=e("verdocs_auth",function(){function e(e){t(this,e);this.authenticated=i(this,"authenticated",7);this.sdkError=i(this,"sdkError",7);this.resendDisabledTimer=null;this.tempAuthEndpoint=new r({baseURL:r.getDefault().getBaseURL(),persist:false});this.endpoint=r.getDefault();this.visible=true;this.logo="https://app.verdocs.com/assets/blue-logo.svg";this.displayMode="login";this.org_name="";this.first_name="";this.last_name="";this.email="";this.verificationCode="";this.newPassword="";this.password="";this.confirmpass="";this.submitting=false;this.resendDisabled=false;this.session=null;this.profile=null}e.prototype.componentWillLoad=function(){var e=this;this.endpoint.loadSession();r.getDefault().onSessionChanged((function(t,i,s){var r,n;e.session=i;e.profile=s;if(i){(r=e.authenticated)===null||r===void 0?void 0:r.emit({authenticated:true,session:i,profile:s})}else{(n=e.authenticated)===null||n===void 0?void 0:n.emit({authenticated:false,session:i,profile:s})}}))};e.prototype.isPasswordComplex=function(e){var t=function(e){return/[A-Z]/.test(e)};var i=function(e){return/[a-z]/.test(e)};var s=function(e){return/[`!@#$%^&*()_\-+=\[\]{};':"\\|,.<>\/?~ ]/.test(e)};var r=0,n=0,o=0;for(var a=0;a<e.length;a++){var l=e.charAt(a);if(t(l))r++;else if(i(l))n++;else if(s(l))o++}return e.length>=8&&n>0&&r>0&&o>0};e.prototype.handleSignup=function(){var e=this;if(!this.isPasswordComplex(this.password)){d("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"});return}if(this.password!==this.confirmpass){d("Passwords do not match.",{style:"error"});return}this.submitting=true;this.tempAuthEndpoint.clearSession();n(this.tempAuthEndpoint,{email:this.email,password:this.password,first_name:this.first_name,last_name:this.last_name,org_name:this.org_name}).then((function(t){console.log("[AUTH] Profile creation result",t);e.tempAuthEndpoint.setToken(t.access_token);e.password="";e.first_name="";e.last_name="";e.org_name="";e.displayMode="verify";e.submitting=false})).catch((function(t){var i,s,r,n,o,a;console.log("[AUTH] Signup error",t.response);e.submitting=false;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:false,profile:null,session:null});(s=e.sdkError)===null||s===void 0?void 0:s.emit(new h(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(n=t.response)===null||n===void 0?void 0:n.data));d("Signup failed: "+((a=(o=t.response)===null||o===void 0?void 0:o.data)===null||a===void 0?void 0:a.error)||"Unknown Error",{style:"error"})}))};e.prototype.handleVerification=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:this.submitting=true;i.label=1;case 1:i.trys.push([1,3,,4]);this.submitting=false;return[4,o(this.tempAuthEndpoint,{email:this.email,token:this.verificationCode})];case 2:e=i.sent();d("Thank you for verifying your email address.",{style:"success"});this.completeLogin(e);return[3,4];case 3:t=i.sent();this.submitting=false;console.log("Verification error",t);d("Verification error, please check the code and try again.");return[3,4];case 4:return[2]}}))}))};e.prototype.completeLogin=function(e){this.clearForms();this.tempAuthEndpoint.clearSession();this.endpoint.setToken(e.access_token)};e.prototype.loginAndCheckVerification=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,s;return __generator(this,(function(r){switch(r.label){case 0:if(this.submitting){return[2]}this.submitting=true;this.tempAuthEndpoint.clearSession();r.label=1;case 1:r.trys.push([1,4,,5]);this.submitting=false;return[4,a(this.tempAuthEndpoint,{username:this.email,password:this.password,grant_type:"password"})];case 2:t=r.sent();console.log("[AUTH] Authenticated, checking email verification");this.tempAuthEndpoint.setToken(t.access_token);return[4,l(this.tempAuthEndpoint)];case 3:i=r.sent();console.log("Got user",i);if(!i.email_verified){console.log("[AUTH] Logged in, pending email address verification");this.displayMode="verify"}else{console.log("[AUTH] Email address is verified, completing login");this.completeLogin(t)}return[3,5];case 4:s=r.sent();this.submitting=false;console.log("[AUTH] Auth failure",((e=s.response)===null||e===void 0?void 0:e.data)||s);d("Login failed. Please check your credentials and try again.",{style:"error"});return[3,5];case 5:return[2]}}))}))};e.prototype.clearForms=function(){this.submitting=false;this.resendDisabled=false;this.email="";this.password="";this.newPassword="";this.confirmpass="";this.verificationCode="";this.first_name="";this.last_name="";this.org_name=""};e.prototype.handleLogout=function(){console.log("logging out");this.endpoint.clearSession();this.tempAuthEndpoint.clearSession();this.clearForms();this.displayMode="login"};e.prototype.handleResendVerification=function(){var e=this;this.resendDisabled=true;this.resendDisabledTimer=setTimeout((function(){e.resendDisabled=false;e.resendDisabledTimer=null}),3e4);u(this.tempAuthEndpoint).then((function(e){console.log("[AUTH] Verification request resent",e);d("Please check your email for a verification code.",{style:"info"})})).catch((function(e){console.log("[AUTH] Unable to resend verification",e);d("Unable to resend code. Please try again later.",{style:"error"})}))};e.prototype.handleResendReset=function(){var e=this;this.resendDisabled=true;this.resendDisabledTimer=setTimeout((function(){e.resendDisabled=false;e.resendDisabledTimer=null}),3e4);c(this.tempAuthEndpoint,{email:this.email}).then((function(e){console.log("[AUTH] Resend-code request resent",e);d("Please check your email again for a verification code.",{style:"info"})})).catch((function(e){console.log("[AUTH] Unable to resend reset request",e);d("Unable to resend code. Please try again later.",{style:"error"})}))};e.prototype.handleResetGetCode=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:this.submitting=true;this.confirmpass="";this.newPassword="";i.label=1;case 1:i.trys.push([1,3,,4]);this.submitting=false;return[4,c(this.endpoint,{email:this.email})];case 2:e=i.sent();console.log("[AUTH] Reset result",e);d("Please check your email inbox for a password reset code.",{style:"success"});this.verificationCode="";this.confirmpass="";this.newPassword="";this.displayMode="reset";return[3,4];case 3:t=i.sent();this.submitting=false;console.log("Reset request error",t);d("Request failed. Please check your email address and try again.");return[3,4];case 4:return[2]}}))}))};e.prototype.handleResetPassword=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:if(!this.isPasswordComplex(this.newPassword)){d("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"});return[2]}if(this.newPassword!==this.confirmpass){d("Passwords do not match.",{style:"error"});return[2]}this.submitting=true;i.label=1;case 1:i.trys.push([1,3,,4]);this.submitting=false;return[4,c(this.endpoint,{email:this.email,code:this.verificationCode,new_password:this.newPassword})];case 2:e=i.sent();console.log("reset result",e);d("Your password has been reset. You may now use your new password to login.",{style:"success"});this.verificationCode="";this.confirmpass="";this.newPassword="";this.password="";this.displayMode="login";return[3,4];case 3:t=i.sent();this.submitting=false;console.log("Verification error",t);d("Verification error, please check the code and try again.");return[3,4];case 4:return[2]}}))}))};e.prototype.handleReset=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:this.submitting=true;i.label=1;case 1:i.trys.push([1,3,,4]);return[4,c(this.endpoint,{email:this.email})];case 2:e=i.sent();console.log("[AUTH] Reset sent",e);this.submitting=false;this.displayMode="login";d("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"});return[3,4];case 3:t=i.sent();console.log("[AUTH] Unable to reset password",t);this.submitting=false;d("Unable to reset password. Please check your email address and try again.",{style:"error"});return[3,4];case 4:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.visible){return s("div",{style:{display:"none"}},"Authenticated")}if(this.session){return s("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:function(){return e.handleLogout()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})}if(this.displayMode==="signup"){var t=this.submitting||!this.first_name||!this.last_name||!this.email||!this.password||!this.confirmpass||!this.org_name;return s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Sign up for a free account"),s("div",{class:"already-have"},"Already have an account?",s("verdocs-button",{label:"Log In",variant:"text",onClick:function(){return e.displayMode="login"},disabled:this.submitting})),s("form",{onSubmit:function(){return e.handleSignup()}},s("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},s("verdocs-text-input",{label:"First Name",autocomplete:"first",required:true,value:this.first_name,onInput:function(t){return e.first_name=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:true,value:this.last_name,onInput:function(t){return e.last_name=t.target.value},disabled:this.submitting})),s("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:true,value:this.email,onInput:function(t){return e.email=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"new-password",value:this.password,onInput:function(t){return e.password=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Confirm Password",type:"password",required:true,autocomplete:"off",value:this.confirmpass,onInput:function(t){return e.confirmpass=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:true,value:this.org_name,onInput:function(t){return e.org_name=t.target.value},disabled:this.submitting,style:{flex:"1"}}),s("div",{style:{marginTop:"30px"}}),s("verdocs-button",{label:"Next",disabled:t,onClick:t?function(){}:function(){return e.handleSignup()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}if(this.displayMode==="verify"){return s("div",{class:"form"},s("form",{onSubmit:function(){return e.handleVerification()}},s("p",null,"Please check your e-mail inbox for a verification code and enter it below."),s("verdocs-text-input",{label:"Verification Code",required:true,value:this.verificationCode,onInput:function(t){return e.verificationCode=t.target.value},disabled:this.submitting}),s("div",{class:"buttons"},s("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:function(){return e.handleLogout()}}),s("verdocs-button",{label:"Verify",disabled:this.submitting||!this.verificationCode||this.verificationCode.length!==6,onClick:function(){return e.handleVerification()}})),s("div",{class:"buttons"},s("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:function(){return e.handleResendVerification()}}))))}if(this.displayMode==="forgot"){return s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Forgot your password?"),s("p",null,"Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."),s("form",{onSubmit:function(){return e.handleResetGetCode()}},s("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:true,value:this.email,onInput:function(t){return e.email=t.target.value},disabled:this.submitting}),s("div",{style:{marginTop:"30px"}}),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:function(){return e.displayMode="login"}}),s("verdocs-button",{label:"Request Code",disabled:this.submitting,onClick:function(){return e.handleResetGetCode()}}))))}if(this.displayMode==="reset"){return s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Forgot your password?"),s("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."),s("form",{onSubmit:function(){return e.handleResetPassword()}},s("verdocs-text-input",{label:"Verification Code",required:true,value:this.verificationCode,onInput:function(t){return e.verificationCode=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"off",value:this.newPassword,onInput:function(t){return e.newPassword=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Confirm Password",type:"password",required:true,autocomplete:"off",value:this.confirmpass,onInput:function(t){return e.confirmpass=t.target.value},disabled:this.submitting}),s("div",{style:{marginTop:"30px"}}),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:function(){return e.displayMode="login"}}),s("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:function(){return e.handleResetPassword()}})),s("div",{class:"buttons"},s("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:function(){return e.handleResendReset()}}))))}return s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Log in to your account"),s("div",{class:"already-have"},"Don't have an account?",s("verdocs-button",{label:"Sign Up",variant:"text",onClick:function(){return e.displayMode="signup"},disabled:this.submitting})),s("form",{onSubmit:function(){return e.loginAndCheckVerification()}},s("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.email,onInput:function(t){return e.email=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(t){return e.password=t.target.value},disabled:this.submitting}),s("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:function(){return e.displayMode="forgot"},disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),s("verdocs-button",{label:"Login",disabled:this.submitting,onClick:function(){return e.loginAndCheckVerification()},style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))};return e}());v.style=p}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,s){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function o(e){try{l(s.next(e))}catch(e){n(e)}}function a(e){try{l(s["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):r(e.value).then(o,a)}l((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},s,r,n,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(s)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(s=1,r&&(n=a[0]&2?r["return"]:a[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;if(r=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(a[0]===6&&i.label<n[1]){i.label=n[1];n=a;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(a);break}if(n[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{s=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js"],(function(e){"use strict";var t,i,s,r,n,o,a,l,u,c,d,h;return{setters:[function(e){t=e.r;i=e.c;s=e.h},function(e){r=e.VerdocsEndpoint;n=e.createProfile;o=e.verifyEmail;a=e.authenticate;l=e.getMyUser;u=e.resendVerification;c=e.resetPassword},function(e){d=e.V},function(e){h=e.S}],execute:function(){var f='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{width:320px;display:-ms-flexbox;display:flex;padding:20px;max-width:90%;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;background:#ffffff}verdocs-auth .logo{width:128px;max-width:100%;margin:20px 0 30px}verdocs-auth h3{text-align:center;font-weight:400;font-size:18px;line-height:1.75;margin:0}verdocs-auth em{font-size:14px;margin:15px 0}verdocs-auth .buttons{gap:20px;margin:20px 0 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p{margin:1em 0;font-size:14px}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}verdocs-auth .already-have{margin:0.5em 0;font-size:14px}';var p=f;var v=e("verdocs_auth",function(){function e(e){t(this,e);this.authenticated=i(this,"authenticated",7);this.sdkError=i(this,"sdkError",7);this.resendDisabledTimer=null;this.tempAuthEndpoint=new r({baseURL:r.getDefault().getBaseURL(),persist:false});this.endpoint=r.getDefault();this.visible=true;this.logo="https://app.verdocs.com/assets/blue-logo.svg";this.displayMode="login";this.org_name="";this.first_name="";this.last_name="";this.email="";this.verificationCode="";this.newPassword="";this.password="";this.confirmpass="";this.submitting=false;this.resendDisabled=false;this.session=null;this.profile=null}e.prototype.componentWillLoad=function(){var e=this;this.endpoint.loadSession();r.getDefault().onSessionChanged((function(t,i,s){var r,n;e.session=i;e.profile=s;if(i){(r=e.authenticated)===null||r===void 0?void 0:r.emit({authenticated:true,session:i,profile:s})}else{(n=e.authenticated)===null||n===void 0?void 0:n.emit({authenticated:false,session:i,profile:s})}}))};e.prototype.isPasswordComplex=function(e){var t=function(e){return/[A-Z]/.test(e)};var i=function(e){return/[a-z]/.test(e)};var s=function(e){return/[`!@#$%^&*()_\-+=\[\]{};':"\\|,.<>\/?~ ]/.test(e)};var r=0,n=0,o=0;for(var a=0;a<e.length;a++){var l=e.charAt(a);if(t(l))r++;else if(i(l))n++;else if(s(l))o++}return e.length>=8&&n>0&&r>0&&o>0};e.prototype.handleSignup=function(){var e=this;if(!this.isPasswordComplex(this.password)){d("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"});return}if(this.password!==this.confirmpass){d("Passwords do not match.",{style:"error"});return}this.submitting=true;this.tempAuthEndpoint.clearSession();n(this.tempAuthEndpoint,{email:this.email,password:this.password,first_name:this.first_name,last_name:this.last_name,org_name:this.org_name}).then((function(t){console.log("[AUTH] Profile creation result",t);e.tempAuthEndpoint.setToken(t.access_token);e.password="";e.first_name="";e.last_name="";e.org_name="";e.displayMode="verify";e.submitting=false})).catch((function(t){var i,s,r,n,o,a;console.log("[AUTH] Signup error",t.response);e.submitting=false;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:false,profile:null,session:null});(s=e.sdkError)===null||s===void 0?void 0:s.emit(new h(t.message,(r=t.response)===null||r===void 0?void 0:r.status,(n=t.response)===null||n===void 0?void 0:n.data));d("Signup failed: "+((a=(o=t.response)===null||o===void 0?void 0:o.data)===null||a===void 0?void 0:a.error)||"Unknown Error",{style:"error"})}))};e.prototype.handleVerification=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:this.submitting=true;i.label=1;case 1:i.trys.push([1,3,,4]);this.submitting=false;return[4,o(this.tempAuthEndpoint,{email:this.email,token:this.verificationCode})];case 2:e=i.sent();d("Thank you for verifying your email address.",{style:"success"});this.completeLogin(e);return[3,4];case 3:t=i.sent();this.submitting=false;console.log("Verification error",t);d("Verification error, please check the code and try again.");return[3,4];case 4:return[2]}}))}))};e.prototype.completeLogin=function(e){this.clearForms();this.tempAuthEndpoint.clearSession();this.endpoint.setToken(e.access_token)};e.prototype.loginAndCheckVerification=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,s;return __generator(this,(function(r){switch(r.label){case 0:if(this.submitting){return[2]}this.submitting=true;this.tempAuthEndpoint.clearSession();r.label=1;case 1:r.trys.push([1,4,,5]);this.submitting=false;return[4,a(this.tempAuthEndpoint,{username:this.email,password:this.password,grant_type:"password"})];case 2:t=r.sent();console.log("[AUTH] Authenticated, checking email verification");this.tempAuthEndpoint.setToken(t.access_token);return[4,l(this.tempAuthEndpoint)];case 3:i=r.sent();console.log("Got user",i);if(!i.email_verified){console.log("[AUTH] Logged in, pending email address verification");this.displayMode="verify"}else{console.log("[AUTH] Email address is verified, completing login");this.completeLogin(t)}return[3,5];case 4:s=r.sent();this.submitting=false;console.log("[AUTH] Auth failure",((e=s.response)===null||e===void 0?void 0:e.data)||s);d("Login failed. Please check your credentials and try again.",{style:"error"});return[3,5];case 5:return[2]}}))}))};e.prototype.clearForms=function(){this.submitting=false;this.resendDisabled=false;this.email="";this.password="";this.newPassword="";this.confirmpass="";this.verificationCode="";this.first_name="";this.last_name="";this.org_name=""};e.prototype.handleLogout=function(){console.log("logging out");this.endpoint.clearSession();this.tempAuthEndpoint.clearSession();this.clearForms();this.displayMode="login"};e.prototype.handleResendVerification=function(){var e=this;this.resendDisabled=true;this.resendDisabledTimer=setTimeout((function(){e.resendDisabled=false;e.resendDisabledTimer=null}),3e4);u(this.tempAuthEndpoint).then((function(e){console.log("[AUTH] Verification request resent",e);d("Please check your email for a verification code.",{style:"info"})})).catch((function(e){console.log("[AUTH] Unable to resend verification",e);d("Unable to resend code. Please try again later.",{style:"error"})}))};e.prototype.handleResendReset=function(){var e=this;this.resendDisabled=true;this.resendDisabledTimer=setTimeout((function(){e.resendDisabled=false;e.resendDisabledTimer=null}),3e4);c(this.tempAuthEndpoint,{email:this.email}).then((function(e){console.log("[AUTH] Resend-code request resent",e);d("Please check your email again for a verification code.",{style:"info"})})).catch((function(e){console.log("[AUTH] Unable to resend reset request",e);d("Unable to resend code. Please try again later.",{style:"error"})}))};e.prototype.handleResetGetCode=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:this.submitting=true;this.confirmpass="";this.newPassword="";i.label=1;case 1:i.trys.push([1,3,,4]);this.submitting=false;return[4,c(this.endpoint,{email:this.email})];case 2:e=i.sent();console.log("[AUTH] Reset result",e);d("Please check your email inbox for a password reset code.",{style:"success"});this.verificationCode="";this.confirmpass="";this.newPassword="";this.displayMode="reset";return[3,4];case 3:t=i.sent();this.submitting=false;console.log("Reset request error",t);d("Request failed. Please check your email address and try again.");return[3,4];case 4:return[2]}}))}))};e.prototype.handleResetPassword=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:if(!this.isPasswordComplex(this.newPassword)){d("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"});return[2]}if(this.newPassword!==this.confirmpass){d("Passwords do not match.",{style:"error"});return[2]}this.submitting=true;i.label=1;case 1:i.trys.push([1,3,,4]);this.submitting=false;return[4,c(this.endpoint,{email:this.email,code:this.verificationCode,new_password:this.newPassword})];case 2:e=i.sent();console.log("reset result",e);d("Your password has been reset. You may now use your new password to login.",{style:"success"});this.verificationCode="";this.confirmpass="";this.newPassword="";this.password="";this.displayMode="login";return[3,4];case 3:t=i.sent();this.submitting=false;console.log("Verification error",t);d("Verification error, please check the code and try again.");return[3,4];case 4:return[2]}}))}))};e.prototype.handleReset=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:this.submitting=true;i.label=1;case 1:i.trys.push([1,3,,4]);return[4,c(this.endpoint,{email:this.email})];case 2:e=i.sent();console.log("[AUTH] Reset sent",e);this.submitting=false;this.displayMode="login";d("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"});return[3,4];case 3:t=i.sent();console.log("[AUTH] Unable to reset password",t);this.submitting=false;d("Unable to reset password. Please check your email address and try again.",{style:"error"});return[3,4];case 4:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.visible){return s("div",{style:{display:"none"}},"Authenticated")}if(this.session){return s("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:function(){return e.handleLogout()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})}if(this.displayMode==="signup"){var t=this.submitting||!this.first_name||!this.last_name||!this.email||!this.password||!this.confirmpass||!this.org_name;return s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Sign up for a free account"),s("div",{class:"already-have"},"Already have an account?",s("verdocs-button",{label:"Log In",variant:"text",onClick:function(){return e.displayMode="login"},disabled:this.submitting})),s("form",{onSubmit:function(){return e.handleSignup()}},s("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},s("verdocs-text-input",{label:"First Name",autocomplete:"first",required:true,value:this.first_name,onInput:function(t){return e.first_name=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:true,value:this.last_name,onInput:function(t){return e.last_name=t.target.value},disabled:this.submitting})),s("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:true,value:this.email,onInput:function(t){return e.email=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"new-password",value:this.password,onInput:function(t){return e.password=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Confirm Password",type:"password",required:true,autocomplete:"off",value:this.confirmpass,onInput:function(t){return e.confirmpass=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:true,value:this.org_name,onInput:function(t){return e.org_name=t.target.value},disabled:this.submitting,style:{flex:"1"}}),s("div",{style:{marginTop:"30px"}}),s("verdocs-button",{label:"Next",disabled:t,onClick:t?function(){}:function(){return e.handleSignup()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}if(this.displayMode==="verify"){return s("div",{class:"form"},s("form",{onSubmit:function(){return e.handleVerification()}},s("p",null,"Please check your e-mail inbox for a verification code and enter it below."),s("verdocs-text-input",{label:"Verification Code",required:true,value:this.verificationCode,onInput:function(t){return e.verificationCode=t.target.value},disabled:this.submitting}),s("div",{class:"buttons"},s("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:function(){return e.handleLogout()}}),s("verdocs-button",{label:"Verify",disabled:this.submitting||!this.verificationCode||this.verificationCode.length!==6,onClick:function(){return e.handleVerification()}})),s("div",{class:"buttons"},s("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:function(){return e.handleResendVerification()}}))))}if(this.displayMode==="forgot"){return s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Forgot your password?"),s("p",null,"Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."),s("form",{onSubmit:function(){return e.handleResetGetCode()}},s("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:true,value:this.email,onInput:function(t){return e.email=t.target.value},disabled:this.submitting}),s("div",{style:{marginTop:"30px"}}),s("div",{class:"buttons"},s("verdocs-button",{size:"small",label:"Cancel",variant:"outline",disabled:this.submitting,onClick:function(){return e.displayMode="login"}}),s("verdocs-button",{size:"small",label:"Request Code",disabled:this.submitting,onClick:function(){return e.handleResetGetCode()}}))))}if(this.displayMode==="reset"){return s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Forgot your password?"),s("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."),s("form",{onSubmit:function(){return e.handleResetPassword()}},s("verdocs-text-input",{label:"Verification Code",required:true,value:this.verificationCode,onInput:function(t){return e.verificationCode=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"off",value:this.newPassword,onInput:function(t){return e.newPassword=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Confirm Password",type:"password",required:true,autocomplete:"off",value:this.confirmpass,onInput:function(t){return e.confirmpass=t.target.value},disabled:this.submitting}),s("div",{style:{marginTop:"30px"}}),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:function(){return e.displayMode="login"}}),s("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:function(){return e.handleResetPassword()}})),s("div",{class:"buttons"},s("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:function(){return e.handleResendReset()}}))))}return s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Log in to your account"),s("div",{class:"already-have"},"Don't have an account?",s("verdocs-button",{label:"Sign Up",variant:"text",onClick:function(){return e.displayMode="signup"},disabled:this.submitting})),s("form",{onSubmit:function(){return e.loginAndCheckVerification()}},s("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.email,onInput:function(t){return e.email=t.target.value},disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(t){return e.password=t.target.value},disabled:this.submitting}),s("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:function(){return e.displayMode="forgot"},disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),s("verdocs-button",{label:"Login",disabled:this.submitting,onClick:function(){return e.loginAndCheckVerification()},style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))};return e}());v.style=p}}}));