@verdocs/web-sdk 6.9.9 → 6.9.12
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.
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +121 -15
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
- package/dist/components/{p-D_8TNtkM.js → p-Bpe5Awxh.js} +2 -2
- package/dist/components/p-DeQsR41s.js +3 -0
- package/dist/components/p-DeQsR41s.js.map +1 -0
- package/dist/components/verdocs-build.js +1 -1
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +121 -15
- package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/verdocs-web-sdk/p-3a542ed0.system.entry.js +4 -0
- package/dist/verdocs-web-sdk/p-3a542ed0.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
- package/dist/verdocs-web-sdk/p-ae4290c6.entry.js +3 -0
- package/dist/verdocs-web-sdk/p-ae4290c6.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/components/p-CT0DHyPw.js +0 -3
- package/dist/components/p-CT0DHyPw.js.map +0 -1
- package/dist/verdocs-web-sdk/p-1e8f1ce4.system.entry.js +0 -4
- package/dist/verdocs-web-sdk/p-1e8f1ce4.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-b464b598.entry.js +0 -3
- package/dist/verdocs-web-sdk/p-b464b598.entry.js.map +0 -1
- /package/dist/components/{p-D_8TNtkM.js.map → p-Bpe5Awxh.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as i,d as o,t as n}from"./p-yZBlG3YQ.js";import{getTemplate as l,getOrganizationContacts as r,isValidEmail as d,createEnvelope as a,formatFullName as c,getRGBA as p}from"@verdocs/js-sdk";import{D as h}from"./p-C_Xku1v2.js";import{V as v}from"./p-D97GxsI-.js";import{S as m}from"./p-C1sRVZWv.js";import{S as f}from"./p-C7hFgM52.js";import{d as u}from"./p-Bdf8pPWm.js";import{d as x}from"./p-REnrt0JM.js";import{d as b}from"./p-CyDWJAOZ.js";import{d as g}from"./p-CT0DHyPw.js";import{d as w}from"./p-wUsR0Dpa.js";import{d as k}from"./p-B-_kYJtC.js";import{d as E}from"./p-DQTI8vRX.js";import{d as S}from"./p-BXQO5Vza.js";const C=e=>((e===null||e===void 0?void 0:e.roles)||[]).map((e=>e.name));const y=(e,s)=>Math.max(C(e).findIndex((e=>e===s)),0);const D=()=>`verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid rgba(151, 151, 151, 0.2666666667)}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:rgba(0, 0, 0, 0.537254902)}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-send .buttons .error-message{width:100%;color:#cc0000;font-size:13px;margin-bottom:10px}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}`;const z='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';const N='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';const j='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';const _='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';const L=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.beforeSend=t(this,"beforeSend");this.send=t(this,"send");this.exit=t(this,"exit");this.sdkError=t(this,"sdkError");this.searchContacts=t(this,"searchContacts");this.templateListenerId=null;this.endpoint=h;this.templateId=null;this.environment="";this.showCancel=true;this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`;this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={};this.loading=true;this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){console.log("[SEND] Loading template",this.templateId);this.unlistenToTemplate();f.subscribe("templates",this.templateId,(()=>l(this.endpoint,this.templateId)),true,(e=>{console.log("[SEND] Got new template",e);this.template=e;this.loading=false;this.rolesCompleted={};this.recomputeRolesCompleted()}))}unlistenToTemplate(){if(this.templateListenerId){f.store.delListener(this.templateListenerId);this.templateListenerId=null}}async reset(){this.rolesCompleted={}}onTemplateIdChanged(e){console.log("[SEND] Template ID changed",e);this.listenToTemplate()}async componentWillLoad(){var e,s,t;try{this.endpoint.onSessionChanged(((e,s,t)=>{if(!t){return}const i={id:t.id,first_name:t.first_name,last_name:t.last_name,email:t.email,phone:t.phone};if(t){this.sessionContacts=[i];r(this.endpoint).then((e=>{console.log("[SEND] Got contacts",e);this.sessionContacts=[...e,i]})).catch((e=>{console.log("[SEND] Error getting contacts",e)}))}}));this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SEND] Unable to start Send operation, must be authenticated");return}if(!this.templateId){console.log(`[SEND] Missing required template ID ${this.templateId}`);return}this.listenToTemplate()}catch(i){console.log("[SEND] Error with send session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new m(i.message,(s=i.response)===null||s===void 0?void 0:s.status,(t=i.response)===null||t===void 0?void 0:t.data))}}recomputeRolesCompleted(){var e;this.rolesCompleted={};const s={};(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).forEach((e=>{const t=e.sequence;s[t]||(s[t]=[]);const i=`r-${t}-${s[t].length}`;s[t].push({...e,id:i,role_name:e.name,first_name:e.first_name,last_name:e.last_name});if(e.first_name&&d(e.email)){this.rolesCompleted[i]={...e,id:i,role_name:e.name,first_name:e.first_name,last_name:e.last_name}}}))}getSequenceNumbers(){var e;const s={};(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).forEach((e=>{s[e.sequence]=true}));return Object.keys(s).map((e=>+e)).sort(((e,s)=>e-s))}getRolesAtLevel(e){var s;const t=(((s=this.template)===null||s===void 0?void 0:s.roles)||[]).filter((s=>s.sequence===e)).map(((s,t)=>({...s,id:`r-${e}-${t}`,role_name:s.name,first_name:s.first_name,last_name:s.last_name})));return t}getLevelIcon(e){if(e==="start"){return i("div",{class:"level-icon",innerHTML:N})}else if(e==="end"){return i("div",{class:"level-icon",innerHTML:_})}else{return i("div",{class:"level-icon",innerHTML:j})}}handleSelectContact(e,s){e.preventDefault();this.rolesCompleted[s.id]={...s,...e.detail};this.showPickerForId=""}handleClickRole(e,s){e.stopPropagation();this.showPickerForId=s.id}handleSend(e){var s;if(this.sending){console.log("[SEND] Skipping duplicate send",e);return}console.log("[SEND] Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;const t={template_id:this.templateId,name:((s=this.template)===null||s===void 0?void 0:s.name)||"New Envelope",environment:this.environment,initial_reminder:0,followup_reminders:0,recipients:Object.values(this.rolesCompleted)};const i=this.beforeSend.emit({...t,name:t.name,template:this.template});if(i.defaultPrevented){console.log("[SEND] Send cancelled by parent",t);this.sending=false;return}console.log("[SEND] Creating envelope",t);a(this.endpoint,t).then((e=>{var s;console.log("[SEND] Send envelope",e);this.reset().catch((e=>console.log("Unknown Error",e)));this.sending=false;(s=this.send)===null||s===void 0?void 0:s.emit({...t,name:t.name,envelope_id:e.id,envelope:e})})).catch((e=>{var s,t,i;console.log("[SEND] Send error",e);v(((t=(s=e.response)===null||s===void 0?void 0:s.data)===null||t===void 0?void 0:t.error)||"Error creating envelope, please try again later.");this.sending=false;(i=this.sdkError)===null||i===void 0?void 0:i.emit(e)}))}handleCancel(e){var s;e.stopPropagation();(s=this.exit)===null||s===void 0?void 0:s.emit()}render(){var e;if(this.loading){return i(o,null,i("verdocs-loader",null))}if(!this.endpoint.session){return i(o,{style:{display:"flex"}},i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}const s=this.getSequenceNumbers();const t=Object.values(this.rolesCompleted).filter((e=>d(e.email)&&e.first_name&&e.last_name));const n=t.length>=C(this.template).length;const l=t.map((e=>e.email.toLowerCase()));const r=new Set(l).size<l.length;return i(o,{class:{sendable:(e=this.template)===null||e===void 0?void 0:e.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:`level level-start`},this.getLevelIcon("start"),i("div",{class:"complete"},"Send Envelope")),s.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon("sequence"),this.getRolesAtLevel(e).map((e=>{var s,o,n;const l=!e.email||!e.first_name||!e.last_name;const r=((s=this.rolesCompleted[e.id])===null||s===void 0?void 0:s.first_name)?c(this.rolesCompleted[e.id]):l?e.role_name:c(e);const d=`verdocs-send-recipient-${e.role_name}`;const a=y(this.template,e.role_name);const h=p(a);const v=t.findIndex((s=>s.role_name===e.role_name))>-1;const m={backgroundColor:h,border:v?"2px solid #55bc81":"2px solid #dddddd"};return l?i("div",{class:"recipient","data-ri":a,"data-rn":e.role_name,style:m,onClick:s=>this.handleClickRole(s,e),id:d},r,i("div",{class:"icon",innerHTML:z}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:d,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:s=>this.handleSelectContact(s,e),contactSuggestions:this.sessionContacts,templateRole:(o=this.rolesCompleted[e.id])!==null&&o!==void 0?o:e,onSearchContacts:e=>{var s;return(s=this.searchContacts)===null||s===void 0?void 0:s.emit(e.detail)}}))):i("div",{class:"recipient","data-ri":a,"data-rn":e.role_name,style:m,onClick:s=>this.handleClickRole(s,e),id:d},r,i("div",{class:"icon",innerHTML:z}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:d,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:s=>this.handleSelectContact(s,e),contactSuggestions:this.sessionContacts,templateRole:(n=this.rolesCompleted[e.id])!==null&&n!==void 0?n:e,onSearchContacts:e=>{var s;return(s=this.searchContacts)===null||s===void 0?void 0:s.emit(e.detail)}})))}))))),i("div",{class:`level level-done`},this.getLevelIcon("end"),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},r&&i("div",{class:"error-message"},"Recipients cannot share the same email."),this.showCancel&&i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e),disabled:this.sending}),i("verdocs-button",{label:"Send",size:"small",disabled:!n||this.sending||r,onClick:e=>this.handleSend(e)}),this.sending&&i("verdocs-spinner",null)))}static get watchers(){return{templateId:[{onTemplateIdChanged:0}]}}static get style(){return D()}},[0,"verdocs-send",{endpoint:[16],templateId:[513,"template-id"],environment:[1],showCancel:[4,"show-cancel"],containerId:[32],showPickerForId:[32],sessionContacts:[32],sending:[32],rolesCompleted:[32],loading:[32],template:[32],reset:[64]},undefined,{templateId:[{onTemplateIdChanged:0}]}]);function M(){if(typeof customElements==="undefined"){return}const e=["verdocs-send","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-contact-picker","verdocs-flag","verdocs-loader","verdocs-portal","verdocs-spinner"];e.forEach((e=>{switch(e){case"verdocs-send":if(!customElements.get(n(e))){customElements.define(n(e),L)}break;case"verdocs-button":if(!customElements.get(n(e))){u()}break;case"verdocs-checkbox":if(!customElements.get(n(e))){x()}break;case"verdocs-component-error":if(!customElements.get(n(e))){b()}break;case"verdocs-contact-picker":if(!customElements.get(n(e))){g()}break;case"verdocs-flag":if(!customElements.get(n(e))){w()}break;case"verdocs-loader":if(!customElements.get(n(e))){k()}break;case"verdocs-portal":if(!customElements.get(n(e))){E()}break;case"verdocs-spinner":if(!customElements.get(n(e))){S()}break}}))}export{L as V,M as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as s,c as t,h as i,d as o,t as n}from"./p-yZBlG3YQ.js";import{getTemplate as l,getOrganizationContacts as r,isValidEmail as d,createEnvelope as a,formatFullName as c,getRGBA as p}from"@verdocs/js-sdk";import{D as h}from"./p-C_Xku1v2.js";import{V as v}from"./p-D97GxsI-.js";import{S as m}from"./p-C1sRVZWv.js";import{S as f}from"./p-C7hFgM52.js";import{d as u}from"./p-Bdf8pPWm.js";import{d as x}from"./p-REnrt0JM.js";import{d as b}from"./p-CyDWJAOZ.js";import{d as g}from"./p-DeQsR41s.js";import{d as w}from"./p-wUsR0Dpa.js";import{d as k}from"./p-B-_kYJtC.js";import{d as E}from"./p-DQTI8vRX.js";import{d as S}from"./p-BXQO5Vza.js";const C=e=>((e===null||e===void 0?void 0:e.roles)||[]).map((e=>e.name));const y=(e,s)=>Math.max(C(e).findIndex((e=>e===s)),0);const D=()=>`verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid rgba(151, 151, 151, 0.2666666667)}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:rgba(0, 0, 0, 0.537254902)}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-send .buttons .error-message{width:100%;color:#cc0000;font-size:13px;margin-bottom:10px}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}`;const z='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';const N='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';const j='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';const _='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';const L=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.beforeSend=t(this,"beforeSend");this.send=t(this,"send");this.exit=t(this,"exit");this.sdkError=t(this,"sdkError");this.searchContacts=t(this,"searchContacts");this.templateListenerId=null;this.endpoint=h;this.templateId=null;this.environment="";this.showCancel=true;this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`;this.showPickerForId="";this.sessionContacts=[];this.sending=false;this.rolesCompleted={};this.loading=true;this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){console.log("[SEND] Loading template",this.templateId);this.unlistenToTemplate();f.subscribe("templates",this.templateId,(()=>l(this.endpoint,this.templateId)),true,(e=>{console.log("[SEND] Got new template",e);this.template=e;this.loading=false;this.rolesCompleted={};this.recomputeRolesCompleted()}))}unlistenToTemplate(){if(this.templateListenerId){f.store.delListener(this.templateListenerId);this.templateListenerId=null}}async reset(){this.rolesCompleted={}}onTemplateIdChanged(e){console.log("[SEND] Template ID changed",e);this.listenToTemplate()}async componentWillLoad(){var e,s,t;try{this.endpoint.onSessionChanged(((e,s,t)=>{if(!t){return}const i={id:t.id,first_name:t.first_name,last_name:t.last_name,email:t.email,phone:t.phone};if(t){this.sessionContacts=[i];r(this.endpoint).then((e=>{console.log("[SEND] Got contacts",e);this.sessionContacts=[...e,i]})).catch((e=>{console.log("[SEND] Error getting contacts",e)}))}}));this.endpoint.loadSession();if(!this.endpoint.session){console.log("[SEND] Unable to start Send operation, must be authenticated");return}if(!this.templateId){console.log(`[SEND] Missing required template ID ${this.templateId}`);return}this.listenToTemplate()}catch(i){console.log("[SEND] Error with send session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new m(i.message,(s=i.response)===null||s===void 0?void 0:s.status,(t=i.response)===null||t===void 0?void 0:t.data))}}recomputeRolesCompleted(){var e;this.rolesCompleted={};const s={};(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).forEach((e=>{const t=e.sequence;s[t]||(s[t]=[]);const i=`r-${t}-${s[t].length}`;s[t].push({...e,id:i,role_name:e.name,first_name:e.first_name,last_name:e.last_name});if(e.first_name&&d(e.email)){this.rolesCompleted[i]={...e,id:i,role_name:e.name,first_name:e.first_name,last_name:e.last_name}}}))}getSequenceNumbers(){var e;const s={};(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).forEach((e=>{s[e.sequence]=true}));return Object.keys(s).map((e=>+e)).sort(((e,s)=>e-s))}getRolesAtLevel(e){var s;const t=(((s=this.template)===null||s===void 0?void 0:s.roles)||[]).filter((s=>s.sequence===e)).map(((s,t)=>({...s,id:`r-${e}-${t}`,role_name:s.name,first_name:s.first_name,last_name:s.last_name})));return t}getLevelIcon(e){if(e==="start"){return i("div",{class:"level-icon",innerHTML:N})}else if(e==="end"){return i("div",{class:"level-icon",innerHTML:_})}else{return i("div",{class:"level-icon",innerHTML:j})}}handleSelectContact(e,s){e.preventDefault();this.rolesCompleted[s.id]={...s,...e.detail};this.showPickerForId=""}handleClickRole(e,s){e.stopPropagation();this.showPickerForId=s.id}handleSend(e){var s;if(this.sending){console.log("[SEND] Skipping duplicate send",e);return}console.log("[SEND] Sending",e);e.preventDefault();e.stopPropagation();this.sending=true;const t={template_id:this.templateId,name:((s=this.template)===null||s===void 0?void 0:s.name)||"New Envelope",environment:this.environment,initial_reminder:0,followup_reminders:0,recipients:Object.values(this.rolesCompleted)};const i=this.beforeSend.emit({...t,name:t.name,template:this.template});if(i.defaultPrevented){console.log("[SEND] Send cancelled by parent",t);this.sending=false;return}console.log("[SEND] Creating envelope",t);a(this.endpoint,t).then((e=>{var s;console.log("[SEND] Send envelope",e);this.reset().catch((e=>console.log("Unknown Error",e)));this.sending=false;(s=this.send)===null||s===void 0?void 0:s.emit({...t,name:t.name,envelope_id:e.id,envelope:e})})).catch((e=>{var s,t,i;console.log("[SEND] Send error",e);v(((t=(s=e.response)===null||s===void 0?void 0:s.data)===null||t===void 0?void 0:t.error)||"Error creating envelope, please try again later.");this.sending=false;(i=this.sdkError)===null||i===void 0?void 0:i.emit(e)}))}handleCancel(e){var s;e.stopPropagation();(s=this.exit)===null||s===void 0?void 0:s.emit()}render(){var e;if(this.loading){return i(o,null,i("verdocs-loader",null))}if(!this.endpoint.session){return i(o,{style:{display:"flex"}},i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}const s=this.getSequenceNumbers();const t=Object.values(this.rolesCompleted).filter((e=>d(e.email)&&e.first_name&&e.last_name));const n=t.length>=C(this.template).length;const l=t.map((e=>e.email.toLowerCase()));const r=new Set(l).size<l.length;return i(o,{class:{sendable:(e=this.template)===null||e===void 0?void 0:e.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:`level level-start`},this.getLevelIcon("start"),i("div",{class:"complete"},"Send Envelope")),s.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon("sequence"),this.getRolesAtLevel(e).map((e=>{var s,o,n;const l=!e.email||!e.first_name||!e.last_name;const r=((s=this.rolesCompleted[e.id])===null||s===void 0?void 0:s.first_name)?c(this.rolesCompleted[e.id]):l?e.role_name:c(e);const d=`verdocs-send-recipient-${e.role_name}`;const a=y(this.template,e.role_name);const h=p(a);const v=t.findIndex((s=>s.role_name===e.role_name))>-1;const m={backgroundColor:h,border:v?"2px solid #55bc81":"2px solid #dddddd"};return l?i("div",{class:"recipient","data-ri":a,"data-rn":e.role_name,style:m,onClick:s=>this.handleClickRole(s,e),id:d},r,i("div",{class:"icon",innerHTML:z}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:d,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:s=>this.handleSelectContact(s,e),contactSuggestions:this.sessionContacts,templateRole:(o=this.rolesCompleted[e.id])!==null&&o!==void 0?o:e,onSearchContacts:e=>{var s;return(s=this.searchContacts)===null||s===void 0?void 0:s.emit(e.detail)}}))):i("div",{class:"recipient","data-ri":a,"data-rn":e.role_name,style:m,onClick:s=>this.handleClickRole(s,e),id:d},r,i("div",{class:"icon",innerHTML:z}),this.showPickerForId===e.id&&i("verdocs-portal",{anchor:d,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:s=>this.handleSelectContact(s,e),contactSuggestions:this.sessionContacts,templateRole:(n=this.rolesCompleted[e.id])!==null&&n!==void 0?n:e,onSearchContacts:e=>{var s;return(s=this.searchContacts)===null||s===void 0?void 0:s.emit(e.detail)}})))}))))),i("div",{class:`level level-done`},this.getLevelIcon("end"),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},r&&i("div",{class:"error-message"},"Recipients cannot share the same email."),this.showCancel&&i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e),disabled:this.sending}),i("verdocs-button",{label:"Send",size:"small",disabled:!n||this.sending||r,onClick:e=>this.handleSend(e)}),this.sending&&i("verdocs-spinner",null)))}static get watchers(){return{templateId:[{onTemplateIdChanged:0}]}}static get style(){return D()}},[0,"verdocs-send",{endpoint:[16],templateId:[513,"template-id"],environment:[1],showCancel:[4,"show-cancel"],containerId:[32],showPickerForId:[32],sessionContacts:[32],sending:[32],rolesCompleted:[32],loading:[32],template:[32],reset:[64]},undefined,{templateId:[{onTemplateIdChanged:0}]}]);function M(){if(typeof customElements==="undefined"){return}const e=["verdocs-send","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-contact-picker","verdocs-flag","verdocs-loader","verdocs-portal","verdocs-spinner"];e.forEach((e=>{switch(e){case"verdocs-send":if(!customElements.get(n(e))){customElements.define(n(e),L)}break;case"verdocs-button":if(!customElements.get(n(e))){u()}break;case"verdocs-checkbox":if(!customElements.get(n(e))){x()}break;case"verdocs-component-error":if(!customElements.get(n(e))){b()}break;case"verdocs-contact-picker":if(!customElements.get(n(e))){g()}break;case"verdocs-flag":if(!customElements.get(n(e))){w()}break;case"verdocs-loader":if(!customElements.get(n(e))){k()}break;case"verdocs-portal":if(!customElements.get(n(e))){E()}break;case"verdocs-spinner":if(!customElements.get(n(e))){S()}break}}))}export{L as V,M as d};
|
|
2
|
+
//# sourceMappingURL=p-Bpe5Awxh.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{p as e,H as t,c as n,h as o,F as r,t as s}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as i,formatFullName as c,getActiveEntitlements as a,isValidEmail as l}from"@verdocs/js-sdk";import{c as f,g as u}from"./p-BFTU3MAI.js";import{B as d}from"./p-C_Xku1v2.js";import{c as h}from"./p-BCwFpXpV.js";import{d as p}from"./p-Bdf8pPWm.js";import{d as m}from"./p-REnrt0JM.js";import{d as b}from"./p-wUsR0Dpa.js";import{d as w}from"./p-DQTI8vRX.js";
|
|
2
|
+
/*! Axios v1.17.0 Copyright (c) 2026 Matt Zabriskie and contributors */var y;var g;function v(){if(g)return y;g=1;function e(e,t){return function n(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype;const{getPrototypeOf:n}=Object;const{iterator:o,toStringTag:r}=Symbol;const s=(e=>n=>{const o=t.call(n);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null));const i=e=>{e=e.toLowerCase();return t=>s(t)===e};const c=e=>t=>typeof t===e;const{isArray:a}=Array;const l=c("undefined");function u(e){return e!==null&&!l(e)&&e.constructor!==null&&!l(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const d=i("ArrayBuffer");function h(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&d(e.buffer)}return t}const p=c("string");const m=c("function");const b=c("number");const w=e=>e!==null&&typeof e==="object";const v=e=>e===true||e===false;const x=e=>{if(s(e)!=="object"){return false}const t=n(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(r in e)&&!(o in e)};const k=e=>{if(!w(e)||u(e)){return false}try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return false}};const O=i("Date");const R=i("File");const E=e=>!!(e&&typeof e.uri!=="undefined");const S=e=>e&&typeof e.getParts!=="undefined";const T=i("Blob");const j=i("FileList");const _=e=>w(e)&&m(e.pipe);function A(){if(typeof globalThis!=="undefined")return globalThis;if(typeof self!=="undefined")return self;if(typeof window!=="undefined")return window;if(typeof f!=="undefined")return f;return{}}const C=A();const F=typeof C.FormData!=="undefined"?C.FormData:undefined;const N=e=>{if(!e)return false;if(F&&e instanceof F)return true;const t=n(e);if(!t||t===Object.prototype)return false;if(!m(e.append))return false;const o=s(e);return o==="formdata"||o==="object"&&m(e.toString)&&e.toString()==="[object FormData]"};const P=i("URLSearchParams");const[U,I,B,D]=["ReadableStream","Request","Response","Headers"].map(i);const L=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function z(e,t,{allOwnKeys:n=false}={}){if(e===null||typeof e==="undefined"){return}let o;let r;if(typeof e!=="object"){e=[e]}if(a(e)){for(o=0,r=e.length;o<r;o++){t.call(null,e[o],o,e)}}else{if(u(e)){return}const r=n?Object.getOwnPropertyNames(e):Object.keys(e);const s=r.length;let i;for(o=0;o<s;o++){i=r[o];t.call(null,e[i],i,e)}}}function M(e,t){if(u(e)){return null}t=t.toLowerCase();const n=Object.keys(e);let o=n.length;let r;while(o-- >0){r=n[o];if(t===r.toLowerCase()){return r}}return null}const q=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:f})();const $=e=>!l(e)&&e!==q;function H(...e){const{caseless:t,skipUndefined:n}=$(this)&&this||{};const o={};const r=(e,r)=>{if(r==="__proto__"||r==="constructor"||r==="prototype"){return}const s=t&&typeof r==="string"&&M(o,r)||r;const i=ne(o,s)?o[s]:undefined;if(x(i)&&x(e)){o[s]=H(i,e)}else if(x(e)){o[s]=H({},e)}else if(a(e)){o[s]=e.slice()}else if(!n||!l(e)){o[s]=e}};for(let t=0,n=e.length;t<n;t++){const n=e[t];if(!n||u(n)){continue}z(n,r);if(typeof n!=="object"||a(n)){continue}const o=Object.getOwnPropertySymbols(n);for(let e=0;e<o.length;e++){const t=o[e];if(oe.call(n,t)){r(n[t],t)}}}return o}const J=(t,n,o,{allOwnKeys:r}={})=>{z(n,((n,r)=>{if(o&&m(n)){Object.defineProperty(t,r,{__proto__:null,value:e(n,o),writable:true,enumerable:true,configurable:true})}else{Object.defineProperty(t,r,{__proto__:null,value:n,writable:true,enumerable:true,configurable:true})}}),{allOwnKeys:r});return t};const K=e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};const X=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o);Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:true,enumerable:false,configurable:true});Object.defineProperty(e,"super",{__proto__:null,value:t.prototype});n&&Object.assign(e.prototype,n)};const W=(e,t,o,r)=>{let s;let i;let c;const a={};t=t||{};if(e==null)return t;do{s=Object.getOwnPropertyNames(e);i=s.length;while(i-- >0){c=s[i];if((!r||r(c,e,t))&&!a[c]){t[c]=e[c];a[c]=true}}e=o!==false&&n(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t};const V=(e,t,n)=>{e=String(e);if(n===undefined||n>e.length){n=e.length}n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n};const G=e=>{if(!e)return null;if(a(e))return e;let t=e.length;if(!b(t))return null;const n=new Array(t);while(t-- >0){n[t]=e[t]}return n};const Z=(e=>t=>e&&t instanceof e)(typeof Uint8Array!=="undefined"&&n(Uint8Array));const Q=(e,t)=>{const n=e&&e[o];const r=n.call(e);let s;while((s=r.next())&&!s.done){const n=s.value;t.call(e,n[0],n[1])}};const Y=(e,t)=>{let n;const o=[];while((n=e.exec(t))!==null){o.push(n)}return o};const ee=i("HTMLFormElement");const te=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,n,o){return n.toUpperCase()+o}));const ne=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype);const{propertyIsEnumerable:oe}=Object.prototype;const re=i("RegExp");const se=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e);const o={};z(n,((n,r)=>{let s;if((s=t(n,r,e))!==false){o[r]=s||n}}));Object.defineProperties(e,o)};const ie=e=>{se(e,((t,n)=>{if(m(e)&&["arguments","caller","callee"].includes(n)){return false}const o=e[n];if(!m(o))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}}}))};const ce=(e,t)=>{const n={};const o=e=>{e.forEach((e=>{n[e]=true}))};a(e)?o(e):o(String(e).split(t));return n};const ae=()=>{};const le=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function fe(e){return!!(e&&m(e.append)&&e[r]==="FormData"&&e[o])}const ue=e=>{const t=new WeakSet;const n=e=>{if(w(e)){if(t.has(e)){return}if(u(e)){return e}if(!("toJSON"in e)){t.add(e);const o=a(e)?[]:{};z(e,((e,t)=>{const r=n(e);!l(r)&&(o[t]=r)}));t.delete(e);return o}}return e};return n(e)};const de=i("AsyncFunction");const he=e=>e&&(w(e)||m(e))&&m(e.then)&&m(e.catch);const pe=((e,t)=>{if(e){return setImmediate}return t?((e,t)=>{q.addEventListener("message",(({source:n,data:o})=>{if(n===q&&o===e){t.length&&t.shift()()}}),false);return n=>{t.push(n);q.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",m(q.postMessage));const me=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(q):typeof process!=="undefined"&&process.nextTick||pe;const be=e=>e!=null&&m(e[o]);var we={isArray:a,isArrayBuffer:d,isBuffer:u,isFormData:N,isArrayBufferView:h,isString:p,isNumber:b,isBoolean:v,isObject:w,isPlainObject:x,isEmptyObject:k,isReadableStream:U,isRequest:I,isResponse:B,isHeaders:D,isUndefined:l,isDate:O,isFile:R,isReactNativeBlob:E,isReactNative:S,isBlob:T,isRegExp:re,isFunction:m,isStream:_,isURLSearchParams:P,isTypedArray:Z,isFileList:j,forEach:z,merge:H,extend:J,trim:L,stripBOM:K,inherits:X,toFlatObject:W,kindOf:s,kindOfTest:i,endsWith:V,toArray:G,forEachEntry:Q,matchAll:Y,isHTMLForm:ee,hasOwnProperty:ne,hasOwnProp:ne,reduceDescriptors:se,freezeMethods:ie,toObjectSet:ce,toCamelCase:te,noop:ae,toFiniteNumber:le,findKey:M,global:q,isContextDefined:$,isSpecCompliantForm:fe,toJSONObject:ue,isAsyncFn:de,isThenable:he,setImmediate:pe,asap:me,isIterable:be};const ye=we.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var ge=e=>{const t={};let n;let o;let r;e&&e.split("\n").forEach((function e(s){r=s.indexOf(":");n=s.substring(0,r).trim().toLowerCase();o=s.substring(r+1).trim();if(!n||t[n]&&ye[n]){return}if(n==="set-cookie"){if(t[n]){t[n].push(o)}else{t[n]=[o]}}else{t[n]=t[n]?t[n]+", "+o:o}}));return t};function ve(e){let t=0;let n=e.length;while(t<n){const n=e.charCodeAt(t);if(n!==9&&n!==32){break}t+=1}while(n>t){const t=e.charCodeAt(n-1);if(t!==9&&t!==32){break}n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const xe=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g");const ke=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Oe(e,t){if(we.isArray(e)){return e.map((e=>Oe(e,t)))}return ve(String(e).replace(t,""))}const Re=e=>Oe(e,xe);const Ee=e=>Oe(e,ke);function Se(e){const t=Object.create(null);we.forEach(e.toJSON(),((e,n)=>{t[n]=Ee(e)}));return t}const Te=Symbol("internals");function je(e){return e&&String(e).trim().toLowerCase()}function _e(e){if(e===false||e==null){return e}return we.isArray(e)?e.map(_e):Re(String(e))}function Ae(e){const t=Object.create(null);const n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;while(o=n.exec(e)){t[o[1]]=o[2]}return t}const Ce=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fe(e,t,n,o,r){if(we.isFunction(o)){return o.call(this,t,n)}if(r){t=n}if(!we.isString(t))return;if(we.isString(o)){return t.indexOf(o)!==-1}if(we.isRegExp(o)){return o.test(t)}}function Ne(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}function Pe(e,t){const n=we.toCamelCase(" "+t);["get","set","has"].forEach((o=>{Object.defineProperty(e,o+n,{__proto__:null,value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:true})}))}class Ue{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(e,t,n){const r=je(t);if(!r){return}const s=we.findKey(o,r);if(!s||o[s]===undefined||n===true||n===undefined&&o[s]!==false){o[s||t]=_e(e)}}const s=(e,t)=>we.forEach(e,((e,n)=>r(e,n,t)));if(we.isPlainObject(e)||e instanceof this.constructor){s(e,t)}else if(we.isString(e)&&(e=e.trim())&&!Ce(e)){s(ge(e),t)}else if(we.isObject(e)&&we.isIterable(e)){let n={},o,r;for(const t of e){if(!we.isArray(t)){throw new TypeError("Object iterator must return a key-value pair")}n[r=t[0]]=(o=n[r])?we.isArray(o)?[...o,t[1]]:[o,t[1]]:t[1]}s(n,t)}else{e!=null&&r(t,e,n)}return this}get(e,t){e=je(e);if(e){const n=we.findKey(this,e);if(n){const e=this[n];if(!t){return e}if(t===true){return Ae(e)}if(we.isFunction(t)){return t.call(this,e,n)}if(we.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=je(e);if(e){const n=we.findKey(this,e);return!!(n&&this[n]!==undefined&&(!t||Fe(this,this[n],n,t)))}return false}delete(e,t){const n=this;let o=false;function r(e){e=je(e);if(e){const r=we.findKey(n,e);if(r&&(!t||Fe(n,n[r],r,t))){delete n[r];o=true}}}if(we.isArray(e)){e.forEach(r)}else{r(e)}return o}clear(e){const t=Object.keys(this);let n=t.length;let o=false;while(n--){const r=t[n];if(!e||Fe(this,this[r],r,e,true)){delete this[r];o=true}}return o}normalize(e){const t=this;const n={};we.forEach(this,((o,r)=>{const s=we.findKey(n,r);if(s){t[s]=_e(o);delete t[r];return}const i=e?Ne(r):String(r).trim();if(i!==r){delete t[r]}t[i]=_e(o);n[i]=true}));return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);we.forEach(this,((n,o)=>{n!=null&&n!==false&&(t[o]=e&&we.isArray(n)?n.join(", "):n)}));return t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);t.forEach((e=>n.set(e)));return n}static accessor(e){const t=this[Te]=this[Te]={accessors:{}};const n=t.accessors;const o=this.prototype;function r(e){const t=je(e);if(!n[t]){Pe(o,e);n[t]=true}}we.isArray(e)?e.forEach(r):r(e);return this}}Ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);we.reduceDescriptors(Ue.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}));we.freezeMethods(Ue);const Ie="[REDACTED ****]";function Be(e){if(we.hasOwnProp(e,"toJSON")){return true}let t=Object.getPrototypeOf(e);while(t&&t!==Object.prototype){if(we.hasOwnProp(t,"toJSON")){return true}t=Object.getPrototypeOf(t)}return false}function De(e,t){const n=new Set(t.map((e=>String(e).toLowerCase())));const o=[];const r=e=>{if(e===null||typeof e!=="object")return e;if(we.isBuffer(e))return e;if(o.indexOf(e)!==-1)return undefined;if(e instanceof Ue){e=e.toJSON()}o.push(e);let t;if(we.isArray(e)){t=[];e.forEach(((e,n)=>{const o=r(e);if(!we.isUndefined(o)){t[n]=o}}))}else{if(!we.isPlainObject(e)&&Be(e)){o.pop();return e}t=Object.create(null);for(const[o,s]of Object.entries(e)){const e=n.has(o.toLowerCase())?Ie:r(s);if(!we.isUndefined(e)){t[o]=e}}}o.pop();return t};return r(e)}class Le extends Error{static from(e,t,n,o,r,s){const i=new Le(e.message,t||e.code,n,o,r);i.cause=e;i.name=e.name;if(e.status!=null&&i.status==null){i.status=e.status}s&&Object.assign(i,s);return i}constructor(e,t,n,o,r){super(e);Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:true,writable:true,configurable:true});this.name="AxiosError";this.isAxiosError=true;t&&(this.code=t);n&&(this.config=n);o&&(this.request=o);if(r){this.response=r;this.status=r.status}}toJSON(){const e=this.config;const t=e&&we.hasOwnProp(e,"redact")?e.redact:undefined;const n=we.isArray(t)&&t.length>0?De(e,t):we.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}}Le.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Le.ERR_BAD_OPTION="ERR_BAD_OPTION";Le.ECONNABORTED="ECONNABORTED";Le.ETIMEDOUT="ETIMEDOUT";Le.ECONNREFUSED="ECONNREFUSED";Le.ERR_NETWORK="ERR_NETWORK";Le.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Le.ERR_DEPRECATED="ERR_DEPRECATED";Le.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Le.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Le.ERR_CANCELED="ERR_CANCELED";Le.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Le.ERR_INVALID_URL="ERR_INVALID_URL";Le.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var ze=null;function Me(e){return we.isPlainObject(e)||we.isArray(e)}function qe(e){return we.endsWith(e,"[]")?e.slice(0,-2):e}function $e(e,t,n){if(!e)return t;return e.concat(t).map((function e(t,o){t=qe(t);return!n&&o?"["+t+"]":t})).join(n?".":"")}function He(e){return we.isArray(e)&&!e.some(Me)}const Je=we.toFlatObject(we,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function Ke(e,t,n){if(!we.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;n=we.toFlatObject(n,{metaTokens:true,dots:false,indexes:false},false,(function e(t,n){return!we.isUndefined(n[t])}));const o=n.metaTokens;const r=n.visitor||u;const s=n.dots;const i=n.indexes;const c=n.Blob||typeof Blob!=="undefined"&&Blob;const a=n.maxDepth===undefined?100:n.maxDepth;const l=c&&we.isSpecCompliantForm(t);if(!we.isFunction(r)){throw new TypeError("visitor must be a function")}function f(e){if(e===null)return"";if(we.isDate(e)){return e.toISOString()}if(we.isBoolean(e)){return e.toString()}if(!l&&we.isBlob(e)){throw new Le("Blob is not supported. Use a Buffer instead.")}if(we.isArrayBuffer(e)||we.isTypedArray(e)){return l&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function u(e,n,r){let c=e;if(we.isReactNative(t)&&we.isReactNativeBlob(e)){t.append($e(r,n,s),f(e));return false}if(e&&!r&&typeof e==="object"){if(we.endsWith(n,"{}")){n=o?n:n.slice(0,-2);e=JSON.stringify(e)}else if(we.isArray(e)&&He(e)||(we.isFileList(e)||we.endsWith(n,"[]"))&&(c=we.toArray(e))){n=qe(n);c.forEach((function e(o,r){!(we.isUndefined(o)||o===null)&&t.append(i===true?$e([n],r,s):i===null?n:n+"[]",f(o))}));return false}}if(Me(e)){return true}t.append($e(r,n,s),f(e));return false}const d=[];const h=Object.assign(Je,{defaultVisitor:u,convertValue:f,isVisitable:Me});function p(e,n,o=0){if(we.isUndefined(e))return;if(o>a){throw new Le("Object is too deeply nested ("+o+" levels). Max depth: "+a,Le.ERR_FORM_DATA_DEPTH_EXCEEDED)}if(d.indexOf(e)!==-1){throw new Error("Circular reference detected in "+n.join("."))}d.push(e);we.forEach(e,(function e(s,i){const c=!(we.isUndefined(s)||s===null)&&r.call(t,s,we.isString(i)?i.trim():i,n,h);if(c===true){p(s,n?n.concat(i):[i],o+1)}}));d.pop()}if(!we.isObject(e)){throw new TypeError("data must be an object")}p(e);return t}function Xe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,(function e(n){return t[n]}))}function We(e,t){this._pairs=[];e&&Ke(e,this,t)}const Ve=We.prototype;Ve.append=function e(t,n){this._pairs.push([t,n])};Ve.toString=function e(t){const n=t?function(e){return t.call(this,e,Xe)}:Xe;return this._pairs.map((function e(t){return n(t[0])+"="+n(t[1])}),"").join("&")};function Ge(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ze(e,t,n){if(!t){return e}const o=n&&n.encode||Ge;const r=we.isFunction(n)?{serialize:n}:n;const s=r&&r.serialize;let i;if(s){i=s(t,r)}else{i=we.isURLSearchParams(t)?t.toString():new We(t,r).toString(o)}if(i){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Qe{constructor(){this.handlers=[]}use(e,t,n){this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(e){if(this.handlers[e]){this.handlers[e]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(e){we.forEach(this.handlers,(function t(n){if(n!==null){e(n)}}))}}var Ye={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false,legacyInterceptorReqResOrdering:true,advertiseZstdAcceptEncoding:false};var et=typeof URLSearchParams!=="undefined"?URLSearchParams:We;var tt=typeof FormData!=="undefined"?FormData:null;var nt=typeof Blob!=="undefined"?Blob:null;var ot={isBrowser:true,classes:{URLSearchParams:et,FormData:tt,Blob:nt},protocols:["http","https","file","blob","url","data"]};const rt=typeof window!=="undefined"&&typeof document!=="undefined";const st=typeof navigator==="object"&&navigator||undefined;const it=rt&&(!st||["ReactNative","NativeScript","NS"].indexOf(st.product)<0);const ct=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const at=rt&&window.location.href||"http://localhost";var lt=Object.freeze({__proto__:null,hasBrowserEnv:rt,hasStandardBrowserEnv:it,hasStandardBrowserWebWorkerEnv:ct,navigator:st,origin:at});var ft={...lt,...ot};function ut(e,t){return Ke(e,new ft.classes.URLSearchParams,{visitor:function(e,t,n,o){if(ft.isNode&&we.isBuffer(e)){this.append(t,e.toString("base64"));return false}return o.defaultVisitor.apply(this,arguments)},...t})}function dt(e){return we.matchAll(/\w+|\[(\w*)]/g,e).map((e=>e[0]==="[]"?"":e[1]||e[0]))}function ht(e){const t={};const n=Object.keys(e);let o;const r=n.length;let s;for(o=0;o<r;o++){s=n[o];t[s]=e[s]}return t}function pt(e){function t(e,n,o,r){let s=e[r++];if(s==="__proto__")return true;const i=Number.isFinite(+s);const c=r>=e.length;s=!s&&we.isArray(o)?o.length:s;if(c){if(we.hasOwnProp(o,s)){o[s]=we.isArray(o[s])?o[s].concat(n):[o[s],n]}else{o[s]=n}return!i}if(!we.hasOwnProp(o,s)||!we.isObject(o[s])){o[s]=[]}const a=t(e,n,o[s],r);if(a&&we.isArray(o[s])){o[s]=ht(o[s])}return!i}if(we.isFormData(e)&&we.isFunction(e.entries)){const n={};we.forEachEntry(e,((e,o)=>{t(dt(e),o,n,0)}));return n}return null}const mt=(e,t)=>e!=null&&we.hasOwnProp(e,t)?e[t]:undefined;function bt(e,t,n){if(we.isString(e)){try{(0,JSON.parse)(e);return we.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(n||JSON.stringify)(e)}const wt={transitional:Ye,adapter:["xhr","http","fetch"],transformRequest:[function e(t,n){const o=n.getContentType()||"";const r=o.indexOf("application/json")>-1;const s=we.isObject(t);if(s&&we.isHTMLForm(t)){t=new FormData(t)}const i=we.isFormData(t);if(i){return r?JSON.stringify(pt(t)):t}if(we.isArrayBuffer(t)||we.isBuffer(t)||we.isStream(t)||we.isFile(t)||we.isBlob(t)||we.isReadableStream(t)){return t}if(we.isArrayBufferView(t)){return t.buffer}if(we.isURLSearchParams(t)){n.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let c;if(s){const e=mt(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1){return ut(t,e).toString()}if((c=we.isFileList(t))||o.indexOf("multipart/form-data")>-1){const n=mt(this,"env");const o=n&&n.FormData;return Ke(c?{"files[]":t}:t,o&&new o,e)}}if(s||r){n.setContentType("application/json",false);return bt(t)}return t}],transformResponse:[function e(t){const n=mt(this,"transitional")||wt.transitional;const o=n&&n.forcedJSONParsing;const r=mt(this,"responseType");const s=r==="json";if(we.isResponse(t)||we.isReadableStream(t)){return t}if(t&&we.isString(t)&&(o&&!r||s)){const e=n&&n.silentJSONParsing;const o=!e&&s;try{return JSON.parse(t,mt(this,"parseReviver"))}catch(e){if(o){if(e.name==="SyntaxError"){throw Le.from(e,Le.ERR_BAD_RESPONSE,this,null,mt(this,"response"))}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};we.forEach(["delete","get","head","post","put","patch","query"],(e=>{wt.headers[e]={}}));function yt(e,t){const n=this||wt;const o=t||n;const r=Ue.from(o.headers);let s=o.data;we.forEach(e,(function e(o){s=o.call(n,s,r.normalize(),t?t.status:undefined)}));r.normalize();return s}function gt(e){return!!(e&&e.__CANCEL__)}class vt extends Le{constructor(e,t,n){super(e==null?"canceled":e,Le.ERR_CANCELED,t,n);this.name="CanceledError";this.__CANCEL__=true}}function xt(e,t,n){const o=n.config.validateStatus;if(!n.status||!o||o(n.status)){e(n)}else{t(new Le("Request failed with status code "+n.status,n.status>=400&&n.status<500?Le.ERR_BAD_REQUEST:Le.ERR_BAD_RESPONSE,n.config,n.request,n))}}function kt(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Ot(e,t){e=e||10;const n=new Array(e);const o=new Array(e);let r=0;let s=0;let i;t=t!==undefined?t:1e3;return function c(a){const l=Date.now();const f=o[s];if(!i){i=l}n[r]=a;o[r]=l;let u=s;let d=0;while(u!==r){d+=n[u++];u=u%e}r=(r+1)%e;if(r===s){s=(s+1)%e}if(l-i<t){return}const h=f&&l-f;return h?Math.round(d*1e3/h):undefined}}function Rt(e,t){let n=0;let o=1e3/t;let r;let s;const i=(t,o=Date.now())=>{n=o;r=null;if(s){clearTimeout(s);s=null}e(...t)};const c=(...e)=>{const t=Date.now();const c=t-n;if(c>=o){i(e,t)}else{r=e;if(!s){s=setTimeout((()=>{s=null;i(r)}),o-c)}}};const a=()=>r&&i(r);return[c,a]}const Et=(e,t,n=3)=>{let o=0;const r=Ot(50,250);return Rt((n=>{if(!n||typeof n.loaded!=="number"){return}const s=n.loaded;const i=n.lengthComputable?n.total:undefined;const c=i!=null?Math.min(s,i):s;const a=Math.max(0,c-o);const l=r(a);o=Math.max(o,c);const f={loaded:c,total:i,progress:i?c/i:undefined,bytes:a,rate:l?l:undefined,estimated:l&&i?(i-c)/l:undefined,event:n,lengthComputable:i!=null,[t?"download":"upload"]:true};e(f)}),n)};const St=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]};const Tt=e=>(...t)=>we.asap((()=>e(...t)));var jt=ft.hasStandardBrowserEnv?((e,t)=>n=>{n=new URL(n,ft.origin);return e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)})(new URL(ft.origin),ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent)):()=>true;var _t=ft.hasStandardBrowserEnv?{write(e,t,n,o,r,s,i){if(typeof document==="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];if(we.isNumber(n)){c.push(`expires=${new Date(n).toUTCString()}`)}if(we.isString(o)){c.push(`path=${o}`)}if(we.isString(r)){c.push(`domain=${r}`)}if(s===true){c.push("secure")}if(we.isString(i)){c.push(`SameSite=${i}`)}document.cookie=c.join("; ")},read(e){if(typeof document==="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const o=t[n].replace(/^\s+/,"");const r=o.indexOf("=");if(r!==-1&&o.slice(0,r)===e){return decodeURIComponent(o.slice(r+1))}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function At(e){if(typeof e!=="string"){return false}return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ct(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ft(e,t,n){let o=!At(t);if(e&&(o||n===false)){return Ct(e,t)}return t}const Nt=e=>e instanceof Ue?{...e}:e;function Pt(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:false,writable:true,configurable:true});function o(e,t,n,o){if(we.isPlainObject(e)&&we.isPlainObject(t)){return we.merge.call({caseless:o},e,t)}else if(we.isPlainObject(t)){return we.merge({},t)}else if(we.isArray(t)){return t.slice()}return t}function r(e,t,n,r){if(!we.isUndefined(t)){return o(e,t,n,r)}else if(!we.isUndefined(e)){return o(undefined,e,n,r)}}function s(e,t){if(!we.isUndefined(t)){return o(undefined,t)}}function i(e,t){if(!we.isUndefined(t)){return o(undefined,t)}else if(!we.isUndefined(e)){return o(undefined,e)}}function c(n,r,s){if(we.hasOwnProp(t,s)){return o(n,r)}else if(we.hasOwnProp(e,s)){return o(undefined,n)}}const a={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:c,headers:(e,t,n)=>r(Nt(e),Nt(t),n,true)};we.forEach(Object.keys({...e,...t}),(function o(s){if(s==="__proto__"||s==="constructor"||s==="prototype")return;const i=we.hasOwnProp(a,s)?a[s]:r;const l=we.hasOwnProp(e,s)?e[s]:undefined;const f=we.hasOwnProp(t,s)?t[s]:undefined;const u=i(l,f,s);we.isUndefined(u)&&i!==c||(n[s]=u)}));return n}const Ut=["content-type","content-length"];function It(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach((([t,n])=>{if(Ut.includes(t.toLowerCase())){e.set(t,n)}}))}const Bt=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,((e,t)=>String.fromCharCode(parseInt(t,16))));function Dt(e){const t=Pt({},e);const n=e=>we.hasOwnProp(t,e)?t[e]:undefined;const o=n("data");let r=n("withXSRFToken");const s=n("xsrfHeaderName");const i=n("xsrfCookieName");let c=n("headers");const a=n("auth");const l=n("baseURL");const f=n("allowAbsoluteUrls");const u=n("url");t.headers=c=Ue.from(c);t.url=Ze(Ft(l,u,f),n("params"),n("paramsSerializer"));if(a){c.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?Bt(a.password):"")))}if(we.isFormData(o)){if(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv||we.isReactNative(o)){c.setContentType(undefined)}else if(we.isFunction(o.getHeaders)){It(c,o.getHeaders(),n("formDataHeaderPolicy"))}}if(ft.hasStandardBrowserEnv){if(we.isFunction(r)){r=r(t)}const e=r===true||r==null&&jt(t.url);if(e){const e=s&&i&&_t.read(i);if(e){c.set(s,e)}}}return t}const Lt=typeof XMLHttpRequest!=="undefined";var zt=Lt&&function(e){return new Promise((function t(n,o){const r=Dt(e);let s=r.data;const i=Ue.from(r.headers).normalize();let{responseType:c,onUploadProgress:a,onDownloadProgress:l}=r;let f;let u,d;let h,p;function m(){h&&h();p&&p();r.cancelToken&&r.cancelToken.unsubscribe(f);r.signal&&r.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(r.method.toUpperCase(),r.url,true);b.timeout=r.timeout;function w(){if(!b){return}const t=Ue.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders());const r=!c||c==="text"||c==="json"?b.responseText:b.response;const s={data:r,status:b.status,statusText:b.statusText,headers:t,config:e,request:b};xt((function e(t){n(t);m()}),(function e(t){o(t);m()}),s);b=null}if("onloadend"in b){b.onloadend=w}else{b.onreadystatechange=function e(){if(!b||b.readyState!==4){return}if(b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))){return}setTimeout(w)}}b.onabort=function t(){if(!b){return}o(new Le("Request aborted",Le.ECONNABORTED,e,b));m();b=null};b.onerror=function t(n){const r=n&&n.message?n.message:"Network Error";const s=new Le(r,Le.ERR_NETWORK,e,b);s.event=n||null;o(s);m();b=null};b.ontimeout=function t(){let n=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||Ye;if(r.timeoutErrorMessage){n=r.timeoutErrorMessage}o(new Le(n,s.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,e,b));m();b=null};s===undefined&&i.setContentType(null);if("setRequestHeader"in b){we.forEach(Se(i),(function e(t,n){b.setRequestHeader(n,t)}))}if(!we.isUndefined(r.withCredentials)){b.withCredentials=!!r.withCredentials}if(c&&c!=="json"){b.responseType=r.responseType}if(l){[d,p]=Et(l,true);b.addEventListener("progress",d)}if(a&&b.upload){[u,h]=Et(a);b.upload.addEventListener("progress",u);b.upload.addEventListener("loadend",h)}if(r.cancelToken||r.signal){f=t=>{if(!b){return}o(!t||t.type?new vt(null,e,b):t);b.abort();m();b=null};r.cancelToken&&r.cancelToken.subscribe(f);if(r.signal){r.signal.aborted?f():r.signal.addEventListener("abort",f)}}const y=kt(r.url);if(y&&!ft.protocols.includes(y)){o(new Le("Unsupported protocol "+y+":",Le.ERR_BAD_REQUEST,e));return}b.send(s||null)}))};const Mt=(e,t)=>{e=e?e.filter(Boolean):[];if(!t&&!e.length){return}const n=new AbortController;let o=false;const r=function(e){if(!o){o=true;i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Le?t:new vt(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null;r(new Le(`timeout of ${t}ms exceeded`,Le.ETIMEDOUT))}),t);const i=()=>{if(!e){return}s&&clearTimeout(s);s=null;e.forEach((e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}));e=null};e.forEach((e=>e.addEventListener("abort",r)));const{signal:c}=n;c.unsubscribe=()=>we.asap(i);return c};const qt=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0;let r;while(o<n){r=o+t;yield e.slice(o,r);o=r}};const $t=async function*(e,t){for await(const n of Ht(e)){yield*qt(n,t)}};const Ht=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e){break}yield n}}finally{await t.cancel()}};const Jt=(e,t,n,o)=>{const r=$t(e,t);let s=0;let i;let c=e=>{if(!i){i=true;o&&o(e)}};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await r.next();if(t){c();e.close();return}let i=o.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(o))}catch(e){c(e);throw e}},cancel(e){c(e);return r.return()}},{highWaterMark:2})};function Kt(e){if(!e||typeof e!=="string")return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t);const o=e.slice(t+1);const r=/;base64/i.test(n);if(r){let e=o.length;const t=o.length;for(let n=0;n<t;n++){if(o.charCodeAt(n)===37&&n+2<t){const t=o.charCodeAt(n+1);const r=o.charCodeAt(n+2);const s=(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102);if(s){e-=2;n+=2}}}let n=0;let r=t-1;const s=e=>e>=2&&o.charCodeAt(e-2)===37&&o.charCodeAt(e-1)===51&&(o.charCodeAt(e)===68||o.charCodeAt(e)===100);if(r>=0){if(o.charCodeAt(r)===61){n++;r--}else if(s(r)){n++;r-=3}}if(n===1&&r>=0){if(o.charCodeAt(r)===61){n++}else if(s(r)){n++}}const i=Math.floor(e/4);const c=i*3-(n||0);return c>0?c:0}if(typeof Buffer!=="undefined"&&typeof Buffer.byteLength==="function"){return Buffer.byteLength(o,"utf8")}let s=0;for(let e=0,t=o.length;e<t;e++){const n=o.charCodeAt(e);if(n<128){s+=1}else if(n<2048){s+=2}else if(n>=55296&&n<=56319&&e+1<t){const t=o.charCodeAt(e+1);if(t>=56320&&t<=57343){s+=4;e++}else{s+=3}}else{s+=3}}return s}const Xt="1.17.0";const Wt=64*1024;const{isFunction:Vt}=we;const Gt=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,((e,t)=>String.fromCharCode(parseInt(t,16))));const Zt=e=>{if(!we.isString(e)){return e}try{return decodeURIComponent(e)}catch(t){return e}};const Qt=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const Yt=e=>{const t=e.indexOf("://");let n=e;if(t!==-1){n=n.slice(t+3)}return n.includes("@")||n.includes(":")};const en=e=>{const t=we.global!==undefined&&we.global!==null?we.global:globalThis;const{ReadableStream:n,TextEncoder:o}=t;e=we.merge.call({skipUndefined:true},{Request:t.Request,Response:t.Response},e);const{fetch:r,Request:s,Response:i}=e;const c=r?Vt(r):typeof fetch==="function";const a=Vt(s);const l=Vt(i);if(!c){return false}const f=c&&Vt(n);const u=c&&(typeof o==="function"?(e=>t=>e.encode(t))(new o):async e=>new Uint8Array(await new s(e).arrayBuffer()));const d=a&&f&&Qt((()=>{let e=false;const t=new s(ft.origin,{body:new n,method:"POST",get duplex(){e=true;return"half"}});const o=t.headers.has("Content-Type");if(t.body!=null){t.body.cancel()}return e&&!o}));const h=l&&f&&Qt((()=>we.isReadableStream(new i("").body)));const p={stream:h&&(e=>e.body)};c&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!p[e]&&(p[e]=(t,n)=>{let o=t&&t[e];if(o){return o.call(t)}throw new Le(`Response type '${e}' is not supported`,Le.ERR_NOT_SUPPORT,n)})}))})();const m=async e=>{if(e==null){return 0}if(we.isBlob(e)){return e.size}if(we.isSpecCompliantForm(e)){const t=new s(ft.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(we.isArrayBufferView(e)||we.isArrayBuffer(e)){return e.byteLength}if(we.isURLSearchParams(e)){e=e+""}if(we.isString(e)){return(await u(e)).byteLength}};const b=async(e,t)=>{const n=we.toFiniteNumber(e.getContentLength());return n==null?m(t):n};return async e=>{let{url:t,method:n,data:c,signal:l,cancelToken:f,timeout:u,onDownloadProgress:m,onUploadProgress:w,responseType:y,headers:g,withCredentials:v="same-origin",fetchOptions:x,maxContentLength:k,maxBodyLength:O}=Dt(e);const R=we.isNumber(k)&&k>-1;const E=we.isNumber(O)&&O>-1;const S=t=>we.hasOwnProp(e,t)?e[t]:undefined;let T=r||fetch;y=y?(y+"").toLowerCase():"text";let j=Mt([l,f&&f.toAbortSignal()],u);let _=null;const A=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let C;try{let r=undefined;const l=S("auth");if(l){const e=l.username||"";const t=l.password||"";r={username:e,password:t}}if(Yt(t)){const e=new URL(t,ft.origin);if(!r&&(e.username||e.password)){const t=Zt(e.username);const n=Zt(e.password);r={username:t,password:n}}if(e.username||e.password){e.username="";e.password="";t=e.href}}if(r){g.delete("authorization");g.set("Authorization","Basic "+btoa(Gt((r.username||"")+":"+(r.password||""))))}if(R&&typeof t==="string"&&t.startsWith("data:")){const n=Kt(t);if(n>k){throw new Le("maxContentLength size of "+k+" exceeded",Le.ERR_BAD_RESPONSE,e,_)}}if(E&&n!=="get"&&n!=="head"){const t=await b(g,c);if(typeof t==="number"&&isFinite(t)&&t>O){throw new Le("Request body larger than maxBodyLength limit",Le.ERR_BAD_REQUEST,e,_)}}if(w&&d&&n!=="get"&&n!=="head"&&(C=await b(g,c))!==0){let e=new s(t,{method:"POST",body:c,duplex:"half"});let n;if(we.isFormData(c)&&(n=e.headers.get("content-type"))){g.setContentType(n)}if(e.body){const[t,n]=St(C,Et(Tt(w)));c=Jt(e.body,Wt,t,n)}}if(!we.isString(v)){v=v?"include":"omit"}const f=a&&"credentials"in s.prototype;if(we.isFormData(c)){const e=g.getContentType();if(e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)){g.delete("content-type")}}g.set("User-Agent","axios/"+Xt,false);const u={...x,signal:j,method:n.toUpperCase(),headers:Se(g.normalize()),body:c,duplex:"half",credentials:f?v:undefined};_=a&&new s(t,u);let F=await(a?T(_,x):T(t,u));if(R){const t=we.toFiniteNumber(F.headers.get("content-length"));if(t!=null&&t>k){throw new Le("maxContentLength size of "+k+" exceeded",Le.ERR_BAD_RESPONSE,e,_)}}const N=h&&(y==="stream"||y==="response");if(h&&F.body&&(m||R||N&&A)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=F[e]}));const n=we.toFiniteNumber(F.headers.get("content-length"));const[o,r]=m&&St(n,Et(Tt(m),true))||[];let s=0;const c=t=>{if(R){s=t;if(s>k){throw new Le("maxContentLength size of "+k+" exceeded",Le.ERR_BAD_RESPONSE,e,_)}}o&&o(t)};F=new i(Jt(F.body,Wt,c,(()=>{r&&r();A&&A()})),t)}y=y||"text";let P=await p[we.findKey(p,y)||"text"](F,e);if(R&&!h&&!N){let t;if(P!=null){if(typeof P.byteLength==="number"){t=P.byteLength}else if(typeof P.size==="number"){t=P.size}else if(typeof P==="string"){t=typeof o==="function"?(new o).encode(P).byteLength:P.length}}if(typeof t==="number"&&t>k){throw new Le("maxContentLength size of "+k+" exceeded",Le.ERR_BAD_RESPONSE,e,_)}}!N&&A&&A();return await new Promise(((t,n)=>{xt(t,n,{data:P,headers:Ue.from(F.headers),status:F.status,statusText:F.statusText,config:e,request:_})}))}catch(t){A&&A();if(j&&j.aborted&&j.reason instanceof Le){const n=j.reason;n.config=e;_&&(n.request=_);t!==n&&(n.cause=t);throw n}if(t&&t.name==="TypeError"&&/Load failed|fetch/i.test(t.message)){throw Object.assign(new Le("Network Error",Le.ERR_NETWORK,e,_,t&&t.response),{cause:t.cause||t})}throw Le.from(t,t&&t.code,e,_,t&&t.response)}}};const tn=new Map;const nn=e=>{let t=e&&e.env||{};const{fetch:n,Request:o,Response:r}=t;const s=[o,r,n];let i=s.length,c=i,a,l,f=tn;while(c--){a=s[c];l=f.get(a);l===undefined&&f.set(a,l=c?new Map:en(t));f=l}return l};nn();const on={http:ze,xhr:zt,fetch:{get:nn}};we.forEach(on,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}}));const rn=e=>`- ${e}`;const sn=e=>we.isFunction(e)||e===null||e===false;function cn(e,t){e=we.isArray(e)?e:[e];const{length:n}=e;let o;let r;const s={};for(let i=0;i<n;i++){o=e[i];let n;r=o;if(!sn(o)){r=on[(n=String(o)).toLowerCase()];if(r===undefined){throw new Le(`Unknown adapter '${n}'`)}}if(r&&(we.isFunction(r)||(r=r.get(t)))){break}s[n||"#"+i]=r}if(!r){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build")));let t=n?e.length>1?"since :\n"+e.map(rn).join("\n"):" "+rn(e[0]):"as no adapter specified";throw new Le(`There is no suitable adapter to dispatch the request `+t,"ERR_NOT_SUPPORT")}return r}var an={getAdapter:cn,adapters:on};function ln(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new vt(null,e)}}function fn(e){ln(e);e.headers=Ue.from(e.headers);e.data=yt.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=an.getAdapter(e.adapter||wt.adapter,e);return t(e).then((function t(n){ln(e);e.response=n;try{n.data=yt.call(e,e.transformResponse,n)}finally{delete e.response}n.headers=Ue.from(n.headers);return n}),(function t(n){if(!gt(n)){ln(e);if(n&&n.response){e.response=n.response;try{n.response.data=yt.call(e,e.transformResponse,n.response)}finally{delete e.response}n.response.headers=Ue.from(n.response.headers)}}return Promise.reject(n)}))}const un={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{un[e]=function n(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}}));const dn={};un.transitional=function e(t,n,o){function r(e,t){return"[Axios v"+Xt+"] Transitional option '"+e+"'"+t+(o?". "+o:"")}return(e,o,s)=>{if(t===false){throw new Le(r(o," has been removed"+(n?" in "+n:"")),Le.ERR_DEPRECATED)}if(n&&!dn[o]){dn[o]=true;console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))}return t?t(e,o,s):true}};un.spelling=function e(t){return(e,n)=>{console.warn(`${n} is likely a misspelling of ${t}`);return true}};function hn(e,t,n){if(typeof e!=="object"){throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE)}const o=Object.keys(e);let r=o.length;while(r-- >0){const s=o[r];const i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:undefined;if(i){const t=e[s];const n=t===undefined||i(t,s,e);if(n!==true){throw new Le("option "+s+" must be "+n,Le.ERR_BAD_OPTION_VALUE)}continue}if(n!==true){throw new Le("Unknown option "+s,Le.ERR_BAD_OPTION)}}}var pn={assertOptions:hn,validators:un};const mn=pn.validators;class bn{constructor(e){this.defaults=e||{};this.interceptors={request:new Qe,response:new Qe}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=(()=>{if(!t.stack){return""}const e=t.stack.indexOf("\n");return e===-1?"":t.stack.slice(e+1)})();try{if(!e.stack){e.stack=n}else if(n){const t=n.indexOf("\n");const o=t===-1?-1:n.indexOf("\n",t+1);const r=o===-1?"":n.slice(o+1);if(!String(e.stack).endsWith(r)){e.stack+="\n"+n}}}catch(e){}}throw e}}_request(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Pt(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;if(n!==undefined){pn.assertOptions(n,{silentJSONParsing:mn.transitional(mn.boolean),forcedJSONParsing:mn.transitional(mn.boolean),clarifyTimeoutError:mn.transitional(mn.boolean),legacyInterceptorReqResOrdering:mn.transitional(mn.boolean),advertiseZstdAcceptEncoding:mn.transitional(mn.boolean)},false)}if(o!=null){if(we.isFunction(o)){t.paramsSerializer={serialize:o}}else{pn.assertOptions(o,{encode:mn.function,serialize:mn.function},true)}}if(t.allowAbsoluteUrls!==undefined);else if(this.defaults.allowAbsoluteUrls!==undefined){t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls}else{t.allowAbsoluteUrls=true}pn.assertOptions(t,{baseUrl:mn.spelling("baseURL"),withXsrfToken:mn.spelling("withXSRFToken")},true);t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=r&&we.merge(r.common,r[t.method]);r&&we.forEach(["delete","get","head","post","put","patch","query","common"],(e=>{delete r[e]}));t.headers=Ue.concat(s,r);const i=[];let c=true;this.interceptors.request.forEach((function e(n){if(typeof n.runWhen==="function"&&n.runWhen(t)===false){return}c=c&&n.synchronous;const o=t.transitional||Ye;const r=o&&o.legacyInterceptorReqResOrdering;if(r){i.unshift(n.fulfilled,n.rejected)}else{i.push(n.fulfilled,n.rejected)}}));const a=[];this.interceptors.response.forEach((function e(t){a.push(t.fulfilled,t.rejected)}));let l;let f=0;let u;if(!c){const e=[fn.bind(this),undefined];e.unshift(...i);e.push(...a);u=e.length;l=Promise.resolve(t);while(f<u){l=l.then(e[f++],e[f++])}return l}u=i.length;let d=t;while(f<u){const e=i[f++];const t=i[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{l=fn.call(this,d)}catch(e){return Promise.reject(e)}f=0;u=a.length;while(f<u){l=l.then(a[f++],a[f++])}return l}getUri(e){e=Pt(this.defaults,e);const t=Ft(e.baseURL,e.url,e.allowAbsoluteUrls);return Ze(t,e.params,e.paramsSerializer)}}we.forEach(["delete","get","head","options"],(function e(t){bn.prototype[t]=function(e,n){return this.request(Pt(n||{},{method:t,url:e,data:(n||{}).data}))}}));we.forEach(["post","put","patch","query"],(function e(t){function n(e){return function n(o,r,s){return this.request(Pt(s||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}bn.prototype[t]=n();if(t!=="query"){bn.prototype[t+"Form"]=n(true)}}));class wn{constructor(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}let t;this.promise=new Promise((function e(n){t=n}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;while(t-- >0){n._listeners[t](e)}n._listeners=null}));this.promise.then=e=>{let t;const o=new Promise((e=>{n.subscribe(e);t=e})).then(e);o.cancel=function e(){n.unsubscribe(t)};return o};e((function e(o,r,s){if(n.reason){return}n.reason=new vt(o,r,s);t(n.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}}unsubscribe(e){if(!this._listeners){return}const t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}toAbortSignal(){const e=new AbortController;const t=t=>{e.abort(t)};this.subscribe(t);e.signal.unsubscribe=()=>this.unsubscribe(t);return e.signal}static source(){let e;const t=new wn((function t(n){e=n}));return{token:t,cancel:e}}}function yn(e){return function t(n){return e.apply(null,n)}}function gn(e){return we.isObject(e)&&e.isAxiosError===true}const vn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(vn).forEach((([e,t])=>{vn[t]=e}));function xn(t){const n=new bn(t);const o=e(bn.prototype.request,n);we.extend(o,bn.prototype,n,{allOwnKeys:true});we.extend(o,n,null,{allOwnKeys:true});o.create=function e(n){return xn(Pt(t,n))};return o}const kn=xn(wt);kn.Axios=bn;kn.CanceledError=vt;kn.CancelToken=wn;kn.isCancel=gt;kn.VERSION=Xt;kn.toFormData=Ke;kn.AxiosError=Le;kn.Cancel=kn.CanceledError;kn.all=function e(t){return Promise.all(t)};kn.spread=yn;kn.isAxiosError=gn;kn.mergeConfig=Pt;kn.AxiosHeaders=Ue;kn.formToJSON=e=>pt(we.isHTMLForm(e)?new FormData(e):e);kn.getAdapter=an.getAdapter;kn.HttpStatusCode=vn;kn.default=kn;y=kn;return y}var x=v();var k=u(x);const O=d.includes(window.location.origin)?"default:development.6348f953f52485d19daf03992f2123a36e9eae59c5ca7f8736dc2b67":"default:production.4808a77b2a149e1796391b480b4fb501d73aa1e11123f60e07809ced";const R=()=>k.get("https://unleash.verdocs.com/api/frontend",{headers:{Accept:"application/json",Authorization:O}}).then((e=>e.data)).catch((e=>{console.log("Unleash: Unable to fetch feature flags",e);throw e}));const E=()=>`verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{gap:12px;width:300px;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#f5f5fa}verdocs-contact-picker form .row{gap:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:start;align-items:flex-start}verdocs-contact-picker form .row .option{gap:4px;display:-ms-flexbox;display:flex;padding:5px 8px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;text-wrap:nowrap}verdocs-contact-picker form .names-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .names-row>input{font-size:14px;width:88px}verdocs-contact-picker form .pin-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .pin-code>input{-ms-flex:0 0 197px;flex:0 0 197px;font-size:14px}verdocs-contact-picker form .address{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .address>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form .zip-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .zip-code>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 80px;flex:0 0 80px;font-size:13px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message textarea{width:100%;padding:5px 7px;border-radius:4px;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}#verdocs-contact-picker-suggestions .dropdown{max-height:225px;overflow-y:scroll;background:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}#verdocs-contact-picker-suggestions .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-contact-picker-suggestions .dropdown .suggestion svg{width:32px;height:32px}#verdocs-contact-picker-suggestions .dropdown .suggestion .avatar{width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px;margin-right:8px;border-radius:100%}#verdocs-contact-picker-suggestions .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#verdocs-contact-picker-suggestions .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}#verdocs-contact-picker-suggestions .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}#verdocs-contact-picker-suggestions .dropdown .suggestion:hover{background:#eee;cursor:pointer}`;const S=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-user"><path d="M15 13a3 3 0 1 0-6 0"/><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/><circle cx="12" cy="8" r="2"/></svg>`;const T=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.searchContacts=n(this,"searchContacts");this.exit=n(this,"exit");this.next=n(this,"next");this.endpoint=i.getDefault();this.templateRole=null;this.contactSuggestions=[];this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.name_locked=false;this.auth_methods=[];this.passcode="";this.firstNameFieldId=`verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2,11)}`;this.lastNameFieldId=`verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2,11)}`;this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`;this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`;this.featureFlags=null;this.activeEntitlements={}}componentWillLoad(){this.endpoint.loadSession();if(this.templateRole){const e=c(this.templateRole);const t=e.split(" ");const n=this.templateRole.first_name||t.shift()||"";const o=this.templateRole.last_name||t.join(" ")||"";this.first_name=n;this.last_name=o;this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.name_locked=this.delegator?false:this.templateRole.name_locked||false;this.message=this.templateRole.message||"";this.showMessage=this.message!=="";this.auth_methods=this.templateRole.auth_methods||[];this.passcode=this.templateRole.passcode||""}a(this.endpoint).then((e=>{this.activeEntitlements=e;console.log("[CONTACT PICKER] Loaded entitlements",e)})).catch((e=>console.log("[CONTACT PICKER] Error loading entitlements, some features may be disabled.",e)));R().then((e=>{this.featureFlags=e;console.log("[CONTACT PICKER] Loaded feature flags",e)})).catch((e=>{console.log("[CONTACT PICKER] Unable to fetch feature flags, some features may be disabled.",e)}))}handleFirstNameChange(e){var t;this.first_name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.first_name})}handleLastNameChange(e){var t;this.last_name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.last_name})}handleCancel(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.exit)===null||t===void 0?void 0:t.emit()}handleSubmit(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,name_locked:this.name_locked,auth_methods:this.auth_methods,passcode:this.passcode,address:this.address,zip:this.zip})}handleSelectSuggestion(e,t){e.stopPropagation();this.first_name=t.first_name;this.last_name=t.last_name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false}render(){var e,t,n,s,i,a,f,u,d,p,m,b,w,y,g,v,x,k;const O=this.first_name&&this.last_name&&l(this.email);const R=!this.auth_methods.length||this.auth_methods.includes("passcode")&&!!this.passcode||this.auth_methods.includes("kba")&&!!this.first_name&&!!this.last_name||this.auth_methods.includes("email")&&!!this.email||this.auth_methods.includes("sms")&&!!this.phone;const E=O&&R;const T=((n=(t=(e=this.featureFlags)===null||e===void 0?void 0:e.toggles)===null||t===void 0?void 0:t.find((e=>e.name==="sms")))===null||n===void 0?void 0:n.enabled)===true;const j=[];if(((a=(i=(s=this.featureFlags)===null||s===void 0?void 0:s.toggles)===null||i===void 0?void 0:i.find((e=>e.name==="passcode-verification")))===null||a===void 0?void 0:a.enabled)===true){j.push({label:"Passcode",value:"passcode"})}if(((d=(u=(f=this.featureFlags)===null||f===void 0?void 0:f.toggles)===null||u===void 0?void 0:u.find((e=>e.name==="email-verification")))===null||d===void 0?void 0:d.enabled)===true){j.push({label:"Email",value:"email"})}if(T&&((b=(m=(p=this.featureFlags)===null||p===void 0?void 0:p.toggles)===null||m===void 0?void 0:m.find((e=>e.name==="sms-verification")))===null||b===void 0?void 0:b.enabled)===true&&!!this.activeEntitlements.sms_auth){j.push({label:"SMS (One-Time Code)",value:"sms"})}if(((g=(y=(w=this.featureFlags)===null||w===void 0?void 0:w.toggles)===null||y===void 0?void 0:y.find((e=>e.name==="kba-verification")))===null||g===void 0?void 0:g.enabled)===true&&!!this.activeEntitlements.kba_auth){j.push({label:"Knowledge-Based (KBA)",value:"kba"})}if(((k=(x=(v=this.featureFlags)===null||v===void 0?void 0:v.toggles)===null||x===void 0?void 0:x.find((e=>e.name==="id-verification")))===null||k===void 0?void 0:k.enabled)===true&&!!this.activeEntitlements.id_auth){j.push({label:"ID Check",value:"id"})}return o("form",{key:"374d6f0907e09a4c312bcd666eaabf578f8671b5",onSubmit:e=>e.preventDefault(),autocomplete:"off"},o("div",{key:"bbdb01e7229992ff75b3b124fde6a8606769d53c",class:"row"},o("label",{key:"546da7ec599b17cc2e514dcaf47fe41d7107ec11",htmlFor:this.firstNameFieldId},"Name:"),o("div",{key:"e5819a8cb2c261c302a4923561578c5928063e64",class:"names-row"},o("input",{key:"05a471f19b8018993d50f4ba9776864392c13c9d",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.first_name,placeholder:"First...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleFirstNameChange(e)}),o("input",{key:"4e56ab4161e6bd7894c636619282915243c8aeec",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.last_name,placeholder:"Last...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleLastNameChange(e)})),this.showSuggestions&&o("verdocs-portal",{key:"0a856517832b4dc417627675a0327e5a5e9e4710",anchor:this.firstNameFieldId,onClickAway:()=>{this.showSuggestions=false;document.querySelectorAll(`.verdocs-portal-wrapper`).forEach((e=>e.remove()))},id:"verdocs-contact-picker-suggestions"},o("div",{key:"6c0c1747e5ed512ad463c26f220b34db395e8f2c",class:"dropdown"},this.contactSuggestions.filter((e=>!this.first_name||e.first_name.toLowerCase().includes(this.first_name.toLowerCase()))).map((e=>{var t;return o("div",{key:(t=e.id)!==null&&t!==void 0?t:e.email,class:"suggestion",onClick:t=>this.handleSelectSuggestion(t,e)},e.picture?o("img",{alt:"Avatar",class:"avatar",src:e.picture}):o("div",{class:"avatar",innerHTML:S}),o("div",{class:"details"},o("div",{class:"name"},c(e)),e.email&&o("div",{class:"destination"},e.email),e.phone&&o("div",{class:"destination"},e.phone)))}))))),o("div",{key:"85552b20424fb4884fa88d22c78375fe5c6513e0",class:"row"},o("label",{key:"2b438ee30f3c0115d0445e3f5bfe4ae8b7635073",htmlFor:this.emailFieldId},"Email:"),o("input",{key:"a349fb9e534ed7786268d9aac9184fc38a8a102e",id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked","aria-autocomplete":"none",value:this.email,placeholder:"Invite/verify via email...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.email=e.target.value})),T&&o("div",{key:"f015a535d0a37d94eb73b145342d00dde7b63a50",class:"row"},o("label",{key:"eff877e183e38de65ca11e535b81e11b5ee1bd92",htmlFor:this.phoneFieldId},"Phone:"),o("input",{key:"41db6e4607189c0b0da0ef658b1fbafcfeab92ba",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked","aria-autocomplete":"none",value:this.phone,placeholder:"Invite/verify via SMS...",onFocus:()=>this.showSuggestions=false,onInput:e=>{this.phone=h(e.target.value)}})),o(r,{key:"c037e234e206b1cd45bf91649f211ebe42f885fe"},j.length>0&&o("div",{key:"23fa9db672498199d7c053b258669e0676852322",class:"row pin-code"},o("label",{key:"d5208d3cd083716589aa6c18dbd85ba88ca208b3"},"Verification Methods:"),o("div",{key:"f239551b28d2ca51b8f9ab5ec64bfdfdce4bf823"},j.map(((e,t)=>o("div",{class:"option"},o("verdocs-checkbox",{size:"small",id:`verdocs-multi-select-opt-${t}`,value:e.value,checked:this.auth_methods.includes(e.value),onInput:t=>{if(t.target.checked){this.auth_methods=[...this.auth_methods,e.value]}else{this.auth_methods=this.auth_methods.filter((t=>t!==e.value))}}}),o("label",{htmlFor:`verdocs-multi-select-option-${t}`},e.label)))))),this.auth_methods.includes("passcode")&&o("div",{key:"d57e7078dfefb1c816a15c52a8aa44eae62a5557",class:"row pin-code"},o("label",{key:"df97978ae0e4c176c7d6ca38850537d3d6db5ce3",htmlFor:this.phoneFieldId},"Passcode:"),o("input",{key:"7791e5a2d856bdd9dbbfcf8c339531e3e5c5e52b",id:"verdocs-passcode",name:"verdocs-passcode",type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.passcode,placeholder:"4-8 digits recommended...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.passcode=e.target.value}))),o("div",{key:"7de2d50963399db273bd1d38941ea967a2d92827",class:"row pin-code"},o("label",{key:"d0202a6e0969b405d303cdc291dee95048460b43",style:{marginTop:"6px"}},"Options:"),o("div",{key:"52f68972a5fee697972fa9baa284ca6a37830ab9"},o("div",{key:"8e15a3caa1e4ce0cbb943fb7bfaaf274d4410de3",class:"option"},o("verdocs-checkbox",{key:"7d21cafec340458f1c6a06b577fad30bbd5680eb",size:"small",id:"verdocs-delegator",checked:this.delegator,disabled:this.name_locked,onInput:e=>{this.delegator=e.target.checked;if(this.delegator)this.name_locked=false}}),o("label",{key:"2b96fb477ce41038cf9d115e9fabf102d670d801",htmlFor:"verdocs-delegator"},"May delegate signing")),o("div",{key:"7f616562ee03e6026bf09b355ae20720b45655b0",class:"option"},o("verdocs-checkbox",{key:"47bfa40e403ddf6da8cba33fda8ebff05625d353",size:"small",id:"verdocs-name-locked",checked:this.name_locked,disabled:this.delegator,onInput:e=>{this.name_locked=e.target.checked;if(this.name_locked)this.delegator=false}}),o("label",{key:"382d0b92f8999dc1a0adaa91d00c6c0f95a17552",htmlFor:"verdocs-name-locked"},"Name locked")))),o("div",{key:"6797886d95d1e08dc0c018e89cf6040aa60b02ff",class:"row message"},o("label",{key:"cb6f04c40e1b6601d0292e248b26cb4f2519e7d9",htmlFor:"verdocs-contact-picker-message"},"Message:"),o("textarea",{key:"018a9162f52e73650283a7f2271a99352008085c",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message","data-lpignore":"true",autocomplete:"blocked",placeholder:"Optional message to include in invitation...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.message=e.target.value},this.message)),o("div",{key:"d2f04563ad450f4c6c0c19735a064d01182cf458",class:"buttons"},o("div",{key:"43f240077f3c5b3e252c60a277668c94c9163b24",class:"flex-fill"}),o("verdocs-button",{key:"f758cb6d10b3deb58d13aaf54c212e6455933104",variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),o("verdocs-button",{key:"3aa451a2d6d23ada4a7a5ddb5843b22954b69161",label:"OK",size:"small",disabled:!E,onClick:!E?()=>{}:e=>this.handleSubmit(e)})))}static get style(){return E()}},[0,"verdocs-contact-picker",{endpoint:[16],templateRole:[16],contactSuggestions:[16],first_name:[32],last_name:[32],email:[32],phone:[32],zip:[32],address:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32],name_locked:[32],auth_methods:[32],passcode:[32],firstNameFieldId:[32],lastNameFieldId:[32],emailFieldId:[32],phoneFieldId:[32],featureFlags:[32],activeEntitlements:[32]}]);function j(){if(typeof customElements==="undefined"){return}const e=["verdocs-contact-picker","verdocs-button","verdocs-checkbox","verdocs-flag","verdocs-portal"];e.forEach((e=>{switch(e){case"verdocs-contact-picker":if(!customElements.get(s(e))){customElements.define(s(e),T)}break;case"verdocs-button":if(!customElements.get(s(e))){p()}break;case"verdocs-checkbox":if(!customElements.get(s(e))){m()}break;case"verdocs-flag":if(!customElements.get(s(e))){b()}break;case"verdocs-portal":if(!customElements.get(s(e))){w()}break}}))}export{T as V,j as d};
|
|
3
|
+
//# sourceMappingURL=p-DeQsR41s.js.map
|