@decaf-ts/decorator-validation 1.0.22 → 1.0.24

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 (81) hide show
  1. package/dist/decorator-validation.bundle.min.js +1 -1
  2. package/dist/esm/decorator-validation.bundle.min.esm.js +1 -1
  3. package/lib/esm/index.d.ts +1 -1
  4. package/lib/esm/index.js +2 -2
  5. package/lib/esm/reflection/decorators.d.ts +12 -0
  6. package/lib/esm/reflection/decorators.js +24 -1
  7. package/lib/esm/validation/Validation.js +2 -8
  8. package/lib/esm/validation/Validators/DateValidator.js +2 -2
  9. package/lib/esm/validation/Validators/EmailValidator.js +2 -2
  10. package/lib/esm/validation/Validators/ListValidator.js +2 -2
  11. package/lib/esm/validation/Validators/MaxLengthValidator.js +2 -2
  12. package/lib/esm/validation/Validators/MaxValidator.js +2 -2
  13. package/lib/esm/validation/Validators/MinLengthValidator.js +2 -2
  14. package/lib/esm/validation/Validators/MinValidator.js +2 -2
  15. package/lib/esm/validation/Validators/PasswordValidator.js +2 -2
  16. package/lib/esm/validation/Validators/PatternValidator.d.ts +1 -1
  17. package/lib/esm/validation/Validators/PatternValidator.js +4 -4
  18. package/lib/esm/validation/Validators/RequiredValidator.js +2 -2
  19. package/lib/esm/validation/Validators/StepValidator.js +2 -2
  20. package/lib/esm/validation/Validators/TypeValidator.js +27 -7
  21. package/lib/esm/validation/Validators/URLValidator.js +2 -2
  22. package/lib/esm/validation/Validators/Validator.d.ts +1 -2
  23. package/lib/esm/validation/Validators/Validator.js +2 -3
  24. package/lib/esm/validation/Validators/ValidatorRegistry.d.ts +1 -1
  25. package/lib/esm/validation/Validators/ValidatorRegistry.js +5 -4
  26. package/lib/esm/validation/Validators/constants.d.ts +1 -0
  27. package/lib/esm/validation/Validators/constants.js +2 -1
  28. package/lib/esm/validation/Validators/decorators.d.ts +2 -3
  29. package/lib/esm/validation/Validators/decorators.js +14 -9
  30. package/lib/esm/validation/decorators.d.ts +0 -11
  31. package/lib/esm/validation/decorators.js +2 -14
  32. package/lib/esm/validation/index.d.ts +1 -0
  33. package/lib/esm/validation/index.js +2 -1
  34. package/lib/esm/validation/utils.d.ts +11 -0
  35. package/lib/esm/validation/utils.js +16 -0
  36. package/lib/index.cjs +2 -2
  37. package/lib/index.d.ts +1 -1
  38. package/lib/model/Model.cjs +12 -12
  39. package/lib/model/Registry.cjs +4 -4
  40. package/lib/model/construction.cjs +6 -6
  41. package/lib/model/decorators.cjs +3 -3
  42. package/lib/model/index.cjs +7 -7
  43. package/lib/reflection/decorators.cjs +25 -1
  44. package/lib/reflection/decorators.d.ts +12 -0
  45. package/lib/reflection/index.cjs +2 -2
  46. package/lib/reflection/utils.cjs +3 -3
  47. package/lib/utils/dates.cjs +2 -2
  48. package/lib/utils/hashing.cjs +1 -1
  49. package/lib/utils/index.cjs +8 -8
  50. package/lib/utils/serialization.cjs +2 -2
  51. package/lib/validation/Validation.cjs +3 -9
  52. package/lib/validation/Validators/DateValidator.cjs +5 -5
  53. package/lib/validation/Validators/EmailValidator.cjs +5 -5
  54. package/lib/validation/Validators/ListValidator.cjs +5 -5
  55. package/lib/validation/Validators/MaxLengthValidator.cjs +5 -5
  56. package/lib/validation/Validators/MaxValidator.cjs +5 -5
  57. package/lib/validation/Validators/MinLengthValidator.cjs +5 -5
  58. package/lib/validation/Validators/MinValidator.cjs +5 -5
  59. package/lib/validation/Validators/PasswordValidator.cjs +5 -5
  60. package/lib/validation/Validators/PatternValidator.cjs +7 -7
  61. package/lib/validation/Validators/PatternValidator.d.ts +1 -1
  62. package/lib/validation/Validators/RequiredValidator.cjs +5 -5
  63. package/lib/validation/Validators/StepValidator.cjs +5 -5
  64. package/lib/validation/Validators/TypeValidator.cjs +28 -9
  65. package/lib/validation/Validators/URLValidator.cjs +5 -5
  66. package/lib/validation/Validators/Validator.cjs +5 -6
  67. package/lib/validation/Validators/Validator.d.ts +1 -2
  68. package/lib/validation/Validators/ValidatorRegistry.cjs +5 -4
  69. package/lib/validation/Validators/ValidatorRegistry.d.ts +1 -1
  70. package/lib/validation/Validators/constants.cjs +2 -1
  71. package/lib/validation/Validators/constants.d.ts +1 -0
  72. package/lib/validation/Validators/decorators.cjs +15 -10
  73. package/lib/validation/Validators/decorators.d.ts +2 -3
  74. package/lib/validation/Validators/index.cjs +31 -31
  75. package/lib/validation/decorators.cjs +21 -34
  76. package/lib/validation/decorators.d.ts +0 -11
  77. package/lib/validation/index.cjs +5 -4
  78. package/lib/validation/index.d.ts +1 -0
  79. package/lib/validation/utils.cjs +19 -0
  80. package/lib/validation/utils.d.ts +11 -0
  81. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see decorator-validation.bundle.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("decorator-validation",[],t):"object"==typeof exports?exports["decorator-validation"]=t():e["decorator-validation"]=t()}(this,(()=>(()=>{var e={729:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,o(r(935),t),o(r(839),t),o(r(965),t),o(r(847),t),t.VERSION="##VERSION##"},6:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0,t.validate=h;const n=r(772),o=r(735),a=r(19),i=r(402),s=r(154),c=r(38),u=r(936),l=r(770),d=r(174),f=r(523),p=r(593),y=r(687);function h(e,...t){const r=[];for(const o in e)e.hasOwnProperty(o)&&-1===t.indexOf(o)&&r.push((0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,o));const o=r.reduce(((t,r)=>{const{prop:o,decorators:a}=r;if(!a||!a.length)return t;const c=a[0];a.find((e=>e.key===n.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===c.props.name))))&&a.shift();let u=a.reduce(((t,r)=>{const n=l.Validation.get(r.key);if(!n)return t;const a=n.hasErrors(e[o.toString()],...r.key===s.ModelKeys.TYPE?[r.props]:Object.values(r.props));return a&&((t=t||{})[r.key]=a),t}),void 0);return u=u||Object.keys(e).filter((e=>!u||!u[e])).reduce(((t,r)=>{let o;const a=(0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,r).decorators,c=a.filter((e=>-1!==[s.ModelKeys.TYPE,n.ValidationKeys.TYPE].indexOf(e.key)));if(!c||!c.length)return t;const u=c.pop(),l=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],f=Object.values(i.ReservedModels).map((e=>e.toLowerCase()));return l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))switch(t){case"Array":case"Set":if(a.length&&a.find((e=>e.key===n.ValidationKeys.LIST))){const a="Array"===t?e[r].find((e=>e.hasErrors())):e[r].values().find((e=>e.hasErrors()));a&&(o=(0,p.sf)(n.DEFAULT_ERROR_MESSAGES.LIST_INSIDE,a.toString()))}break;default:try{e[r]&&(o=e[r].hasErrors())}catch(e){console.warn((0,p.sf)("Model should be validatable but its not"))}}})),o&&((t=t||{})[r]=o),t}),void 0),u&&((t=t||{})[r.prop.toString()]=u),t}),void 0);return o?new a.ModelErrorDefinition(o):void 0}let g,v,E,_;class M{constructor(e){}hasErrors(...e){return h(this,...e)}equals(e,...t){return(0,y.isEqual)(this,e,...t)}serialize(){return M.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}toHash(){return M.getHashingFunction()(this).toString()}static deserialize(e){return M.getSerializer().deserialize(e)}static serialize(e){return M.getSerializer().serialize(e)}static hash(e){return M.getHashingFunction()(e)}static fromObject(e,t){return(0,c.constructFromObject)(e,t)}static fromModel(e,t){return(0,c.constructFromModel)(e,t)}static setBuilder(e){g=e}static getBuilder(){return g}static getRegistry(){return v||(v=new u.ModelRegistryManager),v}static setRegistry(e){v=e}static register(e,t){return M.getRegistry().register(e,t)}static get(e){return M.getRegistry().get(e)}static build(e={},t){return M.getRegistry().build(e,t)}static setSerializer(e){E=e}static getSerializer(){return E||(E=new o.JSONSerializer),E}static setHashingFunction(e){_=e}static getHashingFunction(){return _||(_=f.hashObj),_}}t.Model=M},19:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)e.hasOwnProperty(t)&&e[t]&&Object.defineProperty(this,t,{enumerable:!0,configurable:!1,value:e[t],writable:!1})}toString(){const e=this;return Object.keys(e).filter((t=>e.hasOwnProperty(t)&&"function"!=typeof e[t])).reduce(((t,r)=>{let n=Object.keys(e[r]).reduce(((t,n)=>(t?t+=`\n${e[r][n]}`:t=e[r][n],t)),void 0);return n&&(n=`${r} - ${n}`,t?t+=`\n${n}`:t=n),t}),"")}}},936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelRegistryManager=void 0,t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;n.Model.register(t,e.name)}))};const n=r(6),o=r(154),a=r(174),i=r(593);t.ModelRegistryManager=class{constructor(e=o.ModelKeys.ANCHOR,t=a.isModel){this.cache={},this.testFunction=t,this.anchorKey=e}register(e,t){if("function"!=typeof e)throw new Error("Model registering failed. Missing Class name or constructor");t=t||e.name,this.cache[t]=e}get(e){try{return this.cache[e]}catch(e){return}}build(e={},t){if(!t&&!this.testFunction(e))throw new Error("Provided obj is not a Model object");const r=t||e[this.anchorKey].class;if(!(r in this.cache))throw new Error((0,i.sf)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}}},402:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservedModels=t.Primitives=void 0,function(e){e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint"}(r||(t.Primitives=r={})),function(e){e.STRING="string",e.OBJECT="object",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint",e.DATE="date"}(n||(t.ReservedModels=n={}))},38:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.constructFromObject=function(e,t){if(!t)return e;for(const r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||e.prototype&&e.prototype.hasOwnProperty(r))&&(e[r]=t[r]||void 0);return e},t.constructFromModel=function(e,t){if(!t)return e;let r,u;for(const l in t)if(t.hasOwnProperty(l)&&(e.hasOwnProperty(l)||e.prototype&&e.prototype.hasOwnProperty(l))){if(e[l]=t[l]||void 0,"object"!=typeof e[l])continue;if((0,s.isModel)(e[l])){try{e[l]=n.Model.build(e[l])}catch(e){console.error(e)}continue}const d=(0,s.getPropertyDecorators)(o.ValidationKeys.REFLECT,e,l).decorators;if(r=d.filter((e=>-1!==[i.ModelKeys.TYPE,o.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,c.sf)("failed to find decorators for property {0}",l));u=r.pop();const f=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],p=Object.values(a.ReservedModels).map((e=>e.toLowerCase()));f.forEach((t=>{if(-1===p.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===o.ValidationKeys.LIST));if(r&&("Array"===t&&(e[l]=e[l].map((e=>n.Model.build(e,r.props.class)))),"Set"===t)){const t=new Set;for(const o of e[l])t.add(n.Model.build(o,r.props.class));e[l]=t}}break;default:e[l]&&(e[l]=n.Model.build(e[l],t))}}catch(e){console.log(e)}}))}return e},t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)};const n=r(6),o=r(772),a=r(402),i=r(154),s=r(174),c=r(593)},893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getModelKey=void 0,t.model=function(e,r){return i=>{const s=function(...s){const c=(0,n.construct)(i,...s),u=a.Model.getBuilder();u&&u(c,s.length?s[0]:void 0);const l=Object.assign({},{class:i.name});return Object.defineProperty(c,o.ModelKeys.ANCHOR,{writable:!1,enumerable:!1,configurable:!1,value:l}),Reflect.defineMetadata((0,t.getModelKey)(o.ModelKeys.MODEL),Object.assign(l,e||{}),c.constructor),r&&r(c,...s),c};return s.prototype=i.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:i.prototype.constructor.name}),a.Model.register(s),s}};const n=r(38),o=r(154),a=r(6);t.getModelKey=e=>o.ModelKeys.REFLECT+e},847:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(402),t),o(r(38),t),o(r(893),t),o(r(6),t),o(r(19),t),o(r(936),t),o(r(282),t)},282:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},501:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.metadata=function(e,t){return(r,n,o)=>{o?Reflect.defineMetadata(e,t,o.value):n?Reflect.defineMetadata(e,t,r,n):Reflect.defineMetadata(e,t,r)}},r(630)},839:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(501),t),o(r(174),t)},174:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllPropertyDecorators=void 0,t.getPropertyDecorators=i,t.getTypeFromDecorator=function(e,t){const r=i(n.ModelKeys.REFLECT,e,t,!1);if(!r||!r.decorators)return;const o=r.decorators.shift(),a=o.props?o.props.name:void 0;return"Function"!==a?a:void 0},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let o=e;const a=function(){if(!t)return;const e=Object.getPrototypeOf(o);return e&&e.constructor.name!==r?(o=e,o):void 0};do{Object.getOwnPropertyNames(o).forEach((function(e){-1===n.indexOf(e)&&n.push(e)}))}while(a());return n},t.getClassDecorators=s,t.checkType=c,t.checkTypes=u,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return c(e,t);case"object":return!Array.isArray(t)||u(e,t);case"function":return!t.name||"Object"===t.name||c(e,t.name);default:return!0}},t.isModel=function(e){return!!e[n.ModelKeys.ANCHOR]||!!s(n.ModelKeys.REFLECT,e).find((e=>e.key===n.ModelKeys.MODEL&&e.props&&e.props.class))};const n=r(154),o=r(593),a=r(687);function i(e,t,r,s=!1,c=!0,u){const l=function(e,t,r,o=!1,a){const i=Reflect.getMetadataKeys(t,r).filter((t=>o?t.toString().startsWith(e):t===n.ModelKeys.TYPE||t.toString().startsWith(e))).reduce(((o,a)=>{const i={key:a!==n.ModelKeys.TYPE?a.substring(e.length):a,props:Reflect.getMetadata(a,t,r)};return o.concat(i)}),a||[]);return{prop:r.toString(),decorators:i}}(e,t,r,s,u);return c&&Object.getPrototypeOf(t)!==Object.prototype?i(e,Object.getPrototypeOf(t.constructor),r,!0,c,l.decorators):{prop:l.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?((0,a.isEqual)(e.props,r[e.key])||console.log((0,o.sf)("Found a similar decorator for the {0} property of a {1} model but with different attributes. The original one will be kept",e.key,t.constructor.name)),!1):(r[e.key.toString()]=e.props,!0)))}(l.decorators)}}function s(e,t){return Reflect.getOwnMetadataKeys(t.constructor).filter((t=>t.toString().startsWith(e))).reduce(((r,n)=>{const o={key:n.substring(e.length),props:Reflect.getMetadata(n,t.constructor)};return r.concat(o)}),[])}function c(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function u(e,t){return!t.every((t=>!c(e,t)))}r(630),t.getAllPropertyDecorators=function(e,...t){if(t&&t.length)return Object.getOwnPropertyNames(e).reduce(((r,n)=>(t.forEach(((t,o)=>{const a=i(t,e,n,0!==o);r||(r={}),function(e,t,r){r&&r.length&&(e[t]||(e[t]=[]),e[t].push(...r))}(r,n,a.decorators)})),r)),void 0)}},154:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="model.definition.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__modelDefinition"}(r||(t.ModelKeys=r={}))},46:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=a,t.bindDateToString=i,t.isValidDate=s,t.twoDigitPad=c,t.formatDate=u,t.parseDate=function(e,t){let r;if(t){if(t instanceof Date)try{r=a(u(t,e),e)}catch(r){throw new Error((0,o.sf)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=a(t,e);else if("number"==typeof t)r=a(u(new Date(t),e),e);else{if(!s(t))throw new Error(`Invalid value provided ${t}`);try{r=a(u(new Date(t),e),e)}catch(r){throw new Error((0,o.sf)("Could not convert date {0} to format: {1}",t,e))}}return i(r,e)}},r(630);const n=r(772),o=r(593);function a(e,t){let r=t;r.match(/hh/)?r=r.replace("hh","(?<hour>\\d{2})"):r.match(/h/)?r=r.replace("h","(?<hour>\\d{1,2})"):r.match(/HH/)?r=r.replace("HH","(?<hour>\\d{2})"):r.match(/H/)&&(r=r.replace("H","(?<hour>\\d{1,2})")),r.match(/mm/)?r=r.replace("mm","(?<minutes>\\d{2})"):r.match(/m/)&&(r=r.replace("m","(?<minutes>\\d{1,2})")),r.match(/ss/)?r=r.replace("ss","(?<seconds>\\d{2})"):r.match(/s/)&&(r=r.replace("s","(?<seconds>\\d{1,2})")),r.match(/dd/)?r=r.replace("dd","(?<day>\\d{2})"):r.match(/d/)&&(r=r.replace("d","(?<day>\\d{1,2})")),r.match(/EEEE/)?r=r.replace("EEEE","(?<dayofweek>\\w+)"):r.match(/EEEE/)&&(r=r.replace("EEE","(?<dayofweek>\\w+)")),r.match(/yyyy/)?r=r.replace("yyyy","(?<year>\\d{4})"):r.match(/yy/)&&(r=r.replace("yy","(?<year>\\d{2})")),r.match(/MMMM/)?r=r.replace("MMMM","(?<monthname>\\w+)"):r.match(/MMM/)&&(r=r.replace("MMM","(?<monthnamesmall>\\w+)")),r.match(/MM/)?r=r.replace("MM","(?<month>\\d{2})"):r.match(/M/)&&(r=r.replace("M","(?<month>\\d{1,2})")),r=r.replace("S","(?<milis>\\d{1,3})").replace("aaa","(?<ampm>\\w{2})");const o=new RegExp(r,"g").exec(e);if(!o||!o.groups)return new Date(e);const a=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},i=a(o.groups.year),s=a(o.groups.day),c=o.groups.ampm;let u=a(o.groups.hour);c&&(u="PM"===c?u+12:u);const l=a(o.groups.minutes),d=a(o.groups.seconds),f=a(o.groups.milis),p=o.groups.monthname,y=o.groups.monthnamesmall;let h=o.groups.month;if(p)h=n.MONTH_NAMES.indexOf(p);else if(y){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(y.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=a(`${h}`);return new Date(i,h-1,s,u,l,d,f)}function i(e,t){if(!e)return;const r=()=>u(e,t);return Object.defineProperty(e,"toISOString",{enumerable:!1,configurable:!1,value:r}),Object.defineProperty(e,"toString",{enumerable:!1,configurable:!1,value:r}),e}function s(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function c(e){return e<10?"0"+e:e.toString()}function u(e,t="yyyy/MM/dd"){const r=e.getDate(),o=e.getMonth(),a=e.getFullYear(),i=e.getHours(),s=e.getMinutes(),u=e.getSeconds(),l=e.getMilliseconds(),d=i%12,f=c(d),p=c(i),y=c(s),h=c(u),g=i<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],E=v.substr(0,3),_=c(r),M=o+1,m=c(M),O=n.MONTH_NAMES[o],b=O.substr(0,3),R=a+"",S=R.substr(2,2);return(t=t.replace("hh",f).replace("h",d.toString()).replace("HH",p).replace("H",i.toString()).replace("mm",y).replace("m",s.toString()).replace("ss",h).replace("s",u.toString()).replace("S",l.toString()).replace("dd",_).replace("d",r.toString()).replace("EEEE",v).replace("EEE",E).replace("yyyy",R).replace("yy",S).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",O).replace("MMM",b):t.replace("MM",m).replace("M",M.toString())}},687:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEqual=function e(t,r,...n){if(t===r)return!0;if(t instanceof Date&&r instanceof Date)return t.getTime()===r.getTime();if(!t||!r||"object"!=typeof t&&"object"!=typeof r)return t===r;if(null==t||null==r)return!1;if(typeof t!=typeof r)return!1;if(t.prototype!==r.prototype)return!1;const o=Object.keys(t).filter((e=>-1===n.indexOf(e)));return o.length===Object.keys(r).filter((e=>-1===n.indexOf(e))).length&&o.every((o=>-1!==n.indexOf(o)||e(t[o],r[o],...n)))}},523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashCode=o,t.hashSerialization=function(e){return o(n.Model.serialize(e))},t.hashObj=function(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):0|(e=((e=e||0)<<5)-e+r)},r=o,n=function(e){return void 0===e?"":-1!==["string","number","symbol"].indexOf(typeof e)?r(e.toString()):e instanceof Date?r(e.getTime()):Array.isArray(e)?e.reduce(t,void 0):Object.values(e).reduce(t,void 0)},a=Object.values(e).reduce(t,0);return"number"==typeof a?Math.abs(a):a};const n=r(6);function o(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}},935:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(154),t),o(r(46),t),o(r(687),t),o(r(523),t),o(r(735),t),o(r(904),t),o(r(735),t),o(r(593),t)},904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSerializer=void 0;const n=r(6),o=r(154);t.JSONSerializer=class{preSerialize(e){const t=Object.assign({},e);return t[o.ModelKeys.ANCHOR]=e[o.ModelKeys.ANCHOR],t}deserialize(e){const t=JSON.parse(e);return n.Model.build(t)}serialize(e){return JSON.stringify(this.preSerialize(e))}}},593:(e,t)=>{"use strict";function r(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r]:e}))}Object.defineProperty(t,"__esModule",{value:!0}),t.sf=void 0,t.stringFormat=r,t.sf=r},770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(375),o=r(436),a=r(154);class i{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&i.actingValidatorRegistry&&i.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),i.actingValidatorRegistry=e}static getRegistry(){return i.actingValidatorRegistry||(i.actingValidatorRegistry=new o.ValidatorRegistry({validator:n.TypeValidator,validationKey:a.ModelKeys.TYPE,save:!1})),i.actingValidatorRegistry}static get(e){return i.getRegistry().get(e)}static register(...e){return i.getRegistry().register(...e)}}t.Validation=i},395:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.DATE){super(i.ValidationKeys.DATE,e,Number.name,Date.name,String.name)}hasErrors(e,t,r){if(void 0!==e)return"string"==typeof e&&(e=new Date(e)),isNaN(e.getDate())?this.getMessage(r||this.message):void 0}};t.DateValidator=c,t.DateValidator=c=n([(0,s.validator)(i.ValidationKeys.DATE),o("design:paramtypes",[String])],c)},335:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const a=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.EMAIL){super(a.ValidationKeys.EMAIL,e)}hasErrors(e,t){return super.hasErrors(e,a.DEFAULT_PATTERNS.EMAIL,t)}};t.EmailValidator=c,t.EmailValidator=c=n([(0,s.validator)(a.ValidationKeys.EMAIL),o("design:paramtypes",[String])],c)},407:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.LIST){super(i.ValidationKeys.LIST,e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;let n;for(let o=0;o<(Array.isArray(e)?e.length:e.size);o++)switch(n=e[o],typeof n){case"object":case"function":if(!n.constructor||n.constructor.name!==t)return this.getMessage(r||this.message,t);break;default:if(typeof n!==t)return this.getMessage(r||this.message,t)}}};t.ListValidator=c,t.ListValidator=c=n([(0,s.validator)(i.ValidationKeys.LIST),o("design:paramtypes",[String])],c)},169:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(i.ValidationKeys.MAX_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length>t?this.getMessage(r||this.message,t):void 0}};t.MaxLengthValidator=c,t.MaxLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX_LENGTH),o("design:paramtypes",[String])],c)},909:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX){super(i.ValidationKeys.MAX,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Max param defined");return e>t?this.getMessage(r||this.message,t):void 0}}};t.MaxValidator=c,t.MaxValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX),o("design:paramtypes",[String])],c)},519:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(i.ValidationKeys.MIN_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length<t?this.getMessage(r||this.message,t):void 0}};t.MinLengthValidator=c,t.MinLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN_LENGTH),o("design:paramtypes",[String])],c)},651:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN){super(i.ValidationKeys.MIN,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Min param defined");return e<t?this.getMessage(r||this.message,t):void 0}}};t.MinValidator=c,t.MinValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN),o("design:paramtypes",[String])],c)},354:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const a=r(273),i=r(772),s=r(787);let c=class extends a.PatternValidator{constructor(e=i.DEFAULT_ERROR_MESSAGES.PASSWORD,t=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH){super(i.ValidationKeys.PASSWORD,e),this.pattern=t}hasErrors(e,t,r){return super.hasErrors(e,t||this.pattern,r||this.message)}};t.PasswordValidator=c,t.PasswordValidator=c=n([(0,s.validator)(i.ValidationKeys.PASSWORD),o("design:paramtypes",[Object,RegExp])],c)},273:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=t.regexpParser=void 0;const a=r(116),i=r(772),s=r(787);t.regexpParser=new RegExp("^/(.+)/([gimus]*)$");let c=class extends a.Validator{constructor(e=i.ValidationKeys.PATTERN,t=i.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,t,"string")}getPattern(e){if(!t.regexpParser.test(e))return new RegExp(e);const r=e.match(t.regexpParser);return new RegExp(r[1],r[2])}hasErrors(e,t,r){if(e){if(!t)throw new Error("Missing Pattern");return(t="string"==typeof t?this.getPattern(t):t).lastIndex=0,t.test(e)?void 0:this.getMessage(r||this.message)}}};t.PatternValidator=c,t.PatternValidator=c=n([(0,s.validator)(i.ValidationKeys.PATTERN),o("design:paramtypes",[String,String])],c)},812:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){super(i.ValidationKeys.REQUIRED,e)}hasErrors(e,t){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t||this.message):void 0;default:return e?void 0:this.getMessage(t||this.message)}}};t.RequiredValidator=c,t.RequiredValidator=c=n([(0,s.validator)(i.ValidationKeys.REQUIRED),o("design:paramtypes",[String])],c)},553:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.STEP){super(i.ValidationKeys.STEP,e,"number","string")}hasErrors(e,t,r){if(void 0!==e)return Number(e)%Number(t)!=0?this.getMessage(r||this.message,t):void 0}};t.StepValidator=c,t.StepValidator=c=n([(0,s.validator)(i.ValidationKeys.STEP),o("design:paramtypes",[String])],c)},375:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const n=r(116),o=r(772),a=r(154),i=r(174);class s extends n.Validator{constructor(e=o.DEFAULT_ERROR_MESSAGES.TYPE){super(a.ModelKeys.TYPE,e)}hasErrors(e,t,r){if(void 0!==e)return(0,i.evaluateDesignTypes)(e,t)?void 0:this.getMessage(r||this.message,"string"==typeof t?t:Array.isArray(t)?t.join(", "):t.name,typeof e)}}t.TypeValidator=s},964:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const a=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.URL){super(a.ValidationKeys.URL,e)}hasErrors(e,t){return super.hasErrors(e,a.DEFAULT_PATTERNS.URL,t)}};t.URLValidator=c,t.URLValidator=c=n([(0,s.validator)(a.ValidationKeys.URL),o("design:paramtypes",[String])],c)},116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(772),o=r(593),a=r(174);t.Validator=class{constructor(e,t=n.DEFAULT_ERROR_MESSAGES.DEFAULT,...r){this.validationKey=e,this.message=t,r.length&&(this.acceptedTypes=r),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,o.sf)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?(0,a.checkTypes)(t,this.acceptedTypes)?e(t,...r):this.getMessage(n.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},436:(e,t)=>{"use strict";function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyChache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyChache)}getKeys(){return Object.keys(this.cache)}get(e){if(!(e in this.cache))return;const t=this.cache[e];if(r(t))return t;const n=new(t.default||t);return this.cache[e]=n,n}register(...e){e.forEach((e=>{if(r(e)){if(e.validationKey in this.cache)return;this.cache[e.validationKey]=e}else{const{validationKey:t,validator:r,save:n}=e;if(t in this.cache)return;if(this.cache[t]=r,!n)return;const o={};o[t.toUpperCase()]=t,this.customKeyChache=Object.assign({},this.customKeyChache,o)}}))}}},772:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PATTERNS=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0,t.ValidationKeys={REFLECT:"model.validation.",REQUIRED:"required",MIN:"min",MAX:"max",STEP:"step",MIN_LENGTH:"minlength",MAX_LENGTH:"maxlength",PATTERN:"pattern",EMAIL:"email",URL:"url",DATE:"date",TYPE:"type",PASSWORD:"password",LIST:"list"},t.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],t.DAYS_OF_WEEK_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.DEFAULT_ERROR_MESSAGES={REQUIRED:"This field is required",MIN:"The minimum value is {0}",MAX:"The maximum value is {0}",MIN_LENGTH:"The minimum length is {0}",MAX_LENGTH:"The maximum length is {0}",PATTERN:"The value does not match the pattern",EMAIL:"The value is not a valid email",URL:"The value is not a valid URL",TYPE:"Invalid type. Expected {0}, received {1}",STEP:"Invalid value. Not a step of {0}",DATE:"Invalid value. not a valid Date",DEFAULT:"There is an Error",PASSWORD:"Must be at least 8 characters and contain one of number, lower and upper case letters, and special character (@$!%*?&_-.,)",LIST:"Invalid list of {0}",LIST_INSIDE:"Elements of list are invalid: {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.DEFAULT_PATTERNS={EMAIL:/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/,URL:/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i,PASSWORD:{CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}}},787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validator=function(e){return t=>(n.Validation.register({validator:t,validationKey:e,save:!0}),t)};const n=r(770)},493:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Validators=void 0;const a=r(395),i=r(375),s=r(354),c=r(553),u=r(964),l=r(273),d=r(651),f=r(519),p=r(909),y=r(169),h=r(812),g=r(335),v=r(407);o(r(772),t),o(r(395),t),o(r(787),t),o(r(335),t),o(r(407),t),o(r(169),t),o(r(909),t),o(r(519),t),o(r(651),t),o(r(354),t),o(r(273),t),o(r(812),t),o(r(553),t),o(r(168),t),o(r(375),t),o(r(964),t),o(r(116),t),o(r(436),t),t.Validators={EmailValidator:g.EmailValidator,RequiredValidator:h.RequiredValidator,MaxLengthValidator:y.MaxLengthValidator,MaxValidator:p.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:d.MinValidator,PatternValidator:l.PatternValidator,URLValidator:u.URLValidator,StepValidator:c.StepValidator,DateValidator:a.DateValidator,TypeValidator:i.TypeValidator,PasswordValidator:s.PasswordValidator,ListValidator:v.ListValidator}},168:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValidationKey=l,t.required=function(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){return(0,a.metadata)(l(i.ValidationKeys.REQUIRED),{message:e})},t.min=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN){return(0,a.metadata)(l(i.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]})},t.max=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX){return(0,a.metadata)(l(i.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]})},t.step=function(e,t=i.DEFAULT_ERROR_MESSAGES.STEP){return(0,a.metadata)(l(i.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]})},t.minlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){return(0,a.metadata)(l(i.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.maxlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){return(0,a.metadata)(l(i.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.pattern=function(e,t=i.DEFAULT_ERROR_MESSAGES.PATTERN){return(0,a.metadata)(l(i.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]})},t.email=function(e=i.DEFAULT_ERROR_MESSAGES.EMAIL){return(0,a.metadata)(l(i.ValidationKeys.EMAIL),{message:e,types:[String.name]})},t.url=function(e=i.DEFAULT_ERROR_MESSAGES.URL){return(0,a.metadata)(l(i.ValidationKeys.URL),{message:e,types:[String.name]})},t.type=d,t.date=function(e="dd/MM/yyyy",t=i.DEFAULT_ERROR_MESSAGES.DATE){return(r,n)=>{Reflect.defineMetadata(l(i.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]},r,n);const o=new WeakMap;Object.defineProperty(r,n,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,n);r&&!r.configurable||Object.defineProperty(this,n,{enumerable:!0,configurable:!1,get:()=>o.get(this),set:t=>{let r;try{r=(0,u.parseDate)(e,t),o.set(this,r)}catch(e){console.error((0,s.sf)("Failed to parse date: {0}",e.message||e))}}}),this[n]=t},get(){console.log("here")}})}},t.password=function(e=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH,t=i.DEFAULT_ERROR_MESSAGES.PASSWORD,r=c.PasswordValidator){return(n,a)=>{Reflect.defineMetadata(l(i.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]},n,a),o.Validation.register({validator:r,validationKey:i.ValidationKeys.PASSWORD,save:!0})}},t.list=f,t.set=function(e,t=i.DEFAULT_ERROR_MESSAGES.LIST,r){return(n,o)=>{f(e,"Set",t,r)(n,o)}},r(630);const n=r(407),o=r(770),a=r(501),i=r(772),s=r(593),c=r(354),u=r(935);function l(e){return i.ValidationKeys.REFLECT+e}function d(e,t=i.DEFAULT_ERROR_MESSAGES.TYPE){return(0,a.metadata)(l(i.ValidationKeys.TYPE),{customTypes:e,message:t})}function f(e,t="Array",r=i.DEFAULT_ERROR_MESSAGES.LIST,a=n.ListValidator){return(n,s)=>{d(t)(n,s),Reflect.defineMetadata(l(i.ValidationKeys.LIST),{class:e.name,type:t,message:r},n,s),o.Validation.register({validator:a,validationKey:i.ValidationKeys.LIST,save:!0})}}},965:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(493),t),o(r(475),t),o(r(792),t),o(r(770),t)},792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},630:(e,t,r)=>{var n;!function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),n=o(e);function o(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==t.Reflect&&(n=o(t.Reflect,n)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,o=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",a=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",i="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!i&&!s,u={create:i?function(){return H(Object.create(null))}:s?function(){return H({__proto__:null})}:function(){return H({})},has:c?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),d="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[a]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,o=r+1;o<n;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,N(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,o)},t.prototype.entries=function(){return new r(this._keys,this._values,i)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[a]=function(){return this.entries()},t.prototype._find=function(e,t){if(!N(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(N(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function o(e,t){return t}function i(e,t){return[e,t]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new d}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[a]=function(){return this.keys()},e}(),p="function"==typeof WeakMap?WeakMap:function(){var e=u.create(),t=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+i()}while(u.has(e,t));return e[t]=!0,t}function o(e,n){if(!r.call(e,t)){if(!n)return;Object.defineProperty(e,t,{value:u.create()})}return e[t]}function a(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function i(){var e=function(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):a(t,e),t}return a(new Array(e),e)}(16);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",r=0;r<16;++r){var n=e[r];4!==r&&6!==r&&8!==r||(t+="-"),n<16&&(t+="0"),t+=n.toString(16).toLowerCase()}return t}}(),y=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[y]),S(e)&&(e=function(){var e,r,n,o;S(y)||void 0===t.Reflect||y in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,o=e.getOwnMetadataKeys,a=e.deleteMetadata,i=new p;return{isProviderFor:function(e,t){var r=i.get(e);return!(S(r)||!r.has(t))||!!o(e,t).length&&(S(r)&&(r=new f,i.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:a}}(t.Reflect));var a=new p,i={registerProvider:s,getProvider:u,setProvider:h};return i;function s(t){if(!Object.isExtensible(i))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case S(r):r=t;break;case r===t:break;case S(n):n=t;break;case n===t:break;default:void 0===o&&(o=new f),o.add(t)}}function c(t,a){if(!S(r)){if(r.isProviderFor(t,a))return r;if(!S(n)){if(n.isProviderFor(t,a))return r;if(!S(o))for(var i=x(o);;){var s=k(i);if(!s)return;var c=F(s);if(c.isProviderFor(t,a))return I(i),c}}}if(!S(e)&&e.isProviderFor(t,a))return e}function u(e,t){var r,n=a.get(e);return S(n)||(r=n.get(t)),S(r)?(S(r=c(e,t))||(S(n)&&(n=new d,a.set(e,n)),n.set(t,r)),r):r}function l(e){if(S(e))throw new TypeError;return r===e||n===e||!S(o)&&o.has(e)}function h(e,t,r){if(!l(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!S(n))return!1;var o=a.get(e);S(o)&&(o=new d,a.set(e,o)),o.set(t,r)}return!0}}()),!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,y,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new p,r={isProviderFor:function(e,r){var n=t.get(e);return!S(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,o){n(r,o,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var o=n(t,r,!1);return!S(o)&&A(o.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var o=n(t,r,!1);if(!S(o))return o.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],o=n(e,t,!1);if(S(o))return r;for(var a=x(o.keys()),i=0;;){var s=k(a);if(!s)return r.length=i,r;var c=F(s);try{r[i]=c}catch(e){try{I(a)}finally{throw e}}i++}},OrdinaryDeleteMetadata:function(e,r,o){var a=n(r,o,!1);if(S(a))return!1;if(!a.delete(e))return!1;if(0===a.size){var i=t.get(r);S(i)||(i.delete(o),0===i.size&&t.delete(i))}return!0}};return h.registerProvider(r),r;function n(n,o,a){var i=t.get(n),s=!1;if(S(i)){if(!a)return;i=new d,t.set(n,i),s=!0}var c=i.get(o);if(S(c)){if(!a)return;if(c=new d,i.set(o,c),!e.setProvider(n,o,r))throw i.delete(o),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(E(e,t,r))return!0;var n=U(t);return!w(n)&&v(e,n,r)}function E(e,t,r){var n=G(t,r,!1);return!S(n)&&A(n.OrdinaryHasOwnMetadata(e,t,r))}function _(e,t,r){if(E(e,t,r))return M(e,t,r);var n=U(t);return w(n)?void 0:_(e,n,r)}function M(e,t,r){var n=G(t,r,!1);if(!S(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function m(e,t,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function O(e,t){var r=b(e,t),n=U(e);if(null===n)return r;var o=O(n,t);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new f,i=[],s=0,c=r;s<c.length;s++){var u=c[s];a.has(u)||(a.add(u),i.push(u))}for(var l=0,d=o;l<d.length;l++)u=d[l],a.has(u)||(a.add(u),i.push(u));return i}function b(e,t){var r=G(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function S(e){return void 0===e}function w(e){return null===e}function P(e){return"object"==typeof e?null!==e:"function"==typeof e}function T(e,t){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=K(e,o);if(void 0!==n){var a=n.call(e,r);if(P(a))throw new TypeError;return a}return function(e,t){if("string"===t){var r=e.toString;if(D(r)&&!P(o=r.call(e)))return o;if(D(n=e.valueOf)&&!P(o=n.call(e)))return o}else{var n;if(D(n=e.valueOf)&&!P(o=n.call(e)))return o;var o,a=e.toString;if(D(a)&&!P(o=a.call(e)))return o}throw new TypeError}(e,"default"===r?"number":r)}function A(e){return!!e}function j(e){var t=T(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function V(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function D(e){return"function"==typeof e}function L(e){return"function"==typeof e}function N(e,t){return e===t||e!=e&&t!=t}function K(e,t){var r=e[t];if(null!=r){if(!D(r))throw new TypeError;return r}}function x(e){var t=K(e,a);if(!D(t))throw new TypeError;var r=t.call(e);if(!P(r))throw new TypeError;return r}function F(e){return e.value}function k(e){var t=e.next();return!t.done&&t}function I(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===l)return t;if(t!==l)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var o=n.constructor;return"function"!=typeof o||o===e?t:o}function G(e,t,r){var n=h.getProvider(e,t);if(!S(n))return n;if(r){if(h.setProvider(e,t,g))return g;throw new Error("Illegal state.")}}function H(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(S(r)){if(!V(e))throw new TypeError;if(!L(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!S(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!V(e))throw new TypeError;if(!P(t))throw new TypeError;if(!P(n)&&!S(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var o=e.length-1;o>=0;--o){var a=(0,e[o])(t,r,n);if(!S(a)&&!w(a)){if(!P(a))throw new TypeError;n=a}}return n}(e,t,r=j(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!P(r))throw new TypeError;if(!S(n)&&!function(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;m(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!P(r))throw new TypeError;return S(n)||(n=j(n)),m(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),E(e,t,r)})),e("getMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),_(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),M(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),O(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),b(e,t)})),e("deleteMetadata",(function(e,t,r){if(!P(t))throw new TypeError;if(S(r)||(r=j(r)),!P(t))throw new TypeError;S(r)||(r=j(r));var n=G(t,r,!1);return!S(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(n||(n={}))}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(729)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("decorator-validation",[],t):"object"==typeof exports?exports["decorator-validation"]=t():e["decorator-validation"]=t()}(this,(()=>(()=>{var e={729:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,o(r(935),t),o(r(839),t),o(r(965),t),o(r(847),t),t.VERSION="##VERSION##"},6:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0,t.validate=h;const n=r(772),o=r(735),a=r(19),i=r(402),s=r(154),c=r(38),u=r(936),l=r(770),d=r(174),f=r(523),p=r(593),y=r(687);function h(e,...t){const r=[];for(const o in e)e.hasOwnProperty(o)&&-1===t.indexOf(o)&&r.push((0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,o));const o=r.reduce(((t,r)=>{const{prop:o,decorators:a}=r;if(!a||!a.length)return t;const c=a[0];a.find((e=>e.key===n.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===c.props.name))))&&a.shift();let u=a.reduce(((t,r)=>{const n=l.Validation.get(r.key);if(!n)return t;const a=n.hasErrors(e[o.toString()],...r.key===s.ModelKeys.TYPE?[r.props]:Object.values(r.props));return a&&((t=t||{})[r.key]=a),t}),void 0);return u=u||Object.keys(e).filter((e=>!u||!u[e])).reduce(((t,r)=>{let o;const a=(0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,r).decorators,c=a.filter((e=>-1!==[s.ModelKeys.TYPE,n.ValidationKeys.TYPE].indexOf(e.key)));if(!c||!c.length)return t;const u=c.pop(),l=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],f=Object.values(i.ReservedModels).map((e=>e.toLowerCase()));return l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))switch(t){case"Array":case"Set":if(a.length&&a.find((e=>e.key===n.ValidationKeys.LIST))){const a="Array"===t?e[r].find((e=>e.hasErrors())):e[r].values().find((e=>e.hasErrors()));a&&(o=(0,p.sf)(n.DEFAULT_ERROR_MESSAGES.LIST_INSIDE,a.toString()))}break;default:try{e[r]&&(o=e[r].hasErrors())}catch(e){console.warn((0,p.sf)("Model should be validatable but its not"))}}})),o&&((t=t||{})[r]=o),t}),void 0),u&&((t=t||{})[r.prop.toString()]=u),t}),void 0);return o?new a.ModelErrorDefinition(o):void 0}let g,v,_,E;class m{constructor(e){}hasErrors(...e){return h(this,...e)}equals(e,...t){return(0,y.isEqual)(this,e,...t)}serialize(){return m.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}toHash(){return m.getHashingFunction()(this).toString()}static deserialize(e){return m.getSerializer().deserialize(e)}static serialize(e){return m.getSerializer().serialize(e)}static hash(e){return m.getHashingFunction()(e)}static fromObject(e,t){return(0,c.constructFromObject)(e,t)}static fromModel(e,t){return(0,c.constructFromModel)(e,t)}static setBuilder(e){g=e}static getBuilder(){return g}static getRegistry(){return v||(v=new u.ModelRegistryManager),v}static setRegistry(e){v=e}static register(e,t){return m.getRegistry().register(e,t)}static get(e){return m.getRegistry().get(e)}static build(e={},t){return m.getRegistry().build(e,t)}static setSerializer(e){_=e}static getSerializer(){return _||(_=new o.JSONSerializer),_}static setHashingFunction(e){E=e}static getHashingFunction(){return E||(E=f.hashObj),E}}t.Model=m},19:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)e.hasOwnProperty(t)&&e[t]&&Object.defineProperty(this,t,{enumerable:!0,configurable:!1,value:e[t],writable:!1})}toString(){const e=this;return Object.keys(e).filter((t=>e.hasOwnProperty(t)&&"function"!=typeof e[t])).reduce(((t,r)=>{let n=Object.keys(e[r]).reduce(((t,n)=>(t?t+=`\n${e[r][n]}`:t=e[r][n],t)),void 0);return n&&(n=`${r} - ${n}`,t?t+=`\n${n}`:t=n),t}),"")}}},936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelRegistryManager=void 0,t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;n.Model.register(t,e.name)}))};const n=r(6),o=r(154),a=r(174),i=r(593);t.ModelRegistryManager=class{constructor(e=o.ModelKeys.ANCHOR,t=a.isModel){this.cache={},this.testFunction=t,this.anchorKey=e}register(e,t){if("function"!=typeof e)throw new Error("Model registering failed. Missing Class name or constructor");t=t||e.name,this.cache[t]=e}get(e){try{return this.cache[e]}catch(e){return}}build(e={},t){if(!t&&!this.testFunction(e))throw new Error("Provided obj is not a Model object");const r=t||e[this.anchorKey].class;if(!(r in this.cache))throw new Error((0,i.sf)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}}},402:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservedModels=t.Primitives=void 0,function(e){e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint"}(r||(t.Primitives=r={})),function(e){e.STRING="string",e.OBJECT="object",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint",e.DATE="date"}(n||(t.ReservedModels=n={}))},38:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.constructFromObject=function(e,t){if(!t)return e;for(const r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||e.prototype&&e.prototype.hasOwnProperty(r))&&(e[r]=t[r]||void 0);return e},t.constructFromModel=function(e,t){if(!t)return e;let r,u;for(const l in t)if(t.hasOwnProperty(l)&&(e.hasOwnProperty(l)||e.prototype&&e.prototype.hasOwnProperty(l))){if(e[l]=t[l]||void 0,"object"!=typeof e[l])continue;if((0,s.isModel)(e[l])){try{e[l]=n.Model.build(e[l])}catch(e){console.error(e)}continue}const d=(0,s.getPropertyDecorators)(o.ValidationKeys.REFLECT,e,l).decorators;if(r=d.filter((e=>-1!==[i.ModelKeys.TYPE,o.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,c.sf)("failed to find decorators for property {0}",l));u=r.pop();const f=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],p=Object.values(a.ReservedModels).map((e=>e.toLowerCase()));f.forEach((t=>{if(-1===p.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===o.ValidationKeys.LIST));if(r&&("Array"===t&&(e[l]=e[l].map((e=>n.Model.build(e,r.props.class)))),"Set"===t)){const t=new Set;for(const o of e[l])t.add(n.Model.build(o,r.props.class));e[l]=t}}break;default:e[l]&&(e[l]=n.Model.build(e[l],t))}}catch(e){console.log(e)}}))}return e},t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)};const n=r(6),o=r(772),a=r(402),i=r(154),s=r(174),c=r(593)},893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getModelKey=void 0,t.model=function(e,r){return i=>{const s=function(...s){const c=(0,n.construct)(i,...s),u=a.Model.getBuilder();u&&u(c,s.length?s[0]:void 0);const l=Object.assign({},{class:i.name});return Object.defineProperty(c,o.ModelKeys.ANCHOR,{writable:!1,enumerable:!1,configurable:!1,value:l}),Reflect.defineMetadata((0,t.getModelKey)(o.ModelKeys.MODEL),Object.assign(l,e||{}),c.constructor),r&&r(c,...s),c};return s.prototype=i.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:i.prototype.constructor.name}),a.Model.register(s),s}};const n=r(38),o=r(154),a=r(6);t.getModelKey=e=>o.ModelKeys.REFLECT+e},847:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(402),t),o(r(38),t),o(r(893),t),o(r(6),t),o(r(19),t),o(r(936),t),o(r(282),t)},282:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},501:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.metadata=function(e,t){return(r,n,o)=>{o?Reflect.defineMetadata(e,t,o.value):n?Reflect.defineMetadata(e,t,r,n):Reflect.defineMetadata(e,t,r)}},t.apply=function(...e){return(t,r,n)=>{for(const o of e)t instanceof Function&&!n?o(t):o(t,r,n)}},r(630)},839:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(501),t),o(r(174),t)},174:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllPropertyDecorators=void 0,t.getPropertyDecorators=i,t.getTypeFromDecorator=function(e,t){const r=i(n.ModelKeys.REFLECT,e,t,!1);if(!r||!r.decorators)return;const o=r.decorators.shift(),a=o.props?o.props.name:void 0;return"Function"!==a?a:void 0},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let o=e;const a=function(){if(!t)return;const e=Object.getPrototypeOf(o);return e&&e.constructor.name!==r?(o=e,o):void 0};do{Object.getOwnPropertyNames(o).forEach((function(e){-1===n.indexOf(e)&&n.push(e)}))}while(a());return n},t.getClassDecorators=s,t.checkType=c,t.checkTypes=u,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return c(e,t);case"object":return!Array.isArray(t)||u(e,t);case"function":return!t.name||"Object"===t.name||c(e,t.name);default:return!0}},t.isModel=function(e){return!!e[n.ModelKeys.ANCHOR]||!!s(n.ModelKeys.REFLECT,e).find((e=>e.key===n.ModelKeys.MODEL&&e.props&&e.props.class))};const n=r(154),o=r(593),a=r(687);function i(e,t,r,s=!1,c=!0,u){const l=function(e,t,r,o=!1,a){const i=Reflect.getMetadataKeys(t,r).filter((t=>o?t.toString().startsWith(e):t===n.ModelKeys.TYPE||t.toString().startsWith(e))).reduce(((o,a)=>{const i={key:a!==n.ModelKeys.TYPE?a.substring(e.length):a,props:Reflect.getMetadata(a,t,r)};return o.concat(i)}),a||[]);return{prop:r.toString(),decorators:i}}(e,t,r,s,u);return c&&Object.getPrototypeOf(t)!==Object.prototype?i(e,Object.getPrototypeOf(t.constructor),r,!0,c,l.decorators):{prop:l.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?((0,a.isEqual)(e.props,r[e.key])||console.log((0,o.sf)("Found a similar decorator for the {0} property of a {1} model but with different attributes. The original one will be kept",e.key,t.constructor.name)),!1):(r[e.key.toString()]=e.props,!0)))}(l.decorators)}}function s(e,t){return Reflect.getOwnMetadataKeys(t.constructor).filter((t=>t.toString().startsWith(e))).reduce(((r,n)=>{const o={key:n.substring(e.length),props:Reflect.getMetadata(n,t.constructor)};return r.concat(o)}),[])}function c(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function u(e,t){return!t.every((t=>!c(e,t)))}r(630),t.getAllPropertyDecorators=function(e,...t){if(t&&t.length)return Object.getOwnPropertyNames(e).reduce(((r,n)=>(t.forEach(((t,o)=>{const a=i(t,e,n,0!==o);r||(r={}),function(e,t,r){r&&r.length&&(e[t]||(e[t]=[]),e[t].push(...r))}(r,n,a.decorators)})),r)),void 0)}},154:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="model.definition.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__modelDefinition"}(r||(t.ModelKeys=r={}))},46:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=a,t.bindDateToString=i,t.isValidDate=s,t.twoDigitPad=c,t.formatDate=u,t.parseDate=function(e,t){let r;if(t){if(t instanceof Date)try{r=a(u(t,e),e)}catch(r){throw new Error((0,o.sf)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=a(t,e);else if("number"==typeof t)r=a(u(new Date(t),e),e);else{if(!s(t))throw new Error(`Invalid value provided ${t}`);try{r=a(u(new Date(t),e),e)}catch(r){throw new Error((0,o.sf)("Could not convert date {0} to format: {1}",t,e))}}return i(r,e)}},r(630);const n=r(772),o=r(593);function a(e,t){let r=t;r.match(/hh/)?r=r.replace("hh","(?<hour>\\d{2})"):r.match(/h/)?r=r.replace("h","(?<hour>\\d{1,2})"):r.match(/HH/)?r=r.replace("HH","(?<hour>\\d{2})"):r.match(/H/)&&(r=r.replace("H","(?<hour>\\d{1,2})")),r.match(/mm/)?r=r.replace("mm","(?<minutes>\\d{2})"):r.match(/m/)&&(r=r.replace("m","(?<minutes>\\d{1,2})")),r.match(/ss/)?r=r.replace("ss","(?<seconds>\\d{2})"):r.match(/s/)&&(r=r.replace("s","(?<seconds>\\d{1,2})")),r.match(/dd/)?r=r.replace("dd","(?<day>\\d{2})"):r.match(/d/)&&(r=r.replace("d","(?<day>\\d{1,2})")),r.match(/EEEE/)?r=r.replace("EEEE","(?<dayofweek>\\w+)"):r.match(/EEEE/)&&(r=r.replace("EEE","(?<dayofweek>\\w+)")),r.match(/yyyy/)?r=r.replace("yyyy","(?<year>\\d{4})"):r.match(/yy/)&&(r=r.replace("yy","(?<year>\\d{2})")),r.match(/MMMM/)?r=r.replace("MMMM","(?<monthname>\\w+)"):r.match(/MMM/)&&(r=r.replace("MMM","(?<monthnamesmall>\\w+)")),r.match(/MM/)?r=r.replace("MM","(?<month>\\d{2})"):r.match(/M/)&&(r=r.replace("M","(?<month>\\d{1,2})")),r=r.replace("S","(?<milis>\\d{1,3})").replace("aaa","(?<ampm>\\w{2})");const o=new RegExp(r,"g").exec(e);if(!o||!o.groups)return new Date(e);const a=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},i=a(o.groups.year),s=a(o.groups.day),c=o.groups.ampm;let u=a(o.groups.hour);c&&(u="PM"===c?u+12:u);const l=a(o.groups.minutes),d=a(o.groups.seconds),f=a(o.groups.milis),p=o.groups.monthname,y=o.groups.monthnamesmall;let h=o.groups.month;if(p)h=n.MONTH_NAMES.indexOf(p);else if(y){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(y.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=a(`${h}`);return new Date(i,h-1,s,u,l,d,f)}function i(e,t){if(!e)return;const r=()=>u(e,t);return Object.defineProperty(e,"toISOString",{enumerable:!1,configurable:!1,value:r}),Object.defineProperty(e,"toString",{enumerable:!1,configurable:!1,value:r}),e}function s(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function c(e){return e<10?"0"+e:e.toString()}function u(e,t="yyyy/MM/dd"){const r=e.getDate(),o=e.getMonth(),a=e.getFullYear(),i=e.getHours(),s=e.getMinutes(),u=e.getSeconds(),l=e.getMilliseconds(),d=i%12,f=c(d),p=c(i),y=c(s),h=c(u),g=i<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],_=v.substr(0,3),E=c(r),m=o+1,O=c(m),M=n.MONTH_NAMES[o],b=M.substr(0,3),R=a+"",S=R.substr(2,2);return(t=t.replace("hh",f).replace("h",d.toString()).replace("HH",p).replace("H",i.toString()).replace("mm",y).replace("m",s.toString()).replace("ss",h).replace("s",u.toString()).replace("S",l.toString()).replace("dd",E).replace("d",r.toString()).replace("EEEE",v).replace("EEE",_).replace("yyyy",R).replace("yy",S).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",M).replace("MMM",b):t.replace("MM",O).replace("M",m.toString())}},687:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEqual=function e(t,r,...n){if(t===r)return!0;if(t instanceof Date&&r instanceof Date)return t.getTime()===r.getTime();if(!t||!r||"object"!=typeof t&&"object"!=typeof r)return t===r;if(null==t||null==r)return!1;if(typeof t!=typeof r)return!1;if(t.prototype!==r.prototype)return!1;const o=Object.keys(t).filter((e=>-1===n.indexOf(e)));return o.length===Object.keys(r).filter((e=>-1===n.indexOf(e))).length&&o.every((o=>-1!==n.indexOf(o)||e(t[o],r[o],...n)))}},523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashCode=o,t.hashSerialization=function(e){return o(n.Model.serialize(e))},t.hashObj=function(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):0|(e=((e=e||0)<<5)-e+r)},r=o,n=function(e){return void 0===e?"":-1!==["string","number","symbol"].indexOf(typeof e)?r(e.toString()):e instanceof Date?r(e.getTime()):Array.isArray(e)?e.reduce(t,void 0):Object.values(e).reduce(t,void 0)},a=Object.values(e).reduce(t,0);return"number"==typeof a?Math.abs(a):a};const n=r(6);function o(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}},935:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(154),t),o(r(46),t),o(r(687),t),o(r(523),t),o(r(735),t),o(r(904),t),o(r(735),t),o(r(593),t)},904:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSerializer=void 0;const n=r(6),o=r(154);t.JSONSerializer=class{preSerialize(e){const t=Object.assign({},e);return t[o.ModelKeys.ANCHOR]=e[o.ModelKeys.ANCHOR],t}deserialize(e){const t=JSON.parse(e);return n.Model.build(t)}serialize(e){return JSON.stringify(this.preSerialize(e))}}},593:(e,t)=>{"use strict";function r(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r]:e}))}Object.defineProperty(t,"__esModule",{value:!0}),t.sf=void 0,t.stringFormat=r,t.sf=r},770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(436);class o{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&o.actingValidatorRegistry&&o.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),o.actingValidatorRegistry=e}static getRegistry(){return o.actingValidatorRegistry||(o.actingValidatorRegistry=new n.ValidatorRegistry),o.actingValidatorRegistry}static get(e){return o.getRegistry().get(e)}static register(...e){return o.getRegistry().register(...e)}}t.Validation=o},395:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.DATE){super(e,Number.name,Date.name,String.name)}hasErrors(e,t,r){if(void 0!==e)return"string"==typeof e&&(e=new Date(e)),isNaN(e.getDate())?this.getMessage(r||this.message):void 0}};t.DateValidator=c,t.DateValidator=c=n([(0,s.validator)(i.ValidationKeys.DATE),o("design:paramtypes",[String])],c)},335:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const a=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.EMAIL){super(e)}hasErrors(e,t){return super.hasErrors(e,a.DEFAULT_PATTERNS.EMAIL,t)}};t.EmailValidator=c,t.EmailValidator=c=n([(0,s.validator)(a.ValidationKeys.EMAIL),o("design:paramtypes",[String])],c)},407:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.LIST){super(e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;let n;for(let o=0;o<(Array.isArray(e)?e.length:e.size);o++)switch(n=e[o],typeof n){case"object":case"function":if(!n.constructor||n.constructor.name!==t)return this.getMessage(r||this.message,t);break;default:if(typeof n!==t)return this.getMessage(r||this.message,t)}}};t.ListValidator=c,t.ListValidator=c=n([(0,s.validator)(i.ValidationKeys.LIST),o("design:paramtypes",[String])],c)},169:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length>t?this.getMessage(r||this.message,t):void 0}};t.MaxLengthValidator=c,t.MaxLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX_LENGTH),o("design:paramtypes",[String])],c)},909:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX){super(e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Max param defined");return e>t?this.getMessage(r||this.message,t):void 0}}};t.MaxValidator=c,t.MaxValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX),o("design:paramtypes",[String])],c)},519:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length<t?this.getMessage(r||this.message,t):void 0}};t.MinLengthValidator=c,t.MinLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN_LENGTH),o("design:paramtypes",[String])],c)},651:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN){super(e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Min param defined");return e<t?this.getMessage(r||this.message,t):void 0}}};t.MinValidator=c,t.MinValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN),o("design:paramtypes",[String])],c)},354:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const a=r(273),i=r(772),s=r(787);let c=class extends a.PatternValidator{constructor(e=i.DEFAULT_ERROR_MESSAGES.PASSWORD,t=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH){super(e),this.pattern=t}hasErrors(e,t,r){return super.hasErrors(e,t||this.pattern,r||this.message)}};t.PasswordValidator=c,t.PasswordValidator=c=n([(0,s.validator)(i.ValidationKeys.PASSWORD),o("design:paramtypes",[Object,RegExp])],c)},273:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=t.regexpParser=void 0;const a=r(116),i=r(772),s=r(787);t.regexpParser=new RegExp("^/(.+)/([gimus]*)$");let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,"string")}getPattern(e){if(!t.regexpParser.test(e))return new RegExp(e);const r=e.match(t.regexpParser);return new RegExp(r[1],r[2])}hasErrors(e,t,r){if(e){if(!t)throw new Error("Missing Pattern");return(t="string"==typeof t?this.getPattern(t):t).lastIndex=0,t.test(e)?void 0:this.getMessage(r||this.message)}}};t.PatternValidator=c,t.PatternValidator=c=n([(0,s.validator)(i.ValidationKeys.PATTERN),o("design:paramtypes",[String])],c)},812:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){super(e)}hasErrors(e,t){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t||this.message):void 0;default:return e?void 0:this.getMessage(t||this.message)}}};t.RequiredValidator=c,t.RequiredValidator=c=n([(0,s.validator)(i.ValidationKeys.REQUIRED),o("design:paramtypes",[String])],c)},553:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const a=r(116),i=r(772),s=r(787);let c=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.STEP){super(e,"number","string")}hasErrors(e,t,r){if(void 0!==e)return Number(e)%Number(t)!=0?this.getMessage(r||this.message,t):void 0}};t.StepValidator=c,t.StepValidator=c=n([(0,s.validator)(i.ValidationKeys.STEP),o("design:paramtypes",[String])],c)},375:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const a=r(116),i=r(772),s=r(174),c=r(787),u=r(935),l=r(770);let d=class extends a.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.TYPE){super(e)}hasErrors(e,t,r){if(void 0!==e)return(0,s.evaluateDesignTypes)(e,t)?void 0:this.getMessage(r||this.message,"string"==typeof t?t:Array.isArray(t)?t.join(", "):t.name,typeof e)}};t.TypeValidator=d,t.TypeValidator=d=n([(0,c.validator)(i.ValidationKeys.TYPE),o("design:paramtypes",[String])],d),l.Validation.register({validator:d,validationKey:u.ModelKeys.TYPE,save:!1})},964:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const a=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=a.DEFAULT_ERROR_MESSAGES.URL){super(e)}hasErrors(e,t){return super.hasErrors(e,a.DEFAULT_PATTERNS.URL,t)}};t.URLValidator=c,t.URLValidator=c=n([(0,s.validator)(a.ValidationKeys.URL),o("design:paramtypes",[String])],c)},116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(772),o=r(593),a=r(174);t.Validator=class{constructor(e=n.DEFAULT_ERROR_MESSAGES.DEFAULT,...t){this.message=e,t.length&&(this.acceptedTypes=t),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,o.sf)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?(0,a.checkTypes)(t,this.acceptedTypes)?e(t,...r):this.getMessage(n.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},436:(e,t)=>{"use strict";function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyCache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyCache)}getKeys(){return Object.keys(this.cache)}get(e){if(!(e in this.cache))return;const t=this.cache[e];if(r(t))return t;const n=new(t.default||t);return this.cache[e]=n,n}register(...e){e.forEach((e=>{if(r(e)){if(e.validationKey in this.cache)return;this.cache[e.validationKey]=e}else{const{validationKey:t,validator:r,save:n}=e;if(t in this.cache)return;if(this.cache[t]=r,!n)return;const o={};o[t.toUpperCase()]=t,this.customKeyCache=Object.assign({},this.customKeyCache,o)}}))}}},772:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PATTERNS=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0,t.ValidationKeys={REFLECT:"model.validation.",VALIDATOR:"validator",REQUIRED:"required",MIN:"min",MAX:"max",STEP:"step",MIN_LENGTH:"minlength",MAX_LENGTH:"maxlength",PATTERN:"pattern",EMAIL:"email",URL:"url",DATE:"date",TYPE:"type",PASSWORD:"password",LIST:"list"},t.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],t.DAYS_OF_WEEK_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.DEFAULT_ERROR_MESSAGES={REQUIRED:"This field is required",MIN:"The minimum value is {0}",MAX:"The maximum value is {0}",MIN_LENGTH:"The minimum length is {0}",MAX_LENGTH:"The maximum length is {0}",PATTERN:"The value does not match the pattern",EMAIL:"The value is not a valid email",URL:"The value is not a valid URL",TYPE:"Invalid type. Expected {0}, received {1}",STEP:"Invalid value. Not a step of {0}",DATE:"Invalid value. not a valid Date",DEFAULT:"There is an Error",PASSWORD:"Must be at least 8 characters and contain one of number, lower and upper case letters, and special character (@$!%*?&_-.,)",LIST:"Invalid list of {0}",LIST_INSIDE:"Elements of list are invalid: {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.DEFAULT_PATTERNS={EMAIL:/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/,URL:/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i,PASSWORD:{CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}}},787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validator=function(...e){return(0,o.apply)((t=>(e.forEach((e=>{n.Validation.register({validator:t,validationKey:e,save:!0})})),t)),(0,o.metadata)((0,i.getValidationKey)(a.ValidationKeys.VALIDATOR),e))};const n=r(770),o=r(839),a=r(772),i=r(844)},493:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Validators=void 0;const a=r(395),i=r(375),s=r(354),c=r(553),u=r(964),l=r(273),d=r(651),f=r(519),p=r(909),y=r(169),h=r(812),g=r(335),v=r(407);o(r(772),t),o(r(395),t),o(r(787),t),o(r(335),t),o(r(407),t),o(r(169),t),o(r(909),t),o(r(519),t),o(r(651),t),o(r(354),t),o(r(273),t),o(r(812),t),o(r(553),t),o(r(168),t),o(r(375),t),o(r(964),t),o(r(116),t),o(r(436),t),t.Validators={EmailValidator:g.EmailValidator,RequiredValidator:h.RequiredValidator,MaxLengthValidator:y.MaxLengthValidator,MaxValidator:p.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:d.MinValidator,PatternValidator:l.PatternValidator,URLValidator:u.URLValidator,StepValidator:c.StepValidator,DateValidator:a.DateValidator,TypeValidator:i.TypeValidator,PasswordValidator:s.PasswordValidator,ListValidator:v.ListValidator}},168:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.required=function(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){return(0,a.metadata)((0,l.getValidationKey)(i.ValidationKeys.REQUIRED),{message:e})},t.min=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN){return(0,a.metadata)((0,l.getValidationKey)(i.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]})},t.max=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX){return(0,a.metadata)((0,l.getValidationKey)(i.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]})},t.step=function(e,t=i.DEFAULT_ERROR_MESSAGES.STEP){return(0,a.metadata)((0,l.getValidationKey)(i.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]})},t.minlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){return(0,a.metadata)((0,l.getValidationKey)(i.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.maxlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){return(0,a.metadata)((0,l.getValidationKey)(i.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.pattern=function(e,t=i.DEFAULT_ERROR_MESSAGES.PATTERN){return(0,a.metadata)((0,l.getValidationKey)(i.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]})},t.email=function(e=i.DEFAULT_ERROR_MESSAGES.EMAIL){return(0,a.metadata)((0,l.getValidationKey)(i.ValidationKeys.EMAIL),{message:e,types:[String.name]})},t.url=function(e=i.DEFAULT_ERROR_MESSAGES.URL){return(0,a.metadata)((0,l.getValidationKey)(i.ValidationKeys.URL),{message:e,types:[String.name]})},t.type=d,t.date=function(e="dd/MM/yyyy",t=i.DEFAULT_ERROR_MESSAGES.DATE){return(r,n)=>{Reflect.defineMetadata((0,l.getValidationKey)(i.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]},r,n);const o=new WeakMap;Object.defineProperty(r,n,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,n);r&&!r.configurable||Object.defineProperty(this,n,{enumerable:!0,configurable:!1,get:()=>o.get(this),set:t=>{let r;try{r=(0,u.parseDate)(e,t),o.set(this,r)}catch(e){console.error((0,s.sf)("Failed to parse date: {0}",e.message||e))}}}),this[n]=t},get(){console.log("here")}})}},t.password=function(e=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH,t=i.DEFAULT_ERROR_MESSAGES.PASSWORD,r=c.PasswordValidator){return(n,a)=>{Reflect.defineMetadata((0,l.getValidationKey)(i.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]},n,a),o.Validation.register({validator:r,validationKey:i.ValidationKeys.PASSWORD,save:!0})}},t.list=f,t.set=function(e,t=i.DEFAULT_ERROR_MESSAGES.LIST,r){return(n,o)=>{f(e,"Set",t,r)(n,o)}},r(630);const n=r(407),o=r(770),a=r(501),i=r(772),s=r(593),c=r(354),u=r(935),l=r(844);function d(e,t=i.DEFAULT_ERROR_MESSAGES.TYPE){return(0,a.metadata)((0,l.getValidationKey)(i.ValidationKeys.TYPE),{customTypes:e,message:t})}function f(e,t="Array",r=i.DEFAULT_ERROR_MESSAGES.LIST,a=n.ListValidator){return(n,s)=>{d(t)(n,s),Reflect.defineMetadata((0,l.getValidationKey)(i.ValidationKeys.LIST),{class:e.name,type:t,message:r},n,s),o.Validation.register({validator:a,validationKey:i.ValidationKeys.LIST,save:!0})}}},965:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(493),t),o(r(475),t),o(r(792),t),o(r(844),t),o(r(770),t)},792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValidationKey=function(e){return n.ValidationKeys.REFLECT+e};const n=r(772)},630:(e,t,r)=>{var n;!function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),n=o(e);function o(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==t.Reflect&&(n=o(t.Reflect,n)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,o=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",a=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",i="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!i&&!s,u={create:i?function(){return H(Object.create(null))}:s?function(){return H({__proto__:null})}:function(){return H({})},has:c?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),d="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[a]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,o=r+1;o<n;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,K(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,o)},t.prototype.entries=function(){return new r(this._keys,this._values,i)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[a]=function(){return this.entries()},t.prototype._find=function(e,t){if(!K(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(K(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function o(e,t){return t}function i(e,t){return[e,t]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new d}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[a]=function(){return this.keys()},e}(),p="function"==typeof WeakMap?WeakMap:function(){var e=u.create(),t=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+i()}while(u.has(e,t));return e[t]=!0,t}function o(e,n){if(!r.call(e,t)){if(!n)return;Object.defineProperty(e,t,{value:u.create()})}return e[t]}function a(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function i(){var e=function(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):a(t,e),t}return a(new Array(e),e)}(16);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",r=0;r<16;++r){var n=e[r];4!==r&&6!==r&&8!==r||(t+="-"),n<16&&(t+="0"),t+=n.toString(16).toLowerCase()}return t}}(),y=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[y]),S(e)&&(e=function(){var e,r,n,o;S(y)||void 0===t.Reflect||y in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,o=e.getOwnMetadataKeys,a=e.deleteMetadata,i=new p;return{isProviderFor:function(e,t){var r=i.get(e);return!(S(r)||!r.has(t))||!!o(e,t).length&&(S(r)&&(r=new f,i.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:a}}(t.Reflect));var a=new p,i={registerProvider:s,getProvider:u,setProvider:h};return i;function s(t){if(!Object.isExtensible(i))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case S(r):r=t;break;case r===t:break;case S(n):n=t;break;case n===t:break;default:void 0===o&&(o=new f),o.add(t)}}function c(t,a){if(!S(r)){if(r.isProviderFor(t,a))return r;if(!S(n)){if(n.isProviderFor(t,a))return r;if(!S(o))for(var i=x(o);;){var s=k(i);if(!s)return;var c=F(s);if(c.isProviderFor(t,a))return I(i),c}}}if(!S(e)&&e.isProviderFor(t,a))return e}function u(e,t){var r,n=a.get(e);return S(n)||(r=n.get(t)),S(r)?(S(r=c(e,t))||(S(n)&&(n=new d,a.set(e,n)),n.set(t,r)),r):r}function l(e){if(S(e))throw new TypeError;return r===e||n===e||!S(o)&&o.has(e)}function h(e,t,r){if(!l(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!S(n))return!1;var o=a.get(e);S(o)&&(o=new d,a.set(e,o)),o.set(t,r)}return!0}}()),!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,y,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new p,r={isProviderFor:function(e,r){var n=t.get(e);return!S(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,o){n(r,o,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var o=n(t,r,!1);return!S(o)&&A(o.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var o=n(t,r,!1);if(!S(o))return o.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],o=n(e,t,!1);if(S(o))return r;for(var a=x(o.keys()),i=0;;){var s=k(a);if(!s)return r.length=i,r;var c=F(s);try{r[i]=c}catch(e){try{I(a)}finally{throw e}}i++}},OrdinaryDeleteMetadata:function(e,r,o){var a=n(r,o,!1);if(S(a))return!1;if(!a.delete(e))return!1;if(0===a.size){var i=t.get(r);S(i)||(i.delete(o),0===i.size&&t.delete(i))}return!0}};return h.registerProvider(r),r;function n(n,o,a){var i=t.get(n),s=!1;if(S(i)){if(!a)return;i=new d,t.set(n,i),s=!0}var c=i.get(o);if(S(c)){if(!a)return;if(c=new d,i.set(o,c),!e.setProvider(n,o,r))throw i.delete(o),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(_(e,t,r))return!0;var n=U(t);return!w(n)&&v(e,n,r)}function _(e,t,r){var n=G(t,r,!1);return!S(n)&&A(n.OrdinaryHasOwnMetadata(e,t,r))}function E(e,t,r){if(_(e,t,r))return m(e,t,r);var n=U(t);return w(n)?void 0:E(e,n,r)}function m(e,t,r){var n=G(t,r,!1);if(!S(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function O(e,t,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function M(e,t){var r=b(e,t),n=U(e);if(null===n)return r;var o=M(n,t);if(o.length<=0)return r;if(r.length<=0)return o;for(var a=new f,i=[],s=0,c=r;s<c.length;s++){var u=c[s];a.has(u)||(a.add(u),i.push(u))}for(var l=0,d=o;l<d.length;l++)u=d[l],a.has(u)||(a.add(u),i.push(u));return i}function b(e,t){var r=G(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function S(e){return void 0===e}function w(e){return null===e}function P(e){return"object"==typeof e?null!==e:"function"==typeof e}function T(e,t){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=N(e,o);if(void 0!==n){var a=n.call(e,r);if(P(a))throw new TypeError;return a}return function(e,t){if("string"===t){var r=e.toString;if(D(r)&&!P(o=r.call(e)))return o;if(D(n=e.valueOf)&&!P(o=n.call(e)))return o}else{var n;if(D(n=e.valueOf)&&!P(o=n.call(e)))return o;var o,a=e.toString;if(D(a)&&!P(o=a.call(e)))return o}throw new TypeError}(e,"default"===r?"number":r)}function A(e){return!!e}function j(e){var t=T(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function V(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function D(e){return"function"==typeof e}function L(e){return"function"==typeof e}function K(e,t){return e===t||e!=e&&t!=t}function N(e,t){var r=e[t];if(null!=r){if(!D(r))throw new TypeError;return r}}function x(e){var t=N(e,a);if(!D(t))throw new TypeError;var r=t.call(e);if(!P(r))throw new TypeError;return r}function F(e){return e.value}function k(e){var t=e.next();return!t.done&&t}function I(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===l)return t;if(t!==l)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var o=n.constructor;return"function"!=typeof o||o===e?t:o}function G(e,t,r){var n=h.getProvider(e,t);if(!S(n))return n;if(r){if(h.setProvider(e,t,g))return g;throw new Error("Illegal state.")}}function H(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(S(r)){if(!V(e))throw new TypeError;if(!L(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!S(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!V(e))throw new TypeError;if(!P(t))throw new TypeError;if(!P(n)&&!S(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var o=e.length-1;o>=0;--o){var a=(0,e[o])(t,r,n);if(!S(a)&&!w(a)){if(!P(a))throw new TypeError;n=a}}return n}(e,t,r=j(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!P(r))throw new TypeError;if(!S(n)&&!function(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;O(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!P(r))throw new TypeError;return S(n)||(n=j(n)),O(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),_(e,t,r)})),e("getMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),E(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),m(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),M(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),b(e,t)})),e("deleteMetadata",(function(e,t,r){if(!P(t))throw new TypeError;if(S(r)||(r=j(r)),!P(t))throw new TypeError;S(r)||(r=j(r));var n=G(t,r,!1);return!S(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(n||(n={}))}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(729)})()));
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see decorator-validation.bundle.min.esm.js.LICENSE.txt */
2
- var e={729:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,a(r(935),t),a(r(839),t),a(r(965),t),a(r(847),t),t.VERSION="##VERSION##"},6:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0,t.validate=h;const n=r(772),a=r(735),o=r(19),i=r(402),s=r(154),c=r(38),u=r(936),l=r(770),d=r(174),f=r(523),p=r(593),y=r(687);function h(e,...t){const r=[];for(const a in e)e.hasOwnProperty(a)&&-1===t.indexOf(a)&&r.push((0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,a));const a=r.reduce(((t,r)=>{const{prop:a,decorators:o}=r;if(!o||!o.length)return t;const c=o[0];o.find((e=>e.key===n.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===c.props.name))))&&o.shift();let u=o.reduce(((t,r)=>{const n=l.Validation.get(r.key);if(!n)return t;const o=n.hasErrors(e[a.toString()],...r.key===s.ModelKeys.TYPE?[r.props]:Object.values(r.props));return o&&((t=t||{})[r.key]=o),t}),void 0);return u=u||Object.keys(e).filter((e=>!u||!u[e])).reduce(((t,r)=>{let a;const o=(0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,r).decorators,c=o.filter((e=>-1!==[s.ModelKeys.TYPE,n.ValidationKeys.TYPE].indexOf(e.key)));if(!c||!c.length)return t;const u=c.pop(),l=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],f=Object.values(i.ReservedModels).map((e=>e.toLowerCase()));return l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))switch(t){case"Array":case"Set":if(o.length&&o.find((e=>e.key===n.ValidationKeys.LIST))){const o="Array"===t?e[r].find((e=>e.hasErrors())):e[r].values().find((e=>e.hasErrors()));o&&(a=(0,p.sf)(n.DEFAULT_ERROR_MESSAGES.LIST_INSIDE,o.toString()))}break;default:try{e[r]&&(a=e[r].hasErrors())}catch(e){console.warn((0,p.sf)("Model should be validatable but its not"))}}})),a&&((t=t||{})[r]=a),t}),void 0),u&&((t=t||{})[r.prop.toString()]=u),t}),void 0);return a?new o.ModelErrorDefinition(a):void 0}let g,v,E,_;class M{constructor(e){}hasErrors(...e){return h(this,...e)}equals(e,...t){return(0,y.isEqual)(this,e,...t)}serialize(){return M.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}toHash(){return M.getHashingFunction()(this).toString()}static deserialize(e){return M.getSerializer().deserialize(e)}static serialize(e){return M.getSerializer().serialize(e)}static hash(e){return M.getHashingFunction()(e)}static fromObject(e,t){return(0,c.constructFromObject)(e,t)}static fromModel(e,t){return(0,c.constructFromModel)(e,t)}static setBuilder(e){g=e}static getBuilder(){return g}static getRegistry(){return v||(v=new u.ModelRegistryManager),v}static setRegistry(e){v=e}static register(e,t){return M.getRegistry().register(e,t)}static get(e){return M.getRegistry().get(e)}static build(e={},t){return M.getRegistry().build(e,t)}static setSerializer(e){E=e}static getSerializer(){return E||(E=new a.JSONSerializer),E}static setHashingFunction(e){_=e}static getHashingFunction(){return _||(_=f.hashObj),_}}t.Model=M},19:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)e.hasOwnProperty(t)&&e[t]&&Object.defineProperty(this,t,{enumerable:!0,configurable:!1,value:e[t],writable:!1})}toString(){const e=this;return Object.keys(e).filter((t=>e.hasOwnProperty(t)&&"function"!=typeof e[t])).reduce(((t,r)=>{let n=Object.keys(e[r]).reduce(((t,n)=>(t?t+=`\n${e[r][n]}`:t=e[r][n],t)),void 0);return n&&(n=`${r} - ${n}`,t?t+=`\n${n}`:t=n),t}),"")}}},936:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModelRegistryManager=void 0,t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;n.Model.register(t,e.name)}))};const n=r(6),a=r(154),o=r(174),i=r(593);t.ModelRegistryManager=class{constructor(e=a.ModelKeys.ANCHOR,t=o.isModel){this.cache={},this.testFunction=t,this.anchorKey=e}register(e,t){if("function"!=typeof e)throw new Error("Model registering failed. Missing Class name or constructor");t=t||e.name,this.cache[t]=e}get(e){try{return this.cache[e]}catch(e){return}}build(e={},t){if(!t&&!this.testFunction(e))throw new Error("Provided obj is not a Model object");const r=t||e[this.anchorKey].class;if(!(r in this.cache))throw new Error((0,i.sf)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}}},402:(e,t)=>{var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservedModels=t.Primitives=void 0,function(e){e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint"}(r||(t.Primitives=r={})),function(e){e.STRING="string",e.OBJECT="object",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint",e.DATE="date"}(n||(t.ReservedModels=n={}))},38:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.constructFromObject=function(e,t){if(!t)return e;for(const r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||e.prototype&&e.prototype.hasOwnProperty(r))&&(e[r]=t[r]||void 0);return e},t.constructFromModel=function(e,t){if(!t)return e;let r,u;for(const l in t)if(t.hasOwnProperty(l)&&(e.hasOwnProperty(l)||e.prototype&&e.prototype.hasOwnProperty(l))){if(e[l]=t[l]||void 0,"object"!=typeof e[l])continue;if((0,s.isModel)(e[l])){try{e[l]=n.Model.build(e[l])}catch(e){console.error(e)}continue}const d=(0,s.getPropertyDecorators)(a.ValidationKeys.REFLECT,e,l).decorators;if(r=d.filter((e=>-1!==[i.ModelKeys.TYPE,a.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,c.sf)("failed to find decorators for property {0}",l));u=r.pop();const f=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],p=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));f.forEach((t=>{if(-1===p.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===a.ValidationKeys.LIST));if(r&&("Array"===t&&(e[l]=e[l].map((e=>n.Model.build(e,r.props.class)))),"Set"===t)){const t=new Set;for(const a of e[l])t.add(n.Model.build(a,r.props.class));e[l]=t}}break;default:e[l]&&(e[l]=n.Model.build(e[l],t))}}catch(e){console.log(e)}}))}return e},t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)};const n=r(6),a=r(772),o=r(402),i=r(154),s=r(174),c=r(593)},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getModelKey=void 0,t.model=function(e,r){return i=>{const s=function(...s){const c=(0,n.construct)(i,...s),u=o.Model.getBuilder();u&&u(c,s.length?s[0]:void 0);const l=Object.assign({},{class:i.name});return Object.defineProperty(c,a.ModelKeys.ANCHOR,{writable:!1,enumerable:!1,configurable:!1,value:l}),Reflect.defineMetadata((0,t.getModelKey)(a.ModelKeys.MODEL),Object.assign(l,e||{}),c.constructor),r&&r(c,...s),c};return s.prototype=i.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:i.prototype.constructor.name}),o.Model.register(s),s}};const n=r(38),a=r(154),o=r(6);t.getModelKey=e=>a.ModelKeys.REFLECT+e},847:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(402),t),a(r(38),t),a(r(893),t),a(r(6),t),a(r(19),t),a(r(936),t),a(r(282),t)},282:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},501:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.metadata=function(e,t){return(r,n,a)=>{a?Reflect.defineMetadata(e,t,a.value):n?Reflect.defineMetadata(e,t,r,n):Reflect.defineMetadata(e,t,r)}},r(630)},839:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(501),t),a(r(174),t)},174:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getAllPropertyDecorators=void 0,t.getPropertyDecorators=i,t.getTypeFromDecorator=function(e,t){const r=i(n.ModelKeys.REFLECT,e,t,!1);if(!r||!r.decorators)return;const a=r.decorators.shift(),o=a.props?a.props.name:void 0;return"Function"!==o?o:void 0},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let a=e;const o=function(){if(!t)return;const e=Object.getPrototypeOf(a);return e&&e.constructor.name!==r?(a=e,a):void 0};do{Object.getOwnPropertyNames(a).forEach((function(e){-1===n.indexOf(e)&&n.push(e)}))}while(o());return n},t.getClassDecorators=s,t.checkType=c,t.checkTypes=u,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return c(e,t);case"object":return!Array.isArray(t)||u(e,t);case"function":return!t.name||"Object"===t.name||c(e,t.name);default:return!0}},t.isModel=function(e){return!!e[n.ModelKeys.ANCHOR]||!!s(n.ModelKeys.REFLECT,e).find((e=>e.key===n.ModelKeys.MODEL&&e.props&&e.props.class))};const n=r(154),a=r(593),o=r(687);function i(e,t,r,s=!1,c=!0,u){const l=function(e,t,r,a=!1,o){const i=Reflect.getMetadataKeys(t,r).filter((t=>a?t.toString().startsWith(e):t===n.ModelKeys.TYPE||t.toString().startsWith(e))).reduce(((a,o)=>{const i={key:o!==n.ModelKeys.TYPE?o.substring(e.length):o,props:Reflect.getMetadata(o,t,r)};return a.concat(i)}),o||[]);return{prop:r.toString(),decorators:i}}(e,t,r,s,u);return c&&Object.getPrototypeOf(t)!==Object.prototype?i(e,Object.getPrototypeOf(t.constructor),r,!0,c,l.decorators):{prop:l.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?((0,o.isEqual)(e.props,r[e.key])||console.log((0,a.sf)("Found a similar decorator for the {0} property of a {1} model but with different attributes. The original one will be kept",e.key,t.constructor.name)),!1):(r[e.key.toString()]=e.props,!0)))}(l.decorators)}}function s(e,t){return Reflect.getOwnMetadataKeys(t.constructor).filter((t=>t.toString().startsWith(e))).reduce(((r,n)=>{const a={key:n.substring(e.length),props:Reflect.getMetadata(n,t.constructor)};return r.concat(a)}),[])}function c(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function u(e,t){return!t.every((t=>!c(e,t)))}r(630),t.getAllPropertyDecorators=function(e,...t){if(t&&t.length)return Object.getOwnPropertyNames(e).reduce(((r,n)=>(t.forEach(((t,a)=>{const o=i(t,e,n,0!==a);r||(r={}),function(e,t,r){r&&r.length&&(e[t]||(e[t]=[]),e[t].push(...r))}(r,n,o.decorators)})),r)),void 0)}},154:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="model.definition.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__modelDefinition"}(r||(t.ModelKeys=r={}))},46:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=o,t.bindDateToString=i,t.isValidDate=s,t.twoDigitPad=c,t.formatDate=u,t.parseDate=function(e,t){let r;if(t){if(t instanceof Date)try{r=o(u(t,e),e)}catch(r){throw new Error((0,a.sf)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=o(t,e);else if("number"==typeof t)r=o(u(new Date(t),e),e);else{if(!s(t))throw new Error(`Invalid value provided ${t}`);try{r=o(u(new Date(t),e),e)}catch(r){throw new Error((0,a.sf)("Could not convert date {0} to format: {1}",t,e))}}return i(r,e)}},r(630);const n=r(772),a=r(593);function o(e,t){let r=t;r.match(/hh/)?r=r.replace("hh","(?<hour>\\d{2})"):r.match(/h/)?r=r.replace("h","(?<hour>\\d{1,2})"):r.match(/HH/)?r=r.replace("HH","(?<hour>\\d{2})"):r.match(/H/)&&(r=r.replace("H","(?<hour>\\d{1,2})")),r.match(/mm/)?r=r.replace("mm","(?<minutes>\\d{2})"):r.match(/m/)&&(r=r.replace("m","(?<minutes>\\d{1,2})")),r.match(/ss/)?r=r.replace("ss","(?<seconds>\\d{2})"):r.match(/s/)&&(r=r.replace("s","(?<seconds>\\d{1,2})")),r.match(/dd/)?r=r.replace("dd","(?<day>\\d{2})"):r.match(/d/)&&(r=r.replace("d","(?<day>\\d{1,2})")),r.match(/EEEE/)?r=r.replace("EEEE","(?<dayofweek>\\w+)"):r.match(/EEEE/)&&(r=r.replace("EEE","(?<dayofweek>\\w+)")),r.match(/yyyy/)?r=r.replace("yyyy","(?<year>\\d{4})"):r.match(/yy/)&&(r=r.replace("yy","(?<year>\\d{2})")),r.match(/MMMM/)?r=r.replace("MMMM","(?<monthname>\\w+)"):r.match(/MMM/)&&(r=r.replace("MMM","(?<monthnamesmall>\\w+)")),r.match(/MM/)?r=r.replace("MM","(?<month>\\d{2})"):r.match(/M/)&&(r=r.replace("M","(?<month>\\d{1,2})")),r=r.replace("S","(?<milis>\\d{1,3})").replace("aaa","(?<ampm>\\w{2})");const a=new RegExp(r,"g").exec(e);if(!a||!a.groups)return new Date(e);const o=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},i=o(a.groups.year),s=o(a.groups.day),c=a.groups.ampm;let u=o(a.groups.hour);c&&(u="PM"===c?u+12:u);const l=o(a.groups.minutes),d=o(a.groups.seconds),f=o(a.groups.milis),p=a.groups.monthname,y=a.groups.monthnamesmall;let h=a.groups.month;if(p)h=n.MONTH_NAMES.indexOf(p);else if(y){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(y.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=o(`${h}`);return new Date(i,h-1,s,u,l,d,f)}function i(e,t){if(!e)return;const r=()=>u(e,t);return Object.defineProperty(e,"toISOString",{enumerable:!1,configurable:!1,value:r}),Object.defineProperty(e,"toString",{enumerable:!1,configurable:!1,value:r}),e}function s(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function c(e){return e<10?"0"+e:e.toString()}function u(e,t="yyyy/MM/dd"){const r=e.getDate(),a=e.getMonth(),o=e.getFullYear(),i=e.getHours(),s=e.getMinutes(),u=e.getSeconds(),l=e.getMilliseconds(),d=i%12,f=c(d),p=c(i),y=c(s),h=c(u),g=i<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],E=v.substr(0,3),_=c(r),M=a+1,m=c(M),O=n.MONTH_NAMES[a],b=O.substr(0,3),R=o+"",S=R.substr(2,2);return(t=t.replace("hh",f).replace("h",d.toString()).replace("HH",p).replace("H",i.toString()).replace("mm",y).replace("m",s.toString()).replace("ss",h).replace("s",u.toString()).replace("S",l.toString()).replace("dd",_).replace("d",r.toString()).replace("EEEE",v).replace("EEE",E).replace("yyyy",R).replace("yy",S).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",O).replace("MMM",b):t.replace("MM",m).replace("M",M.toString())}},687:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isEqual=function e(t,r,...n){if(t===r)return!0;if(t instanceof Date&&r instanceof Date)return t.getTime()===r.getTime();if(!t||!r||"object"!=typeof t&&"object"!=typeof r)return t===r;if(null==t||null==r)return!1;if(typeof t!=typeof r)return!1;if(t.prototype!==r.prototype)return!1;const a=Object.keys(t).filter((e=>-1===n.indexOf(e)));return a.length===Object.keys(r).filter((e=>-1===n.indexOf(e))).length&&a.every((a=>-1!==n.indexOf(a)||e(t[a],r[a],...n)))}},523:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hashCode=a,t.hashSerialization=function(e){return a(n.Model.serialize(e))},t.hashObj=function(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):0|(e=((e=e||0)<<5)-e+r)},r=a,n=function(e){return void 0===e?"":-1!==["string","number","symbol"].indexOf(typeof e)?r(e.toString()):e instanceof Date?r(e.getTime()):Array.isArray(e)?e.reduce(t,void 0):Object.values(e).reduce(t,void 0)},o=Object.values(e).reduce(t,0);return"number"==typeof o?Math.abs(o):o};const n=r(6);function a(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}},935:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(154),t),a(r(46),t),a(r(687),t),a(r(523),t),a(r(735),t),a(r(904),t),a(r(735),t),a(r(593),t)},904:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSerializer=void 0;const n=r(6),a=r(154);t.JSONSerializer=class{preSerialize(e){const t=Object.assign({},e);return t[a.ModelKeys.ANCHOR]=e[a.ModelKeys.ANCHOR],t}deserialize(e){const t=JSON.parse(e);return n.Model.build(t)}serialize(e){return JSON.stringify(this.preSerialize(e))}}},593:(e,t)=>{function r(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r]:e}))}Object.defineProperty(t,"__esModule",{value:!0}),t.sf=void 0,t.stringFormat=r,t.sf=r},770:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(375),a=r(436),o=r(154);class i{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&i.actingValidatorRegistry&&i.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),i.actingValidatorRegistry=e}static getRegistry(){return i.actingValidatorRegistry||(i.actingValidatorRegistry=new a.ValidatorRegistry({validator:n.TypeValidator,validationKey:o.ModelKeys.TYPE,save:!1})),i.actingValidatorRegistry}static get(e){return i.getRegistry().get(e)}static register(...e){return i.getRegistry().register(...e)}}t.Validation=i},395:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.DATE){super(i.ValidationKeys.DATE,e,Number.name,Date.name,String.name)}hasErrors(e,t,r){if(void 0!==e)return"string"==typeof e&&(e=new Date(e)),isNaN(e.getDate())?this.getMessage(r||this.message):void 0}};t.DateValidator=c,t.DateValidator=c=n([(0,s.validator)(i.ValidationKeys.DATE),a("design:paramtypes",[String])],c)},335:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const o=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=o.DEFAULT_ERROR_MESSAGES.EMAIL){super(o.ValidationKeys.EMAIL,e)}hasErrors(e,t){return super.hasErrors(e,o.DEFAULT_PATTERNS.EMAIL,t)}};t.EmailValidator=c,t.EmailValidator=c=n([(0,s.validator)(o.ValidationKeys.EMAIL),a("design:paramtypes",[String])],c)},407:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.LIST){super(i.ValidationKeys.LIST,e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;let n;for(let a=0;a<(Array.isArray(e)?e.length:e.size);a++)switch(n=e[a],typeof n){case"object":case"function":if(!n.constructor||n.constructor.name!==t)return this.getMessage(r||this.message,t);break;default:if(typeof n!==t)return this.getMessage(r||this.message,t)}}};t.ListValidator=c,t.ListValidator=c=n([(0,s.validator)(i.ValidationKeys.LIST),a("design:paramtypes",[String])],c)},169:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(i.ValidationKeys.MAX_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length>t?this.getMessage(r||this.message,t):void 0}};t.MaxLengthValidator=c,t.MaxLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX_LENGTH),a("design:paramtypes",[String])],c)},909:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX){super(i.ValidationKeys.MAX,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Max param defined");return e>t?this.getMessage(r||this.message,t):void 0}}};t.MaxValidator=c,t.MaxValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX),a("design:paramtypes",[String])],c)},519:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(i.ValidationKeys.MIN_LENGTH,e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length<t?this.getMessage(r||this.message,t):void 0}};t.MinLengthValidator=c,t.MinLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN_LENGTH),a("design:paramtypes",[String])],c)},651:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN){super(i.ValidationKeys.MIN,e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Min param defined");return e<t?this.getMessage(r||this.message,t):void 0}}};t.MinValidator=c,t.MinValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN),a("design:paramtypes",[String])],c)},354:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const o=r(273),i=r(772),s=r(787);let c=class extends o.PatternValidator{constructor(e=i.DEFAULT_ERROR_MESSAGES.PASSWORD,t=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH){super(i.ValidationKeys.PASSWORD,e),this.pattern=t}hasErrors(e,t,r){return super.hasErrors(e,t||this.pattern,r||this.message)}};t.PasswordValidator=c,t.PasswordValidator=c=n([(0,s.validator)(i.ValidationKeys.PASSWORD),a("design:paramtypes",[Object,RegExp])],c)},273:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=t.regexpParser=void 0;const o=r(116),i=r(772),s=r(787);t.regexpParser=new RegExp("^/(.+)/([gimus]*)$");let c=class extends o.Validator{constructor(e=i.ValidationKeys.PATTERN,t=i.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,t,"string")}getPattern(e){if(!t.regexpParser.test(e))return new RegExp(e);const r=e.match(t.regexpParser);return new RegExp(r[1],r[2])}hasErrors(e,t,r){if(e){if(!t)throw new Error("Missing Pattern");return(t="string"==typeof t?this.getPattern(t):t).lastIndex=0,t.test(e)?void 0:this.getMessage(r||this.message)}}};t.PatternValidator=c,t.PatternValidator=c=n([(0,s.validator)(i.ValidationKeys.PATTERN),a("design:paramtypes",[String,String])],c)},812:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){super(i.ValidationKeys.REQUIRED,e)}hasErrors(e,t){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t||this.message):void 0;default:return e?void 0:this.getMessage(t||this.message)}}};t.RequiredValidator=c,t.RequiredValidator=c=n([(0,s.validator)(i.ValidationKeys.REQUIRED),a("design:paramtypes",[String])],c)},553:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.STEP){super(i.ValidationKeys.STEP,e,"number","string")}hasErrors(e,t,r){if(void 0!==e)return Number(e)%Number(t)!=0?this.getMessage(r||this.message,t):void 0}};t.StepValidator=c,t.StepValidator=c=n([(0,s.validator)(i.ValidationKeys.STEP),a("design:paramtypes",[String])],c)},375:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const n=r(116),a=r(772),o=r(154),i=r(174);class s extends n.Validator{constructor(e=a.DEFAULT_ERROR_MESSAGES.TYPE){super(o.ModelKeys.TYPE,e)}hasErrors(e,t,r){if(void 0!==e)return(0,i.evaluateDesignTypes)(e,t)?void 0:this.getMessage(r||this.message,"string"==typeof t?t:Array.isArray(t)?t.join(", "):t.name,typeof e)}}t.TypeValidator=s},964:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const o=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=o.DEFAULT_ERROR_MESSAGES.URL){super(o.ValidationKeys.URL,e)}hasErrors(e,t){return super.hasErrors(e,o.DEFAULT_PATTERNS.URL,t)}};t.URLValidator=c,t.URLValidator=c=n([(0,s.validator)(o.ValidationKeys.URL),a("design:paramtypes",[String])],c)},116:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(772),a=r(593),o=r(174);t.Validator=class{constructor(e,t=n.DEFAULT_ERROR_MESSAGES.DEFAULT,...r){this.validationKey=e,this.message=t,r.length&&(this.acceptedTypes=r),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,a.sf)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?(0,o.checkTypes)(t,this.acceptedTypes)?e(t,...r):this.getMessage(n.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},436:(e,t)=>{function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyChache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyChache)}getKeys(){return Object.keys(this.cache)}get(e){if(!(e in this.cache))return;const t=this.cache[e];if(r(t))return t;const n=new(t.default||t);return this.cache[e]=n,n}register(...e){e.forEach((e=>{if(r(e)){if(e.validationKey in this.cache)return;this.cache[e.validationKey]=e}else{const{validationKey:t,validator:r,save:n}=e;if(t in this.cache)return;if(this.cache[t]=r,!n)return;const a={};a[t.toUpperCase()]=t,this.customKeyChache=Object.assign({},this.customKeyChache,a)}}))}}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PATTERNS=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0,t.ValidationKeys={REFLECT:"model.validation.",REQUIRED:"required",MIN:"min",MAX:"max",STEP:"step",MIN_LENGTH:"minlength",MAX_LENGTH:"maxlength",PATTERN:"pattern",EMAIL:"email",URL:"url",DATE:"date",TYPE:"type",PASSWORD:"password",LIST:"list"},t.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],t.DAYS_OF_WEEK_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.DEFAULT_ERROR_MESSAGES={REQUIRED:"This field is required",MIN:"The minimum value is {0}",MAX:"The maximum value is {0}",MIN_LENGTH:"The minimum length is {0}",MAX_LENGTH:"The maximum length is {0}",PATTERN:"The value does not match the pattern",EMAIL:"The value is not a valid email",URL:"The value is not a valid URL",TYPE:"Invalid type. Expected {0}, received {1}",STEP:"Invalid value. Not a step of {0}",DATE:"Invalid value. not a valid Date",DEFAULT:"There is an Error",PASSWORD:"Must be at least 8 characters and contain one of number, lower and upper case letters, and special character (@$!%*?&_-.,)",LIST:"Invalid list of {0}",LIST_INSIDE:"Elements of list are invalid: {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.DEFAULT_PATTERNS={EMAIL:/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/,URL:/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i,PASSWORD:{CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}}},787:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validator=function(e){return t=>(n.Validation.register({validator:t,validationKey:e,save:!0}),t)};const n=r(770)},493:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Validators=void 0;const o=r(395),i=r(375),s=r(354),c=r(553),u=r(964),l=r(273),d=r(651),f=r(519),p=r(909),y=r(169),h=r(812),g=r(335),v=r(407);a(r(772),t),a(r(395),t),a(r(787),t),a(r(335),t),a(r(407),t),a(r(169),t),a(r(909),t),a(r(519),t),a(r(651),t),a(r(354),t),a(r(273),t),a(r(812),t),a(r(553),t),a(r(168),t),a(r(375),t),a(r(964),t),a(r(116),t),a(r(436),t),t.Validators={EmailValidator:g.EmailValidator,RequiredValidator:h.RequiredValidator,MaxLengthValidator:y.MaxLengthValidator,MaxValidator:p.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:d.MinValidator,PatternValidator:l.PatternValidator,URLValidator:u.URLValidator,StepValidator:c.StepValidator,DateValidator:o.DateValidator,TypeValidator:i.TypeValidator,PasswordValidator:s.PasswordValidator,ListValidator:v.ListValidator}},168:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getValidationKey=l,t.required=function(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){return(0,o.metadata)(l(i.ValidationKeys.REQUIRED),{message:e})},t.min=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN){return(0,o.metadata)(l(i.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]})},t.max=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX){return(0,o.metadata)(l(i.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]})},t.step=function(e,t=i.DEFAULT_ERROR_MESSAGES.STEP){return(0,o.metadata)(l(i.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]})},t.minlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){return(0,o.metadata)(l(i.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.maxlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){return(0,o.metadata)(l(i.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.pattern=function(e,t=i.DEFAULT_ERROR_MESSAGES.PATTERN){return(0,o.metadata)(l(i.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]})},t.email=function(e=i.DEFAULT_ERROR_MESSAGES.EMAIL){return(0,o.metadata)(l(i.ValidationKeys.EMAIL),{message:e,types:[String.name]})},t.url=function(e=i.DEFAULT_ERROR_MESSAGES.URL){return(0,o.metadata)(l(i.ValidationKeys.URL),{message:e,types:[String.name]})},t.type=d,t.date=function(e="dd/MM/yyyy",t=i.DEFAULT_ERROR_MESSAGES.DATE){return(r,n)=>{Reflect.defineMetadata(l(i.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]},r,n);const a=new WeakMap;Object.defineProperty(r,n,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,n);r&&!r.configurable||Object.defineProperty(this,n,{enumerable:!0,configurable:!1,get:()=>a.get(this),set:t=>{let r;try{r=(0,u.parseDate)(e,t),a.set(this,r)}catch(e){console.error((0,s.sf)("Failed to parse date: {0}",e.message||e))}}}),this[n]=t},get(){console.log("here")}})}},t.password=function(e=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH,t=i.DEFAULT_ERROR_MESSAGES.PASSWORD,r=c.PasswordValidator){return(n,o)=>{Reflect.defineMetadata(l(i.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]},n,o),a.Validation.register({validator:r,validationKey:i.ValidationKeys.PASSWORD,save:!0})}},t.list=f,t.set=function(e,t=i.DEFAULT_ERROR_MESSAGES.LIST,r){return(n,a)=>{f(e,"Set",t,r)(n,a)}},r(630);const n=r(407),a=r(770),o=r(501),i=r(772),s=r(593),c=r(354),u=r(935);function l(e){return i.ValidationKeys.REFLECT+e}function d(e,t=i.DEFAULT_ERROR_MESSAGES.TYPE){return(0,o.metadata)(l(i.ValidationKeys.TYPE),{customTypes:e,message:t})}function f(e,t="Array",r=i.DEFAULT_ERROR_MESSAGES.LIST,o=n.ListValidator){return(n,s)=>{d(t)(n,s),Reflect.defineMetadata(l(i.ValidationKeys.LIST),{class:e.name,type:t,message:r},n,s),a.Validation.register({validator:o,validationKey:i.ValidationKeys.LIST,save:!0})}}},965:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(493),t),a(r(475),t),a(r(792),t),a(r(770),t)},792:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},630:(e,t,r)=>{var n;!function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),n=a(e);function a(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==t.Reflect&&(n=a(t.Reflect,n)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,a=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",i="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!i&&!s,u={create:i?function(){return H(Object.create(null))}:s?function(){return H({__proto__:null})}:function(){return H({})},has:c?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),d="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[o]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,a=r+1;a<n;a++)this._keys[a-1]=this._keys[a],this._values[a-1]=this._values[a];return this._keys.length--,this._values.length--,N(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,a)},t.prototype.entries=function(){return new r(this._keys,this._values,i)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[o]=function(){return this.entries()},t.prototype._find=function(e,t){if(!N(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(N(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function a(e,t){return t}function i(e,t){return[e,t]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new d}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[o]=function(){return this.keys()},e}(),p="function"==typeof WeakMap?WeakMap:function(){var e=u.create(),t=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=a(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=a(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return a(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=a(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+i()}while(u.has(e,t));return e[t]=!0,t}function a(e,n){if(!r.call(e,t)){if(!n)return;Object.defineProperty(e,t,{value:u.create()})}return e[t]}function o(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function i(){var e=function(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):o(t,e),t}return o(new Array(e),e)}(16);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",r=0;r<16;++r){var n=e[r];4!==r&&6!==r&&8!==r||(t+="-"),n<16&&(t+="0"),t+=n.toString(16).toLowerCase()}return t}}(),y=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[y]),S(e)&&(e=function(){var e,r,n,a;S(y)||void 0===t.Reflect||y in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,a=e.getOwnMetadataKeys,o=e.deleteMetadata,i=new p;return{isProviderFor:function(e,t){var r=i.get(e);return!(S(r)||!r.has(t))||!!a(e,t).length&&(S(r)&&(r=new f,i.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:a,OrdinaryDeleteMetadata:o}}(t.Reflect));var o=new p,i={registerProvider:s,getProvider:u,setProvider:h};return i;function s(t){if(!Object.isExtensible(i))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case S(r):r=t;break;case r===t:break;case S(n):n=t;break;case n===t:break;default:void 0===a&&(a=new f),a.add(t)}}function c(t,o){if(!S(r)){if(r.isProviderFor(t,o))return r;if(!S(n)){if(n.isProviderFor(t,o))return r;if(!S(a))for(var i=x(a);;){var s=k(i);if(!s)return;var c=F(s);if(c.isProviderFor(t,o))return I(i),c}}}if(!S(e)&&e.isProviderFor(t,o))return e}function u(e,t){var r,n=o.get(e);return S(n)||(r=n.get(t)),S(r)?(S(r=c(e,t))||(S(n)&&(n=new d,o.set(e,n)),n.set(t,r)),r):r}function l(e){if(S(e))throw new TypeError;return r===e||n===e||!S(a)&&a.has(e)}function h(e,t,r){if(!l(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!S(n))return!1;var a=o.get(e);S(a)&&(a=new d,o.set(e,a)),a.set(t,r)}return!0}}()),!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,y,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new p,r={isProviderFor:function(e,r){var n=t.get(e);return!S(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,a){n(r,a,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var a=n(t,r,!1);return!S(a)&&A(a.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var a=n(t,r,!1);if(!S(a))return a.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],a=n(e,t,!1);if(S(a))return r;for(var o=x(a.keys()),i=0;;){var s=k(o);if(!s)return r.length=i,r;var c=F(s);try{r[i]=c}catch(e){try{I(o)}finally{throw e}}i++}},OrdinaryDeleteMetadata:function(e,r,a){var o=n(r,a,!1);if(S(o))return!1;if(!o.delete(e))return!1;if(0===o.size){var i=t.get(r);S(i)||(i.delete(a),0===i.size&&t.delete(i))}return!0}};return h.registerProvider(r),r;function n(n,a,o){var i=t.get(n),s=!1;if(S(i)){if(!o)return;i=new d,t.set(n,i),s=!0}var c=i.get(a);if(S(c)){if(!o)return;if(c=new d,i.set(a,c),!e.setProvider(n,a,r))throw i.delete(a),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(E(e,t,r))return!0;var n=U(t);return!w(n)&&v(e,n,r)}function E(e,t,r){var n=G(t,r,!1);return!S(n)&&A(n.OrdinaryHasOwnMetadata(e,t,r))}function _(e,t,r){if(E(e,t,r))return M(e,t,r);var n=U(t);return w(n)?void 0:_(e,n,r)}function M(e,t,r){var n=G(t,r,!1);if(!S(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function m(e,t,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function O(e,t){var r=b(e,t),n=U(e);if(null===n)return r;var a=O(n,t);if(a.length<=0)return r;if(r.length<=0)return a;for(var o=new f,i=[],s=0,c=r;s<c.length;s++){var u=c[s];o.has(u)||(o.add(u),i.push(u))}for(var l=0,d=a;l<d.length;l++)u=d[l],o.has(u)||(o.add(u),i.push(u));return i}function b(e,t){var r=G(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function S(e){return void 0===e}function w(e){return null===e}function P(e){return"object"==typeof e?null!==e:"function"==typeof e}function T(e,t){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=K(e,a);if(void 0!==n){var o=n.call(e,r);if(P(o))throw new TypeError;return o}return function(e,t){if("string"===t){var r=e.toString;if(D(r)&&!P(a=r.call(e)))return a;if(D(n=e.valueOf)&&!P(a=n.call(e)))return a}else{var n;if(D(n=e.valueOf)&&!P(a=n.call(e)))return a;var a,o=e.toString;if(D(o)&&!P(a=o.call(e)))return a}throw new TypeError}(e,"default"===r?"number":r)}function A(e){return!!e}function j(e){var t=T(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function V(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function D(e){return"function"==typeof e}function L(e){return"function"==typeof e}function N(e,t){return e===t||e!=e&&t!=t}function K(e,t){var r=e[t];if(null!=r){if(!D(r))throw new TypeError;return r}}function x(e){var t=K(e,o);if(!D(t))throw new TypeError;var r=t.call(e);if(!P(r))throw new TypeError;return r}function F(e){return e.value}function k(e){var t=e.next();return!t.done&&t}function I(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===l)return t;if(t!==l)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var a=n.constructor;return"function"!=typeof a||a===e?t:a}function G(e,t,r){var n=h.getProvider(e,t);if(!S(n))return n;if(r){if(h.setProvider(e,t,g))return g;throw new Error("Illegal state.")}}function H(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(S(r)){if(!V(e))throw new TypeError;if(!L(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!S(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!V(e))throw new TypeError;if(!P(t))throw new TypeError;if(!P(n)&&!S(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var a=e.length-1;a>=0;--a){var o=(0,e[a])(t,r,n);if(!S(o)&&!w(o)){if(!P(o))throw new TypeError;n=o}}return n}(e,t,r=j(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!P(r))throw new TypeError;if(!S(n)&&!function(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;m(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!P(r))throw new TypeError;return S(n)||(n=j(n)),m(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),E(e,t,r)})),e("getMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),_(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),M(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),O(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),b(e,t)})),e("deleteMetadata",(function(e,t,r){if(!P(t))throw new TypeError;if(S(r)||(r=j(r)),!P(t))throw new TypeError;S(r)||(r=j(r));var n=G(t,r,!1);return!S(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(n||(n={}))}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(729);
2
+ var e={729:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,a(r(935),t),a(r(839),t),a(r(965),t),a(r(847),t),t.VERSION="##VERSION##"},6:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0,t.validate=h;const n=r(772),a=r(735),o=r(19),i=r(402),s=r(154),c=r(38),u=r(936),l=r(770),d=r(174),f=r(523),p=r(593),y=r(687);function h(e,...t){const r=[];for(const a in e)e.hasOwnProperty(a)&&-1===t.indexOf(a)&&r.push((0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,a));const a=r.reduce(((t,r)=>{const{prop:a,decorators:o}=r;if(!o||!o.length)return t;const c=o[0];o.find((e=>e.key===n.ValidationKeys.TYPE||!!e.props.types?.find((e=>e===c.props.name))))&&o.shift();let u=o.reduce(((t,r)=>{const n=l.Validation.get(r.key);if(!n)return t;const o=n.hasErrors(e[a.toString()],...r.key===s.ModelKeys.TYPE?[r.props]:Object.values(r.props));return o&&((t=t||{})[r.key]=o),t}),void 0);return u=u||Object.keys(e).filter((e=>!u||!u[e])).reduce(((t,r)=>{let a;const o=(0,d.getPropertyDecorators)(n.ValidationKeys.REFLECT,e,r).decorators,c=o.filter((e=>-1!==[s.ModelKeys.TYPE,n.ValidationKeys.TYPE].indexOf(e.key)));if(!c||!c.length)return t;const u=c.pop(),l=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],f=Object.values(i.ReservedModels).map((e=>e.toLowerCase()));return l.forEach((t=>{if(-1===f.indexOf(t.toLowerCase()))switch(t){case"Array":case"Set":if(o.length&&o.find((e=>e.key===n.ValidationKeys.LIST))){const o="Array"===t?e[r].find((e=>e.hasErrors())):e[r].values().find((e=>e.hasErrors()));o&&(a=(0,p.sf)(n.DEFAULT_ERROR_MESSAGES.LIST_INSIDE,o.toString()))}break;default:try{e[r]&&(a=e[r].hasErrors())}catch(e){console.warn((0,p.sf)("Model should be validatable but its not"))}}})),a&&((t=t||{})[r]=a),t}),void 0),u&&((t=t||{})[r.prop.toString()]=u),t}),void 0);return a?new o.ModelErrorDefinition(a):void 0}let g,v,_,E;class m{constructor(e){}hasErrors(...e){return h(this,...e)}equals(e,...t){return(0,y.isEqual)(this,e,...t)}serialize(){return m.serialize(this)}toString(){return this.constructor.name+": "+JSON.stringify(this,void 0,2)}toHash(){return m.getHashingFunction()(this).toString()}static deserialize(e){return m.getSerializer().deserialize(e)}static serialize(e){return m.getSerializer().serialize(e)}static hash(e){return m.getHashingFunction()(e)}static fromObject(e,t){return(0,c.constructFromObject)(e,t)}static fromModel(e,t){return(0,c.constructFromModel)(e,t)}static setBuilder(e){g=e}static getBuilder(){return g}static getRegistry(){return v||(v=new u.ModelRegistryManager),v}static setRegistry(e){v=e}static register(e,t){return m.getRegistry().register(e,t)}static get(e){return m.getRegistry().get(e)}static build(e={},t){return m.getRegistry().build(e,t)}static setSerializer(e){_=e}static getSerializer(){return _||(_=new a.JSONSerializer),_}static setHashingFunction(e){E=e}static getHashingFunction(){return E||(E=f.hashObj),E}}t.Model=m},19:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModelErrorDefinition=void 0,t.ModelErrorDefinition=class{constructor(e){for(const t in e)e.hasOwnProperty(t)&&e[t]&&Object.defineProperty(this,t,{enumerable:!0,configurable:!1,value:e[t],writable:!1})}toString(){const e=this;return Object.keys(e).filter((t=>e.hasOwnProperty(t)&&"function"!=typeof e[t])).reduce(((t,r)=>{let n=Object.keys(e[r]).reduce(((t,n)=>(t?t+=`\n${e[r][n]}`:t=e[r][n],t)),void 0);return n&&(n=`${r} - ${n}`,t?t+=`\n${n}`:t=n),t}),"")}}},936:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ModelRegistryManager=void 0,t.bulkModelRegister=function(...e){e.forEach((e=>{const t=e.constructor?e.constructor:e;n.Model.register(t,e.name)}))};const n=r(6),a=r(154),o=r(174),i=r(593);t.ModelRegistryManager=class{constructor(e=a.ModelKeys.ANCHOR,t=o.isModel){this.cache={},this.testFunction=t,this.anchorKey=e}register(e,t){if("function"!=typeof e)throw new Error("Model registering failed. Missing Class name or constructor");t=t||e.name,this.cache[t]=e}get(e){try{return this.cache[e]}catch(e){return}}build(e={},t){if(!t&&!this.testFunction(e))throw new Error("Provided obj is not a Model object");const r=t||e[this.anchorKey].class;if(!(r in this.cache))throw new Error((0,i.sf)("Provided class {0} is not a registered Model object",r));return new this.cache[r](e)}}},402:(e,t)=>{var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservedModels=t.Primitives=void 0,function(e){e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint"}(r||(t.Primitives=r={})),function(e){e.STRING="string",e.OBJECT="object",e.NUMBER="number",e.BOOLEAN="boolean",e.BIGINT="bigint",e.DATE="date"}(n||(t.ReservedModels=n={}))},38:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.constructFromObject=function(e,t){if(!t)return e;for(const r in t)t.hasOwnProperty(r)&&(e.hasOwnProperty(r)||e.prototype&&e.prototype.hasOwnProperty(r))&&(e[r]=t[r]||void 0);return e},t.constructFromModel=function(e,t){if(!t)return e;let r,u;for(const l in t)if(t.hasOwnProperty(l)&&(e.hasOwnProperty(l)||e.prototype&&e.prototype.hasOwnProperty(l))){if(e[l]=t[l]||void 0,"object"!=typeof e[l])continue;if((0,s.isModel)(e[l])){try{e[l]=n.Model.build(e[l])}catch(e){console.error(e)}continue}const d=(0,s.getPropertyDecorators)(a.ValidationKeys.REFLECT,e,l).decorators;if(r=d.filter((e=>-1!==[i.ModelKeys.TYPE,a.ValidationKeys.TYPE].indexOf(e.key))),!r||!r.length)throw new Error((0,c.sf)("failed to find decorators for property {0}",l));u=r.pop();const f=u.props.name?[u.props.name]:Array.isArray(u.props.customTypes)?u.props.customTypes:[u.props.customTypes],p=Object.values(o.ReservedModels).map((e=>e.toLowerCase()));f.forEach((t=>{if(-1===p.indexOf(t.toLowerCase()))try{switch(t){case"Array":case"Set":if(d.length){const r=d.find((e=>e.key===a.ValidationKeys.LIST));if(r&&("Array"===t&&(e[l]=e[l].map((e=>n.Model.build(e,r.props.class)))),"Set"===t)){const t=new Set;for(const a of e[l])t.add(n.Model.build(a,r.props.class));e[l]=t}}break;default:e[l]&&(e[l]=n.Model.build(e[l],t))}}catch(e){console.log(e)}}))}return e},t.construct=function(e,...t){const r=(...t)=>new e(...t);return r.prototype=e.prototype,r(...t)};const n=r(6),a=r(772),o=r(402),i=r(154),s=r(174),c=r(593)},893:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getModelKey=void 0,t.model=function(e,r){return i=>{const s=function(...s){const c=(0,n.construct)(i,...s),u=o.Model.getBuilder();u&&u(c,s.length?s[0]:void 0);const l=Object.assign({},{class:i.name});return Object.defineProperty(c,a.ModelKeys.ANCHOR,{writable:!1,enumerable:!1,configurable:!1,value:l}),Reflect.defineMetadata((0,t.getModelKey)(a.ModelKeys.MODEL),Object.assign(l,e||{}),c.constructor),r&&r(c,...s),c};return s.prototype=i.prototype,Object.defineProperty(s,"name",{writable:!1,enumerable:!0,configurable:!1,value:i.prototype.constructor.name}),o.Model.register(s),s}};const n=r(38),a=r(154),o=r(6);t.getModelKey=e=>a.ModelKeys.REFLECT+e},847:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(402),t),a(r(38),t),a(r(893),t),a(r(6),t),a(r(19),t),a(r(936),t),a(r(282),t)},282:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},501:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.metadata=function(e,t){return(r,n,a)=>{a?Reflect.defineMetadata(e,t,a.value):n?Reflect.defineMetadata(e,t,r,n):Reflect.defineMetadata(e,t,r)}},t.apply=function(...e){return(t,r,n)=>{for(const a of e)t instanceof Function&&!n?a(t):a(t,r,n)}},r(630)},839:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(501),t),a(r(174),t)},174:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getAllPropertyDecorators=void 0,t.getPropertyDecorators=i,t.getTypeFromDecorator=function(e,t){const r=i(n.ModelKeys.REFLECT,e,t,!1);if(!r||!r.decorators)return;const a=r.decorators.shift(),o=a.props?a.props.name:void 0;return"Function"!==o?o:void 0},t.getAllProperties=function(e,t=!0,r="Object"){const n=[];let a=e;const o=function(){if(!t)return;const e=Object.getPrototypeOf(a);return e&&e.constructor.name!==r?(a=e,a):void 0};do{Object.getOwnPropertyNames(a).forEach((function(e){-1===n.indexOf(e)&&n.push(e)}))}while(o());return n},t.getClassDecorators=s,t.checkType=c,t.checkTypes=u,t.evaluateDesignTypes=function(e,t){switch(typeof t){case"string":return c(e,t);case"object":return!Array.isArray(t)||u(e,t);case"function":return!t.name||"Object"===t.name||c(e,t.name);default:return!0}},t.isModel=function(e){return!!e[n.ModelKeys.ANCHOR]||!!s(n.ModelKeys.REFLECT,e).find((e=>e.key===n.ModelKeys.MODEL&&e.props&&e.props.class))};const n=r(154),a=r(593),o=r(687);function i(e,t,r,s=!1,c=!0,u){const l=function(e,t,r,a=!1,o){const i=Reflect.getMetadataKeys(t,r).filter((t=>a?t.toString().startsWith(e):t===n.ModelKeys.TYPE||t.toString().startsWith(e))).reduce(((a,o)=>{const i={key:o!==n.ModelKeys.TYPE?o.substring(e.length):o,props:Reflect.getMetadata(o,t,r)};return a.concat(i)}),o||[]);return{prop:r.toString(),decorators:i}}(e,t,r,s,u);return c&&Object.getPrototypeOf(t)!==Object.prototype?i(e,Object.getPrototypeOf(t.constructor),r,!0,c,l.decorators):{prop:l.prop,decorators:function(e){const r={};return e.filter((e=>e.key in r?((0,o.isEqual)(e.props,r[e.key])||console.log((0,a.sf)("Found a similar decorator for the {0} property of a {1} model but with different attributes. The original one will be kept",e.key,t.constructor.name)),!1):(r[e.key.toString()]=e.props,!0)))}(l.decorators)}}function s(e,t){return Reflect.getOwnMetadataKeys(t.constructor).filter((t=>t.toString().startsWith(e))).reduce(((r,n)=>{const a={key:n.substring(e.length),props:Reflect.getMetadata(n,t.constructor)};return r.concat(a)}),[])}function c(e,t){return typeof e===t||e.constructor&&e.constructor.name.toLowerCase()===t.toLowerCase()}function u(e,t){return!t.every((t=>!c(e,t)))}r(630),t.getAllPropertyDecorators=function(e,...t){if(t&&t.length)return Object.getOwnPropertyNames(e).reduce(((r,n)=>(t.forEach(((t,a)=>{const o=i(t,e,n,0!==a);r||(r={}),function(e,t,r){r&&r.length&&(e[t]||(e[t]=[]),e[t].push(...r))}(r,n,o.decorators)})),r)),void 0)}},154:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ModelKeys=void 0,function(e){e.REFLECT="model.definition.",e.TYPE="design:type",e.PARAMS="design:paramtypes",e.RETURN="design:returntype",e.MODEL="model",e.ANCHOR="__modelDefinition"}(r||(t.ModelKeys=r={}))},46:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.dateFromFormat=o,t.bindDateToString=i,t.isValidDate=s,t.twoDigitPad=c,t.formatDate=u,t.parseDate=function(e,t){let r;if(t){if(t instanceof Date)try{r=o(u(t,e),e)}catch(r){throw new Error((0,a.sf)("Could not convert date {0} to format: {1}",t.toString(),e))}else if("string"==typeof t)r=o(t,e);else if("number"==typeof t)r=o(u(new Date(t),e),e);else{if(!s(t))throw new Error(`Invalid value provided ${t}`);try{r=o(u(new Date(t),e),e)}catch(r){throw new Error((0,a.sf)("Could not convert date {0} to format: {1}",t,e))}}return i(r,e)}},r(630);const n=r(772),a=r(593);function o(e,t){let r=t;r.match(/hh/)?r=r.replace("hh","(?<hour>\\d{2})"):r.match(/h/)?r=r.replace("h","(?<hour>\\d{1,2})"):r.match(/HH/)?r=r.replace("HH","(?<hour>\\d{2})"):r.match(/H/)&&(r=r.replace("H","(?<hour>\\d{1,2})")),r.match(/mm/)?r=r.replace("mm","(?<minutes>\\d{2})"):r.match(/m/)&&(r=r.replace("m","(?<minutes>\\d{1,2})")),r.match(/ss/)?r=r.replace("ss","(?<seconds>\\d{2})"):r.match(/s/)&&(r=r.replace("s","(?<seconds>\\d{1,2})")),r.match(/dd/)?r=r.replace("dd","(?<day>\\d{2})"):r.match(/d/)&&(r=r.replace("d","(?<day>\\d{1,2})")),r.match(/EEEE/)?r=r.replace("EEEE","(?<dayofweek>\\w+)"):r.match(/EEEE/)&&(r=r.replace("EEE","(?<dayofweek>\\w+)")),r.match(/yyyy/)?r=r.replace("yyyy","(?<year>\\d{4})"):r.match(/yy/)&&(r=r.replace("yy","(?<year>\\d{2})")),r.match(/MMMM/)?r=r.replace("MMMM","(?<monthname>\\w+)"):r.match(/MMM/)&&(r=r.replace("MMM","(?<monthnamesmall>\\w+)")),r.match(/MM/)?r=r.replace("MM","(?<month>\\d{2})"):r.match(/M/)&&(r=r.replace("M","(?<month>\\d{1,2})")),r=r.replace("S","(?<milis>\\d{1,3})").replace("aaa","(?<ampm>\\w{2})");const a=new RegExp(r,"g").exec(e);if(!a||!a.groups)return new Date(e);const o=function(e){if(!e)return 0;const t=parseInt(e);return isNaN(t)?0:t},i=o(a.groups.year),s=o(a.groups.day),c=a.groups.ampm;let u=o(a.groups.hour);c&&(u="PM"===c?u+12:u);const l=o(a.groups.minutes),d=o(a.groups.seconds),f=o(a.groups.milis),p=a.groups.monthname,y=a.groups.monthnamesmall;let h=a.groups.month;if(p)h=n.MONTH_NAMES.indexOf(p);else if(y){const t=n.MONTH_NAMES.find((e=>e.toLowerCase().startsWith(y.toLowerCase())));if(!t)return new Date(e);h=n.MONTH_NAMES.indexOf(t)}else h=o(`${h}`);return new Date(i,h-1,s,u,l,d,f)}function i(e,t){if(!e)return;const r=()=>u(e,t);return Object.defineProperty(e,"toISOString",{enumerable:!1,configurable:!1,value:r}),Object.defineProperty(e,"toString",{enumerable:!1,configurable:!1,value:r}),e}function s(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function c(e){return e<10?"0"+e:e.toString()}function u(e,t="yyyy/MM/dd"){const r=e.getDate(),a=e.getMonth(),o=e.getFullYear(),i=e.getHours(),s=e.getMinutes(),u=e.getSeconds(),l=e.getMilliseconds(),d=i%12,f=c(d),p=c(i),y=c(s),h=c(u),g=i<12?"AM":"PM",v=n.DAYS_OF_WEEK_NAMES[e.getDay()],_=v.substr(0,3),E=c(r),m=a+1,O=c(m),M=n.MONTH_NAMES[a],b=M.substr(0,3),R=o+"",S=R.substr(2,2);return(t=t.replace("hh",f).replace("h",d.toString()).replace("HH",p).replace("H",i.toString()).replace("mm",y).replace("m",s.toString()).replace("ss",h).replace("s",u.toString()).replace("S",l.toString()).replace("dd",E).replace("d",r.toString()).replace("EEEE",v).replace("EEE",_).replace("yyyy",R).replace("yy",S).replace("aaa",g)).indexOf("MMM")>-1?t.replace("MMMM",M).replace("MMM",b):t.replace("MM",O).replace("M",m.toString())}},687:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isEqual=function e(t,r,...n){if(t===r)return!0;if(t instanceof Date&&r instanceof Date)return t.getTime()===r.getTime();if(!t||!r||"object"!=typeof t&&"object"!=typeof r)return t===r;if(null==t||null==r)return!1;if(typeof t!=typeof r)return!1;if(t.prototype!==r.prototype)return!1;const a=Object.keys(t).filter((e=>-1===n.indexOf(e)));return a.length===Object.keys(r).filter((e=>-1===n.indexOf(e))).length&&a.every((a=>-1!==n.indexOf(a)||e(t[a],r[a],...n)))}},523:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hashCode=a,t.hashSerialization=function(e){return a(n.Model.serialize(e))},t.hashObj=function(e){const t=function(e,t){const r=n(t);return"string"==typeof r?n((e||"")+n(t)):0|(e=((e=e||0)<<5)-e+r)},r=a,n=function(e){return void 0===e?"":-1!==["string","number","symbol"].indexOf(typeof e)?r(e.toString()):e instanceof Date?r(e.getTime()):Array.isArray(e)?e.reduce(t,void 0):Object.values(e).reduce(t,void 0)},o=Object.values(e).reduce(t,0);return"number"==typeof o?Math.abs(o):o};const n=r(6);function a(e){e=String(e);let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}},935:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(154),t),a(r(46),t),a(r(687),t),a(r(523),t),a(r(735),t),a(r(904),t),a(r(735),t),a(r(593),t)},904:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},735:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JSONSerializer=void 0;const n=r(6),a=r(154);t.JSONSerializer=class{preSerialize(e){const t=Object.assign({},e);return t[a.ModelKeys.ANCHOR]=e[a.ModelKeys.ANCHOR],t}deserialize(e){const t=JSON.parse(e);return n.Model.build(t)}serialize(e){return JSON.stringify(this.preSerialize(e))}}},593:(e,t)=>{function r(e,...t){return e.replace(/{(\d+)}/g,(function(e,r){return void 0!==t[r]?t[r]:e}))}Object.defineProperty(t,"__esModule",{value:!0}),t.sf=void 0,t.stringFormat=r,t.sf=r},770:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validation=void 0;const n=r(436);class a{static{this.actingValidatorRegistry=void 0}constructor(){}static setRegistry(e,t){t&&a.actingValidatorRegistry&&a.actingValidatorRegistry.getKeys().forEach((r=>{const n=e.get(r);n&&e.register(t(n))})),a.actingValidatorRegistry=e}static getRegistry(){return a.actingValidatorRegistry||(a.actingValidatorRegistry=new n.ValidatorRegistry),a.actingValidatorRegistry}static get(e){return a.getRegistry().get(e)}static register(...e){return a.getRegistry().register(...e)}}t.Validation=a},395:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.DateValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.DATE){super(e,Number.name,Date.name,String.name)}hasErrors(e,t,r){if(void 0!==e)return"string"==typeof e&&(e=new Date(e)),isNaN(e.getDate())?this.getMessage(r||this.message):void 0}};t.DateValidator=c,t.DateValidator=c=n([(0,s.validator)(i.ValidationKeys.DATE),a("design:paramtypes",[String])],c)},335:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.EmailValidator=void 0;const o=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=o.DEFAULT_ERROR_MESSAGES.EMAIL){super(e)}hasErrors(e,t){return super.hasErrors(e,o.DEFAULT_PATTERNS.EMAIL,t)}};t.EmailValidator=c,t.EmailValidator=c=n([(0,s.validator)(o.ValidationKeys.EMAIL),a("design:paramtypes",[String])],c)},407:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.ListValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.LIST){super(e,Array.name,Set.name)}hasErrors(e,t,r){if(!e||(Array.isArray(e)?!e.length:!e.size))return;let n;for(let a=0;a<(Array.isArray(e)?e.length:e.size);a++)switch(n=e[a],typeof n){case"object":case"function":if(!n.constructor||n.constructor.name!==t)return this.getMessage(r||this.message,t);break;default:if(typeof n!==t)return this.getMessage(r||this.message,t)}}};t.ListValidator=c,t.ListValidator=c=n([(0,s.validator)(i.ValidationKeys.LIST),a("design:paramtypes",[String])],c)},169:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxLengthValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){super(e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length>t?this.getMessage(r||this.message,t):void 0}};t.MaxLengthValidator=c,t.MaxLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX_LENGTH),a("design:paramtypes",[String])],c)},909:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MaxValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MAX){super(e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Max param defined");return e>t?this.getMessage(r||this.message,t):void 0}}};t.MaxValidator=c,t.MaxValidator=c=n([(0,s.validator)(i.ValidationKeys.MAX),a("design:paramtypes",[String])],c)},519:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinLengthValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){super(e,String.name,Array.name)}hasErrors(e,t,r){if(void 0!==e)return e.length<t?this.getMessage(r||this.message,t):void 0}};t.MinLengthValidator=c,t.MinLengthValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN_LENGTH),a("design:paramtypes",[String])],c)},651:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.MinValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.MIN){super(e,"number","Date","string")}hasErrors(e,t,r){if(void 0!==e){if(e instanceof Date&&!(t instanceof Date)&&(t=new Date(t),isNaN(t.getDate())))throw new Error("Invalid Min param defined");return e<t?this.getMessage(r||this.message,t):void 0}}};t.MinValidator=c,t.MinValidator=c=n([(0,s.validator)(i.ValidationKeys.MIN),a("design:paramtypes",[String])],c)},354:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordValidator=void 0;const o=r(273),i=r(772),s=r(787);let c=class extends o.PatternValidator{constructor(e=i.DEFAULT_ERROR_MESSAGES.PASSWORD,t=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH){super(e),this.pattern=t}hasErrors(e,t,r){return super.hasErrors(e,t||this.pattern,r||this.message)}};t.PasswordValidator=c,t.PasswordValidator=c=n([(0,s.validator)(i.ValidationKeys.PASSWORD),a("design:paramtypes",[Object,RegExp])],c)},273:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.PatternValidator=t.regexpParser=void 0;const o=r(116),i=r(772),s=r(787);t.regexpParser=new RegExp("^/(.+)/([gimus]*)$");let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.PATTERN){super(e,"string")}getPattern(e){if(!t.regexpParser.test(e))return new RegExp(e);const r=e.match(t.regexpParser);return new RegExp(r[1],r[2])}hasErrors(e,t,r){if(e){if(!t)throw new Error("Missing Pattern");return(t="string"==typeof t?this.getPattern(t):t).lastIndex=0,t.test(e)?void 0:this.getMessage(r||this.message)}}};t.PatternValidator=c,t.PatternValidator=c=n([(0,s.validator)(i.ValidationKeys.PATTERN),a("design:paramtypes",[String])],c)},812:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){super(e)}hasErrors(e,t){switch(typeof e){case"boolean":case"number":return void 0===e?this.getMessage(t||this.message):void 0;default:return e?void 0:this.getMessage(t||this.message)}}};t.RequiredValidator=c,t.RequiredValidator=c=n([(0,s.validator)(i.ValidationKeys.REQUIRED),a("design:paramtypes",[String])],c)},553:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.StepValidator=void 0;const o=r(116),i=r(772),s=r(787);let c=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.STEP){super(e,"number","string")}hasErrors(e,t,r){if(void 0!==e)return Number(e)%Number(t)!=0?this.getMessage(r||this.message,t):void 0}};t.StepValidator=c,t.StepValidator=c=n([(0,s.validator)(i.ValidationKeys.STEP),a("design:paramtypes",[String])],c)},375:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.TypeValidator=void 0;const o=r(116),i=r(772),s=r(174),c=r(787),u=r(935),l=r(770);let d=class extends o.Validator{constructor(e=i.DEFAULT_ERROR_MESSAGES.TYPE){super(e)}hasErrors(e,t,r){if(void 0!==e)return(0,s.evaluateDesignTypes)(e,t)?void 0:this.getMessage(r||this.message,"string"==typeof t?t:Array.isArray(t)?t.join(", "):t.name,typeof e)}};t.TypeValidator=d,t.TypeValidator=d=n([(0,c.validator)(i.ValidationKeys.TYPE),a("design:paramtypes",[String])],d),l.Validation.register({validator:d,validationKey:u.ModelKeys.TYPE,save:!1})},964:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i},a=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.URLValidator=void 0;const o=r(772),i=r(273),s=r(787);let c=class extends i.PatternValidator{constructor(e=o.DEFAULT_ERROR_MESSAGES.URL){super(e)}hasErrors(e,t){return super.hasErrors(e,o.DEFAULT_PATTERNS.URL,t)}};t.URLValidator=c,t.URLValidator=c=n([(0,s.validator)(o.ValidationKeys.URL),a("design:paramtypes",[String])],c)},116:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=void 0;const n=r(772),a=r(593),o=r(174);t.Validator=class{constructor(e=n.DEFAULT_ERROR_MESSAGES.DEFAULT,...t){this.message=e,t.length&&(this.acceptedTypes=t),this.acceptedTypes&&(this.hasErrors=this.checkTypeAndHasErrors(this.hasErrors.bind(this)))}getMessage(e,...t){return(0,a.sf)(e,...t)}checkTypeAndHasErrors(e){return function(t,...r){return void 0!==t&&this.acceptedTypes?(0,o.checkTypes)(t,this.acceptedTypes)?e(t,...r):this.getMessage(n.DEFAULT_ERROR_MESSAGES.TYPE,this.acceptedTypes.join(", "),typeof t):e(t,...r)}.bind(this)}}},436:(e,t)=>{function r(e){return e.constructor&&e.hasErrors}Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorRegistry=void 0,t.isValidator=r,t.ValidatorRegistry=class{constructor(...e){this.cache={},this.customKeyCache={},this.register(...e)}getCustomKeys(){return Object.assign({},this.customKeyCache)}getKeys(){return Object.keys(this.cache)}get(e){if(!(e in this.cache))return;const t=this.cache[e];if(r(t))return t;const n=new(t.default||t);return this.cache[e]=n,n}register(...e){e.forEach((e=>{if(r(e)){if(e.validationKey in this.cache)return;this.cache[e.validationKey]=e}else{const{validationKey:t,validator:r,save:n}=e;if(t in this.cache)return;if(this.cache[t]=r,!n)return;const a={};a[t.toUpperCase()]=t,this.customKeyCache=Object.assign({},this.customKeyCache,a)}}))}}},772:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PATTERNS=t.DEFAULT_ERROR_MESSAGES=t.DAYS_OF_WEEK_NAMES=t.MONTH_NAMES=t.ValidationKeys=void 0,t.ValidationKeys={REFLECT:"model.validation.",VALIDATOR:"validator",REQUIRED:"required",MIN:"min",MAX:"max",STEP:"step",MIN_LENGTH:"minlength",MAX_LENGTH:"maxlength",PATTERN:"pattern",EMAIL:"email",URL:"url",DATE:"date",TYPE:"type",PASSWORD:"password",LIST:"list"},t.MONTH_NAMES=["January","February","March","April","May","June","July","August","September","October","November","December"],t.DAYS_OF_WEEK_NAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],t.DEFAULT_ERROR_MESSAGES={REQUIRED:"This field is required",MIN:"The minimum value is {0}",MAX:"The maximum value is {0}",MIN_LENGTH:"The minimum length is {0}",MAX_LENGTH:"The maximum length is {0}",PATTERN:"The value does not match the pattern",EMAIL:"The value is not a valid email",URL:"The value is not a valid URL",TYPE:"Invalid type. Expected {0}, received {1}",STEP:"Invalid value. Not a step of {0}",DATE:"Invalid value. not a valid Date",DEFAULT:"There is an Error",PASSWORD:"Must be at least 8 characters and contain one of number, lower and upper case letters, and special character (@$!%*?&_-.,)",LIST:"Invalid list of {0}",LIST_INSIDE:"Elements of list are invalid: {0}",MODEL_NOT_FOUND:"No model registered under {0}"},t.DEFAULT_PATTERNS={EMAIL:/[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/,URL:/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i,PASSWORD:{CHAR8_ONE_OF_EACH:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&_\-.,])[A-Za-z\d@$!%*?&_\-.,]{8,}$/g}}},787:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validator=function(...e){return(0,a.apply)((t=>(e.forEach((e=>{n.Validation.register({validator:t,validationKey:e,save:!0})})),t)),(0,a.metadata)((0,i.getValidationKey)(o.ValidationKeys.VALIDATOR),e))};const n=r(770),a=r(839),o=r(772),i=r(844)},493:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Validators=void 0;const o=r(395),i=r(375),s=r(354),c=r(553),u=r(964),l=r(273),d=r(651),f=r(519),p=r(909),y=r(169),h=r(812),g=r(335),v=r(407);a(r(772),t),a(r(395),t),a(r(787),t),a(r(335),t),a(r(407),t),a(r(169),t),a(r(909),t),a(r(519),t),a(r(651),t),a(r(354),t),a(r(273),t),a(r(812),t),a(r(553),t),a(r(168),t),a(r(375),t),a(r(964),t),a(r(116),t),a(r(436),t),t.Validators={EmailValidator:g.EmailValidator,RequiredValidator:h.RequiredValidator,MaxLengthValidator:y.MaxLengthValidator,MaxValidator:p.MaxValidator,MinLengthValidator:f.MinLengthValidator,MinValidator:d.MinValidator,PatternValidator:l.PatternValidator,URLValidator:u.URLValidator,StepValidator:c.StepValidator,DateValidator:o.DateValidator,TypeValidator:i.TypeValidator,PasswordValidator:s.PasswordValidator,ListValidator:v.ListValidator}},168:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},475:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.required=function(e=i.DEFAULT_ERROR_MESSAGES.REQUIRED){return(0,o.metadata)((0,l.getValidationKey)(i.ValidationKeys.REQUIRED),{message:e})},t.min=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN){return(0,o.metadata)((0,l.getValidationKey)(i.ValidationKeys.MIN),{value:e,message:t,types:[Number.name,Date.name]})},t.max=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX){return(0,o.metadata)((0,l.getValidationKey)(i.ValidationKeys.MAX),{value:e,message:t,types:[Number.name,Date.name]})},t.step=function(e,t=i.DEFAULT_ERROR_MESSAGES.STEP){return(0,o.metadata)((0,l.getValidationKey)(i.ValidationKeys.STEP),{value:e,message:t,types:[Number.name]})},t.minlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MIN_LENGTH){return(0,o.metadata)((0,l.getValidationKey)(i.ValidationKeys.MIN_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.maxlength=function(e,t=i.DEFAULT_ERROR_MESSAGES.MAX_LENGTH){return(0,o.metadata)((0,l.getValidationKey)(i.ValidationKeys.MAX_LENGTH),{value:e,message:t,types:[String.name,Array.name,Set.name]})},t.pattern=function(e,t=i.DEFAULT_ERROR_MESSAGES.PATTERN){return(0,o.metadata)((0,l.getValidationKey)(i.ValidationKeys.PATTERN),{value:"string"==typeof e?e:e.toString(),message:t,types:[String.name]})},t.email=function(e=i.DEFAULT_ERROR_MESSAGES.EMAIL){return(0,o.metadata)((0,l.getValidationKey)(i.ValidationKeys.EMAIL),{message:e,types:[String.name]})},t.url=function(e=i.DEFAULT_ERROR_MESSAGES.URL){return(0,o.metadata)((0,l.getValidationKey)(i.ValidationKeys.URL),{message:e,types:[String.name]})},t.type=d,t.date=function(e="dd/MM/yyyy",t=i.DEFAULT_ERROR_MESSAGES.DATE){return(r,n)=>{Reflect.defineMetadata((0,l.getValidationKey)(i.ValidationKeys.DATE),{format:e,message:t,types:[Date.name]},r,n);const a=new WeakMap;Object.defineProperty(r,n,{configurable:!1,set(t){const r=Object.getOwnPropertyDescriptor(this,n);r&&!r.configurable||Object.defineProperty(this,n,{enumerable:!0,configurable:!1,get:()=>a.get(this),set:t=>{let r;try{r=(0,u.parseDate)(e,t),a.set(this,r)}catch(e){console.error((0,s.sf)("Failed to parse date: {0}",e.message||e))}}}),this[n]=t},get(){console.log("here")}})}},t.password=function(e=i.DEFAULT_PATTERNS.PASSWORD.CHAR8_ONE_OF_EACH,t=i.DEFAULT_ERROR_MESSAGES.PASSWORD,r=c.PasswordValidator){return(n,o)=>{Reflect.defineMetadata((0,l.getValidationKey)(i.ValidationKeys.PASSWORD),{pattern:e,message:t,types:[String.name]},n,o),a.Validation.register({validator:r,validationKey:i.ValidationKeys.PASSWORD,save:!0})}},t.list=f,t.set=function(e,t=i.DEFAULT_ERROR_MESSAGES.LIST,r){return(n,a)=>{f(e,"Set",t,r)(n,a)}},r(630);const n=r(407),a=r(770),o=r(501),i=r(772),s=r(593),c=r(354),u=r(935),l=r(844);function d(e,t=i.DEFAULT_ERROR_MESSAGES.TYPE){return(0,o.metadata)((0,l.getValidationKey)(i.ValidationKeys.TYPE),{customTypes:e,message:t})}function f(e,t="Array",r=i.DEFAULT_ERROR_MESSAGES.LIST,o=n.ListValidator){return(n,s)=>{d(t)(n,s),Reflect.defineMetadata((0,l.getValidationKey)(i.ValidationKeys.LIST),{class:e.name,type:t,message:r},n,s),a.Validation.register({validator:o,validationKey:i.ValidationKeys.LIST,save:!0})}}},965:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(493),t),a(r(475),t),a(r(792),t),a(r(844),t),a(r(770),t)},792:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},844:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getValidationKey=function(e){return n.ValidationKeys.REFLECT+e};const n=r(772)},630:(e,t,r)=>{var n;!function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),n=a(e);function a(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0!==t.Reflect&&(n=a(t.Reflect,n)),function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,a=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",i="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!i&&!s,u={create:i?function(){return H(Object.create(null))}:s?function(){return H({__proto__:null})}:function(){return H({})},has:c?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),d="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[o]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,a=r+1;a<n;a++)this._keys[a-1]=this._keys[a],this._values[a-1]=this._values[a];return this._keys.length--,this._values.length--,K(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,a)},t.prototype.entries=function(){return new r(this._keys,this._values,i)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[o]=function(){return this.entries()},t.prototype._find=function(e,t){if(!K(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(K(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function a(e,t){return t}function i(e,t){return[e,t]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new d}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[o]=function(){return this.keys()},e}(),p="function"==typeof WeakMap?WeakMap:function(){var e=u.create(),t=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=a(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=a(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return a(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=a(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+i()}while(u.has(e,t));return e[t]=!0,t}function a(e,n){if(!r.call(e,t)){if(!n)return;Object.defineProperty(e,t,{value:u.create()})}return e[t]}function o(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function i(){var e=function(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):o(t,e),t}return o(new Array(e),e)}(16);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",r=0;r<16;++r){var n=e[r];4!==r&&6!==r&&8!==r||(t+="-"),n<16&&(t+="0"),t+=n.toString(16).toLowerCase()}return t}}(),y=n?Symbol.for("@reflect-metadata:registry"):void 0,h=function(){var e;return!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[y]),S(e)&&(e=function(){var e,r,n,a;S(y)||void 0===t.Reflect||y in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=function(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,a=e.getOwnMetadataKeys,o=e.deleteMetadata,i=new p;return{isProviderFor:function(e,t){var r=i.get(e);return!(S(r)||!r.has(t))||!!a(e,t).length&&(S(r)&&(r=new f,i.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:a,OrdinaryDeleteMetadata:o}}(t.Reflect));var o=new p,i={registerProvider:s,getProvider:u,setProvider:h};return i;function s(t){if(!Object.isExtensible(i))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case S(r):r=t;break;case r===t:break;case S(n):n=t;break;case n===t:break;default:void 0===a&&(a=new f),a.add(t)}}function c(t,o){if(!S(r)){if(r.isProviderFor(t,o))return r;if(!S(n)){if(n.isProviderFor(t,o))return r;if(!S(a))for(var i=x(a);;){var s=k(i);if(!s)return;var c=F(s);if(c.isProviderFor(t,o))return I(i),c}}}if(!S(e)&&e.isProviderFor(t,o))return e}function u(e,t){var r,n=o.get(e);return S(n)||(r=n.get(t)),S(r)?(S(r=c(e,t))||(S(n)&&(n=new d,o.set(e,n)),n.set(t,r)),r):r}function l(e){if(S(e))throw new TypeError;return r===e||n===e||!S(a)&&a.has(e)}function h(e,t,r){if(!l(r))throw new Error("Metadata provider not registered.");var n=u(e,t);if(n!==r){if(!S(n))return!1;var a=o.get(e);S(a)&&(a=new d,o.set(e,a)),a.set(t,r)}return!0}}()),!S(y)&&P(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,y,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}(),g=function(e){var t=new p,r={isProviderFor:function(e,r){var n=t.get(e);return!S(n)&&n.has(r)},OrdinaryDefineOwnMetadata:function(e,t,r,a){n(r,a,!0).set(e,t)},OrdinaryHasOwnMetadata:function(e,t,r){var a=n(t,r,!1);return!S(a)&&A(a.has(e))},OrdinaryGetOwnMetadata:function(e,t,r){var a=n(t,r,!1);if(!S(a))return a.get(e)},OrdinaryOwnMetadataKeys:function(e,t){var r=[],a=n(e,t,!1);if(S(a))return r;for(var o=x(a.keys()),i=0;;){var s=k(o);if(!s)return r.length=i,r;var c=F(s);try{r[i]=c}catch(e){try{I(o)}finally{throw e}}i++}},OrdinaryDeleteMetadata:function(e,r,a){var o=n(r,a,!1);if(S(o))return!1;if(!o.delete(e))return!1;if(0===o.size){var i=t.get(r);S(i)||(i.delete(a),0===i.size&&t.delete(i))}return!0}};return h.registerProvider(r),r;function n(n,a,o){var i=t.get(n),s=!1;if(S(i)){if(!o)return;i=new d,t.set(n,i),s=!0}var c=i.get(a);if(S(c)){if(!o)return;if(c=new d,i.set(a,c),!e.setProvider(n,a,r))throw i.delete(a),s&&t.delete(n),new Error("Wrong provider for target.")}return c}}(h);function v(e,t,r){if(_(e,t,r))return!0;var n=U(t);return!w(n)&&v(e,n,r)}function _(e,t,r){var n=G(t,r,!1);return!S(n)&&A(n.OrdinaryHasOwnMetadata(e,t,r))}function E(e,t,r){if(_(e,t,r))return m(e,t,r);var n=U(t);return w(n)?void 0:E(e,n,r)}function m(e,t,r){var n=G(t,r,!1);if(!S(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function O(e,t,r,n){G(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function M(e,t){var r=b(e,t),n=U(e);if(null===n)return r;var a=M(n,t);if(a.length<=0)return r;if(r.length<=0)return a;for(var o=new f,i=[],s=0,c=r;s<c.length;s++){var u=c[s];o.has(u)||(o.add(u),i.push(u))}for(var l=0,d=a;l<d.length;l++)u=d[l],o.has(u)||(o.add(u),i.push(u));return i}function b(e,t){var r=G(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function S(e){return void 0===e}function w(e){return null===e}function P(e){return"object"==typeof e?null!==e:"function"==typeof e}function T(e,t){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=N(e,a);if(void 0!==n){var o=n.call(e,r);if(P(o))throw new TypeError;return o}return function(e,t){if("string"===t){var r=e.toString;if(D(r)&&!P(a=r.call(e)))return a;if(D(n=e.valueOf)&&!P(a=n.call(e)))return a}else{var n;if(D(n=e.valueOf)&&!P(a=n.call(e)))return a;var a,o=e.toString;if(D(o)&&!P(a=o.call(e)))return a}throw new TypeError}(e,"default"===r?"number":r)}function A(e){return!!e}function j(e){var t=T(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function V(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function D(e){return"function"==typeof e}function L(e){return"function"==typeof e}function K(e,t){return e===t||e!=e&&t!=t}function N(e,t){var r=e[t];if(null!=r){if(!D(r))throw new TypeError;return r}}function x(e){var t=N(e,o);if(!D(t))throw new TypeError;var r=t.call(e);if(!P(r))throw new TypeError;return r}function F(e){return e.value}function k(e){var t=e.next();return!t.done&&t}function I(e){var t=e.return;t&&t.call(e)}function U(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===l)return t;if(t!==l)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var a=n.constructor;return"function"!=typeof a||a===e?t:a}function G(e,t,r){var n=h.getProvider(e,t);if(!S(n))return n;if(r){if(h.setProvider(e,t,g))return g;throw new Error("Illegal state.")}}function H(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(S(r)){if(!V(e))throw new TypeError;if(!L(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!S(n)&&!w(n)){if(!L(n))throw new TypeError;t=n}}return t}(e,t)}if(!V(e))throw new TypeError;if(!P(t))throw new TypeError;if(!P(n)&&!S(n)&&!w(n))throw new TypeError;return w(n)&&(n=void 0),function(e,t,r,n){for(var a=e.length-1;a>=0;--a){var o=(0,e[a])(t,r,n);if(!S(o)&&!w(o)){if(!P(o))throw new TypeError;n=o}}return n}(e,t,r=j(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!P(r))throw new TypeError;if(!S(n)&&!function(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;O(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!P(r))throw new TypeError;return S(n)||(n=j(n)),O(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),v(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),_(e,t,r)})),e("getMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),E(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!P(t))throw new TypeError;return S(r)||(r=j(r)),m(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),M(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!P(e))throw new TypeError;return S(t)||(t=j(t)),b(e,t)})),e("deleteMetadata",(function(e,t,r){if(!P(t))throw new TypeError;if(S(r)||(r=j(r)),!P(t))throw new TypeError;S(r)||(r=j(r));var n=G(t,r,!1);return!S(n)&&n.OrdinaryDeleteMetadata(e,t,r)}))}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(n||(n={}))}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(729);
@@ -63,4 +63,4 @@ export * from "./utils";
63
63
  export * from "./reflection";
64
64
  export * from "./validation";
65
65
  export * from "./model";
66
- export declare const VERSION = "1.0.22";
66
+ export declare const VERSION = "1.0.23";
package/lib/esm/index.js CHANGED
@@ -63,6 +63,6 @@ export * from "./utils";
63
63
  export * from "./reflection";
64
64
  export * from "./validation";
65
65
  export * from "./model";
66
- export const VERSION = "1.0.22";
66
+ export const VERSION = "1.0.23";
67
67
 
68
- //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVIOzs7O0dBSUc7QUFFSDs7OztHQUlHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUgsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxTQUFTLENBQUM7QUFFeEIsTUFBTSxDQUFDLE1BQU0sT0FBTyxHQUFHLFFBQVEsQ0FBQyIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQG1vZHVsZSBkZWNvcmF0b3ItdmFsaWRhdGlvblxuICovXG5cbi8qKlxuICogQHN1bW1hcnkgRGVmaW5lcyB0aGUgTW9kZWwgb2JqZWN0XG4gKiBAbmFtZXNwYWNlIE1vZGVsXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAc3VtbWFyeSBIb2xkcyBhbGwgdGhlIHN1cHBvcnRlZCBkZWNvcmF0b3JzXG4gKiBAbmFtZXNwYWNlIERlY29yYXRvcnNcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb25cbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgVmFsaWRhdGlvblxuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5EZWNvcmF0b3JzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIE1vZGVsXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLkRlY29yYXRvcnNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgUmVmbGVjdGlvbnNcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uUmVmbGVjdGlvbnNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgQ29uc3RydWN0aW9uXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIFZhbGlkYXRpb25cbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb25cbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgVmFsaWRhdG9yc1xuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5WYWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIFV0aWxzXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIERhdGVzXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLlV0aWxzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIEVxdWFsaXR5XG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLlV0aWxzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIEhhc2hpbmdcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uVXRpbHNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgU2VyaWFsaXphdGlvblxuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5VdGlsc1xuICovXG5cbi8qKlxuICogQG5hbWVzcGFjZSBGb3JtYXRcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uVXRpbHNcbiAqL1xuXG5leHBvcnQgKiBmcm9tIFwiLi91dGlsc1wiO1xuZXhwb3J0ICogZnJvbSBcIi4vcmVmbGVjdGlvblwiO1xuZXhwb3J0ICogZnJvbSBcIi4vdmFsaWRhdGlvblwiO1xuZXhwb3J0ICogZnJvbSBcIi4vbW9kZWxcIjtcblxuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBcIjEuMC4yMlwiO1xuIl19
68
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVIOzs7O0dBSUc7QUFFSDs7OztHQUlHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUg7OztHQUdHO0FBRUgsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxTQUFTLENBQUM7QUFFeEIsTUFBTSxDQUFDLE1BQU0sT0FBTyxHQUFHLFFBQVEsQ0FBQyIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQG1vZHVsZSBkZWNvcmF0b3ItdmFsaWRhdGlvblxuICovXG5cbi8qKlxuICogQHN1bW1hcnkgRGVmaW5lcyB0aGUgTW9kZWwgb2JqZWN0XG4gKiBAbmFtZXNwYWNlIE1vZGVsXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAc3VtbWFyeSBIb2xkcyBhbGwgdGhlIHN1cHBvcnRlZCBkZWNvcmF0b3JzXG4gKiBAbmFtZXNwYWNlIERlY29yYXRvcnNcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb25cbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgVmFsaWRhdGlvblxuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5EZWNvcmF0b3JzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIE1vZGVsXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLkRlY29yYXRvcnNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgUmVmbGVjdGlvbnNcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uUmVmbGVjdGlvbnNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgQ29uc3RydWN0aW9uXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIFZhbGlkYXRpb25cbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb25cbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgVmFsaWRhdG9yc1xuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5WYWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIFV0aWxzXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIERhdGVzXG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLlV0aWxzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIEVxdWFsaXR5XG4gKiBAbWVtYmVyT2YgbW9kdWxlOmRlY29yYXRvci12YWxpZGF0aW9uLlV0aWxzXG4gKi9cblxuLyoqXG4gKiBAbmFtZXNwYWNlIEhhc2hpbmdcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uVXRpbHNcbiAqL1xuXG4vKipcbiAqIEBuYW1lc3BhY2UgU2VyaWFsaXphdGlvblxuICogQG1lbWJlck9mIG1vZHVsZTpkZWNvcmF0b3ItdmFsaWRhdGlvbi5VdGlsc1xuICovXG5cbi8qKlxuICogQG5hbWVzcGFjZSBGb3JtYXRcbiAqIEBtZW1iZXJPZiBtb2R1bGU6ZGVjb3JhdG9yLXZhbGlkYXRpb24uVXRpbHNcbiAqL1xuXG5leHBvcnQgKiBmcm9tIFwiLi91dGlsc1wiO1xuZXhwb3J0ICogZnJvbSBcIi4vcmVmbGVjdGlvblwiO1xuZXhwb3J0ICogZnJvbSBcIi4vdmFsaWRhdGlvblwiO1xuZXhwb3J0ICogZnJvbSBcIi4vbW9kZWxcIjtcblxuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBcIjEuMC4yM1wiO1xuIl19