!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define("$validator",[],t):"object"===typeof exports?exports.$validator=t():e.$validator=t()}("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s="rp5t")}({Y0i2:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===typeof window&&(n=window)}e.exports=n},g8md:function(e,t,n){"use strict";(function(e){t.a=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=null;"undefined"!==typeof window?i=window.Vue:"undefined"!==typeof e&&(i=e.Vue),i&&("directive"===n?i.directive(t.name,t):i.use(t))}}).call(this,n("Y0i2"))},rp5t:function(e,t,n){"use strict";n.r(t);var i=n("g8md");const a=/(?:^\[object\s(.*?)\]$)/;var o=e=>Object.prototype.toString.call(e).replace(a,"$1").toLowerCase();const r={required:{validate:e=>e&&e.length>0,message:"%s is required"}};let s=[];class l{clear(){s=[]}get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?s.find((t=>{let{key:n}=t;return n===e})):s}set(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(e))s=e;else{const n=s.findIndex((t=>{let{key:n}=t;return n===e}));~n?s[n]=Object.assign({},t):s=[Object.assign({key:e},t)]}}}function d(e,t){console.warn("[$validator]","The '".concat(e,"' has been deprecated. Use the '").concat(t,"' instead"))}const c={install(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign({},r,t);e.prototype.$resetValidations=()=>d("$resetValidations","$validations.clear"),e.prototype.$setValidations=()=>d("$setValidations","$validations.set"),e.prototype.$validations=new l,e.prototype.$validate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i={valid:!0,validFields:[],invalidFields:[],messages:[],message:"",validMsg:{}},a=s.length?s:this.validations||this.$options.validations||[];if(!Array.isArray(a))throw new Error("[$validator]: validations must be an array in 8.50.0");for(let r=0,s=a.length;r<s;r++){const s=a[r],{key:l,label:d,validator:c}=s,u=l;if(!t.length||t.includes(u)){const t=d||u,a=c.split(",").map((e=>e.trim()));let r=!0;for(let l=0,d=a.length;l<d;l++){let d=a[l],c=s[d],f="object"===o(c)?c:n[d];if(f&&"function"===o(f.validate)){let n=[e[u],e];if(!f.validate.apply(this,n)){r=!1;let e="";switch(o(f.message)){case"string":e=f.message.replace("%s",t);break;case"function":e=f.message.apply(this,n);break;default:console.warn("[$validator]","'".concat(u,".message' must be a string or function"))}e&&i.messages.push(e);break}}else console.warn("[$validator]","The field '".concat(u,"' is missing a validation rule: '").concat(d,"'"))}r?i.validFields.push(u):i.invalidFields.push(u)}}return i.messages.length&&(i.valid=!1,i.message=i.messages[0],i.invalidFields.forEach(((e,t)=>{i.validMsg[e]=i.messages[t]}))),i.validFields.forEach((e=>{i.validMsg[e]=""})),i}}};Object(i.a)(c);t.default=c}})}));