@verdocs/web-sdk 1.9.23 → 1.9.25

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 (40) hide show
  1. package/dist/cjs/verdocs-document-page_2.cjs.entry.js +1 -1
  2. package/dist/cjs/verdocs-document-page_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/verdocs-sign.cjs.entry.js +5 -5
  4. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  5. package/dist/collection/components/elements/verdocs-document-page/verdocs-document-page.css +1 -1
  6. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +20 -42
  7. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +4 -4
  8. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  9. package/dist/components/verdocs-document-page2.js +1 -1
  10. package/dist/components/verdocs-document-page2.js.map +1 -1
  11. package/dist/components/verdocs-sign.js +5 -5
  12. package/dist/components/verdocs-sign.js.map +1 -1
  13. package/dist/docs.json +1 -1
  14. package/dist/esm/verdocs-document-page_2.entry.js +1 -1
  15. package/dist/esm/verdocs-document-page_2.entry.js.map +1 -1
  16. package/dist/esm/verdocs-sign.entry.js +5 -5
  17. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  18. package/dist/esm-es5/verdocs-document-page_2.entry.js +1 -1
  19. package/dist/esm-es5/verdocs-document-page_2.entry.js.map +1 -1
  20. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  21. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  22. package/dist/verdocs-web-sdk/p-0a92a141.system.entry.js +2 -0
  23. package/dist/verdocs-web-sdk/p-0a92a141.system.entry.js.map +1 -0
  24. package/dist/verdocs-web-sdk/p-1fc3f986.system.entry.js +2 -0
  25. package/dist/verdocs-web-sdk/p-1fc3f986.system.entry.js.map +1 -0
  26. package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
  27. package/dist/verdocs-web-sdk/p-e3811c48.entry.js +2 -0
  28. package/dist/verdocs-web-sdk/p-e3811c48.entry.js.map +1 -0
  29. package/dist/verdocs-web-sdk/p-f7a56f6c.entry.js +2 -0
  30. package/dist/verdocs-web-sdk/p-f7a56f6c.entry.js.map +1 -0
  31. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  32. package/package.json +1 -1
  33. package/dist/verdocs-web-sdk/p-0d775f91.system.entry.js +0 -2
  34. package/dist/verdocs-web-sdk/p-0d775f91.system.entry.js.map +0 -1
  35. package/dist/verdocs-web-sdk/p-48c467a2.system.entry.js +0 -2
  36. package/dist/verdocs-web-sdk/p-48c467a2.system.entry.js.map +0 -1
  37. package/dist/verdocs-web-sdk/p-7ffe3227.entry.js +0 -2
  38. package/dist/verdocs-web-sdk/p-7ffe3227.entry.js.map +0 -1
  39. package/dist/verdocs-web-sdk/p-e76b4d24.entry.js +0 -2
  40. package/dist/verdocs-web-sdk/p-e76b4d24.entry.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{r as e,c as i,h as t,H as s,F as n}from"./p-ff1278ed.js";import{b as o,s as r,u as a,c as l,d,f as c,a as h,r as u,e as f}from"./p-fcc3041d.js";import"./p-8efc9749.js";import{a as v,i as p}from"./p-e662f81b.js";import{V as g}from"./p-1f1127dd.js";import{g as x,s as m}from"./p-dbb4398c.js";import{S as b}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-5ea05a1d.js";var w=undefined&&undefined.__awaiter||function(e,i,t,s){function n(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function r(e){try{l(s.next(e))}catch(e){o(e)}}function a(e){try{l(s["throw"](e))}catch(e){o(e)}}function l(e){e.done?t(e.value):n(e.value).then(r,a)}l((s=s.apply(e,i||[])).next())}))};var y=undefined&&undefined.__generator||function(e,i){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s,n,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(r){if(s)throw new TypeError("Generator is already executing.");while(t)try{if(s=1,n&&(o=r[0]&2?n["return"]:r[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;if(n=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;n=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){t.label=r[1];break}if(r[0]===6&&t.label<o[1]){t.label=o[1];o=r;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(r);break}if(o[2])t.ops.pop();t.trys.pop();continue}r=i.call(e,t)}catch(e){r=[6,e];n=0}finally{s=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var k=function(e,i,t,s){return w(void 0,void 0,void 0,(function(){return y(this,(function(n){return[2,e.api.put("/envelopes/".concat(i,"/recipients/").concat(t),s).then((function(e){return e.data}))]}))}))};var S=function(e,i,t){return k(e,i,t,{action:"submit"})};var I=function(e,i,t){return k(e,i,t,{action:"decline"})};var N=function(e,i,t,s){return k(e,i,t,{action:"update",agreed:s})};var z=function(e,i,t){var s=new FormData;s.append("signature",t,i);return e.api.post("/signatures",s).then((function(e){return e.data}))};var j=function(e,i,t){var s=new FormData;s.append("initial",t,i);return e.api.post("/initials",s).then((function(e){return e.data}))};const F='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .logo{width:80px;margin:-6px 0 0 10px}verdocs-sign .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign .document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-sign .document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}';const G=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"></path></svg>`;const H=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"></path></svg>`;const C=class{constructor(t){e(this,t);this.sdkError=i(this,"sdkError",7);this.envelopeLoaded=i(this,"envelopeLoaded",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.endpoint=null;this.recipientIndex=-1;this.fields=[];this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.recipient=null;this.signerToken=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.errorMessage="";this.focusedField="";this.isDone=false;this.showDone=false;this.finishLater=false;this.showFinishLater=false}componentWillLoad(){this.endpoint=new g({sessionType:"signing"})}async componentDidLoad(){var e,i,t,s,n,r,a;if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new b("[SIGN] Missing required envelopId",500,""));return}if(!this.roleId){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new b("[SIGN] Missing required roleId",500,""));return}if(!this.inviteCode){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new b("[SIGN] Missing required inviteCode",500,""));return}try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{session:e,recipient:i,signerToken:t}=await o(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode});console.log(`[SIGN] Loaded signing session ${e.email} / ${e.profile_id}`);this.recipient=i;this.signerToken=t;this.endpoint.setToken(t);if(this.recipient.agreed){this.nextButtonLabel="Next"}await x(this.endpoint,this.envelopeId);this.recipientIndex=m.envelope.recipients.findIndex((e=>e.role_name==this.roleId));if(this.recipientIndex>-1){this.recipient=m.envelope.recipients[this.recipientIndex];this.fields=this.recipient.fields}this.isDone=["submitted","canceled","declined"].includes(this.recipient.status);console.log("Done",this.isDone);(s=this.envelopeLoaded)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:m.envelope})}catch(e){console.log("Error with signing session",e);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new b(e.message,(r=e.response)===null||r===void 0?void 0:r.status,(a=e.response)===null||a===void 0?void 0:a.data))}}handleClickAgree(){N(this.endpoint,this.envelopeId,this.roleId,true).then((e=>{var i;this.nextButtonLabel="Next";this.recipient=e;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:m.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("Update failure",e);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new b(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(s=e.response)===null||s===void 0?void 0:s.data))}))}async handleOptionSelected(e){switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;break;case"claim":break;case"decline":{const e=await I(this.endpoint,this.envelopeId,this.roleId);console.log("Decline result",e);this.isDone=true}break;case"print":window.print();break;case"download":r(this.endpoint,m.envelope,m.envelope.envelope_document_id).catch((()=>{}));break}}saveFieldChange(e,i){a(this.endpoint,this.envelopeId,e,i).catch((e=>{var i,t,s,n,o,r;if(((i=e.response)===null||i===void 0?void 0:i.status)===401&&((s=(t=e.response)===null||t===void 0?void 0:t.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");this.errorMessage="Signing session expired."}else{console.log("[SIGN] Server error",e)}(n=this.sdkError)===null||n===void 0?void 0:n.emit(new b(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(r=e.response)===null||r===void 0?void 0:r.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:false,value:t});case"checkbox_group":{const t=e.settings.options.map((e=>({id:e.id,checked:i.target.checked})));return this.saveFieldChange(e.name,{prepared:false,value:{options:t}})}case"radio_button_group":{const t=e.settings.options.map((e=>({id:e.id,selected:i.target.value===e.id})));return this.saveFieldChange(e.name,{prepared:false,value:{options:t}})}case"dropdown":return this.saveFieldChange(e.name,{prepared:false,value:i.detail});case"initial":const n=await(await fetch(i.detail)).blob();return j(this.endpoint,"initial",n).then((i=>{console.log("New initials",e.name,i);d(this.endpoint,this.envelopeId,e.name,i.id)}));case"signature":const o=await(await fetch(i.detail)).blob();return z(this.endpoint,"signature",o).then((i=>{console.log("New sign",e.name,i);l(this.endpoint,this.envelopeId,e.name,i.id)}));case"date":const r=i.target.getAttribute("iso");return this.saveFieldChange(e.name,{prepared:false,value:r});case"timestamp":console.log("Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("Unhandled field update",{value:t,checked:s},e);break}}isFieldValid(e){var i,t,s,n,o,r,a;const{required:l=false}=e;const{result:d="",value:c="",base64:h=""}=e.settings||{};switch(e.type){case"textbox":switch(((i=e.settings)===null||i===void 0?void 0:i.validator)||""){case"email":return p(d);case"phone":return v(d);default:return!l||d!==""}case"signature":case"initial":return!l||h!=="";case"timestamp":return true;case"textarea":case"date":case"attachment":return!l||d!=="";case"dropdown":return!l||c!=="";case"checkbox_group":const u=(((s=(t=e.settings)===null||t===void 0?void 0:t.options)===null||s===void 0?void 0:s.filter((e=>e.checked)))||[]).length;return!l||u>=(((n=e.settings)===null||n===void 0?void 0:n.minimum_checked)||0)&&u<=(((o=e.settings)===null||o===void 0?void 0:o.maximum_checked)||999);case"radio_button_group":return!l||(((a=(r=e.settings)===null||r===void 0?void 0:r.options)===null||a===void 0?void 0:a.filter((e=>e.selected)))||[]).length>0;default:return false}}async handleNext(){var e;if(this.nextSubmits){try{const e=await S(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",e);this.showDone=true;this.isDone=true}catch(e){console.log("Error submitting",e)}return}const i=this.fields.filter((e=>e.required));const t=i.findIndex((e=>e.name===this.focusedField));let s=t+1;if(s>=i.length){s=0}let n=i[s];let o=0;if(o<i.length&&["signature","initial"].includes(n.type)&&((e=n.settings)===null||e===void 0?void 0:e.result)==="signed"){o++;s++;if(s>=i.length){s=0}n=i[s]}if(o>=i.length){n=null}if(n){const e=f(n);const i=document.getElementById(e);i===null||i===void 0?void 0:i.focusField();this.focusedField=n.name}}checkRecipientFields(){const e=this.recipient.fields.filter((e=>!this.isFieldValid(e)));if(e.length<1){this.nextButtonLabel="Finish";this.nextSubmits=true}else{console.log("[SIGN] Remaining invalid fields",e);this.nextSubmits=false}}attachFieldAttributes(e,i,t,s){var n;s.addEventListener("input",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))));s.addEventListener("fieldChange",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))));s.setAttribute("roleindex",t);s.setAttribute("xScale",e.xScale);s.setAttribute("yScale",e.yScale);s.setAttribute("initials",this.recipient?c(this.recipient.full_name):"");s.setAttribute("name",((n=this.recipient)===null||n===void 0?void 0:n.full_name)||"")}handlePageRendered(e){const i=e.detail;const t=h(m.roleNames,this.recipient.role_name);const s=this.recipient.fields.filter((e=>e.page===i.pageNumber));console.log("[SIGN] Page rendered, updating fields",{pageInfo:i,roleIndex:t,recipientFields:s});s.forEach((e=>{const s=u(e,i,t,{disabled:false,editable:false,draggable:false,done:this.isDone});if(!s){return}if(Array.isArray(s)){s.map((s=>this.attachFieldAttributes(i,e,t,s)))}else{this.attachFieldAttributes(i,e,t,s)}}));m.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name)).map((e=>{const t=h(m.roleNames,e.role_name);const s=e.fields.filter((e=>e.page===i.pageNumber));s.forEach((e=>{const s=u(e,i,t,{disabled:true,editable:false,draggable:false,done:this.isDone});if(!s){return}s.setAttribute("roleindex",t);s.setAttribute("xScale",i.xScale);s.setAttribute("yScale",i.yScale)}))}));this.checkRecipientFields()}render(){var e,i,o,a;if(m.loading||!m.envelope){return t(s,null,t("verdocs-loader",null))}const l=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing",disabled:true},{id:"download",label:"Download"}];return t(s,{class:{agreed:(e=this.recipient)===null||e===void 0?void 0:e.agreed}},!this.isDone&&!this.finishLater&&t("div",{class:"intro"},"Please review and act on these documents."),t("div",{class:"header"},!this.isDone&&!this.finishLater&&t("verdocs-dropdown",{options:l,onOptionSelected:e=>this.handleOptionSelected(e)}),!((i=this.recipient)===null||i===void 0?void 0:i.agreed)?t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:()=>this.handleClickAgree()})):t(n,null,t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},m.envelope.name),t("div",{style:{flex:"1"}}),t("div",{innerHTML:G,style:{width:"24px",height:"24px",fill:"#ffffff",cursor:"pointer"},onClick:()=>window.print()}),t("div",{innerHTML:H,style:{width:"24px",height:"24px",fill:"#ffffff",cursor:"pointer",margin:"0 16px",maginRight:"30px"},onClick:()=>r(this.endpoint,m.envelope,m.envelope.envelope_document_id).catch((()=>{}))})),!this.isDone&&!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!((o=this.recipient)===null||o===void 0?void 0:o.agreed),onClick:()=>this.handleNext()})),!this.isDone&&!((a=this.recipient)===null||a===void 0?void 0:a.agreed)?t("div",{class:"cover"}):t("div",{style:{display:"none"}}),t("div",{class:"document"},(m.envelope.documents||[]).map((e=>{const i=[...(e===null||e===void 0?void 0:e.pages)||[]];i.sort(((e,i)=>e.sequence-i.sequence));return t(n,null,i.map((e=>t("verdocs-document-page",{pageImageUri:e.display_uri,virtualWidth:612,virtualHeight:792,pageNumber:e.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the document, use the link in the original email notification inviting you to review and finish the document.",onNext:()=>this.showFinishLater=false}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the Verdoc at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.",onNext:()=>this.showDone=false}))}};C.style=F;export{C as verdocs_sign};
2
+ //# sourceMappingURL=p-e3811c48.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["node_modules/@verdocs/js-sdk/Envelopes/Recipients.js","node_modules/@verdocs/js-sdk/Envelopes/Signatures.js","node_modules/@verdocs/js-sdk/Envelopes/Initials.js","src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"names":["__awaiter","this","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","apply","__generator","body","_","label","sent","t","trys","ops","f","y","g","verb","throw","return","Symbol","iterator","n","v","op","TypeError","call","pop","length","push","updateRecipient","endpoint","envelopeId","roleName","params","_a","api","put","concat","r","data","envelopeRecipientSubmit","action","envelopeRecipientDecline","envelopeRecipientAgree","agreed","createSignature","name","signature","FormData","append","post","createInitials","initials","verdocsSignCss","PrintIcon","DownloadIcon","VerdocsSign","recipientIndex","fields","[object Object]","VerdocsEndpoint","sessionType","sdkError","emit","SDKError","roleId","_b","inviteCode","_c","console","log","session","recipient","signerToken","Envelopes.getSigningSession","email","profile_id","setToken","nextButtonLabel","getEnvelopeById","EnvelopeStore","envelope","recipients","findIndex","role_name","isDone","includes","status","_d","envelopeLoaded","_e","message","_f","response","_g","envelopeUpdated","event","catch","detail","id","finishLater","showFinishLater","declineResult","window","print","savePDF","envelope_document_id","fieldName","Envelopes.updateEnvelopeField","error","errorMessage","field","checked","target","type","saveFieldChange","prepared","options","settings","map","option","selected","initialsBlob","fetch","blob","newInitials","updateEnvelopeFieldInitials","signatureBlob","newSignature","updateEnvelopeFieldSignature","iso","getAttribute","ts","required","base64","validator","isValidEmail","isValidPhone","checkedCount","filter","minimum_checked","maximum_checked","nextSubmits","showDone","requiredFields","focusedIndex","focusedField","nextFocusedIndex","nextRequiredField","skips","getFieldId","el","document","getElementById","focusField","invalidFields","isFieldValid","pageInfo","roleIndex","addEventListener","handleFieldChange","finally","checkRecipientFields","setAttribute","xScale","yScale","fullNameToInitials","full_name","getRoleIndex","roleNames","recipientFields","page","pageNumber","forEach","renderDocumentField","disabled","editable","draggable","Array","isArray","attachFieldAttributes","otherRecipient","otherRoleIndex","loading","h","Host","menuOptions","class","onOptionSelected","handleOptionSelected","onInput","handleClickAgree","Fragment","src","alt","style","flex","innerHTML","width","height","fill","cursor","onClick","margin","maginRight","size","handleNext","display","documents","envelopeDocument","pages","sort","a","b","sequence","pageImageUri","display_uri","virtualWidth","virtualHeight","onPageRendered","handlePageRendered","layers","heading","onNext"],"mappings":"6XAAA,IAAIA,EAAaC,WAAQA,UAAKD,WAAc,SAAUE,EAASC,EAAYC,EAAGC,GAC1E,SAASC,EAAMC,GAAS,OAAOA,aAAiBH,EAAIG,EAAQ,IAAIH,GAAE,SAAUI,GAAWA,EAAQD,MAC/F,OAAO,IAAKH,IAAMA,EAAIK,WAAU,SAAUD,EAASE,GAC/C,SAASC,EAAUJ,GAAS,IAAMK,EAAKP,EAAUQ,KAAKN,IAAW,MAAOO,GAAKJ,EAAOI,IACpF,SAASC,EAASR,GAAS,IAAMK,EAAKP,EAAU,SAASE,IAAW,MAAOO,GAAKJ,EAAOI,IACvF,SAASF,EAAKI,GAAUA,EAAOC,KAAOT,EAAQQ,EAAOT,OAASD,EAAMU,EAAOT,OAAOW,KAAKP,EAAWI,GAClGH,GAAMP,EAAYA,EAAUc,MAAMjB,EAASC,GAAc,KAAKU,YAGtE,IAAIO,EAAenB,WAAQA,UAAKmB,aAAgB,SAAUlB,EAASmB,GAC/D,IAAIC,EAAI,CAAEC,MAAO,EAAGC,KAAM,WAAa,GAAIC,EAAE,GAAK,EAAG,MAAMA,EAAE,GAAI,OAAOA,EAAE,IAAOC,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AhBA,SAAgB,OAAA,EAAhBA,EAAkBC,QAAS,IAC9CA,EAAMC,MAAK,CAACC,EAAGC,IAAMD,EAAEE,SAAWD,EAAEC,WAEpC,OACE9B,EAACQ,EAAQ,KACNkB,EAAM3F,KAAIoD,GACTa,EAAA,wBAAA,CACE+B,aAAc5C,EAAK6C,YACnBC,aAAc,IACdC,cAAe,IACf9C,WAAYD,EAAK2C,SACjBK,eAAgB5N,GAAKb,KAAK0O,mBAAmB7N,GAC7C8N,OAAQ,CACN,CAAC/K,KAAM,OAAQoE,KAAM,UACrB,CAACpE,KAAM,WAAYoE,KAAM,iBAStChI,KAAKmH,iBACJmF,EAAA,oBAAA,CACEsC,QAAQ,8CACRnI,QAAQ,4HACRoI,OAAQ,IAAO7O,KAAKmH,gBAAkB,QAIzCnH,KAAK4H,cAAgB0E,EAAA,oBAAA,CAAmBsC,QAAQ,gBAAgBnI,QAASzG,KAAK4H,aAAciH,OAAQ,IAAO7O,KAAK4H,aAAe,KAC/H5H,KAAK6J,UACJyC,EAAA,oBAAA,CACEsC,QAAQ,eACRnI,QAAQ,wOACRoI,OAAQ,IAAO7O,KAAK6J,SAAW","sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/**\n * Update a recipient's status block\n */\nexport var updateRecipient = function (endpoint, envelopeId, roleName, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(roleName), params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.\n */\nexport var envelopeRecipientSubmit = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'submit' });\n};\n/**\n * Decline to complete an envelope (signing will not terminated).\n */\nexport var envelopeRecipientDecline = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'decline' });\n};\n/**\n * Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.\n */\nexport var envelopeRecipientChangeOwner = function (endpoint, envelopeId, roleName, email, fullName) { return updateRecipient(endpoint, envelopeId, roleName, { action: 'owner_update', email: email, full_name: fullName }); };\n/**\n * Agree to electronic signing.\n */\nexport var envelopeRecipientAgree = function (endpoint, envelopeId, roleName, agreed) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', agreed: agreed });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientUpdateName = function (endpoint, envelopeId, roleName, fullName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', new_full_name: fullName });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientPrepare = function (endpoint, envelopeId, roleName, recipients) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients: recipients });\n};\nexport var getSignerToken = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"/signer-token\"))\n .then(function (r) { return r.data; });\n};\nexport var getInPersonLink = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"?in_person_link=true\"))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to\n * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field\n * to be \"stamped\" by the user.\n */\nexport var createSignature = function (endpoint, name, signature) {\n var data = new FormData();\n data.append('signature', signature, name);\n return endpoint.api //\n .post(\"/signatures\", data)\n .then(function (r) { return r.data; });\n};\n/**\n * Get the availbable signatures for a user.\n */\nexport var getSignatures = function (endpoint) {\n return endpoint.api //\n .get('/signatures')\n .then(function (r) { return r.data; });\n};\n/**\n * Get a user's signature by ID.\n */\nexport var getSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .get(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n/**\n * Delete a user's signature.\n */\nexport var deleteSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .delete(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to\n * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field\n * to be \"stamped\" by the user.\n */\nexport var createInitials = function (endpoint, name, initials) {\n var data = new FormData();\n data.append('initial', initials, name);\n return endpoint.api //\n .post(\"/initials\", data)\n .then(function (r) { return r.data; });\n};\n","@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n .header {\n color: #fff;\n display: flex;\n z-index: 1000;\n flex: 0 0 56px;\n padding: 0 15px;\n font-size: 12px;\n align-items: center;\n flex-direction: row;\n transition: all 0.25s;\n background-color: $medium-bg;\n box-shadow: 0 4px 4px 0 rgb(0 0 0 / 24%), 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .logo {\n width: 80px;\n margin: -6px 0 0 10px;\n }\n\n .title {\n padding-left: 16px;\n font-size: 18px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n .intro {\n width: 100%;\n display: flex;\n flex: 0 0 60px;\n color: #111111;\n padding: 0 15px;\n font-size: 18px;\n font-weight: 500;\n line-height: 28px;\n flex-direction: row;\n background: #ffffff;\n align-items: center;\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n position: absolute;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .document {\n flex: 1;\n height: 100%;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .agree {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 15px;\n\n .intro {\n display: none;\n }\n\n .header {\n flex: 0 0 56px;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Envelopes} from '@verdocs/js-sdk/Envelopes';\nimport {createInitials} from '@verdocs/js-sdk/Envelopes/Initials';\nimport {createSignature} from '@verdocs/js-sdk/Envelopes/Signatures';\nimport {IDocumentField, IEnvelope, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit} from '@verdocs/js-sdk/Envelopes/Recipients';\nimport {isValidEmail, isValidPhone} from '@verdocs/js-sdk/Templates/Validators';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {updateEnvelopeFieldInitials, updateEnvelopeFieldSignature} from '@verdocs/js-sdk/Envelopes/Envelopes';\nimport {fullNameToInitials, getFieldId, getRoleIndex, renderDocumentField, savePDF} from '../../../utils/utils';\nimport {getEnvelopeById} from '../../../utils/Envelopes';\nimport EnvelopeStore from '../../../utils/envelopeStore';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {SDKError} from '../../../utils/errors';\n\nconst PrintIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z\"></path></svg>`;\n\nconst DownloadIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z\"></path></svg>`;\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop() envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop() roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop() inviteCode: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() recipient: IRecipient | null = null;\n @State() signerToken = null;\n // @State() envelope: IEnvelope | null = null;\n // @State() fields: IDocumentField[] = [];\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() errorMessage = '';\n @State() focusedField = '';\n @State() isDone = false;\n @State() showDone = false;\n\n @State() finishLater = false;\n @State() showFinishLater = false;\n\n recipientIndex: number = -1;\n fields: IDocumentField[] = [];\n\n componentWillLoad() {\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n const {session, recipient, signerToken} = await Envelopes.getSigningSession(this.endpoint, {\n envelopeId: this.envelopeId,\n roleId: this.roleId,\n inviteCode: this.inviteCode,\n });\n\n console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);\n\n this.recipient = recipient;\n this.signerToken = signerToken;\n this.endpoint.setToken(signerToken);\n\n if (this.recipient.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n await getEnvelopeById(this.endpoint, this.envelopeId);\n // const envelope = await Envelopes.getEnvelope(this.endpoint, this.envelopeId);\n // this.envelope = envelope;\n // console.log('[SIGN] Loaded envelope', envelope);\n\n this.recipientIndex = EnvelopeStore.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = EnvelopeStore.envelope.recipients[this.recipientIndex];\n this.fields = this.recipient.fields;\n }\n\n this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);\n console.log('Done', this.isDone);\n\n // TODO: Fix service to allow this?\n // const sigs = await getSignatures();\n // console.log('sigs', sigs);\n\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope});\n } catch (e) {\n console.log('Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleClickAgree() {\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(r => {\n this.nextButtonLabel = 'Next';\n this.recipient = r;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('Update failure', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n // this.router.navigate([`view/sign/${this.envelopeId}/role/${this.roleName}/saved`]);\n // if (!window?.['STORYBOOK_ENV']) {\n // window.alert('User intends to sign later.');\n // }\n break;\n case 'claim':\n break;\n case 'decline':\n {\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('Decline result', declineResult);\n this.isDone = true;\n }\n break;\n case 'print':\n window.print();\n break;\n case 'download':\n savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {});\n break;\n }\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n // TODO: Do we want to improve the instructions here?\n console.log('[SIGN] Signing session expired');\n this.errorMessage = 'Signing session expired.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IDocumentField, e: any) {\n const {value, checked} = e.target;\n\n switch (field.type) {\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox_group': {\n const options = field.settings.options.map(option => ({id: option.id, checked: e.target.checked}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'radio_button_group': {\n const options = field.settings.options.map(option => ({id: option.id, selected: e.target.value === option.id}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'dropdown':\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(newInitials => {\n console.log('New initials', field.name, newInitials);\n updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n });\n\n case 'signature':\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(newSignature => {\n console.log('New sign', field.name, newSignature);\n updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n });\n\n case 'date':\n const iso = e.target.getAttribute('iso');\n return this.saveFieldChange(field.name, {prepared: false, value: iso});\n\n case 'timestamp':\n console.log('Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldValid(field: IDocumentField) {\n const {required = false} = field;\n const {result = '', value = '', base64 = ''} = field.settings || {};\n switch (field.type) {\n case 'textbox':\n switch (field.settings?.validator || '') {\n case 'email':\n return isValidEmail(result);\n case 'phone':\n return isValidPhone(result);\n default:\n return !required || result !== '';\n }\n\n case 'signature':\n case 'initial':\n return !required || base64 !== '';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'textarea':\n case 'date':\n case 'attachment':\n return !required || result !== '';\n\n case 'dropdown':\n return !required || value !== '';\n\n case 'checkbox_group':\n const checkedCount = (field.settings?.options?.filter(option => option.checked) || []).length;\n return !required || (checkedCount >= (field.settings?.minimum_checked || 0) && checkedCount <= (field.settings?.maximum_checked || 999));\n\n case 'radio_button_group':\n return !required || (field.settings?.options?.filter(option => option.selected) || []).length > 0;\n // TODO\n // case 'checkbox':\n // return <verdocs-field-checkbox style={style} value={result || ''} id={id} />;\n // case 'payment':\n // return <verdocs-field-payment style={style} field={field} id={id} />;\n default:\n return false;\n }\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.showDone = true;\n this.isDone = true;\n // updateRecipientStatus()\n } catch (e) {\n console.log('Error submitting', e);\n }\n return;\n // You're done.\n // You can access the Verdoc at any time by clicking on the link from invitation email.\n //\n // After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.\n //\n // Thank you for using Verdocs.\n // Got it, thanks\n }\n\n // Find and focus the next incomplete required field\n const requiredFields = this.fields.filter(field => field.required);\n const focusedIndex = requiredFields.findIndex(field => field.name === this.focusedField);\n\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = requiredFields[nextFocusedIndex];\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < requiredFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && nextRequiredField.settings?.result === 'signed') {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = requiredFields[nextFocusedIndex];\n }\n\n if (skips >= requiredFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const invalidFields = this.recipient.fields.filter(field => !this.isFieldValid(field));\n if (invalidFields.length < 1) {\n this.nextButtonLabel = 'Finish';\n this.nextSubmits = true;\n } else {\n console.log('[SIGN] Remaining invalid fields', invalidFields);\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, roleIndex, el) {\n el.addEventListener('input', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n el.addEventListener('fieldChange', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n\n el.setAttribute('roleindex', roleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n el.setAttribute('initials', this.recipient ? fullNameToInitials(this.recipient.full_name) : '');\n el.setAttribute('name', this.recipient?.full_name || '');\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IDocumentPageInfo;\n const roleIndex = getRoleIndex(EnvelopeStore.roleNames, this.recipient.role_name);\n const recipientFields = this.recipient.fields.filter(field => field.page === pageInfo.pageNumber);\n console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});\n\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, roleIndex, {disabled: false, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, roleIndex, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, roleIndex, el);\n }\n\n // interact(el).draggable({\n // listeners: {\n // start(event) {\n // console.log('[FIELDS] Drag started', event.type, event.target);\n // },\n // move(event) {\n // const oldX = +(event.target.getAttribute('posX') || 0);\n // const oldY = +(event.target.getAttribute('posY') || 0);\n // const xScale = +(event.target.getAttribute('xScale') || 1);\n // const yScale = +(event.target.getAttribute('yScale') || 1);\n // const newX = event.dx / xScale + oldX;\n // const newY = event.dy / yScale + oldY;\n // event.target.setAttribute('posX', newX);\n // event.target.setAttribute('posy', newY);\n // updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);\n // },\n // end(event) {\n // console.log('[FIELDS] Drag ended', event);\n // // event.target.setAttribute('posX', 0);\n // // event.target.setAttribute('posy', 0);\n // // updateCssTransform(event.target, 'translate', `${0}px, ${0}px`);\n // },\n // },\n // });\n });\n\n // Render fields for \"the other\" recipients\n EnvelopeStore.envelope.recipients\n .filter(recipient => recipient.role_name !== this.recipient.role_name)\n .map(otherRecipient => {\n const otherRoleIndex = getRoleIndex(EnvelopeStore.roleNames, otherRecipient.role_name);\n const recipientFields = otherRecipient.fields.filter(field => field.page === pageInfo.pageNumber);\n // const fields = this.fields.filter(field => field.page_sequence === pageInfo.renderedPage.pageNumber);\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, otherRoleIndex, {disabled: true, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n el.setAttribute('roleindex', otherRoleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n });\n });\n\n this.checkRecipientFields();\n }\n\n render() {\n if (EnvelopeStore.loading || !EnvelopeStore.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n const menuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing', disabled: true},\n {id: 'download', label: 'Download'},\n ];\n\n return (\n <Host class={{agreed: this.recipient?.agreed}}>\n {!this.isDone && !this.finishLater && <div class=\"intro\">Please review and act on these documents.</div>}\n\n <div class=\"header\">\n {!this.isDone && !this.finishLater && <verdocs-dropdown options={menuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />}\n\n {!this.recipient?.agreed ? (\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"I agree to use electronic records and signatures.\" onInput={() => this.handleClickAgree()} />\n </div>\n ) : (\n <Fragment>\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{EnvelopeStore.envelope.name}</div>\n <div style={{flex: '1'}} />\n <div innerHTML={PrintIcon} style={{width: '24px', height: '24px', fill: '#ffffff', cursor: 'pointer'}} onClick={() => window.print()} />\n <div\n innerHTML={DownloadIcon}\n style={{width: '24px', height: '24px', fill: '#ffffff', cursor: 'pointer', margin: '0 16px', maginRight: '30px'}}\n onClick={() => savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {})}\n />\n </Fragment>\n )}\n\n {!this.isDone && !this.finishLater && <verdocs-button size=\"small\" label={this.nextButtonLabel} disabled={!this.recipient?.agreed} onClick={() => this.handleNext()} />}\n </div>\n\n {!this.isDone && !this.recipient?.agreed ? <div class=\"cover\" /> : <div style={{display: 'none'}} />}\n\n <div class=\"document\">\n {(EnvelopeStore.envelope.documents || []).map(envelopeDocument => {\n const pages = [...(envelopeDocument?.pages || [])];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Fragment>\n {pages.map(page => (\n <verdocs-document-page\n pageImageUri={page.display_uri}\n virtualWidth={612}\n virtualHeight={792}\n pageNumber={page.sequence}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n ))}\n </Fragment>\n );\n })}\n </div>\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message=\"To complete the document, use the link in the original email notification inviting you to review and finish the document.\"\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.errorMessage && <verdocs-ok-dialog heading=\"Network Error\" message={this.errorMessage} onNext={() => (this.errorMessage = '')} />}\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message=\"You can access the Verdoc at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.\"\n onNext={() => (this.showDone = false)}\n />\n )}\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as m,h as a,H as r,a as b}from"./p-ff1278ed.js";import{t as g}from"./p-fcc3041d.js";import"./p-21603661.js";const t="verdocs-document-page{width:100%;position:relative}verdocs-document-page .verdocs-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-document-page .verdocs-document-page-layer.img{width:100%}";const s=class{constructor(a){e(this,a);this.pageRendered=m(this,"pageRendered",7);this.pageImageUri="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true}componentDidLoad(){this.resizeObserver=new ResizeObserver(g((e=>{for(const m of e){const e=m.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({container:this.container,containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const e=`${this.renderedHeight}px`;return a(r,{id:`${this.containerId}`,style:{height:e}},this.layers.map((m=>m.type==="div"?a("div",{class:"verdocs-document-page-layer",id:`${this.containerId}-${m.name}`,style:{height:e}}):a("img",{class:"verdocs-document-page-layer img",id:`${this.containerId}-${m.name}`,src:this.pageImageUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio}}))))}get container(){return b(this)}};s.style=t;const o="verdocs-loader{display:block;position:absolute;top:50%;left:50%;margin-left:-20px;margin-top:-20px;font-size:24px;width:24px;height:24px;border-radius:50%;text-indent:-9999em;-webkit-animation:load5 1.1s infinite ease;animation:verdocs-loader-kf 1.1s infinite ease;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes verdocs-loader-kf{0%,100%{-webkit-box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4)}12.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3)}25%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}37.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}50%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}62.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}75%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}87.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa;box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa}}@keyframes verdocs-loader-kf{0%,100%{-webkit-box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4)}12.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3)}25%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}37.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}50%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}62.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}75%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}87.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa;box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa}}";const i=class{constructor(m){e(this,m)}render(){return a(r,null)}};i.style=o;export{s as verdocs_document_page,i as verdocs_loader};
2
+ //# sourceMappingURL=p-f7a56f6c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/components/elements/verdocs-document-page/verdocs-document-page.scss?tag=verdocs-document-page","src/components/elements/verdocs-document-page/verdocs-document-page.tsx","src/components/controls/verdocs-loader/verdocs-loader.scss?tag=verdocs-loader","src/components/controls/verdocs-loader/verdocs-loader.tsx"],"names":["verdocsDocumentPageCss","VerdocsDocumentPage","name","type","Math","random","toString","substring","this","virtualWidth","virtualHeight","[object Object]","resizeObserver","ResizeObserver","throttle","entries","entry","renderedWidth","contentRect","width","renderedHeight","notifyRenderedSize","observe","container","_a","disconnect","skipFirstNotification","pageRendered","emit","containerId","pageNumber","naturalWidth","naturalHeight","aspectRatio","xScale","yScale","height","h","Host","id","style","layers","map","layer","class","src","pageImageUri","alt","aria-hidden","onLoad","e","target","verdocsLoaderCss","VerdocsLoader"],"mappings":"4HAAA,MAAMA,EAAyB,6SCgBlBC,EAAmB,4FAOC,mBAMF,oBAME,uBAMC,gBAcD,CAAC,CAACC,KAAM,OAAQC,KAAM,4BAO9B,yBAAyBC,KAAKC,SAASC,SAAS,IAAIC,UAAU,EAAG,yBAEvDC,KAAKC,iCACJD,KAAKE,gCACPF,KAAKC,gCACJD,KAAKE,+BACPF,KAAKC,aAAeD,KAAKE,yCAEvB,KAEjCC,mBACEH,KAAKI,eAAiB,IAAIC,eACxBC,GAASC,IACP,IAAK,MAAMC,KAASD,EAAS,CAC3B,MAAME,EAAgBD,EAAME,YAAYC,MACxCX,KAAKS,cAAgBA,EACrBT,KAAKY,eAAiBZ,KAAKE,eAAiBO,EAAgBT,KAAKC,cAGnED,KAAKa,uBACJ,MAGLb,KAAKI,eAAeU,QAAQd,KAAKe,WAGnCZ,8BACEa,EAAAhB,KAAKI,kBAAc,MAAAY,SAAA,OAAA,EAAAA,EAAEC,aASvBd,qBAGE,GAAIH,KAAKkB,sBAAuB,CAC9BlB,KAAKkB,sBAAwB,MAC7B,OAGFlB,KAAKmB,aAAaC,KAAK,CACrBL,UAAWf,KAAKe,UAChBM,YAAarB,KAAKqB,YAClBC,WAAYtB,KAAKsB,WACjBrB,aAAcD,KAAKC,aACnBC,cAAeF,KAAKE,cACpBO,cAAeT,KAAKS,cACpBG,eAAgBZ,KAAKY,eACrBW,aAAcvB,KAAKuB,aACnBC,cAAexB,KAAKwB,cACpBC,YAAazB,KAAKyB,YAClBC,OAAQ1B,KAAKS,cAAgBT,KAAKC,aAClC0B,OAAQ3B,KAAKY,eAAiBZ,KAAKE,gBAIvCC,SACE,MAAMyB,EAAS,GAAG5B,KAAKY,mBAEvB,OACEiB,EAACC,EAAI,CAACC,GAAI,GAAG/B,KAAKqB,cAAeW,MAAO,CAACJ,OAAAA,IACtC5B,KAAKiC,OAAOC,KAAIC,GACfA,EAAMxC,OAAS,MACbkC,EAAA,MAAA,CAAKO,MAAM,8BAA8BL,GAAI,GAAG/B,KAAKqB,eAAec,EAAMzC,OAAQsC,MAAO,CAACJ,OAAAA,KAE1FC,EAAA,MAAA,CACEO,MAAM,kCACNL,GAAI,GAAG/B,KAAKqB,eAAec,EAAMzC,OACjC2C,IAAKrC,KAAKsC,aACVC,IAAK,QAAQvC,KAAKsB,aAAYkB,cACjB,KACbC,OAASC,IAQP1C,KAAKuB,aAAemB,EAAEC,OAAOpB,aAC7BvB,KAAKwB,cAAgBkB,EAAEC,OAAOnB,cAC9BxB,KAAKyB,YAAczB,KAAKuB,aAAevB,KAAKwB,cAC5CxB,KAAKE,cAAgBF,KAAKC,aAAeD,KAAKyB,6DCpJ9D,MAAMmB,EAAmB,kqUCUZC,EAAa,+BACxB1C,SACE,OAAO0B,EAACC,EAAI","sourcesContent":["@import '../../../theme.scss';\n\nverdocs-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {throttle} from '../../../utils/utils';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-document-page',\n styleUrl: 'verdocs-document-page.scss',\n shadow: false,\n})\nexport class VerdocsDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The URL of the image to render as the page background.\n */\n @Prop() pageImageUri: string = '';\n\n /**\n * The page number being rendered. Not used internally, but included in callbacks/events beacuse page numbers\n * are used everywhere in document handling. (Reminder: page numbers are 1-based.)\n */\n @Prop() pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n\n @State() skipFirstNotification = true;\n\n componentDidLoad(): void {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n // Left here for documentation purposes in case we find an edge case where this isn't true. But we apparently don't need this.\n // When we add the resize observer it will always be triggered at least once so notifying here as well is just a dupe.\n // componentDidRender() {\n // this.notifyRenderedSize();\n // }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n this.pageRendered.emit({\n container: this.container,\n containerId: this.containerId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale: this.renderedWidth / this.virtualWidth,\n yScale: this.renderedHeight / this.virtualHeight,\n });\n }\n\n render() {\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : (\n <img\n class=\"verdocs-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageImageUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n }}\n />\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-loader {\n display: block;\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -20px;\n margin-top: -20px;\n font-size: 24px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n text-indent: -9999em;\n -webkit-animation: load5 1.1s infinite ease;\n animation: verdocs-loader-kf 1.1s infinite ease;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n}\n\n@keyframes verdocs-loader-kf {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em $verdocs-bg-2, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em $verdocs-bg-2, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em $verdocs-bg-2, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em $verdocs-bg-2,\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4),\n 0em 2.5em 0 0em $verdocs-bg-2, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em $verdocs-bg-2, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em $verdocs-bg-2, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em $verdocs-bg-2;\n }\n}\n","import {Component, h, Host} from '@stencil/core';\n\n/**\n * Animated loader placeholder. There are currently no configuration options for this control.\n */\n@Component({\n tag: 'verdocs-loader',\n styleUrl: 'verdocs-loader.scss',\n shadow: false,\n})\nexport class VerdocsLoader {\n render() {\n return <Host />;\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{p as e,b as d}from"./p-ff1278ed.js";const i=()=>{const d=import.meta.url;const i={};if(d!==""){i.resourcesUrl=new URL(".",d).href}return e(i)};i().then((e=>d([["p-08110f98",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-7ffe3227",[[0,"verdocs-sign",{envelopeId:[1,"envelope-id"],roleId:[1,"role-id"],inviteCode:[1,"invite-code"],recipient:[32],signerToken:[32],hasSignature:[32],nextButtonLabel:[32],nextSubmits:[32],errorMessage:[32],focusedField:[32],isDone:[32],showDone:[32],finishLater:[32],showFinishLater:[32]}]]],["p-7421e32e",[[0,"verdocs-field-initial",{field:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],done:[4],roleindex:[2],tempInitials:[32],focusField:[64]}]]],["p-a9413269",[[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],isAuthenticated:[32],displayMode:[32],username:[32],password:[32],loggingIn:[32],activeSession:[32],loginError:[32]}]]],["p-3622cb3c",[[0,"verdocs-field-date",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],containerId:[32],focusField:[64]}]]],["p-4f3b1c7c",[[0,"verdocs-field-textarea",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64]}]]],["p-4e775928",[[0,"verdocs-field-textbox",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64]}]]],["p-6524809d",[[0,"verdocs-field-timestamp",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64]}]]],["p-8251b9eb",[[0,"verdocs-search",{endpoint:[16]}]]],["p-d4afe7a5",[[0,"verdocs-send",{endpoint:[16],templateId:[1,"template-id"],template:[32],pdfUrl:[32],containerId:[32],rolesAtLevel:[32],showPickerForId:[32],sessionContacts:[32],recipientsAssigned:[32]}]]],["p-d48d78a2",[[0,"verdocs-field-attachment",{field:[16],disabled:[4],roleIndex:[2,"role-index"],focusField:[64]}]]],["p-19435eaf",[[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"]}]]],["p-4e1fc08d",[[0,"verdocs-view",{endpoint:[16],envelopeId:[1,"envelope-id"]}]]],["p-ce27dc71",[[0,"verdocs-kba-dialog",{step:[2],steps:[2],helptitle:[1],helptext:[1],mode:[1],label:[1],placeholder:[1],choices:[16],response:[32]}]]],["p-d5af4c62",[[0,"verdocs-field-checkbox",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2]}]]],["p-38d5bc9e",[[0,"verdocs-field-dropdown",{field:[16],disabled:[4],roleindex:[2],focusField:[64]}]]],["p-0126c601",[[0,"verdocs-field-payment",{field:[16],disabled:[4],fields:[16],pageNum:[2,"page-num"],roleName:[1,"role-name"],fieldId:[1,"field-id"],recipients:[8],selectedRoleName:[1,"selected-role-name"],pdfPages:[16],currentSignature:[1,"current-signature"],currentSignatureId:[1,"current-signature-id"],currentInitial:[1,"current-initial"],currentInitialId:[1,"current-initial-id"],focused:[4],signed:[4],roleindex:[2],preparedMessage:[32],signatureUrl:[32]}]]],["p-d5c00a37",[[0,"verdocs-field-radio-button",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2]}]]],["p-b10f26f2",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-10911fd8",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-fd0a605f",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],envelope:[16],isOpen:[32],recipientStatusIcons:[32],containerId:[32]}]]],["p-554856fb",[[0,"verdocs-template-card",{template:[16]}]]],["p-7cf75533",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-5bfc608d",[[0,"verdocs-toggle",{options:[16],theme:[1],selectedOption:[32]}]]],["p-71de4718",[[0,"verdocs-contact-picker",{endpoint:[16],templateRole:[16],contactSuggestions:[16],name:[32],email:[32],phone:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32]}]]],["p-c132d66e",[[0,"verdocs-initial-dialog",{initials:[1],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-d5f48c21",[[0,"verdocs-upload-dialog",{draggingOver:[32],decodedFiles:[32]}]]],["p-05433ef8",[[0,"verdocs-dropdown",{options:[16],open:[32]}]]],["p-d774ad24",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],showCancel:[4,"show-cancel"]}]]],["p-3e76685d",[[0,"verdocs-toggle-button",{active:[4],icon:[1],label:[1],size:[1],_active:[32]}]]],["p-27f3e394",[[0,"verdocs-quick-functions",{endpoint:[16]}],[0,"verdocs-search-activity",{endpoint:[16],type:[1],options:[8],emptyMessage:[32],authFailure:[32],title:[32],recent:[32],saved:[32],starred:[32]}],[0,"verdocs-search-box",{endpoint:[16],placeholder:[1],type:[1],query:[1],grabsFocus:[4,"grabs-focus"],focusField:[64]}]]],["p-3bc9be49",[[0,"verdocs-checkbox",{checked:[4],name:[1],label:[1],value:[1],theme:[1],disabled:[4]}]]],["p-202a569e",[[0,"verdocs-radio-button",{checked:[4],name:[1],value:[1],disabled:[4]}]]],["p-5e6134d8",[[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-8ef53023",[[0,"verdocs-template-sender-dialog",{value:[1],newValue:[32]}],[0,"verdocs-help-icon",{text:[1],containerId:[32]}]]],["p-fa25cd77",[[0,"verdocs-field-signature",{field:[16],name:[1],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],tempSignature:[32],focusField:[64]}],[0,"verdocs-toolbar-icon",{text:[1],icon:[1],containerId:[32]}],[0,"verdocs-signature-dialog",{name:[1],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-e76b4d24",[[0,"verdocs-document-page",{pageImageUri:[1,"page-image-uri"],pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[2,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32]}],[0,"verdocs-loader"]]],["p-c2ad9de3",[[4,"verdocs-button-panel",{icon:[1]}],[0,"verdocs-select-input",{value:[1],label:[1],options:[16],disabled:[4]}],[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],type:[1],disabled:[4]}]]],["p-958a833f",[[0,"verdocs-template-fields",{endpoint:[16],templateId:[1,"template-id"]}],[0,"verdocs-template-properties",{endpoint:[16],templateId:[1,"template-id"],template:[32],name:[32],visibility:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32]}],[0,"verdocs-template-recipients",{endpoint:[16],templateRole:[16],contactSuggestions:[16],name:[32],email:[32],phone:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32],sender:[32],showingSenderDialog:[32],orderedRoles:[32]}],[0,"verdocs-template-create",{endpoint:[16],file:[32]}]]]],e)));
1
+ import{p as e,b as d}from"./p-ff1278ed.js";const i=()=>{const d=import.meta.url;const i={};if(d!==""){i.resourcesUrl=new URL(".",d).href}return e(i)};i().then((e=>d([["p-08110f98",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-e3811c48",[[0,"verdocs-sign",{envelopeId:[1,"envelope-id"],roleId:[1,"role-id"],inviteCode:[1,"invite-code"],recipient:[32],signerToken:[32],hasSignature:[32],nextButtonLabel:[32],nextSubmits:[32],errorMessage:[32],focusedField:[32],isDone:[32],showDone:[32],finishLater:[32],showFinishLater:[32]}]]],["p-7421e32e",[[0,"verdocs-field-initial",{field:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],done:[4],roleindex:[2],tempInitials:[32],focusField:[64]}]]],["p-a9413269",[[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],isAuthenticated:[32],displayMode:[32],username:[32],password:[32],loggingIn:[32],activeSession:[32],loginError:[32]}]]],["p-3622cb3c",[[0,"verdocs-field-date",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],containerId:[32],focusField:[64]}]]],["p-4f3b1c7c",[[0,"verdocs-field-textarea",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64]}]]],["p-4e775928",[[0,"verdocs-field-textbox",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64]}]]],["p-6524809d",[[0,"verdocs-field-timestamp",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],focusField:[64]}]]],["p-8251b9eb",[[0,"verdocs-search",{endpoint:[16]}]]],["p-d4afe7a5",[[0,"verdocs-send",{endpoint:[16],templateId:[1,"template-id"],template:[32],pdfUrl:[32],containerId:[32],rolesAtLevel:[32],showPickerForId:[32],sessionContacts:[32],recipientsAssigned:[32]}]]],["p-d48d78a2",[[0,"verdocs-field-attachment",{field:[16],disabled:[4],roleIndex:[2,"role-index"],focusField:[64]}]]],["p-19435eaf",[[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"]}]]],["p-4e1fc08d",[[0,"verdocs-view",{endpoint:[16],envelopeId:[1,"envelope-id"]}]]],["p-ce27dc71",[[0,"verdocs-kba-dialog",{step:[2],steps:[2],helptitle:[1],helptext:[1],mode:[1],label:[1],placeholder:[1],choices:[16],response:[32]}]]],["p-d5af4c62",[[0,"verdocs-field-checkbox",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2]}]]],["p-38d5bc9e",[[0,"verdocs-field-dropdown",{field:[16],disabled:[4],roleindex:[2],focusField:[64]}]]],["p-0126c601",[[0,"verdocs-field-payment",{field:[16],disabled:[4],fields:[16],pageNum:[2,"page-num"],roleName:[1,"role-name"],fieldId:[1,"field-id"],recipients:[8],selectedRoleName:[1,"selected-role-name"],pdfPages:[16],currentSignature:[1,"current-signature"],currentSignatureId:[1,"current-signature-id"],currentInitial:[1,"current-initial"],currentInitialId:[1,"current-initial-id"],focused:[4],signed:[4],roleindex:[2],preparedMessage:[32],signatureUrl:[32]}]]],["p-d5c00a37",[[0,"verdocs-field-radio-button",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2]}]]],["p-b10f26f2",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-10911fd8",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-fd0a605f",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],envelope:[16],isOpen:[32],recipientStatusIcons:[32],containerId:[32]}]]],["p-554856fb",[[0,"verdocs-template-card",{template:[16]}]]],["p-7cf75533",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-5bfc608d",[[0,"verdocs-toggle",{options:[16],theme:[1],selectedOption:[32]}]]],["p-71de4718",[[0,"verdocs-contact-picker",{endpoint:[16],templateRole:[16],contactSuggestions:[16],name:[32],email:[32],phone:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32]}]]],["p-c132d66e",[[0,"verdocs-initial-dialog",{initials:[1],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-d5f48c21",[[0,"verdocs-upload-dialog",{draggingOver:[32],decodedFiles:[32]}]]],["p-05433ef8",[[0,"verdocs-dropdown",{options:[16],open:[32]}]]],["p-d774ad24",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],showCancel:[4,"show-cancel"]}]]],["p-3e76685d",[[0,"verdocs-toggle-button",{active:[4],icon:[1],label:[1],size:[1],_active:[32]}]]],["p-27f3e394",[[0,"verdocs-quick-functions",{endpoint:[16]}],[0,"verdocs-search-activity",{endpoint:[16],type:[1],options:[8],emptyMessage:[32],authFailure:[32],title:[32],recent:[32],saved:[32],starred:[32]}],[0,"verdocs-search-box",{endpoint:[16],placeholder:[1],type:[1],query:[1],grabsFocus:[4,"grabs-focus"],focusField:[64]}]]],["p-3bc9be49",[[0,"verdocs-checkbox",{checked:[4],name:[1],label:[1],value:[1],theme:[1],disabled:[4]}]]],["p-202a569e",[[0,"verdocs-radio-button",{checked:[4],name:[1],value:[1],disabled:[4]}]]],["p-5e6134d8",[[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-8ef53023",[[0,"verdocs-template-sender-dialog",{value:[1],newValue:[32]}],[0,"verdocs-help-icon",{text:[1],containerId:[32]}]]],["p-fa25cd77",[[0,"verdocs-field-signature",{field:[16],name:[1],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],tempSignature:[32],focusField:[64]}],[0,"verdocs-toolbar-icon",{text:[1],icon:[1],containerId:[32]}],[0,"verdocs-signature-dialog",{name:[1],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-f7a56f6c",[[0,"verdocs-document-page",{pageImageUri:[1,"page-image-uri"],pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[2,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32]}],[0,"verdocs-loader"]]],["p-c2ad9de3",[[4,"verdocs-button-panel",{icon:[1]}],[0,"verdocs-select-input",{value:[1],label:[1],options:[16],disabled:[4]}],[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],type:[1],disabled:[4]}]]],["p-958a833f",[[0,"verdocs-template-fields",{endpoint:[16],templateId:[1,"template-id"]}],[0,"verdocs-template-properties",{endpoint:[16],templateId:[1,"template-id"],template:[32],name:[32],visibility:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32]}],[0,"verdocs-template-recipients",{endpoint:[16],templateRole:[16],contactSuggestions:[16],name:[32],email:[32],phone:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32],sender:[32],showingSenderDialog:[32],orderedRoles:[32]}],[0,"verdocs-template-create",{endpoint:[16],file:[32]}]]]],e)));
2
2
  //# sourceMappingURL=verdocs-web-sdk.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/web-sdk",
