function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function i(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function a(e){return((t=e)!=null&&typeof t==`object`&&!1===Array.isArray(t))==1&&Object.prototype.toString.call(e)===`[object Object]`;var t}var o=Object.prototype,s=o.toString,c=o.hasOwnProperty,l=/^\s*function (\w+)/;function u(e){var t=e?.type??e;if(t){var n=t.toString().match(l);return n?n[1]:``}return``}var d=function(e){var t,n;return!1!==a(e)&&typeof(t=e.constructor)==`function`&&!1!==a(n=t.prototype)&&!1!==n.hasOwnProperty(`isPrototypeOf`)},f=function(e){return e},p=function(e,t){return c.call(e,t)},m=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e},h=Array.isArray||function(e){return s.call(e)===`[object Array]`},g=function(e){return s.call(e)===`[object Function]`},_=function(e){return d(e)&&p(e,`_vueTypes_name`)},v=function(e){return d(e)&&(p(e,`type`)||[`_vueTypes_name`,`validator`,`default`,`required`].some(function(t){return p(e,t)}))};function y(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function b(e,t,n){var r;n===void 0&&(n=!1);var i=!0,a=``;r=d(e)?e:{type:e};var o=_(r)?r._vueTypes_name+` - `:``;if(v(r)&&r.type!==null){if(r.type===void 0||!0===r.type||!r.required&&t===void 0)return i;h(r.type)?(i=r.type.some(function(e){return!0===b(e,t,!0)}),a=r.type.map(function(e){return u(e)}).join(` or `)):i=(a=u(r))===`Array`?h(t):a===`Object`?d(t):a===`String`||a===`Number`||a===`Boolean`||a===`Function`?function(e){if(e==null)return``;var t=e.constructor.toString().match(l);return t?t[1]:``}(t)===a:t instanceof r.type}if(!i){var s=o+`value "`+t+`" should be of type "`+a+`"`;return!1===n?(f(s),!1):s}if(p(r,`validator`)&&g(r.validator)){var c=f,m=[];if(f=function(e){m.push(e)},i=r.validator(t),f=c,!i){var y=(m.length>1?`* `:``)+m.join(`
* `);return m.length=0,!1===n?(f(y),i):y}}return i}function x(e,t){var n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(e){return e!==void 0||this.default?g(e)||!0===b(this,e,!0)?(this.default=h(e)?function(){return[].concat(e)}:d(e)?function(){return Object.assign({},e)}:e,this):(f(this._vueTypes_name+` - invalid default value: "`+e+`"`),this):this}}}),r=n.validator;return g(r)&&(n.validator=y(r,n)),n}function S(e,t){var n=x(e,t);return Object.defineProperty(n,"validate",{value:function(e){return g(this.validator)&&f(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info:
`+JSON.stringify(this)),this.validator=y(e,this),this}})}function C(e,t,n){var r,a,o=(r=t,a={},Object.getOwnPropertyNames(r).forEach(function(e){a[e]=Object.getOwnPropertyDescriptor(r,e)}),Object.defineProperties({},a));if(o._vueTypes_name=e,!d(n))return o;var s,c=n.validator,l=i(n,[`validator`]);if(g(c)){var u=o.validator;u&&(u=(s=u).__original??s),o.validator=y(u?function(e){return u.call(this,e)&&c.call(this,e)}:c,o)}return Object.assign(o,l)}function w(e){return e.replace(/^(?!\s*$)/gm,`  `)}var T=function(){return S(`any`,{})},E=function(){return S(`function`,{type:Function})},D=function(){return S(`boolean`,{type:Boolean})},O=function(){return S(`string`,{type:String})},k=function(){return S(`number`,{type:Number})},A=function(){return S(`array`,{type:Array})},j=function(){return S(`object`,{type:Object})},M=function(){return x(`integer`,{type:Number,validator:function(e){return m(e)}})},N=function(){return x(`symbol`,{validator:function(e){return typeof e==`symbol`}})};function P(e,t){if(t===void 0&&(t=`custom validation failed`),typeof e!=`function`)throw TypeError(`[VueTypes error]: You must provide a function as argument`);return x(e.name||`<<anonymous function>>`,{validator:function(n){var r=e(n);return r||f(this._vueTypes_name+` - `+t),r}})}function F(e){if(!h(e))throw TypeError(`[VueTypes error]: You must provide an array as argument.`);var t=`oneOf - value should be one of "`+e.join(`", "`)+`".`,n=e.reduce(function(e,t){if(t!=null){var n=t.constructor;e.indexOf(n)===-1&&e.push(n)}return e},[]);return x(`oneOf`,{type:n.length>0?n:void 0,validator:function(n){var r=e.indexOf(n)!==-1;return r||f(t),r}})}function I(e){if(!h(e))throw TypeError(`[VueTypes error]: You must provide an array as argument`);for(var t=!1,n=[],r=0;r<e.length;r+=1){var i=e[r];if(v(i)){if(_(i)&&i._vueTypes_name===`oneOf`){n=n.concat(i.type);continue}if(g(i.validator)&&(t=!0),!0!==i.type&&i.type){n=n.concat(i.type);continue}}n.push(i)}return n=n.filter(function(e,t){return n.indexOf(e)===t}),x(`oneOfType`,t?{type:n,validator:function(t){var n=[],r=e.some(function(e){var r=b(_(e)&&e._vueTypes_name===`oneOf`?e.type||null:e,t,!0);return typeof r==`string`&&n.push(r),!0===r});return r||f(`oneOfType - provided value does not match any of the `+n.length+` passed-in validators:
`+w(n.join(`
`))),r}}:{type:n})}function L(e){return x(`arrayOf`,{type:Array,validator:function(t){var n,r=t.every(function(t){return!0===(n=b(e,t,!0))});return r||f(`arrayOf - value validation error:
`+w(n)),r}})}function R(e){return x(`instanceOf`,{type:e})}function z(e){return x(`objectOf`,{type:Object,validator:function(t){var n,r=Object.keys(t).every(function(r){return!0===(n=b(e,t[r],!0))});return r||f(`objectOf - value validation error:
`+w(n)),r}})}function B(e){var t=Object.keys(e),n=t.filter(function(t){return!!e[t]?.required}),r=x(`shape`,{type:Object,validator:function(r){var i=this;if(!d(r))return!1;var a=Object.keys(r);if(n.length>0&&n.some(function(e){return a.indexOf(e)===-1})){var o=n.filter(function(e){return a.indexOf(e)===-1});return f(o.length===1?`shape - required property "`+o[0]+`" is not defined.`:`shape - required properties "`+o.join(`", "`)+`" are not defined.`),!1}return a.every(function(n){if(t.indexOf(n)===-1)return!0===i._vueTypes_isLoose||(f(`shape - shape definition does not include a "`+n+`" property. Allowed keys: "`+t.join(`", "`)+`".`),!1);var a=b(e[n],r[n],!0);return typeof a==`string`&&f(`shape - "`+n+`" property validation error:
 `+w(a)),!0===a})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),r}var V=function(){function e(){}return e.extend=function(e){var t=this;if(h(e))return e.forEach(function(e){return t.extend(e)}),this;var n=e.name,r=e.validate,a=r!==void 0&&r,o=e.getter,s=o!==void 0&&o,c=i(e,[`name`,`validate`,`getter`]);if(p(this,n))throw TypeError(`[VueTypes error]: Type "`+n+`" already defined`);var l,u=c.type;return _(u)?(delete c.type,Object.defineProperty(this,n,s?{get:function(){return C(n,u,c)}}:{value:function(){var e,t=C(n,u,c);return t.validator&&(t.validator=(e=t.validator).bind.apply(e,[t].concat([].slice.call(arguments)))),t}})):(l=s?{get:function(){var e=Object.assign({},c);return a?S(n,e):x(n,e)},enumerable:!0}:{value:function(){var e,t,r=Object.assign({},c);return e=a?S(n,r):x(n,r),r.validator&&(e.validator=(t=r.validator).bind.apply(t,[e].concat([].slice.call(arguments)))),e},enumerable:!0},Object.defineProperty(this,n,l))},t(e,null,[{key:`any`,get:function(){return T()}},{key:`func`,get:function(){return E().def(this.defaults.func)}},{key:`bool`,get:function(){return D().def(this.defaults.bool)}},{key:`string`,get:function(){return O().def(this.defaults.string)}},{key:`number`,get:function(){return k().def(this.defaults.number)}},{key:`array`,get:function(){return A().def(this.defaults.array)}},{key:`object`,get:function(){return j().def(this.defaults.object)}},{key:`integer`,get:function(){return M().def(this.defaults.integer)}},{key:`symbol`,get:function(){return N()}}]),e}();function H(e){var i;return e===void 0&&(e={func:function(){},bool:!0,string:``,number:0,array:function(){return[]},object:function(){return{}},integer:0}),(i=function(i){function a(){return i.apply(this,arguments)||this}return r(a,i),t(a,null,[{key:`sensibleDefaults`,get:function(){return n({},this.defaults)},set:function(t){this.defaults=!1===t?{}:n({},!0===t?e:t)}}]),a}(V)).defaults=n({},e),i}V.defaults={},V.custom=P,V.oneOf=F,V.instanceOf=R,V.oneOfType=I,V.arrayOf=L,V.objectOf=z,V.shape=B,V.utils={validate:function(e,t){return!0===b(t,e,!0)},toType:function(e,t,n){return n===void 0&&(n=!1),n?S(e,t):x(e,t)}},function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(H()),exports.any=T,exports.array=A,exports.arrayOf=L,exports.bool=D,exports.createTypes=H,exports.custom=P,exports.fromType=C,exports.func=E,exports.instanceOf=R,exports.integer=M,exports.number=k,exports.object=j,exports.objectOf=z,exports.oneOf=F,exports.oneOfType=I,exports.shape=B,exports.string=O,exports.symbol=N,exports.toType=x,exports.toValidableType=S,exports.validateType=b;