New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ballerine/common

Package Overview
Dependencies
Maintainers
3
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ballerine/common - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

2

./dist/umd/index.production.js

@@ -11,3 +11,3 @@ /**

*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WorkflowCore={})}(this,(function(t){"use strict";function e(){e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:A(t,r,s)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function m(){}var h={};p(h,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(H([])));v&&v!==r&&n.call(v,a)&&(h=v);var b=m.prototype=l.prototype=Object.create(h);function _(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,s){var u=y(t[o],t,i);if("throw"!==u.type){var p=u.arg,c=p.value;return c&&"object"==typeof c&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(c).then((function(t){p.value=t,a(p)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function A(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=N(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=y(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function N(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,N(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=y(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function G(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function H(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=m,o(b,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:d,configurable:!0}),d.displayName=p(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(w.prototype),p(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),p(b,u,"Generator"),p(b,a,(function(){return this})),p(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=H,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:H(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function r(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=function(){var t=n(e().mark((function t(r){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r;case 3:return n=t.sent,t.abrupt("return",[n,void 0]);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",[void 0,t.t0]);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),s=function(t){return!Array.isArray(t)&&null!==t&&"object"==typeof t},u=function(){var t=n(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,r)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(t){var e,r=(null==t?void 0:t.category)+"-"+(null==t?void 0:t.type)+"-"+(null==t||null==(e=t.issuer)?void 0:e.country);return t.version&&(r=r+"-v"+t.version),r.toLowerCase()},c=[{category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"electricity_bill",issuer:{type:"local_authority",city:"Accra",name:"Electricity Company of Ghana",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"tenancy_agreement",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},rentalAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"payslip",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},salaryAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"appointment_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"bank_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"mortgage_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"property_rate",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"birth_certificate",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},birthPlace:{type:"string"},dateOfBirth:{type:"string",format:"date"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"ssnit_pension_statement",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"introductory_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_a",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_3",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}}],y={GH:function(t){for(var e,r={},n=i(t);!(e=n()).done;){var o=e.value;r[p(o)]=o}return r}(c)};t.certificateOfResidenceGH={category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",city:"Accra",name:"Accra Metropolitan Assembly",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},t.getDocumentId=p,t.getDocumentsByCountry=function(t){var e=y[t];return e||{}},t.ghanaDocuments=c,t.handlePromise=a,t.isEmptyObject=function(t){return s(t)&&0===Object.keys(t).length},t.isErrorWithCode=function(t){return s(t)&&"code"in t&&"number"==typeof t.code},t.isErrorWithMessage=function(t){return s(t)&&"message"in t&&"string"==typeof t.message},t.isErrorWithName=function(t){return s(t)&&"name"in t&&"string"==typeof t.name},t.isFunction=function(t){return"function"==typeof t},t.isNullish=function(t){return null==t},t.isObject=s,t.noNullish=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return t.reduce((function(t,e,n){var o,i=null!=(o=r[n])?o:"";return t+e+String(i)}),"").replace(/\s+/g," ")},t.sleep=u,t.uniqueArray=function(t){return Array.from(new Set(t))},Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WorkflowCore={})}(this,(function(t){"use strict";function e(){e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,a=Object.create(i.prototype),s=new L(n||[]);return o(a,"_invoke",{value:N(t,r,s)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function m(){}var h={};p(h,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(E([])));v&&v!==r&&n.call(v,a)&&(h=v);var b=m.prototype=l.prototype=Object.create(h);function _(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,s){var u=y(t[o],t,i);if("throw"!==u.type){var p=u.arg,c=p.value;return c&&"object"==typeof c&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(c).then((function(t){p.value=t,a(p)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function N(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=A(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=y(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function A(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=y(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function E(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=m,o(b,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:d,configurable:!0}),d.displayName=p(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(w.prototype),p(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),p(b,u,"Generator"),p(b,a,(function(){return this})),p(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=E,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function r(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=function(){var t=n(e().mark((function t(r){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r;case 3:return n=t.sent,t.abrupt("return",[n,void 0]);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",[void 0,t.t0]);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),s=function(t){return!Array.isArray(t)&&null!==t&&"object"==typeof t},u=function(){var t=n(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,r)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(t){var e,r=(null==t?void 0:t.category)+"-"+(null==t?void 0:t.type)+"-"+(null==t||null==(e=t.issuer)?void 0:e.country);return t.version&&(r=r+"-v"+t.version),r.toLowerCase()},c="^$|^GHA-\\d{9}-\\d{1}$",y={category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",city:"Accra",name:"Accra Metropolitan Assembly",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},f=[{category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"electricity_bill",issuer:{type:"local_authority",city:"Accra",name:"Electricity Company of Ghana",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"tenancy_agreement",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},rentalAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"payslip",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},salaryAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"appointment_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"bank_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"mortgage_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"property_rate",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"birth_certificate",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},birthPlace:{type:"string"},dateOfBirth:{type:"string",format:"date"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"ssnit_pension_statement",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},employeeName:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"introductory_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_a",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_3",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}}],l={GH:function(t){for(var e,r={},n=i(t);!(e=n()).done;){var o=e.value;r[p(o)]=o}return r}(f)};t.certificateOfResidenceGH=y,t.getDocumentId=p,t.getDocumentsByCountry=function(t){var e=l[t];return e||{}},t.ghanaDocuments=f,t.handlePromise=a,t.isEmptyObject=function(t){return s(t)&&0===Object.keys(t).length},t.isErrorWithCode=function(t){return s(t)&&"code"in t&&"number"==typeof t.code},t.isErrorWithMessage=function(t){return s(t)&&"message"in t&&"string"==typeof t.message},t.isErrorWithName=function(t){return s(t)&&"name"in t&&"string"==typeof t.name},t.isFunction=function(t){return"function"==typeof t},t.isNullish=function(t){return null==t},t.isObject=s,t.noNullish=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return t.reduce((function(t,e,n){var o,i=null!=(o=r[n])?o:"";return t+e+String(i)}),"").replace(/\s+/g," ")},t.sleep=u,t.uniqueArray=function(t){return Array.from(new Set(t))},Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map

@@ -15,2 +15,3 @@ /**

var ghNationalIdNumber = '^$|^GHA-\\d{9}-\\d{1}$';
var certificateOfResidenceGH = {

@@ -32,3 +33,3 @@ category: 'proof_of_address',

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -68,3 +69,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -105,3 +106,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -140,3 +141,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -175,3 +176,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -210,3 +211,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -242,3 +243,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -274,3 +275,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -306,3 +307,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -338,3 +339,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -374,3 +375,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -406,3 +407,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -441,3 +442,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -473,3 +474,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -476,0 +477,0 @@ docNumber: {

@@ -11,2 +11,3 @@ /**

*/
var ghNationalIdNumber = '^$|^GHA-\\d{9}-\\d{1}$';
var certificateOfResidenceGH = {

@@ -28,3 +29,3 @@ category: 'proof_of_address',

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -64,3 +65,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -101,3 +102,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -136,3 +137,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -171,3 +172,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -206,3 +207,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -238,3 +239,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -270,3 +271,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -302,3 +303,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -334,3 +335,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -370,3 +371,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -402,3 +403,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -437,3 +438,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -469,3 +470,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -472,0 +473,0 @@ docNumber: {

@@ -13,8 +13,3 @@ /**

import { IErrorWithCode } from '@/utils/is-error-with-code/interfaces';
export { getDocumentId } from '@/schemas/documents/workflow/documents/utils';
export { DefaultContextSchema } from '@/schemas/documents/context';
export { TDefaultSchemaDocumentPage } from '@/schemas/documents/default-context-page-schema';
export { certificateOfResidenceGH, ghanaDocuments } from '@/schemas/documents/workflow/documents/schemas/GH';
export { getDocumentsByCountry } from '@/schemas/documents/workflow/documents/schemas/index';
export { TDocument } from '@/schemas/documents/workflow/documents/types';
import { countryCodes } from '@/countries';

@@ -53,2 +48,68 @@ declare const handlePromise: <TResult>(promise: Promise<TResult>) => Promise<[TResult, undefined] | [undefined, unknown]>;

export { handlePromise, isEmptyObject, isErrorWithCode, isErrorWithMessage, isErrorWithName, isFunction, isNullish, isObject, noNullish, sleep, uniqueArray };
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
interface DefaultContextSchema {
entity: {
[k: string]: unknown;
};
documents: {
id?: string;
category: string;
type: string;
issuer: {
type?: string;
name?: string;
country: string;
city?: string;
additionalDetails?: {
[k: string]: unknown;
};
};
issuingVersion?: number;
decision?: {
status?: 'new' | 'pending' | 'revision' | 'approved' | 'rejected';
rejectionReason?: string | ('Suspicious document' | 'Document does not match customer profile' | 'Potential identity theft' | 'Fake or altered document' | 'Document on watchlist or blacklist');
revisionReason?: string | ('Blurry image' | 'Missing page' | 'Invalid document' | 'Expired document' | 'Unreadable document');
};
version?: number;
pages: {
ballerineFileId?: string;
provider: 'gcs' | 'http' | 'stream' | 'base64' | 'ftp' | 'aws_s3';
uri: string;
/**
* Whether an effect is positive or negative
*/
type: 'pdf' | 'png' | 'jpg';
data?: string;
metadata?: {
side?: string;
pageNumber?: string;
};
}[];
properties: {
email?: string;
expiryDate?: string;
idNumber?: string;
[k: string]: unknown;
};
}[];
[k: string]: unknown;
}
type TDocument = Omit<DefaultContextSchema['documents'][number], 'pages' | 'properties'> & {
propertiesSchema: any;
};
declare const getDocumentId: (document: TDocument | DefaultContextSchema['documents'][number]) => string;
type TDefaultSchemaDocumentPage = DefaultContextSchema['documents'][number]['pages'][number];
declare const certificateOfResidenceGH: TDocument;
declare const ghanaDocuments: TDocument[];
declare const getDocumentsByCountry: (countryCode: (typeof countryCodes)[number]) => Record<string, TDocument>;
export { DefaultContextSchema, TDefaultSchemaDocumentPage, TDocument, certificateOfResidenceGH, getDocumentId, getDocumentsByCountry, ghanaDocuments, handlePromise, isEmptyObject, isErrorWithCode, isErrorWithMessage, isErrorWithName, isFunction, isNullish, isObject, noNullish, sleep, uniqueArray };