3
- "version": "1.9.23",
3
+ "version": "1.9.25",
4
4
  "private": false,
5
5
  "description": "Verdocs Web SDK",
6
6
  "license": "MIT",
@@ -1,2 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i<r;i++){if(o||!(i in t)){if(!o)o=Array.prototype.slice.call(t,0,i);o[i]=t[i]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-97329951.system.js","./p-78f5c8ad.system.js","./p-a7433630.system.js","./p-7efdefa3.system.js","./p-cf1ed6b8.system.js","./p-89641895.system.js","./p-187b20b7.system.js","./p-af2c2f79.system.js","./p-0f6da8c7.system.js"],(function(e){"use strict";var t,n,i,r,o,s,a,l,d,c,u,p,h,f,v,g,m,x,b,y;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H;o=e.F},function(e){s=e.b;a=e.s;l=e.u;d=e.c;c=e.d;u=e.f;p=e.a;h=e.r;f=e.e},function(){},function(e){v=e.a;g=e.i},function(e){m=e.V},function(e){x=e.g;b=e.s},function(e){y=e.S},function(){},function(){}],execute:function(){var w=undefined&&undefined.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var k=undefined&&undefined.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var I=function(e,t,n,i){return w(void 0,void 0,void 0,(function(){return k(this,(function(r){return[2,e.api.put("/envelopes/".concat(t,"/recipients/").concat(n),i).then((function(e){return e.data}))]}))}))};var _=function(e,t,n){return I(e,t,n,{action:"submit"})};var S=function(e,t,n){return I(e,t,n,{action:"decline"})};var F=function(e,t,n,i){return I(e,t,n,{action:"update",agreed:i})};var L=function(e,t,n){var i=new FormData;i.append("signature",n,t);return e.api.post("/signatures",i).then((function(e){return e.data}))};var N=function(e,t,n){var i=new FormData;i.append("initial",n,t);return e.api.post("/initials",i).then((function(e){return e.data}))};var A='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex-align:center;align-items:center;-webkit-transition:all 0.25s;transition:all 0.25s;-ms-flex-pack:center;justify-content:center;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .inner{width:100%;max-width:1028px}verdocs-sign .intro{width:100%;height:60px;display:-ms-flexbox;display:flex;background:#ffffff;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .intro .inner{width:100%;color:#111111;padding:0 14px;font-size:20px;font-weight:500;line-height:28px;max-width:1024px}verdocs-sign .toolbar{width:100%;margin:0 auto;padding:0 14px;position:relative}verdocs-sign .tools{width:100%;color:#fff;height:56px;display:-ms-flexbox;display:flex;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;background-color:#33354c}verdocs-sign .tools .logo{width:77.5px;margin:-6px 0 0 5px}verdocs-sign .tools .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign .document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-sign .document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}';var D='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"></path></svg>';var C='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"></path></svg>';var z=e("verdocs_sign",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.envelopeLoaded=n(this,"envelopeLoaded",7);this.envelopeUpdated=n(this,"envelopeUpdated",7);this.endpoint=null;this.recipientIndex=-1;this.fields=[];this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.recipient=null;this.signerToken=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.errorMessage="";this.focusedField="";this.isDone=false;this.showDone=false;this.finishLater=false;this.showFinishLater=false}e.prototype.componentWillLoad=function(){this.endpoint=new m({sessionType:"signing"})};e.prototype.componentDidLoad=function(){return w(this,void 0,void 0,(function(){var e,t,n,i,r,o,a,l,d,c,u,p;var h=this;return k(this,(function(f){switch(f.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new y("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new y("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(n=this.sdkError)===null||n===void 0?void 0:n.emit(new y("[SIGN] Missing required inviteCode",500,""));return[2]}f.label=1;case 1:f.trys.push([1,4,,5]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,s(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode})];case 2:l=f.sent(),d=l.session,c=l.recipient,u=l.signerToken;console.log("[SIGN] Loaded signing session ".concat(d.email," / ").concat(d.profile_id));this.recipient=c;this.signerToken=u;this.endpoint.setToken(u);if(this.recipient.agreed){this.nextButtonLabel="Next"}return[4,x(this.endpoint,this.envelopeId)];case 3:f.sent();this.recipientIndex=b.envelope.recipients.findIndex((function(e){return e.role_name==h.roleId}));if(this.recipientIndex>-1){this.recipient=b.envelope.recipients[this.recipientIndex];this.fields=this.recipient.fields}this.isDone=["submitted","canceled","declined"].includes(this.recipient.status);console.log("Done",this.isDone);(i=this.envelopeLoaded)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:b.envelope});return[3,5];case 4:p=f.sent();console.log("Error with signing session",p);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new y(p.message,(o=p.response)===null||o===void 0?void 0:o.status,(a=p.response)===null||a===void 0?void 0:a.data));return[3,5];case 5:return[2]}}))}))};e.prototype.handleClickAgree=function(){var e=this;F(this.endpoint,this.envelopeId,this.roleId,true).then((function(t){var n;e.nextButtonLabel="Next";e.recipient=t;(n=e.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,envelope:b.envelope,event:"agreed"})})).catch((function(t){var n,i,r;console.log("Update failure",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new y(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(r=t.response)===null||r===void 0?void 0:r.data))}))};e.prototype.handleOptionSelected=function(e){return w(this,void 0,void 0,(function(){var t,n;return k(this,(function(i){switch(i.label){case 0:t=e.detail.id;switch(t){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;return[3,7];case 2:return[3,7];case 3:return[4,S(this.endpoint,this.envelopeId,this.roleId)];case 4:n=i.sent();console.log("Decline result",n);this.isDone=true;return[3,7];case 5:window.print();return[3,7];case 6:a(this.endpoint,b.envelope,b.envelope.envelope_document_id).catch((function(){}));return[3,7];case 7:return[2]}}))}))};e.prototype.saveFieldChange=function(e,t){var n=this;l(this.endpoint,this.envelopeId,e,t).catch((function(e){var t,i,r,o,s,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((r=(i=e.response)===null||i===void 0?void 0:i.data)===null||r===void 0?void 0:r.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.errorMessage="Signing session expired."}else{console.log("[SIGN] Server error",e)}(o=n.sdkError)===null||o===void 0?void 0:o.emit(new y(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return w(this,void 0,void 0,(function(){var n,i,r,o,s,s,a,l,u;var p=this;return k(this,(function(h){switch(h.label){case 0:console.log("fieldChange",e,t,t.target.value);n=t.target,i=n.value,r=n.checked;o=e.type;switch(o){case"textbox":return[3,1];case"checkbox_group":return[3,2];case"radio_button_group":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:i})];case 2:{s=e.settings.options.map((function(e){return{id:e.id,checked:t.target.checked}}));return[2,this.saveFieldChange(e.name,{prepared:false,value:{options:s}})]}h.label=3;case 3:{s=e.settings.options.map((function(e){return{id:e.id,selected:t.target.value===e.id}}));return[2,this.saveFieldChange(e.name,{prepared:false,value:{options:s}})]}h.label=4;case 4:return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:return[4,fetch(t.detail)];case 6:return[4,h.sent().blob()];case 7:a=h.sent();return[2,N(this.endpoint,"initial",a).then((function(t){console.log("New initials",e.name,t);c(p.endpoint,p.envelopeId,e.name,t.id)}))];case 8:return[4,fetch(t.detail)];case 9:return[4,h.sent().blob()];case 10:l=h.sent();return[2,L(this.endpoint,"signature",l).then((function(t){console.log("New sign",e.name,t);d(p.endpoint,p.envelopeId,e.name,t.id)}))];case 11:u=t.target.getAttribute("iso");return[2,this.saveFieldChange(e.name,{prepared:false,value:u})];case 12:console.log("Updating timestamp",{value:i,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("Unhandled field update",{value:i,checked:r},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldValid=function(e){var t,n,i,r,o,s,a;var l=e.required,d=l===void 0?false:l;var c=e.settings||{},u=c.result,p=u===void 0?"":u,h=c.value,f=h===void 0?"":h,m=c.base64,x=m===void 0?"":m;switch(e.type){case"textbox":switch(((t=e.settings)===null||t===void 0?void 0:t.validator)||""){case"email":return g(p);case"phone":return v(p);default:return!d||p!==""}case"signature":case"initial":return!d||x!=="";case"timestamp":return true;case"textarea":case"date":case"attachment":return!d||p!=="";case"dropdown":return!d||f!=="";case"checkbox_group":var b=(((i=(n=e.settings)===null||n===void 0?void 0:n.options)===null||i===void 0?void 0:i.filter((function(e){return e.checked})))||[]).length;return!d||b>=(((r=e.settings)===null||r===void 0?void 0:r.minimum_checked)||0)&&b<=(((o=e.settings)===null||o===void 0?void 0:o.maximum_checked)||999);case"radio_button_group":return!d||(((a=(s=e.settings)===null||s===void 0?void 0:s.options)===null||a===void 0?void 0:a.filter((function(e){return e.selected})))||[]).length>0;default:return false}};e.prototype.handleNext=function(){return w(this,void 0,void 0,(function(){var e,t,n,i,r,o,s,a,l,d;var c=this;return k(this,(function(u){switch(u.label){case 0:if(!this.nextSubmits)return[3,5];u.label=1;case 1:u.trys.push([1,3,,4]);return[4,_(this.endpoint,this.envelopeId,this.roleId)];case 2:t=u.sent();console.log("[SIGN] Submitted successfully",t);this.showDone=true;this.isDone=true;return[3,4];case 3:n=u.sent();console.log("Error submitting",n);return[3,4];case 4:return[2];case 5:i=this.fields.filter((function(e){return e.required}));r=i.findIndex((function(e){return e.name===c.focusedField}));o=r+1;if(o>=i.length){o=0}s=i[o];a=0;if(a<i.length&&["signature","initial"].includes(s.type)&&((e=s.settings)===null||e===void 0?void 0:e.result)==="signed"){a++;o++;if(o>=i.length){o=0}s=i[o]}if(a>=i.length){s=null}if(s){l=f(s);d=document.getElementById(l);d===null||d===void 0?void 0:d.focusField();this.focusedField=s.name}return[2]}}))}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.recipient.fields.map((function(t){return e.isFieldValid(t)})).some((function(e){return!e}));if(!t){this.nextButtonLabel="Finish";this.nextSubmits=true}else{this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,n,i){var r=this;var o;i.addEventListener("input",(function(e){return r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}));i.addEventListener("fieldChange",(function(e){return r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}));i.setAttribute("roleindex",n);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);i.setAttribute("initials",this.recipient?u(this.recipient.full_name):"");i.setAttribute("name",((o=this.recipient)===null||o===void 0?void 0:o.full_name)||"")};e.prototype.handlePageRendered=function(e){var t=this;var n=e.detail;var i=p(b.roleNames,this.recipient.role_name);var r=this.recipient.fields.filter((function(e){return e.page===n.pageNumber}));console.log("[SIGN] Page rendered, updating fields",{pageInfo:n,roleIndex:i,recipientFields:r});r.forEach((function(e){var r=h(e,n,i,{disabled:false,editable:false,draggable:false,done:t.isDone});if(!r){return}if(Array.isArray(r)){r.map((function(r){return t.attachFieldAttributes(n,e,i,r)}))}else{t.attachFieldAttributes(n,e,i,r)}}));b.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name})).map((function(e){var i=p(b.roleNames,e.role_name);var r=e.fields.filter((function(e){return e.page===n.pageNumber}));r.forEach((function(e){var r=h(e,n,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!r){return}r.setAttribute("roleindex",i);r.setAttribute("xScale",n.xScale);r.setAttribute("yScale",n.yScale)}))}));this.checkRecipientFields()};e.prototype.render=function(){var e=this;var t,n,s,l;if(b.loading||!b.envelope){return i(r,null,i("verdocs-loader",null))}var d=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing",disabled:true},{id:"download",label:"Download"}];return i(r,{class:{agreed:(t=this.recipient)===null||t===void 0?void 0:t.agreed}},!this.isDone&&!this.finishLater&&i("div",{class:"intro"},i("div",{class:"inner"},"Please review and act on these documents.")),i("div",{class:"header"},i("div",{class:"inner"},i("div",{class:"toolbar"},i("div",{class:"tools"},!this.isDone&&!this.finishLater&&i("verdocs-dropdown",{options:d,onOptionSelected:function(t){return e.handleOptionSelected(t)}}),!((n=this.recipient)===null||n===void 0?void 0:n.agreed)?i("div",{class:"agree"},i("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:function(){return e.handleClickAgree()}})):i(o,null,i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},b.envelope.name),i("div",{style:{flex:"1"}}),i("div",{innerHTML:D,style:{width:"24px",height:"24px",fill:"#ffffff",cursor:"pointer"},onClick:function(){return window.print()}}),i("div",{innerHTML:C,style:{width:"24px",height:"24px",fill:"#ffffff",cursor:"pointer",marginLeft:"16px",maginRight:"30px"},onClick:function(){return a(e.endpoint,b.envelope,b.envelope.envelope_document_id).catch((function(){}))}})),!this.isDone&&!this.finishLater&&i("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!((s=this.recipient)===null||s===void 0?void 0:s.agreed),onClick:function(){return e.handleNext()}}))))),!this.isDone&&!((l=this.recipient)===null||l===void 0?void 0:l.agreed)?i("div",{class:"cover"}):i("div",{style:{display:"none"}}),i("div",{class:"document"},(b.envelope.documents||[]).map((function(t){var n=__spreadArray([],(t===null||t===void 0?void 0:t.pages)||[],true);n.sort((function(e,t){return e.sequence-t.sequence}));return i(o,null,n.map((function(t){return i("verdocs-document-page",{pageImageUri:t.display_uri,virtualWidth:612,virtualHeight:792,pageNumber:t.sequence,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&i("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the document, use the link in the original email notification inviting you to review and finish the document.",onNext:function(){return e.showFinishLater=false}}),this.errorMessage&&i("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}),this.showDone&&i("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the Verdoc at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.",onNext:function(){return e.showDone=false}}))};return e}());z.style=A}}}));
2
- //# sourceMappingURL=p-0d775f91.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["node_modules/@verdocs/js-sdk/Envelopes/Recipients.js","node_modules/@verdocs/js-sdk/Envelopes/Signatures.js","node_modules/@verdocs/js-sdk/Envelopes/Initials.js","src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"names":["__awaiter","this","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","apply","__generator","body","_","label","sent","t","trys","ops","f","y","g","verb","throw","return","Symbol","iterator","n","v","op","TypeError","call","pop","length","push","updateRecipient","endpoint","envelopeId","roleName","params","_a","api","put","concat","r","data","envelopeRecipientSubmit","action","envelopeRecipientDecline","envelopeRecipientAgree","agreed","createSignature","name","signature","FormData","append","post","createInitials","initials","verdocsSignCss","PrintIcon","DownloadIcon","VerdocsSign","exports","recipientIndex","fields","class_1","prototype","componentWillLoad","VerdocsEndpoint","sessionType","componentDidLoad","sdkError","emit","SDKError","roleId","_b","inviteCode","_c","console","log","Envelopes.getSigningSession","_h","_j","session","recipient","signerToken","email","profile_id","setToken","nextButtonLabel","getEnvelopeById","EnvelopeStore","envelope","recipients","findIndex","role_name","_this","isDone","includes","status","_d","envelopeLoaded","e_1","_e","message","_f","response","_g","handleClickAgree","envelopeUpdated","event","catch","handleOptionSelected","detail","id","finishLater","showFinishLater","declineResult","window","print","savePDF","envelope_document_id","saveFieldChange","fieldName","Envelopes.updateEnvelopeField","error","errorMessage","handleFieldChange","field","target","checked","type","prepared","options","settings","map","option","selected","fetch","_k","blob","initialsBlob","newInitials","updateEnvelopeFieldInitials","signatureBlob","newSignature","updateEnvelopeFieldSignature","iso","getAttribute","ts","isFieldValid","required","_l","_m","base64","validator","isValidEmail","isValidPhone","checkedCount","filter","minimum_checked","maximum_checked","handleNext","nextSubmits","showDone","e_2","requiredFields","focusedIndex","focusedField","nextFocusedIndex","nextRequiredField","skips","getFieldId","el","document","getElementById","focusField","checkRecipientFields","someFieldsInvalid","some","fieldValid","attachFieldAttributes","pageInfo","roleIndex","addEventListener","finally","setAttribute","xScale","yScale","fullNameToInitials","full_name","handlePageRendered","getRoleIndex","roleNames","recipientFields","page","pageNumber","forEach","renderDocumentField","disabled","editable","draggable","Array","isArray","otherRecipient","otherRoleIndex","render","loading","h","Host","menuOptions","class","onOptionSelected","onInput","Fragment","src","alt","style","flex","innerHTML","width","height","fill","cursor","onClick","marginLeft","maginRight","size","display","documents","envelopeDocument","pages","__spreadArray","sort","a","b","sequence","pageImageUri","display_uri","virtualWidth","virtualHeight","onPageRendered","layers","heading","onNext"],"mappings":"qvEAAA,IAAIA,EAAaC,WAAQA,UAAKD,WAAc,SAAUE,EAASC,EAAYC,EAAGC,GAC1E,SAASC,EAAMC,GAAS,OAAOA,aAAiBH,EAAIG,EAAQ,IAAIH,GAAE,SAAUI,GAAWA,EAAQD,MAC/F,OAAO,IAAKH,IAAMA,EAAIK,WAAU,SAAUD,EAASE,GAC/C,SAASC,EAAUJ,GAAS,IAAMK,EAAKP,EAAUQ,KAAKN,IAAW,MAAOO,GAAKJ,EAAOI,IACpF,SAASC,EAASR,GAAS,IAAMK,EAAKP,EAAU,SAASE,IAAW,MAAOO,GAAKJ,EAAOI,IACvF,SAASF,EAAKI,GAAUA,EAAOC,KAAOT,EAAQQ,EAAOT,OAASD,EAAMU,EAAOT,OAAOW,KAAKP,EAAWI,GAClGH,GAAMP,EAAYA,EAAUc,MAAMjB,EAASC,GAAc,KAAKU,YAGtE,IAAIO,EAAenB,WAAQA,UAAKmB,aAAgB,SAAUlB,EAASmB,GAC/D,IAAIC,EAAI,CAAEC,MAAO,EAAGC,KAAM,WAAa,GAAIC,EAAE,GAAK,EAAG,MAAMA,EAAE,GAAI,OAAOA,EAAE,IAAOC,KAAM,GAAIC,IAAK,IAAMC,EAAGC,EAAGJ,EAAGK,EAC/G,OAAOA,EAAI,CAAEjB,KAAMkB,EAAK,GAAIC,MAASD,EAAK,GAAIE,OAAUF,EAAK,WAAaG,SAAW,aAAeJ,EAAEI,OAAOC,UAAY,WAAa,OAAOlC,OAAU6B,EACvJ,SAASC,EAAKK,GAAK,OAAO,SAAUC,GAAK,OAAOzB,EAAK,CAACwB,EAAGC,KACzD,SAASzB,EAAK0B,GACV,GAAIV,EAAG,MAAM,IAAIW,UAAU,mCAC3B,MAAOjB,MACH,GAAIM,EAAI,EAAGC,IAAMJ,EAA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,MAAM,UAAaH,EAAA,MAAA,CAAKS,MAAO,CAACW,QAAS,UAEzFpB,EAAA,MAAA,CAAKG,MAAM,aACPxH,EAAcC,SAASyI,WAAa,IAAI9F,KAAI,SAAA+F,GAC5C,IAAMC,EAAKC,cAAA,IAAQF,IAAgB,MAAhBA,SAAgB,OAAA,EAAhBA,EAAkBC,QAAS,GAAG,MACjDA,EAAME,MAAK,SAACC,EAAGC,GAAM,OAAAD,EAAEE,SAAWD,EAAEC,YAEpC,OACE5B,EAACM,EAAQ,KACNiB,EAAMhG,KAAI,SAAA4D,GAAI,OACba,EAAA,wBAAA,CACE6B,aAAc1C,EAAK2C,YACnBC,aAAc,IACdC,cAAe,IACf5C,WAAYD,EAAKyC,SACjBK,eAAgB,SAAA7O,GAAK,OAAA4F,EAAK+F,mBAAmB3L,IAC7C8O,OAAQ,CACN,CAAC/L,KAAM,OAAQgF,KAAM,UACrB,CAAChF,KAAM,WAAYgF,KAAM,kBAStC5I,KAAK6H,iBACJ4F,EAAA,oBAAA,CACEmC,QAAQ,8CACR3I,QAAQ,4HACR4I,OAAQ,WAAA,OAAOpJ,EAAKoB,gBAAkB,SAIzC7H,KAAKuI,cAAgBkF,EAAA,oBAAA,CAAmBmC,QAAQ,gBAAgB3I,QAASjH,KAAKuI,aAAcsH,OAAQ,WAAA,OAAOpJ,EAAK8B,aAAe,MAC/HvI,KAAK6K,UACJ4C,EAAA,oBAAA,CACEmC,QAAQ,eACR3I,QAAQ,wOACR4I,OAAQ,WAAA,OAAOpJ,EAAKoE,SAAW,oBA5fnB","sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/**\n * Update a recipient's status block\n */\nexport var updateRecipient = function (endpoint, envelopeId, roleName, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(roleName), params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.\n */\nexport var envelopeRecipientSubmit = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'submit' });\n};\n/**\n * Decline to complete an envelope (signing will not terminated).\n */\nexport var envelopeRecipientDecline = function (endpoint, envelopeId, roleName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'decline' });\n};\n/**\n * Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.\n */\nexport var envelopeRecipientChangeOwner = function (endpoint, envelopeId, roleName, email, fullName) { return updateRecipient(endpoint, envelopeId, roleName, { action: 'owner_update', email: email, full_name: fullName }); };\n/**\n * Agree to electronic signing.\n */\nexport var envelopeRecipientAgree = function (endpoint, envelopeId, roleName, agreed) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', agreed: agreed });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientUpdateName = function (endpoint, envelopeId, roleName, fullName) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'update', new_full_name: fullName });\n};\n/**\n * Change a recipient's name.\n */\nexport var envelopeRecipientPrepare = function (endpoint, envelopeId, roleName, recipients) {\n return updateRecipient(endpoint, envelopeId, roleName, { action: 'prepare', recipients: recipients });\n};\nexport var getSignerToken = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"/signer-token\"))\n .then(function (r) { return r.data; });\n};\nexport var getInPersonLink = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"?in_person_link=true\"))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create a signature block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to\n * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field\n * to be \"stamped\" by the user.\n */\nexport var createSignature = function (endpoint, name, signature) {\n var data = new FormData();\n data.append('signature', signature, name);\n return endpoint.api //\n .post(\"/signatures\", data)\n .then(function (r) { return r.data; });\n};\n/**\n * Get the availbable signatures for a user.\n */\nexport var getSignatures = function (endpoint) {\n return endpoint.api //\n .get('/signatures')\n .then(function (r) { return r.data; });\n};\n/**\n * Get a user's signature by ID.\n */\nexport var getSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .get(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n/**\n * Delete a user's signature.\n */\nexport var deleteSignature = function (endpoint, signatureId) {\n return endpoint.api //\n .delete(\"/signatures/\".concat(signatureId))\n .then(function (r) { return r.data; });\n};\n","/**\n * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to \"adopt\"\n * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to\n * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field\n * to be \"stamped\" by the user.\n */\nexport var createInitials = function (endpoint, name, initials) {\n var data = new FormData();\n data.append('initial', initials, name);\n return endpoint.api //\n .post(\"/initials\", data)\n .then(function (r) { return r.data; });\n};\n","@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n .header {\n flex: 0;\n display: flex;\n z-index: 1000;\n align-items: center;\n transition: all 0.25s;\n justify-content: center;\n background-color: $medium-bg;\n box-shadow: 0 4px 4px 0 rgb(0 0 0 / 24%), 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .intro {\n width: 100%;\n height: 60px;\n display: flex;\n background: #ffffff;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n .inner {\n width: 100%;\n color: #111111;\n padding: 0 14px;\n font-size: 20px;\n font-weight: 500;\n line-height: 28px;\n max-width: 1024px;\n }\n }\n\n &.agreed {\n .intro {\n //display: none;\n }\n }\n\n .toolbar {\n width: 100%;\n margin: 0 auto;\n padding: 0 14px;\n position: relative;\n }\n\n .tools {\n width: 100%;\n color: #fff;\n height: 56px;\n display: flex;\n font-size: 12px;\n align-items: center;\n flex-direction: row;\n background-color: $medium-bg;\n\n .logo {\n width: 77.5px;\n margin: -6px 0 0 5px;\n }\n\n .title {\n padding-left: 16px;\n font-size: 18px;\n font-weight: 500;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n position: absolute;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .document {\n flex: 1;\n height: 100%;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .agree {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 15px;\n\n .intro {\n display: none;\n }\n\n .header {\n flex: 0 0 56px;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Envelopes} from '@verdocs/js-sdk/Envelopes';\nimport {createInitials} from '@verdocs/js-sdk/Envelopes/Initials';\nimport {createSignature} from '@verdocs/js-sdk/Envelopes/Signatures';\nimport {IDocumentField, IEnvelope, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit} from '@verdocs/js-sdk/Envelopes/Recipients';\nimport {isValidEmail, isValidPhone} from '@verdocs/js-sdk/Templates/Validators';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {updateEnvelopeFieldInitials, updateEnvelopeFieldSignature} from '@verdocs/js-sdk/Envelopes/Envelopes';\nimport {fullNameToInitials, getFieldId, getRoleIndex, renderDocumentField, savePDF} from '../../../utils/utils';\nimport {getEnvelopeById} from '../../../utils/Envelopes';\nimport EnvelopeStore from '../../../utils/envelopeStore';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {SDKError} from '../../../utils/errors';\n\nconst PrintIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z\"></path></svg>`;\n\nconst DownloadIcon = `<svg focusable=\"false\" aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z\"></path></svg>`;\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop() envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop() roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop() inviteCode: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n @State() recipient: IRecipient | null = null;\n @State() signerToken = null;\n // @State() envelope: IEnvelope | null = null;\n // @State() fields: IDocumentField[] = [];\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() errorMessage = '';\n @State() focusedField = '';\n @State() isDone = false;\n @State() showDone = false;\n\n @State() finishLater = false;\n @State() showFinishLater = false;\n\n recipientIndex: number = -1;\n fields: IDocumentField[] = [];\n\n componentWillLoad() {\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n const {session, recipient, signerToken} = await Envelopes.getSigningSession(this.endpoint, {\n envelopeId: this.envelopeId,\n roleId: this.roleId,\n inviteCode: this.inviteCode,\n });\n\n console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);\n\n this.recipient = recipient;\n this.signerToken = signerToken;\n this.endpoint.setToken(signerToken);\n\n if (this.recipient.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n await getEnvelopeById(this.endpoint, this.envelopeId);\n // const envelope = await Envelopes.getEnvelope(this.endpoint, this.envelopeId);\n // this.envelope = envelope;\n // console.log('[SIGN] Loaded envelope', envelope);\n\n this.recipientIndex = EnvelopeStore.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);\n if (this.recipientIndex > -1) {\n this.recipient = EnvelopeStore.envelope.recipients[this.recipientIndex];\n this.fields = this.recipient.fields;\n }\n\n this.isDone = ['submitted', 'canceled', 'declined'].includes(this.recipient.status);\n console.log('Done', this.isDone);\n\n // TODO: Fix service to allow this?\n // const sigs = await getSignatures();\n // console.log('sigs', sigs);\n\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope});\n } catch (e) {\n console.log('Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleClickAgree() {\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(r => {\n this.nextButtonLabel = 'Next';\n this.recipient = r;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: EnvelopeStore.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('Update failure', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n // this.router.navigate([`view/sign/${this.envelopeId}/role/${this.roleName}/saved`]);\n // if (!window?.['STORYBOOK_ENV']) {\n // window.alert('User intends to sign later.');\n // }\n break;\n case 'claim':\n break;\n case 'decline':\n {\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('Decline result', declineResult);\n this.isDone = true;\n }\n break;\n case 'print':\n window.print();\n break;\n case 'download':\n savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {});\n break;\n }\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n // TODO: Do we want to improve the instructions here?\n console.log('[SIGN] Signing session expired');\n this.errorMessage = 'Signing session expired.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IDocumentField, e: any) {\n console.log('fieldChange', field, e, e.target.value);\n const {value, checked} = e.target;\n\n switch (field.type) {\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox_group': {\n const options = field.settings.options.map(option => ({id: option.id, checked: e.target.checked}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'radio_button_group': {\n const options = field.settings.options.map(option => ({id: option.id, selected: e.target.value === option.id}));\n return this.saveFieldChange(field.name, {prepared: false, value: {options}});\n }\n\n case 'dropdown':\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(newInitials => {\n console.log('New initials', field.name, newInitials);\n updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n });\n\n case 'signature':\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(newSignature => {\n console.log('New sign', field.name, newSignature);\n updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n });\n\n case 'date':\n const iso = e.target.getAttribute('iso');\n return this.saveFieldChange(field.name, {prepared: false, value: iso});\n\n case 'timestamp':\n console.log('Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldValid(field: IDocumentField) {\n const {required = false} = field;\n const {result = '', value = '', base64 = ''} = field.settings || {};\n switch (field.type) {\n case 'textbox':\n switch (field.settings?.validator || '') {\n case 'email':\n return isValidEmail(result);\n case 'phone':\n return isValidPhone(result);\n default:\n return !required || result !== '';\n }\n\n case 'signature':\n case 'initial':\n return !required || base64 !== '';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'textarea':\n case 'date':\n case 'attachment':\n return !required || result !== '';\n\n case 'dropdown':\n return !required || value !== '';\n\n case 'checkbox_group':\n const checkedCount = (field.settings?.options?.filter(option => option.checked) || []).length;\n return !required || (checkedCount >= (field.settings?.minimum_checked || 0) && checkedCount <= (field.settings?.maximum_checked || 999));\n\n case 'radio_button_group':\n return !required || (field.settings?.options?.filter(option => option.selected) || []).length > 0;\n // TODO\n // case 'checkbox':\n // return <verdocs-field-checkbox style={style} value={result || ''} id={id} />;\n // case 'payment':\n // return <verdocs-field-payment style={style} field={field} id={id} />;\n default:\n return false;\n }\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.showDone = true;\n this.isDone = true;\n // updateRecipientStatus()\n } catch (e) {\n console.log('Error submitting', e);\n }\n return;\n // You're done.\n // You can access the Verdoc at any time by clicking on the link from invitation email.\n //\n // After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.\n //\n // Thank you for using Verdocs.\n // Got it, thanks\n }\n\n // Find and focus the next incomplete required field\n const requiredFields = this.fields.filter(field => field.required);\n const focusedIndex = requiredFields.findIndex(field => field.name === this.focusedField);\n\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = requiredFields[nextFocusedIndex];\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < requiredFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && nextRequiredField.settings?.result === 'signed') {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = requiredFields[nextFocusedIndex];\n }\n\n if (skips >= requiredFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const someFieldsInvalid = this.recipient.fields.map(field => this.isFieldValid(field)).some(fieldValid => !fieldValid);\n if (!someFieldsInvalid) {\n this.nextButtonLabel = 'Finish';\n this.nextSubmits = true;\n } else {\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, roleIndex, el) {\n el.addEventListener('input', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n el.addEventListener('fieldChange', e => this.handleFieldChange(field, e).finally(() => this.checkRecipientFields()));\n\n el.setAttribute('roleindex', roleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n el.setAttribute('initials', this.recipient ? fullNameToInitials(this.recipient.full_name) : '');\n el.setAttribute('name', this.recipient?.full_name || '');\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IDocumentPageInfo;\n const roleIndex = getRoleIndex(EnvelopeStore.roleNames, this.recipient.role_name);\n const recipientFields = this.recipient.fields.filter(field => field.page === pageInfo.pageNumber);\n console.log('[SIGN] Page rendered, updating fields', {pageInfo, roleIndex, recipientFields});\n\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, roleIndex, {disabled: false, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, roleIndex, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, roleIndex, el);\n }\n\n // interact(el).draggable({\n // listeners: {\n // start(event) {\n // console.log('[FIELDS] Drag started', event.type, event.target);\n // },\n // move(event) {\n // const oldX = +(event.target.getAttribute('posX') || 0);\n // const oldY = +(event.target.getAttribute('posY') || 0);\n // const xScale = +(event.target.getAttribute('xScale') || 1);\n // const yScale = +(event.target.getAttribute('yScale') || 1);\n // const newX = event.dx / xScale + oldX;\n // const newY = event.dy / yScale + oldY;\n // event.target.setAttribute('posX', newX);\n // event.target.setAttribute('posy', newY);\n // updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);\n // },\n // end(event) {\n // console.log('[FIELDS] Drag ended', event);\n // // event.target.setAttribute('posX', 0);\n // // event.target.setAttribute('posy', 0);\n // // updateCssTransform(event.target, 'translate', `${0}px, ${0}px`);\n // },\n // },\n // });\n });\n\n // Render fields for \"the other\" recipients\n EnvelopeStore.envelope.recipients\n .filter(recipient => recipient.role_name !== this.recipient.role_name)\n .map(otherRecipient => {\n const otherRoleIndex = getRoleIndex(EnvelopeStore.roleNames, otherRecipient.role_name);\n const recipientFields = otherRecipient.fields.filter(field => field.page === pageInfo.pageNumber);\n // const fields = this.fields.filter(field => field.page_sequence === pageInfo.renderedPage.pageNumber);\n recipientFields.forEach(field => {\n const el = renderDocumentField(field, pageInfo, otherRoleIndex, {disabled: true, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n el.setAttribute('roleindex', otherRoleIndex);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n });\n });\n\n this.checkRecipientFields();\n }\n\n render() {\n if (EnvelopeStore.loading || !EnvelopeStore.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n const menuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing', disabled: true},\n {id: 'download', label: 'Download'},\n ];\n\n return (\n <Host class={{agreed: this.recipient?.agreed}}>\n {!this.isDone && !this.finishLater && (\n <div class=\"intro\">\n <div class=\"inner\">Please review and act on these documents.</div>\n </div>\n )}\n\n <div class=\"header\">\n <div class=\"inner\">\n <div class=\"toolbar\">\n <div class=\"tools\">\n {!this.isDone && !this.finishLater && <verdocs-dropdown options={menuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />}\n\n {!this.recipient?.agreed ? (\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"I agree to use electronic records and signatures.\" onInput={() => this.handleClickAgree()} />\n </div>\n ) : (\n <Fragment>\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{EnvelopeStore.envelope.name}</div>\n <div style={{flex: '1'}} />\n <div innerHTML={PrintIcon} style={{width: '24px', height: '24px', fill: '#ffffff', cursor: 'pointer'}} onClick={() => window.print()} />\n <div\n innerHTML={DownloadIcon}\n style={{width: '24px', height: '24px', fill: '#ffffff', cursor: 'pointer', marginLeft: '16px', maginRight: '30px'}}\n onClick={() => savePDF(this.endpoint, EnvelopeStore.envelope, EnvelopeStore.envelope.envelope_document_id).catch(() => {})}\n />\n </Fragment>\n )}\n\n {!this.isDone && !this.finishLater && (\n <verdocs-button size=\"small\" label={this.nextButtonLabel} disabled={!this.recipient?.agreed} onClick={() => this.handleNext()} />\n )}\n </div>\n </div>\n </div>\n </div>\n\n {!this.isDone && !this.recipient?.agreed ? <div class=\"cover\" /> : <div style={{display: 'none'}} />}\n\n <div class=\"document\">\n {(EnvelopeStore.envelope.documents || []).map(envelopeDocument => {\n const pages = [...(envelopeDocument?.pages || [])];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Fragment>\n {pages.map(page => (\n <verdocs-document-page\n pageImageUri={page.display_uri}\n virtualWidth={612}\n virtualHeight={792}\n pageNumber={page.sequence}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n ))}\n </Fragment>\n );\n })}\n </div>\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message=\"To complete the document, use the link in the original email notification inviting you to review and finish the document.\"\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.errorMessage && <verdocs-ok-dialog heading=\"Network Error\" message={this.errorMessage} onNext={() => (this.errorMessage = '')} />}\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message=\"You can access the Verdoc at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.\"\n onNext={() => (this.showDone = false)}\n />\n )}\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- System.register(["./p-97329951.system.js","./p-78f5c8ad.system.js","./p-af2c2f79.system.js"],(function(e){"use strict";var m,a,r,t,b,g;return{setters:[function(e){m=e.r;a=e.c;r=e.h;t=e.H;b=e.a},function(e){g=e.t},function(){}],execute:function(){var i="verdocs-document-page{width:100%;position:relative}verdocs-document-page .verdocs-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-document-page .verdocs-document-page-layer.img{max-width:100%}";var o=e("verdocs_document_page",function(){function e(e){m(this,e);this.pageRendered=a(this,"pageRendered",7);this.pageImageUri="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true}e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(g((function(m){for(var a=0,r=m;a<r.length;a++){var t=r[a];var b=t.contentRect.width;e.renderedWidth=b;e.renderedHeight=e.virtualHeight*(b/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({container:this.container,containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};e.prototype.render=function(){var e=this;var m="".concat(this.renderedHeight,"px");return r(t,{id:"".concat(this.containerId),style:{height:m}},this.layers.map((function(a){return a.type==="div"?r("div",{class:"verdocs-document-page-layer",id:"".concat(e.containerId,"-").concat(a.name),style:{height:m}}):r("img",{class:"verdocs-document-page-layer img",id:"".concat(e.containerId,"-").concat(a.name),src:e.pageImageUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,onLoad:function(m){e.naturalWidth=m.target.naturalWidth;e.naturalHeight=m.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio}})})))};Object.defineProperty(e.prototype,"container",{get:function(){return b(this)},enumerable:false,configurable:true});return e}());o.style=i;var s="verdocs-loader{display:block;position:absolute;top:50%;left:50%;margin-left:-20px;margin-top:-20px;font-size:24px;width:24px;height:24px;border-radius:50%;text-indent:-9999em;-webkit-animation:load5 1.1s infinite ease;animation:verdocs-loader-kf 1.1s infinite ease;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes verdocs-loader-kf{0%,100%{-webkit-box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4)}12.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3)}25%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}37.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}50%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}62.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}75%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}87.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa;box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa}}@keyframes verdocs-loader-kf{0%,100%{-webkit-box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4)}12.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3)}25%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}37.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}50%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}62.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}75%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}87.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa;box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa}}";var n=e("verdocs_loader",function(){function e(e){m(this,e)}e.prototype.render=function(){return r(t,null)};return e}());n.style=s}}}));
2
- //# sourceMappingURL=p-48c467a2.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/elements/verdocs-document-page/verdocs-document-page.scss?tag=verdocs-document-page","src/components/elements/verdocs-document-page/verdocs-document-page.tsx","src/components/controls/verdocs-loader/verdocs-loader.scss?tag=verdocs-loader","src/components/controls/verdocs-loader/verdocs-loader.tsx"],"names":["verdocsDocumentPageCss","VerdocsDocumentPage","exports","name","type","concat","Math","random","toString","substring","this","virtualWidth","virtualHeight","class_1","prototype","componentDidLoad","_this","resizeObserver","ResizeObserver","throttle","entries","_i","entries_1","length","entry","renderedWidth","contentRect","width","renderedHeight","notifyRenderedSize","observe","container","disconnectedCallback","_a","disconnect","skipFirstNotification","pageRendered","emit","containerId","pageNumber","naturalWidth","naturalHeight","aspectRatio","xScale","yScale","render","height","h","Host","id","style","layers","map","layer","class","src","pageImageUri","alt","aria-hidden","onLoad","e","target","verdocsLoaderCss","VerdocsLoader","class_2"],"mappings":"sPAAA,IAAMA,EAAyB,+SCgBlBC,EAAmBC,EAAA,wBAAA,gGAOC,mBAMF,oBAME,uBAMC,gBAcD,CAAC,CAACC,KAAM,OAAQC,KAAM,4BAO9B,yBAAAC,OAAyBC,KAAKC,SAASC,SAAS,IAAIC,UAAU,EAAG,wBAEvDC,KAAKC,iCACJD,KAAKE,gCACPF,KAAKC,gCACJD,KAAKE,+BACPF,KAAKC,aAAeD,KAAKE,yCAEvB,KAEjCC,EAAAC,UAAAC,iBAAA,WAAA,IAAAC,EAAAN,KACEA,KAAKO,eAAiB,IAAIC,eACxBC,GAAS,SAAAC,GACP,IAAoB,IAAAC,EAAA,EAAAC,EAAAF,EAAAC,EAAAC,EAAAC,OAAAF,IAAS,CAAxB,IAAMG,EAAKF,EAAAD,GACd,IAAMI,EAAgBD,EAAME,YAAYC,MACxCX,EAAKS,cAAgBA,EACrBT,EAAKY,eAAiBZ,EAAKJ,eAAiBa,EAAgBT,EAAKL,cAGnEK,EAAKa,uBACJ,MAGLnB,KAAKO,eAAea,QAAQpB,KAAKqB,YAGnClB,EAAAC,UAAAkB,qBAAA,kBACEC,EAAAvB,KAAKO,kBAAc,MAAAgB,SAAA,OAAA,EAAAA,EAAEC,cASvBrB,EAAAC,UAAAe,mBAAA,WAGE,GAAInB,KAAKyB,sBAAuB,CAC9BzB,KAAKyB,sBAAwB,MAC7B,OAGFzB,KAAK0B,aAAaC,KAAK,CACrBN,UAAWrB,KAAKqB,UAChBO,YAAa5B,KAAK4B,YAClBC,WAAY7B,KAAK6B,WACjB5B,aAAcD,KAAKC,aACnBC,cAAeF,KAAKE,cACpBa,cAAef,KAAKe,cACpBG,eAAgBlB,KAAKkB,eACrBY,aAAc9B,KAAK8B,aACnBC,cAAe/B,KAAK+B,cACpBC,YAAahC,KAAKgC,YAClBC,OAAQjC,KAAKe,cAAgBf,KAAKC,aAClCiC,OAAQlC,KAAKkB,eAAiBlB,KAAKE,iBAIvCC,EAAAC,UAAA+B,OAAA,WAAA,IAAA7B,EAAAN,KACE,IAAMoC,EAAS,GAAAzC,OAAGK,KAAKkB,eAAc,MAErC,OACEmB,EAACC,EAAI,CAACC,GAAI,GAAA5C,OAAGK,KAAK4B,aAAeY,MAAO,CAACJ,OAAMA,IAC5CpC,KAAKyC,OAAOC,KAAI,SAAAC,GACf,OAAAA,EAAMjD,OAAS,MACb2C,EAAA,MAAA,CAAKO,MAAM,8BAA8BL,GAAI,GAAA5C,OAAGW,EAAKsB,YAAW,KAAAjC,OAAIgD,EAAMlD,MAAQ+C,MAAO,CAACJ,OAAMA,KAEhGC,EAAA,MAAA,CACEO,MAAM,kCACNL,GAAI,GAAA5C,OAAGW,EAAKsB,YAAW,KAAAjC,OAAIgD,EAAMlD,MACjCoD,IAAKvC,EAAKwC,aACVC,IAAK,QAAApD,OAAQW,EAAKuB,YAAYmB,cACjB,KACbC,OAAQ,SAACC,GAQP5C,EAAKwB,aAAeoB,EAAEC,OAAOrB,aAC7BxB,EAAKyB,cAAgBmB,EAAEC,OAAOpB,cAC9BzB,EAAK0B,YAAc1B,EAAKwB,aAAexB,EAAKyB,cAC5CzB,EAAKJ,cAAgBI,EAAKL,aAAeK,EAAK0B,gJApI9B,cChBhC,IAAMoB,EAAmB,gqUCUZC,EAAa7D,EAAA,iBAAA,mCACxB8D,EAAAlD,UAAA+B,OAAA,WACE,OAAOE,EAACC,EAAI,gBAFU","sourcesContent":["@import '../../../theme.scss';\n\nverdocs-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n max-width: 100%;\n }\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {throttle} from '../../../utils/utils';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-document-page',\n styleUrl: 'verdocs-document-page.scss',\n shadow: false,\n})\nexport class VerdocsDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The URL of the image to render as the page background.\n */\n @Prop() pageImageUri: string = '';\n\n /**\n * The page number being rendered. Not used internally, but included in callbacks/events beacuse page numbers\n * are used everywhere in document handling. (Reminder: page numbers are 1-based.)\n */\n @Prop() pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n\n @State() skipFirstNotification = true;\n\n componentDidLoad(): void {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n // Left here for documentation purposes in case we find an edge case where this isn't true. But we apparently don't need this.\n // When we add the resize observer it will always be triggered at least once so notifying here as well is just a dupe.\n // componentDidRender() {\n // this.notifyRenderedSize();\n // }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n this.pageRendered.emit({\n container: this.container,\n containerId: this.containerId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale: this.renderedWidth / this.virtualWidth,\n yScale: this.renderedHeight / this.virtualHeight,\n });\n }\n\n render() {\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : (\n <img\n class=\"verdocs-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageImageUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n }}\n />\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-loader {\n display: block;\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -20px;\n margin-top: -20px;\n font-size: 24px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n text-indent: -9999em;\n -webkit-animation: load5 1.1s infinite ease;\n animation: verdocs-loader-kf 1.1s infinite ease;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n}\n\n@keyframes verdocs-loader-kf {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em $verdocs-bg-2, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em $verdocs-bg-2, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em $verdocs-bg-2, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em $verdocs-bg-2,\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4),\n 0em 2.5em 0 0em $verdocs-bg-2, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em $verdocs-bg-2, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em $verdocs-bg-2, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em $verdocs-bg-2;\n }\n}\n","import {Component, h, Host} from '@stencil/core';\n\n/**\n * Animated loader placeholder. There are currently no configuration options for this control.\n */\n@Component({\n tag: 'verdocs-loader',\n styleUrl: 'verdocs-loader.scss',\n shadow: false,\n})\nexport class VerdocsLoader {\n render() {\n return <Host />;\n }\n}\n"]}