@verdocs/web-sdk 1.9.0 → 1.9.2
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/{Templates-111c6bae.js → Templates-e96f3799.js} +2 -2
- package/dist/cjs/{Templates-111c6bae.js.map → Templates-e96f3799.js.map} +1 -1
- package/dist/cjs/{VerdocsEndpoint-859be227.js → VerdocsEndpoint-0dcde19d.js} +4 -2
- package/dist/cjs/VerdocsEndpoint-0dcde19d.js.map +1 -0
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-document-page_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-create_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-properties.cjs.entry.js +1 -1
- package/dist/components/Templates.js +1 -1
- package/dist/components/Templates.js.map +1 -1
- package/dist/components/VerdocsEndpoint.js +3 -1
- package/dist/components/VerdocsEndpoint.js.map +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{Templates-22116158.js → Templates-b21d67ac.js} +2 -2
- package/dist/esm/{Templates-22116158.js.map → Templates-b21d67ac.js.map} +1 -1
- package/dist/esm/{VerdocsEndpoint-9db225a3.js → VerdocsEndpoint-9acb111c.js} +4 -2
- package/dist/esm/VerdocsEndpoint-9acb111c.js.map +1 -0
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-document-page_3.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +2 -2
- package/dist/esm/verdocs-quick-functions_3.entry.js +2 -2
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-create_2.entry.js +1 -1
- package/dist/esm/verdocs-template-fields.entry.js +2 -2
- package/dist/esm/verdocs-template-properties.entry.js +1 -1
- package/dist/esm-es5/Templates-b21d67ac.js +2 -0
- package/dist/esm-es5/Templates-b21d67ac.js.map +1 -0
- package/dist/esm-es5/{VerdocsEndpoint-9db225a3.js → VerdocsEndpoint-9acb111c.js} +1 -1
- package/dist/esm-es5/VerdocsEndpoint-9acb111c.js.map +1 -0
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-document-page_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-9621659f.system.entry.js → p-00cbcb4e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-9621659f.system.entry.js.map → p-00cbcb4e.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-02b8feef.system.js +2 -0
- package/dist/verdocs-web-sdk/p-02b8feef.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-625b652b.system.entry.js → p-07f9dc48.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-625b652b.system.entry.js.map → p-07f9dc48.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-0e9450cd.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-5c5f51d0.entry.js → p-0e95328a.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-5c5f51d0.entry.js.map → p-0e95328a.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-a3ab0ddc.js → p-10d804cf.js} +1 -1
- package/dist/verdocs-web-sdk/p-10d804cf.js.map +1 -0
- package/dist/verdocs-web-sdk/p-19f6c997.js +2 -0
- package/dist/verdocs-web-sdk/p-19f6c997.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-cc9c9e0a.system.entry.js → p-2a99e4f6.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-cc9c9e0a.system.entry.js.map → p-2a99e4f6.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-8d45cd72.entry.js → p-3d189e0a.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-8d45cd72.entry.js.map → p-3d189e0a.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-e23a07e1.entry.js → p-3ffc6172.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-e23a07e1.entry.js.map → p-3ffc6172.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-cb87e087.entry.js → p-4118a026.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-cb87e087.entry.js.map → p-4118a026.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-52ddaceb.entry.js → p-42fcd6ea.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-52ddaceb.entry.js.map → p-42fcd6ea.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-0f1e7a03.system.entry.js → p-47b67754.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0f1e7a03.system.entry.js.map → p-47b67754.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-0e916a9f.system.entry.js → p-522d9bc0.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0e916a9f.system.entry.js.map → p-522d9bc0.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-70e1e6bf.system.entry.js → p-55fbb4b2.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-70e1e6bf.system.entry.js.map → p-55fbb4b2.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-572039e2.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-8a338d80.entry.js.map → p-572039e2.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-b5c0cc2f.system.entry.js → p-65ec779c.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-b5c0cc2f.system.entry.js.map → p-65ec779c.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-5ef55baa.system.entry.js → p-72caf72a.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-5ef55baa.system.entry.js.map → p-72caf72a.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-cfe0b3ca.system.js → p-7a63bdd1.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-7a63bdd1.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-3ac17b4d.entry.js → p-7fb1f63a.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-3ac17b4d.entry.js.map → p-7fb1f63a.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-93cb13a3.entry.js → p-82b2f059.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-93cb13a3.entry.js.map → p-82b2f059.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/p-892f1969.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-f0617648.entry.js.map → p-892f1969.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-17b11009.entry.js → p-9a6c1aa2.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-17b11009.entry.js.map → p-9a6c1aa2.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-93ef8f9d.system.entry.js → p-a636fd87.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-93ef8f9d.system.entry.js.map → p-a636fd87.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-3060c58f.system.entry.js → p-a7df258a.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-3060c58f.system.entry.js.map → p-a7df258a.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-426ac808.system.entry.js → p-bba4878d.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-426ac808.system.entry.js.map → p-bba4878d.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-cee969b9.entry.js → p-df84c85a.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-cee969b9.entry.js.map → p-df84c85a.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-8d8106a0.system.entry.js → p-f0a4aba9.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-8d8106a0.system.entry.js.map → p-f0a4aba9.system.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/{p-56a7c62b.entry.js → p-f8550043.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-56a7c62b.entry.js.map → p-f8550043.entry.js.map} +0 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/VerdocsEndpoint-859be227.js.map +0 -1
- package/dist/esm/VerdocsEndpoint-9db225a3.js.map +0 -1
- package/dist/esm-es5/Templates-22116158.js +0 -2
- package/dist/esm-es5/Templates-22116158.js.map +0 -1
- package/dist/esm-es5/VerdocsEndpoint-9db225a3.js.map +0 -1
- package/dist/verdocs-web-sdk/p-710f8562.js +0 -2
- package/dist/verdocs-web-sdk/p-710f8562.js.map +0 -1
- package/dist/verdocs-web-sdk/p-8a338d80.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-a3ab0ddc.js.map +0 -1
- package/dist/verdocs-web-sdk/p-c2e155d4.system.js +0 -2
- package/dist/verdocs-web-sdk/p-c2e155d4.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-cfe0b3ca.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f0617648.entry.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h}from"./index-275ee459.js";import"./Types-ab9f6af8.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h}from"./index-275ee459.js";import"./Types-ab9f6af8.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-9acb111c.js";var verdocsTemplatePropertiesCss='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';var VerdocsTemplateProperties=function(){function e(e){registerInstance(this,e);this.cancel=createEvent(this,"cancel",7);this.endpoint=VerdocsEndpoint.getDefault();this.templateRole=null;this.sendReminders=false}e.prototype.componentWillLoad=function(){};e.prototype.handleNameChange=function(e){console.log(e)};e.prototype.handleMessageChange=function(e){console.log(e)};e.prototype.handleCancel=function(e){var o;e.stopPropagation();(o=this.cancel)===null||o===void 0?void 0:o.emit()};e.prototype.handleSubmit=function(e){e.stopPropagation()};e.prototype.render=function(){var e=this;return h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("h5",null,"Template Name"),h("fieldset",null,h("verdocs-text-input",{value:"Motor Vehicle Bill of Sale",autocomplete:"off"})),h("h5",null,"Reminders"),h("fieldset",null,h("div",{class:"input-row"},h("label",null,"Send Automatic Reminders"),h("verdocs-checkbox",{name:"automatic-reminders",checked:true})),h("div",{class:"input-row"},h("label",null,"Days Before First Reminder"),h("verdocs-text-input",{value:"1"})),h("div",{class:"input-row"},h("label",null,"Days Between Reminders"),h("verdocs-text-input",{value:"1"}))),h("h5",null,"Template Visibility"),h("fieldset",null,h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:true,value:"private"}),h("label",{htmlFor:"verdocs-radio-button-visibility-private"},h("div",{class:"title"},"Private"),h("div",{class:"description"},"Only you can share and use this template"))),h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:true,value:"shared"}),h("label",{htmlFor:"verdocs-radio-button-visibility-shared"},h("div",{class:"title"},"Shared to your organization"),h("div",{class:"description"},"Give access to your organization to share and use this template"))),h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:true,value:"shared_public"}),h("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},h("div",{class:"title"},"Shared to your organization and Public"),h("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:true,value:"public"}),h("label",{htmlFor:"verdocs-radio-button-visibility-public"},h("div",{class:"title"},"Public"),h("div",{class:"description"},"Anyone on the Web can find and use this template")))),h("div",{class:"buttons"},h("div",{class:"flex-fill"}),h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onPress:function(o){return e.handleCancel(o)}}),h("verdocs-button",{label:"OK",size:"small",onPress:function(o){return e.handleSubmit(o)}})))};return e}();VerdocsTemplateProperties.style=verdocsTemplatePropertiesCss;export{VerdocsTemplateProperties as verdocs_template_properties};
|
|
2
2
|
//# sourceMappingURL=verdocs-template-properties.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,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(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-87379bb2.system.js","./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?n(e.value):o(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,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(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;o=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-87379bb2.system.js","./p-02b8feef.system.js","./p-a7433630.system.js","./p-7a63bdd1.system.js","./p-a4041773.system.js","./p-187b20b7.system.js"],(function(e){"use strict";var t,n,r,o,i,s,a,l,u;return{setters:[function(e){t=e.r;n=e.c;r=e.h;o=e.H},function(e){i=e.g},function(){},function(e){s=e.V},function(e){a=e.r;l=e.a},function(e){u=e.S}],execute:function(){var c="";var d=e("verdocs_preview",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.endpoint=s.getDefault();this.templateId=null;this.pdfUrl=null;this.template=null;this.roles=[];this.fields=[]}e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,o,s;var a=this;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);console.log("[PREVIEW] Loading template ".concat(this.templateId));return[4,i(this.endpoint,this.templateId)];case 1:o=l.sent();console.log("[PREVIEW] Got template",this.template);this.template=o;this.pdfUrl="".concat(this.endpoint.getBaseURL(),"/templates/").concat(this.templateId,"/documents/").concat((e=o.template_document)===null||e===void 0?void 0:e.id,"?file=true");this.roles=o.roles.map((function(e){return e.name}));console.log("[PREVIEW] Loaded roles",this.roles);this.fields=[];o.roles.forEach((function(e){var t;(t=a.fields).push.apply(t,e.fields)}));console.log("[PREVIEW] Loaded fields",this.fields);return[3,3];case 2:s=l.sent();console.log("[PREVIEW] Error with preview session",s);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new u(s.message,(n=s.response)===null||n===void 0?void 0:n.status,(r=s.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleFieldChange=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){console.log("[PREVIEW] handleFieldChange",e,t,n);return[2]}))}))};e.prototype.handlePageRendered=function(e){var t=this;var n=e.detail;console.log("[PREVIEW] Page rendered",n);var r=this.fields.filter((function(e){return e.page_sequence===n.renderedPage.pageNumber}));console.log("[PREVIEW] Fields on page",r);r.forEach((function(e){return a(e,n.renderedPage,l(t.roles,e.role_name),t.handleFieldChange,true)}))};e.prototype.render=function(){var e=this;return r(o,null,this.pdfUrl?r("div",{class:"inner"},r("verdocs-view",{source:this.pdfUrl,endpoint:this.endpoint,onPageRendered:function(t){return e.handlePageRendered(t)},pageLayers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})):r("verdocs-loader",null))};return e}());d.style=c}}}));
|
|
2
|
+
//# sourceMappingURL=p-00cbcb4e.system.entry.js.map
|
package/dist/verdocs-web-sdk/{p-9621659f.system.entry.js.map → p-00cbcb4e.system.entry.js.map}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register([],(function(t){"use strict";return{execute:function(){var n=t("a",(function(t,n){return t.api.post("/templates",{params:n}).then((function(t){return t.data}))}));var e=t("g",(function(t,n){return t.api.get("/templates/".concat(n)).then((function(t){return t.data}))}))}}}));
|
|
2
|
+
//# sourceMappingURL=p-02b8feef.system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["node_modules/@verdocs/js-sdk/Templates/Templates.js"],"names":["getTemplates","exports","endpoint","params","api","post","then","r","data","getTemplate","templateId","get","concat"],"mappings":"uEAsDU,IAACA,EAAYC,EAAA,KAAG,SAAUC,EAAUC,GAC1C,OAAOD,EAASE,IACXC,KAAK,aAAc,CAAEF,OAAQA,IAC7BG,MAAK,SAAUC,GAAK,OAAOA,EAAEC,WAW5B,IAACC,EAAWR,EAAA,KAAG,SAAUC,EAAUQ,GACzC,OAAOR,EAASE,IACXO,IAAI,cAAcC,OAAOF,IACzBJ,MAAK,SAAUC,GAAK,OAAOA,EAAEC","sourcesContent":["/**\n * A Template defines how a Verdocs signing flow will be performed, including attachments, signing fields, and\n * recipients.\n *\n * @module\n */\nvar __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 * Get all templates accessible by the caller, with optional filters.\n *\n * ```typescript\n * import {Templates} from '@verdocs/js-sdk/Templates';\n *\n * await Templates.getTemplates();\n * await Templates.getTemplates({ is_starred: true });\n * await Templates.getTemplates({ is_creator: true });\n * await Templates.getTemplates({ is_organization: true });\n * ```\n */\nexport var getTemplates = function (endpoint, params) {\n return endpoint.api //\n .post('/templates', { params: params })\n .then(function (r) { return r.data; });\n};\n/**\n * Get one template by its ID.\n *\n * ```typescript\n * import {Templates} from '@verdocs/js-sdk/Templates';\n *\n * const template = await Templates.getTemplate('83da3d70-7857-4392-b876-c4592a304bc9');\n * ```\n */\nexport var getTemplate = function (endpoint, templateId) {\n return endpoint.api //\n .get(\"/templates/\".concat(templateId))\n .then(function (r) { return r.data; });\n};\n/**\n * Get owner information for a template.\n *\n * ```typescript\n * import {Templates} from '@verdocs/js-sdk/Templates';\n *\n * const template = await Templates.getTemplateOwnerInfo('83da3d70-7857-4392-b876-c4592a304bc9');\n * ```\n */\nexport var getTemplateOwnerInfo = function (endpoint, templateId) {\n return endpoint.api //\n .get(\"/templates/\".concat(templateId))\n .then(function (r) { return r.data; });\n};\n/**\n * Create a template.\n *\n * ```typescript\n * import {Templates} from '@verdocs/js-sdk/Templates';\n *\n * const newTemplate = await Templates.createTemplate({...});\n * ```\n */\nexport var createTemplate = function (endpoint, params) {\n return endpoint.api //\n .post('/templates/', params)\n .then(function (r) { return r.data; });\n};\n/**\n * Update a template.\n *\n * ```typescript\n * import {Templates} from '@verdocs/js-sdk/Templates';\n *\n * const updatedTemplate = await Templates.updateTemplate('83da3d70-7857-4392-b876-c4592a304bc9', { name: 'New Name' });\n * ```\n */\nexport var updateTemplate = function (endpoint, templateId, params) {\n return endpoint.api //\n .put(\"/templates/\".concat(templateId), params)\n .then(function (r) { return r.data; });\n};\n/**\n * Search for templates matching various criteria.\n *\n * ```typescript\n * import {Templates} from '@verdocs/js-sdk/Templates';\n *\n * const {result, page, total} = await Templates.search({ ... });\n * ```\n */\nexport var searchTemplates = function (endpoint, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .post('/templates/search', params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Get a summary of template data, typically used to populate admin panel dashboard pages.\n *\n * ```typescript\n * import {Templates} from '@verdocs/js-sdk/Templates';\n *\n * const summary = await Templates.getSummary(0);\n * ```\n */\nexport var getSummary = function (endpoint, params) {\n if (params === void 0) { params = {}; }\n return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .post('/templates/summary', params)\n .then(function (r) { return r.data; })];\n });\n });\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function l(e){try{a(i.next(e))}catch(e){o(e)}}function r(e){try{a(i["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):s(e.value).then(l,r)}a((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,s,o,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return a([e,t])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,s&&(o=l[0]&2?s["return"]:l[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,l[1])).done)return o;if(s=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;s=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];s=0}finally{i=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-87379bb2.system.js","./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function l(e){try{a(i.next(e))}catch(e){o(e)}}function r(e){try{a(i["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):s(e.value).then(l,r)}a((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,s,o,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return a([e,t])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,s&&(o=l[0]&2?s["return"]:l[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,l[1])).done)return o;if(s=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;s=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];s=0}finally{i=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-87379bb2.system.js","./p-02b8feef.system.js","./p-a7433630.system.js","./p-7efdefa3.system.js","./p-05eb4fed.system.js","./p-7a63bdd1.system.js","./p-a4041773.system.js"],(function(e){"use strict";var t,n,i,s,o,l,r,a,c,d;return{setters:[function(e){t=e.r;n=e.c;i=e.h;s=e.H},function(e){o=e.g},function(){},function(e){l=e.i;r=e.a},function(e){a=e.g},function(e){c=e.V},function(e){d=e.a}],execute:function(){var p='verdocs-send{display:-ms-flexbox;display:flex;padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}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 #97979744}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:#00000089}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;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-direction:row;flex-direction:row}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)}';var u='<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>';var f='<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>';var h='<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>';var v='<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>';var x=e("verdocs_send",function(){function e(e){t(this,e);this.send=n(this,"send",7);this.cancel=n(this,"cancel",7);this.sdkError=n(this,"sdkError",7);this.endpoint=c.getDefault();this.templateId=null;this.template=null;this.pdfUrl=null;this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.recipientsAssigned={};this.levels=[]}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){switch(i.label){case 0:this.sessionContacts=[];i.label=1;case 1:i.trys.push([1,3,,4]);return[4,this.endpoint.loadSession()];case 2:t=i.sent();if((e=t.session)===null||e===void 0?void 0:e.profile){this.sessionContacts.push({id:t.session.profile.id,name:"".concat(t.session.profile.first_name," ").concat(t.session.profile.last_name),email:t.session.profile.email,phone:t.session.profile.phone})}return[3,4];case 3:n=i.sent();console.log("Error loading session",n);return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){switch(i.label){case 0:console.log("[SEND] Showing template",this.templateId);i.label=1;case 1:i.trys.push([1,3,,4]);console.log("[SEND] Loading template ".concat(this.templateId));return[4,o(this.endpoint,this.templateId)];case 2:e=i.sent();console.log("[SEND] Got template",e);this.template=e;if(e===null||e===void 0?void 0:e.roles){t={};e.roles.forEach((function(e){var n=e.sequence-1;t[n]||(t[n]=[]);var i="r-".concat(n,"-").concat(t[n].length);t[n].push(__assign(__assign({},e),{id:i}))}));this.rolesAtLevel=t;this.levels=Object.keys(t).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}return[3,4];case 3:n=i.sent();console.log("[SEND] Error getting template",n);return[3,4];case 4:return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return i("div",{class:"level-icon",innerHTML:f})}else if(e>=this.levels.length){return i("div",{class:"level-icon",innerHTML:v})}else{return i("div",{class:"level-icon",innerHTML:h})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.recipientsAssigned[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t;e.stopPropagation();(t=this.send)===null||t===void 0?void 0:t.emit({recipientsAssigned:Object.values(this.recipientsAssigned)})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t,n,o;var c=((n=(t=this.template)===null||t===void 0?void 0:t.roles)===null||n===void 0?void 0:n.map((function(e){return e.name})))||[];var p=Object.values(this.recipientsAssigned).filter((function(e){console.log("valid email",l(e.email),e.email);console.log("valid phone",r(e.phone),e.phone);return l(e.email)||r(e.phone)})).length>=((o=this.template)===null||o===void 0?void 0:o.roles.length);console.log("assigned",p);return i(s,{class:{}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Document")),this.levels.map((function(t){return i("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.rolesAtLevel[t].map((function(t){var n,s,o;return i("div",{class:"recipient",style:{backgroundColor:a(d(c,t.name))},onClick:function(n){return e.handleClickRole(n,t)}},(s=(n=e.recipientsAssigned[t.id])===null||n===void 0?void 0:n.full_name)!==null&&s!==void 0?s:t.name,i("div",{class:"icon",innerHTML:u}),e.showPickerForId===t.id&&i("verdocs-contact-picker",{onCancel:function(){return e.showPickerForId=""},contactSuggestions:e.sessionContacts,templateRole:(o=e.recipientsAssigned[t.id])!==null&&o!==void 0?o:t,onSearchContacts:function(e){return console.log("Search",e.detail)},onContactSelected:function(n){return e.handleSelectContact(n,t)}}))})))})),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Document Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onPress:function(t){return e.handleCancel(t)}}),i("verdocs-button",{label:"Send",size:"small",disabled:!p,onPress:function(t){return e.handleSend(t)}})))};return e}());x.style=p}}}));
|
|
2
|
+
//# sourceMappingURL=p-07f9dc48.system.entry.js.map
|
package/dist/verdocs-web-sdk/{p-625b652b.system.entry.js.map → p-07f9dc48.system.entry.js.map}
RENAMED
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./p-87379bb2.system.js"],(function(e,t){"use strict";var s,d;return{setters:[function(e){s=e.p;d=e.b}],execute:function(){var e=function(){var e=t.meta.url;var d={};if(e!==""){d.resourcesUrl=new URL(".",e).href}return s(d)};e().then((function(e){return d([["p-
|
|
1
|
+
System.register(["./p-87379bb2.system.js"],(function(e,t){"use strict";var s,d;return{setters:[function(e){s=e.p;d=e.b}],execute:function(){var e=function(){var e=t.meta.url;var d={};if(e!==""){d.resourcesUrl=new URL(".",e).href}return s(d)};e().then((function(e){return d([["p-2a99e4f6.system",[[0,"verdocs-template-fields",{endpoint:[16],templateId:[1,"template-id"],pdfUrl:[32],template:[32]}]]],["p-55fbb4b2.system",[[0,"verdocs-sign",{endpoint:[16],documentId:[1,"document-id"],roleId:[1,"role-id"],inviteCode:[1,"invite-code"],recipient:[32],signerToken:[32],pdfUrl:[32],recipientIndex:[32],document:[32],fields:[32],hasSignature:[32],nextButtonLabel:[32],focusedField:[32]}]]],["p-a7df258a.system",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-55708f28.system",[[0,"verdocs-field-initial",{field:[16],recipient:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],roleindex:[2],tempInitials:[32],focusField:[64]}]]],["p-bba4878d.system",[[0,"verdocs-template-properties",{endpoint:[16],templateRole:[16],sendReminders:[32]}]]],["p-a636fd87.system",[[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],debug:[4],isAuthenticated:[32],displayMode:[32],username:[32],password:[32],loggingIn:[32],activeSession:[32],loginError:[32]}]]],["p-6b9d9505.system",[[0,"verdocs-field-date",{field:[16],recipient:[16],disabled:[4],editable:[4],moveable:[4],roleindex:[2],focused:[32],containerId:[32],focusField:[64]}]]],["p-64128f39.system",[[0,"verdocs-field-textarea",{field:[16],recipient:[16],disabled:[4],editable:[4],moveable:[4],roleindex:[2],focused:[32],focusField:[64]}]]],["p-8442ecb0.system",[[0,"verdocs-field-textbox",{field:[16],recipient:[16],disabled:[4],editable:[4],moveable:[4],roleindex:[2],focused:[32],focusField:[64]}]]],["p-bc69d8cb.system",[[0,"verdocs-field-timestamp",{field:[16],recipient:[16],disabled:[4],editable:[4],moveable:[4],roleindex:[2],focused:[32],focusField:[64]}]]],["p-00cbcb4e.system",[[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"],pdfUrl:[32],template:[32]}]]],["p-522d9bc0.system",[[0,"verdocs-search",{endpoint:[16]}]]],["p-72caf72a.system",[[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-07f9dc48.system",[[0,"verdocs-send",{endpoint:[16],templateId:[1,"template-id"],template:[32],pdfUrl:[32],containerId:[32],rolesAtLevel:[32],showPickerForId:[32],sessionContacts:[32],recipientsAssigned:[32]}]]],["p-055e22bb.system",[[0,"verdocs-field-attachment",{field:[16],recipient:[16],disabled:[4],focusField:[64]}]]],["p-1576ef4a.system",[[0,"verdocs-kba-dialog",{step:[2],steps:[2],helptitle:[1],helptext:[1],mode:[1],label:[1],placeholder:[1],choices:[16],open:[4],response:[32]}]]],["p-da5ac982.system",[[0,"verdocs-field-dropdown",{field:[16],recipient:[16],disabled:[4],focused:[32],focusField:[64]}]]],["p-c066cfca.system",[[0,"verdocs-field-payment",{field:[16],recipient:[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],preparedMessage:[32],signatureUrl:[32]}]]],["p-ead89d7c.system",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-7a4b7e01.system",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-a33d2260.system",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],document:[16],isOpen:[32],recipientStatusIcons:[32],containerId:[32]}]]],["p-ea8d7174.system",[[0,"verdocs-template-card",{template:[16]}]]],["p-941f2438.system",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-1ec85e9b.system",[[0,"verdocs-toggle",{options:[16],theme:[1],selectedOption:[32]}]]],["p-9cf533ab.system",[[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-41eaa962.system",[[0,"verdocs-initial-dialog",{initials:[1],open:[4],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-72201352.system",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],open:[4],cancel:[4]}]]],["p-40f2285a.system",[[0,"verdocs-upload-dialog",{open:[4],draggingOver:[32],decodedFiles:[32]}]]],["p-2f6ccf24.system",[[0,"verdocs-checkbox",{checked:[4],name:[1],value:[1],disabled:[4]}]]],["p-a766c2f2.system",[[4,"verdocs-button-panel",{icon:[1]}],[0,"verdocs-select-input",{value:[1],label:[1],options:[16],disabled:[4],_value:[32]}],[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],type:[1],disabled:[4],_value:[32]}]]],["p-cf52bf08.system",[[0,"verdocs-signature-dialog",{name:[1],open:[4],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-834324b8.system",[[0,"verdocs-field-signature",{field:[16],name:[1],recipient:[16],disabled:[4],editable:[4],moveable:[4],roleindex:[2],tempSignature:[32],focusField:[64]}],[0,"verdocs-toolbar-icon",{text:[1],icon:[1],containerId:[32]}]]],["p-f0a4aba9.system",[[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],filePath:[32]}]]],["p-1e477874.system",[[0,"verdocs-toggle-button",{active:[4],icon:[1],label:[1],size:[1],_active:[32]}]]],["p-2b99935a.system",[[0,"verdocs-dropdown",{options:[16],open:[4],isOpen:[32]}],[0,"verdocs-field-checkbox",{field:[16],recipient:[16],option:[2],disabled:[4]}],[0,"verdocs-field-radio-button",{field:[16],recipient:[16],option:[2],disabled:[4]}]]],["p-65ec779c.system",[[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-be7c61ff.system",[[0,"verdocs-radio-button",{checked:[4],name:[1],value:[1],disabled:[4]}]]],["p-3bdb50d2.system",[[0,"verdocs-template-sender-dialog",{value:[1],open:[4],newValue:[32]}],[0,"verdocs-help-icon",{text:[1],containerId:[32]}]]],["p-47b67754.system",[[0,"verdocs-view",{endpoint:[16],rotation:[2],pageLayers:[16],source:[1],loadProgress:[32],numPages:[32]}],[0,"verdocs-document-page",{pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[2,"virtual-height"],layers:[16],containerId:[32],renderedWidth:[32],renderedHeight:[32],skipFirstNotification:[32]}],[0,"verdocs-loader"]]]],e)}))}}}));
|
|
2
2
|
//# sourceMappingURL=p-0e9450cd.system.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as s,h as t,F as o,H as i}from"./p-865c14e4.js";import{i as n}from"./p-77672ed0.js";import{g as l}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as s,h as t,F as o,H as i}from"./p-865c14e4.js";import{i as n}from"./p-77672ed0.js";import{g as l}from"./p-19f6c997.js";import"./p-8efc9749.js";import{g as r}from"./p-6de76553.js";import{V as a}from"./p-10d804cf.js";import{r as d,a as c}from"./p-7ce27ce2.js";import{s as p}from"./p-1e9b1782.js";import"./p-5f30896e.js";const h='verdocs-template-fields{position:relative;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .fields-bar{height:50px;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;padding:5px 20px;line-height:28px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#46497d}verdocs-template-fields .fields-bar .label{color:#ffffff;font-size:14px;font-weight:bold;margin-right:8px}verdocs-template-fields .fields-bar .icon{margin:0 4px;display:-ms-flexbox;display:flex;-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}verdocs-template-fields .fields-bar .icon svg{fill:#ffffff}verdocs-template-fields .fields-bar .operation{border:none;outline:none;color:#ffffff;cursor:pointer;font-size:16px;margin-left:10px;background:transparent;text-transform:uppercase}verdocs-template-fields .fields-bar .operation:disabled{color:#cccccc;cursor:inherit;pointer-events:none}';const f=(e,s,t)=>{const o=e.style.transform;const i=[...o.matchAll(/(\w+)\(([^)]*)\)/gi)];e.style.transform=[i.filter((e=>e[1]!==s)).map((e=>e[0])),`${s}(${t})`].join(" ")};const g='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';const v='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>';const m='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';const x='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';const b='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';const w='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';const u='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';const q=class{constructor(t){e(this,t);this.save=s(this,"save",7);this.cancel=s(this,"cancel",7);this.sdkError=s(this,"sdkError",7);this.endpoint=a.getDefault();this.templateId=null;this.pdfUrl=null;this.template=null}async componentWillLoad(){var e;try{console.log(`[PREVIEW] Loading template ${this.templateId}`);p.templateId=this.templateId;const s=await l(this.endpoint,this.templateId);console.log("[PREVIEW] Got template",this.template);this.template=s;p.template=this.template;this.pdfUrl=`${this.endpoint.getBaseURL()}/templates/${this.templateId}/documents/${(e=s.template_document)===null||e===void 0?void 0:e.id}?file=true`;p.roleNames=s.roles.map((e=>e.name));console.log("[PREVIEW] Loaded roles",p.roleNames);p.fields=[];s.roles.forEach((e=>{p.fields.push(...e.fields)}));console.log("[PREVIEW] Loaded fields",p.fields)}catch(e){console.log("[PREVIEW] Error with preview session",e)}}componentDidRender(){n.dynamicDrop(true);this.toolbarEl.style.width=`${this.page0El.clientWidth}px`}async handleFieldChange(e,s,t){console.log("[PREVIEW] handleFieldChange",e,s,t)}handlePageRendered(e){const s=e.detail;console.log("[PREVIEW] Page rendered",s);const t=p.fields.filter((e=>e.page_sequence===s.renderedPage.pageNumber));console.log("[PREVIEW] Fields on page",t);t.forEach((e=>{const t=d(e,s.renderedPage,c(p.roleNames,e.role_name),this.handleFieldChange,true,true,true);if(!t){console.log("Skipping partially rendered field",e);return}t.addEventListener("recipientChanged",(e=>{t.setAttribute("roleindex",c(p.roleNames,e.detail))}));t.setAttribute("xScale",s.renderedPage.xScale);t.setAttribute("yScale",s.renderedPage.yScale);n(t).draggable({listeners:{start(e){console.log("drag started",e.type,e.target)},move(e){console.log("moved");const s=+(e.target.getAttribute("posX")||0);const t=+(e.target.getAttribute("posY")||0);const o=+(e.target.getAttribute("xScale")||1);const i=+(e.target.getAttribute("yScale")||1);const n=e.dx/o+s;const l=e.dy/i+t;e.target.setAttribute("posX",n);e.target.setAttribute("posy",l);f(e.target,"translate",`${n}px, ${l}px`)},end(e){console.log("ended",e)}}})}))}render(){const e={template_id:"",name:"test",role_name:"Recipient 1",type:"textbox",required:true,setting:{x:0,y:0},page_sequence:0};return t(i,null,this.pdfUrl?t(o,null,t("div",{class:"fields-bar",ref:e=>this.toolbarEl=e},t("div",{class:"label"},"Add Field:"),t("verdocs-toolbar-icon",{icon:g,text:"Single-line Text Box",onPress:()=>console.log("single press")}),t("verdocs-toolbar-icon",{icon:v,text:"Multi-line Text Box",onPress:()=>console.log("multi press")}),t("verdocs-toolbar-icon",{icon:m,text:"Checkbox",onPress:()=>console.log("check press")}),t("verdocs-toolbar-icon",{icon:x,text:"Radio Button",onPress:()=>console.log("radio press")}),t("verdocs-toolbar-icon",{icon:b,text:"Date Picker",onPress:()=>console.log("date press")}),t("verdocs-toolbar-icon",{icon:w,text:"Signature",onPress:()=>console.log("signature press")}),t("verdocs-toolbar-icon",{icon:u,text:"Initials",onPress:()=>console.log("initial press")}),t("div",{style:{flex:"1"}}),t("button",{onClick:()=>console.log("save"),disabled:true,class:"operation"},"Save"),t("button",{onClick:()=>console.log("close"),class:"operation"},"Close")),t("div",{class:"page-0",ref:e=>this.page0El=e},t("div",{class:"user-placed-fields"},t("div",{class:"title"},"User-Placed Fields"),t("verdocs-field-signature",{field:e,style:{width:"82px",height:"41px",left:"20px",top:"40px",transform:"scale(1,1)",backgroundColor:r(0)},moveable:true,editable:true}))),t("verdocs-view",{source:this.pdfUrl,endpoint:this.endpoint,onPageRendered:e=>this.handlePageRendered(e),pageLayers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})):t("verdocs-loader",null))}};q.style=h;export{q as verdocs_template_fields};
|
|
2
|
+
//# sourceMappingURL=p-0e95328a.entry.js.map
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var t=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;var r=function(r){r=String(r).replace(/[\t\n\f\r ]+/g,"");if(!t.test(r))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");r+="==".slice(2-(r.length&3));var e;var i="";var u;var o;var f=0;for(;f<r.length;){e=n.indexOf(r.charAt(f++))<<18|n.indexOf(r.charAt(f++))<<12|(u=n.indexOf(r.charAt(f++)))<<6|(o=n.indexOf(r.charAt(f++)));i+=u===64?String.fromCharCode(e>>16&255):o===64?String.fromCharCode(e>>16&255,e>>8&255):String.fromCharCode(e>>16&255,e>>8&255,e&255)}return i};var e=function(n){return JSON.parse(r((n||"").split(".")[1]||""))};var i=function(n){var t;try{t=e(n);if(t===null){return null}}catch(n){return null}Object.keys(t).forEach((function(n){if(typeof n==="string"&&n.startsWith("https://verdocs.com/")){t[n.replace("https://verdocs.com/","")]=t[n];delete t[n]}}));return t};var u=undefined&&undefined.__awaiter||function(n,t,r,e){function i(n){return n instanceof r?n:new r((function(t){t(n)}))}return new(r||(r=Promise))((function(r,u){function o(n){try{a(e.next(n))}catch(n){u(n)}}function f(n){try{a(e["throw"](n))}catch(n){u(n)}}function a(n){n.done?r(n.value):i(n.value).then(o,f)}a((e=e.apply(n,t||[])).next())}))};var o=undefined&&undefined.__generator||function(n,t){var r={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},e,i,u,o;return o={next:f(0),throw:f(1),return:f(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function f(n){return function(t){return a([n,t])}}function a(o){if(e)throw new TypeError("Generator is already executing.");while(r)try{if(e=1,i&&(u=o[0]&2?i["return"]:o[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,o[1])).done)return u;if(i=0,u)o=[o[0]&2,u.value];switch(o[0]){case 0:case 1:u=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(u=r.trys,u=u.length>0&&u[u.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!u||o[1]>u[0]&&o[1]<u[3])){r.label=o[1];break}if(o[0]===6&&r.label<u[1]){r.label=u[1];u=o;break}if(u&&r.label<u[2]){r.label=u[2];r.ops.push(o);break}if(u[2])r.ops.pop();r.trys.pop();continue}o=t.call(n,r)}catch(n){o=[6,n];i=0}finally{e=u=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var f=function(n,t){return u(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,n.api.post("/documents",t).then((function(n){return n.data}))]}))}))};var a=function(n,t){return u(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,n.api.post("/documents/summary",{page:t}).then((function(n){return n.data}))]}))}))};var c=function(n,t){return u(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,n.api.post("/documents/search",t).then((function(n){return n.data}))]}))}))};var s=function(n,t){return u(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,n.api.get("/documents/".concat(t.documentId,"/recipients/").concat(encodeURIComponent(t.roleId),"/invitation/").concat(t.inviteCode)).then((function(t){var r,e;var u=((r=t.headers)===null||r===void 0?void 0:r.signer_token)||"";var o=i(u);n.setToken((e=t.headers)===null||e===void 0?void 0:e.signer_token);return{recipient:t.data,session:o,signerToken:u}}))]}))}))};var l=function(n,t){return u(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,n.api.get("/documents/".concat(t,"/recipients")).then((function(n){return n.data}))]}))}))};var v=function(n,t){return u(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,n.api.get("/documents/".concat(t)).then((function(n){return n.data}))]}))}))};var d=function(n,t){return u(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,n.api.put("/documents/".concat(t),{action:"cancel"}).then((function(n){return n.data}))]}))}))};var h=function(n){return!["submitted","canceled","declined"].includes(n.status)};var p=function(n){return((n===null||n===void 0?void 0:n.recipients)||[]).filter(h)};var m=function(n,t){var r;return n.sequence===((r=t===null||t===void 0?void 0:t[0])===null||r===void 0?void 0:r.sequence)};var b=function(n,t){var r;var e=t.find((function(t){return t.email===n}));return e&&e.sequence===((r=t===null||t===void 0?void 0:t[0])===null||r===void 0?void 0:r.sequence)};var w=function(n,t,r){return u(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,n.api.get("/documents/".concat(t,"/envelope_documents/").concat(r,"?file=true"),{responseType:"arraybuffer"}).then((function(n){return Buffer.from(n.data,"binary").toString("base64")}))]}))}))};var y=function(n,t,r,e){return u(void 0,void 0,void 0,(function(){return o(this,(function(i){return[2,n.api.put("/documents/".concat(t,"/fields/").concat(r),e).then((function(n){return n.data}))]}))}))};var g=function(n,t,r,e){return u(void 0,void 0,void 0,(function(){return o(this,(function(i){return[2,n.api.put("/documents/".concat(t,"/fields/").concat(r,"/signature/").concat(e)).then((function(n){return n.data}))]}))}))};const O=Object.freeze({__proto__:null,createDocument:f,getSummary:a,searchDocuments:c,getSigningSession:s,getDocumentRecipients:l,getDocument:v,cancelDocument:d,recipientHasAction:h,getRecipientsWithActions:p,recipientCanAct:m,userCanAct:b,getDocumentFile:w,updateDocumentField:y,updateDocumentFieldSignature:g});var _=undefined&&undefined.__assign||function(){_=Object.assign||function(n){for(var t,r=1,e=arguments.length;r<e;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))n[i]=t[i]}return n};return _.apply(this,arguments)};var S=undefined&&undefined.__awaiter||function(n,t,r,e){function i(n){return n instanceof r?n:new r((function(t){t(n)}))}return new(r||(r=Promise))((function(r,u){function o(n){try{a(e.next(n))}catch(n){u(n)}}function f(n){try{a(e["throw"](n))}catch(n){u(n)}}function a(n){n.done?r(n.value):i(n.value).then(o,f)}a((e=e.apply(n,t||[])).next())}))};var j=undefined&&undefined.__generator||function(n,t){var r={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},e,i,u,o;return o={next:f(0),throw:f(1),return:f(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function f(n){return function(t){return a([n,t])}}function a(o){if(e)throw new TypeError("Generator is already executing.");while(r)try{if(e=1,i&&(u=o[0]&2?i["return"]:o[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,o[1])).done)return u;if(i=0,u)o=[o[0]&2,u.value];switch(o[0]){case 0:case 1:u=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(u=r.trys,u=u.length>0&&u[u.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!u||o[1]>u[0]&&o[1]<u[3])){r.label=o[1];break}if(o[0]===6&&r.label<u[1]){r.label=u[1];u=o;break}if(u&&r.label<u[2]){r.label=u[2];r.ops.push(o);break}if(u[2])r.ops.pop();r.trys.pop();continue}o=t.call(n,r)}catch(n){o=[6,n];i=0}finally{e=u=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var R=function(n,t,r,e,i){return S(void 0,void 0,void 0,(function(){return j(this,(function(u){return[2,n.api.put("/documents/".concat(t,"/recipients/").concat(r),_({role_name:r,action:e},i||{})).then((function(n){return n.data}))]}))}))};var E=function(n,t,r){return n.api.get("/documents/".concat(t,"/recipients/").concat(encodeURIComponent(r),"/signer-token")).then((function(n){return n.data}))};var A=function(n,t,r){return n.api.get("/documents/".concat(t,"/recipients/").concat(encodeURIComponent(r),"?in_person_link=true")).then((function(n){return n.data}))};const D=Object.freeze({__proto__:null,updateRecipientStatus:R,getSignerToken:E,getInPersonLink:A});var T=function(n,t,r){var e=new FormData;e.append("signature",r,t);return n.api.post("/signatures",e).then((function(n){return n.data}))};var N=function(n){return n.api.get("/signatures").then((function(n){return n.data}))};var x=function(n,t){return n.api.get("/signatures/".concat(t)).then((function(n){return n.data}))};var C=function(n,t){return n.api.delete("/signatures/".concat(t)).then((function(n){return n.data}))};const k=Object.freeze({__proto__:null,createSignature:T,getSignatures:N,getSignature:x,deleteSignature:C});var B=function(n,t,r){var e=new FormData;e.append("initial",r,t);return n.api.post("/initials",e).then((function(n){return n.data}))};const P=Object.freeze({__proto__:null,createInitials:B});const F=Object.freeze({__proto__:null});const U=Object.freeze({__proto__:null,Documents:O,Recipients:D,Signatures:k,Initials:P,Types:F});var L=function n(t,r){return function n(){var e=new Array(arguments.length);for(var i=0;i<e.length;i++){e[i]=arguments[i]}return t.apply(r,e)}};var I=Object.prototype.toString;var J=function(n){return function(t){var r=I.call(t);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function q(n){n=n.toLowerCase();return function t(r){return J(r)===n}}function z(n){return Array.isArray(n)}function M(n){return typeof n==="undefined"}function H(n){return n!==null&&!M(n)&&n.constructor!==null&&!M(n.constructor)&&typeof n.constructor.isBuffer==="function"&&n.constructor.isBuffer(n)}var K=q("ArrayBuffer");function W(n){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(n)}else{t=n&&n.buffer&&K(n.buffer)}return t}function X(n){return typeof n==="string"}function $(n){return typeof n==="number"}function V(n){return n!==null&&typeof n==="object"}function Z(n){if(J(n)!=="object"){return false}var t=Object.getPrototypeOf(n);return t===null||t===Object.prototype}var G=q("Date");var Q=q("File");var Y=q("Blob");var nn=q("FileList");function tn(n){return I.call(n)==="[object Function]"}function rn(n){return V(n)&&tn(n.pipe)}function en(n){var t="[object FormData]";return n&&(typeof FormData==="function"&&n instanceof FormData||I.call(n)===t||tn(n.toString)&&n.toString()===t)}var un=q("URLSearchParams");function on(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function fn(){if(typeof navigator!=="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}function an(n,t){if(n===null||typeof n==="undefined"){return}if(typeof n!=="object"){n=[n]}if(z(n)){for(var r=0,e=n.length;r<e;r++){t.call(null,n[r],r,n)}}else{for(var i in n){if(Object.prototype.hasOwnProperty.call(n,i)){t.call(null,n[i],i,n)}}}}function cn(){var n={};function t(t,r){if(Z(n[r])&&Z(t)){n[r]=cn(n[r],t)}else if(Z(t)){n[r]=cn({},t)}else if(z(t)){n[r]=t.slice()}else{n[r]=t}}for(var r=0,e=arguments.length;r<e;r++){an(arguments[r],t)}return n}function sn(n,t,r){an(t,(function t(e,i){if(r&&typeof e==="function"){n[i]=L(e,r)}else{n[i]=e}}));return n}function ln(n){if(n.charCodeAt(0)===65279){n=n.slice(1)}return n}function vn(n,t,r,e){n.prototype=Object.create(t.prototype,e);n.prototype.constructor=n;r&&Object.assign(n.prototype,r)}function dn(n,t,r){var e;var i;var u;var o={};t=t||{};do{e=Object.getOwnPropertyNames(n);i=e.length;while(i-- >0){u=e[i];if(!o[u]){t[u]=n[u];o[u]=true}}n=Object.getPrototypeOf(n)}while(n&&(!r||r(n,t))&&n!==Object.prototype);return t}function hn(n,t,r){n=String(n);if(r===undefined||r>n.length){r=n.length}r-=t.length;var e=n.indexOf(t,r);return e!==-1&&e===r}function pn(n){if(!n)return null;var t=n.length;if(M(t))return null;var r=new Array(t);while(t-- >0){r[t]=n[t]}return r}var mn=function(n){return function(t){return n&&t instanceof n}}(typeof Uint8Array!=="undefined"&&Object.getPrototypeOf(Uint8Array));var bn={isArray:z,isArrayBuffer:K,isBuffer:H,isFormData:en,isArrayBufferView:W,isString:X,isNumber:$,isObject:V,isPlainObject:Z,isUndefined:M,isDate:G,isFile:Q,isBlob:Y,isFunction:tn,isStream:rn,isURLSearchParams:un,isStandardBrowserEnv:fn,forEach:an,merge:cn,extend:sn,trim:on,stripBOM:ln,inherits:vn,toFlatObject:dn,kindOf:J,kindOfTest:q,endsWith:hn,toArray:pn,isTypedArray:mn,isFileList:nn};function wn(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var yn=function n(t,r,e){if(!r){return t}var i;if(e){i=e(r)}else if(bn.isURLSearchParams(r)){i=r.toString()}else{var u=[];bn.forEach(r,(function n(t,r){if(t===null||typeof t==="undefined"){return}if(bn.isArray(t)){r=r+"[]"}else{t=[t]}bn.forEach(t,(function n(t){if(bn.isDate(t)){t=t.toISOString()}else if(bn.isObject(t)){t=JSON.stringify(t)}u.push(wn(r)+"="+wn(t))}))}));i=u.join("&")}if(i){var o=t.indexOf("#");if(o!==-1){t=t.slice(0,o)}t+=(t.indexOf("?")===-1?"?":"&")+i}return t};function gn(){this.handlers=[]}gn.prototype.use=function n(t,r,e){this.handlers.push({fulfilled:t,rejected:r,synchronous:e?e.synchronous:false,runWhen:e?e.runWhen:null});return this.handlers.length-1};gn.prototype.eject=function n(t){if(this.handlers[t]){this.handlers[t]=null}};gn.prototype.forEach=function n(t){bn.forEach(this.handlers,(function n(r){if(r!==null){t(r)}}))};var On=gn;var _n=function n(t,r){bn.forEach(t,(function n(e,i){if(i!==r&&i.toUpperCase()===r.toUpperCase()){t[r]=e;delete t[i]}}))};function Sn(n,t,r,e,i){Error.call(this);this.message=n;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);e&&(this.request=e);i&&(this.response=i)}bn.inherits(Sn,Error,{toJSON:function n(){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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var jn=Sn.prototype;var Rn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(n){Rn[n]={value:n}}));Object.defineProperties(Sn,Rn);Object.defineProperty(jn,"isAxiosError",{value:true});Sn.from=function(n,t,r,e,i,u){var o=Object.create(jn);bn.toFlatObject(n,o,(function n(t){return t!==Error.prototype}));Sn.call(o,n.message,t,r,e,i);o.name=n.name;u&&Object.assign(o,u);return o};var En=Sn;var An={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};function Dn(n,t){t=t||new FormData;var r=[];function e(n){if(n===null)return"";if(bn.isDate(n)){return n.toISOString()}if(bn.isArrayBuffer(n)||bn.isTypedArray(n)){return typeof Blob==="function"?new Blob([n]):Buffer.from(n)}return n}function i(n,u){if(bn.isPlainObject(n)||bn.isArray(n)){if(r.indexOf(n)!==-1){throw Error("Circular reference detected in "+u)}r.push(n);bn.forEach(n,(function n(r,o){if(bn.isUndefined(r))return;var f=u?u+"."+o:o;var a;if(r&&!u&&typeof r==="object"){if(bn.endsWith(o,"{}")){r=JSON.stringify(r)}else if(bn.endsWith(o,"[]")&&(a=bn.toArray(r))){a.forEach((function(n){!bn.isUndefined(n)&&t.append(f,e(n))}));return}}i(r,f)}));r.pop()}else{t.append(u,e(n))}}i(n);return t}var Tn=Dn;var Nn=function n(t,r,e){var i=e.config.validateStatus;if(!e.status||!i||i(e.status)){t(e)}else{r(new En("Request failed with status code "+e.status,[En.ERR_BAD_REQUEST,En.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}};var xn=bn.isStandardBrowserEnv()?function n(){return{write:function n(t,r,e,i,u,o){var f=[];f.push(t+"="+encodeURIComponent(r));if(bn.isNumber(e)){f.push("expires="+new Date(e).toGMTString())}if(bn.isString(i)){f.push("path="+i)}if(bn.isString(u)){f.push("domain="+u)}if(o===true){f.push("secure")}document.cookie=f.join("; ")},read:function n(t){var r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function n(t){this.write(t,"",Date.now()-864e5)}}}():function n(){return{write:function n(){},read:function n(){return null},remove:function n(){}}}();var Cn=function n(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)};var kn=function n(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t};var Bn=function n(t,r){if(t&&!Cn(r)){return kn(t,r)}return r};var Pn=["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 Fn=function n(t){var r={};var e;var i;var u;if(!t){return r}bn.forEach(t.split("\n"),(function n(t){u=t.indexOf(":");e=bn.trim(t.substr(0,u)).toLowerCase();i=bn.trim(t.substr(u+1));if(e){if(r[e]&&Pn.indexOf(e)>=0){return}if(e==="set-cookie"){r[e]=(r[e]?r[e]:[]).concat([i])}else{r[e]=r[e]?r[e]+", "+i:i}}}));return r};var Un=bn.isStandardBrowserEnv()?function n(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var e;function i(n){var e=n;if(t){r.setAttribute("href",e);e=r.href}r.setAttribute("href",e);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}e=i(window.location.href);return function n(t){var r=bn.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function n(){return function n(){return true}}();function Ln(n){En.call(this,n==null?"canceled":n,En.ERR_CANCELED);this.name="CanceledError"}bn.inherits(Ln,En,{__CANCEL__:true});var In=Ln;var Jn=function n(t){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""};var qn=function n(t){return new Promise((function n(r,e){var i=t.data;var u=t.headers;var o=t.responseType;var f;function a(){if(t.cancelToken){t.cancelToken.unsubscribe(f)}if(t.signal){t.signal.removeEventListener("abort",f)}}if(bn.isFormData(i)&&bn.isStandardBrowserEnv()){delete u["Content-Type"]}var c=new XMLHttpRequest;if(t.auth){var s=t.auth.username||"";var l=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";u.Authorization="Basic "+btoa(s+":"+l)}var v=Bn(t.baseURL,t.url);c.open(t.method.toUpperCase(),yn(v,t.params,t.paramsSerializer),true);c.timeout=t.timeout;function d(){if(!c){return}var n="getAllResponseHeaders"in c?Fn(c.getAllResponseHeaders()):null;var i=!o||o==="text"||o==="json"?c.responseText:c.response;var u={data:i,status:c.status,statusText:c.statusText,headers:n,config:t,request:c};Nn((function n(t){r(t);a()}),(function n(t){e(t);a()}),u);c=null}if("onloadend"in c){c.onloadend=d}else{c.onreadystatechange=function n(){if(!c||c.readyState!==4){return}if(c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)){return}setTimeout(d)}}c.onabort=function n(){if(!c){return}e(new En("Request aborted",En.ECONNABORTED,t,c));c=null};c.onerror=function n(){e(new En("Network Error",En.ERR_NETWORK,t,c,c));c=null};c.ontimeout=function n(){var r=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";var i=t.transitional||An;if(t.timeoutErrorMessage){r=t.timeoutErrorMessage}e(new En(r,i.clarifyTimeoutError?En.ETIMEDOUT:En.ECONNABORTED,t,c));c=null};if(bn.isStandardBrowserEnv()){var h=(t.withCredentials||Un(v))&&t.xsrfCookieName?xn.read(t.xsrfCookieName):undefined;if(h){u[t.xsrfHeaderName]=h}}if("setRequestHeader"in c){bn.forEach(u,(function n(t,r){if(typeof i==="undefined"&&r.toLowerCase()==="content-type"){delete u[r]}else{c.setRequestHeader(r,t)}}))}if(!bn.isUndefined(t.withCredentials)){c.withCredentials=!!t.withCredentials}if(o&&o!=="json"){c.responseType=t.responseType}if(typeof t.onDownloadProgress==="function"){c.addEventListener("progress",t.onDownloadProgress)}if(typeof t.onUploadProgress==="function"&&c.upload){c.upload.addEventListener("progress",t.onUploadProgress)}if(t.cancelToken||t.signal){f=function(n){if(!c){return}e(!n||n&&n.type?new In:n);c.abort();c=null};t.cancelToken&&t.cancelToken.subscribe(f);if(t.signal){t.signal.aborted?f():t.signal.addEventListener("abort",f)}}if(!i){i=null}var p=Jn(v);if(p&&["http","https","file"].indexOf(p)===-1){e(new En("Unsupported protocol "+p+":",En.ERR_BAD_REQUEST,t));return}c.send(i)}))};var zn=null;var Mn={"Content-Type":"application/x-www-form-urlencoded"};function Hn(n,t){if(!bn.isUndefined(n)&&bn.isUndefined(n["Content-Type"])){n["Content-Type"]=t}}function Kn(){var n;if(typeof XMLHttpRequest!=="undefined"){n=qn}else if(typeof process!=="undefined"&&Object.prototype.toString.call(process)==="[object process]"){n=qn}return n}function Wn(n,t,r){if(bn.isString(n)){try{(t||JSON.parse)(n);return bn.trim(n)}catch(n){if(n.name!=="SyntaxError"){throw n}}}return(r||JSON.stringify)(n)}var Xn={transitional:An,adapter:Kn(),transformRequest:[function n(t,r){_n(r,"Accept");_n(r,"Content-Type");if(bn.isFormData(t)||bn.isArrayBuffer(t)||bn.isBuffer(t)||bn.isStream(t)||bn.isFile(t)||bn.isBlob(t)){return t}if(bn.isArrayBufferView(t)){return t.buffer}if(bn.isURLSearchParams(t)){Hn(r,"application/x-www-form-urlencoded;charset=utf-8");return t.toString()}var e=bn.isObject(t);var i=r&&r["Content-Type"];var u;if((u=bn.isFileList(t))||e&&i==="multipart/form-data"){var o=this.env&&this.env.FormData;return Tn(u?{"files[]":t}:t,o&&new o)}else if(e||i==="application/json"){Hn(r,"application/json");return Wn(t)}return t}],transformResponse:[function n(t){var r=this.transitional||Xn.transitional;var e=r&&r.silentJSONParsing;var i=r&&r.forcedJSONParsing;var u=!e&&this.responseType==="json";if(u||i&&bn.isString(t)&&t.length){try{return JSON.parse(t)}catch(n){if(u){if(n.name==="SyntaxError"){throw En.from(n,En.ERR_BAD_RESPONSE,this,null,this.response)}throw n}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zn},validateStatus:function n(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};bn.forEach(["delete","get","head"],(function n(t){Xn.headers[t]={}}));bn.forEach(["post","put","patch"],(function n(t){Xn.headers[t]=bn.merge(Mn)}));var $n=Xn;var Vn=function n(t,r,e){var i=this||$n;bn.forEach(e,(function n(e){t=e.call(i,t,r)}));return t};var Zn=function n(t){return!!(t&&t.__CANCEL__)};function Gn(n){if(n.cancelToken){n.cancelToken.throwIfRequested()}if(n.signal&&n.signal.aborted){throw new In}}var Qn=function n(t){Gn(t);t.headers=t.headers||{};t.data=Vn.call(t,t.data,t.headers,t.transformRequest);t.headers=bn.merge(t.headers.common||{},t.headers[t.method]||{},t.headers);bn.forEach(["delete","get","head","post","put","patch","common"],(function n(r){delete t.headers[r]}));var r=t.adapter||$n.adapter;return r(t).then((function n(r){Gn(t);r.data=Vn.call(t,r.data,r.headers,t.transformResponse);return r}),(function n(r){if(!Zn(r)){Gn(t);if(r&&r.response){r.response.data=Vn.call(t,r.response.data,r.response.headers,t.transformResponse)}}return Promise.reject(r)}))};var Yn=function n(t,r){r=r||{};var e={};function i(n,t){if(bn.isPlainObject(n)&&bn.isPlainObject(t)){return bn.merge(n,t)}else if(bn.isPlainObject(t)){return bn.merge({},t)}else if(bn.isArray(t)){return t.slice()}return t}function u(n){if(!bn.isUndefined(r[n])){return i(t[n],r[n])}else if(!bn.isUndefined(t[n])){return i(undefined,t[n])}}function o(n){if(!bn.isUndefined(r[n])){return i(undefined,r[n])}}function f(n){if(!bn.isUndefined(r[n])){return i(undefined,r[n])}else if(!bn.isUndefined(t[n])){return i(undefined,t[n])}}function a(n){if(n in r){return i(t[n],r[n])}else if(n in t){return i(undefined,t[n])}}var c={url:o,method:o,data:o,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:a};bn.forEach(Object.keys(t).concat(Object.keys(r)),(function n(t){var r=c[t]||u;var i=r(t);bn.isUndefined(i)&&r!==a||(e[t]=i)}));return e};var nt={version:"0.27.2"};var tt=nt.version;var rt={};["object","boolean","number","function","string","symbol"].forEach((function(n,t){rt[n]=function r(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}}));var et={};rt.transitional=function n(t,r,e){function i(n,t){return"[Axios v"+tt+"] Transitional option '"+n+"'"+t+(e?". "+e:"")}return function(n,e,u){if(t===false){throw new En(i(e," has been removed"+(r?" in "+r:"")),En.ERR_DEPRECATED)}if(r&&!et[e]){et[e]=true;console.warn(i(e," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(n,e,u):true}};function it(n,t,r){if(typeof n!=="object"){throw new En("options must be an object",En.ERR_BAD_OPTION_VALUE)}var e=Object.keys(n);var i=e.length;while(i-- >0){var u=e[i];var o=t[u];if(o){var f=n[u];var a=f===undefined||o(f,u,n);if(a!==true){throw new En("option "+u+" must be "+a,En.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new En("Unknown option "+u,En.ERR_BAD_OPTION)}}}var ut={assertOptions:it,validators:rt};var ot=ut.validators;function ft(n){this.defaults=n;this.interceptors={request:new On,response:new On}}ft.prototype.request=function n(t,r){if(typeof t==="string"){r=r||{};r.url=t}else{r=t||{}}r=Yn(this.defaults,r);if(r.method){r.method=r.method.toLowerCase()}else if(this.defaults.method){r.method=this.defaults.method.toLowerCase()}else{r.method="get"}var e=r.transitional;if(e!==undefined){ut.assertOptions(e,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean)},false)}var i=[];var u=true;this.interceptors.request.forEach((function n(t){if(typeof t.runWhen==="function"&&t.runWhen(r)===false){return}u=u&&t.synchronous;i.unshift(t.fulfilled,t.rejected)}));var o=[];this.interceptors.response.forEach((function n(t){o.push(t.fulfilled,t.rejected)}));var f;if(!u){var a=[Qn,undefined];Array.prototype.unshift.apply(a,i);a=a.concat(o);f=Promise.resolve(r);while(a.length){f=f.then(a.shift(),a.shift())}return f}var c=r;while(i.length){var s=i.shift();var l=i.shift();try{c=s(c)}catch(n){l(n);break}}try{f=Qn(c)}catch(n){return Promise.reject(n)}while(o.length){f=f.then(o.shift(),o.shift())}return f};ft.prototype.getUri=function n(t){t=Yn(this.defaults,t);var r=Bn(t.baseURL,t.url);return yn(r,t.params,t.paramsSerializer)};bn.forEach(["delete","get","head","options"],(function n(t){ft.prototype[t]=function(n,r){return this.request(Yn(r||{},{method:t,url:n,data:(r||{}).data}))}}));bn.forEach(["post","put","patch"],(function n(t){function r(n){return function r(e,i,u){return this.request(Yn(u||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:e,data:i}))}}ft.prototype[t]=r();ft.prototype[t+"Form"]=r(true)}));var at=ft;function ct(n){if(typeof n!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function n(r){t=r}));var r=this;this.promise.then((function(n){if(!r._listeners)return;var t;var e=r._listeners.length;for(t=0;t<e;t++){r._listeners[t](n)}r._listeners=null}));this.promise.then=function(n){var t;var e=new Promise((function(n){r.subscribe(n);t=n})).then(n);e.cancel=function n(){r.unsubscribe(t)};return e};n((function n(e){if(r.reason){return}r.reason=new In(e);t(r.reason)}))}ct.prototype.throwIfRequested=function n(){if(this.reason){throw this.reason}};ct.prototype.subscribe=function n(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}};ct.prototype.unsubscribe=function n(t){if(!this._listeners){return}var r=this._listeners.indexOf(t);if(r!==-1){this._listeners.splice(r,1)}};ct.source=function n(){var t;var r=new ct((function n(r){t=r}));return{token:r,cancel:t}};var st=ct;var lt=function n(t){return function n(r){return t.apply(null,r)}};var vt=function n(t){return bn.isObject(t)&&t.isAxiosError===true};function dt(n){var t=new at(n);var r=L(at.prototype.request,t);bn.extend(r,at.prototype,t);bn.extend(r,t);r.create=function t(r){return dt(Yn(n,r))};return r}var ht=dt($n);ht.Axios=at;ht.CanceledError=In;ht.CancelToken=st;ht.isCancel=Zn;ht.VERSION=nt.version;ht.toFormData=Tn;ht.AxiosError=En;ht.Cancel=ht.CanceledError;ht.all=function n(t){return Promise.all(t)};ht.spread=lt;ht.isAxiosError=vt;var pt=ht;var mt=ht;pt.default=mt;var bt=pt;var wt=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var yt=function(){if(this)return this;if(typeof globalThis==="object"&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(n){return wt()}try{if(!__global__)return wt();return __global__}finally{delete Object.prototype.__global__}}();var gt=Symbol.for("verdocs-default-endpoint");var Ot=function(n){console.debug("[JS-SDK] ".concat(n.method.toUpperCase()," ").concat(n.baseURL).concat(n.url),n.data?JSON.stringify(n.data):"");return n};var _t=function(){function n(n){this.environment="verdocs";this.sessionType="user";this.baseURL="https://api.verdocs.com";this.clientID="not-set";this.timeout=3e3;this.token=null;this.nextListenerId=0;this.sessionListeners=new Map;this.requestLoggerId=null;this.session=null;this.Documents=U;this.baseURL=(n===null||n===void 0?void 0:n.baseURL)||"https://api.verdocs.com";this.timeout=(n===null||n===void 0?void 0:n.timeout)||3e3;this.environment=(n===null||n===void 0?void 0:n.environment)||"verdocs";this.sessionType=(n===null||n===void 0?void 0:n.sessionType)||"user";this.clientID=(n===null||n===void 0?void 0:n.clientID)||"not-set";this.api=bt.create({baseURL:this.baseURL,timeout:this.timeout})}n.prototype.setDefault=function(){yt[gt]=this};n.getDefault=function(){if(!yt[gt]){yt[gt]=new n;window.console.debug("[JS_SDK] Created default endpoint",yt[gt])}return yt[gt]};n.prototype.getEnvironment=function(){return this.environment};n.prototype.getSessionType=function(){return this.sessionType};n.prototype.getBaseURL=function(){return this.baseURL};n.prototype.getClientID=function(){return this.clientID};n.prototype.getTimeout=function(){return this.timeout};n.prototype.getSession=function(){return this.session};n.prototype.setEnvironment=function(n){this.environment=n;return this};n.prototype.setSessionType=function(n){this.sessionType=n;return this};n.prototype.setBaseURL=function(n){this.api.defaults.baseURL=n;return this};n.prototype.setClientID=function(n){this.clientID=n;this.api.defaults.headers.common["X-Client-ID"]=n;return this};n.prototype.setTimeout=function(n){this.timeout=n;this.api.defaults.timeout=n;return this};n.prototype.logRequests=function(n){if(n&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(Ot)}else if(!n&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};n.prototype.setToken=function(n){if(!n){return this.clearSession()}var t=i(n);if(t===null||t.exp&&t.exp*1e3<(new Date).getTime()){return this.clearSession()}this.token=n;this.session=t;this.api.defaults.headers.common.Authorization="Bearer ".concat(n);localStorage.setItem(this.sessionStorageKey(),n);this.notifySessionListeners();return this};n.prototype.getToken=function(){return this.token};n.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};n.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};n.prototype.notifySessionListeners=function(){var n=this;this.sessionListeners.forEach((function(t){try{t(n,n.session)}catch(n){}}))};n.prototype.onSessionChanged=function(n){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,n);return function(){t.sessionListeners.delete(r)}};n.prototype.loadSession=function(){var n=localStorage.getItem(this.sessionStorageKey());if(!n){return this.clearSession()}return this.setToken(n)};return n}();export{_t as V,v as a,w as b,y as c,s as g,R as u};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
2
|
+
//# sourceMappingURL=p-10d804cf.js.map
|