@@ -484,2 +484,3 @@ /**

var ghNationalIdNumber = '^$|^GHA-\\d{9}-\\d{1}$';
var certificateOfResidenceGH = {

@@ -501,3 +502,3 @@ category: 'proof_of_address',

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -537,3 +538,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -574,3 +575,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -609,3 +610,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -644,3 +645,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -679,3 +680,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -711,3 +712,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -743,3 +744,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -775,3 +776,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -807,3 +808,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -843,3 +844,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -875,3 +876,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -910,3 +911,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -942,3 +943,3 @@ docNumber: {

type: 'string',
pattern: '^GHA-\\d{9}-\\d{1}$'
pattern: ghNationalIdNumber
},

@@ -945,0 +946,0 @@ docNumber: {

@@ -11,3 +11,3 @@ /**

*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WorkflowCore={})}(this,(function(t){"use strict";function e(){e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,a=Object.create(i.prototype),s=new x(n||[]);return o(a,"_invoke",{value:A(t,r,s)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function m(){}var h={};p(h,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(H([])));v&&v!==r&&n.call(v,a)&&(h=v);var b=m.prototype=l.prototype=Object.create(h);function _(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,s){var u=y(t[o],t,i);if("throw"!==u.type){var p=u.arg,c=p.value;return c&&"object"==typeof c&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(c).then((function(t){p.value=t,a(p)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function A(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=N(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=y(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function N(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,N(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=y(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function G(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(G,this),this.reset(!0)}function H(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=m,o(b,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:d,configurable:!0}),d.displayName=p(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(w.prototype),p(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),p(b,u,"Generator"),p(b,a,(function(){return this})),p(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=H,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:H(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function r(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=function(){var t=n(e().mark((function t(r){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r;case 3:return n=t.sent,t.abrupt("return",[n,void 0]);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",[void 0,t.t0]);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),s=function(t){return!Array.isArray(t)&&null!==t&&"object"==typeof t},u=function(){var t=n(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,r)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(t){var e,r=(null==t?void 0:t.category)+"-"+(null==t?void 0:t.type)+"-"+(null==t||null==(e=t.issuer)?void 0:e.country);return t.version&&(r=r+"-v"+t.version),r.toLowerCase()},c=[{category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"electricity_bill",issuer:{type:"local_authority",city:"Accra",name:"Electricity Company of Ghana",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"tenancy_agreement",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},rentalAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"payslip",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},salaryAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"appointment_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"bank_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"mortgage_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"property_rate",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"birth_certificate",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},birthPlace:{type:"string"},dateOfBirth:{type:"string",format:"date"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"ssnit_pension_statement",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"introductory_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_a",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_3",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}}],y={GH:function(t){for(var e,r={},n=i(t);!(e=n()).done;){var o=e.value;r[p(o)]=o}return r}(c)};t.certificateOfResidenceGH={category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",city:"Accra",name:"Accra Metropolitan Assembly",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:"^GHA-\\d{9}-\\d{1}$"},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},t.getDocumentId=p,t.getDocumentsByCountry=function(t){var e=y[t];return e||{}},t.ghanaDocuments=c,t.handlePromise=a,t.isEmptyObject=function(t){return s(t)&&0===Object.keys(t).length},t.isErrorWithCode=function(t){return s(t)&&"code"in t&&"number"==typeof t.code},t.isErrorWithMessage=function(t){return s(t)&&"message"in t&&"string"==typeof t.message},t.isErrorWithName=function(t){return s(t)&&"name"in t&&"string"==typeof t.name},t.isFunction=function(t){return"function"==typeof t},t.isNullish=function(t){return null==t},t.isObject=s,t.noNullish=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return t.reduce((function(t,e,n){var o,i=null!=(o=r[n])?o:"";return t+e+String(i)}),"").replace(/\s+/g," ")},t.sleep=u,t.uniqueArray=function(t){return Array.from(new Set(t))},Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WorkflowCore={})}(this,(function(t){"use strict";function e(){e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,a=Object.create(i.prototype),s=new L(n||[]);return o(a,"_invoke",{value:N(t,r,s)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function m(){}var h={};p(h,a,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(E([])));v&&v!==r&&n.call(v,a)&&(h=v);var b=m.prototype=l.prototype=Object.create(h);function _(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,s){var u=y(t[o],t,i);if("throw"!==u.type){var p=u.arg,c=p.value;return c&&"object"==typeof c&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(c).then((function(t){p.value=t,a(p)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function N(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=A(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=y(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function A(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,A(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=y(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function E(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=m,o(b,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:d,configurable:!0}),d.displayName=p(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,p(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(w.prototype),p(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),p(b,u,"Generator"),p(b,a,(function(){return this})),p(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=E,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function r(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function s(t){r(a,o,i,s,u,"next",t)}function u(t){r(a,o,i,s,u,"throw",t)}s(void 0)}))}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=function(){var t=n(e().mark((function t(r){var n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r;case 3:return n=t.sent,t.abrupt("return",[n,void 0]);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",[void 0,t.t0]);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),s=function(t){return!Array.isArray(t)&&null!==t&&"object"==typeof t},u=function(){var t=n(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,r)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(t){var e,r=(null==t?void 0:t.category)+"-"+(null==t?void 0:t.type)+"-"+(null==t||null==(e=t.issuer)?void 0:e.country);return t.version&&(r=r+"-v"+t.version),r.toLowerCase()},c="^$|^GHA-\\d{9}-\\d{1}$",y={category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",city:"Accra",name:"Accra Metropolitan Assembly",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},f=[{category:"proof_of_address",type:"water_bill",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"electricity_bill",issuer:{type:"local_authority",city:"Accra",name:"Electricity Company of Ghana",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},amountDue:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"tenancy_agreement",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},rentalAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"payslip",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},salaryAmount:{type:"number"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"appointment_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"bank_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"mortgage_statement",issuer:{type:"bank",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"property_rate",issuer:{type:"local_authority",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"birth_certificate",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},birthPlace:{type:"string"},dateOfBirth:{type:"string",format:"date"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"ssnit_pension_statement",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},employeeName:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_employment",type:"introductory_letter",issuer:{type:"private",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},employeeName:{type:"string"},position:{type:"string"},employerName:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_a",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}},{category:"proof_of_address",type:"form_3",issuer:{type:"government",country:"GH"},issuingVersion:1,version:1,propertiesSchema:{type:"object",properties:{nationalIdNumber:{type:"string",pattern:c},docNumber:{type:"number"},userAddress:{type:"string"},physicalAddress:{type:"string"},issuingDate:{type:"string",format:"date"}}}}],l={GH:function(t){for(var e,r={},n=i(t);!(e=n()).done;){var o=e.value;r[p(o)]=o}return r}(f)};t.certificateOfResidenceGH=y,t.getDocumentId=p,t.getDocumentsByCountry=function(t){var e=l[t];return e||{}},t.ghanaDocuments=f,t.handlePromise=a,t.isEmptyObject=function(t){return s(t)&&0===Object.keys(t).length},t.isErrorWithCode=function(t){return s(t)&&"code"in t&&"number"==typeof t.code},t.isErrorWithMessage=function(t){return s(t)&&"message"in t&&"string"==typeof t.message},t.isErrorWithName=function(t){return s(t)&&"name"in t&&"string"==typeof t.name},t.isFunction=function(t){return"function"==typeof t},t.isNullish=function(t){return null==t},t.isObject=s,t.noNullish=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return t.reduce((function(t,e,n){var o,i=null!=(o=r[n])?o:"";return t+e+String(i)}),"").replace(/\s+/g," ")},t.sleep=u,t.uniqueArray=function(t){return Array.from(new Set(t))},Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map

@@ -5,3 +5,3 @@ {

"author": "Ballerine <dev@ballerine.com>",
"version": "0.5.0",
"version": "0.5.1",
"description": "common",

@@ -8,0 +8,0 @@ "module": "./dist/esm/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc