!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(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},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")}({Nkoo:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(o){"object"===typeof window&&(n=window)}e.exports=n},W8MJ:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},g8md:function(e,t,n){"use strict";(function(e){t.a=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",o=null;"undefined"!==typeof window?o=window.Vue:"undefined"!==typeof e&&(o=e.Vue),o&&("directive"===n?o.directive(t.name,t):o.use(t))}}).call(this,n("Nkoo"))},lwsE:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},rp5t:function(e,t,n){"use strict";n.r(t);var o=n("lwsE"),i=n.n(o),r=n("W8MJ"),a=n.n(r),s=n("g8md"),l=/(?:^\[object\s(.*?)\]$)/,u=function(e){return Object.prototype.toString.call(e).replace(l,"$1").toLowerCase()},c={required:{validate:function(e){return e&&e.length>0},message:"%s is required"}},d="%s",f={},p=function(){function e(){i()(this,e)}return a()(e,[{key:"clear",value:function(){f={}}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?f[e]:f}},{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===u(e)?f=Object.assign({},e):f[e]=t}}]),e}();function v(e,t){console.warn("[$validator]","The '".concat(e,"' has been deprecated. Use the '").concat(t,"' instead"))}var g={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign({},c,t),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o={valid:!0,validFields:[],invalidFields:[],messages:[],message:"",validMsg:{}},i=Object.keys(f).length?f:this.validations||this.$options.validations||{},r=Object.keys(i);t.length&&(r=r.filter((function(e){return t.includes(e)})));for(var a=0,s=r.length;a<s;a++){for(var l=r[a],c=i[l],p=c.label||l,v=c.validator.split(",").map((function(e){return e.trim()})),g=!0,y=0,b=v.length;y<b;y++){var h=v[y],m=c[h],w=m||n[h];if(w&&"function"===u(w.validate)){var j=e[l],x=[j,e];if(!w.validate.apply(this,x)){g=!1;var $="";switch(u(w.message)){case"string":$=w.message.replace(d,p);break;case"function":$=w.message.apply(this,x);break;default:console.warn("[$validator]","'".concat(l,".message' must be a string or function"))}$&&o.messages.push($);break}}else console.warn("[$validator]","The field '".concat(l,"' is missing a validation rule: '").concat(h,"'"))}g?o.validFields.push(l):o.invalidFields.push(l)}return o.messages.length&&(o.valid=!1,o.message=o.messages[0],o.invalidFields.forEach((function(e,t){o.validMsg[e]=o.messages[t]}))),o.validFields.forEach((function(e){o.validMsg[e]=""})),o};e.prototype.$resetValidations=function(){return v("$resetValidations","$validations.clear")},e.prototype.$setValidations=function(){return v("$setValidations","$validations.set")},e.prototype.$validations=new p,e.prototype.$validate=o}};Object(s.a)(g);t.default=g}})}));