Socket
Socket
Sign inDemoInstall

vee-validate

Package Overview
Dependencies
Maintainers
2
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vee-validate - npm Package Compare versions

Comparing version 2.1.3 to 2.1.4

2

dist/locale/pl.js

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e.__vee_validate_locale__pl=e.__vee_validate_locale__pl||{},e.__vee_validate_locale__pl.js=n())}(this,function(){"use strict";var e,n={name:"pl",messages:{_default:function(e){return"Pole "+e+" jest nieprawidłowe."},after:function(e,n){return"Pole "+e+" musi być po polu "+n[0]+"."},alpha:function(e){return"Pole "+e+" może zawierać tylko litery."},alpha_dash:function(e){return"Pole "+e+" może zawierać litery, cyfry oraz myślnik lub podkreślnik."},alpha_num:function(e){return"Pole "+e+" może zawierać tylko litery i cyfry."},alpha_spaces:function(e){return"Pole "+e+" może zawierać tylko litery oraz spacje."},before:function(e,n){return"Pole "+e+" musi być przed "+n[0]+"."},between:function(e,n){return"Pole "+e+" musi być pomiędzy "+n[0]+" oraz "+n[1]+"."},confirmed:function(e,n){return"Pole "+e+" nie zgadza się z polem potwierdzającym "+n[0]+"."},credit_card:function(e){return"Pole "+e+" musi być poprawnym numerem karty kredytowej."},date_between:function(e,n){return"Pole "+e+" musi zawierać się między "+n[0]+" a "+n[1]+"."},date_format:function(e,n){return"Pole "+e+" musi pasować do formatu "+n[0]+"."},decimal:function(e,n){void 0===n&&(n=[]);var i=n[0];return void 0===i&&(i="*"),"Pole "+e+" musi być liczbą i może zawierać "+("*"===i?"":i)+" miejsca po przecinku."},digits:function(e,n){return"Pole "+e+" musi być liczbą i dokładnie "+n[0]+" cyfr."},dimensions:function(e,n){return"Obraz "+e+" musi być szeroki na "+n[0]+" pikseli i wysoki na "+n[1]+" pikseli."},email:function(e){return"Pole "+e+" musi być poprawnym adresem email."},excluded:function(e){return"Pole "+e+" musi być poprawną wartością."},ext:function(e){return"Plik "+e+" musi być poprawnym plikiem."},image:function(e){return"Pole "+e+" musi być obrazem."},included:function(e){return"Pole "+e+" musi być poprawną wartością."},integer:function(e){return"Pole "+e+" musi być liczbą całkowitą."},ip:function(e){return"Pole "+e+" musi być poprawnym adresem IP."},length:function(e,n){var i=n[0],o=n[1];return o?"Pole "+e+" musi mieć długość od "+i+" do "+o+" znaków.":"Pole "+e+" musi mieć długość "+i+" znaków."},max:function(e,n){return"Pole "+e+" nie może być dłuższe niż "+n[0]+" znaków."},max_value:function(e,n){return"Pole "+e+" musi mieć maksymalną wartość "+n[0]+"."},mimes:function(e){return"Plik "+e+" musi posiadać poprawne rozszerzenie."},min:function(e,n){return"Pole "+e+" musi być długie na co najmniej "+n[0]+" znaków."},min_value:function(e,n){return"Pole "+e+" musi mieć minimalną wartość "+n[0]+"."},numeric:function(e){return"Pole "+e+" może zawierać tylko cyfry."},regex:function(e){return"Format pola "+e+" jest nieodpowiedni."},required:function(e){return"Pole "+e+" jest wymagane."},size:function(e,n){var i,o,r,t=n[0];return"Plik "+e+" musi być mniejszy niż "+(i=t,o=1024,r=0==(i=Number(i)*o)?0:Math.floor(Math.log(i)/Math.log(o)),1*(i/Math.pow(o,r)).toFixed(2)+" "+["Byte","KB","MB","GB","TB","PB","EB","ZB","YB"][r])+"."},url:function(e){return"Pole "+e+" nie jest poprawnym URL."}},attributes:{}};return"undefined"!=typeof VeeValidate&&VeeValidate.Validator.localize(((e={})[n.name]=n,e)),n});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e.__vee_validate_locale__pl=e.__vee_validate_locale__pl||{},e.__vee_validate_locale__pl.js=n())}(this,function(){"use strict";var e;var r=function(e,n,i,o){return 1===(o=Math.abs(o))?e:2<=o%10&&o%10<=4&&(o%100<10||20<=o%100)?n:i}.bind(null,"znak","znaki","znaków"),n={name:"pl",messages:{_default:function(e){return"Pole "+e+" jest nieprawidłowe."},after:function(e,n){return"Pole "+e+" musi być po polu "+n[0]+"."},alpha:function(e){return"Pole "+e+" może zawierać tylko litery."},alpha_dash:function(e){return"Pole "+e+" może zawierać litery, cyfry oraz myślnik lub podkreślnik."},alpha_num:function(e){return"Pole "+e+" może zawierać tylko litery i cyfry."},alpha_spaces:function(e){return"Pole "+e+" może zawierać tylko litery oraz spacje."},before:function(e,n){return"Pole "+e+" musi być przed "+n[0]+"."},between:function(e,n){return"Pole "+e+" musi być pomiędzy "+n[0]+" oraz "+n[1]+"."},confirmed:function(e,n){return"Pole "+e+" nie zgadza się z polem potwierdzającym "+n[0]+"."},credit_card:function(e){return"Pole "+e+" musi być poprawnym numerem karty kredytowej."},date_between:function(e,n){return"Pole "+e+" musi zawierać się między "+n[0]+" a "+n[1]+"."},date_format:function(e,n){return"Pole "+e+" musi pasować do formatu "+n[0]+"."},decimal:function(e,n){void 0===n&&(n=[]);var i=n[0];return void 0===i&&(i="*"),"Pole "+e+" musi być liczbą i może zawierać "+("*"===i?"":i)+" miejsca po przecinku."},digits:function(e,n){return"Pole "+e+" musi być liczbą i dokładnie "+n[0]+" cyfr."},dimensions:function(e,n){return"Obraz "+e+" musi być szeroki na "+n[0]+" pikseli i wysoki na "+n[1]+" pikseli."},email:function(e){return"Pole "+e+" musi być poprawnym adresem email."},excluded:function(e){return"Pole "+e+" musi być poprawną wartością."},ext:function(e){return"Plik "+e+" musi być poprawnym plikiem."},image:function(e){return"Pole "+e+" musi być obrazem."},included:function(e){return"Pole "+e+" musi być poprawną wartością."},integer:function(e){return"Pole "+e+" musi być liczbą całkowitą."},ip:function(e){return"Pole "+e+" musi być poprawnym adresem IP."},length:function(e,n){var i=n[0],o=n[1];return o?"Pole "+e+" musi mieć długość od "+i+" do "+o+" znaków.":"Pole "+e+" musi mieć długość "+i+" "+r(i)+"."},max:function(e,n){var i=n[0];return"Pole "+e+" nie może być dłuższe niż "+i+" "+r(i)+"."},max_value:function(e,n){return"Pole "+e+" musi mieć maksymalną wartość "+n[0]+"."},mimes:function(e){return"Plik "+e+" musi posiadać poprawne rozszerzenie."},min:function(e,n){var i=n[0];return"Pole "+e+" musi być długie na co najmniej "+i+" "+r(i)+"."},min_value:function(e,n){return"Pole "+e+" musi mieć minimalną wartość "+n[0]+"."},numeric:function(e){return"Pole "+e+" może zawierać tylko cyfry."},regex:function(e){return"Format pola "+e+" jest nieodpowiedni."},required:function(e){return"Pole "+e+" jest wymagane."},size:function(e,n){var i,o,r,t=n[0];return"Plik "+e+" musi być mniejszy niż "+(i=t,o=1024,r=0==(i=Number(i)*o)?0:Math.floor(Math.log(i)/Math.log(o)),1*(i/Math.pow(o,r)).toFixed(2)+" "+["Byte","KB","MB","GB","TB","PB","EB","ZB","YB"][r])+"."},url:function(e){return"Pole "+e+" nie jest poprawnym URL."}},attributes:{}};return"undefined"!=typeof VeeValidate&&VeeValidate.Validator.localize(((e={})[n.name]=n,e)),n});

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VeeValidate=t()}(this,function(){"use strict";var a=function(e){return x(["text","password","search","email","tel","url","textarea","number"],e.type)},s=function(e){return x(["radio","checkbox"],e.type)},o=function(e,t){return e.getAttribute("data-vv-"+t)},d=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.every(function(e){return null==e})},u=function(t,n){if(t instanceof RegExp&&n instanceof RegExp)return u(t.source,n.source)&&u(t.flags,n.flags);if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;for(var e=0;e<t.length;e++)if(!u(t[e],n[e]))return!1;return!0}return h(t)&&h(n)?Object.keys(t).every(function(e){return u(t[e],n[e])})&&Object.keys(n).every(function(e){return u(t[e],n[e])}):t===n},r=function(e){return d(e)?null:"FORM"===e.tagName?e:d(e.form)?d(e.parentNode)?null:r(e.parentNode):e.form},l=function(e,t,n){if(void 0===n&&(n=void 0),!e||!t)return n;var i=t;return e.split(".").every(function(e){return e in i?(i=i[e],!0):(i=n,!1)}),i},c=function(n,i,r){return void 0===i&&(i=0),void 0===r&&(r={cancelled:!1}),0===i?n:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];clearTimeout(a),(a=setTimeout(function(){a=null,r.cancelled||n.apply(void 0,e)},i))||n.apply(void 0,e)};var a},i=function(e,t){return t?e?("string"==typeof t&&(t=f(t)),b({},t,f(e))):f(t):f(e)},f=function(i){return i?h(i)?Object.keys(i).reduce(function(e,t){var n=[];return n=!0===i[t]?[]:Array.isArray(i[t])?i[t]:h(i[t])?i[t]:[i[t]],!1!==i[t]&&(e[t]=n),e},{}):"string"!=typeof i?(n("rules must be either a string or an object."),{}):i.split("|").reduce(function(e,t){var n,i,r,a=(i=[],r=(n=t).split(":")[0],x(n,":")&&(i=n.split(":").slice(1).join(":").split(",")),{name:r,params:i});return a.name&&(e[a.name]=a.params),e},{}):{}},n=function(e){console.warn("[vee-validate] "+e)},v=function(e){return new Error("[vee-validate] "+e)},h=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)},m=function(e){return"function"==typeof e},p=function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},g=function(t,e,n){var i,r;if(t&&e){if(!Array.isArray(e))return n?(r=e,void((i=t).classList?i.classList.add(r):p(i,r)||(i.className+=" "+r))):void function(e,t){if(e.classList)e.classList.remove(t);else if(p(e,t)){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}(t,e);e.forEach(function(e){return g(t,e,n)})}},y=function(e){if(m(Array.from))return Array.from(e);for(var t=[],n=e.length,i=0;i<n;i++)t.push(e[i]);return t},b=function(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];if(m(Object.assign))return Object.assign.apply(Object,[e].concat(t));if(null==e)throw new TypeError("Cannot convert undefined or null to object");var i=Object(e);return t.forEach(function(t){null!=t&&Object.keys(t).forEach(function(e){i[e]=t[e]})}),i},t=0,_="{id}",$=function(e,t){for(var n=Array.isArray(e)?e:y(e),i=0;i<n.length;i++)if(t(n[i]))return n[i]},I=function(e){if(!e)return!1;var t=e.componentOptions.tag;return/^(keep-alive|transition|transition-group)$/.test(t)},A=function(e){if("number"==typeof e)return e;if("string"==typeof e)return parseInt(e);var t={};for(var n in e)t[n]=parseInt(e[n]);return t},E=function(i,r){return h(i)&&h(r)&&Object.keys(r).forEach(function(e){var t,n;if(h(r[e]))return i[e]||b(i,((t={})[e]={},t)),void E(i[e],r[e]);b(i,((n={})[e]=r[e],n))}),i},O=function(e,t){if(e.required&&(t=i("required",t)),a(e))return"email"===e.type&&(t=i("email"+(e.multiple?":multiple":""),t)),e.pattern&&(t=i({regex:e.pattern},t)),0<=e.maxLength&&e.maxLength<524288&&(t=i("max:"+e.maxLength,t)),0<e.minLength&&(t=i("min:"+e.minLength,t)),"number"===e.type&&(t=i("decimal",t),""!==e.min&&(t=i("min_value:"+e.min,t)),""!==e.max&&(t=i("max_value:"+e.max,t))),t;if(x(["date","week","month","datetime-local","time"],e.type)){var n=e.step&&Number(e.step)<60?"HH:mm:ss":"HH:mm";if("date"===e.type)return i("date_format:YYYY-MM-DD",t);if("datetime-local"===e.type)return i("date_format:YYYY-MM-DDT"+n,t);if("month"===e.type)return i("date_format:YYYY-MM",t);if("week"===e.type)return i("date_format:YYYY-[W]WW",t);if("time"===e.type)return i("date_format:"+n,t)}return t},w=function(t){return m(Object.values)?Object.values(t):Object.keys(t).map(function(e){return t[e]})},x=function(e,t){return-1!==e.indexOf(t)},j="en",e=function(e){void 0===e&&(e={}),this.container={},this.merge(e)},F={locale:{configurable:!0}};F.locale.get=function(){return j},F.locale.set=function(e){j=e||"en"},e.prototype.hasLocale=function(e){return!!this.container[e]},e.prototype.setDateFormat=function(e,t){this.container[e]||(this.container[e]={}),this.container[e].dateFormat=t},e.prototype.getDateFormat=function(e){return this.container[e]&&this.container[e].dateFormat?this.container[e].dateFormat:null},e.prototype.getMessage=function(e,t,n){var i=null;return i=this.hasMessage(e,t)?this.container[e].messages[t]:this._getDefaultMessage(e),m(i)?i.apply(void 0,n):i},e.prototype.getFieldMessage=function(e,t,n,i){if(!this.hasLocale(e))return this.getMessage(e,n,i);var r=this.container[e].custom&&this.container[e].custom[t];if(!r||!r[n])return this.getMessage(e,n,i);var a=r[n];return m(a)?a.apply(void 0,i):a},e.prototype._getDefaultMessage=function(e){return this.hasMessage(e,"_default")?this.container[e].messages._default:this.container.en.messages._default},e.prototype.getAttribute=function(e,t,n){return void 0===n&&(n=""),this.hasAttribute(e,t)?this.container[e].attributes[t]:n},e.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.container[e].messages&&this.container[e].messages[t])},e.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.container[e].attributes&&this.container[e].attributes[t])},e.prototype.merge=function(e){E(this.container,e)},e.prototype.setMessage=function(e,t,n){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].messages[t]=n},e.prototype.setAttribute=function(e,t,n){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].attributes[t]=n},Object.defineProperties(e.prototype,F);var N={default:new e({en:{messages:{},attributes:{},custom:{}}})},V="default",D=function(){};D._checkDriverName=function(e){if(!e)throw v("you must provide a name to the dictionary driver")},D.setDriver=function(e,t){void 0===t&&(t=null),this._checkDriverName(e),t&&(N[e]=t),V=e},D.getDriver=function(){return N[V]};var k=function e(t,n){void 0===t&&(t=null),void 0===n&&(n=null),this.vmId=n||null,this.items=t&&t instanceof e?t.items:[]};function C(e){return e.data?e.data.model?e.data.model:!!e.data.directives&&$(e.data.directives,function(e){return"model"===e.name}):null}function P(e){return e.componentOptions?e.componentOptions.Ctor.options.model:null}function L(e,t,n){if(m(e[t])){var i=e[t];e[t]=[i]}Array.isArray(e[t])?e[t].push(n):d(e[t])&&(e[t]=[n])}function M(e,t,n){var i,r,a,s,o,u;e.componentOptions&&(r=t,a=n,(i=e).componentOptions.listeners||(i.componentOptions.listeners={}),L(i.componentOptions.listeners,r,a)),o=t,u=n,d((s=e).data.on)&&(s.data.on={}),L(s.data.on,o,u)}function R(e,t){return e.componentOptions?(P(e)||{event:"input"}).event:t&&t.modifiers&&t.modifiers.lazy?"change":e.data.attrs&&a({type:e.data.attrs.type||"text"})?"input":"change"}function T(e,t){return Array.isArray(t)&&1===t.length?t[0]:t}k.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var e=this,t=0;return{next:function(){return{value:e.items[t++],done:t>e.items.length}}}},k.prototype.add=function(e){var t;(t=this.items).push.apply(t,this._normalizeError(e))},k.prototype._normalizeError=function(e){var t=this;return Array.isArray(e)?e.map(function(e){return e.scope=d(e.scope)?null:e.scope,e.vmId=d(e.vmId)?t.vmId||null:e.vmId,e}):(e.scope=d(e.scope)?null:e.scope,e.vmId=d(e.vmId)?this.vmId||null:e.vmId,[e])},k.prototype.regenerate=function(){this.items.forEach(function(e){e.msg=m(e.regenerate)?e.regenerate():e.msg})},k.prototype.update=function(t,e){var n=$(this.items,function(e){return e.id===t});if(n){var i=this.items.indexOf(n);this.items.splice(i,1),n.scope=e.scope,this.items.push(n)}},k.prototype.all=function(i){var r=this;return this.items.filter(function(e){var t=!0,n=!0;return d(i)||(t=e.scope===i),d(r.vmId)||(n=e.vmId===r.vmId),n&&t}).map(function(e){return e.msg})},k.prototype.any=function(i){var r=this;return!!this.items.filter(function(e){var t=!0,n=!0;return d(i)||(t=e.scope===i),d(r.vmId)||(n=e.vmId===r.vmId),n&&t}).length},k.prototype.clear=function(e){var t=this,n=d(this.vmId)?function(){return!0}:function(e){return e.vmId===t.vmId};d(e)&&(e=null);for(var i=0;i<this.items.length;++i)n(this.items[i])&&this.items[i].scope===e&&(this.items.splice(i,1),--i)},k.prototype.collect=function(e,t,n){var i=this;void 0===n&&(n=!0);var r=!d(e)&&!e.includes("*"),a=function(e){var t=e.reduce(function(e,t){return(d(i.vmId)||t.vmId===i.vmId)&&(e[t.field]||(e[t.field]=[]),e[t.field].push(n?t.msg:t)),e},{});return r?w(t)[0]||[]:t};if(d(e))return a(this.items);var s=d(t)?String(e):t+"."+e,o=this._makeCandidateFilters(s),u=o.isPrimary,l=o.isAlt,c=this.items.reduce(function(e,t){return u(t)&&e.primary.push(t),l(t)&&e.alt.push(t),e},{primary:[],alt:[]});return a(c=c.primary.length?c.primary:c.alt)},k.prototype.count=function(){var t=this;return this.vmId?this.items.filter(function(e){return e.vmId===t.vmId}).length:this.items.length},k.prototype.firstById=function(t){var e=$(this.items,function(e){return e.id===t});return e?e.msg:void 0},k.prototype.first=function(e,t){void 0===t&&(t=null);var n=d(t)?e:t+"."+e,i=this._match(n);return i&&i.msg},k.prototype.firstRule=function(e,t){var n=this.collect(e,t,!1);return n.length&&n[0].rule||void 0},k.prototype.has=function(e,t){return void 0===t&&(t=null),!!this.first(e,t)},k.prototype.firstByRule=function(e,t,n){void 0===n&&(n=null);var i=this.collect(e,n,!1).filter(function(e){return e.rule===t})[0];return i&&i.msg||void 0},k.prototype.firstNot=function(e,t,n){void 0===t&&(t="required"),void 0===n&&(n=null);var i=this.collect(e,n,!1).filter(function(e){return e.rule!==t})[0];return i&&i.msg||void 0},k.prototype.removeById=function(t){var e=function(e){return e.id===t};Array.isArray(t)&&(e=function(e){return-1!==t.indexOf(e.id)});for(var n=0;n<this.items.length;++n)e(this.items[n])&&(this.items.splice(n,1),--n)},k.prototype.remove=function(e,t,n){if(!d(e))for(var i,r=d(t)?String(e):t+"."+e,a=this._makeCandidateFilters(r).isPrimary,s=0;s<this.items.length;++s)i=this.items[s],(d(n)?a(i):a(i)&&i.vmId===n)&&(this.items.splice(s,1),--s)},k.prototype._makeCandidateFilters=function(e){var t=this,n=function(){return!0},i=function(){return!0},r=function(){return!0},a=function(){return!0},s=function(e){var t=null;if(x(e,":")&&(t=e.split(":").pop(),e=e.replace(":"+t,"")),"#"===e[0])return{id:e.slice(1),rule:t,name:null,scope:null};var n=null,i=e;if(x(e,".")){var r=e.split(".");n=r[0],i=r.slice(1).join(".")}return{id:null,scope:n,name:i,rule:t}}(e),o=s.id,u=s.rule,l=s.scope,c=s.name;if(u&&(n=function(e){return e.rule===u}),o)return{isPrimary:function(e){return n(e)&&function(e){return o===e.id}},isAlt:function(){return!1}};i=d(l)?function(e){return d(e.scope)}:function(e){return e.scope===l},d(c)||"*"===c||(r=function(e){return e.field===c}),d(this.vmId)||(a=function(e){return e.vmId===t.vmId});return{isPrimary:function(e){return a(e)&&r(e)&&n(e)&&i(e)},isAlt:function(e){return a(e)&&n(e)&&e.field===l+"."+c}}},k.prototype._match=function(e){if(!d(e)){var t=this._makeCandidateFilters(e),a=t.isPrimary,s=t.isAlt;return this.items.reduce(function(e,t,n,i){var r=n===i.length-1;return e.primary?r?e.primary:e:(a(t)&&(e.primary=t),s(t)&&(e.alt=t),r?e.primary||e.alt:e)},{})}};var q=function(){};q.generate=function(e,t,n){var i=q.resolveModel(t,n),r=Ie.resolveConfig(n.context);return{name:q.resolveName(e,n),el:e,listen:!t.modifiers.disable,bails:!!t.modifiers.bails||!0!==t.modifiers.continues&&void 0,scope:q.resolveScope(e,t,n),vm:q.makeVM(n.context),expression:t.value,component:n.componentInstance,classes:r.classes,classNames:r.classNames,getter:q.resolveGetter(e,n,i),events:q.resolveEvents(e,n)||r.events,model:i,delay:q.resolveDelay(e,n,r),rules:q.resolveRules(e,t,n),immediate:!!t.modifiers.initial||!!t.modifiers.immediate,validity:r.validity,aria:r.aria,initialValue:q.resolveInitialValue(n)}},q.getCtorConfig=function(e){return e.componentInstance?l("componentInstance.$options.$_veeValidate",e):null},q.resolveRules=function(e,t,n){var i="";return t.value||t&&t.expression||(i=o(e,"rules")),t.value&&x(["string","object"],typeof t.value.rules)?i=t.value.rules:t.value&&(i=t.value),n.componentInstance?i:O(e,i)},q.resolveInitialValue=function(e){var t=e.data.model||$(e.data.directives,function(e){return"model"===e.name});return t&&t.value},q.makeVM=function(e){return{get $el(){return e.$el},get $refs(){return e.$refs},$watch:e.$watch?e.$watch.bind(e):function(){},$validator:e.$validator?{errors:e.$validator.errors,validate:e.$validator.validate.bind(e.$validator),update:e.$validator.update.bind(e.$validator)}:null}},q.resolveDelay=function(e,t,n){var i=o(e,"delay"),r=n&&"delay"in n?n.delay:0;return!i&&t.componentInstance&&t.componentInstance.$attrs&&(i=t.componentInstance.$attrs["data-vv-delay"]),h(r)?(d(i)||(r.input=i),A(r)):A(i||r)},q.resolveEvents=function(e,t){var n=o(e,"validate-on");if(!n&&t.componentInstance&&t.componentInstance.$attrs&&(n=t.componentInstance.$attrs["data-vv-validate-on"]),!n&&t.componentInstance){var i=q.getCtorConfig(t);n=i&&i.events}if(!n&&Ie.config.events&&(n=Ie.config.events),n&&t.componentInstance&&x(n,"input")){var r=(t.componentInstance.$options.model||{event:"input"}).event;if(!r)return n;n=n.replace("input",r)}return n},q.resolveScope=function(e,t,n){void 0===n&&(n={});var i=null;return n.componentInstance&&d(i)&&(i=n.componentInstance.$attrs&&n.componentInstance.$attrs["data-vv-scope"]),d(i)?function(e){var t=o(e,"scope");if(d(t)){var n=r(e);n&&(t=o(n,"scope"))}return d(t)?null:t}(e):i},q.resolveModel=function(e,t){if(e.arg)return{expression:e.arg};var n=C(t);if(!n)return null;var i,r,a,s=!/[^\w.$]/.test(n.expression)&&(i=n.expression,r=t.context,a=r,i.split(".").every(function(e){return e in a&&(a=a[e],!0)})),o=!(!n.modifiers||!n.modifiers.lazy);return s?{expression:n.expression,lazy:o}:{expression:null,lazy:o}},q.resolveName=function(e,t){var n=o(e,"name");if(!n&&!t.componentInstance)return e.name;if(!n&&t.componentInstance&&t.componentInstance.$attrs&&(n=t.componentInstance.$attrs["data-vv-name"]||t.componentInstance.$attrs.name),n||!t.componentInstance)return n;var i=q.getCtorConfig(t);return i&&m(i.name)?i.name.bind(t.componentInstance)():t.componentInstance.name},q.resolveGetter=function(n,e,t){if(t&&t.expression)return function(){return l(t.expression,e.context)};if(e.componentInstance){var i=o(n,"value-path")||e.componentInstance.$attrs&&e.componentInstance.$attrs["data-vv-value-path"];if(i)return function(){return l(i,e.componentInstance)};var r=q.getCtorConfig(e);if(r&&m(r.value)){var a=r.value.bind(e.componentInstance);return function(){return a()}}var s=(e.componentInstance.$options.model||{prop:"value"}).prop;return function(){return e.componentInstance[s]}}switch(n.type){case"checkbox":return function(){var e=document.querySelectorAll('input[name="'+n.name+'"]');if((e=y(e).filter(function(e){return e.checked})).length)return e.map(function(e){return e.value})};case"radio":return function(){var e=document.querySelectorAll('input[name="'+n.name+'"]'),t=$(e,function(e){return e.checked});return t&&t.value};case"file":return function(e){return y(n.files)};case"select-multiple":return function(){return y(n.options).filter(function(e){return e.selected}).map(function(e){return e.value})};default:return function(){return n&&n.value}}};var S={},z=function(){},B={rules:{configurable:!0}};z.add=function(e,t){var n=t.validate,i=t.options,r=t.paramNames;S[e]={validate:n,options:i,paramNames:r}},B.rules.get=function(){return S},z.has=function(e){return!!S[e]},z.isImmediate=function(e){return!(!S[e]||!S[e].options.immediate)},z.isTargetRule=function(e){return!(!S[e]||!S[e].options.hasTarget)},z.remove=function(e){delete S[e]},z.getParamNames=function(e){return S[e]&&S[e].paramNames},z.getOptions=function(e){return S[e]&&S[e].options},z.getValidatorMethod=function(e){return S[e]?S[e].validate:null},Object.defineProperties(z,B);var Y=function(e){return"undefined"!=typeof Event&&m(Event)&&e instanceof Event||e&&e.srcElement},K=function(e){return e?"string"==typeof e?e.split("|"):e:[]},H=!0,W=function(e,t,n){e.addEventListener(t,n,!!H&&{passive:!0})},G={targetOf:null,immediate:!1,scope:null,listen:!0,name:null,rules:{},vm:null,classes:!1,validity:!0,aria:!0,events:"input|blur",delay:0,classNames:{touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"}},U=function(e){void 0===e&&(e={}),this.id=(9999<=t&&(t=0,_=_.replace("{id}","_{id}")),t++,_.replace("{id}",String(t))),this.el=e.el,this.updated=!1,this.dependencies=[],this.vmId=e.vmId,this.watchers=[],this.events=[],this.delay=0,this.rules={},this._cacheId(e),this.classNames=b({},G.classNames),e=b({},G,e),this._delay=d(e.delay)?0:e.delay,this.validity=e.validity,this.aria=e.aria,this.flags={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},this.vm=e.vm,this.componentInstance=e.component,this.ctorConfig=this.componentInstance?l("$options.$_veeValidate",this.componentInstance):void 0,this.update(e),this.initialValue=this.value,this.updated=!1},J={validator:{configurable:!0},isRequired:{configurable:!0},isDisabled:{configurable:!0},alias:{configurable:!0},value:{configurable:!0},bails:{configurable:!0},rejectsFalse:{configurable:!0}};J.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:{validate:function(){}}},J.isRequired.get=function(){return!!this.rules.required},J.isDisabled.get=function(){return!(!this.componentInstance||!this.componentInstance.disabled)||!(!this.el||!this.el.disabled)},J.alias.get=function(){if(this._alias)return this._alias;var e=null;return this.ctorConfig&&this.ctorConfig.alias&&(e=m(this.ctorConfig.alias)?this.ctorConfig.alias.call(this.componentInstance):this.ctorConfig.alias),!e&&this.el&&(e=o(this.el,"as")),!e&&this.componentInstance?this.componentInstance.$attrs&&this.componentInstance.$attrs["data-vv-as"]:e},J.value.get=function(){if(m(this.getter))return this.getter()},J.bails.get=function(){return this._bails},J.rejectsFalse.get=function(){return this.componentInstance&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},U.prototype.matches=function(e){var t=this;return!e||(e.id?this.id===e.id:!!(d(e.vmId)?function(){return!0}:function(e){return e===t.vmId})(e.vmId)&&(void 0===e.name&&void 0===e.scope||(void 0===e.scope?this.name===e.name:void 0===e.name?this.scope===e.scope:e.name===this.name&&e.scope===this.scope)))},U.prototype._cacheId=function(e){this.el&&!e.targetOf&&(this.el._veeValidateId=this.id)},U.prototype.waitFor=function(e){this._waitingFor=e},U.prototype.isWaitingFor=function(e){return this._waitingFor===e},U.prototype.update=function(e){var t,n,i;this.targetOf=e.targetOf||null,this.immediate=e.immediate||this.immediate||!1,!d(e.scope)&&e.scope!==this.scope&&m(this.validator.update)&&this.validator.update(this.id,{scope:e.scope}),this.scope=d(e.scope)?d(this.scope)?null:this.scope:e.scope,this.name=(d(e.name)?e.name:String(e.name))||this.name||null,this.rules=void 0!==e.rules?f(e.rules):this.rules,this._bails=void 0!==e.bails?e.bails:this._bails,this.model=e.model||this.model,this.listen=void 0!==e.listen?e.listen:this.listen,this.classes=!(!e.classes&&!this.classes)&&!this.componentInstance,this.classNames=h(e.classNames)?E(this.classNames,e.classNames):this.classNames,this.getter=m(e.getter)?e.getter:this.getter,this._alias=e.alias||this._alias,this.events=e.events?K(e.events):this.events,this.delay=(t=this.events,n=e.delay||this.delay,i=this._delay,"number"==typeof n?t.reduce(function(e,t){return e[t]=n,e},{}):t.reduce(function(e,t){return e[t]="object"==typeof n&&t in n?n[t]:"number"==typeof i?i:i&&i[t]||0,e},{})),this.updateDependencies(),this.addActionListeners(),void 0!==e.rules&&(this.flags.required=this.isRequired),this.flags.validated&&void 0!==e.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.addValueListeners(),this.el&&(this.updateClasses(),this.updateAriaAttrs())},U.prototype.reset=function(){var t=this;this._cancellationToken&&(this._cancellationToken.cancelled=!0,delete this._cancellationToken);var n={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1};Object.keys(this.flags).filter(function(e){return"required"!==e}).forEach(function(e){t.flags[e]=n[e]}),this.addValueListeners(),this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},U.prototype.setFlags=function(t){var n=this,i={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(t).forEach(function(e){n.flags[e]=t[e],i[e]&&void 0===t[i[e]]&&(n.flags[i[e]]=!t[e])}),void 0===t.untouched&&void 0===t.touched&&void 0===t.dirty&&void 0===t.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},U.prototype.updateDependencies=function(){var s=this;this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[];var e=Object.keys(this.rules).reduce(function(e,t){return z.isTargetRule(t)&&e.push({selector:s.rules[t][0],name:t}),e},[]);e.length&&this.vm&&this.vm.$el&&e.forEach(function(e){var t=e.selector,n=e.name,i=s.vm.$refs[t],r=Array.isArray(i)?i[0]:i;if(r){var a={vm:s.vm,classes:s.classes,classNames:s.classNames,delay:s.delay,scope:s.scope,events:s.events.join("|"),immediate:s.immediate,targetOf:s.id};m(r.$watch)?(a.component=r,a.el=r.$el,a.getter=q.resolveGetter(r.$el,r.$vnode)):(a.el=r,a.getter=q.resolveGetter(r,{})),s.dependencies.push({name:n,field:new U(a)})}})},U.prototype.unwatch=function(t){if(void 0===t&&(t=null),!t)return this.watchers.forEach(function(e){return e.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(e){return t.test(e.tag)}).forEach(function(e){return e.unwatch()}),this.watchers=this.watchers.filter(function(e){return!t.test(e.tag)})},U.prototype.updateClasses=function(){var t=this;if(this.classes&&!this.isDisabled){var e=function(e){g(e,t.classNames.dirty,t.flags.dirty),g(e,t.classNames.pristine,t.flags.pristine),g(e,t.classNames.touched,t.flags.touched),g(e,t.classNames.untouched,t.flags.untouched),!d(t.flags.valid)&&t.flags.validated&&g(e,t.classNames.valid,t.flags.valid),!d(t.flags.invalid)&&t.flags.validated&&g(e,t.classNames.invalid,t.flags.invalid)};if(s(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');y(n).forEach(e)}else e(this.el)}},U.prototype.addActionListeners=function(){var e=this;if(this.unwatch(/class/),this.el){var t=function(){e.flags.touched=!0,e.flags.untouched=!1,e.classes&&(g(e.el,e.classNames.touched,!0),g(e.el,e.classNames.untouched,!1)),e.unwatch(/^class_blur$/)},n=a(this.el)?"input":"change",i=function(){e.flags.dirty=!0,e.flags.pristine=!1,e.classes&&(g(e.el,e.classNames.pristine,!1),g(e.el,e.classNames.dirty,!0)),e.unwatch(/^class_input$/)};if(this.componentInstance&&m(this.componentInstance.$once))return this.componentInstance.$once("input",i),this.componentInstance.$once("blur",t),this.watchers.push({tag:"class_input",unwatch:function(){e.componentInstance.$off("input",i)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){e.componentInstance.$off("blur",t)}});if(this.el){W(this.el,n,i);var r=s(this.el)?"change":"blur";W(this.el,r,t),this.watchers.push({tag:"class_input",unwatch:function(){e.el.removeEventListener(n,i)}}),this.watchers.push({tag:"class_blur",unwatch:function(){e.el.removeEventListener(r,t)}})}}},U.prototype.checkValueChanged=function(){return(null!==this.initialValue||""!==this.value||!a(this.el))&&this.value!==this.initialValue},U.prototype._determineInputEvent=function(){return this.componentInstance?this.componentInstance.$options.model&&this.componentInstance.$options.model.event||"input":this.model&&this.model.lazy?"change":a(this.el)?"input":"change"},U.prototype._determineEventList=function(t){var n=this;return!this.events.length||this.componentInstance||a(this.el)?[].concat(this.events).map(function(e){return"input"===e&&n.model&&n.model.lazy?"change":e}):this.events.map(function(e){return"input"===e?t:e})},U.prototype.addValueListeners=function(){var i=this;if(this.unwatch(/^input_.+/),this.listen&&this.el){var r={cancelled:!1},a=this.targetOf?function(){i.flags.changed=i.checkValueChanged(),i.validator.validate("#"+i.targetOf)}:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];(0===e.length||Y(e[0]))&&(e[0]=i.value),i.flags.changed=i.checkValueChanged(),i.validator.validate("#"+i.id,e[0])},t=this._determineInputEvent(),e=this._determineEventList(t);if(this.model&&x(e,t)){var n=null,s=this.model.expression;if(this.model.expression&&(n=this.vm,s=this.model.expression),!s&&this.componentInstance&&this.componentInstance.$options.model&&(n=this.componentInstance,s=this.componentInstance.$options.model.prop||"value"),n&&s){var o=c(a,this.delay[t],r),u=n.$watch(s,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i.flags.pending=!0,i._cancellationToken=r,o.apply(void 0,e)});this.watchers.push({tag:"input_model",unwatch:u}),e=e.filter(function(e){return e!==t})}}e.forEach(function(e){var n=c(a,i.delay[e],!1,r),t=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i.flags.pending=!0,i._cancellationToken=r,n.apply(void 0,e)};i._addComponentEventListener(e,t),i._addHTMLEventListener(e,t)})}},U.prototype._addComponentEventListener=function(e,t){var n=this;this.componentInstance&&(this.componentInstance.$on(e,t),this.watchers.push({tag:"input_vue",unwatch:function(){n.componentInstance.$off(e,t)}}))},U.prototype._addHTMLEventListener=function(t,n){var i=this;if(this.el&&!this.componentInstance){var r=function(e){W(e,t,n),i.watchers.push({tag:"input_native",unwatch:function(){e.removeEventListener(t,n)}})};if(r(this.el),s(this.el)){var e=document.querySelectorAll('input[name="'+this.el.name+'"]');y(e).forEach(function(e){e._veeValidateId&&e!==i.el||r(e)})}}},U.prototype.updateAriaAttrs=function(){var t=this;if(this.aria&&this.el&&m(this.el.setAttribute)){var e=function(e){e.setAttribute("aria-required",t.isRequired?"true":"false"),e.setAttribute("aria-invalid",t.flags.invalid?"true":"false")};if(s(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');y(n).forEach(e)}else e(this.el)}},U.prototype.updateCustomValidity=function(){this.validity&&this.el&&m(this.el.setCustomValidity)&&this.validator.errors&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},U.prototype.destroy=function(){this._cancellationToken&&(this._cancellationToken.cancelled=!0),this.unwatch(),this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[]},Object.defineProperties(U.prototype,J);var Q=function(e){void 0===e&&(e=[]),this.items=e||[]},X={length:{configurable:!0}};Q.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var e=this,t=0;return{next:function(){return{value:e.items[t++],done:t>e.items.length}}}},X.length.get=function(){return this.items.length},Q.prototype.find=function(t){return $(this.items,function(e){return e.matches(t)})},Q.prototype.filter=function(n){return Array.isArray(n)?this.items.filter(function(t){return n.some(function(e){return t.matches(e)})}):this.items.filter(function(e){return e.matches(n)})},Q.prototype.map=function(e){return this.items.map(e)},Q.prototype.remove=function(e){var t=null;if(!(t=e instanceof U?e:this.find(e)))return null;var n=this.items.indexOf(t);return this.items.splice(n,1),t},Q.prototype.push=function(e){if(!(e instanceof U))throw v("FieldBag only accepts instances of Field that has an id defined.");if(!e.id)throw v("Field id must be defined.");if(this.find({id:e.id}))throw v("Field with id "+e.id+" is already added.");this.items.push(e)},Object.defineProperties(Q.prototype,X);var Z=function(e,t){this.id=t._uid,this._base=e,this._paused=!1,this.errors=new k(e.errors,this.id)},ee={flags:{configurable:!0},rules:{configurable:!0},fields:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};ee.flags.get=function(){var t=this;return this._base.fields.items.filter(function(e){return e.vmId===t.id}).reduce(function(e,t){return t.scope&&(e["$"+t.scope]||(e["$"+t.scope]={}),e["$"+t.scope][t.name]=t.flags),e[t.name]=t.flags,e},{})},ee.rules.get=function(){return this._base.rules},ee.fields.get=function(){return new Q(this._base.fields.filter({vmId:this.id}))},ee.dictionary.get=function(){return this._base.dictionary},ee.locale.get=function(){return this._base.locale},ee.locale.set=function(e){this._base.locale=e},Z.prototype.localize=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).localize.apply(e,t)},Z.prototype.update=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).update.apply(e,t)},Z.prototype.attach=function(e){var t=b({},e,{vmId:this.id});return this._base.attach(t)},Z.prototype.pause=function(){this._paused=!0},Z.prototype.resume=function(){this._paused=!1},Z.prototype.remove=function(e){return this._base.remove(e)},Z.prototype.detach=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).detach.apply(e,t.concat([this.id]))},Z.prototype.extend=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).extend.apply(e,t)},Z.prototype.validate=function(e,t,n){return void 0===n&&(n={}),this._paused?Promise.resolve(!0):this._base.validate(e,t,b({},{vmId:this.id},n||{}))},Z.prototype.validateAll=function(e,t){return void 0===t&&(t={}),this._paused?Promise.resolve(!0):this._base.validateAll(e,b({},{vmId:this.id},t||{}))},Z.prototype.validateScopes=function(e){return void 0===e&&(e={}),this._paused?Promise.resolve(!0):this._base.validateScopes(b({},{vmId:this.id},e||{}))},Z.prototype.destroy=function(){delete this.id,delete this._base},Z.prototype.reset=function(e){return this._base.reset(Object.assign({},e||{},{vmId:this.id}))},Z.prototype.flag=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).flag.apply(e,t.concat([this.id]))},Object.defineProperties(Z.prototype,ee);var te={provide:function(){return this.$validator&&!I(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!I(this.$vnode)&&!1!==this.$options.$__veeInject){this.$parent||Ie.configure(this.$options.$_veeValidate||{});var e=Ie.resolveConfig(this);(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=new Z(Ie._validator,this));var t,n=(t=this.$options.inject,!(!h(t)||!t.$validator));if(this.$validator||!e.inject||n||(this.$validator=new Z(Ie._validator,this)),n||this.$validator){if(!n&&this.$validator)this.$options._base.util.defineReactive(this.$validator,"errors",this.$validator.errors);this.$options.computed||(this.$options.computed={}),this.$options.computed[e.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[e.fieldsBagName||"fields"]=function(){return this.$validator.fields.items.reduce(function(e,t){return t.scope?(e["$"+t.scope]||(e["$"+t.scope]={}),e["$"+t.scope][t.name]=t.flags):e[t.name]=t.flags,e},{})}}}},beforeDestroy:function(){this.$validator&&this._uid===this.$validator.id&&this.$validator.errors.clear()}};function ne(e,t){return t&&t.$validator?t.$validator.fields.find({id:e._veeValidateId}):null}var ie={bind:function(e,t,n){var i=n.context.$validator;if(i){var r=q.generate(e,t,n);i.attach(r)}},inserted:function(e,t,n){var i=ne(e,n.context),r=q.resolveScope(e,t,n);i&&r!==i.scope&&(i.update({scope:r}),i.updated=!1)},update:function(e,t,n){var i=ne(e,n.context);if(!(!i||i.updated&&u(t.value,t.oldValue))){var r=q.resolveScope(e,t,n),a=q.resolveRules(e,t,n);i.update({scope:r,rules:a})}},unbind:function(e,t,n){var i=n.context,r=ne(e,i);r&&i.$validator.detach(r)}},re=function(e,t){void 0===t&&(t={fastExit:!0}),this.errors=new k,this.fields=new Q,this._createFields(e),this.paused=!1,this.fastExit=!!d(t&&t.fastExit)||t.fastExit},ae={rules:{configurable:!0},dictionary:{configurable:!0},flags:{configurable:!0},locale:{configurable:!0}},se={rules:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};se.rules.get=function(){return z.rules},ae.rules.get=function(){return z.rules},ae.dictionary.get=function(){return Ee.i18nDriver},se.dictionary.get=function(){return Ee.i18nDriver},ae.flags.get=function(){return this.fields.items.reduce(function(e,t){var n;return t.scope?e["$"+t.scope]=((n={})[t.name]=t.flags,n):e[t.name]=t.flags,e},{})},ae.locale.get=function(){return re.locale},ae.locale.set=function(e){re.locale=e},se.locale.get=function(){return Ee.i18nDriver.locale},se.locale.set=function(e){var t=e!==Ee.i18nDriver.locale;Ee.i18nDriver.locale=e,t&&Ee.instance&&Ee.instance._vm&&Ee.instance._vm.$emit("localeChanged")},re.create=function(e,t){return new re(e,t)},re.extend=function(e,t,n){void 0===n&&(n={}),re._guardExtend(e,t),re._merge(e,{validator:t,paramNames:n&&n.paramNames,options:b({},{hasTarget:!1,immediate:!0},n||{})})},re.remove=function(e){z.remove(e)},re.isTargetRule=function(e){return z.isTargetRule(e)},re.prototype.localize=function(e,t){re.localize(e,t)},re.localize=function(e,t){var n;if(h(e))Ee.i18nDriver.merge(e);else{if(t){var i=e||t.name;t=b({},t),Ee.i18nDriver.merge(((n={})[i]=t,n))}e&&(re.locale=e)}},re.prototype.attach=function(e){var t=this,n=e.initialValue,i=new U(e);return this.fields.push(i),i.immediate?Ee.instance._vm.$nextTick(function(){return t.validate("#"+i.id,n||i.value,{vmId:e.vmId})}):this._validate(i,n||i.value,{initial:!0}).then(function(e){i.flags.valid=e.valid,i.flags.invalid=!e.valid}),i},re.prototype.flag=function(e,t,n){void 0===n&&(n=null);var i=this._resolveField(e,void 0,n);i&&t&&i.setFlags(t)},re.prototype.detach=function(e,t,n){var i=m(e.destroy)?e:this._resolveField(e,t,n);i&&(i.destroy(),this.errors.remove(i.name,i.scope,i.vmId),this.fields.remove(i))},re.prototype.extend=function(e,t,n){void 0===n&&(n={}),re.extend(e,t,n)},re.prototype.reset=function(e){var t=this;return Ee.instance._vm.$nextTick().then(function(){return Ee.instance._vm.$nextTick()}).then(function(){t.fields.filter(e).forEach(function(e){e.waitFor(null),e.reset(),t.errors.remove(e.name,e.scope)})})},re.prototype.update=function(e,t){var n=t.scope;this._resolveField("#"+e)&&this.errors.update(e,{scope:n})},re.prototype.remove=function(e){re.remove(e)},re.prototype.validate=function(e,t,n){var i=this;void 0===n&&(n={});var r=n.silent,a=n.vmId;if(this.paused)return Promise.resolve(!0);if(d(e))return this.validateScopes({silent:r,vmId:a});if("*"===e)return this.validateAll(void 0,{silent:r,vmId:a});if(/^(.+)\.\*$/.test(e)){var s=e.match(/^(.+)\.\*$/)[1];return this.validateAll(s)}var o=this._resolveField(e);if(!o)return this._handleFieldNotFound(name);r||(o.flags.pending=!0),void 0===t&&(t=o.value);var u=this._validate(o,t);return o.waitFor(u),u.then(function(e){return!r&&o.isWaitingFor(u)&&(o.waitFor(null),i._handleValidationResults([e],a)),e.valid})},re.prototype.pause=function(){return this.paused=!0,this},re.prototype.resume=function(){return this.paused=!1,this},re.prototype.validateAll=function(t,e){var n=this;void 0===e&&(e={});var i=e.silent,r=e.vmId;if(this.paused)return Promise.resolve(!0);var a=null,s=!1;return"string"==typeof t?a={scope:t,vmId:r}:h(t)?(a=Object.keys(t).map(function(e){return{name:e,vmId:r,scope:null}}),s=!0):a=Array.isArray(t)?t.map(function(e){return{name:e,vmId:r}}):{scope:null,vmId:r},Promise.all(this.fields.filter(a).map(function(e){return n._validate(e,s?t[e.name]:e.value)})).then(function(e){return i||n._handleValidationResults(e,r),e.every(function(e){return e.valid})})},re.prototype.validateScopes=function(e){var t=this;void 0===e&&(e={});var n=e.silent,i=e.vmId;return this.paused?Promise.resolve(!0):Promise.all(this.fields.filter({vmId:i}).map(function(e){return t._validate(e,e.value)})).then(function(e){return n||t._handleValidationResults(e,i),e.every(function(e){return e.valid})})},re.prototype.verify=function(e,t,r){void 0===r&&(r={});var a={name:r&&r.name||"{field}",rules:f(t),bails:l("bails",r,!0)};a.isRequired=a.rules.required;var n=Object.keys(a.rules).filter(re.isTargetRule);return n.length&&r&&h(r.values)&&n.forEach(function(e){var t=a.rules[e],n=t[0],i=t.slice(1);a.rules[e]=[r.values[n]].concat(i)}),this._validate(a,e).then(function(e){return{valid:e.valid,errors:e.errors.map(function(e){return e.msg})}})},re.prototype.destroy=function(){Ee.instance._vm.$off("localeChanged")},re.prototype._createFields=function(n){var i=this;n&&Object.keys(n).forEach(function(e){var t=b({},{name:e,rules:n[e]});i.attach(t)})},re.prototype._getDateFormat=function(e){var t=null;return e.date_format&&Array.isArray(e.date_format)&&(t=e.date_format[0]),t||Ee.i18nDriver.getDateFormat(this.locale)},re.prototype._formatErrorMessage=function(e,t,n,i){void 0===n&&(n={}),void 0===i&&(i=null);var r=this._getFieldDisplayName(e),a=this._getLocalizedParams(t,i);return Ee.i18nDriver.getFieldMessage(this.locale,e.name,t.name,[r,a,n])},re.prototype._convertParamObjectToArray=function(n,e){if(Array.isArray(n))return n;var t=z.getParamNames(e);return t&&h(n)?t.reduce(function(e,t){return t in n&&e.push(n[t]),e},[]):n},re.prototype._getLocalizedParams=function(e,t){void 0===t&&(t=null);var n=this._convertParamObjectToArray(e.params,e.name);return e.options.hasTarget&&n&&n[0]?[t||Ee.i18nDriver.getAttribute(this.locale,n[0],n[0])].concat(n.slice(1)):n},re.prototype._getFieldDisplayName=function(e){return e.alias||Ee.i18nDriver.getAttribute(this.locale,e.name,e.name)},re.prototype._convertParamArrayToObj=function(t,e){var i=z.getParamNames(e);if(!i)return t;if(h(t)){if(i.some(function(e){return-1!==Object.keys(t).indexOf(e)}))return t;t=[t]}return t.reduce(function(e,t,n){return e[i[n]]=t,e},{})},re.prototype._test=function(i,e,r){var a=this,t=z.getValidatorMethod(r.name),n=Array.isArray(r.params)?y(r.params):r.params;n||(n=[]);var s=null;if(!t||"function"!=typeof t)return Promise.reject(v("No such validator '"+r.name+"' exists."));if(r.options.hasTarget&&i.dependencies){var o=$(i.dependencies,function(e){return e.name===r.name});o&&(s=o.field.alias,n=[o.field.value].concat(n.slice(1)))}else"required"===r.name&&i.rejectsFalse&&(n=n.length?n:[!0]);if(r.options.isDate){var u=this._getDateFormat(i.rules);"date_format"!==r.name&&n.push(u)}var l=t(e,this._convertParamArrayToObj(n,r.name));return m(l.then)?l.then(function(e){var t=!0,n={};return Array.isArray(e)?t=e.every(function(e){return h(e)?e.valid:e}):(t=h(e)?e.valid:e,n=e.data),{valid:t,errors:t?[]:[a._createFieldError(i,r,n,s)]}}):(h(l)||(l={valid:l,data:{}}),{valid:l.valid,errors:l.valid?[]:[this._createFieldError(i,r,l.data,s)]})},re._merge=function(e,t){var n=t.validator,i=t.options,r=t.paramNames,a=m(n)?n:n.validate;n.getMessage&&Ee.i18nDriver.setMessage(re.locale,e,n.getMessage),z.add(e,{validate:a,options:i,paramNames:r})},re._guardExtend=function(e,t){if(!m(t)&&!m(t.validate))throw v("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.")},re.prototype._createFieldError=function(e,t,n,i){var r=this;return{id:e.id,vmId:e.vmId,field:e.name,msg:this._formatErrorMessage(e,t,n,i),rule:t.name,scope:e.scope,regenerate:function(){return r._formatErrorMessage(e,t,n,i)}}},re.prototype._resolveField=function(e,t,n){if("#"===e[0])return this.fields.find({id:e.slice(1)});if(!d(t))return this.fields.find({name:e,scope:t,vmId:n});if(x(e,".")){var i=e.split("."),r=i[0],a=i.slice(1),s=this.fields.find({name:a.join("."),scope:r,vmId:n});if(s)return s}return this.fields.find({name:e,scope:null,vmId:n})},re.prototype._handleFieldNotFound=function(e,t){var n=d(t)?e:(d(t)?"":t+".")+e;return Promise.reject(v('Validating a non-existent field: "'+n+'". Use "attach()" first.'))},re.prototype._handleValidationResults=function(n,t){var i=this,e=n.map(function(e){return{id:e.id}});this.errors.removeById(e.map(function(e){return e.id})),n.forEach(function(e){i.errors.remove(e.field,e.scope,t)});var r=n.reduce(function(e,t){return e.push.apply(e,t.errors),e},[]);this.errors.add(r),this.fields.filter(e).forEach(function(t){var e=$(n,function(e){return e.id===t.id});t.setFlags({pending:!1,valid:e.valid,validated:!0})})},re.prototype._shouldSkip=function(e,t){return!1!==e.bails&&(!!e.isDisabled||!e.isRequired&&(d(t)||""===t||(n=t,Array.isArray(n)&&0===n.length)));var n},re.prototype._shouldBail=function(e){return void 0!==e.bails?e.bails:this.fastExit},re.prototype._validate=function(i,r,e){var a=this;void 0===e&&(e={});var t=e.initial;if(this._shouldSkip(i,r))return Promise.resolve({valid:!0,id:i.id,field:i.name,scope:i.scope,errors:[]});var s=[],o=[],u=!1;return Object.keys(i.rules).filter(function(e){return!t||!z.has(e)||z.isImmediate(e)}).some(function(e){var t=z.getOptions(e),n=a._test(i,r,{name:e,params:i.rules[e],options:t});return m(n.then)?s.push(n):!n.valid&&a._shouldBail(i)?(o.push.apply(o,n.errors),u=!0):s.push(new Promise(function(e){return e(n)})),u}),u?Promise.resolve({valid:!1,errors:o,id:i.id,field:i.name,scope:i.scope}):Promise.all(s).then(function(e){return e.reduce(function(e,t){var n;return t.valid||(n=e.errors).push.apply(n,t.errors),e.valid=e.valid&&t.valid,e},{valid:!0,errors:o,id:i.id,field:i.name,scope:i.scope})})},Object.defineProperties(re.prototype,ae),Object.defineProperties(re,se);var oe=function(n,i){var r={pristine:function(e,t){return e&&t},dirty:function(e,t){return e||t},touched:function(e,t){return e||t},untouched:function(e,t){return e&&t},valid:function(e,t){return e&&t},invalid:function(e,t){return e||t},pending:function(e,t){return e||t},required:function(e,t){return e||t},validated:function(e,t){return e&&t}};return Object.keys(r).reduce(function(e,t){return e[t]=r[t](n[t],i[t]),e},{})},ue=function(i,r){return void 0===r&&(r=!0),Object.keys(i).reduce(function(e,t){if(!e)return e=b({},i[t]);var n=0===t.indexOf("$");return r&&n?oe(ue(i[t]),e):!r&&n?e:e=oe(e,i[t])},null)},le=null;function ce(e){return{errors:e.messages,flags:e.flags,classes:e.classes,valid:e.isValid,aria:{"aria-invalid":e.flags.invalid?"true":"false","aria-required":e.isRequired?"true":"false"}}}function de(e){var n=this,t=this.value!==e.value||this._needsValidation,i=this.flags.validated;if(this.initialized||(this.initialValue=e.value),t){this.value=e.value,this.validate().then(this.immediate||i?this.applyResult:function(e){var t=e.valid;n.setFlags({valid:t,invalid:!t})})}this._needsValidation=!1}function fe(n){return{onInput:function(e){n.syncValue(e),n.setFlags({dirty:!0,pristine:!1})},onBlur:function(){n.setFlags({touched:!0,untouched:!1})},onValidate:c(function(){var t=n.validate();(n._waiting=t).then(function(e){t===n._waiting&&(n.applyResult(e),n._waiting=null)})},n.debounce)}}var ve=0,he={$__veeInject:!1,inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver||(this.$vnode.context.$_veeObserver={refs:{},$subscribe:function(e){this.refs[e.vid]=e},$unsubscribe:function(e){delete this.refs[e.vid]}}),this.$vnode.context.$_veeObserver}}},props:{vid:{type:[String,Number],default:function(){return++ve}},name:{type:String,default:null},events:{type:[Array,String],default:function(){return["input"]}},rules:{type:[Object,String],default:null},immediate:{type:Boolean,default:!1},bails:{type:Boolean,default:function(){return Ee.config.fastExit}},debounce:{type:Number,default:function(){return Ee.config.delay||0}}},watch:{rules:{deep:!0,handler:function(){this._needsValidation=!0}}},data:function(){return{messages:[],value:void 0,initialized:!1,initialValue:void 0,flags:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},id:null}},methods:{setFlags:function(t){var n=this;Object.keys(t).forEach(function(e){n.flags[e]=t[e]})},syncValue:function(e){var t=Y(e)?e.target.value:e;this.value=t},reset:function(){this.messages=[],this._waiting=null,this.initialValue=this.value;var e={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1};e.changed=!1,this.setFlags(e)},validate:function(){var i,r,t=this;return this.setFlags({pending:!0}),le.verify(this.value,this.rules,{name:this.name,values:(i=this,r=i.$_veeObserver.refs,i.fieldDeps.reduce(function(e,t){if(!r[t])return e;e[t]=r[t].value;var n="$__"+t;return m(i[n])||(i[n]=r[t].$watch("value",function(){i.validate(i.value).then(i.applyResult),i[n]()})),e},{})),bails:this.bails}).then(function(e){return t.setFlags({pending:!1}),e})},applyResult:function(e){var t=e.errors;this.messages=t,this.setFlags({valid:!t.length,changed:this.value!==this.initialValue,invalid:!!t.length,validated:!0})},registerField:function(){var e,t,n;le||(le=Ee.instance._validator),t=(e=this).id,n=e.vid,t===n&&e.$_veeObserver.refs[t]||(t!==n&&e.$_veeObserver.refs[t]===e&&e.$_veeObserver.$unsubscribe(e),e.$_veeObserver.$subscribe(e),e.id=n)}},computed:{isValid:function(){return this.flags.valid},fieldDeps:function(){var t=f(this.rules);return Object.keys(t).filter(z.isTargetRule).map(function(e){return t[e][0]})},normalizedEvents:function(){var t=this;return K(this.events).map(function(e){return"input"===e?t._inputEventName:e})},isRequired:function(){return!!f(this.rules).required},classes:function(){var i=this,r=Ee.config.classNames;return Object.keys(this.flags).reduce(function(e,t){var n=r&&r[t]||t;return n&&(e[n]=i.flags[t]),e},{})}},render:function(e){var t=this;this.registerField();var n=ce(this),i=this.$scopedSlots.default;if(!m(i))return T(0,this.$slots.default);var r=i(n);return function i(e){if(C(e))return[e];var t=Array.isArray(e)?e:e.children;return Array.isArray(t)?t.reduce(function(e,t){var n=i(t);return n.length&&e.push.apply(e,n),e},[]):[]}(r).forEach(function(e){(function(t){var e=C(t);this._inputEventName=this._inputEventName||R(t,e),de.call(this,e);var n=fe(this),i=n.onInput,r=n.onBlur,a=n.onValidate;M(t,this._inputEventName,i),M(t,"blur",r),this.normalizedEvents.forEach(function(e){M(t,e,a)}),this.initialized=!0}).call(t,e)}),T(0,r)},beforeDestroy:function(){this.$_veeObserver.$unsubscribe(this)}},pe={pristine:"every",dirty:"some",touched:"some",untouched:"every",valid:"every",invalid:"some",pending:"some",validated:"every"};var me={name:"ValidationObserver",provide:function(){return{$_veeObserver:this}},data:function(){return{refs:{}}},methods:{$subscribe:function(e){var t;this.refs=Object.assign({},this.refs,((t={})[e.vid]=e,t))},$unsubscribe:function(e){var t=e.vid;delete this.refs[t],this.refs=Object.assign({},this.refs)},validate:function(){return Promise.all(w(this.refs).map(function(t){return t.validate().then(function(e){return t.applyResult(e),e})})).then(function(e){return e.every(function(e){return e.valid})})},reset:function(){return w(this.refs).forEach(function(e){e.reset()})}},computed:{ctx:function(){return w(this.refs).reduce(function(i,r){return Object.keys(pe).forEach(function(e){var t,n;e in i?i[e]=(t=i[e],n=r.flags[e],[t,n][pe[e]](function(e){return e})):i[e]=r.flags[e]}),i.errors[r.vid]=r.messages,i},{errors:{}})}},render:function(e){var t=this.$scopedSlots.default;return m(t)?T(0,t(this.ctx)):T(0,this.$slots.default)}};var ge=function(n){return h(n)?Object.keys(n).reduce(function(e,t){return e[t]=ge(n[t]),e},{}):m(n)?n("{0}",["{1}","{2}","{3}"]):n},ye=function(e,t){this.i18n=e,this.rootKey=t},be={locale:{configurable:!0}};be.locale.get=function(){return this.i18n.locale},be.locale.set=function(e){n("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},ye.prototype.getDateFormat=function(e){return this.i18n.getDateTimeFormat(e||this.locale)},ye.prototype.setDateFormat=function(e,t){this.i18n.setDateTimeFormat(e||this.locale,t)},ye.prototype.getMessage=function(e,t,n){var i=this.rootKey+".messages."+t,r=this.i18n.t(i,n);return r!==i?r:this.i18n.t(this.rootKey+".messages._default",n)},ye.prototype.getAttribute=function(e,t,n){void 0===n&&(n="");var i=this.rootKey+".attributes."+t,r=this.i18n.t(i);return r!==i?r:n},ye.prototype.getFieldMessage=function(e,t,n,i){var r=this.rootKey+".custom."+t+"."+n,a=this.i18n.t(r,i);return a!==r?a:this.getMessage(e,n,i)},ye.prototype.merge=function(s){var o=this;Object.keys(s).forEach(function(e){var t,n,i,r=E({},l(e+"."+o.rootKey,o.i18n.messages,{})),a=E(r,(n=s[e],i={},n.messages&&(i.messages=ge(n.messages)),n.custom&&(i.custom=ge(n.custom)),n.attributes&&(i.attributes=n.attributes),d(n.dateFormat)||(i.dateFormat=n.dateFormat),i));o.i18n.mergeLocaleMessage(e,((t={})[o.rootKey]=a,t)),a.dateFormat&&o.i18n.setDateTimeFormat(e,a.dateFormat)})},ye.prototype.setMessage=function(e,t,n){var i,r;this.merge(((r={})[e]={messages:(i={},i[t]=n,i)},r))},ye.prototype.setAttribute=function(e,t,n){var i,r;this.merge(((r={})[e]={attributes:(i={},i[t]=n,i)},r))},Object.defineProperties(ye.prototype,be);var _e,$e,Ie,Ae=b({},{locale:"en",delay:0,errorBagName:"errors",dictionary:null,fieldsBagName:"fields",classes:!1,classNames:null,events:"input",inject:!0,fastExit:!0,aria:!0,validity:!1,i18n:null,i18nRootKey:"validation"}),Ee=function(e,t){this.configure(e),t&&(_e=t),(Ie=this)._validator=new re(null,{fastExit:e&&e.fastExit}),this._initVM(this.config),this._initI18n(this.config)},Oe={i18nDriver:{configurable:!0},config:{configurable:!0}},we={instance:{configurable:!0},i18nDriver:{configurable:!0},config:{configurable:!0}};return Ee.setI18nDriver=function(e,t){D.setDriver(e,t)},Ee.configure=function(e){Ae=b({},Ae,e)},Ee.use=function(e,t){return void 0===t&&(t={}),m(e)?Ie?void e({Validator:re,ErrorBag:k,Rules:re.rules},t):($e||($e=[]),void $e.push({plugin:e,options:t})):n("The plugin must be a callable function")},Ee.install=function(e,t){_e&&e===_e||(_e=e,Ie=new Ee(t),function(){try{var e=Object.defineProperty({},"passive",{get:function(){H=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(e){H=!1}}(),_e.mixin(te),_e.directive("validate",ie),$e&&($e.forEach(function(e){var t=e.plugin,n=e.options;Ee.use(t,n)}),$e=null))},we.instance.get=function(){return Ie},Oe.i18nDriver.get=function(){return D.getDriver()},we.i18nDriver.get=function(){return D.getDriver()},Oe.config.get=function(){return Ae},we.config.get=function(){return Ae},Ee.prototype._initVM=function(e){var t=this;this._vm=new _e({data:function(){return{errors:t._validator.errors,fields:t._validator.fields}}})},Ee.prototype._initI18n=function(e){var t=this,n=e.dictionary,i=e.i18n,r=e.i18nRootKey,a=e.locale,s=function(){t._validator.errors.regenerate()};i?(Ee.setI18nDriver("i18n",new ye(i,r)),i._vm.$watch("locale",s)):"undefined"!=typeof window&&this._vm.$on("localeChanged",s),n&&this.i18nDriver.merge(n),a&&!i&&this._validator.localize(a)},Ee.prototype.configure=function(e){Ee.configure(e)},Ee.prototype.resolveConfig=function(e){var t=l("$options.$_veeValidate",e,{});return b({},this.config,t)},Object.defineProperties(Ee.prototype,Oe),Object.defineProperties(Ee,we),Ee.version="2.1.3",Ee.mixin=te,Ee.directive=ie,Ee.Validator=re,Ee.ErrorBag=k,Ee.mapFields=function(e){if(!e)return function(){return ue(this.$validator.flags)};var t,a=(t=e,Array.isArray(t)?t.reduce(function(e,t){return x(t,".")?e[t.split(".")[1]]=t:e[t]=t,e},{}):t);return Object.keys(a).reduce(function(e,i){var r=a[i];return e[i]=function(){if(this.$validator.flags[r])return this.$validator.flags[r];if("*"===a[i])return ue(this.$validator.flags,!1);if(r.indexOf(".")<=0)return{};var e=r.split("."),t=e[0],n=e.slice(1);return t=this.$validator.flags["$"+t],"*"===(n=n.join("."))&&t?ue(t):t&&t[n]?t[n]:{}},e},{})},Ee.ValidationProvider=he,Ee.ValidationObserver=me,Ee.withValidation=function(e,v){void 0===v&&(v=null);var h=m(e)?e.options:e;h.$__veeInject=!1;var t={name:(h.name||"AnonymousHoc")+"WithValidation",props:b({},he.props),data:he.data,computed:b({},he.computed),methods:b({},he.methods),$__veeInject:!1,beforeDestroy:he.beforeDestroy,inject:he.inject};v||(v=function(e){return e});var p=h.model&&h.model.event||"input";return t.render=function(e){var t;this.registerField();var n=ce(this),i=b({},this.$listeners),r=C(this.$vnode);this._inputEventName=this._inputEventName||R(this.$vnode,r),de.call(this,r);var a=fe(this),s=a.onInput,o=a.onBlur,u=a.onValidate;L(i,p,s),L(i,"blur",o),this.normalizedEvents.forEach(function(e,t){L(i,e,u)});var l,c,d=(P(this.$vnode)||{prop:"value"}).prop,f=b({},this.$attrs,((t={})[d]=r.value,t),v(n));return e(h,{attrs:this.$attrs,props:f,on:i},(l=this.$slots,c=this.$vnode.context,Object.keys(l).reduce(function(e,t){return l[t].forEach(function(e){e.context||(l[t].context=c,e.data||(e.data={}),e.data.slot=t)}),e.concat(l[t])},[])))},t},Ee});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VeeValidate=t()}(this,function(){"use strict";var a=function(e){return x(["text","password","search","email","tel","url","textarea","number"],e.type)},s=function(e){return x(["radio","checkbox"],e.type)},o=function(e,t){return e.getAttribute("data-vv-"+t)},d=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.every(function(e){return null==e})},u=function(t,n){if(t instanceof RegExp&&n instanceof RegExp)return u(t.source,n.source)&&u(t.flags,n.flags);if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;for(var e=0;e<t.length;e++)if(!u(t[e],n[e]))return!1;return!0}return h(t)&&h(n)?Object.keys(t).every(function(e){return u(t[e],n[e])})&&Object.keys(n).every(function(e){return u(t[e],n[e])}):t===n},r=function(e){return d(e)?null:"FORM"===e.tagName?e:d(e.form)?d(e.parentNode)?null:r(e.parentNode):e.form},l=function(e,t,n){if(void 0===n&&(n=void 0),!e||!t)return n;var i=t;return e.split(".").every(function(e){return e in i?(i=i[e],!0):(i=n,!1)}),i},c=function(n,i,r){return void 0===i&&(i=0),void 0===r&&(r={cancelled:!1}),0===i?n:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];clearTimeout(a),(a=setTimeout(function(){a=null,r.cancelled||n.apply(void 0,e)},i))||n.apply(void 0,e)};var a},i=function(e,t){return t?e?("string"==typeof t&&(t=f(t)),b({},t,f(e))):f(t):f(e)},f=function(i){return i?h(i)?Object.keys(i).reduce(function(e,t){var n=[];return n=!0===i[t]?[]:Array.isArray(i[t])?i[t]:h(i[t])?i[t]:[i[t]],!1!==i[t]&&(e[t]=n),e},{}):"string"!=typeof i?(n("rules must be either a string or an object."),{}):i.split("|").reduce(function(e,t){var n,i,r,a=(i=[],r=(n=t).split(":")[0],x(n,":")&&(i=n.split(":").slice(1).join(":").split(",")),{name:r,params:i});return a.name&&(e[a.name]=a.params),e},{}):{}},n=function(e){console.warn("[vee-validate] "+e)},v=function(e){return new Error("[vee-validate] "+e)},h=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)},m=function(e){return"function"==typeof e},p=function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},g=function(t,e,n){var i,r;if(t&&e){if(!Array.isArray(e))return n?(r=e,void((i=t).classList?i.classList.add(r):p(i,r)||(i.className+=" "+r))):void function(e,t){if(e.classList)e.classList.remove(t);else if(p(e,t)){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}(t,e);e.forEach(function(e){return g(t,e,n)})}},y=function(e){if(m(Array.from))return Array.from(e);for(var t=[],n=e.length,i=0;i<n;i++)t.push(e[i]);return t},b=function(e){for(var t=[],n=arguments.length-1;0<n--;)t[n]=arguments[n+1];if(m(Object.assign))return Object.assign.apply(Object,[e].concat(t));if(null==e)throw new TypeError("Cannot convert undefined or null to object");var i=Object(e);return t.forEach(function(t){null!=t&&Object.keys(t).forEach(function(e){i[e]=t[e]})}),i},t=0,_="{id}",$=function(e,t){for(var n=Array.isArray(e)?e:y(e),i=0;i<n.length;i++)if(t(n[i]))return n[i]},I=function(e){if(!e)return!1;var t=e.componentOptions.tag;return/^(keep-alive|transition|transition-group)$/.test(t)},A=function(e){if("number"==typeof e)return e;if("string"==typeof e)return parseInt(e);var t={};for(var n in e)t[n]=parseInt(e[n]);return t},E=function(i,r){return h(i)&&h(r)&&Object.keys(r).forEach(function(e){var t,n;if(h(r[e]))return i[e]||b(i,((t={})[e]={},t)),void E(i[e],r[e]);b(i,((n={})[e]=r[e],n))}),i},O=function(e,t){if(e.required&&(t=i("required",t)),a(e))return"email"===e.type&&(t=i("email"+(e.multiple?":multiple":""),t)),e.pattern&&(t=i({regex:e.pattern},t)),0<=e.maxLength&&e.maxLength<524288&&(t=i("max:"+e.maxLength,t)),0<e.minLength&&(t=i("min:"+e.minLength,t)),"number"===e.type&&(t=i("decimal",t),""!==e.min&&(t=i("min_value:"+e.min,t)),""!==e.max&&(t=i("max_value:"+e.max,t))),t;if(x(["date","week","month","datetime-local","time"],e.type)){var n=e.step&&Number(e.step)<60?"HH:mm:ss":"HH:mm";if("date"===e.type)return i("date_format:YYYY-MM-DD",t);if("datetime-local"===e.type)return i("date_format:YYYY-MM-DDT"+n,t);if("month"===e.type)return i("date_format:YYYY-MM",t);if("week"===e.type)return i("date_format:YYYY-[W]WW",t);if("time"===e.type)return i("date_format:"+n,t)}return t},w=function(t){return m(Object.values)?Object.values(t):Object.keys(t).map(function(e){return t[e]})},x=function(e,t){return-1!==e.indexOf(t)},j="en",e=function(e){void 0===e&&(e={}),this.container={},this.merge(e)},F={locale:{configurable:!0}};F.locale.get=function(){return j},F.locale.set=function(e){j=e||"en"},e.prototype.hasLocale=function(e){return!!this.container[e]},e.prototype.setDateFormat=function(e,t){this.container[e]||(this.container[e]={}),this.container[e].dateFormat=t},e.prototype.getDateFormat=function(e){return this.container[e]&&this.container[e].dateFormat?this.container[e].dateFormat:null},e.prototype.getMessage=function(e,t,n){var i=null;return i=this.hasMessage(e,t)?this.container[e].messages[t]:this._getDefaultMessage(e),m(i)?i.apply(void 0,n):i},e.prototype.getFieldMessage=function(e,t,n,i){if(!this.hasLocale(e))return this.getMessage(e,n,i);var r=this.container[e].custom&&this.container[e].custom[t];if(!r||!r[n])return this.getMessage(e,n,i);var a=r[n];return m(a)?a.apply(void 0,i):a},e.prototype._getDefaultMessage=function(e){return this.hasMessage(e,"_default")?this.container[e].messages._default:this.container.en.messages._default},e.prototype.getAttribute=function(e,t,n){return void 0===n&&(n=""),this.hasAttribute(e,t)?this.container[e].attributes[t]:n},e.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.container[e].messages&&this.container[e].messages[t])},e.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.container[e].attributes&&this.container[e].attributes[t])},e.prototype.merge=function(e){E(this.container,e)},e.prototype.setMessage=function(e,t,n){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].messages[t]=n},e.prototype.setAttribute=function(e,t,n){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].attributes[t]=n},Object.defineProperties(e.prototype,F);var N={default:new e({en:{messages:{},attributes:{},custom:{}}})},V="default",D=function(){};D._checkDriverName=function(e){if(!e)throw v("you must provide a name to the dictionary driver")},D.setDriver=function(e,t){void 0===t&&(t=null),this._checkDriverName(e),t&&(N[e]=t),V=e},D.getDriver=function(){return N[V]};var k=function e(t,n){void 0===t&&(t=null),void 0===n&&(n=null),this.vmId=n||null,this.items=t&&t instanceof e?t.items:[]};function P(e){return e.data?e.data.model?e.data.model:!!e.data.directives&&$(e.data.directives,function(e){return"model"===e.name}):null}function C(e){return e.componentOptions?e.componentOptions.Ctor.options.model:null}function L(e,t,n){if(m(e[t])){var i=e[t];e[t]=[i]}Array.isArray(e[t])?e[t].push(n):d(e[t])&&(e[t]=[n])}function M(e,t,n){var i,r,a,s,o,u;e.componentOptions&&(r=t,a=n,(i=e).componentOptions.listeners||(i.componentOptions.listeners={}),L(i.componentOptions.listeners,r,a)),o=t,u=n,d((s=e).data.on)&&(s.data.on={}),L(s.data.on,o,u)}function R(e,t){return e.componentOptions?(C(e)||{event:"input"}).event:t&&t.modifiers&&t.modifiers.lazy?"change":e.data.attrs&&a({type:e.data.attrs.type||"text"})?"input":"change"}function T(e,t){return Array.isArray(t)&&1===t.length?t[0]:t}k.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var e=this,t=0;return{next:function(){return{value:e.items[t++],done:t>e.items.length}}}},k.prototype.add=function(e){var t;(t=this.items).push.apply(t,this._normalizeError(e))},k.prototype._normalizeError=function(e){var t=this;return Array.isArray(e)?e.map(function(e){return e.scope=d(e.scope)?null:e.scope,e.vmId=d(e.vmId)?t.vmId||null:e.vmId,e}):(e.scope=d(e.scope)?null:e.scope,e.vmId=d(e.vmId)?this.vmId||null:e.vmId,[e])},k.prototype.regenerate=function(){this.items.forEach(function(e){e.msg=m(e.regenerate)?e.regenerate():e.msg})},k.prototype.update=function(t,e){var n=$(this.items,function(e){return e.id===t});if(n){var i=this.items.indexOf(n);this.items.splice(i,1),n.scope=e.scope,this.items.push(n)}},k.prototype.all=function(i){var r=this;return this.items.filter(function(e){var t=!0,n=!0;return d(i)||(t=e.scope===i),d(r.vmId)||(n=e.vmId===r.vmId),n&&t}).map(function(e){return e.msg})},k.prototype.any=function(i){var r=this;return!!this.items.filter(function(e){var t=!0,n=!0;return d(i)||(t=e.scope===i),d(r.vmId)||(n=e.vmId===r.vmId),n&&t}).length},k.prototype.clear=function(e){var t=this,n=d(this.vmId)?function(){return!0}:function(e){return e.vmId===t.vmId};d(e)&&(e=null);for(var i=0;i<this.items.length;++i)n(this.items[i])&&this.items[i].scope===e&&(this.items.splice(i,1),--i)},k.prototype.collect=function(e,t,n){var i=this;void 0===n&&(n=!0);var r=!d(e)&&!e.includes("*"),a=function(e){var t=e.reduce(function(e,t){return(d(i.vmId)||t.vmId===i.vmId)&&(e[t.field]||(e[t.field]=[]),e[t.field].push(n?t.msg:t)),e},{});return r?w(t)[0]||[]:t};if(d(e))return a(this.items);var s=d(t)?String(e):t+"."+e,o=this._makeCandidateFilters(s),u=o.isPrimary,l=o.isAlt,c=this.items.reduce(function(e,t){return u(t)&&e.primary.push(t),l(t)&&e.alt.push(t),e},{primary:[],alt:[]});return a(c=c.primary.length?c.primary:c.alt)},k.prototype.count=function(){var t=this;return this.vmId?this.items.filter(function(e){return e.vmId===t.vmId}).length:this.items.length},k.prototype.firstById=function(t){var e=$(this.items,function(e){return e.id===t});return e?e.msg:void 0},k.prototype.first=function(e,t){void 0===t&&(t=null);var n=d(t)?e:t+"."+e,i=this._match(n);return i&&i.msg},k.prototype.firstRule=function(e,t){var n=this.collect(e,t,!1);return n.length&&n[0].rule||void 0},k.prototype.has=function(e,t){return void 0===t&&(t=null),!!this.first(e,t)},k.prototype.firstByRule=function(e,t,n){void 0===n&&(n=null);var i=this.collect(e,n,!1).filter(function(e){return e.rule===t})[0];return i&&i.msg||void 0},k.prototype.firstNot=function(e,t,n){void 0===t&&(t="required"),void 0===n&&(n=null);var i=this.collect(e,n,!1).filter(function(e){return e.rule!==t})[0];return i&&i.msg||void 0},k.prototype.removeById=function(t){var e=function(e){return e.id===t};Array.isArray(t)&&(e=function(e){return-1!==t.indexOf(e.id)});for(var n=0;n<this.items.length;++n)e(this.items[n])&&(this.items.splice(n,1),--n)},k.prototype.remove=function(e,t,n){if(!d(e))for(var i,r=d(t)?String(e):t+"."+e,a=this._makeCandidateFilters(r).isPrimary,s=0;s<this.items.length;++s)i=this.items[s],(d(n)?a(i):a(i)&&i.vmId===n)&&(this.items.splice(s,1),--s)},k.prototype._makeCandidateFilters=function(e){var t=this,n=function(){return!0},i=function(){return!0},r=function(){return!0},a=function(){return!0},s=function(e){var t=null;if(x(e,":")&&(t=e.split(":").pop(),e=e.replace(":"+t,"")),"#"===e[0])return{id:e.slice(1),rule:t,name:null,scope:null};var n=null,i=e;if(x(e,".")){var r=e.split(".");n=r[0],i=r.slice(1).join(".")}return{id:null,scope:n,name:i,rule:t}}(e),o=s.id,u=s.rule,l=s.scope,c=s.name;if(u&&(n=function(e){return e.rule===u}),o)return{isPrimary:function(e){return n(e)&&function(e){return o===e.id}},isAlt:function(){return!1}};i=d(l)?function(e){return d(e.scope)}:function(e){return e.scope===l},d(c)||"*"===c||(r=function(e){return e.field===c}),d(this.vmId)||(a=function(e){return e.vmId===t.vmId});return{isPrimary:function(e){return a(e)&&r(e)&&n(e)&&i(e)},isAlt:function(e){return a(e)&&n(e)&&e.field===l+"."+c}}},k.prototype._match=function(e){if(!d(e)){var t=this._makeCandidateFilters(e),a=t.isPrimary,s=t.isAlt;return this.items.reduce(function(e,t,n,i){var r=n===i.length-1;return e.primary?r?e.primary:e:(a(t)&&(e.primary=t),s(t)&&(e.alt=t),r?e.primary||e.alt:e)},{})}};var q=function(){};q.generate=function(e,t,n){var i=q.resolveModel(t,n),r=Ie.resolveConfig(n.context);return{name:q.resolveName(e,n),el:e,listen:!t.modifiers.disable,bails:!!t.modifiers.bails||!0!==t.modifiers.continues&&void 0,scope:q.resolveScope(e,t,n),vm:q.makeVM(n.context),expression:t.value,component:n.componentInstance,classes:r.classes,classNames:r.classNames,getter:q.resolveGetter(e,n,i),events:q.resolveEvents(e,n)||r.events,model:i,delay:q.resolveDelay(e,n,r),rules:q.resolveRules(e,t,n),immediate:!!t.modifiers.initial||!!t.modifiers.immediate,validity:r.validity,aria:r.aria,initialValue:q.resolveInitialValue(n)}},q.getCtorConfig=function(e){return e.componentInstance?l("componentInstance.$options.$_veeValidate",e):null},q.resolveRules=function(e,t,n){var i="";if(t.value||t&&t.expression||(i=o(e,"rules")),t.value&&x(["string","object"],typeof t.value.rules)?i=t.value.rules:t.value&&(i=t.value),n.componentInstance)return i;var r=f(i);return Ie.config.validity?b({},O(e,{}),r):r},q.resolveInitialValue=function(e){var t=e.data.model||$(e.data.directives,function(e){return"model"===e.name});return t&&t.value},q.makeVM=function(e){return{get $el(){return e.$el},get $refs(){return e.$refs},$watch:e.$watch?e.$watch.bind(e):function(){},$validator:e.$validator?{errors:e.$validator.errors,validate:e.$validator.validate.bind(e.$validator),update:e.$validator.update.bind(e.$validator)}:null}},q.resolveDelay=function(e,t,n){var i=o(e,"delay"),r=n&&"delay"in n?n.delay:0;return!i&&t.componentInstance&&t.componentInstance.$attrs&&(i=t.componentInstance.$attrs["data-vv-delay"]),h(r)?(d(i)||(r.input=i),A(r)):A(i||r)},q.resolveEvents=function(e,t){var n=o(e,"validate-on");if(!n&&t.componentInstance&&t.componentInstance.$attrs&&(n=t.componentInstance.$attrs["data-vv-validate-on"]),!n&&t.componentInstance){var i=q.getCtorConfig(t);n=i&&i.events}if(!n&&Ie.config.events&&(n=Ie.config.events),n&&t.componentInstance&&x(n,"input")){var r=(t.componentInstance.$options.model||{event:"input"}).event;if(!r)return n;n=n.replace("input",r)}return n},q.resolveScope=function(e,t,n){void 0===n&&(n={});var i=null;return n.componentInstance&&d(i)&&(i=n.componentInstance.$attrs&&n.componentInstance.$attrs["data-vv-scope"]),d(i)?function(e){var t=o(e,"scope");if(d(t)){var n=r(e);n&&(t=o(n,"scope"))}return d(t)?null:t}(e):i},q.resolveModel=function(e,t){if(e.arg)return{expression:e.arg};var n=P(t);if(!n)return null;var i,r,a,s=!/[^\w.$]/.test(n.expression)&&(i=n.expression,r=t.context,a=r,i.split(".").every(function(e){return e in a&&(a=a[e],!0)})),o=!(!n.modifiers||!n.modifiers.lazy);return s?{expression:n.expression,lazy:o}:{expression:null,lazy:o}},q.resolveName=function(e,t){var n=o(e,"name");if(!n&&!t.componentInstance)return e.name;if(!n&&t.componentInstance&&t.componentInstance.$attrs&&(n=t.componentInstance.$attrs["data-vv-name"]||t.componentInstance.$attrs.name),n||!t.componentInstance)return n;var i=q.getCtorConfig(t);return i&&m(i.name)?i.name.bind(t.componentInstance)():t.componentInstance.name},q.resolveGetter=function(n,e,t){if(t&&t.expression)return function(){return l(t.expression,e.context)};if(e.componentInstance){var i=o(n,"value-path")||e.componentInstance.$attrs&&e.componentInstance.$attrs["data-vv-value-path"];if(i)return function(){return l(i,e.componentInstance)};var r=q.getCtorConfig(e);if(r&&m(r.value)){var a=r.value.bind(e.componentInstance);return function(){return a()}}var s=(e.componentInstance.$options.model||{prop:"value"}).prop;return function(){return e.componentInstance[s]}}switch(n.type){case"checkbox":return function(){var e=document.querySelectorAll('input[name="'+n.name+'"]');if((e=y(e).filter(function(e){return e.checked})).length)return e.map(function(e){return e.value})};case"radio":return function(){var e=document.querySelectorAll('input[name="'+n.name+'"]'),t=$(e,function(e){return e.checked});return t&&t.value};case"file":return function(e){return y(n.files)};case"select-multiple":return function(){return y(n.options).filter(function(e){return e.selected}).map(function(e){return e.value})};default:return function(){return n&&n.value}}};var S={},z=function(){},B={rules:{configurable:!0}};z.add=function(e,t){var n=t.validate,i=t.options,r=t.paramNames;S[e]={validate:n,options:i,paramNames:r}},B.rules.get=function(){return S},z.has=function(e){return!!S[e]},z.isImmediate=function(e){return!(!S[e]||!S[e].options.immediate)},z.isTargetRule=function(e){return!(!S[e]||!S[e].options.hasTarget)},z.remove=function(e){delete S[e]},z.getParamNames=function(e){return S[e]&&S[e].paramNames},z.getOptions=function(e){return S[e]&&S[e].options},z.getValidatorMethod=function(e){return S[e]?S[e].validate:null},Object.defineProperties(z,B);var Y=function(e){return"undefined"!=typeof Event&&m(Event)&&e instanceof Event||e&&e.srcElement},K=function(e){return e?"string"==typeof e?e.split("|"):e:[]},H=!0,W=function(e,t,n){e.addEventListener(t,n,!!H&&{passive:!0})},G={targetOf:null,immediate:!1,scope:null,listen:!0,name:null,rules:{},vm:null,classes:!1,validity:!0,aria:!0,events:"input|blur",delay:0,classNames:{touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"}},U=function(e){void 0===e&&(e={}),this.id=(9999<=t&&(t=0,_=_.replace("{id}","_{id}")),t++,_.replace("{id}",String(t))),this.el=e.el,this.updated=!1,this.dependencies=[],this.vmId=e.vmId,this.watchers=[],this.events=[],this.delay=0,this.rules={},this._cacheId(e),this.classNames=b({},G.classNames),e=b({},G,e),this._delay=d(e.delay)?0:e.delay,this.validity=e.validity,this.aria=e.aria,this.flags={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},this.vm=e.vm,this.componentInstance=e.component,this.ctorConfig=this.componentInstance?l("$options.$_veeValidate",this.componentInstance):void 0,this.update(e),this.initialValue=this.value,this.updated=!1},J={validator:{configurable:!0},isRequired:{configurable:!0},isDisabled:{configurable:!0},alias:{configurable:!0},value:{configurable:!0},bails:{configurable:!0},rejectsFalse:{configurable:!0}};J.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:{validate:function(){}}},J.isRequired.get=function(){return!!this.rules.required},J.isDisabled.get=function(){return!(!this.componentInstance||!this.componentInstance.disabled)||!(!this.el||!this.el.disabled)},J.alias.get=function(){if(this._alias)return this._alias;var e=null;return this.ctorConfig&&this.ctorConfig.alias&&(e=m(this.ctorConfig.alias)?this.ctorConfig.alias.call(this.componentInstance):this.ctorConfig.alias),!e&&this.el&&(e=o(this.el,"as")),!e&&this.componentInstance?this.componentInstance.$attrs&&this.componentInstance.$attrs["data-vv-as"]:e},J.value.get=function(){if(m(this.getter))return this.getter()},J.bails.get=function(){return this._bails},J.rejectsFalse.get=function(){return this.componentInstance&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},U.prototype.matches=function(e){var t=this;return!e||(e.id?this.id===e.id:!!(d(e.vmId)?function(){return!0}:function(e){return e===t.vmId})(e.vmId)&&(void 0===e.name&&void 0===e.scope||(void 0===e.scope?this.name===e.name:void 0===e.name?this.scope===e.scope:e.name===this.name&&e.scope===this.scope)))},U.prototype._cacheId=function(e){this.el&&!e.targetOf&&(this.el._veeValidateId=this.id)},U.prototype.waitFor=function(e){this._waitingFor=e},U.prototype.isWaitingFor=function(e){return this._waitingFor===e},U.prototype.update=function(e){var t,n,i;this.targetOf=e.targetOf||null,this.immediate=e.immediate||this.immediate||!1,!d(e.scope)&&e.scope!==this.scope&&m(this.validator.update)&&this.validator.update(this.id,{scope:e.scope}),this.scope=d(e.scope)?d(this.scope)?null:this.scope:e.scope,this.name=(d(e.name)?e.name:String(e.name))||this.name||null,this.rules=void 0!==e.rules?f(e.rules):this.rules,this._bails=void 0!==e.bails?e.bails:this._bails,this.model=e.model||this.model,this.listen=void 0!==e.listen?e.listen:this.listen,this.classes=!(!e.classes&&!this.classes)&&!this.componentInstance,this.classNames=h(e.classNames)?E(this.classNames,e.classNames):this.classNames,this.getter=m(e.getter)?e.getter:this.getter,this._alias=e.alias||this._alias,this.events=e.events?K(e.events):this.events,this.delay=(t=this.events,n=e.delay||this.delay,i=this._delay,"number"==typeof n?t.reduce(function(e,t){return e[t]=n,e},{}):t.reduce(function(e,t){return e[t]="object"==typeof n&&t in n?n[t]:"number"==typeof i?i:i&&i[t]||0,e},{})),this.updateDependencies(),this.addActionListeners(),void 0!==e.rules&&(this.flags.required=this.isRequired),this.flags.validated&&void 0!==e.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.addValueListeners(),this.el&&(this.updateClasses(),this.updateAriaAttrs())},U.prototype.reset=function(){var t=this;this._cancellationToken&&(this._cancellationToken.cancelled=!0,delete this._cancellationToken);var n={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1};Object.keys(this.flags).filter(function(e){return"required"!==e}).forEach(function(e){t.flags[e]=n[e]}),this.addValueListeners(),this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},U.prototype.setFlags=function(t){var n=this,i={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(t).forEach(function(e){n.flags[e]=t[e],i[e]&&void 0===t[i[e]]&&(n.flags[i[e]]=!t[e])}),void 0===t.untouched&&void 0===t.touched&&void 0===t.dirty&&void 0===t.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},U.prototype.updateDependencies=function(){var s=this;this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[];var e=Object.keys(this.rules).reduce(function(e,t){return z.isTargetRule(t)&&e.push({selector:s.rules[t][0],name:t}),e},[]);e.length&&this.vm&&this.vm.$el&&e.forEach(function(e){var t=e.selector,n=e.name,i=s.vm.$refs[t],r=Array.isArray(i)?i[0]:i;if(r){var a={vm:s.vm,classes:s.classes,classNames:s.classNames,delay:s.delay,scope:s.scope,events:s.events.join("|"),immediate:s.immediate,targetOf:s.id};m(r.$watch)?(a.component=r,a.el=r.$el,a.getter=q.resolveGetter(r.$el,r.$vnode)):(a.el=r,a.getter=q.resolveGetter(r,{})),s.dependencies.push({name:n,field:new U(a)})}})},U.prototype.unwatch=function(t){if(void 0===t&&(t=null),!t)return this.watchers.forEach(function(e){return e.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(e){return t.test(e.tag)}).forEach(function(e){return e.unwatch()}),this.watchers=this.watchers.filter(function(e){return!t.test(e.tag)})},U.prototype.updateClasses=function(){var t=this;if(this.classes&&!this.isDisabled){var e=function(e){g(e,t.classNames.dirty,t.flags.dirty),g(e,t.classNames.pristine,t.flags.pristine),g(e,t.classNames.touched,t.flags.touched),g(e,t.classNames.untouched,t.flags.untouched),!d(t.flags.valid)&&t.flags.validated&&g(e,t.classNames.valid,t.flags.valid),!d(t.flags.invalid)&&t.flags.validated&&g(e,t.classNames.invalid,t.flags.invalid)};if(s(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');y(n).forEach(e)}else e(this.el)}},U.prototype.addActionListeners=function(){var e=this;if(this.unwatch(/class/),this.el){var t=function(){e.flags.touched=!0,e.flags.untouched=!1,e.classes&&(g(e.el,e.classNames.touched,!0),g(e.el,e.classNames.untouched,!1)),e.unwatch(/^class_blur$/)},n=a(this.el)?"input":"change",i=function(){e.flags.dirty=!0,e.flags.pristine=!1,e.classes&&(g(e.el,e.classNames.pristine,!1),g(e.el,e.classNames.dirty,!0)),e.unwatch(/^class_input$/)};if(this.componentInstance&&m(this.componentInstance.$once))return this.componentInstance.$once("input",i),this.componentInstance.$once("blur",t),this.watchers.push({tag:"class_input",unwatch:function(){e.componentInstance.$off("input",i)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){e.componentInstance.$off("blur",t)}});if(this.el){W(this.el,n,i);var r=s(this.el)?"change":"blur";W(this.el,r,t),this.watchers.push({tag:"class_input",unwatch:function(){e.el.removeEventListener(n,i)}}),this.watchers.push({tag:"class_blur",unwatch:function(){e.el.removeEventListener(r,t)}})}}},U.prototype.checkValueChanged=function(){return(null!==this.initialValue||""!==this.value||!a(this.el))&&this.value!==this.initialValue},U.prototype._determineInputEvent=function(){return this.componentInstance?this.componentInstance.$options.model&&this.componentInstance.$options.model.event||"input":this.model&&this.model.lazy?"change":a(this.el)?"input":"change"},U.prototype._determineEventList=function(t){var n=this;return!this.events.length||this.componentInstance||a(this.el)?[].concat(this.events).map(function(e){return"input"===e&&n.model&&n.model.lazy?"change":e}):this.events.map(function(e){return"input"===e?t:e})},U.prototype.addValueListeners=function(){var i=this;if(this.unwatch(/^input_.+/),this.listen&&this.el){var r={cancelled:!1},a=this.targetOf?function(){i.flags.changed=i.checkValueChanged(),i.validator.validate("#"+i.targetOf)}:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];(0===e.length||Y(e[0]))&&(e[0]=i.value),i.flags.changed=i.checkValueChanged(),i.validator.validate("#"+i.id,e[0])},t=this._determineInputEvent(),e=this._determineEventList(t);if(this.model&&x(e,t)){var n=null,s=this.model.expression;if(this.model.expression&&(n=this.vm,s=this.model.expression),!s&&this.componentInstance&&this.componentInstance.$options.model&&(n=this.componentInstance,s=this.componentInstance.$options.model.prop||"value"),n&&s){var o=c(a,this.delay[t],r),u=n.$watch(s,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i.flags.pending=!0,i._cancellationToken=r,o.apply(void 0,e)});this.watchers.push({tag:"input_model",unwatch:u}),e=e.filter(function(e){return e!==t})}}e.forEach(function(e){var n=c(a,i.delay[e],r),t=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i.flags.pending=!0,i._cancellationToken=r,n.apply(void 0,e)};i._addComponentEventListener(e,t),i._addHTMLEventListener(e,t)})}},U.prototype._addComponentEventListener=function(e,t){var n=this;this.componentInstance&&(this.componentInstance.$on(e,t),this.watchers.push({tag:"input_vue",unwatch:function(){n.componentInstance.$off(e,t)}}))},U.prototype._addHTMLEventListener=function(t,n){var i=this;if(this.el&&!this.componentInstance){var r=function(e){W(e,t,n),i.watchers.push({tag:"input_native",unwatch:function(){e.removeEventListener(t,n)}})};if(r(this.el),s(this.el)){var e=document.querySelectorAll('input[name="'+this.el.name+'"]');y(e).forEach(function(e){e._veeValidateId&&e!==i.el||r(e)})}}},U.prototype.updateAriaAttrs=function(){var t=this;if(this.aria&&this.el&&m(this.el.setAttribute)){var e=function(e){e.setAttribute("aria-required",t.isRequired?"true":"false"),e.setAttribute("aria-invalid",t.flags.invalid?"true":"false")};if(s(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');y(n).forEach(e)}else e(this.el)}},U.prototype.updateCustomValidity=function(){this.validity&&this.el&&m(this.el.setCustomValidity)&&this.validator.errors&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},U.prototype.destroy=function(){this._cancellationToken&&(this._cancellationToken.cancelled=!0),this.unwatch(),this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[]},Object.defineProperties(U.prototype,J);var Q=function(e){void 0===e&&(e=[]),this.items=e||[]},X={length:{configurable:!0}};Q.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var e=this,t=0;return{next:function(){return{value:e.items[t++],done:t>e.items.length}}}},X.length.get=function(){return this.items.length},Q.prototype.find=function(t){return $(this.items,function(e){return e.matches(t)})},Q.prototype.filter=function(n){return Array.isArray(n)?this.items.filter(function(t){return n.some(function(e){return t.matches(e)})}):this.items.filter(function(e){return e.matches(n)})},Q.prototype.map=function(e){return this.items.map(e)},Q.prototype.remove=function(e){var t=null;if(!(t=e instanceof U?e:this.find(e)))return null;var n=this.items.indexOf(t);return this.items.splice(n,1),t},Q.prototype.push=function(e){if(!(e instanceof U))throw v("FieldBag only accepts instances of Field that has an id defined.");if(!e.id)throw v("Field id must be defined.");if(this.find({id:e.id}))throw v("Field with id "+e.id+" is already added.");this.items.push(e)},Object.defineProperties(Q.prototype,X);var Z=function(e,t){this.id=t._uid,this._base=e,this._paused=!1,this.errors=new k(e.errors,this.id)},ee={flags:{configurable:!0},rules:{configurable:!0},fields:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};ee.flags.get=function(){var t=this;return this._base.fields.items.filter(function(e){return e.vmId===t.id}).reduce(function(e,t){return t.scope&&(e["$"+t.scope]||(e["$"+t.scope]={}),e["$"+t.scope][t.name]=t.flags),e[t.name]=t.flags,e},{})},ee.rules.get=function(){return this._base.rules},ee.fields.get=function(){return new Q(this._base.fields.filter({vmId:this.id}))},ee.dictionary.get=function(){return this._base.dictionary},ee.locale.get=function(){return this._base.locale},ee.locale.set=function(e){this._base.locale=e},Z.prototype.localize=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).localize.apply(e,t)},Z.prototype.update=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).update.apply(e,t)},Z.prototype.attach=function(e){var t=b({},e,{vmId:this.id});return this._base.attach(t)},Z.prototype.pause=function(){this._paused=!0},Z.prototype.resume=function(){this._paused=!1},Z.prototype.remove=function(e){return this._base.remove(e)},Z.prototype.detach=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).detach.apply(e,t.concat([this.id]))},Z.prototype.extend=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).extend.apply(e,t)},Z.prototype.validate=function(e,t,n){return void 0===n&&(n={}),this._paused?Promise.resolve(!0):this._base.validate(e,t,b({},{vmId:this.id},n||{}))},Z.prototype.validateAll=function(e,t){return void 0===t&&(t={}),this._paused?Promise.resolve(!0):this._base.validateAll(e,b({},{vmId:this.id},t||{}))},Z.prototype.validateScopes=function(e){return void 0===e&&(e={}),this._paused?Promise.resolve(!0):this._base.validateScopes(b({},{vmId:this.id},e||{}))},Z.prototype.destroy=function(){delete this.id,delete this._base},Z.prototype.reset=function(e){return this._base.reset(Object.assign({},e||{},{vmId:this.id}))},Z.prototype.flag=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).flag.apply(e,t.concat([this.id]))},Object.defineProperties(Z.prototype,ee);var te={provide:function(){return this.$validator&&!I(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!I(this.$vnode)&&!1!==this.$options.$__veeInject){this.$parent||Ie.configure(this.$options.$_veeValidate||{});var e=Ie.resolveConfig(this);(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=new Z(Ie._validator,this));var t,n=(t=this.$options.inject,!(!h(t)||!t.$validator));if(this.$validator||!e.inject||n||(this.$validator=new Z(Ie._validator,this)),n||this.$validator){if(!n&&this.$validator)this.$options._base.util.defineReactive(this.$validator,"errors",this.$validator.errors);this.$options.computed||(this.$options.computed={}),this.$options.computed[e.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[e.fieldsBagName||"fields"]=function(){return this.$validator.fields.items.reduce(function(e,t){return t.scope?(e["$"+t.scope]||(e["$"+t.scope]={}),e["$"+t.scope][t.name]=t.flags):e[t.name]=t.flags,e},{})}}}},beforeDestroy:function(){this.$validator&&this._uid===this.$validator.id&&this.$validator.errors.clear()}};function ne(e,t){return t&&t.$validator?t.$validator.fields.find({id:e._veeValidateId}):null}var ie={bind:function(e,t,n){var i=n.context.$validator;if(i){var r=q.generate(e,t,n);i.attach(r)}},inserted:function(e,t,n){var i=ne(e,n.context),r=q.resolveScope(e,t,n);i&&r!==i.scope&&(i.update({scope:r}),i.updated=!1)},update:function(e,t,n){var i=ne(e,n.context);if(!(!i||i.updated&&u(t.value,t.oldValue))){var r=q.resolveScope(e,t,n),a=q.resolveRules(e,t,n);i.update({scope:r,rules:a})}},unbind:function(e,t,n){var i=n.context,r=ne(e,i);r&&i.$validator.detach(r)}},re=function(e,t){void 0===t&&(t={fastExit:!0}),this.errors=new k,this.fields=new Q,this._createFields(e),this.paused=!1,this.fastExit=!!d(t&&t.fastExit)||t.fastExit},ae={rules:{configurable:!0},dictionary:{configurable:!0},flags:{configurable:!0},locale:{configurable:!0}},se={rules:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};se.rules.get=function(){return z.rules},ae.rules.get=function(){return z.rules},ae.dictionary.get=function(){return Ee.i18nDriver},se.dictionary.get=function(){return Ee.i18nDriver},ae.flags.get=function(){return this.fields.items.reduce(function(e,t){var n;return t.scope?e["$"+t.scope]=((n={})[t.name]=t.flags,n):e[t.name]=t.flags,e},{})},ae.locale.get=function(){return re.locale},ae.locale.set=function(e){re.locale=e},se.locale.get=function(){return Ee.i18nDriver.locale},se.locale.set=function(e){var t=e!==Ee.i18nDriver.locale;Ee.i18nDriver.locale=e,t&&Ee.instance&&Ee.instance._vm&&Ee.instance._vm.$emit("localeChanged")},re.create=function(e,t){return new re(e,t)},re.extend=function(e,t,n){void 0===n&&(n={}),re._guardExtend(e,t),re._merge(e,{validator:t,paramNames:n&&n.paramNames,options:b({},{hasTarget:!1,immediate:!0},n||{})})},re.remove=function(e){z.remove(e)},re.isTargetRule=function(e){return z.isTargetRule(e)},re.prototype.localize=function(e,t){re.localize(e,t)},re.localize=function(e,t){var n;if(h(e))Ee.i18nDriver.merge(e);else{if(t){var i=e||t.name;t=b({},t),Ee.i18nDriver.merge(((n={})[i]=t,n))}e&&(re.locale=e)}},re.prototype.attach=function(e){var t=this,n=e.initialValue,i=new U(e);return this.fields.push(i),i.immediate?Ee.instance._vm.$nextTick(function(){return t.validate("#"+i.id,n||i.value,{vmId:e.vmId})}):this._validate(i,n||i.value,{initial:!0}).then(function(e){i.flags.valid=e.valid,i.flags.invalid=!e.valid}),i},re.prototype.flag=function(e,t,n){void 0===n&&(n=null);var i=this._resolveField(e,void 0,n);i&&t&&i.setFlags(t)},re.prototype.detach=function(e,t,n){var i=m(e.destroy)?e:this._resolveField(e,t,n);i&&(i.destroy(),this.errors.remove(i.name,i.scope,i.vmId),this.fields.remove(i))},re.prototype.extend=function(e,t,n){void 0===n&&(n={}),re.extend(e,t,n)},re.prototype.reset=function(t){var n=this;return Ee.instance._vm.$nextTick().then(function(){return Ee.instance._vm.$nextTick()}).then(function(){n.fields.filter(t).forEach(function(e){e.waitFor(null),e.reset(),n.errors.remove(e.name,e.scope,t&&t.vmId)})})},re.prototype.update=function(e,t){var n=t.scope;this._resolveField("#"+e)&&this.errors.update(e,{scope:n})},re.prototype.remove=function(e){re.remove(e)},re.prototype.validate=function(e,t,n){var i=this;void 0===n&&(n={});var r=n.silent,a=n.vmId;if(this.paused)return Promise.resolve(!0);if(d(e))return this.validateScopes({silent:r,vmId:a});if("*"===e)return this.validateAll(void 0,{silent:r,vmId:a});if(/^(.+)\.\*$/.test(e)){var s=e.match(/^(.+)\.\*$/)[1];return this.validateAll(s)}var o=this._resolveField(e);if(!o)return this._handleFieldNotFound(name);r||(o.flags.pending=!0),void 0===t&&(t=o.value);var u=this._validate(o,t);return o.waitFor(u),u.then(function(e){return!r&&o.isWaitingFor(u)&&(o.waitFor(null),i._handleValidationResults([e],a)),e.valid})},re.prototype.pause=function(){return this.paused=!0,this},re.prototype.resume=function(){return this.paused=!1,this},re.prototype.validateAll=function(t,e){var n=this;void 0===e&&(e={});var i=e.silent,r=e.vmId;if(this.paused)return Promise.resolve(!0);var a=null,s=!1;return"string"==typeof t?a={scope:t,vmId:r}:h(t)?(a=Object.keys(t).map(function(e){return{name:e,vmId:r,scope:null}}),s=!0):a=Array.isArray(t)?t.map(function(e){return{name:e,vmId:r}}):{scope:null,vmId:r},Promise.all(this.fields.filter(a).map(function(e){return n._validate(e,s?t[e.name]:e.value)})).then(function(e){return i||n._handleValidationResults(e,r),e.every(function(e){return e.valid})})},re.prototype.validateScopes=function(e){var t=this;void 0===e&&(e={});var n=e.silent,i=e.vmId;return this.paused?Promise.resolve(!0):Promise.all(this.fields.filter({vmId:i}).map(function(e){return t._validate(e,e.value)})).then(function(e){return n||t._handleValidationResults(e,i),e.every(function(e){return e.valid})})},re.prototype.verify=function(e,t,r){void 0===r&&(r={});var a={name:r&&r.name||"{field}",rules:f(t),bails:l("bails",r,!0)};a.isRequired=a.rules.required;var n=Object.keys(a.rules).filter(re.isTargetRule);return n.length&&r&&h(r.values)&&n.forEach(function(e){var t=a.rules[e],n=t[0],i=t.slice(1);a.rules[e]=[r.values[n]].concat(i)}),this._validate(a,e).then(function(e){return{valid:e.valid,errors:e.errors.map(function(e){return e.msg})}})},re.prototype.destroy=function(){Ee.instance._vm.$off("localeChanged")},re.prototype._createFields=function(n){var i=this;n&&Object.keys(n).forEach(function(e){var t=b({},{name:e,rules:n[e]});i.attach(t)})},re.prototype._getDateFormat=function(e){var t=null;return e.date_format&&Array.isArray(e.date_format)&&(t=e.date_format[0]),t||Ee.i18nDriver.getDateFormat(this.locale)},re.prototype._formatErrorMessage=function(e,t,n,i){void 0===n&&(n={}),void 0===i&&(i=null);var r=this._getFieldDisplayName(e),a=this._getLocalizedParams(t,i);return Ee.i18nDriver.getFieldMessage(this.locale,e.name,t.name,[r,a,n])},re.prototype._convertParamObjectToArray=function(n,e){if(Array.isArray(n))return n;var t=z.getParamNames(e);return t&&h(n)?t.reduce(function(e,t){return t in n&&e.push(n[t]),e},[]):n},re.prototype._getLocalizedParams=function(e,t){void 0===t&&(t=null);var n=this._convertParamObjectToArray(e.params,e.name);return e.options.hasTarget&&n&&n[0]?[t||Ee.i18nDriver.getAttribute(this.locale,n[0],n[0])].concat(n.slice(1)):n},re.prototype._getFieldDisplayName=function(e){return e.alias||Ee.i18nDriver.getAttribute(this.locale,e.name,e.name)},re.prototype._convertParamArrayToObj=function(t,e){var i=z.getParamNames(e);if(!i)return t;if(h(t)){if(i.some(function(e){return-1!==Object.keys(t).indexOf(e)}))return t;t=[t]}return t.reduce(function(e,t,n){return e[i[n]]=t,e},{})},re.prototype._test=function(i,e,r){var a=this,t=z.getValidatorMethod(r.name),n=Array.isArray(r.params)?y(r.params):r.params;n||(n=[]);var s=null;if(!t||"function"!=typeof t)return Promise.reject(v("No such validator '"+r.name+"' exists."));if(r.options.hasTarget&&i.dependencies){var o=$(i.dependencies,function(e){return e.name===r.name});o&&(s=o.field.alias,n=[o.field.value].concat(n.slice(1)))}else"required"===r.name&&i.rejectsFalse&&(n=n.length?n:[!0]);if(r.options.isDate){var u=this._getDateFormat(i.rules);"date_format"!==r.name&&n.push(u)}var l=t(e,this._convertParamArrayToObj(n,r.name));return m(l.then)?l.then(function(e){var t=!0,n={};return Array.isArray(e)?t=e.every(function(e){return h(e)?e.valid:e}):(t=h(e)?e.valid:e,n=e.data),{valid:t,errors:t?[]:[a._createFieldError(i,r,n,s)]}}):(h(l)||(l={valid:l,data:{}}),{valid:l.valid,errors:l.valid?[]:[this._createFieldError(i,r,l.data,s)]})},re._merge=function(e,t){var n=t.validator,i=t.options,r=t.paramNames,a=m(n)?n:n.validate;n.getMessage&&Ee.i18nDriver.setMessage(re.locale,e,n.getMessage),z.add(e,{validate:a,options:i,paramNames:r})},re._guardExtend=function(e,t){if(!m(t)&&!m(t.validate))throw v("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.")},re.prototype._createFieldError=function(e,t,n,i){var r=this;return{id:e.id,vmId:e.vmId,field:e.name,msg:this._formatErrorMessage(e,t,n,i),rule:t.name,scope:e.scope,regenerate:function(){return r._formatErrorMessage(e,t,n,i)}}},re.prototype._resolveField=function(e,t,n){if("#"===e[0])return this.fields.find({id:e.slice(1)});if(!d(t))return this.fields.find({name:e,scope:t,vmId:n});if(x(e,".")){var i=e.split("."),r=i[0],a=i.slice(1),s=this.fields.find({name:a.join("."),scope:r,vmId:n});if(s)return s}return this.fields.find({name:e,scope:null,vmId:n})},re.prototype._handleFieldNotFound=function(e,t){var n=d(t)?e:(d(t)?"":t+".")+e;return Promise.reject(v('Validating a non-existent field: "'+n+'". Use "attach()" first.'))},re.prototype._handleValidationResults=function(n,t){var i=this,e=n.map(function(e){return{id:e.id}});this.errors.removeById(e.map(function(e){return e.id})),n.forEach(function(e){i.errors.remove(e.field,e.scope,t)});var r=n.reduce(function(e,t){return e.push.apply(e,t.errors),e},[]);this.errors.add(r),this.fields.filter(e).forEach(function(t){var e=$(n,function(e){return e.id===t.id});t.setFlags({pending:!1,valid:e.valid,validated:!0})})},re.prototype._shouldSkip=function(e,t){return!1!==e.bails&&(!!e.isDisabled||!e.isRequired&&(d(t)||""===t||(n=t,Array.isArray(n)&&0===n.length)));var n},re.prototype._shouldBail=function(e){return void 0!==e.bails?e.bails:this.fastExit},re.prototype._validate=function(i,r,e){var a=this;void 0===e&&(e={});var t=e.initial;if(this._shouldSkip(i,r))return Promise.resolve({valid:!0,id:i.id,field:i.name,scope:i.scope,errors:[]});var s=[],o=[],u=!1;return Object.keys(i.rules).filter(function(e){return!t||!z.has(e)||z.isImmediate(e)}).some(function(e){var t=z.getOptions(e),n=a._test(i,r,{name:e,params:i.rules[e],options:t});return m(n.then)?s.push(n):!n.valid&&a._shouldBail(i)?(o.push.apply(o,n.errors),u=!0):s.push(new Promise(function(e){return e(n)})),u}),u?Promise.resolve({valid:!1,errors:o,id:i.id,field:i.name,scope:i.scope}):Promise.all(s).then(function(e){return e.reduce(function(e,t){var n;return t.valid||(n=e.errors).push.apply(n,t.errors),e.valid=e.valid&&t.valid,e},{valid:!0,errors:o,id:i.id,field:i.name,scope:i.scope})})},Object.defineProperties(re.prototype,ae),Object.defineProperties(re,se);var oe=function(n,i){var r={pristine:function(e,t){return e&&t},dirty:function(e,t){return e||t},touched:function(e,t){return e||t},untouched:function(e,t){return e&&t},valid:function(e,t){return e&&t},invalid:function(e,t){return e||t},pending:function(e,t){return e||t},required:function(e,t){return e||t},validated:function(e,t){return e&&t}};return Object.keys(r).reduce(function(e,t){return e[t]=r[t](n[t],i[t]),e},{})},ue=function(i,r){return void 0===r&&(r=!0),Object.keys(i).reduce(function(e,t){if(!e)return e=b({},i[t]);var n=0===t.indexOf("$");return r&&n?oe(ue(i[t]),e):!r&&n?e:e=oe(e,i[t])},null)},le=null;function ce(t){return{errors:t.messages,flags:t.flags,classes:t.classes,valid:t.isValid,reset:function(){return t.reset()},validate:function(e){return t.syncValue(e),t.validate().then(t.applyResult)},aria:{"aria-invalid":t.flags.invalid?"true":"false","aria-required":t.isRequired?"true":"false"}}}function de(e){var n=this,t=this.value!==e.value||this._needsValidation,i=this.flags.validated;if(this.initialized||(this.initialValue=e.value),this.initialized||void 0!==e.value||(t=!0),t){this.value=e.value,this.validate().then(this.immediate||i?this.applyResult:function(e){var t=e.valid;n.setFlags({valid:t,invalid:!t})})}this._needsValidation=!1}function fe(n){return{onInput:function(e){n.syncValue(e),n.setFlags({dirty:!0,pristine:!1})},onBlur:function(){n.setFlags({touched:!0,untouched:!1})},onValidate:c(function(){var t=n.validate();(n._waiting=t).then(function(e){t===n._waiting&&(n.applyResult(e),n._waiting=null)})},n.debounce)}}var ve=0,he={$__veeInject:!1,inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver||(this.$vnode.context.$_veeObserver={refs:{},$subscribe:function(e){this.refs[e.vid]=e},$unsubscribe:function(e){delete this.refs[e.vid]}}),this.$vnode.context.$_veeObserver}}},props:{vid:{type:[String,Number],default:function(){return++ve}},name:{type:String,default:null},events:{type:[Array,String],default:function(){return["input"]}},rules:{type:[Object,String],default:null},immediate:{type:Boolean,default:!1},bails:{type:Boolean,default:function(){return Ee.config.fastExit}},debounce:{type:Number,default:function(){return Ee.config.delay||0}}},watch:{rules:{deep:!0,handler:function(){this._needsValidation=!0}}},data:function(){return{messages:[],value:void 0,initialized:!1,initialValue:void 0,flags:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},id:null}},methods:{setFlags:function(t){var n=this;Object.keys(t).forEach(function(e){n.flags[e]=t[e]})},syncValue:function(e){var t=Y(e)?e.target.value:e;this.value=t,this.flags.changed=this.initialValue===t},reset:function(){this.messages=[],this._waiting=null,this.initialValue=this.value;var e={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1};e.changed=!1,this.setFlags(e)},validate:function(){var i,r,t=this;return this.setFlags({pending:!0}),le.verify(this.value,this.rules,{name:this.name,values:(i=this,r=i.$_veeObserver.refs,i.fieldDeps.reduce(function(e,t){if(!r[t])return e;e[t]=r[t].value;var n="$__"+t;return m(i[n])||(i[n]=r[t].$watch("value",function(){i.validate(i.value).then(i.applyResult),i[n]()})),e},{})),bails:this.bails}).then(function(e){return t.setFlags({pending:!1}),e})},applyResult:function(e){var t=e.errors;this.messages=t,this.setFlags({valid:!t.length,changed:this.value!==this.initialValue,invalid:!!t.length,validated:!0})},registerField:function(){var e,t,n;le||(le=Ee.instance._validator),t=(e=this).id,n=e.vid,t===n&&e.$_veeObserver.refs[t]||(t!==n&&e.$_veeObserver.refs[t]===e&&e.$_veeObserver.$unsubscribe(e),e.$_veeObserver.$subscribe(e),e.id=n)}},computed:{isValid:function(){return this.flags.valid},fieldDeps:function(){var t=f(this.rules);return Object.keys(t).filter(z.isTargetRule).map(function(e){return t[e][0]})},normalizedEvents:function(){var t=this;return K(this.events).map(function(e){return"input"===e?t._inputEventName:e})},isRequired:function(){return!!f(this.rules).required},classes:function(){var i=this,r=Ee.config.classNames;return Object.keys(this.flags).reduce(function(e,t){var n=r&&r[t]||t;return n&&(e[n]=i.flags[t]),e},{})}},render:function(e){var t=this;this.registerField();var n=ce(this),i=this.$scopedSlots.default;if(!m(i))return T(0,this.$slots.default);var r=i(n);return function i(e){if(P(e))return[e];var t=Array.isArray(e)?e:e.children;return Array.isArray(t)?t.reduce(function(e,t){var n=i(t);return n.length&&e.push.apply(e,n),e},[]):[]}(r).forEach(function(e){(function(t){var e=P(t);this._inputEventName=this._inputEventName||R(t,e),de.call(this,e);var n=fe(this),i=n.onInput,r=n.onBlur,a=n.onValidate;M(t,this._inputEventName,i),M(t,"blur",r),this.normalizedEvents.forEach(function(e){M(t,e,a)}),this.initialized=!0}).call(t,e)}),T(0,r)},beforeDestroy:function(){this.$_veeObserver.$unsubscribe(this)}},pe={pristine:"every",dirty:"some",touched:"some",untouched:"every",valid:"every",invalid:"some",pending:"some",validated:"every"};var me={name:"ValidationObserver",provide:function(){return{$_veeObserver:this}},data:function(){return{refs:{}}},methods:{$subscribe:function(e){var t;this.refs=Object.assign({},this.refs,((t={})[e.vid]=e,t))},$unsubscribe:function(e){var t=e.vid;delete this.refs[t],this.refs=Object.assign({},this.refs)},validate:function(){return Promise.all(w(this.refs).map(function(t){return t.validate().then(function(e){return t.applyResult(e),e})})).then(function(e){return e.every(function(e){return e.valid})})},reset:function(){return w(this.refs).forEach(function(e){e.reset()})}},computed:{ctx:function(){var t=this,e={errors:{},validate:function(){var e=t.validate();return{then:function(t){e.then(function(e){return e&&m(t)?Promise.resolve(t()):Promise.resolve(e)})}}},reset:function(){return t.reset()}};return w(this.refs).reduce(function(i,r){return Object.keys(pe).forEach(function(e){var t,n;e in i?i[e]=(t=i[e],n=r.flags[e],[t,n][pe[e]](function(e){return e})):i[e]=r.flags[e]}),i.errors[r.vid]=r.messages,i},e)}},render:function(e){var t=this.$scopedSlots.default;return m(t)?T(0,t(this.ctx)):T(0,this.$slots.default)}};var ge=function(n){return h(n)?Object.keys(n).reduce(function(e,t){return e[t]=ge(n[t]),e},{}):m(n)?n("{0}",["{1}","{2}","{3}"]):n},ye=function(e,t){this.i18n=e,this.rootKey=t},be={locale:{configurable:!0}};be.locale.get=function(){return this.i18n.locale},be.locale.set=function(e){n("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},ye.prototype.getDateFormat=function(e){return this.i18n.getDateTimeFormat(e||this.locale)},ye.prototype.setDateFormat=function(e,t){this.i18n.setDateTimeFormat(e||this.locale,t)},ye.prototype.getMessage=function(e,t,n){var i=this.rootKey+".messages."+t,r=this.i18n.t(i,n);return r!==i?r:this.i18n.t(this.rootKey+".messages._default",n)},ye.prototype.getAttribute=function(e,t,n){void 0===n&&(n="");var i=this.rootKey+".attributes."+t,r=this.i18n.t(i);return r!==i?r:n},ye.prototype.getFieldMessage=function(e,t,n,i){var r=this.rootKey+".custom."+t+"."+n,a=this.i18n.t(r,i);return a!==r?a:this.getMessage(e,n,i)},ye.prototype.merge=function(s){var o=this;Object.keys(s).forEach(function(e){var t,n,i,r=E({},l(e+"."+o.rootKey,o.i18n.messages,{})),a=E(r,(n=s[e],i={},n.messages&&(i.messages=ge(n.messages)),n.custom&&(i.custom=ge(n.custom)),n.attributes&&(i.attributes=n.attributes),d(n.dateFormat)||(i.dateFormat=n.dateFormat),i));o.i18n.mergeLocaleMessage(e,((t={})[o.rootKey]=a,t)),a.dateFormat&&o.i18n.setDateTimeFormat(e,a.dateFormat)})},ye.prototype.setMessage=function(e,t,n){var i,r;this.merge(((r={})[e]={messages:(i={},i[t]=n,i)},r))},ye.prototype.setAttribute=function(e,t,n){var i,r;this.merge(((r={})[e]={attributes:(i={},i[t]=n,i)},r))},Object.defineProperties(ye.prototype,be);var _e,$e,Ie,Ae=b({},{locale:"en",delay:0,errorBagName:"errors",dictionary:null,fieldsBagName:"fields",classes:!1,classNames:null,events:"input",inject:!0,fastExit:!0,aria:!0,validity:!1,i18n:null,i18nRootKey:"validation"}),Ee=function(e,t){this.configure(e),t&&(_e=t),(Ie=this)._validator=new re(null,{fastExit:e&&e.fastExit}),this._initVM(this.config),this._initI18n(this.config)},Oe={i18nDriver:{configurable:!0},config:{configurable:!0}},we={instance:{configurable:!0},i18nDriver:{configurable:!0},config:{configurable:!0}};return Ee.setI18nDriver=function(e,t){D.setDriver(e,t)},Ee.configure=function(e){Ae=b({},Ae,e)},Ee.use=function(e,t){return void 0===t&&(t={}),m(e)?Ie?void e({Validator:re,ErrorBag:k,Rules:re.rules},t):($e||($e=[]),void $e.push({plugin:e,options:t})):n("The plugin must be a callable function")},Ee.install=function(e,t){_e&&e===_e||(_e=e,Ie=new Ee(t),function(){try{var e=Object.defineProperty({},"passive",{get:function(){H=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(e){H=!1}}(),_e.mixin(te),_e.directive("validate",ie),$e&&($e.forEach(function(e){var t=e.plugin,n=e.options;Ee.use(t,n)}),$e=null))},we.instance.get=function(){return Ie},Oe.i18nDriver.get=function(){return D.getDriver()},we.i18nDriver.get=function(){return D.getDriver()},Oe.config.get=function(){return Ae},we.config.get=function(){return Ae},Ee.prototype._initVM=function(e){var t=this;this._vm=new _e({data:function(){return{errors:t._validator.errors,fields:t._validator.fields}}})},Ee.prototype._initI18n=function(e){var t=this,n=e.dictionary,i=e.i18n,r=e.i18nRootKey,a=e.locale,s=function(){t._validator.errors.regenerate()};i?(Ee.setI18nDriver("i18n",new ye(i,r)),i._vm.$watch("locale",s)):"undefined"!=typeof window&&this._vm.$on("localeChanged",s),n&&this.i18nDriver.merge(n),a&&!i&&this._validator.localize(a)},Ee.prototype.configure=function(e){Ee.configure(e)},Ee.prototype.resolveConfig=function(e){var t=l("$options.$_veeValidate",e,{});return b({},this.config,t)},Object.defineProperties(Ee.prototype,Oe),Object.defineProperties(Ee,we),Ee.version="2.1.4",Ee.mixin=te,Ee.directive=ie,Ee.Validator=re,Ee.ErrorBag=k,Ee.mapFields=function(e){if(!e)return function(){return ue(this.$validator.flags)};var t,a=(t=e,Array.isArray(t)?t.reduce(function(e,t){return x(t,".")?e[t.split(".")[1]]=t:e[t]=t,e},{}):t);return Object.keys(a).reduce(function(e,i){var r=a[i];return e[i]=function(){if(this.$validator.flags[r])return this.$validator.flags[r];if("*"===a[i])return ue(this.$validator.flags,!1);if(r.indexOf(".")<=0)return{};var e=r.split("."),t=e[0],n=e.slice(1);return t=this.$validator.flags["$"+t],"*"===(n=n.join("."))&&t?ue(t):t&&t[n]?t[n]:{}},e},{})},Ee.ValidationProvider=he,Ee.ValidationObserver=me,Ee.withValidation=function(e,v){void 0===v&&(v=null);var h=m(e)?e.options:e;h.$__veeInject=!1;var t={name:(h.name||"AnonymousHoc")+"WithValidation",props:b({},he.props),data:he.data,computed:b({},he.computed),methods:b({},he.methods),$__veeInject:!1,beforeDestroy:he.beforeDestroy,inject:he.inject};v||(v=function(e){return e});var p=h.model&&h.model.event||"input";return t.render=function(e){var t;this.registerField();var n=ce(this),i=b({},this.$listeners),r=P(this.$vnode);this._inputEventName=this._inputEventName||R(this.$vnode,r),de.call(this,r);var a=fe(this),s=a.onInput,o=a.onBlur,u=a.onValidate;L(i,p,s),L(i,"blur",o),this.normalizedEvents.forEach(function(e,t){L(i,e,u)});var l,c,d=(C(this.$vnode)||{prop:"value"}).prop,f=b({},this.$attrs,((t={})[d]=r.value,t),v(n));return e(h,{attrs:this.$attrs,props:f,on:i},(l=this.$slots,c=this.$vnode.context,Object.keys(l).reduce(function(e,t){return l[t].forEach(function(e){e.context||(l[t].context=c,e.data||(e.data={}),e.data.slot=t)}),e.concat(l[t])},[])))},t},Ee});
{
"name": "vee-validate",
"version": "2.1.3",
"version": "2.1.4",
"description": "Simple Vue.js input validation plugin",

@@ -69,2 +69,3 @@ "author": "Abdelrahman Awad <logaretm1@gmail.com>",

"mkdirp": "^0.5.1",
"polish-plurals": "^1.1.0",
"regenerator-runtime": "^0.12.1",

@@ -71,0 +72,0 @@ "rollup": "^0.67.0",

@@ -21,8 +21,6 @@ <p align="center">

vee-validate is a plugin for [Vue.js](https://vuejs.org/) that allows you to validate input fields and display errors.
vee-validate is a template-based validation framework for [Vue.js](https://vuejs.org/) that allows you to validate input fields and display errors.
You don't have to do anything fancy in your app -- most of the work goes into the html. You only need to specify for each input what kind of validators should be used when the value changes. The errors will be automatically generated. The plugin offers [many validations out of the box](https://baianat.github.io/vee-validate/guide/rules.html).
Being template-based you only need to specify for each input what kind of validators should be used when the value changes. The errors will be automatically generated with 40+ locales supported. [Many rules are available out of the box](https://baianat.github.io/vee-validate/guide/rules.html).
Although most of the validations occur automatically, you can use the validator however you see fit. The validator object has no dependencies and is a standalone object. This plugin is built with localization in mind. Read the [docs](https://baianat.github.io/vee-validate/) for more info.
This plugin is inspired by [PHP Framework Laravel's validation](https://laravel.com/).

@@ -32,15 +30,15 @@

#### npm
#### yarn
```
npm install vee-validate --save
yarn add vee-validate
```
### yarn
#### npm
```
yarn add vee-validate
npm i vee-validate --save
```
### CDN
#### CDN

@@ -66,2 +64,6 @@ vee-validate is also available on these cdns:

There are two ways to use vee-validate, Using `v-validate` directive or using `Validation*` components.
#### Using directive
Just apply the `v-validate` directive on your input and pass a **string value** which is a list of validations separated by a pipe. For example, we will use the `required` and the `email` validators:

@@ -73,8 +75,2 @@

Alternatively you can pass an object for more flexibility:
```vue
<input v-validate="{ required: true, email: true, regex: /[0-9]+/ }" type="text" name="email">
```
Now every time the input changes, the validator will run the list of validations from left to right, populating the errors helper object whenever an input fails validation.

@@ -84,3 +80,3 @@

```javascript
```js
this.$validator.errorBag;

@@ -97,4 +93,32 @@ // or

Of course there is more to it than that. Refer to the documentation for more details about the rules and usage of this plugin.
#### Using Components
Validation components uses the [scoped slots feature](https://vuejs.org/v2/guide/components-slots.html#Scoped-Slots) to pass down validation state and results.
```vue
<template>
<div>
<ValidationProvider rules="required|email">
<div slot-scope="{ errors }">
<input v-model="value">
<p>{{ errors[0] }}</p>
</div>
</ValidationProvider>
</div>
</template>
<script>
import { ValidationProvider } from 'vee-validate';
export default {
data: () => ({
value: ''
}),
components: {
ValidationProvider
}
}
</script>
```
### Documentation

@@ -101,0 +125,0 @@

@@ -0,0 +0,0 @@ import * as VeeValidate from './vee-validate';

@@ -147,3 +147,3 @@ import Vue = require("vue")

constructor(validations: any, options: any);
constructor(validations?: any, options?: any);
attach(name: string, checks: string|Object, options?: Object): Field;

@@ -179,2 +179,22 @@ attach(options: FieldOptions): Field;

/**
* `mapFields` helper, which is similar to Vuex's `mapGetters` and `mapActions`
* as it maps a field object to a computed property.
*/
export function mapFields(fields?: string[]|{[key: string]: string}): any;
/**
* The `ValidationObserver` is a convenient component that uses the `scoped slots` feature
* to communicate the current state of your inputs as a whole.
* Note that this component is renderless.
*/
export const ValidationObserver: Vue.Component;
/**
* The `ValidationProvider` component is a regular component
* that wraps your inputs and provides validation state using `scoped slots`.
* Note that this component is renderless.
*/
export const ValidationProvider: Vue.Component;
export const version: string;

@@ -181,0 +201,0 @@

@@ -6,3 +6,3 @@ /**

import Vue, { ComponentOptions } from 'vue';
import { Validator, VeeValidateComponentOptions } from './vee-validate.d';
import { ErrorBag, FieldFlagsBag, Validator, VeeValidateComponentOptions } from './vee-validate.d';

@@ -17,4 +17,21 @@ declare module 'vue/types/options' {

interface Vue {
/**
* A `Validator` instance, injected via a mixin by VeeValidate.
*
* Note that this property is not available in the component if you are using `inject: false`.
*/
$validator: Validator;
/**
* An `ErrorBag` instance, injected via a mixin by VeeValidate.
*
* Note that this property is not available in the component if you are using `inject: false`.
*/
errors: ErrorBag;
/**
* An object containing state flags for the validated fields, injected via a mixin by VeeValidate.
*
* Note that this property is not available in the component if you are using `inject: false`.
*/
fields: FieldFlagsBag;
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc