@verdocs/web-sdk 1.5.1 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/cjs/{VerdocsEndpoint-5e6dd8ef.js → VerdocsEndpoint-2c7ecda8.js} +7 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-dropdown_12.cjs.entry.js +3 -7
  5. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-search-activity_2.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-sign.cjs.entry.js +2 -2
  9. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  10. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +1 -1
  11. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +2 -24
  12. package/dist/components/VerdocsEndpoint.js +7 -0
  13. package/dist/components/verdocs-sign.js +1 -1
  14. package/dist/components/verdocs-view2.js +2 -7
  15. package/dist/custom-elements.json +826 -0
  16. package/dist/docs.json +1 -18
  17. package/dist/esm/{VerdocsEndpoint-30e1b6ec.js → VerdocsEndpoint-1dbbd8e2.js} +7 -0
  18. package/dist/esm/loader.js +1 -1
  19. package/dist/esm/verdocs-auth.entry.js +1 -1
  20. package/dist/esm/verdocs-dropdown_12.entry.js +3 -7
  21. package/dist/esm/verdocs-quick-functions.entry.js +1 -1
  22. package/dist/esm/verdocs-search-activity_2.entry.js +1 -1
  23. package/dist/esm/verdocs-search.entry.js +1 -1
  24. package/dist/esm/verdocs-sign.entry.js +2 -2
  25. package/dist/esm/verdocs-web-sdk.js +1 -1
  26. package/dist/esm-es5/{VerdocsEndpoint-30e1b6ec.js → VerdocsEndpoint-1dbbd8e2.js} +1 -1
  27. package/dist/esm-es5/loader.js +1 -1
  28. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  29. package/dist/esm-es5/verdocs-dropdown_12.entry.js +2 -2
  30. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  31. package/dist/esm-es5/verdocs-search-activity_2.entry.js +1 -1
  32. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  33. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  34. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  35. package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +0 -5
  36. package/dist/types/components.d.ts +0 -8
  37. package/dist/verdocs-web-sdk/{p-d522de7d.entry.js → p-4cfc0f04.entry.js} +2 -2
  38. package/dist/verdocs-web-sdk/{p-f6a53928.system.entry.js → p-4e98796c.system.entry.js} +1 -1
  39. package/dist/verdocs-web-sdk/{p-1b4e04b7.system.entry.js → p-5bd83ddc.system.entry.js} +1 -1
  40. package/dist/verdocs-web-sdk/{p-c29c2cf8.entry.js → p-6b8bc6f4.entry.js} +1 -1
  41. package/dist/verdocs-web-sdk/{p-4d80d044.system.js → p-6fd6ae35.system.js} +1 -1
  42. package/dist/verdocs-web-sdk/{p-16d62a51.system.entry.js → p-7adcb52c.system.entry.js} +1 -1
  43. package/dist/verdocs-web-sdk/p-88a300c5.system.js +1 -1
  44. package/dist/verdocs-web-sdk/{p-8276345a.entry.js → p-9e3a842c.entry.js} +1 -1
  45. package/dist/verdocs-web-sdk/{p-aa9fc574.entry.js → p-a55ed8ce.entry.js} +1 -1
  46. package/dist/verdocs-web-sdk/{p-06f38046.js → p-c34360d3.js} +1 -1
  47. package/dist/verdocs-web-sdk/{p-9139a76d.system.entry.js → p-cc12ccaa.system.entry.js} +1 -1
  48. package/dist/verdocs-web-sdk/{p-30cc8818.entry.js → p-e3229752.entry.js} +1 -1
  49. package/dist/verdocs-web-sdk/{p-1ea3b9d3.entry.js → p-f74862f7.entry.js} +1 -1
  50. package/dist/verdocs-web-sdk/{p-c4d03ff9.system.entry.js → p-f76721d3.system.entry.js} +2 -2
  51. package/dist/verdocs-web-sdk/{p-a87069d5.system.entry.js → p-fdf34ca6.system.entry.js} +1 -1
  52. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  53. package/package.json +2 -2
@@ -1 +1 @@
1
- System.register(["./p-caed7818.system.js","./p-4d80d044.system.js"],(function(t){"use strict";var e,n,i,s;return{setters:[function(t){e=t.r;n=t.c;i=t.h},function(t){s=t.V}],execute:function(){var o=function(t,e){return t.api.post("/authentication/login",e).then((function(t){return t.data}))};var a='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}';var r=t("verdocs_auth",function(){function t(t){e(this,t);this.authenticated=n(this,"authenticated",7);this.endpoint=s.getDefault();this.visible=true;this.logo="https://verdocs.com/assets/blue-logo.svg";this.debug=false;this.isAuthenticated=false;this.displayMode="login";this.username="";this.password="";this.loggingIn=false;this.activeSession=null;this.loginError=null}t.prototype.componentDidLoad=function(){this.endpoint.loadSession();if(this.endpoint.session!==null){this.isAuthenticated=true;this.activeSession=this.endpoint.session;this.authenticated.emit({authenticated:true,session:this.endpoint.session})}else{this.authenticated.emit({authenticated:false,session:null})}};t.prototype.handleLogin=function(){var t=this;this.loggingIn=true;o(this.endpoint,{username:this.username,password:this.password}).then((function(e){t.loggingIn=false;t.endpoint.setToken(e.accessToken);t.activeSession=t.endpoint.session;t.isAuthenticated=true;t.authenticated.emit({authenticated:true,session:t.endpoint.session})})).catch((function(e){var n;console.log("[VERDOCS] Login error",e.response,JSON.stringify(e));t.loggingIn=false;t.activeSession=null;t.authenticated.emit({authenticated:false,session:null});if(((n=e===null||e===void 0?void 0:e.response)===null||n===void 0?void 0:n.status)===403){t.loginError="Please check your username and password and try again."}}))};t.prototype.handleLogout=function(){this.endpoint.clearSession();this.isAuthenticated=false;this.authenticated.emit({authenticated:false,session:null})};t.prototype.handleClearError=function(){this.loginError=null};t.prototype.render=function(){var t=this;if(!this.visible){return i("div",{style:{display:"none"}},"Verdocs Auth Placeholder")}if(this.isAuthenticated){if(this.debug){return i("div",{class:"status-result debug"},i("verdocs-button",{label:"Logout",disabled:this.loggingIn,onPress:function(){return t.handleLogout()}}))}return i("div",{class:"status-result"},"Authenticated")}if(this.displayMode==="signup"){return i("div",{class:"signup-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Sign up for an account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:function(){return t.displayMode="login"},disabled:this.loggingIn})),i("form",{onSubmit:function(){return t.handleLogin()}},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onFieldInput:function(e){return t.username=e.detail},disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onFieldInput:function(e){return t.password=e.detail},disabled:this.loggingIn}),i("verdocs-button",{label:"Signup",disabled:this.loggingIn,onPress:function(){return t.handleLogin()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}return i("div",{class:"login-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:function(){return t.displayMode="signup"},disabled:this.loggingIn})),i("form",{onSubmit:function(){return t.handleLogin()}},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onFieldInput:function(e){return t.username=e.detail},disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onFieldInput:function(e){return t.password=e.detail},disabled:this.loggingIn}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:function(){return t.displayMode="signup"},disabled:this.loggingIn,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.loggingIn,onPress:function(){return t.handleLogin()},style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})),this.loginError?i("verdocs-ok-dialog",{open:true,heading:"Login Error",message:this.loginError,onClosed:function(){return t.handleClearError()}}):i("div",null))};return t}());r.style=a}}}));
1
+ System.register(["./p-caed7818.system.js","./p-6fd6ae35.system.js"],(function(t){"use strict";var e,n,i,s;return{setters:[function(t){e=t.r;n=t.c;i=t.h},function(t){s=t.V}],execute:function(){var o=function(t,e){return t.api.post("/authentication/login",e).then((function(t){return t.data}))};var a='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}';var r=t("verdocs_auth",function(){function t(t){e(this,t);this.authenticated=n(this,"authenticated",7);this.endpoint=s.getDefault();this.visible=true;this.logo="https://verdocs.com/assets/blue-logo.svg";this.debug=false;this.isAuthenticated=false;this.displayMode="login";this.username="";this.password="";this.loggingIn=false;this.activeSession=null;this.loginError=null}t.prototype.componentDidLoad=function(){this.endpoint.loadSession();if(this.endpoint.session!==null){this.isAuthenticated=true;this.activeSession=this.endpoint.session;this.authenticated.emit({authenticated:true,session:this.endpoint.session})}else{this.authenticated.emit({authenticated:false,session:null})}};t.prototype.handleLogin=function(){var t=this;this.loggingIn=true;o(this.endpoint,{username:this.username,password:this.password}).then((function(e){t.loggingIn=false;t.endpoint.setToken(e.accessToken);t.activeSession=t.endpoint.session;t.isAuthenticated=true;t.authenticated.emit({authenticated:true,session:t.endpoint.session})})).catch((function(e){var n;console.log("[VERDOCS] Login error",e.response,JSON.stringify(e));t.loggingIn=false;t.activeSession=null;t.authenticated.emit({authenticated:false,session:null});if(((n=e===null||e===void 0?void 0:e.response)===null||n===void 0?void 0:n.status)===403){t.loginError="Please check your username and password and try again."}}))};t.prototype.handleLogout=function(){this.endpoint.clearSession();this.isAuthenticated=false;this.authenticated.emit({authenticated:false,session:null})};t.prototype.handleClearError=function(){this.loginError=null};t.prototype.render=function(){var t=this;if(!this.visible){return i("div",{style:{display:"none"}},"Verdocs Auth Placeholder")}if(this.isAuthenticated){if(this.debug){return i("div",{class:"status-result debug"},i("verdocs-button",{label:"Logout",disabled:this.loggingIn,onPress:function(){return t.handleLogout()}}))}return i("div",{class:"status-result"},"Authenticated")}if(this.displayMode==="signup"){return i("div",{class:"signup-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Sign up for an account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:function(){return t.displayMode="login"},disabled:this.loggingIn})),i("form",{onSubmit:function(){return t.handleLogin()}},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onFieldInput:function(e){return t.username=e.detail},disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onFieldInput:function(e){return t.password=e.detail},disabled:this.loggingIn}),i("verdocs-button",{label:"Signup",disabled:this.loggingIn,onPress:function(){return t.handleLogin()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}return i("div",{class:"login-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:function(){return t.displayMode="signup"},disabled:this.loggingIn})),i("form",{onSubmit:function(){return t.handleLogin()}},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onFieldInput:function(e){return t.username=e.detail},disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onFieldInput:function(e){return t.password=e.detail},disabled:this.loggingIn}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:function(){return t.displayMode="signup"},disabled:this.loggingIn,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.loggingIn,onPress:function(){return t.handleLogin()},style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})),this.loginError?i("verdocs-ok-dialog",{open:true,heading:"Login Error",message:this.loginError,onClosed:function(){return t.handleClearError()}}):i("div",null))};return t}());r.style=a}}}));
@@ -1 +1 @@
1
- System.register(["./p-caed7818.system.js","./p-4d80d044.system.js"],(function(e){"use strict";var t,r,n,i;return{setters:[function(e){t=e.r;r=e.c;n=e.h},function(e){i=e.V}],execute:function(){var o=function(e,t){return e.api.get("/templates/",{params:t}).then((function(e){return e.data}))};var s=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?r(e.value):i(e.value).then(s,a)}c((n=n.apply(e,t||[])).next())}))};var a=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var c=function(e){return s(void 0,void 0,void 0,(function(){return a(this,(function(t){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))}))};var l='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var h='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:var(--verdocs-background-dark)}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#ccc}';var d=e("verdocs_search_activity",function(){function e(e){t(this,e);this.entrySelected=r(this,"entrySelected",7);this.endpoint=i.getDefault();this.type="recent";this.emptyMessage="You do not have any starred searches.";this.authFailure=false;this.title="Recent Searches";this.recent=[];this.saved=[];this.starred=[]}e.prototype.componentWillLoad=function(){var e=this;this.endpoint.loadSession();var t=function(t){var r;console.warn("[Verdocs/search-activity] Error getting search data",t);if(((r=t===null||t===void 0?void 0:t.response)===null||r===void 0?void 0:r.status)===401){e.authFailure=true}};switch(this.type){case"recent":this.title="Recent Searches";this.emptyMessage="You do not have any recent searches.";c(this.endpoint).then((function(t){return e.recent=t.recent})).catch(t);break;case"saved":this.title="Saved Searches";this.emptyMessage="You do not have any saved searches.";c(this.endpoint).then((function(t){return e.saved=t.saved})).catch(t);break;case"starred":this.title="My Starred items";this.emptyMessage="You do not have any starred templates.";o(this.endpoint,{is_starred:true}).then((function(t){return e.starred=t})).catch(t);break}};e.prototype.handleSelectEntry=function(e){this.entrySelected.emit(e)};e.prototype.computePagesText=function(e){if(e<2){return"".concat(e," Page")}else{return"".concat(e," Pages")}};e.prototype.computeRecipientsText=function(e){if(typeof e==="object"){return e.join(", ")}else if(e>1){return"".concat(e," Recipients")}else{return"".concat(e," Recipient")}};e.prototype.render=function(){var e=this;var t=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return n("div",{class:"container"},n("p",{class:"title"},this.title),n("div",{class:"items"},this.recent.map((function(t){return n("button",{class:"item",onClick:function(){return e.handleSelectEntry(t)}},n("div",{class:"icon",innerHTML:l}),n("div",{class:"details"},n("div",{class:"item-title"},t.params.q),n("div",{class:"info"},"Test")))})),this.saved.map((function(t){return n("button",{class:"item",onClick:function(){return e.handleSelectEntry(t)}},n("div",{class:"icon",innerHTML:l}),n("div",{class:"details"},n("div",{class:"item-title"},t.params.q),n("div",{class:"info"})))})),t&&n("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))};return e}());d.style=h;var p='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/>\n</svg>\n';var f='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/>\n</svg>\n';var u='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:var(--verdocs-container-border-color)}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#50be80;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';var x=e("verdocs_search_box",function(){function e(e){t(this,e);this.searchClicked=r(this,"searchClicked",7);this.typeChanged=r(this,"typeChanged",7);this.queryChanged=r(this,"queryChanged",7);this.endpoint=i.getDefault();this.placeholder="search documents, templates, people...";this.type="all";this.query=""}e.prototype.handleSearch=function(e){this.searchClicked.emit({type:this.type,query:this.query});e.preventDefault();return false};e.prototype.handleChange=function(e){this.queryChanged.emit(e.target.value)};e.prototype.handleClearFilter=function(){this.typeChanged.emit("all")};e.prototype.handleKeyUp=function(e){if(e.key==="Enter"){this.searchClicked.emit({type:this.type,query:this.query})}};e.prototype.render=function(){var e=this;return n("form",{onSubmit:function(t){return e.handleSearch(t)}},this.type!==undefined&&this.type!=="all"&&n("span",{class:"type"},this.type,"s ",n("button",{class:"remove",innerHTML:f,onClick:function(){return e.handleClearFilter()}})),n("input",{type:"text",placeholder:this.placeholder,value:this.query,onInput:function(t){return e.handleChange(t)},onKeyUp:function(t){return e.handleKeyUp(t)}}),n("button",{onClick:function(t){return e.handleSearch(t)},class:"search"},n("span",{innerHTML:p}),"Search"))};return e}());x.style=u}}}));
1
+ System.register(["./p-caed7818.system.js","./p-6fd6ae35.system.js"],(function(e){"use strict";var t,r,n,i;return{setters:[function(e){t=e.r;r=e.c;n=e.h},function(e){i=e.V}],execute:function(){var o=function(e,t){return e.api.get("/templates/",{params:t}).then((function(e){return e.data}))};var s=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?r(e.value):i(e.value).then(s,a)}c((n=n.apply(e,t||[])).next())}))};var a=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var c=function(e){return s(void 0,void 0,void 0,(function(){return a(this,(function(t){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))}))};var l='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>';var h='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:var(--verdocs-background-dark)}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#ccc}';var d=e("verdocs_search_activity",function(){function e(e){t(this,e);this.entrySelected=r(this,"entrySelected",7);this.endpoint=i.getDefault();this.type="recent";this.emptyMessage="You do not have any starred searches.";this.authFailure=false;this.title="Recent Searches";this.recent=[];this.saved=[];this.starred=[]}e.prototype.componentWillLoad=function(){var e=this;this.endpoint.loadSession();var t=function(t){var r;console.warn("[Verdocs/search-activity] Error getting search data",t);if(((r=t===null||t===void 0?void 0:t.response)===null||r===void 0?void 0:r.status)===401){e.authFailure=true}};switch(this.type){case"recent":this.title="Recent Searches";this.emptyMessage="You do not have any recent searches.";c(this.endpoint).then((function(t){return e.recent=t.recent})).catch(t);break;case"saved":this.title="Saved Searches";this.emptyMessage="You do not have any saved searches.";c(this.endpoint).then((function(t){return e.saved=t.saved})).catch(t);break;case"starred":this.title="My Starred items";this.emptyMessage="You do not have any starred templates.";o(this.endpoint,{is_starred:true}).then((function(t){return e.starred=t})).catch(t);break}};e.prototype.handleSelectEntry=function(e){this.entrySelected.emit(e)};e.prototype.computePagesText=function(e){if(e<2){return"".concat(e," Page")}else{return"".concat(e," Pages")}};e.prototype.computeRecipientsText=function(e){if(typeof e==="object"){return e.join(", ")}else if(e>1){return"".concat(e," Recipients")}else{return"".concat(e," Recipient")}};e.prototype.render=function(){var e=this;var t=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return n("div",{class:"container"},n("p",{class:"title"},this.title),n("div",{class:"items"},this.recent.map((function(t){return n("button",{class:"item",onClick:function(){return e.handleSelectEntry(t)}},n("div",{class:"icon",innerHTML:l}),n("div",{class:"details"},n("div",{class:"item-title"},t.params.q),n("div",{class:"info"},"Test")))})),this.saved.map((function(t){return n("button",{class:"item",onClick:function(){return e.handleSelectEntry(t)}},n("div",{class:"icon",innerHTML:l}),n("div",{class:"details"},n("div",{class:"item-title"},t.params.q),n("div",{class:"info"})))})),t&&n("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))};return e}());d.style=h;var p='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/>\n</svg>\n';var f='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/>\n</svg>\n';var u='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:var(--verdocs-container-border-color)}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#50be80;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';var x=e("verdocs_search_box",function(){function e(e){t(this,e);this.searchClicked=r(this,"searchClicked",7);this.typeChanged=r(this,"typeChanged",7);this.queryChanged=r(this,"queryChanged",7);this.endpoint=i.getDefault();this.placeholder="search documents, templates, people...";this.type="all";this.query=""}e.prototype.handleSearch=function(e){this.searchClicked.emit({type:this.type,query:this.query});e.preventDefault();return false};e.prototype.handleChange=function(e){this.queryChanged.emit(e.target.value)};e.prototype.handleClearFilter=function(){this.typeChanged.emit("all")};e.prototype.handleKeyUp=function(e){if(e.key==="Enter"){this.searchClicked.emit({type:this.type,query:this.query})}};e.prototype.render=function(){var e=this;return n("form",{onSubmit:function(t){return e.handleSearch(t)}},this.type!==undefined&&this.type!=="all"&&n("span",{class:"type"},this.type,"s ",n("button",{class:"remove",innerHTML:f,onClick:function(){return e.handleClearFilter()}})),n("input",{type:"text",placeholder:this.placeholder,value:this.query,onInput:function(t){return e.handleChange(t)},onKeyUp:function(t){return e.handleKeyUp(t)}}),n("button",{onClick:function(t){return e.handleSearch(t)},class:"search"},n("span",{innerHTML:p}),"Search"))};return e}());x.style=u}}}));
@@ -1 +1 @@
1
- import{r as e,h as s}from"./p-2bc58746.js";import{V as r}from"./p-06f38046.js";const c=class{constructor(s){e(this,s),this.endpoint=r.getDefault()}render(){return s("div",{class:"container"},s("verdocs-search-box",{endpoint:this.endpoint}),s("div",{class:"boxes"},s("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),s("search-quick-functions",{endpoint:this.endpoint})))}};c.style='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';export{c as verdocs_search}
1
+ import{r as e,h as s}from"./p-2bc58746.js";import{V as r}from"./p-c34360d3.js";const c=class{constructor(s){e(this,s),this.endpoint=r.getDefault()}render(){return s("div",{class:"container"},s("verdocs-search-box",{endpoint:this.endpoint}),s("div",{class:"boxes"},s("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),s("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),s("search-quick-functions",{endpoint:this.endpoint})))}};c.style='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';export{c as verdocs_search}
@@ -4,4 +4,4 @@ System.register([],(function(e){"use strict";return{execute:function(){e({B:m,d:
4
4
  *
5
5
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
6
6
  * @license MIT
7
- */var v=50;m.TYPED_ARRAY_SUPPORT=t.TYPED_ARRAY_SUPPORT!==undefined?t.TYPED_ARRAY_SUPPORT:true;function g(){return m.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function y(e,t){if(g()<t){throw new RangeError("Invalid typed array length")}if(m.TYPED_ARRAY_SUPPORT){e=new Uint8Array(t);e.__proto__=m.prototype}else{if(e===null){e=new m(t)}e.length=t}return e}function m(e,t,r){if(!m.TYPED_ARRAY_SUPPORT&&!(this instanceof m)){return new m(e,t,r)}if(typeof e==="number"){if(typeof t==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return _(this,e)}return E(this,e,t,r)}m.poolSize=8192;m._augment=function(e){e.__proto__=m.prototype;return e};function E(e,t,r,n){if(typeof t==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&t instanceof ArrayBuffer){return T(e,t,r,n)}if(typeof t==="string"){return R(e,t,r)}return O(e,t)}m.from=function(e,t,r){return E(null,e,t,r)};if(m.TYPED_ARRAY_SUPPORT){m.prototype.__proto__=Uint8Array.prototype;m.__proto__=Uint8Array}function w(e){if(typeof e!=="number"){throw new TypeError('"size" argument must be a number')}else if(e<0){throw new RangeError('"size" argument must not be negative')}}function b(e,t,r,n){w(t);if(t<=0){return y(e,t)}if(r!==undefined){return typeof n==="string"?y(e,t).fill(r,n):y(e,t).fill(r)}return y(e,t)}m.alloc=function(e,t,r){return b(null,e,t,r)};function _(e,t){w(t);e=y(e,t<0?0:S(t)|0);if(!m.TYPED_ARRAY_SUPPORT){for(var r=0;r<t;++r){e[r]=0}}return e}m.allocUnsafe=function(e){return _(null,e)};m.allocUnsafeSlow=function(e){return _(null,e)};function R(e,t,r){if(typeof r!=="string"||r===""){r="utf8"}if(!m.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}var n=C(t,r)|0;e=y(e,n);var i=e.write(t,r);if(i!==n){e=e.slice(0,i)}return e}function A(e,t){var r=t.length<0?0:S(t.length)|0;e=y(e,r);for(var n=0;n<r;n+=1){e[n]=t[n]&255}return e}function T(e,t,r,n){if(r<0||t.byteLength<r){throw new RangeError("'offset' is out of bounds")}if(t.byteLength<r+(n||0)){throw new RangeError("'length' is out of bounds")}if(r===undefined&&n===undefined){t=new Uint8Array(t)}else if(n===undefined){t=new Uint8Array(t,r)}else{t=new Uint8Array(t,r,n)}if(m.TYPED_ARRAY_SUPPORT){e=t;e.__proto__=m.prototype}else{e=A(e,t)}return e}function O(e,t){if(P(t)){var r=S(t.length)|0;e=y(e,r);if(e.length===0){return e}t.copy(e,0,0,r);return e}if(t){if(typeof ArrayBuffer!=="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t){if(typeof t.length!=="number"||ce(t.length)){return y(e,0)}return A(e,t)}if(t.type==="Buffer"&&d(t.data)){return A(e,t.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function S(e){if(e>=g()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+g().toString(16)+" bytes")}return e|0}m.isBuffer=le;function P(e){return!!(e!=null&&e._isBuffer)}m.compare=function e(t,r){if(!P(t)||!P(r)){throw new TypeError("Arguments must be Buffers")}if(t===r)return 0;var n=t.length;var i=r.length;for(var o=0,a=Math.min(n,i);o<a;++o){if(t[o]!==r[o]){n=t[o];i=r[o];break}}if(n<i)return-1;if(i<n)return 1;return 0};m.isEncoding=function e(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};m.concat=function e(t,r){if(!d(t)){throw new TypeError('"list" argument must be an Array of Buffers')}if(t.length===0){return m.alloc(0)}var n;if(r===undefined){r=0;for(n=0;n<t.length;++n){r+=t[n].length}}var i=m.allocUnsafe(r);var o=0;for(n=0;n<t.length;++n){var a=t[n];if(!P(a)){throw new TypeError('"list" argument must be an Array of Buffers')}a.copy(i,o);o+=a.length}return i};function C(e,t){if(P(e)){return e.length}if(typeof ArrayBuffer!=="undefined"&&typeof ArrayBuffer.isView==="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)){return e.byteLength}if(typeof e!=="string"){e=""+e}var r=e.length;if(r===0)return 0;var n=false;for(;;){switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case undefined:return oe(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ue(e).length;default:if(n)return oe(e).length;t=(""+t).toLowerCase();n=true}}}m.byteLength=C;function U(e,t,r){var n=false;if(t===undefined||t<0){t=0}if(t>this.length){return""}if(r===undefined||r>this.length){r=this.length}if(r<=0){return""}r>>>=0;t>>>=0;if(r<=t){return""}if(!e)e="utf8";while(true){switch(e){case"hex":return W(this,t,r);case"utf8":case"utf-8":return F(this,t,r);case"ascii":return V(this,t,r);case"latin1":case"binary":return J(this,t,r);case"base64":return Y(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();n=true}}}m.prototype._isBuffer=true;function I(e,t,r){var n=e[t];e[t]=e[r];e[r]=n}m.prototype.swap16=function e(){var t=this.length;if(t%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var r=0;r<t;r+=2){I(this,r,r+1)}return this};m.prototype.swap32=function e(){var t=this.length;if(t%4!==0){throw new RangeError("Buffer size must be a multiple of 32-bits")}for(var r=0;r<t;r+=4){I(this,r,r+3);I(this,r+1,r+2)}return this};m.prototype.swap64=function e(){var t=this.length;if(t%8!==0){throw new RangeError("Buffer size must be a multiple of 64-bits")}for(var r=0;r<t;r+=8){I(this,r,r+7);I(this,r+1,r+6);I(this,r+2,r+5);I(this,r+3,r+4)}return this};m.prototype.toString=function e(){var t=this.length|0;if(t===0)return"";if(arguments.length===0)return F(this,0,t);return U.apply(this,arguments)};m.prototype.equals=function e(t){if(!P(t))throw new TypeError("Argument must be a Buffer");if(this===t)return true;return m.compare(this,t)===0};m.prototype.inspect=function e(){var t="";var r=v;if(this.length>0){t=this.toString("hex",0,r).match(/.{2}/g).join(" ");if(this.length>r)t+=" ... "}return"<Buffer "+t+">"};m.prototype.compare=function e(t,r,n,i,o){if(!P(t)){throw new TypeError("Argument must be a Buffer")}if(r===undefined){r=0}if(n===undefined){n=t?t.length:0}if(i===undefined){i=0}if(o===undefined){o=this.length}if(r<0||n>t.length||i<0||o>this.length){throw new RangeError("out of range index")}if(i>=o&&r>=n){return 0}if(i>=o){return-1}if(r>=n){return 1}r>>>=0;n>>>=0;i>>>=0;o>>>=0;if(this===t)return 0;var a=o-i;var s=n-r;var u=Math.min(a,s);var f=this.slice(i,o);var c=t.slice(r,n);for(var l=0;l<u;++l){if(f[l]!==c[l]){a=f[l];s=c[l];break}}if(a<s)return-1;if(s<a)return 1;return 0};function L(e,t,r,n,i){if(e.length===0)return-1;if(typeof r==="string"){n=r;r=0}else if(r>2147483647){r=2147483647}else if(r<-2147483648){r=-2147483648}r=+r;if(isNaN(r)){r=i?0:e.length-1}if(r<0)r=e.length+r;if(r>=e.length){if(i)return-1;else r=e.length-1}else if(r<0){if(i)r=0;else return-1}if(typeof t==="string"){t=m.from(t,n)}if(P(t)){if(t.length===0){return-1}return B(e,t,r,n,i)}else if(typeof t==="number"){t=t&255;if(m.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(i){return Uint8Array.prototype.indexOf.call(e,t,r)}else{return Uint8Array.prototype.lastIndexOf.call(e,t,r)}}return B(e,[t],r,n,i)}throw new TypeError("val must be string, number or Buffer")}function B(e,t,r,n,i){var o=1;var a=e.length;var s=t.length;if(n!==undefined){n=String(n).toLowerCase();if(n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le"){if(e.length<2||t.length<2){return-1}o=2;a/=2;s/=2;r/=2}}function u(e,t){if(o===1){return e[t]}else{return e.readUInt16BE(t*o)}}var f;if(i){var c=-1;for(f=r;f<a;f++){if(u(e,f)===u(t,c===-1?0:f-c)){if(c===-1)c=f;if(f-c+1===s)return c*o}else{if(c!==-1)f-=f-c;c=-1}}}else{if(r+s>a)r=a-s;for(f=r;f>=0;f--){var l=true;for(var h=0;h<s;h++){if(u(e,f+h)!==u(t,h)){l=false;break}}if(l)return f}}return-1}m.prototype.includes=function e(t,r,n){return this.indexOf(t,r,n)!==-1};m.prototype.indexOf=function e(t,r,n){return L(this,t,r,n,true)};m.prototype.lastIndexOf=function e(t,r,n){return L(this,t,r,n,false)};function D(e,t,r,n){r=Number(r)||0;var i=e.length-r;if(!n){n=i}else{n=Number(n);if(n>i){n=i}}var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");if(n>o/2){n=o/2}for(var a=0;a<n;++a){var s=parseInt(t.substr(a*2,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function x(e,t,r,n){return fe(oe(t,e.length-r),e,r,n)}function N(e,t,r,n){return fe(ae(t),e,r,n)}function j(e,t,r,n){return N(e,t,r,n)}function M(e,t,r,n){return fe(ue(t),e,r,n)}function k(e,t,r,n){return fe(se(t,e.length-r),e,r,n)}m.prototype.write=function e(t,r,n,i){if(r===undefined){i="utf8";n=this.length;r=0}else if(n===undefined&&typeof r==="string"){i=r;n=this.length;r=0}else if(isFinite(r)){r=r|0;if(isFinite(n)){n=n|0;if(i===undefined)i="utf8"}else{i=n;n=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var o=this.length-r;if(n===undefined||n>o)n=o;if(t.length>0&&(n<0||r<0)||r>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!i)i="utf8";var a=false;for(;;){switch(i){case"hex":return D(this,t,r,n);case"utf8":case"utf-8":return x(this,t,r,n);case"ascii":return N(this,t,r,n);case"latin1":case"binary":return j(this,t,r,n);case"base64":return M(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase();a=true}}};m.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(e,t,r){if(t===0&&r===e.length){return c(e)}else{return c(e.slice(t,r))}}function F(e,t,r){r=Math.min(e.length,r);var n=[];var i=t;while(i<r){var o=e[i];var a=null;var s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,f,c,l;switch(s){case 1:if(o<128){a=o}break;case 2:u=e[i+1];if((u&192)===128){l=(o&31)<<6|u&63;if(l>127){a=l}}break;case 3:u=e[i+1];f=e[i+2];if((u&192)===128&&(f&192)===128){l=(o&15)<<12|(u&63)<<6|f&63;if(l>2047&&(l<55296||l>57343)){a=l}}break;case 4:u=e[i+1];f=e[i+2];c=e[i+3];if((u&192)===128&&(f&192)===128&&(c&192)===128){l=(o&15)<<18|(u&63)<<12|(f&63)<<6|c&63;if(l>65535&&l<1114112){a=l}}}}if(a===null){a=65533;s=1}else if(a>65535){a-=65536;n.push(a>>>10&1023|55296);a=56320|a&1023}n.push(a);i+=s}return z(n)}var q=4096;function z(e){var t=e.length;if(t<=q){return String.fromCharCode.apply(String,e)}var r="";var n=0;while(n<t){r+=String.fromCharCode.apply(String,e.slice(n,n+=q))}return r}function V(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i){n+=String.fromCharCode(e[i]&127)}return n}function J(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i){n+=String.fromCharCode(e[i])}return n}function W(e,t,r){var n=e.length;if(!t||t<0)t=0;if(!r||r<0||r>n)r=n;var i="";for(var o=t;o<r;++o){i+=ie(e[o])}return i}function H(e,t,r){var n=e.slice(t,r);var i="";for(var o=0;o<n.length;o+=2){i+=String.fromCharCode(n[o]+n[o+1]*256)}return i}m.prototype.slice=function e(t,r){var n=this.length;t=~~t;r=r===undefined?n:~~r;if(t<0){t+=n;if(t<0)t=0}else if(t>n){t=n}if(r<0){r+=n;if(r<0)r=0}else if(r>n){r=n}if(r<t)r=t;var i;if(m.TYPED_ARRAY_SUPPORT){i=this.subarray(t,r);i.__proto__=m.prototype}else{var o=r-t;i=new m(o,undefined);for(var a=0;a<o;++a){i[a]=this[a+t]}}return i};function G(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUIntLE=function e(t,r,n){t=t|0;r=r|0;if(!n)G(t,r,this.length);var i=this[t];var o=1;var a=0;while(++a<r&&(o*=256)){i+=this[t+a]*o}return i};m.prototype.readUIntBE=function e(t,r,n){t=t|0;r=r|0;if(!n){G(t,r,this.length)}var i=this[t+--r];var o=1;while(r>0&&(o*=256)){i+=this[t+--r]*o}return i};m.prototype.readUInt8=function e(t,r){if(!r)G(t,1,this.length);return this[t]};m.prototype.readUInt16LE=function e(t,r){if(!r)G(t,2,this.length);return this[t]|this[t+1]<<8};m.prototype.readUInt16BE=function e(t,r){if(!r)G(t,2,this.length);return this[t]<<8|this[t+1]};m.prototype.readUInt32LE=function e(t,r){if(!r)G(t,4,this.length);return(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};m.prototype.readUInt32BE=function e(t,r){if(!r)G(t,4,this.length);return this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};m.prototype.readIntLE=function e(t,r,n){t=t|0;r=r|0;if(!n)G(t,r,this.length);var i=this[t];var o=1;var a=0;while(++a<r&&(o*=256)){i+=this[t+a]*o}o*=128;if(i>=o)i-=Math.pow(2,8*r);return i};m.prototype.readIntBE=function e(t,r,n){t=t|0;r=r|0;if(!n)G(t,r,this.length);var i=r;var o=1;var a=this[t+--i];while(i>0&&(o*=256)){a+=this[t+--i]*o}o*=128;if(a>=o)a-=Math.pow(2,8*r);return a};m.prototype.readInt8=function e(t,r){if(!r)G(t,1,this.length);if(!(this[t]&128))return this[t];return(255-this[t]+1)*-1};m.prototype.readInt16LE=function e(t,r){if(!r)G(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};m.prototype.readInt16BE=function e(t,r){if(!r)G(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};m.prototype.readInt32LE=function e(t,r){if(!r)G(t,4,this.length);return this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};m.prototype.readInt32BE=function e(t,r){if(!r)G(t,4,this.length);return this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};m.prototype.readFloatLE=function e(t,r){if(!r)G(t,4,this.length);return l(this,t,true,23,4)};m.prototype.readFloatBE=function e(t,r){if(!r)G(t,4,this.length);return l(this,t,false,23,4)};m.prototype.readDoubleLE=function e(t,r){if(!r)G(t,8,this.length);return l(this,t,true,52,8)};m.prototype.readDoubleBE=function e(t,r){if(!r)G(t,8,this.length);return l(this,t,false,52,8)};function K(e,t,r,n,i,o){if(!P(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}m.prototype.writeUIntLE=function e(t,r,n,i){t=+t;r=r|0;n=n|0;if(!i){var o=Math.pow(2,8*n)-1;K(this,t,r,n,o,0)}var a=1;var s=0;this[r]=t&255;while(++s<n&&(a*=256)){this[r+s]=t/a&255}return r+n};m.prototype.writeUIntBE=function e(t,r,n,i){t=+t;r=r|0;n=n|0;if(!i){var o=Math.pow(2,8*n)-1;K(this,t,r,n,o,0)}var a=n-1;var s=1;this[r+a]=t&255;while(--a>=0&&(s*=256)){this[r+a]=t/s&255}return r+n};m.prototype.writeUInt8=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,1,255,0);if(!m.TYPED_ARRAY_SUPPORT)t=Math.floor(t);this[r]=t&255;return r+1};function X(e,t,r,n){if(t<0)t=65535+t+1;for(var i=0,o=Math.min(e.length-r,2);i<o;++i){e[r+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}}m.prototype.writeUInt16LE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,2,65535,0);if(m.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8}else{X(this,t,r,true)}return r+2};m.prototype.writeUInt16BE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,2,65535,0);if(m.TYPED_ARRAY_SUPPORT){this[r]=t>>>8;this[r+1]=t&255}else{X(this,t,r,false)}return r+2};function Z(e,t,r,n){if(t<0)t=4294967295+t+1;for(var i=0,o=Math.min(e.length-r,4);i<o;++i){e[r+i]=t>>>(n?i:3-i)*8&255}}m.prototype.writeUInt32LE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,4,4294967295,0);if(m.TYPED_ARRAY_SUPPORT){this[r+3]=t>>>24;this[r+2]=t>>>16;this[r+1]=t>>>8;this[r]=t&255}else{Z(this,t,r,true)}return r+4};m.prototype.writeUInt32BE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,4,4294967295,0);if(m.TYPED_ARRAY_SUPPORT){this[r]=t>>>24;this[r+1]=t>>>16;this[r+2]=t>>>8;this[r+3]=t&255}else{Z(this,t,r,false)}return r+4};m.prototype.writeIntLE=function e(t,r,n,i){t=+t;r=r|0;if(!i){var o=Math.pow(2,8*n-1);K(this,t,r,n,o-1,-o)}var a=0;var s=1;var u=0;this[r]=t&255;while(++a<n&&(s*=256)){if(t<0&&u===0&&this[r+a-1]!==0){u=1}this[r+a]=(t/s>>0)-u&255}return r+n};m.prototype.writeIntBE=function e(t,r,n,i){t=+t;r=r|0;if(!i){var o=Math.pow(2,8*n-1);K(this,t,r,n,o-1,-o)}var a=n-1;var s=1;var u=0;this[r+a]=t&255;while(--a>=0&&(s*=256)){if(t<0&&u===0&&this[r+a+1]!==0){u=1}this[r+a]=(t/s>>0)-u&255}return r+n};m.prototype.writeInt8=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,1,127,-128);if(!m.TYPED_ARRAY_SUPPORT)t=Math.floor(t);if(t<0)t=255+t+1;this[r]=t&255;return r+1};m.prototype.writeInt16LE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,2,32767,-32768);if(m.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8}else{X(this,t,r,true)}return r+2};m.prototype.writeInt16BE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,2,32767,-32768);if(m.TYPED_ARRAY_SUPPORT){this[r]=t>>>8;this[r+1]=t&255}else{X(this,t,r,false)}return r+2};m.prototype.writeInt32LE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,4,2147483647,-2147483648);if(m.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8;this[r+2]=t>>>16;this[r+3]=t>>>24}else{Z(this,t,r,true)}return r+4};m.prototype.writeInt32BE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,4,2147483647,-2147483648);if(t<0)t=4294967295+t+1;if(m.TYPED_ARRAY_SUPPORT){this[r]=t>>>24;this[r+1]=t>>>16;this[r+2]=t>>>8;this[r+3]=t&255}else{Z(this,t,r,false)}return r+4};function $(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Q(e,t,r,n,i){if(!i){$(e,t,r,4)}h(e,t,r,n,23,4);return r+4}m.prototype.writeFloatLE=function e(t,r,n){return Q(this,t,r,true,n)};m.prototype.writeFloatBE=function e(t,r,n){return Q(this,t,r,false,n)};function ee(e,t,r,n,i){if(!i){$(e,t,r,8)}h(e,t,r,n,52,8);return r+8}m.prototype.writeDoubleLE=function e(t,r,n){return ee(this,t,r,true,n)};m.prototype.writeDoubleBE=function e(t,r,n){return ee(this,t,r,false,n)};m.prototype.copy=function e(t,r,n,i){if(!n)n=0;if(!i&&i!==0)i=this.length;if(r>=t.length)r=t.length;if(!r)r=0;if(i>0&&i<n)i=n;if(i===n)return 0;if(t.length===0||this.length===0)return 0;if(r<0){throw new RangeError("targetStart out of bounds")}if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");if(i>this.length)i=this.length;if(t.length-r<i-n){i=t.length-r+n}var o=i-n;var a;if(this===t&&n<r&&r<i){for(a=o-1;a>=0;--a){t[a+r]=this[a+n]}}else if(o<1e3||!m.TYPED_ARRAY_SUPPORT){for(a=0;a<o;++a){t[a+r]=this[a+n]}}else{Uint8Array.prototype.set.call(t,this.subarray(n,n+o),r)}return o};m.prototype.fill=function e(t,r,n,i){if(typeof t==="string"){if(typeof r==="string"){i=r;r=0;n=this.length}else if(typeof n==="string"){i=n;n=this.length}if(t.length===1){var o=t.charCodeAt(0);if(o<256){t=o}}if(i!==undefined&&typeof i!=="string"){throw new TypeError("encoding must be a string")}if(typeof i==="string"&&!m.isEncoding(i)){throw new TypeError("Unknown encoding: "+i)}}else if(typeof t==="number"){t=t&255}if(r<0||this.length<r||this.length<n){throw new RangeError("Out of range index")}if(n<=r){return this}r=r>>>0;n=n===undefined?this.length:n>>>0;if(!t)t=0;var a;if(typeof t==="number"){for(a=r;a<n;++a){this[a]=t}}else{var s=P(t)?t:oe(new m(t,i).toString());var u=s.length;for(a=0;a<n-r;++a){this[a+r]=s[a%u]}}return this};var te=/[^+\/0-9A-Za-z-_]/g;function re(e){e=ne(e).replace(te,"");if(e.length<2)return"";while(e.length%4!==0){e=e+"="}return e}function ne(e){if(e.trim)return e.trim();return e.replace(/^\s+|\s+$/g,"")}function ie(e){if(e<16)return"0"+e.toString(16);return e.toString(16)}function oe(e,t){t=t||Infinity;var r;var n=e.length;var i=null;var o=[];for(var a=0;a<n;++a){r=e.charCodeAt(a);if(r>55295&&r<57344){if(!i){if(r>56319){if((t-=3)>-1)o.push(239,191,189);continue}else if(a+1===n){if((t-=3)>-1)o.push(239,191,189);continue}i=r;continue}if(r<56320){if((t-=3)>-1)o.push(239,191,189);i=r;continue}r=(i-55296<<10|r-56320)+65536}else if(i){if((t-=3)>-1)o.push(239,191,189)}i=null;if(r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else{throw new Error("Invalid code point")}}return o}function ae(e){var t=[];for(var r=0;r<e.length;++r){t.push(e.charCodeAt(r)&255)}return t}function se(e,t){var r,n,i;var o=[];for(var a=0;a<e.length;++a){if((t-=2)<0)break;r=e.charCodeAt(a);n=r>>8;i=r%256;o.push(i);o.push(n)}return o}function ue(e){return s(re(e))}function fe(e,t,r,n){for(var i=0;i<n;++i){if(i+r>=t.length||i>=e.length)break;t[i+r]=e[i]}return i}function ce(e){return e!==e}function le(e){return e!=null&&(!!e._isBuffer||he(e)||pe(e))}function he(e){return!!e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}function pe(e){return typeof e.readFloatLE==="function"&&typeof e.slice==="function"&&he(e.slice(0,0))}var de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var ve=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;var ge=function(e){e=String(e).replace(/[\t\n\f\r ]+/g,"");if(!ve.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");e+="==".slice(2-(e.length&3));var t;var r="";var n;var i;var o=0;for(;o<e.length;){t=de.indexOf(e.charAt(o++))<<18|de.indexOf(e.charAt(o++))<<12|(n=de.indexOf(e.charAt(o++)))<<6|(i=de.indexOf(e.charAt(o++)));r+=n===64?String.fromCharCode(t>>16&255):i===64?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,t&255)}return r};var ye=function(e){return JSON.parse(ge((e||"").split(".")[1]||""))};var me=function(e){var t;try{t=ye(e);if(t===null){return null}}catch(e){return null}Object.keys(t).forEach((function(e){if(typeof e==="string"&&e.startsWith("https://verdocs.com/")){t[e.replace("https://verdocs.com/","")]=t[e];delete t[e]}}));return t};var Ee=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var we=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var be=function(e,t){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(r){return[2,e.api.post("/documents/summary",{page:t}).then((function(e){return e.data}))]}))}))};var _e=function(e,t){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(r){return[2,e.api.post("/documents/search",t).then((function(e){return e.data}))]}))}))};var Re=e("g",(function(e,t){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(r){return[2,e.api.get("/documents/".concat(t.documentId,"/recipients/").concat(encodeURIComponent(t.roleId),"/invitation/").concat(t.inviteCode)).then((function(t){var r,n;var i=((r=t.headers)===null||r===void 0?void 0:r.signer_token)||"";var o=me(i);e.setToken((n=t.headers)===null||n===void 0?void 0:n.signer_token);return{recipient:t.data,session:o,signerToken:i}}))]}))}))}));var Ae=function(e,t){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(r){return[2,e.api.get("/documents/".concat(t,"/recipients")).then((function(e){return e.data}))]}))}))};var Te=e("a",(function(e,t){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(r){return[2,e.api.get("/documents/".concat(t)).then((function(e){return e.data}))]}))}))}));var Oe=e("b",(function(e,t,r){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(n){return[2,e.api.get("/documents/".concat(t,"/envelope_documents/").concat(r,"?file=true"),{responseType:"arraybuffer"}).then((function(e){return m.from(e.data,"binary").toString("base64")}))]}))}))}));var Se=e("c",(function(e,t,r,n){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(i){return[2,e.api.put("/documents/".concat(t,"/fields/").concat(r),n).then((function(e){return e.data}))]}))}))}));var Pe=function(e,t,r,n){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(i){return[2,e.api.put("/documents/".concat(t,"/fields/").concat(r,"/signature/").concat(n)).then((function(e){return e.data}))]}))}))};var Ce=Object.freeze({__proto__:null,getSummary:be,searchDocuments:_e,getSigningSession:Re,getDocumentRecipients:Ae,getDocument:Te,getDocumentFile:Oe,updateDocumentField:Se,updateDocumentFieldSignature:Pe});var Ue=undefined&&undefined.__assign||function(){Ue=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return Ue.apply(this,arguments)};var Ie=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var Le=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var Be=e("u",(function(e,t,r,n,i){return Ie(void 0,void 0,void 0,(function(){return Le(this,(function(o){return[2,e.api.put("/documents/".concat(t,"/recipients/").concat(r),Ue({role_name:r,action:n},i||{})).then((function(e){return e.data}))]}))}))}));var De=Object.freeze({__proto__:null,updateRecipientStatus:Be});var xe=function(e,t,r){var n=new FormData;n.append("signature",r,t);return e.api.post("/signatures",n).then((function(e){return e.data}))};var Ne=function(e){return e.api.get("/signatures").then((function(e){return e.data}))};var je=function(e,t){return e.api.get("/signatures/".concat(t)).then((function(e){return e.data}))};var Me=function(e,t){return e.api.delete("/signatures/".concat(t)).then((function(e){return e.data}))};var ke=Object.freeze({__proto__:null,createSignature:xe,getSignatures:Ne,getSignature:je,deleteSignature:Me});var Ye=function(e,t,r){var n=new FormData;n.append("initial",r,t);return e.api.post("/initials",n).then((function(e){return e.data}))};var Fe=Object.freeze({__proto__:null,createInitials:Ye});var qe=Object.freeze({__proto__:null});var ze=Object.freeze({__proto__:null,Documents:Ce,Recipients:De,Signatures:ke,Initials:Fe,Types:qe});var Ve;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(Ve||(Ve={}));var Je;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(Je||(Je={}));var We;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(We||(We={}));var He;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(He||(He={}));var Ge=function e(t,r){return function e(){var n=new Array(arguments.length);for(var i=0;i<n.length;i++){n[i]=arguments[i]}return t.apply(r,n)}};var Ke=Object.prototype.toString;var Xe=function(e){return function(t){var r=Ke.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function Ze(e){e=e.toLowerCase();return function t(r){return Xe(r)===e}}function $e(e){return Array.isArray(e)}function Qe(e){return typeof e==="undefined"}function et(e){return e!==null&&!Qe(e)&&e.constructor!==null&&!Qe(e.constructor)&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}var tt=Ze("ArrayBuffer");function rt(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&tt(e.buffer)}return t}function nt(e){return typeof e==="string"}function it(e){return typeof e==="number"}function ot(e){return e!==null&&typeof e==="object"}function at(e){if(Xe(e)!=="object"){return false}var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}var st=Ze("Date");var ut=Ze("File");var ft=Ze("Blob");var ct=Ze("FileList");function lt(e){return Ke.call(e)==="[object Function]"}function ht(e){return ot(e)&&lt(e.pipe)}function pt(e){var t="[object FormData]";return e&&(typeof FormData==="function"&&e instanceof FormData||Ke.call(e)===t||lt(e.toString)&&e.toString()===t)}var dt=Ze("URLSearchParams");function vt(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function gt(){if(typeof navigator!=="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}function yt(e,t){if(e===null||typeof e==="undefined"){return}if(typeof e!=="object"){e=[e]}if($e(e)){for(var r=0,n=e.length;r<n;r++){t.call(null,e[r],r,e)}}else{for(var i in e){if(Object.prototype.hasOwnProperty.call(e,i)){t.call(null,e[i],i,e)}}}}function mt(){var e={};function t(t,r){if(at(e[r])&&at(t)){e[r]=mt(e[r],t)}else if(at(t)){e[r]=mt({},t)}else if($e(t)){e[r]=t.slice()}else{e[r]=t}}for(var r=0,n=arguments.length;r<n;r++){yt(arguments[r],t)}return e}function Et(e,t,r){yt(t,(function t(n,i){if(r&&typeof n==="function"){e[i]=Ge(n,r)}else{e[i]=n}}));return e}function wt(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e}function bt(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;r&&Object.assign(e.prototype,r)}function _t(e,t,r){var n;var i;var o;var a={};t=t||{};do{n=Object.getOwnPropertyNames(e);i=n.length;while(i-- >0){o=n[i];if(!a[o]){t[o]=e[o];a[o]=true}}e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t}function Rt(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r}function At(e){if(!e)return null;var t=e.length;if(Qe(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r}var Tt=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&Object.getPrototypeOf(Uint8Array));var Ot={isArray:$e,isArrayBuffer:tt,isBuffer:et,isFormData:pt,isArrayBufferView:rt,isString:nt,isNumber:it,isObject:ot,isPlainObject:at,isUndefined:Qe,isDate:st,isFile:ut,isBlob:ft,isFunction:lt,isStream:ht,isURLSearchParams:dt,isStandardBrowserEnv:gt,forEach:yt,merge:mt,extend:Et,trim:vt,stripBOM:wt,inherits:bt,toFlatObject:_t,kindOf:Xe,kindOfTest:Ze,endsWith:Rt,toArray:At,isTypedArray:Tt,isFileList:ct};function St(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Pt=function e(t,r,n){if(!r){return t}var i;if(n){i=n(r)}else if(Ot.isURLSearchParams(r)){i=r.toString()}else{var o=[];Ot.forEach(r,(function e(t,r){if(t===null||typeof t==="undefined"){return}if(Ot.isArray(t)){r=r+"[]"}else{t=[t]}Ot.forEach(t,(function e(t){if(Ot.isDate(t)){t=t.toISOString()}else if(Ot.isObject(t)){t=JSON.stringify(t)}o.push(St(r)+"="+St(t))}))}));i=o.join("&")}if(i){var a=t.indexOf("#");if(a!==-1){t=t.slice(0,a)}t+=(t.indexOf("?")===-1?"?":"&")+i}return t};function Ct(){this.handlers=[]}Ct.prototype.use=function e(t,r,n){this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1};Ct.prototype.eject=function e(t){if(this.handlers[t]){this.handlers[t]=null}};Ct.prototype.forEach=function e(t){Ot.forEach(this.handlers,(function e(r){if(r!==null){t(r)}}))};var Ut=Ct;var It=e("h",typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{});function Lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function Bt(e,t,r){return r={path:t,exports:{},require:function(e,t){return xt()}},e(r,r.exports),r.exports}function Dt(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:true});Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:true,get:function(){return e[r]}})}));return t}function xt(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Nt=e("p",It.process);var jt=function e(t,r){Ot.forEach(t,(function e(n,i){if(i!==r&&i.toUpperCase()===r.toUpperCase()){t[r]=n;delete t[i]}}))};function Mt(e,t,r,n,i){Error.call(this);this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}Ot.inherits(Mt,Error,{toJSON:function 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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var kt=Mt.prototype;var Yt={};["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(e){Yt[e]={value:e}}));Object.defineProperties(Mt,Yt);Object.defineProperty(kt,"isAxiosError",{value:true});Mt.from=function(e,t,r,n,i,o){var a=Object.create(kt);Ot.toFlatObject(e,a,(function e(t){return t!==Error.prototype}));Mt.call(a,e.message,t,r,n,i);a.name=e.name;o&&Object.assign(a,o);return a};var Ft=Mt;var qt={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};function zt(e,t){t=t||new FormData;var r=[];function n(e){if(e===null)return"";if(Ot.isDate(e)){return e.toISOString()}if(Ot.isArrayBuffer(e)||Ot.isTypedArray(e)){return typeof Blob==="function"?new Blob([e]):m.from(e)}return e}function i(e,o){if(Ot.isPlainObject(e)||Ot.isArray(e)){if(r.indexOf(e)!==-1){throw Error("Circular reference detected in "+o)}r.push(e);Ot.forEach(e,(function e(r,a){if(Ot.isUndefined(r))return;var s=o?o+"."+a:a;var u;if(r&&!o&&typeof r==="object"){if(Ot.endsWith(a,"{}")){r=JSON.stringify(r)}else if(Ot.endsWith(a,"[]")&&(u=Ot.toArray(r))){u.forEach((function(e){!Ot.isUndefined(e)&&t.append(s,n(e))}));return}}i(r,s)}));r.pop()}else{t.append(o,n(e))}}i(e);return t}var Vt=zt;var Jt=function e(t,r,n){var i=n.config.validateStatus;if(!n.status||!i||i(n.status)){t(n)}else{r(new Ft("Request failed with status code "+n.status,[Ft.ERR_BAD_REQUEST,Ft.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}};var Wt=Ot.isStandardBrowserEnv()?function e(){return{write:function e(t,r,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(r));if(Ot.isNumber(n)){s.push("expires="+new Date(n).toGMTString())}if(Ot.isString(i)){s.push("path="+i)}if(Ot.isString(o)){s.push("domain="+o)}if(a===true){s.push("secure")}document.cookie=s.join("; ")},read:function e(t){var r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function e(t){this.write(t,"",Date.now()-864e5)}}}():function e(){return{write:function e(){},read:function e(){return null},remove:function e(){}}}();var Ht=function e(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)};var Gt=function e(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t};var Kt=function e(t,r){if(t&&!Ht(r)){return Gt(t,r)}return r};var Xt=["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 Zt=function e(t){var r={};var n;var i;var o;if(!t){return r}Ot.forEach(t.split("\n"),(function e(t){o=t.indexOf(":");n=Ot.trim(t.substr(0,o)).toLowerCase();i=Ot.trim(t.substr(o+1));if(n){if(r[n]&&Xt.indexOf(n)>=0){return}if(n==="set-cookie"){r[n]=(r[n]?r[n]:[]).concat([i])}else{r[n]=r[n]?r[n]+", "+i:i}}}));return r};var $t=Ot.isStandardBrowserEnv()?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);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}}n=i(window.location.href);return function e(t){var r=Ot.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Qt(e){Ft.call(this,e==null?"canceled":e,Ft.ERR_CANCELED);this.name="CanceledError"}Ot.inherits(Qt,Ft,{__CANCEL__:true});var er=Qt;var tr=function e(t){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""};var rr=function e(t){return new Promise((function e(r,n){var i=t.data;var o=t.headers;var a=t.responseType;var s;function u(){if(t.cancelToken){t.cancelToken.unsubscribe(s)}if(t.signal){t.signal.removeEventListener("abort",s)}}if(Ot.isFormData(i)&&Ot.isStandardBrowserEnv()){delete o["Content-Type"]}var f=new XMLHttpRequest;if(t.auth){var c=t.auth.username||"";var l=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.Authorization="Basic "+btoa(c+":"+l)}var h=Kt(t.baseURL,t.url);f.open(t.method.toUpperCase(),Pt(h,t.params,t.paramsSerializer),true);f.timeout=t.timeout;function p(){if(!f){return}var e="getAllResponseHeaders"in f?Zt(f.getAllResponseHeaders()):null;var i=!a||a==="text"||a==="json"?f.responseText:f.response;var o={data:i,status:f.status,statusText:f.statusText,headers:e,config:t,request:f};Jt((function e(t){r(t);u()}),(function e(t){n(t);u()}),o);f=null}if("onloadend"in f){f.onloadend=p}else{f.onreadystatechange=function e(){if(!f||f.readyState!==4){return}if(f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)){return}setTimeout(p)}}f.onabort=function e(){if(!f){return}n(new Ft("Request aborted",Ft.ECONNABORTED,t,f));f=null};f.onerror=function e(){n(new Ft("Network Error",Ft.ERR_NETWORK,t,f,f));f=null};f.ontimeout=function e(){var r=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";var i=t.transitional||qt;if(t.timeoutErrorMessage){r=t.timeoutErrorMessage}n(new Ft(r,i.clarifyTimeoutError?Ft.ETIMEDOUT:Ft.ECONNABORTED,t,f));f=null};if(Ot.isStandardBrowserEnv()){var d=(t.withCredentials||$t(h))&&t.xsrfCookieName?Wt.read(t.xsrfCookieName):undefined;if(d){o[t.xsrfHeaderName]=d}}if("setRequestHeader"in f){Ot.forEach(o,(function e(t,r){if(typeof i==="undefined"&&r.toLowerCase()==="content-type"){delete o[r]}else{f.setRequestHeader(r,t)}}))}if(!Ot.isUndefined(t.withCredentials)){f.withCredentials=!!t.withCredentials}if(a&&a!=="json"){f.responseType=t.responseType}if(typeof t.onDownloadProgress==="function"){f.addEventListener("progress",t.onDownloadProgress)}if(typeof t.onUploadProgress==="function"&&f.upload){f.upload.addEventListener("progress",t.onUploadProgress)}if(t.cancelToken||t.signal){s=function(e){if(!f){return}n(!e||e&&e.type?new er:e);f.abort();f=null};t.cancelToken&&t.cancelToken.subscribe(s);if(t.signal){t.signal.aborted?s():t.signal.addEventListener("abort",s)}}if(!i){i=null}var v=tr(h);if(v&&["http","https","file"].indexOf(v)===-1){n(new Ft("Unsupported protocol "+v+":",Ft.ERR_BAD_REQUEST,t));return}f.send(i)}))};var nr=null;var ir={"Content-Type":"application/x-www-form-urlencoded"};function or(e,t){if(!Ot.isUndefined(e)&&Ot.isUndefined(e["Content-Type"])){e["Content-Type"]=t}}function ar(){var e;if(typeof XMLHttpRequest!=="undefined"){e=rr}else if(typeof Nt!=="undefined"&&Object.prototype.toString.call(Nt)==="[object process]"){e=rr}return e}function sr(e,t,r){if(Ot.isString(e)){try{(t||JSON.parse)(e);return Ot.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var ur={transitional:qt,adapter:ar(),transformRequest:[function e(t,r){jt(r,"Accept");jt(r,"Content-Type");if(Ot.isFormData(t)||Ot.isArrayBuffer(t)||Ot.isBuffer(t)||Ot.isStream(t)||Ot.isFile(t)||Ot.isBlob(t)){return t}if(Ot.isArrayBufferView(t)){return t.buffer}if(Ot.isURLSearchParams(t)){or(r,"application/x-www-form-urlencoded;charset=utf-8");return t.toString()}var n=Ot.isObject(t);var i=r&&r["Content-Type"];var o;if((o=Ot.isFileList(t))||n&&i==="multipart/form-data"){var a=this.env&&this.env.FormData;return Vt(o?{"files[]":t}:t,a&&new a)}else if(n||i==="application/json"){or(r,"application/json");return sr(t)}return t}],transformResponse:[function e(t){var r=this.transitional||ur.transitional;var n=r&&r.silentJSONParsing;var i=r&&r.forcedJSONParsing;var o=!n&&this.responseType==="json";if(o||i&&Ot.isString(t)&&t.length){try{return JSON.parse(t)}catch(e){if(o){if(e.name==="SyntaxError"){throw Ft.from(e,Ft.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nr},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Ot.forEach(["delete","get","head"],(function e(t){ur.headers[t]={}}));Ot.forEach(["post","put","patch"],(function e(t){ur.headers[t]=Ot.merge(ir)}));var fr=ur;var cr=function e(t,r,n){var i=this||fr;Ot.forEach(n,(function e(n){t=n.call(i,t,r)}));return t};var lr=function e(t){return!!(t&&t.__CANCEL__)};function hr(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new er}}var pr=function e(t){hr(t);t.headers=t.headers||{};t.data=cr.call(t,t.data,t.headers,t.transformRequest);t.headers=Ot.merge(t.headers.common||{},t.headers[t.method]||{},t.headers);Ot.forEach(["delete","get","head","post","put","patch","common"],(function e(r){delete t.headers[r]}));var r=t.adapter||fr.adapter;return r(t).then((function e(r){hr(t);r.data=cr.call(t,r.data,r.headers,t.transformResponse);return r}),(function e(r){if(!lr(r)){hr(t);if(r&&r.response){r.response.data=cr.call(t,r.response.data,r.response.headers,t.transformResponse)}}return Promise.reject(r)}))};var dr=function e(t,r){r=r||{};var n={};function i(e,t){if(Ot.isPlainObject(e)&&Ot.isPlainObject(t)){return Ot.merge(e,t)}else if(Ot.isPlainObject(t)){return Ot.merge({},t)}else if(Ot.isArray(t)){return t.slice()}return t}function o(e){if(!Ot.isUndefined(r[e])){return i(t[e],r[e])}else if(!Ot.isUndefined(t[e])){return i(undefined,t[e])}}function a(e){if(!Ot.isUndefined(r[e])){return i(undefined,r[e])}}function s(e){if(!Ot.isUndefined(r[e])){return i(undefined,r[e])}else if(!Ot.isUndefined(t[e])){return i(undefined,t[e])}}function u(e){if(e in r){return i(t[e],r[e])}else if(e in t){return i(undefined,t[e])}}var f={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};Ot.forEach(Object.keys(t).concat(Object.keys(r)),(function e(t){var r=f[t]||o;var i=r(t);Ot.isUndefined(i)&&r!==u||(n[t]=i)}));return n};var vr={version:"0.27.2"};var gr=vr.version;var yr={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){yr[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var mr={};yr.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+gr+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Ft(i(n," has been removed"+(r?" in "+r:"")),Ft.ERR_DEPRECATED)}if(r&&!mr[n]){mr[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function Er(e,t,r){if(typeof e!=="object"){throw new Ft("options must be an object",Ft.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var a=t[o];if(a){var s=e[o];var u=s===undefined||a(s,o,e);if(u!==true){throw new Ft("option "+o+" must be "+u,Ft.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Ft("Unknown option "+o,Ft.ERR_BAD_OPTION)}}}var wr={assertOptions:Er,validators:yr};var br=wr.validators;function _r(e){this.defaults=e;this.interceptors={request:new Ut,response:new Ut}}_r.prototype.request=function e(t,r){if(typeof t==="string"){r=r||{};r.url=t}else{r=t||{}}r=dr(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 n=r.transitional;if(n!==undefined){wr.assertOptions(n,{silentJSONParsing:br.transitional(br.boolean),forcedJSONParsing:br.transitional(br.boolean),clarifyTimeoutError:br.transitional(br.boolean)},false)}var i=[];var o=true;this.interceptors.request.forEach((function e(t){if(typeof t.runWhen==="function"&&t.runWhen(r)===false){return}o=o&&t.synchronous;i.unshift(t.fulfilled,t.rejected)}));var a=[];this.interceptors.response.forEach((function e(t){a.push(t.fulfilled,t.rejected)}));var s;if(!o){var u=[pr,undefined];Array.prototype.unshift.apply(u,i);u=u.concat(a);s=Promise.resolve(r);while(u.length){s=s.then(u.shift(),u.shift())}return s}var f=r;while(i.length){var c=i.shift();var l=i.shift();try{f=c(f)}catch(e){l(e);break}}try{s=pr(f)}catch(e){return Promise.reject(e)}while(a.length){s=s.then(a.shift(),a.shift())}return s};_r.prototype.getUri=function e(t){t=dr(this.defaults,t);var r=Kt(t.baseURL,t.url);return Pt(r,t.params,t.paramsSerializer)};Ot.forEach(["delete","get","head","options"],(function e(t){_r.prototype[t]=function(e,r){return this.request(dr(r||{},{method:t,url:e,data:(r||{}).data}))}}));Ot.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(dr(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}_r.prototype[t]=r();_r.prototype[t+"Form"]=r(true)}));var Rr=_r;function Ar(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t;var n=r._listeners.length;for(t=0;t<n;t++){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n){if(r.reason){return}r.reason=new er(n);t(r.reason)}))}Ar.prototype.throwIfRequested=function e(){if(this.reason){throw this.reason}};Ar.prototype.subscribe=function e(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}};Ar.prototype.unsubscribe=function e(t){if(!this._listeners){return}var r=this._listeners.indexOf(t);if(r!==-1){this._listeners.splice(r,1)}};Ar.source=function e(){var t;var r=new Ar((function e(r){t=r}));return{token:r,cancel:t}};var Tr=Ar;var Or=function e(t){return function e(r){return t.apply(null,r)}};var Sr=function e(t){return Ot.isObject(t)&&t.isAxiosError===true};function Pr(e){var t=new Rr(e);var r=Ge(Rr.prototype.request,t);Ot.extend(r,Rr.prototype,t);Ot.extend(r,t);r.create=function t(r){return Pr(dr(e,r))};return r}var Cr=Pr(fr);Cr.Axios=Rr;Cr.CanceledError=er;Cr.CancelToken=Tr;Cr.isCancel=lr;Cr.VERSION=vr.version;Cr.toFormData=Vt;Cr.AxiosError=Ft;Cr.Cancel=Cr.CanceledError;Cr.all=function e(t){return Promise.all(t)};Cr.spread=Or;Cr.isAxiosError=Sr;var Ur=Cr;var Ir=Cr;Ur.default=Ir;var Lr=Ur;var Br=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var Dr=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(e){return Br()}try{if(!__global__)return Br();return __global__}finally{delete Object.prototype.__global__}}();var xr=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var Nr=e("V",function(){function e(e){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=ze;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||3e3;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=Lr.create({baseURL:this.baseURL,timeout:this.timeout})}e.prototype.setDefault=function(){Dr[jr]=this};e.getDefault=function(){return Dr[jr]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.api.defaults.baseURL=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(xr)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var t=me(e);if(t===null||t.exp&&t.exp*1e3<(new Date).getTime()){return this.clearSession()}this.token=e;this.session=t;this.api.defaults.headers.common.Authorization="Bearer ".concat(e);localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}());var jr=Symbol.for("verdocs-default-endpoint");if(!Dr[jr]){Dr[jr]=new Nr}}}}));
7
+ */var v=50;m.TYPED_ARRAY_SUPPORT=t.TYPED_ARRAY_SUPPORT!==undefined?t.TYPED_ARRAY_SUPPORT:true;function g(){return m.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function y(e,t){if(g()<t){throw new RangeError("Invalid typed array length")}if(m.TYPED_ARRAY_SUPPORT){e=new Uint8Array(t);e.__proto__=m.prototype}else{if(e===null){e=new m(t)}e.length=t}return e}function m(e,t,r){if(!m.TYPED_ARRAY_SUPPORT&&!(this instanceof m)){return new m(e,t,r)}if(typeof e==="number"){if(typeof t==="string"){throw new Error("If encoding is specified then the first argument must be a string")}return _(this,e)}return E(this,e,t,r)}m.poolSize=8192;m._augment=function(e){e.__proto__=m.prototype;return e};function E(e,t,r,n){if(typeof t==="number"){throw new TypeError('"value" argument must not be a number')}if(typeof ArrayBuffer!=="undefined"&&t instanceof ArrayBuffer){return T(e,t,r,n)}if(typeof t==="string"){return R(e,t,r)}return O(e,t)}m.from=function(e,t,r){return E(null,e,t,r)};if(m.TYPED_ARRAY_SUPPORT){m.prototype.__proto__=Uint8Array.prototype;m.__proto__=Uint8Array}function w(e){if(typeof e!=="number"){throw new TypeError('"size" argument must be a number')}else if(e<0){throw new RangeError('"size" argument must not be negative')}}function b(e,t,r,n){w(t);if(t<=0){return y(e,t)}if(r!==undefined){return typeof n==="string"?y(e,t).fill(r,n):y(e,t).fill(r)}return y(e,t)}m.alloc=function(e,t,r){return b(null,e,t,r)};function _(e,t){w(t);e=y(e,t<0?0:S(t)|0);if(!m.TYPED_ARRAY_SUPPORT){for(var r=0;r<t;++r){e[r]=0}}return e}m.allocUnsafe=function(e){return _(null,e)};m.allocUnsafeSlow=function(e){return _(null,e)};function R(e,t,r){if(typeof r!=="string"||r===""){r="utf8"}if(!m.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}var n=C(t,r)|0;e=y(e,n);var i=e.write(t,r);if(i!==n){e=e.slice(0,i)}return e}function A(e,t){var r=t.length<0?0:S(t.length)|0;e=y(e,r);for(var n=0;n<r;n+=1){e[n]=t[n]&255}return e}function T(e,t,r,n){if(r<0||t.byteLength<r){throw new RangeError("'offset' is out of bounds")}if(t.byteLength<r+(n||0)){throw new RangeError("'length' is out of bounds")}if(r===undefined&&n===undefined){t=new Uint8Array(t)}else if(n===undefined){t=new Uint8Array(t,r)}else{t=new Uint8Array(t,r,n)}if(m.TYPED_ARRAY_SUPPORT){e=t;e.__proto__=m.prototype}else{e=A(e,t)}return e}function O(e,t){if(P(t)){var r=S(t.length)|0;e=y(e,r);if(e.length===0){return e}t.copy(e,0,0,r);return e}if(t){if(typeof ArrayBuffer!=="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t){if(typeof t.length!=="number"||ce(t.length)){return y(e,0)}return A(e,t)}if(t.type==="Buffer"&&d(t.data)){return A(e,t.data)}}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function S(e){if(e>=g()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+g().toString(16)+" bytes")}return e|0}m.isBuffer=le;function P(e){return!!(e!=null&&e._isBuffer)}m.compare=function e(t,r){if(!P(t)||!P(r)){throw new TypeError("Arguments must be Buffers")}if(t===r)return 0;var n=t.length;var i=r.length;for(var o=0,a=Math.min(n,i);o<a;++o){if(t[o]!==r[o]){n=t[o];i=r[o];break}}if(n<i)return-1;if(i<n)return 1;return 0};m.isEncoding=function e(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};m.concat=function e(t,r){if(!d(t)){throw new TypeError('"list" argument must be an Array of Buffers')}if(t.length===0){return m.alloc(0)}var n;if(r===undefined){r=0;for(n=0;n<t.length;++n){r+=t[n].length}}var i=m.allocUnsafe(r);var o=0;for(n=0;n<t.length;++n){var a=t[n];if(!P(a)){throw new TypeError('"list" argument must be an Array of Buffers')}a.copy(i,o);o+=a.length}return i};function C(e,t){if(P(e)){return e.length}if(typeof ArrayBuffer!=="undefined"&&typeof ArrayBuffer.isView==="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)){return e.byteLength}if(typeof e!=="string"){e=""+e}var r=e.length;if(r===0)return 0;var n=false;for(;;){switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case undefined:return oe(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ue(e).length;default:if(n)return oe(e).length;t=(""+t).toLowerCase();n=true}}}m.byteLength=C;function U(e,t,r){var n=false;if(t===undefined||t<0){t=0}if(t>this.length){return""}if(r===undefined||r>this.length){r=this.length}if(r<=0){return""}r>>>=0;t>>>=0;if(r<=t){return""}if(!e)e="utf8";while(true){switch(e){case"hex":return W(this,t,r);case"utf8":case"utf-8":return F(this,t,r);case"ascii":return V(this,t,r);case"latin1":case"binary":return J(this,t,r);case"base64":return Y(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();n=true}}}m.prototype._isBuffer=true;function I(e,t,r){var n=e[t];e[t]=e[r];e[r]=n}m.prototype.swap16=function e(){var t=this.length;if(t%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var r=0;r<t;r+=2){I(this,r,r+1)}return this};m.prototype.swap32=function e(){var t=this.length;if(t%4!==0){throw new RangeError("Buffer size must be a multiple of 32-bits")}for(var r=0;r<t;r+=4){I(this,r,r+3);I(this,r+1,r+2)}return this};m.prototype.swap64=function e(){var t=this.length;if(t%8!==0){throw new RangeError("Buffer size must be a multiple of 64-bits")}for(var r=0;r<t;r+=8){I(this,r,r+7);I(this,r+1,r+6);I(this,r+2,r+5);I(this,r+3,r+4)}return this};m.prototype.toString=function e(){var t=this.length|0;if(t===0)return"";if(arguments.length===0)return F(this,0,t);return U.apply(this,arguments)};m.prototype.equals=function e(t){if(!P(t))throw new TypeError("Argument must be a Buffer");if(this===t)return true;return m.compare(this,t)===0};m.prototype.inspect=function e(){var t="";var r=v;if(this.length>0){t=this.toString("hex",0,r).match(/.{2}/g).join(" ");if(this.length>r)t+=" ... "}return"<Buffer "+t+">"};m.prototype.compare=function e(t,r,n,i,o){if(!P(t)){throw new TypeError("Argument must be a Buffer")}if(r===undefined){r=0}if(n===undefined){n=t?t.length:0}if(i===undefined){i=0}if(o===undefined){o=this.length}if(r<0||n>t.length||i<0||o>this.length){throw new RangeError("out of range index")}if(i>=o&&r>=n){return 0}if(i>=o){return-1}if(r>=n){return 1}r>>>=0;n>>>=0;i>>>=0;o>>>=0;if(this===t)return 0;var a=o-i;var s=n-r;var u=Math.min(a,s);var f=this.slice(i,o);var c=t.slice(r,n);for(var l=0;l<u;++l){if(f[l]!==c[l]){a=f[l];s=c[l];break}}if(a<s)return-1;if(s<a)return 1;return 0};function L(e,t,r,n,i){if(e.length===0)return-1;if(typeof r==="string"){n=r;r=0}else if(r>2147483647){r=2147483647}else if(r<-2147483648){r=-2147483648}r=+r;if(isNaN(r)){r=i?0:e.length-1}if(r<0)r=e.length+r;if(r>=e.length){if(i)return-1;else r=e.length-1}else if(r<0){if(i)r=0;else return-1}if(typeof t==="string"){t=m.from(t,n)}if(P(t)){if(t.length===0){return-1}return B(e,t,r,n,i)}else if(typeof t==="number"){t=t&255;if(m.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf==="function"){if(i){return Uint8Array.prototype.indexOf.call(e,t,r)}else{return Uint8Array.prototype.lastIndexOf.call(e,t,r)}}return B(e,[t],r,n,i)}throw new TypeError("val must be string, number or Buffer")}function B(e,t,r,n,i){var o=1;var a=e.length;var s=t.length;if(n!==undefined){n=String(n).toLowerCase();if(n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le"){if(e.length<2||t.length<2){return-1}o=2;a/=2;s/=2;r/=2}}function u(e,t){if(o===1){return e[t]}else{return e.readUInt16BE(t*o)}}var f;if(i){var c=-1;for(f=r;f<a;f++){if(u(e,f)===u(t,c===-1?0:f-c)){if(c===-1)c=f;if(f-c+1===s)return c*o}else{if(c!==-1)f-=f-c;c=-1}}}else{if(r+s>a)r=a-s;for(f=r;f>=0;f--){var l=true;for(var h=0;h<s;h++){if(u(e,f+h)!==u(t,h)){l=false;break}}if(l)return f}}return-1}m.prototype.includes=function e(t,r,n){return this.indexOf(t,r,n)!==-1};m.prototype.indexOf=function e(t,r,n){return L(this,t,r,n,true)};m.prototype.lastIndexOf=function e(t,r,n){return L(this,t,r,n,false)};function D(e,t,r,n){r=Number(r)||0;var i=e.length-r;if(!n){n=i}else{n=Number(n);if(n>i){n=i}}var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");if(n>o/2){n=o/2}for(var a=0;a<n;++a){var s=parseInt(t.substr(a*2,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function x(e,t,r,n){return fe(oe(t,e.length-r),e,r,n)}function N(e,t,r,n){return fe(ae(t),e,r,n)}function j(e,t,r,n){return N(e,t,r,n)}function k(e,t,r,n){return fe(ue(t),e,r,n)}function M(e,t,r,n){return fe(se(t,e.length-r),e,r,n)}m.prototype.write=function e(t,r,n,i){if(r===undefined){i="utf8";n=this.length;r=0}else if(n===undefined&&typeof r==="string"){i=r;n=this.length;r=0}else if(isFinite(r)){r=r|0;if(isFinite(n)){n=n|0;if(i===undefined)i="utf8"}else{i=n;n=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var o=this.length-r;if(n===undefined||n>o)n=o;if(t.length>0&&(n<0||r<0)||r>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!i)i="utf8";var a=false;for(;;){switch(i){case"hex":return D(this,t,r,n);case"utf8":case"utf-8":return x(this,t,r,n);case"ascii":return N(this,t,r,n);case"latin1":case"binary":return j(this,t,r,n);case"base64":return k(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase();a=true}}};m.prototype.toJSON=function e(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(e,t,r){if(t===0&&r===e.length){return c(e)}else{return c(e.slice(t,r))}}function F(e,t,r){r=Math.min(e.length,r);var n=[];var i=t;while(i<r){var o=e[i];var a=null;var s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,f,c,l;switch(s){case 1:if(o<128){a=o}break;case 2:u=e[i+1];if((u&192)===128){l=(o&31)<<6|u&63;if(l>127){a=l}}break;case 3:u=e[i+1];f=e[i+2];if((u&192)===128&&(f&192)===128){l=(o&15)<<12|(u&63)<<6|f&63;if(l>2047&&(l<55296||l>57343)){a=l}}break;case 4:u=e[i+1];f=e[i+2];c=e[i+3];if((u&192)===128&&(f&192)===128&&(c&192)===128){l=(o&15)<<18|(u&63)<<12|(f&63)<<6|c&63;if(l>65535&&l<1114112){a=l}}}}if(a===null){a=65533;s=1}else if(a>65535){a-=65536;n.push(a>>>10&1023|55296);a=56320|a&1023}n.push(a);i+=s}return z(n)}var q=4096;function z(e){var t=e.length;if(t<=q){return String.fromCharCode.apply(String,e)}var r="";var n=0;while(n<t){r+=String.fromCharCode.apply(String,e.slice(n,n+=q))}return r}function V(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i){n+=String.fromCharCode(e[i]&127)}return n}function J(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i){n+=String.fromCharCode(e[i])}return n}function W(e,t,r){var n=e.length;if(!t||t<0)t=0;if(!r||r<0||r>n)r=n;var i="";for(var o=t;o<r;++o){i+=ie(e[o])}return i}function H(e,t,r){var n=e.slice(t,r);var i="";for(var o=0;o<n.length;o+=2){i+=String.fromCharCode(n[o]+n[o+1]*256)}return i}m.prototype.slice=function e(t,r){var n=this.length;t=~~t;r=r===undefined?n:~~r;if(t<0){t+=n;if(t<0)t=0}else if(t>n){t=n}if(r<0){r+=n;if(r<0)r=0}else if(r>n){r=n}if(r<t)r=t;var i;if(m.TYPED_ARRAY_SUPPORT){i=this.subarray(t,r);i.__proto__=m.prototype}else{var o=r-t;i=new m(o,undefined);for(var a=0;a<o;++a){i[a]=this[a+t]}}return i};function G(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUIntLE=function e(t,r,n){t=t|0;r=r|0;if(!n)G(t,r,this.length);var i=this[t];var o=1;var a=0;while(++a<r&&(o*=256)){i+=this[t+a]*o}return i};m.prototype.readUIntBE=function e(t,r,n){t=t|0;r=r|0;if(!n){G(t,r,this.length)}var i=this[t+--r];var o=1;while(r>0&&(o*=256)){i+=this[t+--r]*o}return i};m.prototype.readUInt8=function e(t,r){if(!r)G(t,1,this.length);return this[t]};m.prototype.readUInt16LE=function e(t,r){if(!r)G(t,2,this.length);return this[t]|this[t+1]<<8};m.prototype.readUInt16BE=function e(t,r){if(!r)G(t,2,this.length);return this[t]<<8|this[t+1]};m.prototype.readUInt32LE=function e(t,r){if(!r)G(t,4,this.length);return(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};m.prototype.readUInt32BE=function e(t,r){if(!r)G(t,4,this.length);return this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};m.prototype.readIntLE=function e(t,r,n){t=t|0;r=r|0;if(!n)G(t,r,this.length);var i=this[t];var o=1;var a=0;while(++a<r&&(o*=256)){i+=this[t+a]*o}o*=128;if(i>=o)i-=Math.pow(2,8*r);return i};m.prototype.readIntBE=function e(t,r,n){t=t|0;r=r|0;if(!n)G(t,r,this.length);var i=r;var o=1;var a=this[t+--i];while(i>0&&(o*=256)){a+=this[t+--i]*o}o*=128;if(a>=o)a-=Math.pow(2,8*r);return a};m.prototype.readInt8=function e(t,r){if(!r)G(t,1,this.length);if(!(this[t]&128))return this[t];return(255-this[t]+1)*-1};m.prototype.readInt16LE=function e(t,r){if(!r)G(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};m.prototype.readInt16BE=function e(t,r){if(!r)G(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};m.prototype.readInt32LE=function e(t,r){if(!r)G(t,4,this.length);return this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};m.prototype.readInt32BE=function e(t,r){if(!r)G(t,4,this.length);return this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};m.prototype.readFloatLE=function e(t,r){if(!r)G(t,4,this.length);return l(this,t,true,23,4)};m.prototype.readFloatBE=function e(t,r){if(!r)G(t,4,this.length);return l(this,t,false,23,4)};m.prototype.readDoubleLE=function e(t,r){if(!r)G(t,8,this.length);return l(this,t,true,52,8)};m.prototype.readDoubleBE=function e(t,r){if(!r)G(t,8,this.length);return l(this,t,false,52,8)};function K(e,t,r,n,i,o){if(!P(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}m.prototype.writeUIntLE=function e(t,r,n,i){t=+t;r=r|0;n=n|0;if(!i){var o=Math.pow(2,8*n)-1;K(this,t,r,n,o,0)}var a=1;var s=0;this[r]=t&255;while(++s<n&&(a*=256)){this[r+s]=t/a&255}return r+n};m.prototype.writeUIntBE=function e(t,r,n,i){t=+t;r=r|0;n=n|0;if(!i){var o=Math.pow(2,8*n)-1;K(this,t,r,n,o,0)}var a=n-1;var s=1;this[r+a]=t&255;while(--a>=0&&(s*=256)){this[r+a]=t/s&255}return r+n};m.prototype.writeUInt8=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,1,255,0);if(!m.TYPED_ARRAY_SUPPORT)t=Math.floor(t);this[r]=t&255;return r+1};function X(e,t,r,n){if(t<0)t=65535+t+1;for(var i=0,o=Math.min(e.length-r,2);i<o;++i){e[r+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}}m.prototype.writeUInt16LE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,2,65535,0);if(m.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8}else{X(this,t,r,true)}return r+2};m.prototype.writeUInt16BE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,2,65535,0);if(m.TYPED_ARRAY_SUPPORT){this[r]=t>>>8;this[r+1]=t&255}else{X(this,t,r,false)}return r+2};function Z(e,t,r,n){if(t<0)t=4294967295+t+1;for(var i=0,o=Math.min(e.length-r,4);i<o;++i){e[r+i]=t>>>(n?i:3-i)*8&255}}m.prototype.writeUInt32LE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,4,4294967295,0);if(m.TYPED_ARRAY_SUPPORT){this[r+3]=t>>>24;this[r+2]=t>>>16;this[r+1]=t>>>8;this[r]=t&255}else{Z(this,t,r,true)}return r+4};m.prototype.writeUInt32BE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,4,4294967295,0);if(m.TYPED_ARRAY_SUPPORT){this[r]=t>>>24;this[r+1]=t>>>16;this[r+2]=t>>>8;this[r+3]=t&255}else{Z(this,t,r,false)}return r+4};m.prototype.writeIntLE=function e(t,r,n,i){t=+t;r=r|0;if(!i){var o=Math.pow(2,8*n-1);K(this,t,r,n,o-1,-o)}var a=0;var s=1;var u=0;this[r]=t&255;while(++a<n&&(s*=256)){if(t<0&&u===0&&this[r+a-1]!==0){u=1}this[r+a]=(t/s>>0)-u&255}return r+n};m.prototype.writeIntBE=function e(t,r,n,i){t=+t;r=r|0;if(!i){var o=Math.pow(2,8*n-1);K(this,t,r,n,o-1,-o)}var a=n-1;var s=1;var u=0;this[r+a]=t&255;while(--a>=0&&(s*=256)){if(t<0&&u===0&&this[r+a+1]!==0){u=1}this[r+a]=(t/s>>0)-u&255}return r+n};m.prototype.writeInt8=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,1,127,-128);if(!m.TYPED_ARRAY_SUPPORT)t=Math.floor(t);if(t<0)t=255+t+1;this[r]=t&255;return r+1};m.prototype.writeInt16LE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,2,32767,-32768);if(m.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8}else{X(this,t,r,true)}return r+2};m.prototype.writeInt16BE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,2,32767,-32768);if(m.TYPED_ARRAY_SUPPORT){this[r]=t>>>8;this[r+1]=t&255}else{X(this,t,r,false)}return r+2};m.prototype.writeInt32LE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,4,2147483647,-2147483648);if(m.TYPED_ARRAY_SUPPORT){this[r]=t&255;this[r+1]=t>>>8;this[r+2]=t>>>16;this[r+3]=t>>>24}else{Z(this,t,r,true)}return r+4};m.prototype.writeInt32BE=function e(t,r,n){t=+t;r=r|0;if(!n)K(this,t,r,4,2147483647,-2147483648);if(t<0)t=4294967295+t+1;if(m.TYPED_ARRAY_SUPPORT){this[r]=t>>>24;this[r+1]=t>>>16;this[r+2]=t>>>8;this[r+3]=t&255}else{Z(this,t,r,false)}return r+4};function $(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Q(e,t,r,n,i){if(!i){$(e,t,r,4)}h(e,t,r,n,23,4);return r+4}m.prototype.writeFloatLE=function e(t,r,n){return Q(this,t,r,true,n)};m.prototype.writeFloatBE=function e(t,r,n){return Q(this,t,r,false,n)};function ee(e,t,r,n,i){if(!i){$(e,t,r,8)}h(e,t,r,n,52,8);return r+8}m.prototype.writeDoubleLE=function e(t,r,n){return ee(this,t,r,true,n)};m.prototype.writeDoubleBE=function e(t,r,n){return ee(this,t,r,false,n)};m.prototype.copy=function e(t,r,n,i){if(!n)n=0;if(!i&&i!==0)i=this.length;if(r>=t.length)r=t.length;if(!r)r=0;if(i>0&&i<n)i=n;if(i===n)return 0;if(t.length===0||this.length===0)return 0;if(r<0){throw new RangeError("targetStart out of bounds")}if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");if(i>this.length)i=this.length;if(t.length-r<i-n){i=t.length-r+n}var o=i-n;var a;if(this===t&&n<r&&r<i){for(a=o-1;a>=0;--a){t[a+r]=this[a+n]}}else if(o<1e3||!m.TYPED_ARRAY_SUPPORT){for(a=0;a<o;++a){t[a+r]=this[a+n]}}else{Uint8Array.prototype.set.call(t,this.subarray(n,n+o),r)}return o};m.prototype.fill=function e(t,r,n,i){if(typeof t==="string"){if(typeof r==="string"){i=r;r=0;n=this.length}else if(typeof n==="string"){i=n;n=this.length}if(t.length===1){var o=t.charCodeAt(0);if(o<256){t=o}}if(i!==undefined&&typeof i!=="string"){throw new TypeError("encoding must be a string")}if(typeof i==="string"&&!m.isEncoding(i)){throw new TypeError("Unknown encoding: "+i)}}else if(typeof t==="number"){t=t&255}if(r<0||this.length<r||this.length<n){throw new RangeError("Out of range index")}if(n<=r){return this}r=r>>>0;n=n===undefined?this.length:n>>>0;if(!t)t=0;var a;if(typeof t==="number"){for(a=r;a<n;++a){this[a]=t}}else{var s=P(t)?t:oe(new m(t,i).toString());var u=s.length;for(a=0;a<n-r;++a){this[a+r]=s[a%u]}}return this};var te=/[^+\/0-9A-Za-z-_]/g;function re(e){e=ne(e).replace(te,"");if(e.length<2)return"";while(e.length%4!==0){e=e+"="}return e}function ne(e){if(e.trim)return e.trim();return e.replace(/^\s+|\s+$/g,"")}function ie(e){if(e<16)return"0"+e.toString(16);return e.toString(16)}function oe(e,t){t=t||Infinity;var r;var n=e.length;var i=null;var o=[];for(var a=0;a<n;++a){r=e.charCodeAt(a);if(r>55295&&r<57344){if(!i){if(r>56319){if((t-=3)>-1)o.push(239,191,189);continue}else if(a+1===n){if((t-=3)>-1)o.push(239,191,189);continue}i=r;continue}if(r<56320){if((t-=3)>-1)o.push(239,191,189);i=r;continue}r=(i-55296<<10|r-56320)+65536}else if(i){if((t-=3)>-1)o.push(239,191,189)}i=null;if(r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else{throw new Error("Invalid code point")}}return o}function ae(e){var t=[];for(var r=0;r<e.length;++r){t.push(e.charCodeAt(r)&255)}return t}function se(e,t){var r,n,i;var o=[];for(var a=0;a<e.length;++a){if((t-=2)<0)break;r=e.charCodeAt(a);n=r>>8;i=r%256;o.push(i);o.push(n)}return o}function ue(e){return s(re(e))}function fe(e,t,r,n){for(var i=0;i<n;++i){if(i+r>=t.length||i>=e.length)break;t[i+r]=e[i]}return i}function ce(e){return e!==e}function le(e){return e!=null&&(!!e._isBuffer||he(e)||pe(e))}function he(e){return!!e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}function pe(e){return typeof e.readFloatLE==="function"&&typeof e.slice==="function"&&he(e.slice(0,0))}var de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var ve=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;var ge=function(e){e=String(e).replace(/[\t\n\f\r ]+/g,"");if(!ve.test(e))throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");e+="==".slice(2-(e.length&3));var t;var r="";var n;var i;var o=0;for(;o<e.length;){t=de.indexOf(e.charAt(o++))<<18|de.indexOf(e.charAt(o++))<<12|(n=de.indexOf(e.charAt(o++)))<<6|(i=de.indexOf(e.charAt(o++)));r+=n===64?String.fromCharCode(t>>16&255):i===64?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,t&255)}return r};var ye=function(e){return JSON.parse(ge((e||"").split(".")[1]||""))};var me=function(e){var t;try{t=ye(e);if(t===null){return null}}catch(e){return null}Object.keys(t).forEach((function(e){if(typeof e==="string"&&e.startsWith("https://verdocs.com/")){t[e.replace("https://verdocs.com/","")]=t[e];delete t[e]}}));return t};var Ee=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var we=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var be=function(e,t){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(r){return[2,e.api.post("/documents/summary",{page:t}).then((function(e){return e.data}))]}))}))};var _e=function(e,t){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(r){return[2,e.api.post("/documents/search",t).then((function(e){return e.data}))]}))}))};var Re=e("g",(function(e,t){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(r){return[2,e.api.get("/documents/".concat(t.documentId,"/recipients/").concat(encodeURIComponent(t.roleId),"/invitation/").concat(t.inviteCode)).then((function(t){var r,n;var i=((r=t.headers)===null||r===void 0?void 0:r.signer_token)||"";var o=me(i);e.setToken((n=t.headers)===null||n===void 0?void 0:n.signer_token);return{recipient:t.data,session:o,signerToken:i}}))]}))}))}));var Ae=function(e,t){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(r){return[2,e.api.get("/documents/".concat(t,"/recipients")).then((function(e){return e.data}))]}))}))};var Te=e("a",(function(e,t){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(r){return[2,e.api.get("/documents/".concat(t)).then((function(e){return e.data}))]}))}))}));var Oe=e("b",(function(e,t,r){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(n){return[2,e.api.get("/documents/".concat(t,"/envelope_documents/").concat(r,"?file=true"),{responseType:"arraybuffer"}).then((function(e){return m.from(e.data,"binary").toString("base64")}))]}))}))}));var Se=e("c",(function(e,t,r,n){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(i){return[2,e.api.put("/documents/".concat(t,"/fields/").concat(r),n).then((function(e){return e.data}))]}))}))}));var Pe=function(e,t,r,n){return Ee(void 0,void 0,void 0,(function(){return we(this,(function(i){return[2,e.api.put("/documents/".concat(t,"/fields/").concat(r,"/signature/").concat(n)).then((function(e){return e.data}))]}))}))};var Ce=Object.freeze({__proto__:null,getSummary:be,searchDocuments:_e,getSigningSession:Re,getDocumentRecipients:Ae,getDocument:Te,getDocumentFile:Oe,updateDocumentField:Se,updateDocumentFieldSignature:Pe});var Ue=undefined&&undefined.__assign||function(){Ue=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return Ue.apply(this,arguments)};var Ie=undefined&&undefined.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(a,s)}u((n=n.apply(e,t||[])).next())}))};var Le=undefined&&undefined.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;i=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];i=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var Be=e("u",(function(e,t,r,n,i){return Ie(void 0,void 0,void 0,(function(){return Le(this,(function(o){return[2,e.api.put("/documents/".concat(t,"/recipients/").concat(r),Ue({role_name:r,action:n},i||{})).then((function(e){return e.data}))]}))}))}));var De=Object.freeze({__proto__:null,updateRecipientStatus:Be});var xe=function(e,t,r){var n=new FormData;n.append("signature",r,t);return e.api.post("/signatures",n).then((function(e){return e.data}))};var Ne=function(e){return e.api.get("/signatures").then((function(e){return e.data}))};var je=function(e,t){return e.api.get("/signatures/".concat(t)).then((function(e){return e.data}))};var ke=function(e,t){return e.api.delete("/signatures/".concat(t)).then((function(e){return e.data}))};var Me=Object.freeze({__proto__:null,createSignature:xe,getSignatures:Ne,getSignature:je,deleteSignature:ke});var Ye=function(e,t,r){var n=new FormData;n.append("initial",r,t);return e.api.post("/initials",n).then((function(e){return e.data}))};var Fe=Object.freeze({__proto__:null,createInitials:Ye});var qe=Object.freeze({__proto__:null});var ze=Object.freeze({__proto__:null,Documents:Ce,Recipients:De,Signatures:Me,Initials:Fe,Types:qe});var Ve;(function(e){e["TEMPLATE_CREATOR_CREATE_PUBLIC"]="template:creator:create:public";e["TEMPLATE_CREATOR_CREATE_ORG"]="template:creator:create:org";e["TEMPLATE_CREATOR_CREATE_PERSONAL"]="template:creator:create:personal";e["TEMPLATE_CREATOR_DELETE"]="template:creator:delete";e["TEMPLATE_CREATOR_VISIBILITY"]="template:creator:visibility";e["TEMPLATE_MEMBER_READ"]="template:member:read";e["TEMPLATE_MEMBER_WRITE"]="template:member:write";e["TEMPLATE_MEMBER_DELETE"]="template:member:delete";e["TEMPLATE_MEMBER_VISIBILITY"]="template:member:visibility"})(Ve||(Ve={}));var Je;(function(e){e["CREATOR"]="creator";e["ORGANIZATION_MEMBER"]="organization_member";e["ORGANIZATION_MEMBER_AS_CREATOR"]="organization_member_as_creator";e["EVERYONE"]="everyone";e["EVERYONE_AS_CREATOR"]="everyone_as_creator"})(Je||(Je={}));var We;(function(e){e["CREATE_PERSONAL"]="create_personal";e["CREATE_ORG"]="create_org";e["CREATE_PUBLIC"]="create_public";e["READ"]="read";e["WRITE"]="write";e["DELETE"]="delete";e["CHANGE_VISIBILITY_PERSONAL"]="change_visibility_personal";e["CHANGE_VISIBILITY_ORG"]="change_visibility_org";e["CHANGE_VISIBILITY_PUBLIC"]="change_visibility_public"})(We||(We={}));var He;(function(e){e["CREATED_AT"]="created_at";e["UPDATED_AT"]="updated_at";e["NAME"]="name";e["LAST_USED_AT"]="last_used_at";e["COUNTER"]="counter";e["STAR_COUNTER"]="star_counter"})(He||(He={}));var Ge=function e(t,r){return function e(){var n=new Array(arguments.length);for(var i=0;i<n.length;i++){n[i]=arguments[i]}return t.apply(r,n)}};var Ke=Object.prototype.toString;var Xe=function(e){return function(t){var r=Ke.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())}}(Object.create(null));function Ze(e){e=e.toLowerCase();return function t(r){return Xe(r)===e}}function $e(e){return Array.isArray(e)}function Qe(e){return typeof e==="undefined"}function et(e){return e!==null&&!Qe(e)&&e.constructor!==null&&!Qe(e.constructor)&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}var tt=Ze("ArrayBuffer");function rt(e){var t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&tt(e.buffer)}return t}function nt(e){return typeof e==="string"}function it(e){return typeof e==="number"}function ot(e){return e!==null&&typeof e==="object"}function at(e){if(Xe(e)!=="object"){return false}var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}var st=Ze("Date");var ut=Ze("File");var ft=Ze("Blob");var ct=Ze("FileList");function lt(e){return Ke.call(e)==="[object Function]"}function ht(e){return ot(e)&&lt(e.pipe)}function pt(e){var t="[object FormData]";return e&&(typeof FormData==="function"&&e instanceof FormData||Ke.call(e)===t||lt(e.toString)&&e.toString()===t)}var dt=Ze("URLSearchParams");function vt(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function gt(){if(typeof navigator!=="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")){return false}return typeof window!=="undefined"&&typeof document!=="undefined"}function yt(e,t){if(e===null||typeof e==="undefined"){return}if(typeof e!=="object"){e=[e]}if($e(e)){for(var r=0,n=e.length;r<n;r++){t.call(null,e[r],r,e)}}else{for(var i in e){if(Object.prototype.hasOwnProperty.call(e,i)){t.call(null,e[i],i,e)}}}}function mt(){var e={};function t(t,r){if(at(e[r])&&at(t)){e[r]=mt(e[r],t)}else if(at(t)){e[r]=mt({},t)}else if($e(t)){e[r]=t.slice()}else{e[r]=t}}for(var r=0,n=arguments.length;r<n;r++){yt(arguments[r],t)}return e}function Et(e,t,r){yt(t,(function t(n,i){if(r&&typeof n==="function"){e[i]=Ge(n,r)}else{e[i]=n}}));return e}function wt(e){if(e.charCodeAt(0)===65279){e=e.slice(1)}return e}function bt(e,t,r,n){e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;r&&Object.assign(e.prototype,r)}function _t(e,t,r){var n;var i;var o;var a={};t=t||{};do{n=Object.getOwnPropertyNames(e);i=n.length;while(i-- >0){o=n[i];if(!a[o]){t[o]=e[o];a[o]=true}}e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t}function Rt(e,t,r){e=String(e);if(r===undefined||r>e.length){r=e.length}r-=t.length;var n=e.indexOf(t,r);return n!==-1&&n===r}function At(e){if(!e)return null;var t=e.length;if(Qe(t))return null;var r=new Array(t);while(t-- >0){r[t]=e[t]}return r}var Tt=function(e){return function(t){return e&&t instanceof e}}(typeof Uint8Array!=="undefined"&&Object.getPrototypeOf(Uint8Array));var Ot={isArray:$e,isArrayBuffer:tt,isBuffer:et,isFormData:pt,isArrayBufferView:rt,isString:nt,isNumber:it,isObject:ot,isPlainObject:at,isUndefined:Qe,isDate:st,isFile:ut,isBlob:ft,isFunction:lt,isStream:ht,isURLSearchParams:dt,isStandardBrowserEnv:gt,forEach:yt,merge:mt,extend:Et,trim:vt,stripBOM:wt,inherits:bt,toFlatObject:_t,kindOf:Xe,kindOfTest:Ze,endsWith:Rt,toArray:At,isTypedArray:Tt,isFileList:ct};function St(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Pt=function e(t,r,n){if(!r){return t}var i;if(n){i=n(r)}else if(Ot.isURLSearchParams(r)){i=r.toString()}else{var o=[];Ot.forEach(r,(function e(t,r){if(t===null||typeof t==="undefined"){return}if(Ot.isArray(t)){r=r+"[]"}else{t=[t]}Ot.forEach(t,(function e(t){if(Ot.isDate(t)){t=t.toISOString()}else if(Ot.isObject(t)){t=JSON.stringify(t)}o.push(St(r)+"="+St(t))}))}));i=o.join("&")}if(i){var a=t.indexOf("#");if(a!==-1){t=t.slice(0,a)}t+=(t.indexOf("?")===-1?"?":"&")+i}return t};function Ct(){this.handlers=[]}Ct.prototype.use=function e(t,r,n){this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1};Ct.prototype.eject=function e(t){if(this.handlers[t]){this.handlers[t]=null}};Ct.prototype.forEach=function e(t){Ot.forEach(this.handlers,(function e(r){if(r!==null){t(r)}}))};var Ut=Ct;var It=e("h",typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{});function Lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function Bt(e,t,r){return r={path:t,exports:{},require:function(e,t){return xt()}},e(r,r.exports),r.exports}function Dt(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:true});Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:true,get:function(){return e[r]}})}));return t}function xt(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Nt=e("p",It.process);var jt=function e(t,r){Ot.forEach(t,(function e(n,i){if(i!==r&&i.toUpperCase()===r.toUpperCase()){t[r]=n;delete t[i]}}))};function kt(e,t,r,n,i){Error.call(this);this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}Ot.inherits(kt,Error,{toJSON:function 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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Mt=kt.prototype;var Yt={};["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(e){Yt[e]={value:e}}));Object.defineProperties(kt,Yt);Object.defineProperty(Mt,"isAxiosError",{value:true});kt.from=function(e,t,r,n,i,o){var a=Object.create(Mt);Ot.toFlatObject(e,a,(function e(t){return t!==Error.prototype}));kt.call(a,e.message,t,r,n,i);a.name=e.name;o&&Object.assign(a,o);return a};var Ft=kt;var qt={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};function zt(e,t){t=t||new FormData;var r=[];function n(e){if(e===null)return"";if(Ot.isDate(e)){return e.toISOString()}if(Ot.isArrayBuffer(e)||Ot.isTypedArray(e)){return typeof Blob==="function"?new Blob([e]):m.from(e)}return e}function i(e,o){if(Ot.isPlainObject(e)||Ot.isArray(e)){if(r.indexOf(e)!==-1){throw Error("Circular reference detected in "+o)}r.push(e);Ot.forEach(e,(function e(r,a){if(Ot.isUndefined(r))return;var s=o?o+"."+a:a;var u;if(r&&!o&&typeof r==="object"){if(Ot.endsWith(a,"{}")){r=JSON.stringify(r)}else if(Ot.endsWith(a,"[]")&&(u=Ot.toArray(r))){u.forEach((function(e){!Ot.isUndefined(e)&&t.append(s,n(e))}));return}}i(r,s)}));r.pop()}else{t.append(o,n(e))}}i(e);return t}var Vt=zt;var Jt=function e(t,r,n){var i=n.config.validateStatus;if(!n.status||!i||i(n.status)){t(n)}else{r(new Ft("Request failed with status code "+n.status,[Ft.ERR_BAD_REQUEST,Ft.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}};var Wt=Ot.isStandardBrowserEnv()?function e(){return{write:function e(t,r,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(r));if(Ot.isNumber(n)){s.push("expires="+new Date(n).toGMTString())}if(Ot.isString(i)){s.push("path="+i)}if(Ot.isString(o)){s.push("domain="+o)}if(a===true){s.push("secure")}document.cookie=s.join("; ")},read:function e(t){var r=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function e(t){this.write(t,"",Date.now()-864e5)}}}():function e(){return{write:function e(){},read:function e(){return null},remove:function e(){}}}();var Ht=function e(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)};var Gt=function e(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t};var Kt=function e(t,r){if(t&&!Ht(r)){return Gt(t,r)}return r};var Xt=["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 Zt=function e(t){var r={};var n;var i;var o;if(!t){return r}Ot.forEach(t.split("\n"),(function e(t){o=t.indexOf(":");n=Ot.trim(t.substr(0,o)).toLowerCase();i=Ot.trim(t.substr(o+1));if(n){if(r[n]&&Xt.indexOf(n)>=0){return}if(n==="set-cookie"){r[n]=(r[n]?r[n]:[]).concat([i])}else{r[n]=r[n]?r[n]+", "+i:i}}}));return r};var $t=Ot.isStandardBrowserEnv()?function e(){var t=/(msie|trident)/i.test(navigator.userAgent);var r=document.createElement("a");var n;function i(e){var n=e;if(t){r.setAttribute("href",n);n=r.href}r.setAttribute("href",n);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}}n=i(window.location.href);return function e(t){var r=Ot.isString(t)?i(t):t;return r.protocol===n.protocol&&r.host===n.host}}():function e(){return function e(){return true}}();function Qt(e){Ft.call(this,e==null?"canceled":e,Ft.ERR_CANCELED);this.name="CanceledError"}Ot.inherits(Qt,Ft,{__CANCEL__:true});var er=Qt;var tr=function e(t){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""};var rr=function e(t){return new Promise((function e(r,n){var i=t.data;var o=t.headers;var a=t.responseType;var s;function u(){if(t.cancelToken){t.cancelToken.unsubscribe(s)}if(t.signal){t.signal.removeEventListener("abort",s)}}if(Ot.isFormData(i)&&Ot.isStandardBrowserEnv()){delete o["Content-Type"]}var f=new XMLHttpRequest;if(t.auth){var c=t.auth.username||"";var l=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.Authorization="Basic "+btoa(c+":"+l)}var h=Kt(t.baseURL,t.url);f.open(t.method.toUpperCase(),Pt(h,t.params,t.paramsSerializer),true);f.timeout=t.timeout;function p(){if(!f){return}var e="getAllResponseHeaders"in f?Zt(f.getAllResponseHeaders()):null;var i=!a||a==="text"||a==="json"?f.responseText:f.response;var o={data:i,status:f.status,statusText:f.statusText,headers:e,config:t,request:f};Jt((function e(t){r(t);u()}),(function e(t){n(t);u()}),o);f=null}if("onloadend"in f){f.onloadend=p}else{f.onreadystatechange=function e(){if(!f||f.readyState!==4){return}if(f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)){return}setTimeout(p)}}f.onabort=function e(){if(!f){return}n(new Ft("Request aborted",Ft.ECONNABORTED,t,f));f=null};f.onerror=function e(){n(new Ft("Network Error",Ft.ERR_NETWORK,t,f,f));f=null};f.ontimeout=function e(){var r=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";var i=t.transitional||qt;if(t.timeoutErrorMessage){r=t.timeoutErrorMessage}n(new Ft(r,i.clarifyTimeoutError?Ft.ETIMEDOUT:Ft.ECONNABORTED,t,f));f=null};if(Ot.isStandardBrowserEnv()){var d=(t.withCredentials||$t(h))&&t.xsrfCookieName?Wt.read(t.xsrfCookieName):undefined;if(d){o[t.xsrfHeaderName]=d}}if("setRequestHeader"in f){Ot.forEach(o,(function e(t,r){if(typeof i==="undefined"&&r.toLowerCase()==="content-type"){delete o[r]}else{f.setRequestHeader(r,t)}}))}if(!Ot.isUndefined(t.withCredentials)){f.withCredentials=!!t.withCredentials}if(a&&a!=="json"){f.responseType=t.responseType}if(typeof t.onDownloadProgress==="function"){f.addEventListener("progress",t.onDownloadProgress)}if(typeof t.onUploadProgress==="function"&&f.upload){f.upload.addEventListener("progress",t.onUploadProgress)}if(t.cancelToken||t.signal){s=function(e){if(!f){return}n(!e||e&&e.type?new er:e);f.abort();f=null};t.cancelToken&&t.cancelToken.subscribe(s);if(t.signal){t.signal.aborted?s():t.signal.addEventListener("abort",s)}}if(!i){i=null}var v=tr(h);if(v&&["http","https","file"].indexOf(v)===-1){n(new Ft("Unsupported protocol "+v+":",Ft.ERR_BAD_REQUEST,t));return}f.send(i)}))};var nr=null;var ir={"Content-Type":"application/x-www-form-urlencoded"};function or(e,t){if(!Ot.isUndefined(e)&&Ot.isUndefined(e["Content-Type"])){e["Content-Type"]=t}}function ar(){var e;if(typeof XMLHttpRequest!=="undefined"){e=rr}else if(typeof Nt!=="undefined"&&Object.prototype.toString.call(Nt)==="[object process]"){e=rr}return e}function sr(e,t,r){if(Ot.isString(e)){try{(t||JSON.parse)(e);return Ot.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(r||JSON.stringify)(e)}var ur={transitional:qt,adapter:ar(),transformRequest:[function e(t,r){jt(r,"Accept");jt(r,"Content-Type");if(Ot.isFormData(t)||Ot.isArrayBuffer(t)||Ot.isBuffer(t)||Ot.isStream(t)||Ot.isFile(t)||Ot.isBlob(t)){return t}if(Ot.isArrayBufferView(t)){return t.buffer}if(Ot.isURLSearchParams(t)){or(r,"application/x-www-form-urlencoded;charset=utf-8");return t.toString()}var n=Ot.isObject(t);var i=r&&r["Content-Type"];var o;if((o=Ot.isFileList(t))||n&&i==="multipart/form-data"){var a=this.env&&this.env.FormData;return Vt(o?{"files[]":t}:t,a&&new a)}else if(n||i==="application/json"){or(r,"application/json");return sr(t)}return t}],transformResponse:[function e(t){var r=this.transitional||ur.transitional;var n=r&&r.silentJSONParsing;var i=r&&r.forcedJSONParsing;var o=!n&&this.responseType==="json";if(o||i&&Ot.isString(t)&&t.length){try{return JSON.parse(t)}catch(e){if(o){if(e.name==="SyntaxError"){throw Ft.from(e,Ft.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nr},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Ot.forEach(["delete","get","head"],(function e(t){ur.headers[t]={}}));Ot.forEach(["post","put","patch"],(function e(t){ur.headers[t]=Ot.merge(ir)}));var fr=ur;var cr=function e(t,r,n){var i=this||fr;Ot.forEach(n,(function e(n){t=n.call(i,t,r)}));return t};var lr=function e(t){return!!(t&&t.__CANCEL__)};function hr(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new er}}var pr=function e(t){hr(t);t.headers=t.headers||{};t.data=cr.call(t,t.data,t.headers,t.transformRequest);t.headers=Ot.merge(t.headers.common||{},t.headers[t.method]||{},t.headers);Ot.forEach(["delete","get","head","post","put","patch","common"],(function e(r){delete t.headers[r]}));var r=t.adapter||fr.adapter;return r(t).then((function e(r){hr(t);r.data=cr.call(t,r.data,r.headers,t.transformResponse);return r}),(function e(r){if(!lr(r)){hr(t);if(r&&r.response){r.response.data=cr.call(t,r.response.data,r.response.headers,t.transformResponse)}}return Promise.reject(r)}))};var dr=function e(t,r){r=r||{};var n={};function i(e,t){if(Ot.isPlainObject(e)&&Ot.isPlainObject(t)){return Ot.merge(e,t)}else if(Ot.isPlainObject(t)){return Ot.merge({},t)}else if(Ot.isArray(t)){return t.slice()}return t}function o(e){if(!Ot.isUndefined(r[e])){return i(t[e],r[e])}else if(!Ot.isUndefined(t[e])){return i(undefined,t[e])}}function a(e){if(!Ot.isUndefined(r[e])){return i(undefined,r[e])}}function s(e){if(!Ot.isUndefined(r[e])){return i(undefined,r[e])}else if(!Ot.isUndefined(t[e])){return i(undefined,t[e])}}function u(e){if(e in r){return i(t[e],r[e])}else if(e in t){return i(undefined,t[e])}}var f={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};Ot.forEach(Object.keys(t).concat(Object.keys(r)),(function e(t){var r=f[t]||o;var i=r(t);Ot.isUndefined(i)&&r!==u||(n[t]=i)}));return n};var vr={version:"0.27.2"};var gr=vr.version;var yr={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){yr[e]=function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var mr={};yr.transitional=function e(t,r,n){function i(e,t){return"[Axios v"+gr+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(e,n,o){if(t===false){throw new Ft(i(n," has been removed"+(r?" in "+r:"")),Ft.ERR_DEPRECATED)}if(r&&!mr[n]){mr[n]=true;console.warn(i(n," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(e,n,o):true}};function Er(e,t,r){if(typeof e!=="object"){throw new Ft("options must be an object",Ft.ERR_BAD_OPTION_VALUE)}var n=Object.keys(e);var i=n.length;while(i-- >0){var o=n[i];var a=t[o];if(a){var s=e[o];var u=s===undefined||a(s,o,e);if(u!==true){throw new Ft("option "+o+" must be "+u,Ft.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new Ft("Unknown option "+o,Ft.ERR_BAD_OPTION)}}}var wr={assertOptions:Er,validators:yr};var br=wr.validators;function _r(e){this.defaults=e;this.interceptors={request:new Ut,response:new Ut}}_r.prototype.request=function e(t,r){if(typeof t==="string"){r=r||{};r.url=t}else{r=t||{}}r=dr(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 n=r.transitional;if(n!==undefined){wr.assertOptions(n,{silentJSONParsing:br.transitional(br.boolean),forcedJSONParsing:br.transitional(br.boolean),clarifyTimeoutError:br.transitional(br.boolean)},false)}var i=[];var o=true;this.interceptors.request.forEach((function e(t){if(typeof t.runWhen==="function"&&t.runWhen(r)===false){return}o=o&&t.synchronous;i.unshift(t.fulfilled,t.rejected)}));var a=[];this.interceptors.response.forEach((function e(t){a.push(t.fulfilled,t.rejected)}));var s;if(!o){var u=[pr,undefined];Array.prototype.unshift.apply(u,i);u=u.concat(a);s=Promise.resolve(r);while(u.length){s=s.then(u.shift(),u.shift())}return s}var f=r;while(i.length){var c=i.shift();var l=i.shift();try{f=c(f)}catch(e){l(e);break}}try{s=pr(f)}catch(e){return Promise.reject(e)}while(a.length){s=s.then(a.shift(),a.shift())}return s};_r.prototype.getUri=function e(t){t=dr(this.defaults,t);var r=Kt(t.baseURL,t.url);return Pt(r,t.params,t.paramsSerializer)};Ot.forEach(["delete","get","head","options"],(function e(t){_r.prototype[t]=function(e,r){return this.request(dr(r||{},{method:t,url:e,data:(r||{}).data}))}}));Ot.forEach(["post","put","patch"],(function e(t){function r(e){return function r(n,i,o){return this.request(dr(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}_r.prototype[t]=r();_r.prototype[t+"Form"]=r(true)}));var Rr=_r;function Ar(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}var t;this.promise=new Promise((function e(r){t=r}));var r=this;this.promise.then((function(e){if(!r._listeners)return;var t;var n=r._listeners.length;for(t=0;t<n;t++){r._listeners[t](e)}r._listeners=null}));this.promise.then=function(e){var t;var n=new Promise((function(e){r.subscribe(e);t=e})).then(e);n.cancel=function e(){r.unsubscribe(t)};return n};e((function e(n){if(r.reason){return}r.reason=new er(n);t(r.reason)}))}Ar.prototype.throwIfRequested=function e(){if(this.reason){throw this.reason}};Ar.prototype.subscribe=function e(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}};Ar.prototype.unsubscribe=function e(t){if(!this._listeners){return}var r=this._listeners.indexOf(t);if(r!==-1){this._listeners.splice(r,1)}};Ar.source=function e(){var t;var r=new Ar((function e(r){t=r}));return{token:r,cancel:t}};var Tr=Ar;var Or=function e(t){return function e(r){return t.apply(null,r)}};var Sr=function e(t){return Ot.isObject(t)&&t.isAxiosError===true};function Pr(e){var t=new Rr(e);var r=Ge(Rr.prototype.request,t);Ot.extend(r,Rr.prototype,t);Ot.extend(r,t);r.create=function t(r){return Pr(dr(e,r))};return r}var Cr=Pr(fr);Cr.Axios=Rr;Cr.CanceledError=er;Cr.CancelToken=Tr;Cr.isCancel=lr;Cr.VERSION=vr.version;Cr.toFormData=Vt;Cr.AxiosError=Ft;Cr.Cancel=Cr.CanceledError;Cr.all=function e(t){return Promise.all(t)};Cr.spread=Or;Cr.isAxiosError=Sr;var Ur=Cr;var Ir=Cr;Ur.default=Ir;var Lr=Ur;var Br=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};var Dr=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(e){return Br()}try{if(!__global__)return Br();return __global__}finally{delete Object.prototype.__global__}}();var xr=function(e){console.debug("[JS-SDK] ".concat(e.method.toUpperCase()," ").concat(e.baseURL).concat(e.url),e.data?JSON.stringify(e.data):"");return e};var Nr=e("V",function(){function e(e){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=ze;this.baseURL=(e===null||e===void 0?void 0:e.baseURL)||"https://api.verdocs.com";this.timeout=(e===null||e===void 0?void 0:e.timeout)||3e3;this.environment=(e===null||e===void 0?void 0:e.environment)||"verdocs";this.sessionType=(e===null||e===void 0?void 0:e.sessionType)||"user";this.clientID=(e===null||e===void 0?void 0:e.clientID)||"not-set";this.api=Lr.create({baseURL:this.baseURL,timeout:this.timeout})}e.prototype.setDefault=function(){Dr[jr]=this};e.getDefault=function(){return Dr[jr]};e.prototype.getEnvironment=function(){return this.environment};e.prototype.getSessionType=function(){return this.sessionType};e.prototype.getBaseURL=function(){return this.baseURL};e.prototype.getClientID=function(){return this.clientID};e.prototype.getTimeout=function(){return this.timeout};e.prototype.getSession=function(){return this.session};e.prototype.setEnvironment=function(e){this.environment=e;return this};e.prototype.setSessionType=function(e){this.sessionType=e;return this};e.prototype.setBaseURL=function(e){this.api.defaults.baseURL=e;return this};e.prototype.setClientID=function(e){this.clientID=e;this.api.defaults.headers.common["X-Client-ID"]=e;return this};e.prototype.setTimeout=function(e){this.timeout=e;this.api.defaults.timeout=e;return this};e.prototype.logRequests=function(e){if(e&&this.requestLoggerId===null){this.requestLoggerId=this.api.interceptors.request.use(xr)}else if(!e&&this.requestLoggerId!==null){this.api.interceptors.request.eject(this.requestLoggerId)}return this};e.prototype.setToken=function(e){if(!e){return this.clearSession()}var t=me(e);if(t===null||t.exp&&t.exp*1e3<(new Date).getTime()){return this.clearSession()}this.token=e;this.session=t;this.api.defaults.headers.common.Authorization="Bearer ".concat(e);localStorage.setItem(this.sessionStorageKey(),e);this.notifySessionListeners();return this};e.prototype.getToken=function(){return this.token};e.prototype.sessionStorageKey=function(){return"verdocs-session-".concat(this.getSessionType(),"-").concat(this.getEnvironment())};e.prototype.clearSession=function(){localStorage.removeItem(this.sessionStorageKey());delete this.api.defaults.headers.common.Authorization;this.session=null;this.token=null;this.notifySessionListeners();return this};e.prototype.notifySessionListeners=function(){var e=this;this.sessionListeners.forEach((function(t){try{t(e,e.session)}catch(e){}}))};e.prototype.onSessionChanged=function(e){var t=this;this.nextListenerId++;var r=Symbol.for(""+this.nextListenerId);this.sessionListeners.set(r,e);return function(){t.sessionListeners.delete(r)}};e.prototype.loadSession=function(){var e=localStorage.getItem(this.sessionStorageKey());if(!e){return this.clearSession()}return this.setToken(e)};return e}());var jr=Symbol.for("verdocs-default-endpoint");if(!Dr[jr]){Dr[jr]=new Nr}}}}));
@@ -1 +1 @@
1
- System.register(["./p-caed7818.system.js","./p-4d80d044.system.js"],(function(e){"use strict";var s,r,t;return{setters:[function(e){s=e.r;r=e.h},function(e){t=e.V}],execute:function(){var i='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';var c=e("verdocs_search",function(){function e(e){s(this,e);this.endpoint=t.getDefault()}e.prototype.render=function(){return r("div",{class:"container"},r("verdocs-search-box",{endpoint:this.endpoint}),r("div",{class:"boxes"},r("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),r("search-quick-functions",{endpoint:this.endpoint})))};return e}());c.style=i}}}));
1
+ System.register(["./p-caed7818.system.js","./p-6fd6ae35.system.js"],(function(e){"use strict";var s,r,t;return{setters:[function(e){s=e.r;r=e.h},function(e){t=e.V}],execute:function(){var i='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';var c=e("verdocs_search",function(){function e(e){s(this,e);this.endpoint=t.getDefault()}e.prototype.render=function(){return r("div",{class:"container"},r("verdocs-search-box",{endpoint:this.endpoint}),r("div",{class:"boxes"},r("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),r("search-quick-functions",{endpoint:this.endpoint})))};return e}());c.style=i}}}));
@@ -1 +1 @@
1
- System.register(["./p-caed7818.system.js"],(function(e,d){"use strict";var s,r;return{setters:[function(e){s=e.p;r=e.b}],execute:function(){var e=function(){var e=d.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return s(r)};e().then((function(e){return r([["p-a87069d5.system",[[0,"verdocs-sign",{endpoint:[16],documentid:[1],roleid:[1],invitecode:[1],recipient:[32],signerToken:[32],pdfUrl:[32],recipientIndex:[32],document:[32],fields:[32],pdfPageInfo:[32],hasSignature:[32],nextButtonLabel:[32],focusedField:[32]}]]],["p-f6a53928.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-16d62a51.system",[[0,"verdocs-search",{endpoint:[16]}]]],["p-e4ba14dc.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-e719f9ca.system",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-9139a76d.system",[[0,"verdocs-quick-functions",{endpoint:[16]}]]],["p-d14a6057.system",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-f814d5cc.system",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],document:[16],isOpen:[32],recipientStatusIcons:[32]}]]],["p-1f55d8ac.system",[[0,"verdocs-template-card",{template:[16]}]]],["p-cc127684.system",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-6802ef91.system",[[0,"verdocs-toggle",{options:[16],theme:[1]},[[6,"click","handleClick"]]]]],["p-cd6a2c40.system",[[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],type:[1],disabled:[4],_value:[32]}],[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-81fc0196.system",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],open:[4],cancel:[4]}]]],["p-d6206c17.system",[[0,"verdocs-initial-dialog",{fullname:[1],open:[4],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-c2f97ef9.system",[[0,"verdocs-signature-dialog",{fullname:[1],open:[4],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-f0d0f959.system",[[0,"verdocs-upload-dialog",{open:[4],draggingOver:[32],decodedFiles:[32]}]]],["p-1b4e04b7.system",[[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]}]]],["p-144e0842.system",[[0,"verdocs-loader"]]],["p-c4d03ff9.system",[[0,"verdocs-field-initial",{required:[4],fullName:[1,"full-name"],value:[1],focusField:[64]}],[0,"verdocs-field-signature",{required:[4],fullName:[1,"full-name"],value:[1],focusField:[64]}],[0,"verdocs-field-attachment",{order:[2],value:[1],required:[4],disabled:[4],focusField:[64]}],[0,"verdocs-view",{endpoint:[16],rotation:[2],source:[1],token:[1],loadProgress:[32]}],[0,"verdocs-dropdown",{options:[16],open:[4],isOpen:[32]}],[0,"verdocs-field-checkbox",{order:[2],value:[4],required:[4],disabled:[4]}],[0,"verdocs-field-date",{placeholder:[1],order:[2],value:[1],required:[4],disabled:[4],focused:[32],focusField:[64]}],[0,"verdocs-field-dropdown",{options:[16],required:[4],order:[2],disabled:[4],value:[1],focused:[32],focusField:[64]}],[0,"verdocs-field-payment",{field:[16],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]}],[0,"verdocs-field-radio-button",{order:[2],checked:[4],value:[1],name:[1],required:[4],disabled:[4]}],[0,"verdocs-field-textarea",{placeholder:[1],order:[2],value:[1],required:[4],disabled:[4],focused:[32],focusField:[64]}],[0,"verdocs-field-textbox",{placeholder:[1],order:[2],value:[1],required:[4],disabled:[4],focused:[32],focusField:[64]}]]]],e)}))}}}));
1
+ System.register(["./p-caed7818.system.js"],(function(e,d){"use strict";var s,r;return{setters:[function(e){s=e.p;r=e.b}],execute:function(){var e=function(){var e=d.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return s(r)};e().then((function(e){return r([["p-fdf34ca6.system",[[0,"verdocs-sign",{endpoint:[16],documentid:[1],roleid:[1],invitecode:[1],recipient:[32],signerToken:[32],pdfUrl:[32],recipientIndex:[32],document:[32],fields:[32],pdfPageInfo:[32],hasSignature:[32],nextButtonLabel:[32],focusedField:[32]}]]],["p-4e98796c.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-7adcb52c.system",[[0,"verdocs-search",{endpoint:[16]}]]],["p-e4ba14dc.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-e719f9ca.system",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-cc12ccaa.system",[[0,"verdocs-quick-functions",{endpoint:[16]}]]],["p-d14a6057.system",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-f814d5cc.system",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],document:[16],isOpen:[32],recipientStatusIcons:[32]}]]],["p-1f55d8ac.system",[[0,"verdocs-template-card",{template:[16]}]]],["p-cc127684.system",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-6802ef91.system",[[0,"verdocs-toggle",{options:[16],theme:[1]},[[6,"click","handleClick"]]]]],["p-cd6a2c40.system",[[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],type:[1],disabled:[4],_value:[32]}],[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-81fc0196.system",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],open:[4],cancel:[4]}]]],["p-d6206c17.system",[[0,"verdocs-initial-dialog",{fullname:[1],open:[4],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-c2f97ef9.system",[[0,"verdocs-signature-dialog",{fullname:[1],open:[4],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-f0d0f959.system",[[0,"verdocs-upload-dialog",{open:[4],draggingOver:[32],decodedFiles:[32]}]]],["p-5bd83ddc.system",[[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]}]]],["p-144e0842.system",[[0,"verdocs-loader"]]],["p-f76721d3.system",[[0,"verdocs-field-initial",{required:[4],fullName:[1,"full-name"],value:[1],focusField:[64]}],[0,"verdocs-field-signature",{required:[4],fullName:[1,"full-name"],value:[1],focusField:[64]}],[0,"verdocs-field-attachment",{order:[2],value:[1],required:[4],disabled:[4],focusField:[64]}],[0,"verdocs-view",{endpoint:[16],rotation:[2],source:[1],loadProgress:[32]}],[0,"verdocs-dropdown",{options:[16],open:[4],isOpen:[32]}],[0,"verdocs-field-checkbox",{order:[2],value:[4],required:[4],disabled:[4]}],[0,"verdocs-field-date",{placeholder:[1],order:[2],value:[1],required:[4],disabled:[4],focused:[32],focusField:[64]}],[0,"verdocs-field-dropdown",{options:[16],required:[4],order:[2],disabled:[4],value:[1],focused:[32],focusField:[64]}],[0,"verdocs-field-payment",{field:[16],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]}],[0,"verdocs-field-radio-button",{order:[2],checked:[4],value:[1],name:[1],required:[4],disabled:[4]}],[0,"verdocs-field-textarea",{placeholder:[1],order:[2],value:[1],required:[4],disabled:[4],focused:[32],focusField:[64]}],[0,"verdocs-field-textbox",{placeholder:[1],order:[2],value:[1],required:[4],disabled:[4],focused:[32],focusField:[64]}]]]],e)}))}}}));
@@ -1 +1 @@
1
- import{r as e,c as t,h as i}from"./p-2bc58746.js";import{V as n}from"./p-06f38046.js";const o=class{constructor(i){e(this,i),this.createTemplate=t(this,"createTemplate",7),this.createDocument=t(this,"createDocument",7),this.endpoint=n.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return i("div",{class:"container"},i("p",{class:"title"},"Quick Create"),i("button",{onClick:()=>this.handleCreateTemplate(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>'},"Template"),i("button",{onClick:()=>this.handleCreateDocument(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>'},"Document"))}};o.style='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:var(--verdocs-background-dark);text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#50be50}verdocs-quick-functions button svg{fill:#ffffff}';export{o as verdocs_quick_functions}
1
+ import{r as e,c as t,h as i}from"./p-2bc58746.js";import{V as n}from"./p-c34360d3.js";const o=class{constructor(i){e(this,i),this.createTemplate=t(this,"createTemplate",7),this.createDocument=t(this,"createDocument",7),this.endpoint=n.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return i("div",{class:"container"},i("p",{class:"title"},"Quick Create"),i("button",{onClick:()=>this.handleCreateTemplate(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>'},"Template"),i("button",{onClick:()=>this.handleCreateDocument(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>'},"Document"))}};o.style='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:var(--verdocs-background-dark);text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#50be50}verdocs-quick-functions button svg{fill:#ffffff}';export{o as verdocs_quick_functions}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i}from"./p-2bc58746.js";import{V as r}from"./p-06f38046.js";var s=function(e){return t=void 0,i=void 0,s=function(){return function(e,t){var i,r,s,o,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,r&&(s=2&o[0]?r.return:o[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;switch(r=0,s&&(o=[2&o[0],s.value]),o[0]){case 0:case 1:s=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,r=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(!((s=(s=n.trys).length>0&&s[s.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(6===o[0]&&n.label<s[1]){n.label=s[1],s=o;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(o);break}s[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],r=0}finally{i=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}(this,(function(){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))},new((r=void 0)||(r=Promise))((function(e,o){function n(e){try{a(s.next(e))}catch(e){o(e)}}function c(e){try{a(s.throw(e))}catch(e){o(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(n,c)}a((s=s.apply(t,i||[])).next())}));var t,i,r,s};const o='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>',n=class{constructor(i){e(this,i),this.entrySelected=t(this,"entrySelected",7),this.endpoint=r.getDefault(),this.type="recent",this.emptyMessage="You do not have any starred searches.",this.authFailure=!1,this.title="Recent Searches",this.recent=[],this.saved=[],this.starred=[]}componentWillLoad(){this.endpoint.loadSession();const e=e=>{var t;console.warn("[Verdocs/search-activity] Error getting search data",e),401===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&(this.authFailure=!0)};switch(this.type){case"recent":this.title="Recent Searches",this.emptyMessage="You do not have any recent searches.",s(this.endpoint).then((e=>this.recent=e.recent)).catch(e);break;case"saved":this.title="Saved Searches",this.emptyMessage="You do not have any saved searches.",s(this.endpoint).then((e=>this.saved=e.saved)).catch(e);break;case"starred":this.title="My Starred items",this.emptyMessage="You do not have any starred templates.",(t=this.endpoint,i={is_starred:!0},t.api.get("/templates/",{params:i}).then((function(e){return e.data}))).then((e=>this.starred=e)).catch(e)}var t,i}handleSelectEntry(e){this.entrySelected.emit(e)}computePagesText(e){return e<2?`${e} Page`:`${e} Pages`}computeRecipientsText(e){return"object"==typeof e?e.join(", "):e>1?`${e} Recipients`:`${e} Recipient`}render(){const e=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return i("div",{class:"container"},i("p",{class:"title"},this.title),i("div",{class:"items"},this.recent.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:o}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"},"Test"))))),this.saved.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:o}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"}))))),e&&i("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))}};n.style='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:var(--verdocs-background-dark)}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#ccc}';const c=class{constructor(i){e(this,i),this.searchClicked=t(this,"searchClicked",7),this.typeChanged=t(this,"typeChanged",7),this.queryChanged=t(this,"queryChanged",7),this.endpoint=r.getDefault(),this.placeholder="search documents, templates, people...",this.type="all",this.query=""}handleSearch(e){return this.searchClicked.emit({type:this.type,query:this.query}),e.preventDefault(),!1}handleChange(e){this.queryChanged.emit(e.target.value)}handleClearFilter(){this.typeChanged.emit("all")}handleKeyUp(e){"Enter"===e.key&&this.searchClicked.emit({type:this.type,query:this.query})}render(){return i("form",{onSubmit:e=>this.handleSearch(e)},void 0!==this.type&&"all"!==this.type&&i("span",{class:"type"},this.type,"s ",i("button",{class:"remove",innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/>\n</svg>\n',onClick:()=>this.handleClearFilter()})),i("input",{type:"text",placeholder:this.placeholder,value:this.query,onInput:e=>this.handleChange(e),onKeyUp:e=>this.handleKeyUp(e)}),i("button",{onClick:e=>this.handleSearch(e),class:"search"},i("span",{innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/>\n</svg>\n'}),"Search"))}};c.style='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:var(--verdocs-container-border-color)}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#50be80;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';export{n as verdocs_search_activity,c as verdocs_search_box}
1
+ import{r as e,c as t,h as i}from"./p-2bc58746.js";import{V as r}from"./p-c34360d3.js";var s=function(e){return t=void 0,i=void 0,s=function(){return function(e,t){var i,r,s,o,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,r&&(s=2&o[0]?r.return:o[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;switch(r=0,s&&(o=[2&o[0],s.value]),o[0]){case 0:case 1:s=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,r=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(!((s=(s=n.trys).length>0&&s[s.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(6===o[0]&&n.label<s[1]){n.label=s[1],s=o;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(o);break}s[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],r=0}finally{i=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}(this,(function(){return[2,e.api.get("/search/history").then((function(e){return e.data}))]}))},new((r=void 0)||(r=Promise))((function(e,o){function n(e){try{a(s.next(e))}catch(e){o(e)}}function c(e){try{a(s.throw(e))}catch(e){o(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(n,c)}a((s=s.apply(t,i||[])).next())}));var t,i,r,s};const o='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>',n=class{constructor(i){e(this,i),this.entrySelected=t(this,"entrySelected",7),this.endpoint=r.getDefault(),this.type="recent",this.emptyMessage="You do not have any starred searches.",this.authFailure=!1,this.title="Recent Searches",this.recent=[],this.saved=[],this.starred=[]}componentWillLoad(){this.endpoint.loadSession();const e=e=>{var t;console.warn("[Verdocs/search-activity] Error getting search data",e),401===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&(this.authFailure=!0)};switch(this.type){case"recent":this.title="Recent Searches",this.emptyMessage="You do not have any recent searches.",s(this.endpoint).then((e=>this.recent=e.recent)).catch(e);break;case"saved":this.title="Saved Searches",this.emptyMessage="You do not have any saved searches.",s(this.endpoint).then((e=>this.saved=e.saved)).catch(e);break;case"starred":this.title="My Starred items",this.emptyMessage="You do not have any starred templates.",(t=this.endpoint,i={is_starred:!0},t.api.get("/templates/",{params:i}).then((function(e){return e.data}))).then((e=>this.starred=e)).catch(e)}var t,i}handleSelectEntry(e){this.entrySelected.emit(e)}computePagesText(e){return e<2?`${e} Page`:`${e} Pages`}computeRecipientsText(e){return"object"==typeof e?e.join(", "):e>1?`${e} Recipients`:`${e} Recipient`}render(){const e=this.recent.length<1&&this.saved.length<1&&this.starred.length<1;return i("div",{class:"container"},i("p",{class:"title"},this.title),i("div",{class:"items"},this.recent.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:o}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"},"Test"))))),this.saved.map((e=>i("button",{class:"item",onClick:()=>this.handleSelectEntry(e)},i("div",{class:"icon",innerHTML:o}),i("div",{class:"details"},i("div",{class:"item-title"},e.params.q),i("div",{class:"info"}))))),e&&i("div",{class:"empty"},this.authFailure?"Authentication required":this.emptyMessage)))}};n.style='verdocs-search-activity{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:var(--verdocs-background-dark)}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#ccc}';const c=class{constructor(i){e(this,i),this.searchClicked=t(this,"searchClicked",7),this.typeChanged=t(this,"typeChanged",7),this.queryChanged=t(this,"queryChanged",7),this.endpoint=r.getDefault(),this.placeholder="search documents, templates, people...",this.type="all",this.query=""}handleSearch(e){return this.searchClicked.emit({type:this.type,query:this.query}),e.preventDefault(),!1}handleChange(e){this.queryChanged.emit(e.target.value)}handleClearFilter(){this.typeChanged.emit("all")}handleKeyUp(e){"Enter"===e.key&&this.searchClicked.emit({type:this.type,query:this.query})}render(){return i("form",{onSubmit:e=>this.handleSearch(e)},void 0!==this.type&&"all"!==this.type&&i("span",{class:"type"},this.type,"s ",i("button",{class:"remove",innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/>\n</svg>\n',onClick:()=>this.handleClearFilter()})),i("input",{type:"text",placeholder:this.placeholder,value:this.query,onInput:e=>this.handleChange(e),onKeyUp:e=>this.handleKeyUp(e)}),i("button",{onClick:e=>this.handleSearch(e),class:"search"},i("span",{innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/>\n</svg>\n'}),"Search"))}};c.style='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:var(--verdocs-container-border-color)}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#50be80;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';export{n as verdocs_search_activity,c as verdocs_search_box}