/*! * @license * itsa 2.1.189 * Copyright 2023 Josh Wright * MIT LICENSE */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ItsaLib=t():e.ItsaLib=t()}(this,(function(){return(()=>{"use strict";var e={44:(e,t,r)=>{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{function n(e,t){for(var r=0;r{function n(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{function n(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{},n=r;return n.min=e,n.max=t,this.predicates.push({id:"between",settings:n}),this}}])&&n(t.prototype,r),i&&n(t,i),e}();t.ItsaBetween=a,i.Itsa.extend(a,{id:"between",validate:function(e,t){var r,n=e.val,i=e.result,a=t.min,o=t.max,u=null===(r=t.inclusive)||void 0===r||r;(u?no:n>=o)&&i.registerError("Value cannot be above ".concat(o),n)}})},233:(e,t,r)=>{function n(e,t){for(var r=0;r{function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{var n;function i(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return t.val=e,this.predicates.push({id:"default",settings:t}),this}},{key:"defaultNow",value:function(){return this.predicates.push({id:"defaultNow",settings:null}),this}}])&&i(t.prototype,r),n&&i(t,n),e}();t.ItsaDefault=o,(n=a.Itsa).extend.apply(n,[o].concat([{id:"default",builder:function(e){return e.val},validate:function(e,t){var r,n=e.val,i=e.setVal;(null!==(r=t.falsy)&&void 0!==r&&r?!n:null==n)&&i(t.val)}},{id:"defaultNow",builder:function(e){return new Date},validate:function(e){var t=e.val,r=e.setVal;null==t&&r(new Date)}}]))},609:(e,t,r)=>{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return t.example=e,this.predicates.push({id:"equal",settings:t}),this}}])&&n(t.prototype,r),i&&n(t,i),e}();t.ItsaEqual=a,i.Itsa.extend(a,{id:"equal",validate:function(e,t){var r,n=e.val,i=e.result,a=t.example;(null===(r=t.strict)||void 0===r||r?n===a:n==a)||i.registerError("Did not equal ".concat(a),n)}})},229:(e,t,r)=>{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};return e.length&&(e.length=a.primitiveToItsa(e.length)),this.predicates.push({id:"function",settings:e}),this}}])&&n(t.prototype,r),i&&n(t,i),e}();t.ItsaFunction=o,i.Itsa.extend(o,{id:"function",validate:function(e,t){var r=e.val,n=e.type,i=e.result;if("function"!==n)return i.registerError("Expected function",r);if(t.length){var a=t.length._validate({key:"length",parent:null,val:r.length,exists:!0,settings:e.validation,path:e.path});i.registerResult(a)}}})},164:(e,t,r)=>{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{Object.defineProperty(t,"__esModule",{value:!0}),t.primitiveToItsa=void 0;var n=r(589);t.primitiveToItsa=function(e){return e instanceof n.Itsa?e:"function"==typeof e?n.itsa.constructorIs(e):n.itsa.equal(e)}},593:(e,t,r)=>{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&(e=o.join(JSON.stringify(t)))}else a&&(e="".concat(a,": ").concat(e));i.addError({message:e,key:this.key,path:this.path}),this.addResult(i)}},{key:"registerResult",value:function(e){if(this.addResult(e),!this.exhaustive&&this.errors.length)throw"STOP_ON_FIRST_ERROR"}},{key:"withMessageFormat",value:function(e){return this.messageFormat=e,this}}]),r}(w);t.ItsaValidationResultBuilder=j;var I=function(){function e(){l(this,e),this._isOptional=!1,this.predicates=[]}return u(e,null,[{key:"extend",value:function(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o{function n(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw a}}}}function a(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("fields parameter is required");var r=this.clone();return s(r,e,t),r}}])&&n(t.prototype,r),i&&n(t,i),e}();t.ItsaKeep=c,l.Itsa.extend(c)},206:(e,t,r)=>{function n(e,t){for(var r=0;ri?n.registerError("Expected length to be at least ".concat(t.min),r):"number"==typeof t.max&&t.max{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r{Object.defineProperty(t,"__esModule",{value:!0});var n=r(589);n.Itsa.prototype.message=n.Itsa.prototype.msg=function(e){var t=this.predicates[this.predicates.length-1];return t.settings=t.settings||{},t.settings._message=e,this}},442:(e,t,r)=>{function n(e,t){for(var r=0;r=i||n.registerError("Value must be at least ".concat(i),r):r>i||n.registerError("Value must be greater than ".concat(i),r)}})},42:(e,t,r)=>{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=null;if(e)for(var n in r={},e)r[n]=s.primitiveToItsa(e[n]);t.key&&(t.key=s.primitiveToItsa(t.key)),t.value&&(t.value=s.primitiveToItsa(t.value));var i={example:r,config:t};return this.predicates.push({id:"object",settings:i}),this}},{key:"addProperty",value:function(e,t){for(var r=this.predicates.length-1;r>=0;r--){var n=this.predicates[r];if("object"===n.id){n.settings||(n.settings={}),n.settings.example||(n.settings.example={}),n.settings.config||(n.settings.config={}),n.settings.example[e]=s.primitiveToItsa(t);break}}return this}}])&&u(t.prototype,r),n&&u(t,n),e}();t.ItsaObject=c,l.Itsa.extend(c,{id:"object",builder:function(e){var t={},r=e.example;if(r)for(var n=0,i=Object.keys(r);n{function n(e,t){for(var r=0;r{function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1){var j=w.map((function(t){return t.toOpenApiSchema(i(i({},e),{},{isRoot:!1}))})),I=j[0].type,O=!j.find((function(e){return e.type!==I})),x=!j.find((function(e){return!("const"in e)}));return O&&x&&["string","number","integer"].includes(I)?{type:I}:{oneOf:w.map((function(t){return t.toOpenApiSchema(i(i({},e),{},{isRoot:!1}))}))}}}return u.anything?null:void 0}();if(!v)return v;if(u.notEmpty&&(v.minLength=1),u.length){var y,p=(null===(y=u.length)||void 0===y?void 0:y.settings)||{},d=p.exactly,h=p.min,b=p.max;"number"==typeof h&&(v.minLength=h),"number"==typeof b&&(v.maxLength=b),"number"==typeof d&&(v.minLength=d,v.maxLength=d)}if(u.between){var m,g=u.between.settings,w=g.min,j=g.max;null===(m=u.between.settings.inclusive)||void 0===m||m?(v.minimum=w,v.maximum=j):(v.exclusiveMinimum=w,v.exclusiveMaximum=j)}if(u.min){var I,O=u.min.settings.min;null===(I=u.min.settings.inclusive)||void 0===I||I?v.minimum=O:v.exclusiveMinimum=O}if(u.max){var x,E=u.max.settings.max;null===(x=u.max.settings.inclusive)||void 0===x||x?v.maximum=E:v.exclusiveMaximum=E}if(u.equal&&(v.const=u.equal.settings.example),u.any){var k,S,_=((null===(k=u.any)||void 0===k||null===(S=k.settings)||void 0===S?void 0:S.schemas)||[]).map((function(t){return t.toOpenApiSchema(i(i({},e),{},{isRoot:!1}))})),A=_[0].type,P=!_.find((function(e){return e.type!==A})),T=!_.find((function(e){return!("const"in e)}));P&&T&&["string","number","integer"].includes(A)&&(v.enum=_.map((function(e){return e.const})))}var C,M=o(l);try{for(M.s();!(C=M.n()).done;){var R=C.value;if("schema"===R.id&&R.settings){for(var N=0,V=Object.keys(R.settings);N{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{function n(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw a}}}}function o(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r{function n(e,t){for(var r=0;r{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{function n(e,t){for(var r=0;r{function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r{function n(e,t){for(var r=0;r{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,o=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{};return this._validate({val:e,settings:t,key:null,parent:null,exists:!0,path:[]})}},{key:"validOrThrow",value:function(e,t){this.validate(e,t).okOrThrow()}}])&&o(t.prototype,r),i&&o(t,i),e}();u.Itsa.extend(l)},446:(e,t,r)=>{function n(e,t){for(var r=0;r