From 7b0f84a5afeb2c19f6884a35aa2cede9f2c65a3e Mon Sep 17 00:00:00 2001 From: Abdelrahman Awad Date: Wed, 13 Dec 2017 17:10:50 +0200 Subject: [PATCH] hotfix: delay resolution closes #1041 --- README.md | 2 +- dist/vee-validate.esm.js | 19 ++++++++++++++----- dist/vee-validate.js | 19 ++++++++++++++----- dist/vee-validate.min.js | 2 +- dist/vee-validate.minimal.esm.js | 19 ++++++++++++++----- dist/vee-validate.minimal.js | 19 ++++++++++++++----- dist/vee-validate.minimal.min.js | 2 +- package.json | 2 +- src/core/field.js | 3 ++- src/core/generator.js | 8 +++++++- src/install.js | 5 ++++- tests/core/generator.js | 12 +++++++++--- 12 files changed, 82 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index c7103a151..0fac78ea1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![codecov](https://codecov.io/gh/baianat/vee-validate/branch/master/graph/badge.svg)](https://codecov.io/gh/baianat/vee-validate) [![Build Status](https://travis-ci.org/baianat/vee-validate.svg?branch=master)](https://travis-ci.org/baianat/vee-validate) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/087bd788687c4ccab6650756ce56fa05)](https://www.codacy.com/app/baianat/vee-validate?utm_source=github.com&utm_medium=referral&utm_content=baianat/vee-validate&utm_campaign=Badge_Grade) -[![CDNJS](https://img.shields.io/cdnjs/v/vee-validate.svg)](https://cdnjs.com/libraries/vee-validate/2.0.0-rc.26) +[![CDNJS](https://img.shields.io/cdnjs/v/vee-validate.svg)](https://cdnjs.com/libraries/vee-validate/2.0.0-rc.27) [![npm](https://img.shields.io/npm/dm/vee-validate.svg)](https://npm-stat.com/charts.html?package=vee-validate) [![npm](https://img.shields.io/npm/v/vee-validate.svg)](https://www.npmjs.com/package/vee-validate) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/baianat/vee-validate.svg)](http://isitmaintained.com/project/baianat/vee-validate "Average time to resolve an issue") diff --git a/dist/vee-validate.esm.js b/dist/vee-validate.esm.js index d26a7c8db..7799c230f 100644 --- a/dist/vee-validate.esm.js +++ b/dist/vee-validate.esm.js @@ -1,5 +1,5 @@ /** - * vee-validate v2.0.0-rc.26 + * vee-validate v2.0.0-rc.27 * (c) 2017 Abdelrahman Awad * @license MIT */ @@ -1179,7 +1179,13 @@ Generator.resolveDelay = function resolveDelay (el, vnode, options) { delay = vnode.child.$attrs['data-vv-delay']; } - return (delay) ? { local: { input: parseInt(delay) }, global: deepParseInt(globalDelay) } : { global: deepParseInt(globalDelay) }; + if (!isObject(globalDelay)) { + return deepParseInt(delay || globalDelay); + } + + globalDelay.input = delay || 0; + + return deepParseInt(globalDelay); }; /** @@ -1377,7 +1383,7 @@ var Field = function Field (el, options) { this.rules = {}; this._cacheId(options); options = assign({}, DEFAULT_OPTIONS, options); - this._delay = typeof options.delay === 'number' ? options.delay : (options.delay && options.delay.global); // cache initial delay + this._delay = !isNullOrUndefined(options.delay) ? options.delay : 0; // cache initial delay this.validity = options.validity; this.aria = options.aria; this.flags = createFlags(); @@ -2916,7 +2922,10 @@ function install (_Vue, options) { }); } - Validator.localize(locale); // set the locale + if (!i18n) { + Validator.localize(locale); // set the locale + } + Validator.setStrictMode(Config.current.strict); Vue.mixin(mixin); @@ -6934,7 +6943,7 @@ var mapFields = function (fields) { }, {}); }; -var version = '2.0.0-rc.26'; +var version = '2.0.0-rc.27'; var rulesPlugin = function (ref) { var Validator$$1 = ref.Validator; diff --git a/dist/vee-validate.js b/dist/vee-validate.js index 2f66029f6..34bff0ca3 100644 --- a/dist/vee-validate.js +++ b/dist/vee-validate.js @@ -1,5 +1,5 @@ /** - * vee-validate v2.0.0-rc.26 + * vee-validate v2.0.0-rc.27 * (c) 2017 Abdelrahman Awad * @license MIT */ @@ -5068,7 +5068,13 @@ Generator.resolveDelay = function resolveDelay (el, vnode, options) { delay = vnode.child.$attrs['data-vv-delay']; } - return (delay) ? { local: { input: parseInt(delay) }, global: deepParseInt(globalDelay) } : { global: deepParseInt(globalDelay) }; + if (!isObject(globalDelay)) { + return deepParseInt(delay || globalDelay); + } + + globalDelay.input = delay || 0; + + return deepParseInt(globalDelay); }; /** @@ -5266,7 +5272,7 @@ var Field = function Field (el, options) { this.rules = {}; this._cacheId(options); options = assign({}, DEFAULT_OPTIONS, options); - this._delay = typeof options.delay === 'number' ? options.delay : (options.delay && options.delay.global); // cache initial delay + this._delay = !isNullOrUndefined(options.delay) ? options.delay : 0; // cache initial delay this.validity = options.validity; this.aria = options.aria; this.flags = createFlags(); @@ -6805,7 +6811,10 @@ function install (_Vue, options) { }); } - Validator.localize(locale); // set the locale + if (!i18n) { + Validator.localize(locale); // set the locale + } + Validator.setStrictMode(Config.current.strict); Vue.mixin(mixin); @@ -6948,7 +6957,7 @@ var minimal$1 = { mapFields: mapFields, Validator: Validator, ErrorBag: ErrorBag, - version: '2.0.0-rc.26' + version: '2.0.0-rc.27' }; // rules plugin definition. diff --git a/dist/vee-validate.min.js b/dist/vee-validate.min.js index 878f8860b..4fc9b063f 100644 --- a/dist/vee-validate.min.js +++ b/dist/vee-validate.min.js @@ -1 +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";function e(e,r){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=r||{},i=void 0===n.additionalDigits?L:Number(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date)return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var a=function(e){var t,r={},n=e.split(C.dateTimeDelimeter);C.plainTime.test(n[0])?(r.date=null,t=n[0]):(r.date=n[0],t=n[1]);if(t){var i=C.timezone.exec(t);i?(r.time=t.replace(i[1],""),r.timezone=i[1]):r.time=t}return r}(e),o=function(e,t){var r,n=C.YYY[t],i=C.YYYYY[t];if(r=C.YYYY.exec(e)||i.exec(e)){var a=r[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(r=C.YY.exec(e)||n.exec(e)){var o=r[1];return{year:100*parseInt(o,10),restDateString:e.slice(o.length)}}return{year:null}}(a.date,i),s=o.year,u=function(e,r){if(null===r)return null;var n,i,a,o;if(0===e.length)return(i=new Date(0)).setUTCFullYear(r),i;if(n=C.MM.exec(e))return i=new Date(0),a=parseInt(n[1],10)-1,i.setUTCFullYear(r,a),i;if(n=C.DDD.exec(e)){i=new Date(0);var s=parseInt(n[1],10);return i.setUTCFullYear(r,0,s),i}if(n=C.MMDD.exec(e)){i=new Date(0),a=parseInt(n[1],10)-1;var u=parseInt(n[2],10);return i.setUTCFullYear(r,a,u),i}if(n=C.Www.exec(e))return o=parseInt(n[1],10)-1,t(r,o);if(n=C.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return t(r,o,l)}return null}(o.restDateString,s);if(u){var l,c=u.getTime(),f=0;return a.time&&(f=function(e){var t,r,n;if(t=C.HH.exec(e))return(r=parseFloat(t[1].replace(",",".")))%24*O;if(t=C.HHMM.exec(e))return r=parseInt(t[1],10),n=parseFloat(t[2].replace(",",".")),r%24*O+n*F;if(t=C.HHMMSS.exec(e)){r=parseInt(t[1],10),n=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return r%24*O+n*F+1e3*i}return null}(a.time)),a.timezone?l=function(e){var t,r;if(t=C.timezoneZ.exec(e))return 0;if(t=C.timezoneHH.exec(e))return r=60*parseInt(t[2],10),"+"===t[1]?-r:r;if(t=C.timezoneHHMM.exec(e))return r=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-r:r;return 0}(a.timezone):(l=new Date(c+f).getTimezoneOffset(),l=new Date(c+f+l*F).getTimezoneOffset()),new Date(c+f+l*F)}return new Date(e)}function t(e,t,r){t=t||0,r=r||0;var n=new Date(0);n.setUTCFullYear(e,0,4);var i=7*t+r+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+i),n}function r(e){e=e||{};var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function n(t,r,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return function(t,r,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var i=e(t,n).getTime(),a=Number(r);return new Date(i+a)}(t,Number(r)*S,n)}function i(t,r){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e(t,r);return!isNaN(n)}function a(e){return e.replace(N,function(e){return e.slice(1)})}function o(e,t,r){return function(n,i){var a=i||{},o=a.type?String(a.type):t;return(e[o]||e[t])[r?r(Number(n)):Number(n)]}}function s(e,t){return function(r){var n=r||{},i=n.type?String(n.type):t;return e[i]||e[t]}}function u(e,t){return function(r,n){var i=n||{},a=i.type?String(i.type):t,o=e[a]||e[t];return String(r).match(o)}}function l(e,t){return function(r,n){var i=n||{},a=i.type?String(i.type):t,o=e[a]||e[t],s=r[1];return o.findIndex(function(e){return e.test(s)})}}function c(t,r){var n=e(t,r),i=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var a=i-n.getTime();return Math.floor(a/H)+1}function f(t,r){var n=e(t,r),i=n.getUTCDay(),a=(i<1?7:0)+i-1;return n.setUTCDate(n.getUTCDate()-a),n.setUTCHours(0,0,0,0),n}function d(t,r){var n=e(t,r),i=n.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(i+1,0,4),a.setUTCHours(0,0,0,0);var o=f(a,r),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var u=f(s,r);return n.getTime()>=o.getTime()?i+1:n.getTime()>=u.getTime()?i:i-1}function h(e,t){var r=d(e,t),n=new Date(0);n.setUTCFullYear(r,0,4),n.setUTCHours(0,0,0,0);return f(n,t)}function p(t,r){var n=e(t,r),i=f(n,r).getTime()-h(n,r).getTime();return Math.round(i/z)+1}function m(e,t){t=t||"";var r=e>0?"-":"+",n=Math.abs(e),i=n%60;return r+v(Math.floor(n/60),2)+t+v(i,2)}function v(e,t){for(var r=Math.abs(e).toString();r.lengtha.getTime()}function w(t,r,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var i=e(t,n),a=e(r,n);return i.getTime()=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=u.locale||Z,f=c.parsers||{},d=c.units||{};if(!c.match)throw new RangeError("locale must contain match property");if(!c.formatLong)throw new RangeError("locale must contain formatLong property");var h=String(i).replace(K,function(e){return"["===e[0]?e:"\\"===e[0]?function(e){if(e.match(/\[[\s\S]/))return e.replace(/^\[|]$/g,"");return e.replace(/\\/g,"")}(e):c.formatLong(e)});if(""===h)return""===s?e(a,u):new Date(NaN);var p=r(u);p.locale=c;var m,v=h.match(c.parsingTokensRegExp||Q),g=v.length,y=[{priority:B,set:T,index:0}];for(m=0;m0?"in "+n:n+" ago":n},formatLong:function(e){var t={LTS:e.LTS,LT:e.LT,L:e.L,LL:e.LL,LLL:e.LLL,LLLL:e.LLLL,l:e.l||a(e.L),ll:e.ll||a(e.LL),lll:e.lll||a(e.LLL),llll:e.llll||a(e.LLLL)};return function(e){return t[e]}}({LT:"h:mm aa",LTS:"h:mm:ss aa",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY h:mm aa",LLLL:"dddd, MMMM D YYYY h:mm aa"}),formatRelative:function(e,t,r,n){return E[e]},localize:{ordinalNumber:function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},weekday:o(k,"long"),weekdays:s(k,"long"),month:o(U,"long"),months:s(U,"long"),timeOfDay:o(j,"long",function(e){return e/12>=1?1:0}),timesOfDay:s(j,"long")},match:{ordinalNumbers:function(e){return function(t){return String(t).match(e)}}(/^(\d+)(th|st|nd|rd)?/i),ordinalNumber:function(e){return parseInt(e[1],10)},weekdays:u({narrow:/^(su|mo|tu|we|th|fr|sa)/i,short:/^(sun|mon|tue|wed|thu|fri|sat)/i,long:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},"long"),weekday:l({any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},"any"),months:u({short:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,long:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},"long"),month:l({any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},"any"),timesOfDay:u({short:/^(am|pm)/i,long:/^([ap]\.?\s?m\.?)/i},"long"),timeOfDay:l({any:[/^a/i,/^p/i]},"any")},options:{weekStartsOn:0,firstWeekContainsDate:1}},H=864e5,z=6048e5,q={M:function(e){return e.getUTCMonth()+1},Mo:function(e,t){var r=e.getUTCMonth()+1;return t.locale.localize.ordinalNumber(r,{unit:"month"})},MM:function(e){return v(e.getUTCMonth()+1,2)},MMM:function(e,t){return t.locale.localize.month(e.getUTCMonth(),{type:"short"})},MMMM:function(e,t){return t.locale.localize.month(e.getUTCMonth(),{type:"long"})},Q:function(e){return Math.ceil((e.getUTCMonth()+1)/3)},Qo:function(e,t){var r=Math.ceil((e.getUTCMonth()+1)/3);return t.locale.localize.ordinalNumber(r,{unit:"quarter"})},D:function(e){return e.getUTCDate()},Do:function(e,t){return t.locale.localize.ordinalNumber(e.getUTCDate(),{unit:"dayOfMonth"})},DD:function(e){return v(e.getUTCDate(),2)},DDD:function(e){return c(e)},DDDo:function(e,t){return t.locale.localize.ordinalNumber(c(e),{unit:"dayOfYear"})},DDDD:function(e){return v(c(e),3)},dd:function(e,t){return t.locale.localize.weekday(e.getUTCDay(),{type:"narrow"})},ddd:function(e,t){return t.locale.localize.weekday(e.getUTCDay(),{type:"short"})},dddd:function(e,t){return t.locale.localize.weekday(e.getUTCDay(),{type:"long"})},d:function(e){return e.getUTCDay()},do:function(e,t){return t.locale.localize.ordinalNumber(e.getUTCDay(),{unit:"dayOfWeek"})},E:function(e){return e.getUTCDay()||7},W:function(e){return p(e)},Wo:function(e,t){return t.locale.localize.ordinalNumber(p(e),{unit:"isoWeek"})},WW:function(e){return v(p(e),2)},YY:function(e){return v(e.getUTCFullYear(),4).substr(2)},YYYY:function(e){return v(e.getUTCFullYear(),4)},GG:function(e){return String(d(e)).substr(2)},GGGG:function(e){return d(e)},H:function(e){return e.getUTCHours()},HH:function(e){return v(e.getUTCHours(),2)},h:function(e){var t=e.getUTCHours();return 0===t?12:t>12?t%12:t},hh:function(e){return v(q.h(e),2)},m:function(e){return e.getUTCMinutes()},mm:function(e){return v(e.getUTCMinutes(),2)},s:function(e){return e.getUTCSeconds()},ss:function(e){return v(e.getUTCSeconds(),2)},S:function(e){return Math.floor(e.getUTCMilliseconds()/100)},SS:function(e){return v(Math.floor(e.getUTCMilliseconds()/10),2)},SSS:function(e){return v(e.getUTCMilliseconds(),3)},Z:function(e,t){return m((t._originalDate||e).getTimezoneOffset(),":")},ZZ:function(e,t){return m((t._originalDate||e).getTimezoneOffset())},X:function(e,t){var r=t._originalDate||e;return Math.floor(r.getTime()/1e3)},x:function(e,t){return(t._originalDate||e).getTime()},A:function(e,t){return t.locale.localize.timeOfDay(e.getUTCHours(),{type:"uppercase"})},a:function(e,t){return t.locale.localize.timeOfDay(e.getUTCHours(),{type:"lowercase"})},aa:function(e,t){return t.locale.localize.timeOfDay(e.getUTCHours(),{type:"long"})}},W=/(\[[^[]*])|(\\)?(LTS|LT|LLLL|LLL|LL|L|llll|lll|ll|l)/g,R=/(\[[^[]*])|(\\)?(x|ss|s|mm|m|hh|h|do|dddd|ddd|dd|d|aa|a|ZZ|Z|YYYY|YY|X|Wo|WW|W|SSS|SS|S|Qo|Q|Mo|MMMM|MMM|MM|M|HH|H|GGGG|GG|E|Do|DDDo|DDDD|DDD|DD|D|A|.)/g,I={M:/^(1[0-2]|0?\d)/,D:/^(3[0-1]|[0-2]?\d)/,DDD:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,W:/^(5[0-3]|[0-4]?\d)/,YYYY:/^(\d{1,4})/,H:/^(2[0-3]|[0-1]?\d)/,m:/^([0-5]?\d)/,Z:/^([+-])(\d{2}):(\d{2})/,ZZ:/^([+-])(\d{2})(\d{2})/,singleDigit:/^(\d)/,twoDigits:/^(\d{2})/,threeDigits:/^(\d{3})/,fourDigits:/^(\d{4})/,anyDigits:/^(\d+)/},P={YY:{unit:"twoDigitYear",match:I.twoDigits,parse:function(e){return $(e)}},YYYY:{unit:"year",match:I.YYYY,parse:$},GG:{unit:"isoYear",match:I.twoDigits,parse:function(e){return $(e)+1900}},GGGG:{unit:"isoYear",match:I.YYYY,parse:$},Q:{unit:"quarter",match:I.singleDigit,parse:$},Qo:{unit:"quarter",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"quarter"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"quarter"})}},M:{unit:"month",match:I.M,parse:function(e){return $(e)-1}},Mo:{unit:"month",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"month"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"month"})-1}},MM:{unit:"month",match:I.twoDigits,parse:function(e){return $(e)-1}},MMM:{unit:"month",match:function(e,t){return t.locale.match.months(e,{type:"short"})},parse:function(e,t){return t.locale.match.month(e,{type:"short"})}},MMMM:{unit:"month",match:function(e,t){return t.locale.match.months(e,{type:"long"})||t.locale.match.months(e,{type:"short"})},parse:function(e,t){var r=t.locale.match.month(e,{type:"long"});return null==r&&(r=t.locale.match.month(e,{type:"short"})),r}},W:{unit:"isoWeek",match:I.W,parse:$},Wo:{unit:"isoWeek",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"isoWeek"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"isoWeek"})}},WW:{unit:"isoWeek",match:I.twoDigits,parse:$},d:{unit:"dayOfWeek",match:I.singleDigit,parse:$},do:{unit:"dayOfWeek",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"dayOfWeek"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"dayOfWeek"})}},dd:{unit:"dayOfWeek",match:function(e,t){return t.locale.match.weekdays(e,{type:"narrow"})},parse:function(e,t){return t.locale.match.weekday(e,{type:"narrow"})}},ddd:{unit:"dayOfWeek",match:function(e,t){return t.locale.match.weekdays(e,{type:"short"})||t.locale.match.weekdays(e,{type:"narrow"})},parse:function(e,t){var r=t.locale.match.weekday(e,{type:"short"});return null==r&&(r=t.locale.match.weekday(e,{type:"narrow"})),r}},dddd:{unit:"dayOfWeek",match:function(e,t){return t.locale.match.weekdays(e,{type:"long"})||t.locale.match.weekdays(e,{type:"short"})||t.locale.match.weekdays(e,{type:"narrow"})},parse:function(e,t){var r=t.locale.match.weekday(e,{type:"long"});return null==r&&null==(r=t.locale.match.weekday(e,{type:"short"}))&&(r=t.locale.match.weekday(e,{type:"narrow"})),r}},E:{unit:"dayOfISOWeek",match:I.singleDigit,parse:function(e){return $(e)}},D:{unit:"dayOfMonth",match:I.D,parse:$},Do:{unit:"dayOfMonth",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"dayOfMonth"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"dayOfMonth"})}},DD:{unit:"dayOfMonth",match:I.twoDigits,parse:$},DDD:{unit:"dayOfYear",match:I.DDD,parse:$},DDDo:{unit:"dayOfYear",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"dayOfYear"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"dayOfYear"})}},DDDD:{unit:"dayOfYear",match:I.threeDigits,parse:$},A:{unit:"timeOfDay",match:function(e,t){return t.locale.match.timesOfDay(e,{type:"short"})},parse:function(e,t){return t.locale.match.timeOfDay(e,{type:"short"})}},aa:{unit:"timeOfDay",match:function(e,t){return t.locale.match.timesOfDay(e,{type:"long"})||t.locale.match.timesOfDay(e,{type:"short"})},parse:function(e,t){var r=t.locale.match.timeOfDay(e,{type:"long"});return null==r&&(r=t.locale.match.timeOfDay(e,{type:"short"})),r}},H:{unit:"hours",match:I.H,parse:$},HH:{unit:"hours",match:I.twoDigits,parse:$},h:{unit:"timeOfDayHours",match:I.M,parse:$},hh:{unit:"timeOfDayHours",match:I.twoDigits,parse:$},m:{unit:"minutes",match:I.m,parse:$},mm:{unit:"minutes",match:I.twoDigits,parse:$},s:{unit:"seconds",match:I.m,parse:$},ss:{unit:"seconds",match:I.twoDigits,parse:$},S:{unit:"milliseconds",match:I.singleDigit,parse:function(e){return 100*$(e)}},SS:{unit:"milliseconds",match:I.twoDigits,parse:function(e){return 10*$(e)}},SSS:{unit:"milliseconds",match:I.threeDigits,parse:$},Z:{unit:"timezone",match:I.Z,parse:function(e){var t=e[1],r=60*parseInt(e[2],10)+parseInt(e[3],10);return"+"===t?r:-r}},ZZ:{unit:"timezone",match:I.ZZ,parse:function(e){var t=e[1],r=60*parseInt(e[2],10)+parseInt(e[3],10);return"+"===t?r:-r}},X:{unit:"timestamp",match:I.anyDigits,parse:function(e){return 1e3*$(e)}},x:{unit:"timestamp",match:I.anyDigits,parse:$}};P.a=P.A;var V=864e5,G={twoDigitYear:{priority:10,set:function(e,t){var r=100*Math.floor(e.date.getUTCFullYear()/100)+t;return e.date.setUTCFullYear(r,0,1),e.date.setUTCHours(0,0,0,0),e}},year:{priority:10,set:function(e,t){return e.date.setUTCFullYear(t,0,1),e.date.setUTCHours(0,0,0,0),e}},isoYear:{priority:10,set:function(t,r,n){return t.date=h(function(t,r,n){var i=e(t,n),a=Number(r),o=h(i,n),s=Math.floor((i.getTime()-o.getTime())/V),u=new Date(0);return u.setUTCFullYear(a,0,4),u.setUTCHours(0,0,0,0),(i=h(u,n)).setUTCDate(i.getUTCDate()+s),i}(t.date,r,n),n),t}},quarter:{priority:20,set:function(e,t){return e.date.setUTCMonth(3*(t-1),1),e.date.setUTCHours(0,0,0,0),e}},month:{priority:30,set:function(e,t){return e.date.setUTCMonth(t,1),e.date.setUTCHours(0,0,0,0),e}},isoWeek:{priority:40,set:function(t,r,n){return t.date=f(function(t,r,n){var i=e(t,n),a=Number(r),o=p(i,n)-a;return i.setUTCDate(i.getUTCDate()-7*o),i}(t.date,r,n),n),t}},dayOfWeek:{priority:50,set:function(t,r,n){return t.date=function(t,r,n){var i=n||{},a=i.locale,o=a&&a.options&&a.options.weekStartsOn,s=void 0===o?0:Number(o),u=void 0===i.weekStartsOn?s:Number(i.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=e(t,n),c=Number(r),f=l.getUTCDay(),d=((c%7+7)%7=e},ue=A(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String))throw new TypeError("This library (validator.js) validates strings only")},e.exports=t.default});x(ue);var le=x(A(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(e);var t=e.replace(/[- ]+/g,"");if(!n.test(t))return!1;for(var i=0,a=void 0,o=void 0,s=void 0,u=t.length-1;u>=0;u--)a=t.substring(u,u+1),o=parseInt(a,10),i+=s&&(o*=2)>=10?o%10+1:o,s=!s;return!(i%10!=0||!t)};var r=function(e){return e&&e.__esModule?e:{default:e}}(ue),n=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|62[0-9]{14})$/;e.exports=t.default})),ce=function(e,t){void 0===t&&(t=[]);var r=t[0];void 0===r&&(r="*");var n=t[1];if(void 0===n&&(n="."),Array.isArray(e))return e.every(function(e){return ce(e,[r,n])});if(null===e||void 0===e||""===e)return!0;if(0===Number(r))return/^-?\d*$/.test(e);var i="*"===r?"+":"{1,"+r+"}";if(!new RegExp("^-?\\d*(\\"+n+"\\d"+i+")?$").test(e))return!1;var a=parseFloat(e);return a==a},fe=function(e,t){var r=t[0];if(Array.isArray(e))return e.every(function(e){return fe(e,[r])});var n=String(e);return/^[0-9]*$/.test(n)&&n.length===Number(r)},de=A(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default});x(de);var he=A(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e,t){(0,n.default)(e);var i=void 0,a=void 0;"object"===(void 0===t?"undefined":r(t))?(i=t.min||0,a=t.max):(i=arguments[1],a=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=i&&(void 0===a||o<=a)};var n=function(e){return e&&e.__esModule?e:{default:e}}(ue);e.exports=t.default});x(he);var pe=A(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),(t=(0,i.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var r=e.split(".");if(t.require_tld){var o=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(o))return!1}for(var s,u=0;u$/i,l=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,c=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,f=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,d=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default})),ve=function(e,t){return Array.isArray(e)?e.every(function(e){return ve(e,t)}):!!t.filter(function(t){return t==e}).length},ge=A(function(e,t){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(e),!(t=String(t)))return r(e,4)||r(e,6);if("4"===t){if(!i.test(e))return!1;return e.split(".").sort(function(e,t){return e-t})[3]<=255}if("6"===t){var o=e.split(":"),s=!1,u=r(o[o.length-1],4),l=u?7:8;if(o.length>l)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(o.shift(),o.shift(),s=!0):"::"===e.substr(e.length-2)&&(o.pop(),o.pop(),s=!0);for(var c=0;c0&&c=1:o.length===l}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var n=function(e){return e&&e.__esModule?e:{default:e}}(ue),i=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,a=/^[0-9A-F]{1,4}$/i;e.exports=t.default}),ye=x(ge),be=function(e,t){return e.getAttribute("data-vv-"+t)},we=function(e){return null===e||void 0===e},De=function(e,t){if(e instanceof RegExp&&t instanceof RegExp)return De(e.source,t.source)&&De(e.flags,t.flags);if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var r=0;r0;)t[r]=arguments[r+1];if(Ae(Object.assign))return Object.assign.apply(Object,[e].concat(t));if(null==e)throw new TypeError("Cannot convert undefined or null to object");var n=Object(e);return t.forEach(function(e){null!=e&&Object.keys(e).forEach(function(t){n[t]=e[t]})}),n},Se=0,Ye="{id}",Ne=function(e,t){var r=Le(e);if(Ae(r.find))return r.find(t);var n;return r.some(function(e){return!!t(e)&&(n=e,!0)}),n},Ee=function(e){return e&&("SELECT"===e.tagName||~["radio","checkbox","file"].indexOf(e.type))?"change":"input"},ke=function(e){if(!e)return!1;var t=e.componentOptions.tag;return/keep-alive|transition|transition-group/.test(t)},Ue=function(e,t,r){return"number"==typeof t?e.reduce(function(e,r){return e[r]=t,e},{}):e.reduce(function(e,n){return"object"==typeof t&&n in t?(e[n]=t[n],e):"number"==typeof r?(e[n]=r,e):(e[n]=r&&r[n]||0,e)},{})},je=function(e){if("number"==typeof e)return e;if("string"==typeof e)return parseInt(e);var t={};for(var r in e)t[r]=parseInt(e[r]);return t},Ze=function(e,t){return xe(e)&&xe(t)?(Object.keys(t).forEach(function(r){if(xe(t[r])){if(!e[r]){Ce(e,(n={},n[r]={},n));var n}Ze(e[r],t[r])}else{Ce(e,(i={},i[r]=t[r],i));var i}}),e):e},He=function(e,t){return Array.isArray(e)?e.every(function(e){return He(e,t)}):!t.filter(function(t){return t==e}).length},ze=x(A(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function n(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function i(e,t){for(var r=0;r=2083||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,u.default)(t,l);var r=void 0,n=void 0,f=void 0,d=void 0,h=void 0,p=void 0,m=void 0,v=void 0;if(m=e.split("#"),e=m.shift(),m=e.split("?"),e=m.shift(),(m=e.split("://")).length>1){if(r=m.shift(),t.require_valid_protocol&&-1===t.protocols.indexOf(r))return!1}else{if(t.require_protocol)return!1;t.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(m[0]=e.substr(2))}if(""===(e=m.join("://")))return!1;if(m=e.split("/"),""===(e=m.shift())&&!t.require_host)return!0;if((m=e.split("@")).length>1&&(n=m.shift()).indexOf(":")>=0&&n.split(":").length>2)return!1;p=null,v=null;var g=(d=m.join("@")).match(c);return g?(f="",v=g[1],p=g[2]||null):(f=(m=d.split(":")).shift(),m.length&&(p=m.join(":"))),!(null!==p&&(h=parseInt(p,10),!/^[0-9]+$/.test(p)||h<=0||h>65535)||!((0,s.default)(f)||(0,o.default)(f,t)||v&&(0,s.default)(v,6))||(f=f||v,t.host_whitelist&&!i(f,t.host_whitelist)||t.host_blacklist&&i(f,t.host_blacklist)))};var a=r(ue),o=r(pe),s=r(ge),u=r(de),l={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},c=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default})),qe={after:function(e,t){var r=t[0],n=t[1],i=t[2];return void 0===i&&(i=n,n=!1),e=M(e,i),r=M(r,i),!(!e||!r)&&(b(e,r)||n&&D(e,r))},alpha_dash:ie,alpha_num:ae,alpha_spaces:oe,alpha:ne,before:function(e,t){var r=t[0],n=t[1],i=t[2];return void 0===i&&(i=n,n=!1),e=M(e,i),r=M(r,i),!(!e||!r)&&(w(e,r)||n&&D(e,r))},between:se,confirmed:function(e,t){return String(e)===String(t)},credit_card:function(e){return le(String(e))},date_between:function(e,t){var r,n,i,a="()";if(t.length>3){var o;r=(o=t)[0],n=o[1],a=o[2],i=o[3]}else{var s;r=(s=t)[0],n=s[1],i=s[2]}var u=M(r,i),l=M(n,i),c=M(e,i);return!!(u&&l&&c)&&("()"===a?b(c,u)&&w(c,l):"(]"===a?b(c,u)&&(D(c,l)||w(c,l)):"[)"===a?w(c,l)&&(D(c,u)||b(c,u)):D(c,l)||D(c,u)||w(c,l)&&b(c,u))},date_format:function(e,t){return!!M(e,t[0])},decimal:ce,digits:fe,dimensions:function(e,t){for(var r=t[0],n=t[1],i=[],a=0;a=t&&e.length<=r)}(e,r,n))},ip:function(e,t){void 0===t&&(t=[]);var r=t[0];return void 0===r&&(r=4),we(e)&&(e=""),Array.isArray(e)?e.every(function(e){return ye(e,r)}):ye(e,r)},is:function(e,t){void 0===t&&(t=[]);return e===t[0]},max:function(e,t){var r=t[0];return void 0===e||null===e?r>=0:String(e).length<=r},max_value:function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)<=r},mimes:function(e,t){var r=new RegExp(t.join("|").replace("*",".+")+"$","i");return e.every(function(e){return r.test(e.type)})},min:function(e,t){var r=t[0];return void 0!==e&&null!==e&&String(e).length>=r},min_value:function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)>=r},not_in:He,numeric:function(e){return Array.isArray(e)?e.every(function(e){return/^[0-9]+$/.test(String(e))}):/^[0-9]+$/.test(String(e))},regex:function(e,t){var r=t[0],n=t.slice(1);return r instanceof RegExp?r.test(e):new RegExp(r,n).test(String(e))},required:function(e,t){void 0===t&&(t=[]);var r=t[0];return void 0===r&&(r=!1),Array.isArray(e)?!!e.length:!(!1===e&&r||void 0===e||null===e||!String(e).trim().length)},size:function(e,t){var r=t[0];if(isNaN(r))return!1;for(var n=1024*Number(r),i=0;in)return!1;return!0},url:function(e,t){void 0===t&&(t=[]);var r=t[0];void 0===r&&(r=!1);var n={require_protocol:!!r,allow_underscores:!0};return we(e)&&(e=""),Array.isArray(e)?e.every(function(e){return ze(e,n)}):ze(e,n)}},We={name:"en",messages:{_default:function(e){return"The "+e+" value is not valid."},after:function(e,t){var r=t[0];return"The "+e+" must be after "+(t[1]?"or equal to ":"")+r+"."},alpha_dash:function(e){return"The "+e+" field may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(e){return"The "+e+" field may only contain alpha-numeric characters."},alpha_spaces:function(e){return"The "+e+" field may only contain alphabetic characters as well as spaces."},alpha:function(e){return"The "+e+" field may only contain alphabetic characters."},before:function(e,t){var r=t[0];return"The "+e+" must be before "+(t[1]?"or equal to ":"")+r+"."},between:function(e,t){return"The "+e+" field must be between "+t[0]+" and "+t[1]+"."},confirmed:function(e){return"The "+e+" confirmation does not match."},credit_card:function(e){return"The "+e+" field is invalid."},date_between:function(e,t){return"The "+e+" must be between "+t[0]+" and "+t[1]+"."},date_format:function(e,t){return"The "+e+" must be in the format "+t[0]+"."},decimal:function(e,t){void 0===t&&(t=[]);var r=t[0];return void 0===r&&(r="*"),"The "+e+" field must be numeric and may contain "+(r&&"*"!==r?r:"")+" decimal points."},digits:function(e,t){return"The "+e+" field must be numeric and exactly contain "+t[0]+" digits."},dimensions:function(e,t){return"The "+e+" field must be "+t[0]+" pixels by "+t[1]+" pixels."},email:function(e){return"The "+e+" field must be a valid email."},ext:function(e){return"The "+e+" field must be a valid file."},image:function(e){return"The "+e+" field must be an image."},in:function(e){return"The "+e+" field must be a valid value."},integer:function(e){return"The "+e+" field must be an integer."},ip:function(e){return"The "+e+" field must be a valid ip address."},length:function(e,t){var r=t[0],n=t[1];return n?"The "+e+" length be between "+r+" and "+n+".":"The "+e+" length must be "+r+"."},max:function(e,t){return"The "+e+" field may not be greater than "+t[0]+" characters."},max_value:function(e,t){return"The "+e+" field must be "+t[0]+" or less."},mimes:function(e){return"The "+e+" field must have a valid file type."},min:function(e,t){return"The "+e+" field must be at least "+t[0]+" characters."},min_value:function(e,t){return"The "+e+" field must be "+t[0]+" or more."},not_in:function(e){return"The "+e+" field must be a valid value."},numeric:function(e){return"The "+e+" field may only contain numeric characters."},regex:function(e){return"The "+e+" field format is invalid."},required:function(e){return"The "+e+" field is required."},size:function(e,t){return"The "+e+" size must be less than "+function(e){var t=0==(e=1024*Number(e))?0:Math.floor(Math.log(e)/Math.log(1024));return 1*(e/Math.pow(1024,t)).toFixed(2)+" "+["Byte","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}(t[0])+"."},url:function(e){return"The "+e+" field is not a valid URL."}},attributes:{}};"undefined"!=typeof VeeValidate&&VeeValidate.Validator.addLocale(We);var Re=function(){this.items=[]};Re.prototype.add=function(e){arguments.length>1&&(e={field:arguments[0],msg:arguments[1],rule:arguments[2],scope:we(arguments[3])?null:arguments[3],regenerate:null}),e.scope=we(e.scope)?null:e.scope,this.items.push(e)},Re.prototype.regenerate=function(){this.items.forEach(function(e){e.msg=Ae(e.regenerate)?e.regenerate():e.msg})},Re.prototype.update=function(e,t){var r=Ne(this.items,function(t){return t.id===e});if(r){var n=this.items.indexOf(r);this.items.splice(n,1),r.scope=t.scope,this.items.push(r)}},Re.prototype.all=function(e){return we(e)?this.items.map(function(e){return e.msg}):this.items.filter(function(t){return t.scope===e}).map(function(e){return e.msg})},Re.prototype.any=function(e){return we(e)?!!this.items.length:!!this.items.filter(function(t){return t.scope===e}).length},Re.prototype.clear=function(e){we(e)&&(e=null);for(var t=0;t-1){var t=e.split(":");return{name:t[0],rule:t[1]}}return null},Re.prototype._scope=function(e){if(e.indexOf(".")>-1){var t=e.split("."),r=t[0];return{name:t.slice(1).join("."),scope:r}}return null};var Ie="en",Pe=function(e){void 0===e&&(e={}),this.container={},this.merge(e)},Ve={locale:{}};Ve.locale.get=function(){return Ie},Ve.locale.set=function(e){Ie=e||"en"},Pe.prototype.hasLocale=function(e){return!!this.container[e]},Pe.prototype.setDateFormat=function(e,t){this.container[e]||(this.container[e]={}),this.container[e].dateFormat=t},Pe.prototype.getDateFormat=function(e){return this.container[e]&&this.container[e].dateFormat?this.container[e].dateFormat:null},Pe.prototype.getMessage=function(e,t,r){var n=null;return n=this.hasMessage(e,t)?this.container[e].messages[t]:this._getDefaultMessage(e),Ae(n)?n.apply(void 0,r):n},Pe.prototype.getFieldMessage=function(e,t,r,n){if(!this.hasLocale(e))return this.getMessage(e,r,n);var i=this.container[e].custom&&this.container[e].custom[t];if(!i||!i[r])return this.getMessage(e,r,n);var a=i[r];return Ae(a)?a.apply(void 0,n):a},Pe.prototype._getDefaultMessage=function(e){return this.hasMessage(e,"_default")?this.container[e].messages._default:this.container.en.messages._default},Pe.prototype.getAttribute=function(e,t,r){return void 0===r&&(r=""),this.hasAttribute(e,t)?this.container[e].attributes[t]:r},Pe.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.container[e].messages&&this.container[e].messages[t])},Pe.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.container[e].attributes&&this.container[e].attributes[t])},Pe.prototype.merge=function(e){Ze(this.container,e)},Pe.prototype.setMessage=function(e,t,r){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].messages[t]=r},Pe.prototype.setAttribute=function(e,t,r){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].attributes[t]=r},Object.defineProperties(Pe.prototype,Ve);var Ge=function(e){return xe(e)?Object.keys(e).reduce(function(t,r){return t[r]=Ge(e[r]),t},{}):Ae(e)?e("{0}",["{1}","{2}","{3}"]):e},Be=function(e,t){this.i18n=e,this.rootKey=t},Xe={locale:{}};Xe.locale.get=function(){return this.i18n.locale},Xe.locale.set=function(e){Te("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},Be.prototype.getDateFormat=function(e){return this.i18n.getDateTimeFormat(e||this.locale)},Be.prototype.setDateFormat=function(e,t){this.i18n.setDateTimeFormat(e||this.locale,t)},Be.prototype.getMessage=function(e,t,r){var n=this.rootKey+".messages."+t;return this.i18n.te(n)?this.i18n.t(n,e,r):this.i18n.t(this.rootKey+".messages._default",e,r)},Be.prototype.getAttribute=function(e,t,r){void 0===r&&(r="");var n=this.rootKey+".attributes."+t;return this.i18n.te(n)?this.i18n.t(n,e):r},Be.prototype.getFieldMessage=function(e,t,r,n){var i=this.rootKey+".custom."+t+"."+r;return this.i18n.te(i)?this.i18n.t(i):this.getMessage(e,r,n)},Be.prototype.merge=function(e){var t=this;Object.keys(e).forEach(function(r){var n=Ze({},$e(r+"."+t.rootKey,t.i18n.messages,{})),i=Ze(n,function(e){return{messages:Ge(e.messages),custom:Ge(e.custom),attributes:e.attributes,dateFormat:e.dateFormat}}(e[r]));t.i18n.mergeLocaleMessage(r,(a={},a[t.rootKey]=i,a));var a;i.dateFormat&&t.i18n.setDateTimeFormat(r,i.dateFormat)})},Be.prototype.setMessage=function(e,t,r){this.merge((i={},i[e]={messages:(n={},n[t]=r,n)},i));var n,i},Be.prototype.setAttribute=function(e,t,r){this.merge((i={},i[e]={attributes:(n={},n[t]=r,n)},i));var n,i},Object.defineProperties(Be.prototype,Xe);var Ke={locale:"en",delay:0,errorBagName:"errors",dictionary:null,strict:!0,fieldsBagName:"fields",classes:!1,classNames:null,events:"input|blur",inject:!0,fastExit:!0,aria:!0,validity:!1,i18n:null,i18nRootKey:"validation"},Qe=Ce({},Ke),Je={dictionary:new Pe({en:{messages:{},attributes:{},custom:{}}})},et=function(){},tt={default:{},current:{}};tt.default.get=function(){return Ke},tt.current.get=function(){return Qe},et.dependency=function(e){return Je[e]},et.merge=function(e){(Qe=Ce({},Qe,e)).i18n&&et.register("dictionary",new Be(Qe.i18n,Qe.i18nRootKey))},et.register=function(e,t){Je[e]=t},et.resolve=function(e){var t=$e("$options.$_veeValidate",e,{});return Ce({},et.current,t)},Object.defineProperties(et,tt);var rt=function(){};rt.generate=function(e,t,r){var n=rt.resolveModel(t,r),i=et.resolve(r.context);return{name:rt.resolveName(e,r),el:e,listen:!t.modifiers.disable,scope:rt.resolveScope(e,t,r),vm:rt.makeVM(r.context),expression:t.value,component:r.child,classes:i.classes,classNames:i.classNames,getter:rt.resolveGetter(e,r,n),events:rt.resolveEvents(e,r)||i.events,model:n,delay:rt.resolveDelay(e,r,i),rules:rt.resolveRules(e,t),initial:!!t.modifiers.initial,validity:i.validity,aria:i.aria,initialValue:rt.resolveInitialValue(r)}},rt.getCtorConfig=function(e){if(!e.child)return null;return $e("child.$options.$_veeValidate",e)},rt.resolveRules=function(e,t){return t.value||t&&t.expression?"string"==typeof t.value?t.value:~["string","object"].indexOf(typeof t.value.rules)?t.value.rules:t.value:be(e,"rules")},rt.resolveInitialValue=function(e){var t=e.data.model||Ne(e.data.directives,function(e){return"model"===e.name});return t&&t.value},rt.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}},rt.resolveDelay=function(e,t,r){var n=be(e,"delay"),i=r&&"delay"in r?r.delay:0;return!n&&t.child&&t.child.$attrs&&(n=t.child.$attrs["data-vv-delay"]),n?{local:{input:parseInt(n)},global:je(i)}:{global:je(i)}},rt.resolveEvents=function(e,t){var r=be(e,"validate-on");if(!r&&t.child&&t.child.$attrs&&(r=t.child.$attrs["data-vv-validate-on"]),!r&&t.child){var n=rt.getCtorConfig(t);r=n&&n.events}return r},rt.resolveScope=function(e,t,r){void 0===r&&(r={});var n=null;return xe(t.value)&&(n=t.value.scope),r.child&&we(n)&&(n=r.child.$attrs&&r.child.$attrs["data-vv-scope"]),we(n)?function(e){var t=be(e,"scope");return we(t)&&e.form&&(t=be(e.form,"scope")),we(t)?null:t}(e):n},rt.resolveModel=function(e,t){if(e.arg)return e.arg;if(xe(e.value)&&e.value.arg)return e.value.arg;var r=t.data.model||Ne(t.data.directives,function(e){return"model"===e.name});if(!r)return null;return/^[a-z_]+[0-9]*(\w*\.[a-z_]\w*)*$/i.test(r.expression)&&function(e,t){var r=t;return e.split(".").every(function(e){return!!Object.prototype.hasOwnProperty.call(r,e)&&(r=r[e],!0)})}(r.expression,t.context)?r.expression:null},rt.resolveName=function(e,t){var r=be(e,"name");if(!r&&!t.child)return e.name;if(!r&&t.child&&t.child.$attrs&&(r=t.child.$attrs["data-vv-name"]||t.child.$attrs.name),!r&&t.child){var n=rt.getCtorConfig(t);if(n&&Ae(n.name)){return n.name.bind(t.child)()}return t.child.name}return r},rt.resolveGetter=function(e,t,r){if(r)return function(){return $e(r,t.context)};if(t.child){var n=be(e,"value-path")||t.child.$attrs&&t.child.$attrs["data-vv-value-path"];if(n)return function(){return $e(n,t.child)};var i=rt.getCtorConfig(t);if(i&&Ae(i.value)){var a=i.value.bind(t.child);return function(){return a()}}return function(){return t.child.value}}switch(e.type){case"checkbox":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]');if((t=Le(t).filter(function(e){return e.checked})).length)return t.map(function(e){return e.value})};case"radio":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]'),r=Ne(t,function(e){return e.checked});return r&&r.value};case"file":return function(t){return Le(e.files)};case"select-multiple":return function(){return Le(e.options).filter(function(e){return e.selected}).map(function(e){return e.value})};default:return function(){return e&&e.value}}};var nt={targetOf:null,initial:!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"}},it=function(e,t){void 0===t&&(t={}),this.id=function(){Se>=9999&&(Se=0,Ye=Ye.replace("{id}","_{id}")),Se++;return Ye.replace("{id}",String(Se))}(),this.el=e,this.updated=!1,this.dependencies=[],this.watchers=[],this.events=[],this.delay=0,this.rules={},this._cacheId(t),t=Ce({},nt,t),this._delay="number"==typeof t.delay?t.delay:t.delay&&t.delay.global,this.validity=t.validity,this.aria=t.aria,this.flags={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1},this.vm=t.vm,this.component=t.component,this.ctorConfig=this.component?$e("$options.$_veeValidate",this.component):void 0,this.update(t),this.updated=!1},at={validator:{},isRequired:{},isDisabled:{},alias:{},value:{},rejectsFalse:{}};at.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:(Te("No validator instance detected."),{validate:function(){}})},at.isRequired.get=function(){return!!this.rules.required},at.isDisabled.get=function(){return!(!this.component||!this.component.disabled)||!(!this.el||!this.el.disabled)},at.alias.get=function(){if(this._alias)return this._alias;var e=null;return this.el&&(e=be(this.el,"as")),!e&&this.component?this.component.$attrs&&this.component.$attrs["data-vv-as"]:e},at.value.get=function(){if(Ae(this.getter))return this.getter()},at.rejectsFalse.get=function(){return this.component&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},it.prototype.matches=function(e){return e.id?this.id===e.id: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)},it.prototype._cacheId=function(e){this.el&&!e.targetOf&&function(e,t,r){e.setAttribute("data-vv-"+t,r)}(this.el,"id",this.id)},it.prototype.update=function(e){this.targetOf=e.targetOf||null,this.initial=e.initial||this.initial||!1,!we(e.scope)&&e.scope!==this.scope&&Ae(this.validator.update)&&this.validator.update(this.id,{scope:e.scope}),this.scope=we(e.scope)?we(this.scope)?null:this.scope:e.scope,this.name=(we(e.name)?e.name:String(e.name))||this.name||null,this.rules=void 0!==e.rules?function(e){return e?xe(e)?Object.keys(e).reduce(function(t,r){var n=[];return n=!0===e[r]?[]:Array.isArray(e[r])?e[r]:[e[r]],!1!==e[r]&&(t[r]=n),t},{}):"string"!=typeof e?(Te("rules must be either a string or an object."),{}):e.split("|").reduce(function(e,t){var r=function(e){var t=[],r=e.split(":")[0];return~e.indexOf(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:r,params:t}}(t);return r.name?(e[r.name]=r.params,e):e},{}):{}}(e.rules):this.rules,this.model=e.model||this.model,this.listen=void 0!==e.listen?e.listen:this.listen,this.classes=(e.classes||this.classes||!1)&&!this.component,this.classNames=e.classNames||this.classNames||nt.classNames,this.getter=Ae(e.getter)?e.getter:this.getter,this._alias=e.alias||this._alias,this.events=e.events?function(e){return"string"==typeof e&&e.length?e.split("|"):[]}(e.events):this.events,this.delay=e.delay?Ue(this.events,e.delay,this._delay):Ue(this.events,this.delay,this._delay),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.el&&(this.updateClasses(),this.addValueListeners(),this.updateAriaAttrs())},it.prototype.reset=function(){var e=this,t={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1};Object.keys(this.flags).forEach(function(r){e.flags[r]=t[r]}),this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},it.prototype.setFlags=function(e){var t=this,r={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(e).forEach(function(n){t.flags[n]=e[n],r[n]&&void 0===e[r[n]]&&(t.flags[r[n]]=!e[n])}),void 0===e.untouched&&void 0===e.touched&&void 0===e.dirty&&void 0===e.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},it.prototype.updateDependencies=function(){var e=this;this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[];var t=Object.keys(this.rules).reduce(function(t,r){return"confirmed"===r?t.push({selector:e.rules[r][0]||e.name+"_confirmation",name:r}):dt.isTargetRule(r)&&t.push({selector:e.rules[r][0],name:r}),t},[]);t.length&&this.vm&&this.vm.$el&&t.forEach(function(t){var r=t.selector,n=t.name,i=null;if("$"===r[0])i=e.vm.$refs[r.slice(1)];else try{i=e.vm.$el.querySelector(r)}catch(e){i=null}if(!i)try{i=e.vm.$el.querySelector('input[name="'+r+'"]')}catch(e){i=null}if(i){var a={vm:e.vm,classes:e.classes,classNames:e.classNames,delay:e.delay,scope:e.scope,events:e.events.join("|"),initial:e.initial,targetOf:e.id};Ae(i.$watch)?(a.component=i,a.el=i.$el,a.getter=rt.resolveGetter(i.$el,{child:i})):(a.el=i,a.getter=rt.resolveGetter(i,{})),e.dependencies.push({name:n,field:new it(a.el,a)})}})},it.prototype.unwatch=function(e){if(void 0===e&&(e=null),!e)return this.watchers.forEach(function(e){return e.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(t){return e.test(t.tag)}).forEach(function(e){return e.unwatch()}),this.watchers=this.watchers.filter(function(t){return!e.test(t.tag)})},it.prototype.updateClasses=function(){this.classes&&(Fe(this.el,this.classNames.dirty,this.flags.dirty),Fe(this.el,this.classNames.pristine,this.flags.pristine),Fe(this.el,this.classNames.valid,!!this.flags.valid),Fe(this.el,this.classNames.invalid,!!this.flags.invalid),Fe(this.el,this.classNames.touched,this.flags.touched),Fe(this.el,this.classNames.untouched,this.flags.untouched))},it.prototype.addActionListeners=function(){var e=this;this.unwatch(/class/);var t=function(){e.flags.touched=!0,e.flags.untouched=!1,e.classes&&(Fe(e.el,e.classNames.touched,!0),Fe(e.el,e.classNames.untouched,!1)),e.unwatch(/^class_blur$/)},r=Ee(this.el),n=function(){e.flags.dirty=!0,e.flags.pristine=!1,e.classes&&(Fe(e.el,e.classNames.pristine,!1),Fe(e.el,e.classNames.dirty,!0)),e.unwatch(/^class_input$/)};if(this.component&&Ae(this.component.$once))return this.component.$once("input",n),this.component.$once("blur",t),this.watchers.push({tag:"class_input",unwatch:function(){e.component.$off("input",n)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){e.component.$off("blur",t)}});if(this.el){this.el.addEventListener(r,n);var i=-1===["radio","checkbox"].indexOf(this.el.type)?"blur":"click";this.el.addEventListener(i,t),this.watchers.push({tag:"class_input",unwatch:function(){e.el.removeEventListener(r,n)}}),this.watchers.push({tag:"class_blur",unwatch:function(){e.el.removeEventListener(i,t)}})}},it.prototype.addValueListeners=function(){var e=this;if(this.unwatch(/^input_.+/),this.listen){var t=this.targetOf?function(){e.validator.validate("#"+e.targetOf)}:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];(0===t.length||Ae(Event)&&t[0]instanceof Event||t[0]&&t[0].srcElement)&&(t[0]=e.value),e.validator.validate("#"+e.id,t[0])},r=Ee(this.el),n=this.events.map(function(e){return"input"===e?r:e});if(this.model&&-1!==n.indexOf(r)){var i=_e(t,this.delay[r]),a=this.vm.$watch(this.model,function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];e.flags.pending=!0,i.apply(void 0,t)});this.watchers.push({tag:"input_model",unwatch:a}),n=n.filter(function(e){return e!==r})}n.forEach(function(r){var n=_e(t,e.delay[r]),i=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];e.flags.pending=!0,n.apply(void 0,t)};if(e.component)return e.component.$on(r,i),void e.watchers.push({tag:"input_vue",unwatch:function(){e.component.$off(r,i)}});if(~["radio","checkbox"].indexOf(e.el.type)){var a=document.querySelectorAll('input[name="'+e.el.name+'"]');Le(a).forEach(function(t){t.addEventListener(r,i),e.watchers.push({tag:"input_native",unwatch:function(){t.removeEventListener(r,i)}})})}else e.el.addEventListener(r,i),e.watchers.push({tag:"input_native",unwatch:function(){e.el.removeEventListener(r,i)}})})}},it.prototype.updateAriaAttrs=function(){this.aria&&this.el&&Ae(this.el.setAttribute)&&(this.el.setAttribute("aria-required",this.isRequired?"true":"false"),this.el.setAttribute("aria-invalid",this.flags.invalid?"true":"false"))},it.prototype.updateCustomValidity=function(){this.validity&&this.el&&Ae(this.el.setCustomValidity)&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},it.prototype.destroy=function(){this.watchers.forEach(function(e){return e.unwatch()}),this.watchers=[],this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[]},Object.defineProperties(it.prototype,at);var ot=function(){this.items=[]},st={length:{}};st.length.get=function(){return this.items.length},ot.prototype.find=function(e){return Ne(this.items,function(t){return t.matches(e)})},ot.prototype.filter=function(e){return Array.isArray(e)?this.items.filter(function(t){return e.some(function(e){return t.matches(e)})}):this.items.filter(function(t){return t.matches(e)})},ot.prototype.map=function(e){return this.items.map(e)},ot.prototype.remove=function(e){var t=null;if(!(t=e instanceof it?e:this.find(e)))return null;var r=this.items.indexOf(t);return this.items.splice(r,1),t},ot.prototype.push=function(e){if(!(e instanceof it))throw Me("FieldBag only accepts instances of Field that has an id defined.");if(!e.id)throw Me("Field id must be defined.");if(this.find({id:e.id}))throw Me("Field with id "+e.id+" is already added.");this.items.push(e)},Object.defineProperties(ot.prototype,st);var ut={},lt=!0,ct=["confirmed","after","before"],ft=[],dt=function(e,t){var r=this;void 0===t&&(t={vm:null,fastExit:!0}),this.strict=lt,this.errors=new Re,ft.push(this.errors),this.fields=new ot,this.flags={},this._createFields(e),this.paused=!1,this.fastExit=t.fastExit||!1,this.ownerId=t.vm&&t.vm._uid,this.reset=t.vm&&Ae(t.vm.$nextTick)?function(e){return new Promise(function(n){t.vm.$nextTick(function(){n(r._reset(e))})})}:this._reset},ht={dictionary:{},locale:{},rules:{}},pt={dictionary:{},locale:{},rules:{}};ht.dictionary.get=function(){return et.dependency("dictionary")},pt.dictionary.get=function(){return et.dependency("dictionary")},ht.locale.get=function(){return this.dictionary.locale},ht.locale.set=function(e){dt.locale=e},pt.locale.get=function(){return dt.dictionary.locale},pt.locale.set=function(e){var t=e!==dt.dictionary.locale;dt.dictionary.locale=e,t&&dt.regenerate()},ht.rules.get=function(){return ut},pt.rules.get=function(){return ut},dt.create=function(e,t){return new dt(e,t)},dt.extend=function(e,t,r){void 0===r&&(r={}),dt._guardExtend(e,t),dt._merge(e,t),r&&r.hasTarget&&ct.push(e)},dt.regenerate=function(){ft.forEach(function(e){return e.regenerate()})},dt.remove=function(e){delete ut[e];var t=ct.indexOf(e);-1!==t&&ct.splice(t,1)},dt.isTargetRule=function(e){return-1!==ct.indexOf(e)},dt.setStrictMode=function(e){void 0===e&&(e=!0),lt=e},dt.prototype.localize=function(e,t){dt.localize(e,t)},dt.localize=function(e,t){if(xe(e))dt.dictionary.merge(e);else{if(t){var r=e||t.name;t=Ce({},t),dt.dictionary.merge((n={},n[r]=t,n));var n}e&&(dt.locale=e)}},dt.prototype.attach=function(e){arguments.length>1&&(e=Ce({},{name:arguments[0],rules:arguments[1]},arguments[2]||{vm:{$validator:this}}));var t=e.initialValue;return e instanceof it||(e=new it(e.el||null,e)),this.fields.push(e),e.initial?this.validate("#"+e.id,t||e.value):this._validate(e,t||e.value,!0).then(function(t){e.flags.valid=t.valid,e.flags.invalid=!t.valid}),this._addFlag(e,e.scope),e},dt.prototype.flag=function(e,t){var r=this._resolveField(e);r&&t&&r.setFlags(t)},dt.prototype.detach=function(e,t){var r=e instanceof it?e:this._resolveField(e,t);if(r){r.destroy(),this.errors.remove(r.name,r.scope,r.id),this.fields.remove(r);var n=this.flags;!we(r.scope)&&n["$"+r.scope]?delete n["$"+r.scope][r.name]:we(r.scope)&&delete n[r.name],this.flags=Ce({},n)}},dt.prototype.extend=function(e,t,r){void 0===r&&(r={}),dt.extend(e,t,r)},dt.prototype.update=function(e,t){var r=t.scope,n=this._resolveField("#"+e);n&&(this.errors.update(e,{scope:r}),!we(n.scope)&&this.flags["$"+n.scope]?delete this.flags["$"+n.scope][n.name]:we(n.scope)&&delete this.flags[n.name],this._addFlag(n,r))},dt.prototype.remove=function(e){dt.remove(e)},dt.prototype.validate=function(e,t,r){var n=this;if(void 0===r&&(r=null),this.paused)return Promise.resolve(!0);if(0===arguments.length)return this.validateScopes();if(1===arguments.length&&"*"===arguments[0])return this.validateAll();if(1===arguments.length&&"string"==typeof arguments[0]&&/^(.+)\.\*$/.test(arguments[0])){var i=arguments[0].match(/^(.+)\.\*$/)[1];return this.validateAll(i)}var a=this._resolveField(e,r);if(!a)return this._handleFieldNotFound(e,r);a.flags.pending=!0,1===arguments.length&&(t=a.value);var o=a.isDisabled;return this._validate(a,t,o).then(function(e){return a.setFlags({pending:!1,valid:e.valid,validated:!0}),n.errors.remove(a.name,a.scope,a.id),o?Promise.resolve(!0):(e.errors&&e.errors.forEach(function(e){return n.errors.add(e)}),e.valid)})},dt.prototype.pause=function(){return this.paused=!0,this},dt.prototype.resume=function(){return this.paused=!1,this},dt.prototype.validateAll=function(e){var t=arguments,r=this;if(this.paused)return Promise.resolve(!0);var n=null,i=!1;"string"==typeof e?n={scope:e}:xe(e)?(n=Object.keys(e).map(function(e){return{name:e,scope:t[1]||null}}),i=!0):0===arguments.length?n={scope:null}:Array.isArray(e)&&(n=e.map(function(e){return{name:e,scope:t[1]||null}}));var a=this.fields.filter(n).map(function(t){return r.validate("#"+t.id,i?e[t.name]:t.value)});return Promise.all(a).then(function(e){return e.every(function(e){return e})})},dt.prototype.validateScopes=function(){var e=this;if(this.paused)return Promise.resolve(!0);var t=this.fields.map(function(t){return e.validate("#"+t.id,t.value)});return Promise.all(t).then(function(e){return e.every(function(e){return e})})},dt.prototype.destroy=function(){var e=ft.indexOf(this.errors);-1!==e&&ft.splice(e,1)},dt.prototype._createFields=function(e){var t=this;e&&Object.keys(e).forEach(function(r){var n=Ce({},{name:r,rules:e[r]});t.attach(n)})},dt.prototype._getDateFormat=function(e){var t=null;return e.date_format&&Array.isArray(e.date_format)&&(t=e.date_format[0]),t||this.dictionary.getDateFormat(this.locale)},dt.prototype._isADateRule=function(e){return!!~["after","before","date_between","date_format"].indexOf(e)},dt.prototype._formatErrorMessage=function(e,t,r,n){void 0===r&&(r={}),void 0===n&&(n=null);var i=this._getFieldDisplayName(e),a=this._getLocalizedParams(t,n);return this.dictionary.getFieldMessage(this.locale,e.name,t.name,[i,a,r])},dt.prototype._getLocalizedParams=function(e,t){if(void 0===t&&(t=null),~ct.indexOf(e.name)&&e.params&&e.params[0]){return[t||this.dictionary.getAttribute(this.locale,e.params[0],e.params[0])].concat(e.params.slice(1))}return e.params},dt.prototype._getFieldDisplayName=function(e){return e.alias||this.dictionary.getAttribute(this.locale,e.name,e.name)},dt.prototype._addFlag=function(e,t){if(void 0===t&&(t=null),we(t)){this.flags=Ce({},this.flags,(r={},r[""+e.name]=e.flags,r));var r}else{var n,i=Ce({},this.flags["$"+t]||{},(n={},n[""+e.name]=e.flags,n));this.flags=Ce({},this.flags,(a={},a["$"+t]=i,a));var a}},dt.prototype._reset=function(e){var t=this;return new Promise(function(r){if(e)return t.fields.filter(e).forEach(function(e){e.reset(),t.errors.remove(e.name,e.scope,e.id)}),r();t.fields.items.forEach(function(e){return e.reset()}),t.errors.clear(),r()})},dt.prototype._test=function(e,t,r){var n=this,i=ut[r.name],a=Array.isArray(r.params)?Le(r.params):[],o=null;if(!i||"function"!=typeof i)throw Me("No such validator '"+r.name+"' exists.");if(-1!==ct.indexOf(r.name)){var s=Ne(e.dependencies,function(e){return e.name===r.name});s&&(o=s.field.alias,a=[s.field.value].concat(a.slice(1)))}else"required"===r.name&&e.rejectsFalse&&(a=a.length?a:[!0]);if(this._isADateRule(r.name)){var u=this._getDateFormat(e.rules);"date_format"!==r.name&&a.push(u)}var l=i(t,a);return Ae(l.then)?l.then(function(t){var i=!0,a={};return Array.isArray(t)?i=t.every(function(e){return xe(e)?e.valid:e}):(i=xe(t)?t.valid:t,a=t.data),{valid:i,error:i?void 0:n._createFieldError(e,r,a,o)}}):(xe(l)||(l={valid:l,data:{}}),{valid:l.valid,error:l.valid?void 0:this._createFieldError(e,r,l.data,o)})},dt._merge=function(e,t){Ae(t)?ut[e]=t:(ut[e]=t.validate,t.getMessage&&dt.dictionary.setMessage(this.locale,e,t.getMessage))},dt._guardExtend=function(e,t){if(!Ae(t)){if(!Ae(t.validate))throw Me("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.");if(!Ae(t.getMessage)&&"string"!=typeof t.getMessage)throw Me("Extension Error: The validator '"+e+"' object must have a 'getMessage' method or string.")}},dt.prototype._createFieldError=function(e,t,r,n){var i=this;return{id:e.id,field:e.name,msg:this._formatErrorMessage(e,t,r,n),rule:t.name,scope:e.scope,regenerate:function(){return i._formatErrorMessage(e,t,r,n)}}},dt.prototype._resolveField=function(e,t){if(!we(t))return this.fields.find({name:e,scope:t});if("#"===e[0])return this.fields.find({id:e.slice(1)});if(e.indexOf(".")>-1){var r=e.split("."),n=r[0],i=r.slice(1),a=this.fields.find({name:i.join("."),scope:n});if(a)return a}return this.fields.find({name:e,scope:null})},dt.prototype._handleFieldNotFound=function(e,t){if(!this.strict)return Promise.resolve(!0);var r=we(t)?e:(we(t)?"":t+".")+e;throw Me('Validating a non-existent field: "'+r+'". Use "attach()" first.')},dt.prototype._validate=function(e,t,r){var n=this;if(void 0===r&&(r=!1),!e.isRequired&&(we(t)||""===t))return Promise.resolve({valid:!0});var i=[],a=[],o=!1;return Object.keys(e.rules).some(function(r){var s=n._test(e,t,{name:r,params:e.rules[r]});return Ae(s.then)?i.push(s):n.fastExit&&!s.valid?(a.push(s.error),o=!0):i.push(new Promise(function(e){e(s)})),o}),o?Promise.resolve({valid:!1,errors:a}):Promise.all(i).then(function(e){return e.map(function(e){return e.valid||a.push(e.error),e.valid}).every(function(e){return e})}).then(function(e){return{valid:e,errors:a}})},Object.defineProperties(dt.prototype,ht),Object.defineProperties(dt,pt);var mt,vt=function(e,t){return"undefined"==typeof Proxy?e:new Proxy(e,t)}({},{get:function(e,t){return 0===String(t).indexOf("$")?vt:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1}}}),gt=function(e,t){return new dt(null,{vm:e,fastExit:t.fastExit})},yt={provide:function(){return this.$validator&&!ke(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!ke(this.$vnode)){this.$parent||et.merge(this.$options.$_veeValidate||{});var e=et.resolve(this),t=this.$options._base;this.$options.$validates&&(Te('The ctor $validates option has been deprecated please set the $_veeValidate.validator option to "new" instead'),this.$validator=gt(this,e)),(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=gt(this,e));var r=function(e){return!!(e&&(Array.isArray(e)&&~e.indexOf("$validator")||xe(e)&&e.$validator))}(this.$options.inject);this.$validator||!e.inject||r||(this.$validator=gt(this,e)),(r||this.$validator)&&(!r&&this.$validator&&(t.util.defineReactive(this.$validator,"errors",this.$validator.errors),t.util.defineReactive(this.$validator,"flags",this.$validator.flags)),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 Object.keys(this.$validator.flags).length?this.$validator.flags:vt})}},beforeDestroy:function(){ke(this.$vnode)||this.$validator&&this.$validator.ownerId===this._uid&&(this.$validator.pause(),this.$validator.destroy())}},bt=function(e,t){return t&&t.$validator?t.$validator.fields.find({id:be(e,"id")}):null},wt={bind:function(e,t,r){var n=r.context.$validator;if(n){var i=rt.generate(e,t,r);n.attach(i)}else Te("No validator instance is present on vm, did you forget to inject '$validator'?")},inserted:function(e,t,r){var n=bt(e,r.context),i=rt.resolveScope(e,t,r);n&&i!==n.scope&&(n.update({scope:i}),n.updated=!1)},update:function(e,t,r){var n=bt(e,r.context);if(!(!n||n.updated&&De(t.value,t.oldValue))){var i=rt.resolveScope(e,t,r),a=rt.resolveRules(e,t);n.update({scope:i,rules:a})}},unbind:function(e,t,r){var n=r.context,i=bt(e,n);i&&n.$validator.detach(i)}},Dt=function(e,t){return void 0===t&&(t=!0),Object.keys(e).reduce(function(r,n){if(!r)return r=Ce({},e[n]);var i=0===n.indexOf("$");return t&&i?r=Dt(e[n]):!t&&i?r:r=function(e,t){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(n,i){return n[i]=r[i](e[i],t[i]),n},{})}(r,e[n])},null)},$t={install:function(e,t){if(void 0===t&&(t={}),mt)Te("already installed, Vue.use(VeeValidate) should only be called once.");else{mt=e,et.merge(t);var r=et.current,n=r.locale,i=r.dictionary,a=r.i18n;i&&dt.localize(i),a&&a._vm&&Ae(a._vm.$watch)&&a._vm.$watch("locale",function(){dt.regenerate()}),dt.localize(n),dt.setStrictMode(et.current.strict),mt.mixin(yt),mt.directive("validate",wt)}},use:function(e,t){if(void 0===t&&(t={}),!Ae(e))return Te("The plugin must be a callable function");e({Validator:dt,ErrorBag:Re,Rules:dt.rules},t)},directive:wt,mixin:yt,mapFields:function(e){if(!e)return function(){return Dt(this.$validator.flags)};var t=function(e){return Array.isArray(e)?e.reduce(function(e,t){return~t.indexOf(".")?e[t.split(".")[1]]=t:e[t]=t,e},{}):e}(e);return Object.keys(t).reduce(function(e,r){var n=t[r];return e[r]=function(){if(this.$validator.flags[n])return this.$validator.flags[n];if("*"===t[r])return Dt(this.$validator.flags,!1);if(n.indexOf(".")<=0)return{};var e=n.split("."),i=e[0],a=e.slice(1);return i=this.$validator.flags["$"+i],"*"===(a=a.join("."))&&i?Dt(i):i&&i[a]?i[a]:{}},e},{})},Validator:dt,ErrorBag:Re,version:"2.0.0-rc.26"};return $t.use(function(e){var t=e.Validator;Object.keys(qe).forEach(function(e){t.extend(e,qe[e])}),t.localize("en",We)}),$t.Rules=qe,$t}); \ No newline at end of file +!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";function e(e,r){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=r||{},i=void 0===n.additionalDigits?L:Number(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date)return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var a=function(e){var t,r={},n=e.split(C.dateTimeDelimeter);C.plainTime.test(n[0])?(r.date=null,t=n[0]):(r.date=n[0],t=n[1]);if(t){var i=C.timezone.exec(t);i?(r.time=t.replace(i[1],""),r.timezone=i[1]):r.time=t}return r}(e),o=function(e,t){var r,n=C.YYY[t],i=C.YYYYY[t];if(r=C.YYYY.exec(e)||i.exec(e)){var a=r[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(r=C.YY.exec(e)||n.exec(e)){var o=r[1];return{year:100*parseInt(o,10),restDateString:e.slice(o.length)}}return{year:null}}(a.date,i),s=o.year,u=function(e,r){if(null===r)return null;var n,i,a,o;if(0===e.length)return(i=new Date(0)).setUTCFullYear(r),i;if(n=C.MM.exec(e))return i=new Date(0),a=parseInt(n[1],10)-1,i.setUTCFullYear(r,a),i;if(n=C.DDD.exec(e)){i=new Date(0);var s=parseInt(n[1],10);return i.setUTCFullYear(r,0,s),i}if(n=C.MMDD.exec(e)){i=new Date(0),a=parseInt(n[1],10)-1;var u=parseInt(n[2],10);return i.setUTCFullYear(r,a,u),i}if(n=C.Www.exec(e))return o=parseInt(n[1],10)-1,t(r,o);if(n=C.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return t(r,o,l)}return null}(o.restDateString,s);if(u){var l,c=u.getTime(),f=0;return a.time&&(f=function(e){var t,r,n;if(t=C.HH.exec(e))return(r=parseFloat(t[1].replace(",",".")))%24*O;if(t=C.HHMM.exec(e))return r=parseInt(t[1],10),n=parseFloat(t[2].replace(",",".")),r%24*O+n*F;if(t=C.HHMMSS.exec(e)){r=parseInt(t[1],10),n=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return r%24*O+n*F+1e3*i}return null}(a.time)),a.timezone?l=function(e){var t,r;if(t=C.timezoneZ.exec(e))return 0;if(t=C.timezoneHH.exec(e))return r=60*parseInt(t[2],10),"+"===t[1]?-r:r;if(t=C.timezoneHHMM.exec(e))return r=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-r:r;return 0}(a.timezone):(l=new Date(c+f).getTimezoneOffset(),l=new Date(c+f+l*F).getTimezoneOffset()),new Date(c+f+l*F)}return new Date(e)}function t(e,t,r){t=t||0,r=r||0;var n=new Date(0);n.setUTCFullYear(e,0,4);var i=7*t+r+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+i),n}function r(e){e=e||{};var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function n(t,r,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return function(t,r,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var i=e(t,n).getTime(),a=Number(r);return new Date(i+a)}(t,Number(r)*S,n)}function i(t,r){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=e(t,r);return!isNaN(n)}function a(e){return e.replace(N,function(e){return e.slice(1)})}function o(e,t,r){return function(n,i){var a=i||{},o=a.type?String(a.type):t;return(e[o]||e[t])[r?r(Number(n)):Number(n)]}}function s(e,t){return function(r){var n=r||{},i=n.type?String(n.type):t;return e[i]||e[t]}}function u(e,t){return function(r,n){var i=n||{},a=i.type?String(i.type):t,o=e[a]||e[t];return String(r).match(o)}}function l(e,t){return function(r,n){var i=n||{},a=i.type?String(i.type):t,o=e[a]||e[t],s=r[1];return o.findIndex(function(e){return e.test(s)})}}function c(t,r){var n=e(t,r),i=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var a=i-n.getTime();return Math.floor(a/H)+1}function f(t,r){var n=e(t,r),i=n.getUTCDay(),a=(i<1?7:0)+i-1;return n.setUTCDate(n.getUTCDate()-a),n.setUTCHours(0,0,0,0),n}function d(t,r){var n=e(t,r),i=n.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(i+1,0,4),a.setUTCHours(0,0,0,0);var o=f(a,r),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var u=f(s,r);return n.getTime()>=o.getTime()?i+1:n.getTime()>=u.getTime()?i:i-1}function h(e,t){var r=d(e,t),n=new Date(0);n.setUTCFullYear(r,0,4),n.setUTCHours(0,0,0,0);return f(n,t)}function p(t,r){var n=e(t,r),i=f(n,r).getTime()-h(n,r).getTime();return Math.round(i/z)+1}function m(e,t){t=t||"";var r=e>0?"-":"+",n=Math.abs(e),i=n%60;return r+v(Math.floor(n/60),2)+t+v(i,2)}function v(e,t){for(var r=Math.abs(e).toString();r.lengtha.getTime()}function w(t,r,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var i=e(t,n),a=e(r,n);return i.getTime()=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=u.locale||Z,f=c.parsers||{},d=c.units||{};if(!c.match)throw new RangeError("locale must contain match property");if(!c.formatLong)throw new RangeError("locale must contain formatLong property");var h=String(i).replace(K,function(e){return"["===e[0]?e:"\\"===e[0]?function(e){if(e.match(/\[[\s\S]/))return e.replace(/^\[|]$/g,"");return e.replace(/\\/g,"")}(e):c.formatLong(e)});if(""===h)return""===s?e(a,u):new Date(NaN);var p=r(u);p.locale=c;var m,v=h.match(c.parsingTokensRegExp||Q),g=v.length,y=[{priority:B,set:T,index:0}];for(m=0;m0?"in "+n:n+" ago":n},formatLong:function(e){var t={LTS:e.LTS,LT:e.LT,L:e.L,LL:e.LL,LLL:e.LLL,LLLL:e.LLLL,l:e.l||a(e.L),ll:e.ll||a(e.LL),lll:e.lll||a(e.LLL),llll:e.llll||a(e.LLLL)};return function(e){return t[e]}}({LT:"h:mm aa",LTS:"h:mm:ss aa",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY h:mm aa",LLLL:"dddd, MMMM D YYYY h:mm aa"}),formatRelative:function(e,t,r,n){return E[e]},localize:{ordinalNumber:function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},weekday:o(k,"long"),weekdays:s(k,"long"),month:o(U,"long"),months:s(U,"long"),timeOfDay:o(j,"long",function(e){return e/12>=1?1:0}),timesOfDay:s(j,"long")},match:{ordinalNumbers:function(e){return function(t){return String(t).match(e)}}(/^(\d+)(th|st|nd|rd)?/i),ordinalNumber:function(e){return parseInt(e[1],10)},weekdays:u({narrow:/^(su|mo|tu|we|th|fr|sa)/i,short:/^(sun|mon|tue|wed|thu|fri|sat)/i,long:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},"long"),weekday:l({any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},"any"),months:u({short:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,long:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},"long"),month:l({any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},"any"),timesOfDay:u({short:/^(am|pm)/i,long:/^([ap]\.?\s?m\.?)/i},"long"),timeOfDay:l({any:[/^a/i,/^p/i]},"any")},options:{weekStartsOn:0,firstWeekContainsDate:1}},H=864e5,z=6048e5,q={M:function(e){return e.getUTCMonth()+1},Mo:function(e,t){var r=e.getUTCMonth()+1;return t.locale.localize.ordinalNumber(r,{unit:"month"})},MM:function(e){return v(e.getUTCMonth()+1,2)},MMM:function(e,t){return t.locale.localize.month(e.getUTCMonth(),{type:"short"})},MMMM:function(e,t){return t.locale.localize.month(e.getUTCMonth(),{type:"long"})},Q:function(e){return Math.ceil((e.getUTCMonth()+1)/3)},Qo:function(e,t){var r=Math.ceil((e.getUTCMonth()+1)/3);return t.locale.localize.ordinalNumber(r,{unit:"quarter"})},D:function(e){return e.getUTCDate()},Do:function(e,t){return t.locale.localize.ordinalNumber(e.getUTCDate(),{unit:"dayOfMonth"})},DD:function(e){return v(e.getUTCDate(),2)},DDD:function(e){return c(e)},DDDo:function(e,t){return t.locale.localize.ordinalNumber(c(e),{unit:"dayOfYear"})},DDDD:function(e){return v(c(e),3)},dd:function(e,t){return t.locale.localize.weekday(e.getUTCDay(),{type:"narrow"})},ddd:function(e,t){return t.locale.localize.weekday(e.getUTCDay(),{type:"short"})},dddd:function(e,t){return t.locale.localize.weekday(e.getUTCDay(),{type:"long"})},d:function(e){return e.getUTCDay()},do:function(e,t){return t.locale.localize.ordinalNumber(e.getUTCDay(),{unit:"dayOfWeek"})},E:function(e){return e.getUTCDay()||7},W:function(e){return p(e)},Wo:function(e,t){return t.locale.localize.ordinalNumber(p(e),{unit:"isoWeek"})},WW:function(e){return v(p(e),2)},YY:function(e){return v(e.getUTCFullYear(),4).substr(2)},YYYY:function(e){return v(e.getUTCFullYear(),4)},GG:function(e){return String(d(e)).substr(2)},GGGG:function(e){return d(e)},H:function(e){return e.getUTCHours()},HH:function(e){return v(e.getUTCHours(),2)},h:function(e){var t=e.getUTCHours();return 0===t?12:t>12?t%12:t},hh:function(e){return v(q.h(e),2)},m:function(e){return e.getUTCMinutes()},mm:function(e){return v(e.getUTCMinutes(),2)},s:function(e){return e.getUTCSeconds()},ss:function(e){return v(e.getUTCSeconds(),2)},S:function(e){return Math.floor(e.getUTCMilliseconds()/100)},SS:function(e){return v(Math.floor(e.getUTCMilliseconds()/10),2)},SSS:function(e){return v(e.getUTCMilliseconds(),3)},Z:function(e,t){return m((t._originalDate||e).getTimezoneOffset(),":")},ZZ:function(e,t){return m((t._originalDate||e).getTimezoneOffset())},X:function(e,t){var r=t._originalDate||e;return Math.floor(r.getTime()/1e3)},x:function(e,t){return(t._originalDate||e).getTime()},A:function(e,t){return t.locale.localize.timeOfDay(e.getUTCHours(),{type:"uppercase"})},a:function(e,t){return t.locale.localize.timeOfDay(e.getUTCHours(),{type:"lowercase"})},aa:function(e,t){return t.locale.localize.timeOfDay(e.getUTCHours(),{type:"long"})}},W=/(\[[^[]*])|(\\)?(LTS|LT|LLLL|LLL|LL|L|llll|lll|ll|l)/g,R=/(\[[^[]*])|(\\)?(x|ss|s|mm|m|hh|h|do|dddd|ddd|dd|d|aa|a|ZZ|Z|YYYY|YY|X|Wo|WW|W|SSS|SS|S|Qo|Q|Mo|MMMM|MMM|MM|M|HH|H|GGGG|GG|E|Do|DDDo|DDDD|DDD|DD|D|A|.)/g,I={M:/^(1[0-2]|0?\d)/,D:/^(3[0-1]|[0-2]?\d)/,DDD:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,W:/^(5[0-3]|[0-4]?\d)/,YYYY:/^(\d{1,4})/,H:/^(2[0-3]|[0-1]?\d)/,m:/^([0-5]?\d)/,Z:/^([+-])(\d{2}):(\d{2})/,ZZ:/^([+-])(\d{2})(\d{2})/,singleDigit:/^(\d)/,twoDigits:/^(\d{2})/,threeDigits:/^(\d{3})/,fourDigits:/^(\d{4})/,anyDigits:/^(\d+)/},P={YY:{unit:"twoDigitYear",match:I.twoDigits,parse:function(e){return $(e)}},YYYY:{unit:"year",match:I.YYYY,parse:$},GG:{unit:"isoYear",match:I.twoDigits,parse:function(e){return $(e)+1900}},GGGG:{unit:"isoYear",match:I.YYYY,parse:$},Q:{unit:"quarter",match:I.singleDigit,parse:$},Qo:{unit:"quarter",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"quarter"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"quarter"})}},M:{unit:"month",match:I.M,parse:function(e){return $(e)-1}},Mo:{unit:"month",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"month"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"month"})-1}},MM:{unit:"month",match:I.twoDigits,parse:function(e){return $(e)-1}},MMM:{unit:"month",match:function(e,t){return t.locale.match.months(e,{type:"short"})},parse:function(e,t){return t.locale.match.month(e,{type:"short"})}},MMMM:{unit:"month",match:function(e,t){return t.locale.match.months(e,{type:"long"})||t.locale.match.months(e,{type:"short"})},parse:function(e,t){var r=t.locale.match.month(e,{type:"long"});return null==r&&(r=t.locale.match.month(e,{type:"short"})),r}},W:{unit:"isoWeek",match:I.W,parse:$},Wo:{unit:"isoWeek",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"isoWeek"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"isoWeek"})}},WW:{unit:"isoWeek",match:I.twoDigits,parse:$},d:{unit:"dayOfWeek",match:I.singleDigit,parse:$},do:{unit:"dayOfWeek",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"dayOfWeek"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"dayOfWeek"})}},dd:{unit:"dayOfWeek",match:function(e,t){return t.locale.match.weekdays(e,{type:"narrow"})},parse:function(e,t){return t.locale.match.weekday(e,{type:"narrow"})}},ddd:{unit:"dayOfWeek",match:function(e,t){return t.locale.match.weekdays(e,{type:"short"})||t.locale.match.weekdays(e,{type:"narrow"})},parse:function(e,t){var r=t.locale.match.weekday(e,{type:"short"});return null==r&&(r=t.locale.match.weekday(e,{type:"narrow"})),r}},dddd:{unit:"dayOfWeek",match:function(e,t){return t.locale.match.weekdays(e,{type:"long"})||t.locale.match.weekdays(e,{type:"short"})||t.locale.match.weekdays(e,{type:"narrow"})},parse:function(e,t){var r=t.locale.match.weekday(e,{type:"long"});return null==r&&null==(r=t.locale.match.weekday(e,{type:"short"}))&&(r=t.locale.match.weekday(e,{type:"narrow"})),r}},E:{unit:"dayOfISOWeek",match:I.singleDigit,parse:function(e){return $(e)}},D:{unit:"dayOfMonth",match:I.D,parse:$},Do:{unit:"dayOfMonth",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"dayOfMonth"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"dayOfMonth"})}},DD:{unit:"dayOfMonth",match:I.twoDigits,parse:$},DDD:{unit:"dayOfYear",match:I.DDD,parse:$},DDDo:{unit:"dayOfYear",match:function(e,t){return t.locale.match.ordinalNumbers(e,{unit:"dayOfYear"})},parse:function(e,t){return t.locale.match.ordinalNumber(e,{unit:"dayOfYear"})}},DDDD:{unit:"dayOfYear",match:I.threeDigits,parse:$},A:{unit:"timeOfDay",match:function(e,t){return t.locale.match.timesOfDay(e,{type:"short"})},parse:function(e,t){return t.locale.match.timeOfDay(e,{type:"short"})}},aa:{unit:"timeOfDay",match:function(e,t){return t.locale.match.timesOfDay(e,{type:"long"})||t.locale.match.timesOfDay(e,{type:"short"})},parse:function(e,t){var r=t.locale.match.timeOfDay(e,{type:"long"});return null==r&&(r=t.locale.match.timeOfDay(e,{type:"short"})),r}},H:{unit:"hours",match:I.H,parse:$},HH:{unit:"hours",match:I.twoDigits,parse:$},h:{unit:"timeOfDayHours",match:I.M,parse:$},hh:{unit:"timeOfDayHours",match:I.twoDigits,parse:$},m:{unit:"minutes",match:I.m,parse:$},mm:{unit:"minutes",match:I.twoDigits,parse:$},s:{unit:"seconds",match:I.m,parse:$},ss:{unit:"seconds",match:I.twoDigits,parse:$},S:{unit:"milliseconds",match:I.singleDigit,parse:function(e){return 100*$(e)}},SS:{unit:"milliseconds",match:I.twoDigits,parse:function(e){return 10*$(e)}},SSS:{unit:"milliseconds",match:I.threeDigits,parse:$},Z:{unit:"timezone",match:I.Z,parse:function(e){var t=e[1],r=60*parseInt(e[2],10)+parseInt(e[3],10);return"+"===t?r:-r}},ZZ:{unit:"timezone",match:I.ZZ,parse:function(e){var t=e[1],r=60*parseInt(e[2],10)+parseInt(e[3],10);return"+"===t?r:-r}},X:{unit:"timestamp",match:I.anyDigits,parse:function(e){return 1e3*$(e)}},x:{unit:"timestamp",match:I.anyDigits,parse:$}};P.a=P.A;var V=864e5,G={twoDigitYear:{priority:10,set:function(e,t){var r=100*Math.floor(e.date.getUTCFullYear()/100)+t;return e.date.setUTCFullYear(r,0,1),e.date.setUTCHours(0,0,0,0),e}},year:{priority:10,set:function(e,t){return e.date.setUTCFullYear(t,0,1),e.date.setUTCHours(0,0,0,0),e}},isoYear:{priority:10,set:function(t,r,n){return t.date=h(function(t,r,n){var i=e(t,n),a=Number(r),o=h(i,n),s=Math.floor((i.getTime()-o.getTime())/V),u=new Date(0);return u.setUTCFullYear(a,0,4),u.setUTCHours(0,0,0,0),(i=h(u,n)).setUTCDate(i.getUTCDate()+s),i}(t.date,r,n),n),t}},quarter:{priority:20,set:function(e,t){return e.date.setUTCMonth(3*(t-1),1),e.date.setUTCHours(0,0,0,0),e}},month:{priority:30,set:function(e,t){return e.date.setUTCMonth(t,1),e.date.setUTCHours(0,0,0,0),e}},isoWeek:{priority:40,set:function(t,r,n){return t.date=f(function(t,r,n){var i=e(t,n),a=Number(r),o=p(i,n)-a;return i.setUTCDate(i.getUTCDate()-7*o),i}(t.date,r,n),n),t}},dayOfWeek:{priority:50,set:function(t,r,n){return t.date=function(t,r,n){var i=n||{},a=i.locale,o=a&&a.options&&a.options.weekStartsOn,s=void 0===o?0:Number(o),u=void 0===i.weekStartsOn?s:Number(i.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=e(t,n),c=Number(r),f=l.getUTCDay(),d=((c%7+7)%7=e},ue=A(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String))throw new TypeError("This library (validator.js) validates strings only")},e.exports=t.default});x(ue);var le=x(A(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(e);var t=e.replace(/[- ]+/g,"");if(!n.test(t))return!1;for(var i=0,a=void 0,o=void 0,s=void 0,u=t.length-1;u>=0;u--)a=t.substring(u,u+1),o=parseInt(a,10),i+=s&&(o*=2)>=10?o%10+1:o,s=!s;return!(i%10!=0||!t)};var r=function(e){return e&&e.__esModule?e:{default:e}}(ue),n=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|62[0-9]{14})$/;e.exports=t.default})),ce=function(e,t){void 0===t&&(t=[]);var r=t[0];void 0===r&&(r="*");var n=t[1];if(void 0===n&&(n="."),Array.isArray(e))return e.every(function(e){return ce(e,[r,n])});if(null===e||void 0===e||""===e)return!0;if(0===Number(r))return/^-?\d*$/.test(e);var i="*"===r?"+":"{1,"+r+"}";if(!new RegExp("^-?\\d*(\\"+n+"\\d"+i+")?$").test(e))return!1;var a=parseFloat(e);return a==a},fe=function(e,t){var r=t[0];if(Array.isArray(e))return e.every(function(e){return fe(e,[r])});var n=String(e);return/^[0-9]*$/.test(n)&&n.length===Number(r)},de=A(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default});x(de);var he=A(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e,t){(0,n.default)(e);var i=void 0,a=void 0;"object"===(void 0===t?"undefined":r(t))?(i=t.min||0,a=t.max):(i=arguments[1],a=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=i&&(void 0===a||o<=a)};var n=function(e){return e&&e.__esModule?e:{default:e}}(ue);e.exports=t.default});x(he);var pe=A(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),(t=(0,i.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var r=e.split(".");if(t.require_tld){var o=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(o))return!1}for(var s,u=0;u$/i,l=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,c=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,f=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,d=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default})),ve=function(e,t){return Array.isArray(e)?e.every(function(e){return ve(e,t)}):!!t.filter(function(t){return t==e}).length},ge=A(function(e,t){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(e),!(t=String(t)))return r(e,4)||r(e,6);if("4"===t){if(!i.test(e))return!1;return e.split(".").sort(function(e,t){return e-t})[3]<=255}if("6"===t){var o=e.split(":"),s=!1,u=r(o[o.length-1],4),l=u?7:8;if(o.length>l)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(o.shift(),o.shift(),s=!0):"::"===e.substr(e.length-2)&&(o.pop(),o.pop(),s=!0);for(var c=0;c0&&c=1:o.length===l}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var n=function(e){return e&&e.__esModule?e:{default:e}}(ue),i=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,a=/^[0-9A-F]{1,4}$/i;e.exports=t.default}),ye=x(ge),be=function(e,t){return e.getAttribute("data-vv-"+t)},we=function(e){return null===e||void 0===e},De=function(e,t){if(e instanceof RegExp&&t instanceof RegExp)return De(e.source,t.source)&&De(e.flags,t.flags);if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var r=0;r0;)t[r]=arguments[r+1];if(Ae(Object.assign))return Object.assign.apply(Object,[e].concat(t));if(null==e)throw new TypeError("Cannot convert undefined or null to object");var n=Object(e);return t.forEach(function(e){null!=e&&Object.keys(e).forEach(function(t){n[t]=e[t]})}),n},Se=0,Ye="{id}",Ne=function(e,t){var r=Le(e);if(Ae(r.find))return r.find(t);var n;return r.some(function(e){return!!t(e)&&(n=e,!0)}),n},Ee=function(e){return e&&("SELECT"===e.tagName||~["radio","checkbox","file"].indexOf(e.type))?"change":"input"},ke=function(e){if(!e)return!1;var t=e.componentOptions.tag;return/keep-alive|transition|transition-group/.test(t)},Ue=function(e,t,r){return"number"==typeof t?e.reduce(function(e,r){return e[r]=t,e},{}):e.reduce(function(e,n){return"object"==typeof t&&n in t?(e[n]=t[n],e):"number"==typeof r?(e[n]=r,e):(e[n]=r&&r[n]||0,e)},{})},je=function(e){if("number"==typeof e)return e;if("string"==typeof e)return parseInt(e);var t={};for(var r in e)t[r]=parseInt(e[r]);return t},Ze=function(e,t){return xe(e)&&xe(t)?(Object.keys(t).forEach(function(r){if(xe(t[r])){if(!e[r]){Ce(e,(n={},n[r]={},n));var n}Ze(e[r],t[r])}else{Ce(e,(i={},i[r]=t[r],i));var i}}),e):e},He=function(e,t){return Array.isArray(e)?e.every(function(e){return He(e,t)}):!t.filter(function(t){return t==e}).length},ze=x(A(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function n(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function i(e,t){for(var r=0;r=2083||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,u.default)(t,l);var r=void 0,n=void 0,f=void 0,d=void 0,h=void 0,p=void 0,m=void 0,v=void 0;if(m=e.split("#"),e=m.shift(),m=e.split("?"),e=m.shift(),(m=e.split("://")).length>1){if(r=m.shift(),t.require_valid_protocol&&-1===t.protocols.indexOf(r))return!1}else{if(t.require_protocol)return!1;t.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(m[0]=e.substr(2))}if(""===(e=m.join("://")))return!1;if(m=e.split("/"),""===(e=m.shift())&&!t.require_host)return!0;if((m=e.split("@")).length>1&&(n=m.shift()).indexOf(":")>=0&&n.split(":").length>2)return!1;p=null,v=null;var g=(d=m.join("@")).match(c);return g?(f="",v=g[1],p=g[2]||null):(f=(m=d.split(":")).shift(),m.length&&(p=m.join(":"))),!(null!==p&&(h=parseInt(p,10),!/^[0-9]+$/.test(p)||h<=0||h>65535)||!((0,s.default)(f)||(0,o.default)(f,t)||v&&(0,s.default)(v,6))||(f=f||v,t.host_whitelist&&!i(f,t.host_whitelist)||t.host_blacklist&&i(f,t.host_blacklist)))};var a=r(ue),o=r(pe),s=r(ge),u=r(de),l={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},c=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default})),qe={after:function(e,t){var r=t[0],n=t[1],i=t[2];return void 0===i&&(i=n,n=!1),e=M(e,i),r=M(r,i),!(!e||!r)&&(b(e,r)||n&&D(e,r))},alpha_dash:ie,alpha_num:ae,alpha_spaces:oe,alpha:ne,before:function(e,t){var r=t[0],n=t[1],i=t[2];return void 0===i&&(i=n,n=!1),e=M(e,i),r=M(r,i),!(!e||!r)&&(w(e,r)||n&&D(e,r))},between:se,confirmed:function(e,t){return String(e)===String(t)},credit_card:function(e){return le(String(e))},date_between:function(e,t){var r,n,i,a="()";if(t.length>3){var o;r=(o=t)[0],n=o[1],a=o[2],i=o[3]}else{var s;r=(s=t)[0],n=s[1],i=s[2]}var u=M(r,i),l=M(n,i),c=M(e,i);return!!(u&&l&&c)&&("()"===a?b(c,u)&&w(c,l):"(]"===a?b(c,u)&&(D(c,l)||w(c,l)):"[)"===a?w(c,l)&&(D(c,u)||b(c,u)):D(c,l)||D(c,u)||w(c,l)&&b(c,u))},date_format:function(e,t){return!!M(e,t[0])},decimal:ce,digits:fe,dimensions:function(e,t){for(var r=t[0],n=t[1],i=[],a=0;a=t&&e.length<=r)}(e,r,n))},ip:function(e,t){void 0===t&&(t=[]);var r=t[0];return void 0===r&&(r=4),we(e)&&(e=""),Array.isArray(e)?e.every(function(e){return ye(e,r)}):ye(e,r)},is:function(e,t){void 0===t&&(t=[]);return e===t[0]},max:function(e,t){var r=t[0];return void 0===e||null===e?r>=0:String(e).length<=r},max_value:function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)<=r},mimes:function(e,t){var r=new RegExp(t.join("|").replace("*",".+")+"$","i");return e.every(function(e){return r.test(e.type)})},min:function(e,t){var r=t[0];return void 0!==e&&null!==e&&String(e).length>=r},min_value:function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)>=r},not_in:He,numeric:function(e){return Array.isArray(e)?e.every(function(e){return/^[0-9]+$/.test(String(e))}):/^[0-9]+$/.test(String(e))},regex:function(e,t){var r=t[0],n=t.slice(1);return r instanceof RegExp?r.test(e):new RegExp(r,n).test(String(e))},required:function(e,t){void 0===t&&(t=[]);var r=t[0];return void 0===r&&(r=!1),Array.isArray(e)?!!e.length:!(!1===e&&r||void 0===e||null===e||!String(e).trim().length)},size:function(e,t){var r=t[0];if(isNaN(r))return!1;for(var n=1024*Number(r),i=0;in)return!1;return!0},url:function(e,t){void 0===t&&(t=[]);var r=t[0];void 0===r&&(r=!1);var n={require_protocol:!!r,allow_underscores:!0};return we(e)&&(e=""),Array.isArray(e)?e.every(function(e){return ze(e,n)}):ze(e,n)}},We={name:"en",messages:{_default:function(e){return"The "+e+" value is not valid."},after:function(e,t){var r=t[0];return"The "+e+" must be after "+(t[1]?"or equal to ":"")+r+"."},alpha_dash:function(e){return"The "+e+" field may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(e){return"The "+e+" field may only contain alpha-numeric characters."},alpha_spaces:function(e){return"The "+e+" field may only contain alphabetic characters as well as spaces."},alpha:function(e){return"The "+e+" field may only contain alphabetic characters."},before:function(e,t){var r=t[0];return"The "+e+" must be before "+(t[1]?"or equal to ":"")+r+"."},between:function(e,t){return"The "+e+" field must be between "+t[0]+" and "+t[1]+"."},confirmed:function(e){return"The "+e+" confirmation does not match."},credit_card:function(e){return"The "+e+" field is invalid."},date_between:function(e,t){return"The "+e+" must be between "+t[0]+" and "+t[1]+"."},date_format:function(e,t){return"The "+e+" must be in the format "+t[0]+"."},decimal:function(e,t){void 0===t&&(t=[]);var r=t[0];return void 0===r&&(r="*"),"The "+e+" field must be numeric and may contain "+(r&&"*"!==r?r:"")+" decimal points."},digits:function(e,t){return"The "+e+" field must be numeric and exactly contain "+t[0]+" digits."},dimensions:function(e,t){return"The "+e+" field must be "+t[0]+" pixels by "+t[1]+" pixels."},email:function(e){return"The "+e+" field must be a valid email."},ext:function(e){return"The "+e+" field must be a valid file."},image:function(e){return"The "+e+" field must be an image."},in:function(e){return"The "+e+" field must be a valid value."},integer:function(e){return"The "+e+" field must be an integer."},ip:function(e){return"The "+e+" field must be a valid ip address."},length:function(e,t){var r=t[0],n=t[1];return n?"The "+e+" length be between "+r+" and "+n+".":"The "+e+" length must be "+r+"."},max:function(e,t){return"The "+e+" field may not be greater than "+t[0]+" characters."},max_value:function(e,t){return"The "+e+" field must be "+t[0]+" or less."},mimes:function(e){return"The "+e+" field must have a valid file type."},min:function(e,t){return"The "+e+" field must be at least "+t[0]+" characters."},min_value:function(e,t){return"The "+e+" field must be "+t[0]+" or more."},not_in:function(e){return"The "+e+" field must be a valid value."},numeric:function(e){return"The "+e+" field may only contain numeric characters."},regex:function(e){return"The "+e+" field format is invalid."},required:function(e){return"The "+e+" field is required."},size:function(e,t){return"The "+e+" size must be less than "+function(e){var t=0==(e=1024*Number(e))?0:Math.floor(Math.log(e)/Math.log(1024));return 1*(e/Math.pow(1024,t)).toFixed(2)+" "+["Byte","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}(t[0])+"."},url:function(e){return"The "+e+" field is not a valid URL."}},attributes:{}};"undefined"!=typeof VeeValidate&&VeeValidate.Validator.addLocale(We);var Re=function(){this.items=[]};Re.prototype.add=function(e){arguments.length>1&&(e={field:arguments[0],msg:arguments[1],rule:arguments[2],scope:we(arguments[3])?null:arguments[3],regenerate:null}),e.scope=we(e.scope)?null:e.scope,this.items.push(e)},Re.prototype.regenerate=function(){this.items.forEach(function(e){e.msg=Ae(e.regenerate)?e.regenerate():e.msg})},Re.prototype.update=function(e,t){var r=Ne(this.items,function(t){return t.id===e});if(r){var n=this.items.indexOf(r);this.items.splice(n,1),r.scope=t.scope,this.items.push(r)}},Re.prototype.all=function(e){return we(e)?this.items.map(function(e){return e.msg}):this.items.filter(function(t){return t.scope===e}).map(function(e){return e.msg})},Re.prototype.any=function(e){return we(e)?!!this.items.length:!!this.items.filter(function(t){return t.scope===e}).length},Re.prototype.clear=function(e){we(e)&&(e=null);for(var t=0;t-1){var t=e.split(":");return{name:t[0],rule:t[1]}}return null},Re.prototype._scope=function(e){if(e.indexOf(".")>-1){var t=e.split("."),r=t[0];return{name:t.slice(1).join("."),scope:r}}return null};var Ie="en",Pe=function(e){void 0===e&&(e={}),this.container={},this.merge(e)},Ve={locale:{}};Ve.locale.get=function(){return Ie},Ve.locale.set=function(e){Ie=e||"en"},Pe.prototype.hasLocale=function(e){return!!this.container[e]},Pe.prototype.setDateFormat=function(e,t){this.container[e]||(this.container[e]={}),this.container[e].dateFormat=t},Pe.prototype.getDateFormat=function(e){return this.container[e]&&this.container[e].dateFormat?this.container[e].dateFormat:null},Pe.prototype.getMessage=function(e,t,r){var n=null;return n=this.hasMessage(e,t)?this.container[e].messages[t]:this._getDefaultMessage(e),Ae(n)?n.apply(void 0,r):n},Pe.prototype.getFieldMessage=function(e,t,r,n){if(!this.hasLocale(e))return this.getMessage(e,r,n);var i=this.container[e].custom&&this.container[e].custom[t];if(!i||!i[r])return this.getMessage(e,r,n);var a=i[r];return Ae(a)?a.apply(void 0,n):a},Pe.prototype._getDefaultMessage=function(e){return this.hasMessage(e,"_default")?this.container[e].messages._default:this.container.en.messages._default},Pe.prototype.getAttribute=function(e,t,r){return void 0===r&&(r=""),this.hasAttribute(e,t)?this.container[e].attributes[t]:r},Pe.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.container[e].messages&&this.container[e].messages[t])},Pe.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.container[e].attributes&&this.container[e].attributes[t])},Pe.prototype.merge=function(e){Ze(this.container,e)},Pe.prototype.setMessage=function(e,t,r){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].messages[t]=r},Pe.prototype.setAttribute=function(e,t,r){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].attributes[t]=r},Object.defineProperties(Pe.prototype,Ve);var Ge=function(e){return xe(e)?Object.keys(e).reduce(function(t,r){return t[r]=Ge(e[r]),t},{}):Ae(e)?e("{0}",["{1}","{2}","{3}"]):e},Be=function(e,t){this.i18n=e,this.rootKey=t},Xe={locale:{}};Xe.locale.get=function(){return this.i18n.locale},Xe.locale.set=function(e){Te("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},Be.prototype.getDateFormat=function(e){return this.i18n.getDateTimeFormat(e||this.locale)},Be.prototype.setDateFormat=function(e,t){this.i18n.setDateTimeFormat(e||this.locale,t)},Be.prototype.getMessage=function(e,t,r){var n=this.rootKey+".messages."+t;return this.i18n.te(n)?this.i18n.t(n,e,r):this.i18n.t(this.rootKey+".messages._default",e,r)},Be.prototype.getAttribute=function(e,t,r){void 0===r&&(r="");var n=this.rootKey+".attributes."+t;return this.i18n.te(n)?this.i18n.t(n,e):r},Be.prototype.getFieldMessage=function(e,t,r,n){var i=this.rootKey+".custom."+t+"."+r;return this.i18n.te(i)?this.i18n.t(i):this.getMessage(e,r,n)},Be.prototype.merge=function(e){var t=this;Object.keys(e).forEach(function(r){var n=Ze({},$e(r+"."+t.rootKey,t.i18n.messages,{})),i=Ze(n,function(e){return{messages:Ge(e.messages),custom:Ge(e.custom),attributes:e.attributes,dateFormat:e.dateFormat}}(e[r]));t.i18n.mergeLocaleMessage(r,(a={},a[t.rootKey]=i,a));var a;i.dateFormat&&t.i18n.setDateTimeFormat(r,i.dateFormat)})},Be.prototype.setMessage=function(e,t,r){this.merge((i={},i[e]={messages:(n={},n[t]=r,n)},i));var n,i},Be.prototype.setAttribute=function(e,t,r){this.merge((i={},i[e]={attributes:(n={},n[t]=r,n)},i));var n,i},Object.defineProperties(Be.prototype,Xe);var Ke={locale:"en",delay:0,errorBagName:"errors",dictionary:null,strict:!0,fieldsBagName:"fields",classes:!1,classNames:null,events:"input|blur",inject:!0,fastExit:!0,aria:!0,validity:!1,i18n:null,i18nRootKey:"validation"},Qe=Ce({},Ke),Je={dictionary:new Pe({en:{messages:{},attributes:{},custom:{}}})},et=function(){},tt={default:{},current:{}};tt.default.get=function(){return Ke},tt.current.get=function(){return Qe},et.dependency=function(e){return Je[e]},et.merge=function(e){(Qe=Ce({},Qe,e)).i18n&&et.register("dictionary",new Be(Qe.i18n,Qe.i18nRootKey))},et.register=function(e,t){Je[e]=t},et.resolve=function(e){var t=$e("$options.$_veeValidate",e,{});return Ce({},et.current,t)},Object.defineProperties(et,tt);var rt=function(){};rt.generate=function(e,t,r){var n=rt.resolveModel(t,r),i=et.resolve(r.context);return{name:rt.resolveName(e,r),el:e,listen:!t.modifiers.disable,scope:rt.resolveScope(e,t,r),vm:rt.makeVM(r.context),expression:t.value,component:r.child,classes:i.classes,classNames:i.classNames,getter:rt.resolveGetter(e,r,n),events:rt.resolveEvents(e,r)||i.events,model:n,delay:rt.resolveDelay(e,r,i),rules:rt.resolveRules(e,t),initial:!!t.modifiers.initial,validity:i.validity,aria:i.aria,initialValue:rt.resolveInitialValue(r)}},rt.getCtorConfig=function(e){if(!e.child)return null;return $e("child.$options.$_veeValidate",e)},rt.resolveRules=function(e,t){return t.value||t&&t.expression?"string"==typeof t.value?t.value:~["string","object"].indexOf(typeof t.value.rules)?t.value.rules:t.value:be(e,"rules")},rt.resolveInitialValue=function(e){var t=e.data.model||Ne(e.data.directives,function(e){return"model"===e.name});return t&&t.value},rt.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}},rt.resolveDelay=function(e,t,r){var n=be(e,"delay"),i=r&&"delay"in r?r.delay:0;return!n&&t.child&&t.child.$attrs&&(n=t.child.$attrs["data-vv-delay"]),xe(i)?(i.input=n||0,je(i)):je(n||i)},rt.resolveEvents=function(e,t){var r=be(e,"validate-on");if(!r&&t.child&&t.child.$attrs&&(r=t.child.$attrs["data-vv-validate-on"]),!r&&t.child){var n=rt.getCtorConfig(t);r=n&&n.events}return r},rt.resolveScope=function(e,t,r){void 0===r&&(r={});var n=null;return xe(t.value)&&(n=t.value.scope),r.child&&we(n)&&(n=r.child.$attrs&&r.child.$attrs["data-vv-scope"]),we(n)?function(e){var t=be(e,"scope");return we(t)&&e.form&&(t=be(e.form,"scope")),we(t)?null:t}(e):n},rt.resolveModel=function(e,t){if(e.arg)return e.arg;if(xe(e.value)&&e.value.arg)return e.value.arg;var r=t.data.model||Ne(t.data.directives,function(e){return"model"===e.name});if(!r)return null;return/^[a-z_]+[0-9]*(\w*\.[a-z_]\w*)*$/i.test(r.expression)&&function(e,t){var r=t;return e.split(".").every(function(e){return!!Object.prototype.hasOwnProperty.call(r,e)&&(r=r[e],!0)})}(r.expression,t.context)?r.expression:null},rt.resolveName=function(e,t){var r=be(e,"name");if(!r&&!t.child)return e.name;if(!r&&t.child&&t.child.$attrs&&(r=t.child.$attrs["data-vv-name"]||t.child.$attrs.name),!r&&t.child){var n=rt.getCtorConfig(t);if(n&&Ae(n.name)){return n.name.bind(t.child)()}return t.child.name}return r},rt.resolveGetter=function(e,t,r){if(r)return function(){return $e(r,t.context)};if(t.child){var n=be(e,"value-path")||t.child.$attrs&&t.child.$attrs["data-vv-value-path"];if(n)return function(){return $e(n,t.child)};var i=rt.getCtorConfig(t);if(i&&Ae(i.value)){var a=i.value.bind(t.child);return function(){return a()}}return function(){return t.child.value}}switch(e.type){case"checkbox":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]');if((t=Le(t).filter(function(e){return e.checked})).length)return t.map(function(e){return e.value})};case"radio":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]'),r=Ne(t,function(e){return e.checked});return r&&r.value};case"file":return function(t){return Le(e.files)};case"select-multiple":return function(){return Le(e.options).filter(function(e){return e.selected}).map(function(e){return e.value})};default:return function(){return e&&e.value}}};var nt={targetOf:null,initial:!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"}},it=function(e,t){void 0===t&&(t={}),this.id=function(){Se>=9999&&(Se=0,Ye=Ye.replace("{id}","_{id}")),Se++;return Ye.replace("{id}",String(Se))}(),this.el=e,this.updated=!1,this.dependencies=[],this.watchers=[],this.events=[],this.delay=0,this.rules={},this._cacheId(t),t=Ce({},nt,t),this._delay=we(t.delay)?0:t.delay,this.validity=t.validity,this.aria=t.aria,this.flags={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1},this.vm=t.vm,this.component=t.component,this.ctorConfig=this.component?$e("$options.$_veeValidate",this.component):void 0,this.update(t),this.updated=!1},at={validator:{},isRequired:{},isDisabled:{},alias:{},value:{},rejectsFalse:{}};at.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:(Te("No validator instance detected."),{validate:function(){}})},at.isRequired.get=function(){return!!this.rules.required},at.isDisabled.get=function(){return!(!this.component||!this.component.disabled)||!(!this.el||!this.el.disabled)},at.alias.get=function(){if(this._alias)return this._alias;var e=null;return this.el&&(e=be(this.el,"as")),!e&&this.component?this.component.$attrs&&this.component.$attrs["data-vv-as"]:e},at.value.get=function(){if(Ae(this.getter))return this.getter()},at.rejectsFalse.get=function(){return this.component&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},it.prototype.matches=function(e){return e.id?this.id===e.id: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)},it.prototype._cacheId=function(e){this.el&&!e.targetOf&&function(e,t,r){e.setAttribute("data-vv-"+t,r)}(this.el,"id",this.id)},it.prototype.update=function(e){this.targetOf=e.targetOf||null,this.initial=e.initial||this.initial||!1,!we(e.scope)&&e.scope!==this.scope&&Ae(this.validator.update)&&this.validator.update(this.id,{scope:e.scope}),this.scope=we(e.scope)?we(this.scope)?null:this.scope:e.scope,this.name=(we(e.name)?e.name:String(e.name))||this.name||null,this.rules=void 0!==e.rules?function(e){return e?xe(e)?Object.keys(e).reduce(function(t,r){var n=[];return n=!0===e[r]?[]:Array.isArray(e[r])?e[r]:[e[r]],!1!==e[r]&&(t[r]=n),t},{}):"string"!=typeof e?(Te("rules must be either a string or an object."),{}):e.split("|").reduce(function(e,t){var r=function(e){var t=[],r=e.split(":")[0];return~e.indexOf(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:r,params:t}}(t);return r.name?(e[r.name]=r.params,e):e},{}):{}}(e.rules):this.rules,this.model=e.model||this.model,this.listen=void 0!==e.listen?e.listen:this.listen,this.classes=(e.classes||this.classes||!1)&&!this.component,this.classNames=e.classNames||this.classNames||nt.classNames,this.getter=Ae(e.getter)?e.getter:this.getter,this._alias=e.alias||this._alias,this.events=e.events?function(e){return"string"==typeof e&&e.length?e.split("|"):[]}(e.events):this.events,this.delay=e.delay?Ue(this.events,e.delay,this._delay):Ue(this.events,this.delay,this._delay),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.el&&(this.updateClasses(),this.addValueListeners(),this.updateAriaAttrs())},it.prototype.reset=function(){var e=this,t={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1};Object.keys(this.flags).forEach(function(r){e.flags[r]=t[r]}),this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},it.prototype.setFlags=function(e){var t=this,r={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(e).forEach(function(n){t.flags[n]=e[n],r[n]&&void 0===e[r[n]]&&(t.flags[r[n]]=!e[n])}),void 0===e.untouched&&void 0===e.touched&&void 0===e.dirty&&void 0===e.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},it.prototype.updateDependencies=function(){var e=this;this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[];var t=Object.keys(this.rules).reduce(function(t,r){return"confirmed"===r?t.push({selector:e.rules[r][0]||e.name+"_confirmation",name:r}):dt.isTargetRule(r)&&t.push({selector:e.rules[r][0],name:r}),t},[]);t.length&&this.vm&&this.vm.$el&&t.forEach(function(t){var r=t.selector,n=t.name,i=null;if("$"===r[0])i=e.vm.$refs[r.slice(1)];else try{i=e.vm.$el.querySelector(r)}catch(e){i=null}if(!i)try{i=e.vm.$el.querySelector('input[name="'+r+'"]')}catch(e){i=null}if(i){var a={vm:e.vm,classes:e.classes,classNames:e.classNames,delay:e.delay,scope:e.scope,events:e.events.join("|"),initial:e.initial,targetOf:e.id};Ae(i.$watch)?(a.component=i,a.el=i.$el,a.getter=rt.resolveGetter(i.$el,{child:i})):(a.el=i,a.getter=rt.resolveGetter(i,{})),e.dependencies.push({name:n,field:new it(a.el,a)})}})},it.prototype.unwatch=function(e){if(void 0===e&&(e=null),!e)return this.watchers.forEach(function(e){return e.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(t){return e.test(t.tag)}).forEach(function(e){return e.unwatch()}),this.watchers=this.watchers.filter(function(t){return!e.test(t.tag)})},it.prototype.updateClasses=function(){this.classes&&(Fe(this.el,this.classNames.dirty,this.flags.dirty),Fe(this.el,this.classNames.pristine,this.flags.pristine),Fe(this.el,this.classNames.valid,!!this.flags.valid),Fe(this.el,this.classNames.invalid,!!this.flags.invalid),Fe(this.el,this.classNames.touched,this.flags.touched),Fe(this.el,this.classNames.untouched,this.flags.untouched))},it.prototype.addActionListeners=function(){var e=this;this.unwatch(/class/);var t=function(){e.flags.touched=!0,e.flags.untouched=!1,e.classes&&(Fe(e.el,e.classNames.touched,!0),Fe(e.el,e.classNames.untouched,!1)),e.unwatch(/^class_blur$/)},r=Ee(this.el),n=function(){e.flags.dirty=!0,e.flags.pristine=!1,e.classes&&(Fe(e.el,e.classNames.pristine,!1),Fe(e.el,e.classNames.dirty,!0)),e.unwatch(/^class_input$/)};if(this.component&&Ae(this.component.$once))return this.component.$once("input",n),this.component.$once("blur",t),this.watchers.push({tag:"class_input",unwatch:function(){e.component.$off("input",n)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){e.component.$off("blur",t)}});if(this.el){this.el.addEventListener(r,n);var i=-1===["radio","checkbox"].indexOf(this.el.type)?"blur":"click";this.el.addEventListener(i,t),this.watchers.push({tag:"class_input",unwatch:function(){e.el.removeEventListener(r,n)}}),this.watchers.push({tag:"class_blur",unwatch:function(){e.el.removeEventListener(i,t)}})}},it.prototype.addValueListeners=function(){var e=this;if(this.unwatch(/^input_.+/),this.listen){var t=this.targetOf?function(){e.validator.validate("#"+e.targetOf)}:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];(0===t.length||Ae(Event)&&t[0]instanceof Event||t[0]&&t[0].srcElement)&&(t[0]=e.value),e.validator.validate("#"+e.id,t[0])},r=Ee(this.el),n=this.events.map(function(e){return"input"===e?r:e});if(this.model&&-1!==n.indexOf(r)){var i=_e(t,this.delay[r]),a=this.vm.$watch(this.model,function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];e.flags.pending=!0,i.apply(void 0,t)});this.watchers.push({tag:"input_model",unwatch:a}),n=n.filter(function(e){return e!==r})}n.forEach(function(r){var n=_e(t,e.delay[r]),i=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];e.flags.pending=!0,n.apply(void 0,t)};if(e.component)return e.component.$on(r,i),void e.watchers.push({tag:"input_vue",unwatch:function(){e.component.$off(r,i)}});if(~["radio","checkbox"].indexOf(e.el.type)){var a=document.querySelectorAll('input[name="'+e.el.name+'"]');Le(a).forEach(function(t){t.addEventListener(r,i),e.watchers.push({tag:"input_native",unwatch:function(){t.removeEventListener(r,i)}})})}else e.el.addEventListener(r,i),e.watchers.push({tag:"input_native",unwatch:function(){e.el.removeEventListener(r,i)}})})}},it.prototype.updateAriaAttrs=function(){this.aria&&this.el&&Ae(this.el.setAttribute)&&(this.el.setAttribute("aria-required",this.isRequired?"true":"false"),this.el.setAttribute("aria-invalid",this.flags.invalid?"true":"false"))},it.prototype.updateCustomValidity=function(){this.validity&&this.el&&Ae(this.el.setCustomValidity)&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},it.prototype.destroy=function(){this.watchers.forEach(function(e){return e.unwatch()}),this.watchers=[],this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[]},Object.defineProperties(it.prototype,at);var ot=function(){this.items=[]},st={length:{}};st.length.get=function(){return this.items.length},ot.prototype.find=function(e){return Ne(this.items,function(t){return t.matches(e)})},ot.prototype.filter=function(e){return Array.isArray(e)?this.items.filter(function(t){return e.some(function(e){return t.matches(e)})}):this.items.filter(function(t){return t.matches(e)})},ot.prototype.map=function(e){return this.items.map(e)},ot.prototype.remove=function(e){var t=null;if(!(t=e instanceof it?e:this.find(e)))return null;var r=this.items.indexOf(t);return this.items.splice(r,1),t},ot.prototype.push=function(e){if(!(e instanceof it))throw Me("FieldBag only accepts instances of Field that has an id defined.");if(!e.id)throw Me("Field id must be defined.");if(this.find({id:e.id}))throw Me("Field with id "+e.id+" is already added.");this.items.push(e)},Object.defineProperties(ot.prototype,st);var ut={},lt=!0,ct=["confirmed","after","before"],ft=[],dt=function(e,t){var r=this;void 0===t&&(t={vm:null,fastExit:!0}),this.strict=lt,this.errors=new Re,ft.push(this.errors),this.fields=new ot,this.flags={},this._createFields(e),this.paused=!1,this.fastExit=t.fastExit||!1,this.ownerId=t.vm&&t.vm._uid,this.reset=t.vm&&Ae(t.vm.$nextTick)?function(e){return new Promise(function(n){t.vm.$nextTick(function(){n(r._reset(e))})})}:this._reset},ht={dictionary:{},locale:{},rules:{}},pt={dictionary:{},locale:{},rules:{}};ht.dictionary.get=function(){return et.dependency("dictionary")},pt.dictionary.get=function(){return et.dependency("dictionary")},ht.locale.get=function(){return this.dictionary.locale},ht.locale.set=function(e){dt.locale=e},pt.locale.get=function(){return dt.dictionary.locale},pt.locale.set=function(e){var t=e!==dt.dictionary.locale;dt.dictionary.locale=e,t&&dt.regenerate()},ht.rules.get=function(){return ut},pt.rules.get=function(){return ut},dt.create=function(e,t){return new dt(e,t)},dt.extend=function(e,t,r){void 0===r&&(r={}),dt._guardExtend(e,t),dt._merge(e,t),r&&r.hasTarget&&ct.push(e)},dt.regenerate=function(){ft.forEach(function(e){return e.regenerate()})},dt.remove=function(e){delete ut[e];var t=ct.indexOf(e);-1!==t&&ct.splice(t,1)},dt.isTargetRule=function(e){return-1!==ct.indexOf(e)},dt.setStrictMode=function(e){void 0===e&&(e=!0),lt=e},dt.prototype.localize=function(e,t){dt.localize(e,t)},dt.localize=function(e,t){if(xe(e))dt.dictionary.merge(e);else{if(t){var r=e||t.name;t=Ce({},t),dt.dictionary.merge((n={},n[r]=t,n));var n}e&&(dt.locale=e)}},dt.prototype.attach=function(e){arguments.length>1&&(e=Ce({},{name:arguments[0],rules:arguments[1]},arguments[2]||{vm:{$validator:this}}));var t=e.initialValue;return e instanceof it||(e=new it(e.el||null,e)),this.fields.push(e),e.initial?this.validate("#"+e.id,t||e.value):this._validate(e,t||e.value,!0).then(function(t){e.flags.valid=t.valid,e.flags.invalid=!t.valid}),this._addFlag(e,e.scope),e},dt.prototype.flag=function(e,t){var r=this._resolveField(e);r&&t&&r.setFlags(t)},dt.prototype.detach=function(e,t){var r=e instanceof it?e:this._resolveField(e,t);if(r){r.destroy(),this.errors.remove(r.name,r.scope,r.id),this.fields.remove(r);var n=this.flags;!we(r.scope)&&n["$"+r.scope]?delete n["$"+r.scope][r.name]:we(r.scope)&&delete n[r.name],this.flags=Ce({},n)}},dt.prototype.extend=function(e,t,r){void 0===r&&(r={}),dt.extend(e,t,r)},dt.prototype.update=function(e,t){var r=t.scope,n=this._resolveField("#"+e);n&&(this.errors.update(e,{scope:r}),!we(n.scope)&&this.flags["$"+n.scope]?delete this.flags["$"+n.scope][n.name]:we(n.scope)&&delete this.flags[n.name],this._addFlag(n,r))},dt.prototype.remove=function(e){dt.remove(e)},dt.prototype.validate=function(e,t,r){var n=this;if(void 0===r&&(r=null),this.paused)return Promise.resolve(!0);if(0===arguments.length)return this.validateScopes();if(1===arguments.length&&"*"===arguments[0])return this.validateAll();if(1===arguments.length&&"string"==typeof arguments[0]&&/^(.+)\.\*$/.test(arguments[0])){var i=arguments[0].match(/^(.+)\.\*$/)[1];return this.validateAll(i)}var a=this._resolveField(e,r);if(!a)return this._handleFieldNotFound(e,r);a.flags.pending=!0,1===arguments.length&&(t=a.value);var o=a.isDisabled;return this._validate(a,t,o).then(function(e){return a.setFlags({pending:!1,valid:e.valid,validated:!0}),n.errors.remove(a.name,a.scope,a.id),o?Promise.resolve(!0):(e.errors&&e.errors.forEach(function(e){return n.errors.add(e)}),e.valid)})},dt.prototype.pause=function(){return this.paused=!0,this},dt.prototype.resume=function(){return this.paused=!1,this},dt.prototype.validateAll=function(e){var t=arguments,r=this;if(this.paused)return Promise.resolve(!0);var n=null,i=!1;"string"==typeof e?n={scope:e}:xe(e)?(n=Object.keys(e).map(function(e){return{name:e,scope:t[1]||null}}),i=!0):0===arguments.length?n={scope:null}:Array.isArray(e)&&(n=e.map(function(e){return{name:e,scope:t[1]||null}}));var a=this.fields.filter(n).map(function(t){return r.validate("#"+t.id,i?e[t.name]:t.value)});return Promise.all(a).then(function(e){return e.every(function(e){return e})})},dt.prototype.validateScopes=function(){var e=this;if(this.paused)return Promise.resolve(!0);var t=this.fields.map(function(t){return e.validate("#"+t.id,t.value)});return Promise.all(t).then(function(e){return e.every(function(e){return e})})},dt.prototype.destroy=function(){var e=ft.indexOf(this.errors);-1!==e&&ft.splice(e,1)},dt.prototype._createFields=function(e){var t=this;e&&Object.keys(e).forEach(function(r){var n=Ce({},{name:r,rules:e[r]});t.attach(n)})},dt.prototype._getDateFormat=function(e){var t=null;return e.date_format&&Array.isArray(e.date_format)&&(t=e.date_format[0]),t||this.dictionary.getDateFormat(this.locale)},dt.prototype._isADateRule=function(e){return!!~["after","before","date_between","date_format"].indexOf(e)},dt.prototype._formatErrorMessage=function(e,t,r,n){void 0===r&&(r={}),void 0===n&&(n=null);var i=this._getFieldDisplayName(e),a=this._getLocalizedParams(t,n);return this.dictionary.getFieldMessage(this.locale,e.name,t.name,[i,a,r])},dt.prototype._getLocalizedParams=function(e,t){if(void 0===t&&(t=null),~ct.indexOf(e.name)&&e.params&&e.params[0]){return[t||this.dictionary.getAttribute(this.locale,e.params[0],e.params[0])].concat(e.params.slice(1))}return e.params},dt.prototype._getFieldDisplayName=function(e){return e.alias||this.dictionary.getAttribute(this.locale,e.name,e.name)},dt.prototype._addFlag=function(e,t){if(void 0===t&&(t=null),we(t)){this.flags=Ce({},this.flags,(r={},r[""+e.name]=e.flags,r));var r}else{var n,i=Ce({},this.flags["$"+t]||{},(n={},n[""+e.name]=e.flags,n));this.flags=Ce({},this.flags,(a={},a["$"+t]=i,a));var a}},dt.prototype._reset=function(e){var t=this;return new Promise(function(r){if(e)return t.fields.filter(e).forEach(function(e){e.reset(),t.errors.remove(e.name,e.scope,e.id)}),r();t.fields.items.forEach(function(e){return e.reset()}),t.errors.clear(),r()})},dt.prototype._test=function(e,t,r){var n=this,i=ut[r.name],a=Array.isArray(r.params)?Le(r.params):[],o=null;if(!i||"function"!=typeof i)throw Me("No such validator '"+r.name+"' exists.");if(-1!==ct.indexOf(r.name)){var s=Ne(e.dependencies,function(e){return e.name===r.name});s&&(o=s.field.alias,a=[s.field.value].concat(a.slice(1)))}else"required"===r.name&&e.rejectsFalse&&(a=a.length?a:[!0]);if(this._isADateRule(r.name)){var u=this._getDateFormat(e.rules);"date_format"!==r.name&&a.push(u)}var l=i(t,a);return Ae(l.then)?l.then(function(t){var i=!0,a={};return Array.isArray(t)?i=t.every(function(e){return xe(e)?e.valid:e}):(i=xe(t)?t.valid:t,a=t.data),{valid:i,error:i?void 0:n._createFieldError(e,r,a,o)}}):(xe(l)||(l={valid:l,data:{}}),{valid:l.valid,error:l.valid?void 0:this._createFieldError(e,r,l.data,o)})},dt._merge=function(e,t){Ae(t)?ut[e]=t:(ut[e]=t.validate,t.getMessage&&dt.dictionary.setMessage(this.locale,e,t.getMessage))},dt._guardExtend=function(e,t){if(!Ae(t)){if(!Ae(t.validate))throw Me("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.");if(!Ae(t.getMessage)&&"string"!=typeof t.getMessage)throw Me("Extension Error: The validator '"+e+"' object must have a 'getMessage' method or string.")}},dt.prototype._createFieldError=function(e,t,r,n){var i=this;return{id:e.id,field:e.name,msg:this._formatErrorMessage(e,t,r,n),rule:t.name,scope:e.scope,regenerate:function(){return i._formatErrorMessage(e,t,r,n)}}},dt.prototype._resolveField=function(e,t){if(!we(t))return this.fields.find({name:e,scope:t});if("#"===e[0])return this.fields.find({id:e.slice(1)});if(e.indexOf(".")>-1){var r=e.split("."),n=r[0],i=r.slice(1),a=this.fields.find({name:i.join("."),scope:n});if(a)return a}return this.fields.find({name:e,scope:null})},dt.prototype._handleFieldNotFound=function(e,t){if(!this.strict)return Promise.resolve(!0);var r=we(t)?e:(we(t)?"":t+".")+e;throw Me('Validating a non-existent field: "'+r+'". Use "attach()" first.')},dt.prototype._validate=function(e,t,r){var n=this;if(void 0===r&&(r=!1),!e.isRequired&&(we(t)||""===t))return Promise.resolve({valid:!0});var i=[],a=[],o=!1;return Object.keys(e.rules).some(function(r){var s=n._test(e,t,{name:r,params:e.rules[r]});return Ae(s.then)?i.push(s):n.fastExit&&!s.valid?(a.push(s.error),o=!0):i.push(new Promise(function(e){e(s)})),o}),o?Promise.resolve({valid:!1,errors:a}):Promise.all(i).then(function(e){return e.map(function(e){return e.valid||a.push(e.error),e.valid}).every(function(e){return e})}).then(function(e){return{valid:e,errors:a}})},Object.defineProperties(dt.prototype,ht),Object.defineProperties(dt,pt);var mt,vt=function(e,t){return"undefined"==typeof Proxy?e:new Proxy(e,t)}({},{get:function(e,t){return 0===String(t).indexOf("$")?vt:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1}}}),gt=function(e,t){return new dt(null,{vm:e,fastExit:t.fastExit})},yt={provide:function(){return this.$validator&&!ke(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!ke(this.$vnode)){this.$parent||et.merge(this.$options.$_veeValidate||{});var e=et.resolve(this),t=this.$options._base;this.$options.$validates&&(Te('The ctor $validates option has been deprecated please set the $_veeValidate.validator option to "new" instead'),this.$validator=gt(this,e)),(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=gt(this,e));var r=function(e){return!!(e&&(Array.isArray(e)&&~e.indexOf("$validator")||xe(e)&&e.$validator))}(this.$options.inject);this.$validator||!e.inject||r||(this.$validator=gt(this,e)),(r||this.$validator)&&(!r&&this.$validator&&(t.util.defineReactive(this.$validator,"errors",this.$validator.errors),t.util.defineReactive(this.$validator,"flags",this.$validator.flags)),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 Object.keys(this.$validator.flags).length?this.$validator.flags:vt})}},beforeDestroy:function(){ke(this.$vnode)||this.$validator&&this.$validator.ownerId===this._uid&&(this.$validator.pause(),this.$validator.destroy())}},bt=function(e,t){return t&&t.$validator?t.$validator.fields.find({id:be(e,"id")}):null},wt={bind:function(e,t,r){var n=r.context.$validator;if(n){var i=rt.generate(e,t,r);n.attach(i)}else Te("No validator instance is present on vm, did you forget to inject '$validator'?")},inserted:function(e,t,r){var n=bt(e,r.context),i=rt.resolveScope(e,t,r);n&&i!==n.scope&&(n.update({scope:i}),n.updated=!1)},update:function(e,t,r){var n=bt(e,r.context);if(!(!n||n.updated&&De(t.value,t.oldValue))){var i=rt.resolveScope(e,t,r),a=rt.resolveRules(e,t);n.update({scope:i,rules:a})}},unbind:function(e,t,r){var n=r.context,i=bt(e,n);i&&n.$validator.detach(i)}},Dt=function(e,t){return void 0===t&&(t=!0),Object.keys(e).reduce(function(r,n){if(!r)return r=Ce({},e[n]);var i=0===n.indexOf("$");return t&&i?r=Dt(e[n]):!t&&i?r:r=function(e,t){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(n,i){return n[i]=r[i](e[i],t[i]),n},{})}(r,e[n])},null)},$t={install:function(e,t){if(void 0===t&&(t={}),mt)Te("already installed, Vue.use(VeeValidate) should only be called once.");else{mt=e,et.merge(t);var r=et.current,n=r.locale,i=r.dictionary,a=r.i18n;i&&dt.localize(i),a&&a._vm&&Ae(a._vm.$watch)&&a._vm.$watch("locale",function(){dt.regenerate()}),a||dt.localize(n),dt.setStrictMode(et.current.strict),mt.mixin(yt),mt.directive("validate",wt)}},use:function(e,t){if(void 0===t&&(t={}),!Ae(e))return Te("The plugin must be a callable function");e({Validator:dt,ErrorBag:Re,Rules:dt.rules},t)},directive:wt,mixin:yt,mapFields:function(e){if(!e)return function(){return Dt(this.$validator.flags)};var t=function(e){return Array.isArray(e)?e.reduce(function(e,t){return~t.indexOf(".")?e[t.split(".")[1]]=t:e[t]=t,e},{}):e}(e);return Object.keys(t).reduce(function(e,r){var n=t[r];return e[r]=function(){if(this.$validator.flags[n])return this.$validator.flags[n];if("*"===t[r])return Dt(this.$validator.flags,!1);if(n.indexOf(".")<=0)return{};var e=n.split("."),i=e[0],a=e.slice(1);return i=this.$validator.flags["$"+i],"*"===(a=a.join("."))&&i?Dt(i):i&&i[a]?i[a]:{}},e},{})},Validator:dt,ErrorBag:Re,version:"2.0.0-rc.27"};return $t.use(function(e){var t=e.Validator;Object.keys(qe).forEach(function(e){t.extend(e,qe[e])}),t.localize("en",We)}),$t.Rules=qe,$t}); \ No newline at end of file diff --git a/dist/vee-validate.minimal.esm.js b/dist/vee-validate.minimal.esm.js index 584929bb4..8c616779d 100644 --- a/dist/vee-validate.minimal.esm.js +++ b/dist/vee-validate.minimal.esm.js @@ -1,5 +1,5 @@ /** - * vee-validate v2.0.0-rc.26 + * vee-validate v2.0.0-rc.27 * (c) 2017 Abdelrahman Awad * @license MIT */ @@ -1179,7 +1179,13 @@ Generator.resolveDelay = function resolveDelay (el, vnode, options) { delay = vnode.child.$attrs['data-vv-delay']; } - return (delay) ? { local: { input: parseInt(delay) }, global: deepParseInt(globalDelay) } : { global: deepParseInt(globalDelay) }; + if (!isObject(globalDelay)) { + return deepParseInt(delay || globalDelay); + } + + globalDelay.input = delay || 0; + + return deepParseInt(globalDelay); }; /** @@ -1377,7 +1383,7 @@ var Field = function Field (el, options) { this.rules = {}; this._cacheId(options); options = assign({}, DEFAULT_OPTIONS, options); - this._delay = typeof options.delay === 'number' ? options.delay : (options.delay && options.delay.global); // cache initial delay + this._delay = !isNullOrUndefined(options.delay) ? options.delay : 0; // cache initial delay this.validity = options.validity; this.aria = options.aria; this.flags = createFlags(); @@ -2916,7 +2922,10 @@ function install (_Vue, options) { }); } - Validator.localize(locale); // set the locale + if (!i18n) { + Validator.localize(locale); // set the locale + } + Validator.setStrictMode(Config.current.strict); Vue.mixin(mixin); @@ -3051,7 +3060,7 @@ var mapFields = function (fields) { }, {}); }; -var version = '2.0.0-rc.26'; +var version = '2.0.0-rc.27'; var index_minimal_esm = { install: install, diff --git a/dist/vee-validate.minimal.js b/dist/vee-validate.minimal.js index 8a973e4a9..4522cb7f6 100644 --- a/dist/vee-validate.minimal.js +++ b/dist/vee-validate.minimal.js @@ -1,5 +1,5 @@ /** - * vee-validate v2.0.0-rc.26 + * vee-validate v2.0.0-rc.27 * (c) 2017 Abdelrahman Awad * @license MIT */ @@ -1185,7 +1185,13 @@ Generator.resolveDelay = function resolveDelay (el, vnode, options) { delay = vnode.child.$attrs['data-vv-delay']; } - return (delay) ? { local: { input: parseInt(delay) }, global: deepParseInt(globalDelay) } : { global: deepParseInt(globalDelay) }; + if (!isObject(globalDelay)) { + return deepParseInt(delay || globalDelay); + } + + globalDelay.input = delay || 0; + + return deepParseInt(globalDelay); }; /** @@ -1383,7 +1389,7 @@ var Field = function Field (el, options) { this.rules = {}; this._cacheId(options); options = assign({}, DEFAULT_OPTIONS, options); - this._delay = typeof options.delay === 'number' ? options.delay : (options.delay && options.delay.global); // cache initial delay + this._delay = !isNullOrUndefined(options.delay) ? options.delay : 0; // cache initial delay this.validity = options.validity; this.aria = options.aria; this.flags = createFlags(); @@ -2922,7 +2928,10 @@ function install (_Vue, options) { }); } - Validator.localize(locale); // set the locale + if (!i18n) { + Validator.localize(locale); // set the locale + } + Validator.setStrictMode(Config.current.strict); Vue.mixin(mixin); @@ -3065,7 +3074,7 @@ var index_minimal = { mapFields: mapFields, Validator: Validator, ErrorBag: ErrorBag, - version: '2.0.0-rc.26' + version: '2.0.0-rc.27' }; return index_minimal; diff --git a/dist/vee-validate.minimal.min.js b/dist/vee-validate.minimal.min.js index 42f71a2e3..0836a9495 100644 --- a/dist/vee-validate.minimal.min.js +++ b/dist/vee-validate.minimal.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VeeValidate=e()}(this,function(){"use strict";var t=function(t,e){return t.getAttribute("data-vv-"+e)},e=function(t){return null===t||void 0===t},i=function(t,e){if(t instanceof RegExp&&e instanceof RegExp)return i(t.source,e.source)&&i(t.flags,e.flags);if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(var n=0;n0;)e[i]=arguments[i+1];if(l(Object.assign))return Object.assign.apply(Object,[t].concat(e));if(null==t)throw new TypeError("Cannot convert undefined or null to object");var n=Object(t);return e.forEach(function(t){null!=t&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},h=0,p="{id}",v=function(t,e){var i=d(t);if(l(i.find))return i.find(e);var n;return i.some(function(t){return!!e(t)&&(n=t,!0)}),n},m=function(t){return t&&("SELECT"===t.tagName||~["radio","checkbox","file"].indexOf(t.type))?"change":"input"},g=function(t){if(!t)return!1;var e=t.componentOptions.tag;return/keep-alive|transition|transition-group/.test(e)},y=function(t,e,i){return"number"==typeof e?t.reduce(function(t,i){return t[i]=e,t},{}):t.reduce(function(t,n){return"object"==typeof e&&n in e?(t[n]=e[n],t):"number"==typeof i?(t[n]=i,t):(t[n]=i&&i[n]||0,t)},{})},$=function(t){if("number"==typeof t)return t;if("string"==typeof t)return parseInt(t);var e={};for(var i in t)e[i]=parseInt(t[i]);return e},b=function(t,e){return o(t)&&o(e)?(Object.keys(e).forEach(function(i){if(o(e[i])){if(!t[i]){f(t,(n={},n[i]={},n));var n}b(t[i],e[i])}else{f(t,(r={},r[i]=e[i],r));var r}}),t):t},_=function(){this.items=[]};_.prototype.add=function(t){arguments.length>1&&(t={field:arguments[0],msg:arguments[1],rule:arguments[2],scope:e(arguments[3])?null:arguments[3],regenerate:null}),t.scope=e(t.scope)?null:t.scope,this.items.push(t)},_.prototype.regenerate=function(){this.items.forEach(function(t){t.msg=l(t.regenerate)?t.regenerate():t.msg})},_.prototype.update=function(t,e){var i=v(this.items,function(e){return e.id===t});if(i){var n=this.items.indexOf(i);this.items.splice(n,1),i.scope=e.scope,this.items.push(i)}},_.prototype.all=function(t){return e(t)?this.items.map(function(t){return t.msg}):this.items.filter(function(e){return e.scope===t}).map(function(t){return t.msg})},_.prototype.any=function(t){return e(t)?!!this.items.length:!!this.items.filter(function(e){return e.scope===t}).length},_.prototype.clear=function(t){e(t)&&(t=null);for(var i=0;i-1){var e=t.split(":");return{name:e[0],rule:e[1]}}return null},_.prototype._scope=function(t){if(t.indexOf(".")>-1){var e=t.split("."),i=e[0];return{name:e.slice(1).join("."),scope:i}}return null};var w="en",x=function(t){void 0===t&&(t={}),this.container={},this.merge(t)},E={locale:{}};E.locale.get=function(){return w},E.locale.set=function(t){w=t||"en"},x.prototype.hasLocale=function(t){return!!this.container[t]},x.prototype.setDateFormat=function(t,e){this.container[t]||(this.container[t]={}),this.container[t].dateFormat=e},x.prototype.getDateFormat=function(t){return this.container[t]&&this.container[t].dateFormat?this.container[t].dateFormat:null},x.prototype.getMessage=function(t,e,i){var n=null;return n=this.hasMessage(t,e)?this.container[t].messages[e]:this._getDefaultMessage(t),l(n)?n.apply(void 0,i):n},x.prototype.getFieldMessage=function(t,e,i,n){if(!this.hasLocale(t))return this.getMessage(t,i,n);var r=this.container[t].custom&&this.container[t].custom[e];if(!r||!r[i])return this.getMessage(t,i,n);var s=r[i];return l(s)?s.apply(void 0,n):s},x.prototype._getDefaultMessage=function(t){return this.hasMessage(t,"_default")?this.container[t].messages._default:this.container.en.messages._default},x.prototype.getAttribute=function(t,e,i){return void 0===i&&(i=""),this.hasAttribute(t,e)?this.container[t].attributes[e]:i},x.prototype.hasMessage=function(t,e){return!!(this.hasLocale(t)&&this.container[t].messages&&this.container[t].messages[e])},x.prototype.hasAttribute=function(t,e){return!!(this.hasLocale(t)&&this.container[t].attributes&&this.container[t].attributes[e])},x.prototype.merge=function(t){b(this.container,t)},x.prototype.setMessage=function(t,e,i){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].messages[e]=i},x.prototype.setAttribute=function(t,e,i){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].attributes[e]=i},Object.defineProperties(x.prototype,E);var O=function(t){return o(t)?Object.keys(t).reduce(function(e,i){return e[i]=O(t[i]),e},{}):l(t)?t("{0}",["{1}","{2}","{3}"]):t},A=function(t,e){this.i18n=t,this.rootKey=e},F={locale:{}};F.locale.get=function(){return this.i18n.locale},F.locale.set=function(t){s("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},A.prototype.getDateFormat=function(t){return this.i18n.getDateTimeFormat(t||this.locale)},A.prototype.setDateFormat=function(t,e){this.i18n.setDateTimeFormat(t||this.locale,e)},A.prototype.getMessage=function(t,e,i){var n=this.rootKey+".messages."+e;return this.i18n.te(n)?this.i18n.t(n,t,i):this.i18n.t(this.rootKey+".messages._default",t,i)},A.prototype.getAttribute=function(t,e,i){void 0===i&&(i="");var n=this.rootKey+".attributes."+e;return this.i18n.te(n)?this.i18n.t(n,t):i},A.prototype.getFieldMessage=function(t,e,i,n){var r=this.rootKey+".custom."+e+"."+i;return this.i18n.te(r)?this.i18n.t(r):this.getMessage(t,i,n)},A.prototype.merge=function(t){var e=this;Object.keys(t).forEach(function(i){var r=b({},n(i+"."+e.rootKey,e.i18n.messages,{})),s=b(r,function(t){return{messages:O(t.messages),custom:O(t.custom),attributes:t.attributes,dateFormat:t.dateFormat}}(t[i]));e.i18n.mergeLocaleMessage(i,(a={},a[e.rootKey]=s,a));var a;s.dateFormat&&e.i18n.setDateTimeFormat(i,s.dateFormat)})},A.prototype.setMessage=function(t,e,i){this.merge((r={},r[t]={messages:(n={},n[e]=i,n)},r));var n,r},A.prototype.setAttribute=function(t,e,i){this.merge((r={},r[t]={attributes:(n={},n[e]=i,n)},r));var n,r},Object.defineProperties(A.prototype,F);var j={locale:"en",delay:0,errorBagName:"errors",dictionary:null,strict:!0,fieldsBagName:"fields",classes:!1,classNames:null,events:"input|blur",inject:!0,fastExit:!0,aria:!0,validity:!1,i18n:null,i18nRootKey:"validation"},N=f({},j),M={dictionary:new x({en:{messages:{},attributes:{},custom:{}}})},k=function(){},L={default:{},current:{}};L.default.get=function(){return j},L.current.get=function(){return N},k.dependency=function(t){return M[t]},k.merge=function(t){(N=f({},N,t)).i18n&&k.register("dictionary",new A(N.i18n,N.i18nRootKey))},k.register=function(t,e){M[t]=e},k.resolve=function(t){var e=n("$options.$_veeValidate",t,{});return f({},k.current,e)},Object.defineProperties(k,L);var V=function(){};V.generate=function(t,e,i){var n=V.resolveModel(e,i),r=k.resolve(i.context);return{name:V.resolveName(t,i),el:t,listen:!e.modifiers.disable,scope:V.resolveScope(t,e,i),vm:V.makeVM(i.context),expression:e.value,component:i.child,classes:r.classes,classNames:r.classNames,getter:V.resolveGetter(t,i,n),events:V.resolveEvents(t,i)||r.events,model:n,delay:V.resolveDelay(t,i,r),rules:V.resolveRules(t,e),initial:!!e.modifiers.initial,validity:r.validity,aria:r.aria,initialValue:V.resolveInitialValue(i)}},V.getCtorConfig=function(t){if(!t.child)return null;return n("child.$options.$_veeValidate",t)},V.resolveRules=function(e,i){return i.value||i&&i.expression?"string"==typeof i.value?i.value:~["string","object"].indexOf(typeof i.value.rules)?i.value.rules:i.value:t(e,"rules")},V.resolveInitialValue=function(t){var e=t.data.model||v(t.data.directives,function(t){return"model"===t.name});return e&&e.value},V.makeVM=function(t){return{get $el(){return t.$el},get $refs(){return t.$refs},$watch:t.$watch?t.$watch.bind(t):function(){},$validator:t.$validator?{errors:t.$validator.errors,validate:t.$validator.validate.bind(t.$validator),update:t.$validator.update.bind(t.$validator)}:null}},V.resolveDelay=function(e,i,n){var r=t(e,"delay"),s=n&&"delay"in n?n.delay:0;return!r&&i.child&&i.child.$attrs&&(r=i.child.$attrs["data-vv-delay"]),r?{local:{input:parseInt(r)},global:$(s)}:{global:$(s)}},V.resolveEvents=function(e,i){var n=t(e,"validate-on");if(!n&&i.child&&i.child.$attrs&&(n=i.child.$attrs["data-vv-validate-on"]),!n&&i.child){var r=V.getCtorConfig(i);n=r&&r.events}return n},V.resolveScope=function(i,n,r){void 0===r&&(r={});var s=null;return o(n.value)&&(s=n.value.scope),r.child&&e(s)&&(s=r.child.$attrs&&r.child.$attrs["data-vv-scope"]),e(s)?function(i){var n=t(i,"scope");return e(n)&&i.form&&(n=t(i.form,"scope")),e(n)?null:n}(i):s},V.resolveModel=function(t,e){if(t.arg)return t.arg;if(o(t.value)&&t.value.arg)return t.value.arg;var i=e.data.model||v(e.data.directives,function(t){return"model"===t.name});if(!i)return null;return/^[a-z_]+[0-9]*(\w*\.[a-z_]\w*)*$/i.test(i.expression)&&function(t,e){var i=e;return t.split(".").every(function(t){return!!Object.prototype.hasOwnProperty.call(i,t)&&(i=i[t],!0)})}(i.expression,e.context)?i.expression:null},V.resolveName=function(e,i){var n=t(e,"name");if(!n&&!i.child)return e.name;if(!n&&i.child&&i.child.$attrs&&(n=i.child.$attrs["data-vv-name"]||i.child.$attrs.name),!n&&i.child){var r=V.getCtorConfig(i);if(r&&l(r.name)){return r.name.bind(i.child)()}return i.child.name}return n},V.resolveGetter=function(e,i,r){if(r)return function(){return n(r,i.context)};if(i.child){var s=t(e,"value-path")||i.child.$attrs&&i.child.$attrs["data-vv-value-path"];if(s)return function(){return n(s,i.child)};var a=V.getCtorConfig(i);if(a&&l(a.value)){var o=a.value.bind(i.child);return function(){return o()}}return function(){return i.child.value}}switch(e.type){case"checkbox":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]');if((t=d(t).filter(function(t){return t.checked})).length)return t.map(function(t){return t.value})};case"radio":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]'),i=v(t,function(t){return t.checked});return i&&i.value};case"file":return function(t){return d(e.files)};case"select-multiple":return function(){return d(e.options).filter(function(t){return t.selected}).map(function(t){return t.value})};default:return function(){return e&&e.value}}};var P={targetOf:null,initial:!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"}},C=function(t,e){void 0===e&&(e={}),this.id=function(){h>=9999&&(h=0,p=p.replace("{id}","_{id}")),h++;return p.replace("{id}",String(h))}(),this.el=t,this.updated=!1,this.dependencies=[],this.watchers=[],this.events=[],this.delay=0,this.rules={},this._cacheId(e),e=f({},P,e),this._delay="number"==typeof e.delay?e.delay:e.delay&&e.delay.global,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},this.vm=e.vm,this.component=e.component,this.ctorConfig=this.component?n("$options.$_veeValidate",this.component):void 0,this.update(e),this.updated=!1},D={validator:{},isRequired:{},isDisabled:{},alias:{},value:{},rejectsFalse:{}};D.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:(s("No validator instance detected."),{validate:function(){}})},D.isRequired.get=function(){return!!this.rules.required},D.isDisabled.get=function(){return!(!this.component||!this.component.disabled)||!(!this.el||!this.el.disabled)},D.alias.get=function(){if(this._alias)return this._alias;var e=null;return this.el&&(e=t(this.el,"as")),!e&&this.component?this.component.$attrs&&this.component.$attrs["data-vv-as"]:e},D.value.get=function(){if(l(this.getter))return this.getter()},D.rejectsFalse.get=function(){return this.component&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},C.prototype.matches=function(t){return t.id?this.id===t.id:void 0===t.name&&void 0===t.scope||(void 0===t.scope?this.name===t.name:void 0===t.name?this.scope===t.scope:t.name===this.name&&t.scope===this.scope)},C.prototype._cacheId=function(t){this.el&&!t.targetOf&&function(t,e,i){t.setAttribute("data-vv-"+e,i)}(this.el,"id",this.id)},C.prototype.update=function(t){this.targetOf=t.targetOf||null,this.initial=t.initial||this.initial||!1,!e(t.scope)&&t.scope!==this.scope&&l(this.validator.update)&&this.validator.update(this.id,{scope:t.scope}),this.scope=e(t.scope)?e(this.scope)?null:this.scope:t.scope,this.name=(e(t.name)?t.name:String(t.name))||this.name||null,this.rules=void 0!==t.rules?function(t){return t?o(t)?Object.keys(t).reduce(function(e,i){var n=[];return n=!0===t[i]?[]:Array.isArray(t[i])?t[i]:[t[i]],!1!==t[i]&&(e[i]=n),e},{}):"string"!=typeof t?(s("rules must be either a string or an object."),{}):t.split("|").reduce(function(t,e){var i=function(t){var e=[],i=t.split(":")[0];return~t.indexOf(":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:i,params:e}}(e);return i.name?(t[i.name]=i.params,t):t},{}):{}}(t.rules):this.rules,this.model=t.model||this.model,this.listen=void 0!==t.listen?t.listen:this.listen,this.classes=(t.classes||this.classes||!1)&&!this.component,this.classNames=t.classNames||this.classNames||P.classNames,this.getter=l(t.getter)?t.getter:this.getter,this._alias=t.alias||this._alias,this.events=t.events?function(t){return"string"==typeof t&&t.length?t.split("|"):[]}(t.events):this.events,this.delay=t.delay?y(this.events,t.delay,this._delay):y(this.events,this.delay,this._delay),this.updateDependencies(),this.addActionListeners(),void 0!==t.rules&&(this.flags.required=this.isRequired),this.flags.validated&&void 0!==t.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.el&&(this.updateClasses(),this.addValueListeners(),this.updateAriaAttrs())},C.prototype.reset=function(){var t=this,e={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1};Object.keys(this.flags).forEach(function(i){t.flags[i]=e[i]}),this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},C.prototype.setFlags=function(t){var e=this,i={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(t).forEach(function(n){e.flags[n]=t[n],i[n]&&void 0===t[i[n]]&&(e.flags[i[n]]=!t[n])}),void 0===t.untouched&&void 0===t.touched&&void 0===t.dirty&&void 0===t.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},C.prototype.updateDependencies=function(){var t=this;this.dependencies.forEach(function(t){return t.field.destroy()}),this.dependencies=[];var e=Object.keys(this.rules).reduce(function(e,i){return"confirmed"===i?e.push({selector:t.rules[i][0]||t.name+"_confirmation",name:i}):z.isTargetRule(i)&&e.push({selector:t.rules[i][0],name:i}),e},[]);e.length&&this.vm&&this.vm.$el&&e.forEach(function(e){var i=e.selector,n=e.name,r=null;if("$"===i[0])r=t.vm.$refs[i.slice(1)];else try{r=t.vm.$el.querySelector(i)}catch(t){r=null}if(!r)try{r=t.vm.$el.querySelector('input[name="'+i+'"]')}catch(t){r=null}if(r){var s={vm:t.vm,classes:t.classes,classNames:t.classNames,delay:t.delay,scope:t.scope,events:t.events.join("|"),initial:t.initial,targetOf:t.id};l(r.$watch)?(s.component=r,s.el=r.$el,s.getter=V.resolveGetter(r.$el,{child:r})):(s.el=r,s.getter=V.resolveGetter(r,{})),t.dependencies.push({name:n,field:new C(s.el,s)})}})},C.prototype.unwatch=function(t){if(void 0===t&&(t=null),!t)return this.watchers.forEach(function(t){return t.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(e){return t.test(e.tag)}).forEach(function(t){return t.unwatch()}),this.watchers=this.watchers.filter(function(e){return!t.test(e.tag)})},C.prototype.updateClasses=function(){this.classes&&(c(this.el,this.classNames.dirty,this.flags.dirty),c(this.el,this.classNames.pristine,this.flags.pristine),c(this.el,this.classNames.valid,!!this.flags.valid),c(this.el,this.classNames.invalid,!!this.flags.invalid),c(this.el,this.classNames.touched,this.flags.touched),c(this.el,this.classNames.untouched,this.flags.untouched))},C.prototype.addActionListeners=function(){var t=this;this.unwatch(/class/);var e=function(){t.flags.touched=!0,t.flags.untouched=!1,t.classes&&(c(t.el,t.classNames.touched,!0),c(t.el,t.classNames.untouched,!1)),t.unwatch(/^class_blur$/)},i=m(this.el),n=function(){t.flags.dirty=!0,t.flags.pristine=!1,t.classes&&(c(t.el,t.classNames.pristine,!1),c(t.el,t.classNames.dirty,!0)),t.unwatch(/^class_input$/)};if(this.component&&l(this.component.$once))return this.component.$once("input",n),this.component.$once("blur",e),this.watchers.push({tag:"class_input",unwatch:function(){t.component.$off("input",n)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){t.component.$off("blur",e)}});if(this.el){this.el.addEventListener(i,n);var r=-1===["radio","checkbox"].indexOf(this.el.type)?"blur":"click";this.el.addEventListener(r,e),this.watchers.push({tag:"class_input",unwatch:function(){t.el.removeEventListener(i,n)}}),this.watchers.push({tag:"class_blur",unwatch:function(){t.el.removeEventListener(r,e)}})}},C.prototype.addValueListeners=function(){var t=this;if(this.unwatch(/^input_.+/),this.listen){var e=this.targetOf?function(){t.validator.validate("#"+t.targetOf)}:function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];(0===e.length||l(Event)&&e[0]instanceof Event||e[0]&&e[0].srcElement)&&(e[0]=t.value),t.validator.validate("#"+t.id,e[0])},i=m(this.el),n=this.events.map(function(t){return"input"===t?i:t});if(this.model&&-1!==n.indexOf(i)){var s=r(e,this.delay[i]),a=this.vm.$watch(this.model,function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];t.flags.pending=!0,s.apply(void 0,e)});this.watchers.push({tag:"input_model",unwatch:a}),n=n.filter(function(t){return t!==i})}n.forEach(function(i){var n=r(e,t.delay[i]),s=function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];t.flags.pending=!0,n.apply(void 0,e)};if(t.component)return t.component.$on(i,s),void t.watchers.push({tag:"input_vue",unwatch:function(){t.component.$off(i,s)}});if(~["radio","checkbox"].indexOf(t.el.type)){var a=document.querySelectorAll('input[name="'+t.el.name+'"]');d(a).forEach(function(e){e.addEventListener(i,s),t.watchers.push({tag:"input_native",unwatch:function(){e.removeEventListener(i,s)}})})}else t.el.addEventListener(i,s),t.watchers.push({tag:"input_native",unwatch:function(){t.el.removeEventListener(i,s)}})})}},C.prototype.updateAriaAttrs=function(){this.aria&&this.el&&l(this.el.setAttribute)&&(this.el.setAttribute("aria-required",this.isRequired?"true":"false"),this.el.setAttribute("aria-invalid",this.flags.invalid?"true":"false"))},C.prototype.updateCustomValidity=function(){this.validity&&this.el&&l(this.el.setCustomValidity)&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},C.prototype.destroy=function(){this.watchers.forEach(function(t){return t.unwatch()}),this.watchers=[],this.dependencies.forEach(function(t){return t.field.destroy()}),this.dependencies=[]},Object.defineProperties(C.prototype,D);var R=function(){this.items=[]},S={length:{}};S.length.get=function(){return this.items.length},R.prototype.find=function(t){return v(this.items,function(e){return e.matches(t)})},R.prototype.filter=function(t){return Array.isArray(t)?this.items.filter(function(e){return t.some(function(t){return e.matches(t)})}):this.items.filter(function(e){return e.matches(t)})},R.prototype.map=function(t){return this.items.map(t)},R.prototype.remove=function(t){var e=null;if(!(e=t instanceof C?t:this.find(t)))return null;var i=this.items.indexOf(e);return this.items.splice(i,1),e},R.prototype.push=function(t){if(!(t instanceof C))throw a("FieldBag only accepts instances of Field that has an id defined.");if(!t.id)throw a("Field id must be defined.");if(this.find({id:t.id}))throw a("Field with id "+t.id+" is already added.");this.items.push(t)},Object.defineProperties(R.prototype,S);var q={},T=!0,B=["confirmed","after","before"],I=[],z=function(t,e){var i=this;void 0===e&&(e={vm:null,fastExit:!0}),this.strict=T,this.errors=new _,I.push(this.errors),this.fields=new R,this.flags={},this._createFields(t),this.paused=!1,this.fastExit=e.fastExit||!1,this.ownerId=e.vm&&e.vm._uid,this.reset=e.vm&&l(e.vm.$nextTick)?function(t){return new Promise(function(n){e.vm.$nextTick(function(){n(i._reset(t))})})}:this._reset},K={dictionary:{},locale:{},rules:{}},G={dictionary:{},locale:{},rules:{}};K.dictionary.get=function(){return k.dependency("dictionary")},G.dictionary.get=function(){return k.dependency("dictionary")},K.locale.get=function(){return this.dictionary.locale},K.locale.set=function(t){z.locale=t},G.locale.get=function(){return z.dictionary.locale},G.locale.set=function(t){var e=t!==z.dictionary.locale;z.dictionary.locale=t,e&&z.regenerate()},K.rules.get=function(){return q},G.rules.get=function(){return q},z.create=function(t,e){return new z(t,e)},z.extend=function(t,e,i){void 0===i&&(i={}),z._guardExtend(t,e),z._merge(t,e),i&&i.hasTarget&&B.push(t)},z.regenerate=function(){I.forEach(function(t){return t.regenerate()})},z.remove=function(t){delete q[t];var e=B.indexOf(t);-1!==e&&B.splice(e,1)},z.isTargetRule=function(t){return-1!==B.indexOf(t)},z.setStrictMode=function(t){void 0===t&&(t=!0),T=t},z.prototype.localize=function(t,e){z.localize(t,e)},z.localize=function(t,e){if(o(t))z.dictionary.merge(t);else{if(e){var i=t||e.name;e=f({},e),z.dictionary.merge((n={},n[i]=e,n));var n}t&&(z.locale=t)}},z.prototype.attach=function(t){arguments.length>1&&(t=f({},{name:arguments[0],rules:arguments[1]},arguments[2]||{vm:{$validator:this}}));var e=t.initialValue;return t instanceof C||(t=new C(t.el||null,t)),this.fields.push(t),t.initial?this.validate("#"+t.id,e||t.value):this._validate(t,e||t.value,!0).then(function(e){t.flags.valid=e.valid,t.flags.invalid=!e.valid}),this._addFlag(t,t.scope),t},z.prototype.flag=function(t,e){var i=this._resolveField(t);i&&e&&i.setFlags(e)},z.prototype.detach=function(t,i){var n=t instanceof C?t:this._resolveField(t,i);if(n){n.destroy(),this.errors.remove(n.name,n.scope,n.id),this.fields.remove(n);var r=this.flags;!e(n.scope)&&r["$"+n.scope]?delete r["$"+n.scope][n.name]:e(n.scope)&&delete r[n.name],this.flags=f({},r)}},z.prototype.extend=function(t,e,i){void 0===i&&(i={}),z.extend(t,e,i)},z.prototype.update=function(t,i){var n=i.scope,r=this._resolveField("#"+t);r&&(this.errors.update(t,{scope:n}),!e(r.scope)&&this.flags["$"+r.scope]?delete this.flags["$"+r.scope][r.name]:e(r.scope)&&delete this.flags[r.name],this._addFlag(r,n))},z.prototype.remove=function(t){z.remove(t)},z.prototype.validate=function(t,e,i){var n=this;if(void 0===i&&(i=null),this.paused)return Promise.resolve(!0);if(0===arguments.length)return this.validateScopes();if(1===arguments.length&&"*"===arguments[0])return this.validateAll();if(1===arguments.length&&"string"==typeof arguments[0]&&/^(.+)\.\*$/.test(arguments[0])){var r=arguments[0].match(/^(.+)\.\*$/)[1];return this.validateAll(r)}var s=this._resolveField(t,i);if(!s)return this._handleFieldNotFound(t,i);s.flags.pending=!0,1===arguments.length&&(e=s.value);var a=s.isDisabled;return this._validate(s,e,a).then(function(t){return s.setFlags({pending:!1,valid:t.valid,validated:!0}),n.errors.remove(s.name,s.scope,s.id),a?Promise.resolve(!0):(t.errors&&t.errors.forEach(function(t){return n.errors.add(t)}),t.valid)})},z.prototype.pause=function(){return this.paused=!0,this},z.prototype.resume=function(){return this.paused=!1,this},z.prototype.validateAll=function(t){var e=arguments,i=this;if(this.paused)return Promise.resolve(!0);var n=null,r=!1;"string"==typeof t?n={scope:t}:o(t)?(n=Object.keys(t).map(function(t){return{name:t,scope:e[1]||null}}),r=!0):0===arguments.length?n={scope:null}:Array.isArray(t)&&(n=t.map(function(t){return{name:t,scope:e[1]||null}}));var s=this.fields.filter(n).map(function(e){return i.validate("#"+e.id,r?t[e.name]:e.value)});return Promise.all(s).then(function(t){return t.every(function(t){return t})})},z.prototype.validateScopes=function(){var t=this;if(this.paused)return Promise.resolve(!0);var e=this.fields.map(function(e){return t.validate("#"+e.id,e.value)});return Promise.all(e).then(function(t){return t.every(function(t){return t})})},z.prototype.destroy=function(){var t=I.indexOf(this.errors);-1!==t&&I.splice(t,1)},z.prototype._createFields=function(t){var e=this;t&&Object.keys(t).forEach(function(i){var n=f({},{name:i,rules:t[i]});e.attach(n)})},z.prototype._getDateFormat=function(t){var e=null;return t.date_format&&Array.isArray(t.date_format)&&(e=t.date_format[0]),e||this.dictionary.getDateFormat(this.locale)},z.prototype._isADateRule=function(t){return!!~["after","before","date_between","date_format"].indexOf(t)},z.prototype._formatErrorMessage=function(t,e,i,n){void 0===i&&(i={}),void 0===n&&(n=null);var r=this._getFieldDisplayName(t),s=this._getLocalizedParams(e,n);return this.dictionary.getFieldMessage(this.locale,t.name,e.name,[r,s,i])},z.prototype._getLocalizedParams=function(t,e){if(void 0===e&&(e=null),~B.indexOf(t.name)&&t.params&&t.params[0]){return[e||this.dictionary.getAttribute(this.locale,t.params[0],t.params[0])].concat(t.params.slice(1))}return t.params},z.prototype._getFieldDisplayName=function(t){return t.alias||this.dictionary.getAttribute(this.locale,t.name,t.name)},z.prototype._addFlag=function(t,i){if(void 0===i&&(i=null),e(i)){this.flags=f({},this.flags,(n={},n[""+t.name]=t.flags,n));var n}else{var r,s=f({},this.flags["$"+i]||{},(r={},r[""+t.name]=t.flags,r));this.flags=f({},this.flags,(a={},a["$"+i]=s,a));var a}},z.prototype._reset=function(t){var e=this;return new Promise(function(i){if(t)return e.fields.filter(t).forEach(function(t){t.reset(),e.errors.remove(t.name,t.scope,t.id)}),i();e.fields.items.forEach(function(t){return t.reset()}),e.errors.clear(),i()})},z.prototype._test=function(t,e,i){var n=this,r=q[i.name],s=Array.isArray(i.params)?d(i.params):[],u=null;if(!r||"function"!=typeof r)throw a("No such validator '"+i.name+"' exists.");if(-1!==B.indexOf(i.name)){var c=v(t.dependencies,function(t){return t.name===i.name});c&&(u=c.field.alias,s=[c.field.value].concat(s.slice(1)))}else"required"===i.name&&t.rejectsFalse&&(s=s.length?s:[!0]);if(this._isADateRule(i.name)){var f=this._getDateFormat(t.rules);"date_format"!==i.name&&s.push(f)}var h=r(e,s);return l(h.then)?h.then(function(e){var r=!0,s={};return Array.isArray(e)?r=e.every(function(t){return o(t)?t.valid:t}):(r=o(e)?e.valid:e,s=e.data),{valid:r,error:r?void 0:n._createFieldError(t,i,s,u)}}):(o(h)||(h={valid:h,data:{}}),{valid:h.valid,error:h.valid?void 0:this._createFieldError(t,i,h.data,u)})},z._merge=function(t,e){l(e)?q[t]=e:(q[t]=e.validate,e.getMessage&&z.dictionary.setMessage(this.locale,t,e.getMessage))},z._guardExtend=function(t,e){if(!l(e)){if(!l(e.validate))throw a("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.");if(!l(e.getMessage)&&"string"!=typeof e.getMessage)throw a("Extension Error: The validator '"+t+"' object must have a 'getMessage' method or string.")}},z.prototype._createFieldError=function(t,e,i,n){var r=this;return{id:t.id,field:t.name,msg:this._formatErrorMessage(t,e,i,n),rule:e.name,scope:t.scope,regenerate:function(){return r._formatErrorMessage(t,e,i,n)}}},z.prototype._resolveField=function(t,i){if(!e(i))return this.fields.find({name:t,scope:i});if("#"===t[0])return this.fields.find({id:t.slice(1)});if(t.indexOf(".")>-1){var n=t.split("."),r=n[0],s=n.slice(1),a=this.fields.find({name:s.join("."),scope:r});if(a)return a}return this.fields.find({name:t,scope:null})},z.prototype._handleFieldNotFound=function(t,i){if(!this.strict)return Promise.resolve(!0);var n=e(i)?t:(e(i)?"":i+".")+t;throw a('Validating a non-existent field: "'+n+'". Use "attach()" first.')},z.prototype._validate=function(t,i,n){var r=this;if(void 0===n&&(n=!1),!t.isRequired&&(e(i)||""===i))return Promise.resolve({valid:!0});var s=[],a=[],o=!1;return Object.keys(t.rules).some(function(e){var n=r._test(t,i,{name:e,params:t.rules[e]});return l(n.then)?s.push(n):r.fastExit&&!n.valid?(a.push(n.error),o=!0):s.push(new Promise(function(t){t(n)})),o}),o?Promise.resolve({valid:!1,errors:a}):Promise.all(s).then(function(t){return t.map(function(t){return t.valid||a.push(t.error),t.valid}).every(function(t){return t})}).then(function(t){return{valid:t,errors:a}})},Object.defineProperties(z.prototype,K),Object.defineProperties(z,G);var U,H=function(t,e){return"undefined"==typeof Proxy?t:new Proxy(t,e)}({},{get:function(t,e){return 0===String(e).indexOf("$")?H:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1}}}),J=function(t,e){return new z(null,{vm:t,fastExit:e.fastExit})},Q={provide:function(){return this.$validator&&!g(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!g(this.$vnode)){this.$parent||k.merge(this.$options.$_veeValidate||{});var t=k.resolve(this),e=this.$options._base;this.$options.$validates&&(s('The ctor $validates option has been deprecated please set the $_veeValidate.validator option to "new" instead'),this.$validator=J(this,t)),(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=J(this,t));var i=function(t){return!!(t&&(Array.isArray(t)&&~t.indexOf("$validator")||o(t)&&t.$validator))}(this.$options.inject);this.$validator||!t.inject||i||(this.$validator=J(this,t)),(i||this.$validator)&&(!i&&this.$validator&&(e.util.defineReactive(this.$validator,"errors",this.$validator.errors),e.util.defineReactive(this.$validator,"flags",this.$validator.flags)),this.$options.computed||(this.$options.computed={}),this.$options.computed[t.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[t.fieldsBagName||"fields"]=function(){return Object.keys(this.$validator.flags).length?this.$validator.flags:H})}},beforeDestroy:function(){g(this.$vnode)||this.$validator&&this.$validator.ownerId===this._uid&&(this.$validator.pause(),this.$validator.destroy())}},W=function(e,i){return i&&i.$validator?i.$validator.fields.find({id:t(e,"id")}):null},X={bind:function(t,e,i){var n=i.context.$validator;if(n){var r=V.generate(t,e,i);n.attach(r)}else s("No validator instance is present on vm, did you forget to inject '$validator'?")},inserted:function(t,e,i){var n=W(t,i.context),r=V.resolveScope(t,e,i);n&&r!==n.scope&&(n.update({scope:r}),n.updated=!1)},update:function(t,e,n){var r=W(t,n.context);if(!(!r||r.updated&&i(e.value,e.oldValue))){var s=V.resolveScope(t,e,n),a=V.resolveRules(t,e);r.update({scope:s,rules:a})}},unbind:function(t,e,i){var n=i.context,r=W(t,n);r&&n.$validator.detach(r)}},Y=function(t,e){return void 0===e&&(e=!0),Object.keys(t).reduce(function(i,n){if(!i)return i=f({},t[n]);var r=0===n.indexOf("$");return e&&r?i=Y(t[n]):!e&&r?i:i=function(t,e){var i={pristine:function(t,e){return t&&e},dirty:function(t,e){return t||e},touched:function(t,e){return t||e},untouched:function(t,e){return t&&e},valid:function(t,e){return t&&e},invalid:function(t,e){return t||e},pending:function(t,e){return t||e},required:function(t,e){return t||e},validated:function(t,e){return t&&e}};return Object.keys(i).reduce(function(n,r){return n[r]=i[r](t[r],e[r]),n},{})}(i,t[n])},null)};return{install:function(t,e){if(void 0===e&&(e={}),U)s("already installed, Vue.use(VeeValidate) should only be called once.");else{U=t,k.merge(e);var i=k.current,n=i.locale,r=i.dictionary,a=i.i18n;r&&z.localize(r),a&&a._vm&&l(a._vm.$watch)&&a._vm.$watch("locale",function(){z.regenerate()}),z.localize(n),z.setStrictMode(k.current.strict),U.mixin(Q),U.directive("validate",X)}},use:function(t,e){if(void 0===e&&(e={}),!l(t))return s("The plugin must be a callable function");t({Validator:z,ErrorBag:_,Rules:z.rules},e)},directive:X,mixin:Q,mapFields:function(t){if(!t)return function(){return Y(this.$validator.flags)};var e=function(t){return Array.isArray(t)?t.reduce(function(t,e){return~e.indexOf(".")?t[e.split(".")[1]]=e:t[e]=e,t},{}):t}(t);return Object.keys(e).reduce(function(t,i){var n=e[i];return t[i]=function(){if(this.$validator.flags[n])return this.$validator.flags[n];if("*"===e[i])return Y(this.$validator.flags,!1);if(n.indexOf(".")<=0)return{};var t=n.split("."),r=t[0],s=t.slice(1);return r=this.$validator.flags["$"+r],"*"===(s=s.join("."))&&r?Y(r):r&&r[s]?r[s]:{}},t},{})},Validator:z,ErrorBag:_,version:"2.0.0-rc.26"}}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VeeValidate=e()}(this,function(){"use strict";var t=function(t,e){return t.getAttribute("data-vv-"+e)},e=function(t){return null===t||void 0===t},i=function(t,e){if(t instanceof RegExp&&e instanceof RegExp)return i(t.source,e.source)&&i(t.flags,e.flags);if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(var n=0;n0;)e[i]=arguments[i+1];if(l(Object.assign))return Object.assign.apply(Object,[t].concat(e));if(null==t)throw new TypeError("Cannot convert undefined or null to object");var n=Object(t);return e.forEach(function(t){null!=t&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},h=0,p="{id}",v=function(t,e){var i=d(t);if(l(i.find))return i.find(e);var n;return i.some(function(t){return!!e(t)&&(n=t,!0)}),n},m=function(t){return t&&("SELECT"===t.tagName||~["radio","checkbox","file"].indexOf(t.type))?"change":"input"},g=function(t){if(!t)return!1;var e=t.componentOptions.tag;return/keep-alive|transition|transition-group/.test(e)},y=function(t,e,i){return"number"==typeof e?t.reduce(function(t,i){return t[i]=e,t},{}):t.reduce(function(t,n){return"object"==typeof e&&n in e?(t[n]=e[n],t):"number"==typeof i?(t[n]=i,t):(t[n]=i&&i[n]||0,t)},{})},$=function(t){if("number"==typeof t)return t;if("string"==typeof t)return parseInt(t);var e={};for(var i in t)e[i]=parseInt(t[i]);return e},b=function(t,e){return o(t)&&o(e)?(Object.keys(e).forEach(function(i){if(o(e[i])){if(!t[i]){f(t,(n={},n[i]={},n));var n}b(t[i],e[i])}else{f(t,(r={},r[i]=e[i],r));var r}}),t):t},_=function(){this.items=[]};_.prototype.add=function(t){arguments.length>1&&(t={field:arguments[0],msg:arguments[1],rule:arguments[2],scope:e(arguments[3])?null:arguments[3],regenerate:null}),t.scope=e(t.scope)?null:t.scope,this.items.push(t)},_.prototype.regenerate=function(){this.items.forEach(function(t){t.msg=l(t.regenerate)?t.regenerate():t.msg})},_.prototype.update=function(t,e){var i=v(this.items,function(e){return e.id===t});if(i){var n=this.items.indexOf(i);this.items.splice(n,1),i.scope=e.scope,this.items.push(i)}},_.prototype.all=function(t){return e(t)?this.items.map(function(t){return t.msg}):this.items.filter(function(e){return e.scope===t}).map(function(t){return t.msg})},_.prototype.any=function(t){return e(t)?!!this.items.length:!!this.items.filter(function(e){return e.scope===t}).length},_.prototype.clear=function(t){e(t)&&(t=null);for(var i=0;i-1){var e=t.split(":");return{name:e[0],rule:e[1]}}return null},_.prototype._scope=function(t){if(t.indexOf(".")>-1){var e=t.split("."),i=e[0];return{name:e.slice(1).join("."),scope:i}}return null};var w="en",x=function(t){void 0===t&&(t={}),this.container={},this.merge(t)},E={locale:{}};E.locale.get=function(){return w},E.locale.set=function(t){w=t||"en"},x.prototype.hasLocale=function(t){return!!this.container[t]},x.prototype.setDateFormat=function(t,e){this.container[t]||(this.container[t]={}),this.container[t].dateFormat=e},x.prototype.getDateFormat=function(t){return this.container[t]&&this.container[t].dateFormat?this.container[t].dateFormat:null},x.prototype.getMessage=function(t,e,i){var n=null;return n=this.hasMessage(t,e)?this.container[t].messages[e]:this._getDefaultMessage(t),l(n)?n.apply(void 0,i):n},x.prototype.getFieldMessage=function(t,e,i,n){if(!this.hasLocale(t))return this.getMessage(t,i,n);var r=this.container[t].custom&&this.container[t].custom[e];if(!r||!r[i])return this.getMessage(t,i,n);var s=r[i];return l(s)?s.apply(void 0,n):s},x.prototype._getDefaultMessage=function(t){return this.hasMessage(t,"_default")?this.container[t].messages._default:this.container.en.messages._default},x.prototype.getAttribute=function(t,e,i){return void 0===i&&(i=""),this.hasAttribute(t,e)?this.container[t].attributes[e]:i},x.prototype.hasMessage=function(t,e){return!!(this.hasLocale(t)&&this.container[t].messages&&this.container[t].messages[e])},x.prototype.hasAttribute=function(t,e){return!!(this.hasLocale(t)&&this.container[t].attributes&&this.container[t].attributes[e])},x.prototype.merge=function(t){b(this.container,t)},x.prototype.setMessage=function(t,e,i){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].messages[e]=i},x.prototype.setAttribute=function(t,e,i){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].attributes[e]=i},Object.defineProperties(x.prototype,E);var O=function(t){return o(t)?Object.keys(t).reduce(function(e,i){return e[i]=O(t[i]),e},{}):l(t)?t("{0}",["{1}","{2}","{3}"]):t},A=function(t,e){this.i18n=t,this.rootKey=e},F={locale:{}};F.locale.get=function(){return this.i18n.locale},F.locale.set=function(t){s("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},A.prototype.getDateFormat=function(t){return this.i18n.getDateTimeFormat(t||this.locale)},A.prototype.setDateFormat=function(t,e){this.i18n.setDateTimeFormat(t||this.locale,e)},A.prototype.getMessage=function(t,e,i){var n=this.rootKey+".messages."+e;return this.i18n.te(n)?this.i18n.t(n,t,i):this.i18n.t(this.rootKey+".messages._default",t,i)},A.prototype.getAttribute=function(t,e,i){void 0===i&&(i="");var n=this.rootKey+".attributes."+e;return this.i18n.te(n)?this.i18n.t(n,t):i},A.prototype.getFieldMessage=function(t,e,i,n){var r=this.rootKey+".custom."+e+"."+i;return this.i18n.te(r)?this.i18n.t(r):this.getMessage(t,i,n)},A.prototype.merge=function(t){var e=this;Object.keys(t).forEach(function(i){var r=b({},n(i+"."+e.rootKey,e.i18n.messages,{})),s=b(r,function(t){return{messages:O(t.messages),custom:O(t.custom),attributes:t.attributes,dateFormat:t.dateFormat}}(t[i]));e.i18n.mergeLocaleMessage(i,(a={},a[e.rootKey]=s,a));var a;s.dateFormat&&e.i18n.setDateTimeFormat(i,s.dateFormat)})},A.prototype.setMessage=function(t,e,i){this.merge((r={},r[t]={messages:(n={},n[e]=i,n)},r));var n,r},A.prototype.setAttribute=function(t,e,i){this.merge((r={},r[t]={attributes:(n={},n[e]=i,n)},r));var n,r},Object.defineProperties(A.prototype,F);var j={locale:"en",delay:0,errorBagName:"errors",dictionary:null,strict:!0,fieldsBagName:"fields",classes:!1,classNames:null,events:"input|blur",inject:!0,fastExit:!0,aria:!0,validity:!1,i18n:null,i18nRootKey:"validation"},N=f({},j),M={dictionary:new x({en:{messages:{},attributes:{},custom:{}}})},k=function(){},L={default:{},current:{}};L.default.get=function(){return j},L.current.get=function(){return N},k.dependency=function(t){return M[t]},k.merge=function(t){(N=f({},N,t)).i18n&&k.register("dictionary",new A(N.i18n,N.i18nRootKey))},k.register=function(t,e){M[t]=e},k.resolve=function(t){var e=n("$options.$_veeValidate",t,{});return f({},k.current,e)},Object.defineProperties(k,L);var V=function(){};V.generate=function(t,e,i){var n=V.resolveModel(e,i),r=k.resolve(i.context);return{name:V.resolveName(t,i),el:t,listen:!e.modifiers.disable,scope:V.resolveScope(t,e,i),vm:V.makeVM(i.context),expression:e.value,component:i.child,classes:r.classes,classNames:r.classNames,getter:V.resolveGetter(t,i,n),events:V.resolveEvents(t,i)||r.events,model:n,delay:V.resolveDelay(t,i,r),rules:V.resolveRules(t,e),initial:!!e.modifiers.initial,validity:r.validity,aria:r.aria,initialValue:V.resolveInitialValue(i)}},V.getCtorConfig=function(t){if(!t.child)return null;return n("child.$options.$_veeValidate",t)},V.resolveRules=function(e,i){return i.value||i&&i.expression?"string"==typeof i.value?i.value:~["string","object"].indexOf(typeof i.value.rules)?i.value.rules:i.value:t(e,"rules")},V.resolveInitialValue=function(t){var e=t.data.model||v(t.data.directives,function(t){return"model"===t.name});return e&&e.value},V.makeVM=function(t){return{get $el(){return t.$el},get $refs(){return t.$refs},$watch:t.$watch?t.$watch.bind(t):function(){},$validator:t.$validator?{errors:t.$validator.errors,validate:t.$validator.validate.bind(t.$validator),update:t.$validator.update.bind(t.$validator)}:null}},V.resolveDelay=function(e,i,n){var r=t(e,"delay"),s=n&&"delay"in n?n.delay:0;return!r&&i.child&&i.child.$attrs&&(r=i.child.$attrs["data-vv-delay"]),o(s)?(s.input=r||0,$(s)):$(r||s)},V.resolveEvents=function(e,i){var n=t(e,"validate-on");if(!n&&i.child&&i.child.$attrs&&(n=i.child.$attrs["data-vv-validate-on"]),!n&&i.child){var r=V.getCtorConfig(i);n=r&&r.events}return n},V.resolveScope=function(i,n,r){void 0===r&&(r={});var s=null;return o(n.value)&&(s=n.value.scope),r.child&&e(s)&&(s=r.child.$attrs&&r.child.$attrs["data-vv-scope"]),e(s)?function(i){var n=t(i,"scope");return e(n)&&i.form&&(n=t(i.form,"scope")),e(n)?null:n}(i):s},V.resolveModel=function(t,e){if(t.arg)return t.arg;if(o(t.value)&&t.value.arg)return t.value.arg;var i=e.data.model||v(e.data.directives,function(t){return"model"===t.name});if(!i)return null;return/^[a-z_]+[0-9]*(\w*\.[a-z_]\w*)*$/i.test(i.expression)&&function(t,e){var i=e;return t.split(".").every(function(t){return!!Object.prototype.hasOwnProperty.call(i,t)&&(i=i[t],!0)})}(i.expression,e.context)?i.expression:null},V.resolveName=function(e,i){var n=t(e,"name");if(!n&&!i.child)return e.name;if(!n&&i.child&&i.child.$attrs&&(n=i.child.$attrs["data-vv-name"]||i.child.$attrs.name),!n&&i.child){var r=V.getCtorConfig(i);if(r&&l(r.name)){return r.name.bind(i.child)()}return i.child.name}return n},V.resolveGetter=function(e,i,r){if(r)return function(){return n(r,i.context)};if(i.child){var s=t(e,"value-path")||i.child.$attrs&&i.child.$attrs["data-vv-value-path"];if(s)return function(){return n(s,i.child)};var a=V.getCtorConfig(i);if(a&&l(a.value)){var o=a.value.bind(i.child);return function(){return o()}}return function(){return i.child.value}}switch(e.type){case"checkbox":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]');if((t=d(t).filter(function(t){return t.checked})).length)return t.map(function(t){return t.value})};case"radio":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]'),i=v(t,function(t){return t.checked});return i&&i.value};case"file":return function(t){return d(e.files)};case"select-multiple":return function(){return d(e.options).filter(function(t){return t.selected}).map(function(t){return t.value})};default:return function(){return e&&e.value}}};var P={targetOf:null,initial:!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"}},C=function(t,i){void 0===i&&(i={}),this.id=function(){h>=9999&&(h=0,p=p.replace("{id}","_{id}")),h++;return p.replace("{id}",String(h))}(),this.el=t,this.updated=!1,this.dependencies=[],this.watchers=[],this.events=[],this.delay=0,this.rules={},this._cacheId(i),i=f({},P,i),this._delay=e(i.delay)?0:i.delay,this.validity=i.validity,this.aria=i.aria,this.flags={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1},this.vm=i.vm,this.component=i.component,this.ctorConfig=this.component?n("$options.$_veeValidate",this.component):void 0,this.update(i),this.updated=!1},D={validator:{},isRequired:{},isDisabled:{},alias:{},value:{},rejectsFalse:{}};D.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:(s("No validator instance detected."),{validate:function(){}})},D.isRequired.get=function(){return!!this.rules.required},D.isDisabled.get=function(){return!(!this.component||!this.component.disabled)||!(!this.el||!this.el.disabled)},D.alias.get=function(){if(this._alias)return this._alias;var e=null;return this.el&&(e=t(this.el,"as")),!e&&this.component?this.component.$attrs&&this.component.$attrs["data-vv-as"]:e},D.value.get=function(){if(l(this.getter))return this.getter()},D.rejectsFalse.get=function(){return this.component&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},C.prototype.matches=function(t){return t.id?this.id===t.id:void 0===t.name&&void 0===t.scope||(void 0===t.scope?this.name===t.name:void 0===t.name?this.scope===t.scope:t.name===this.name&&t.scope===this.scope)},C.prototype._cacheId=function(t){this.el&&!t.targetOf&&function(t,e,i){t.setAttribute("data-vv-"+e,i)}(this.el,"id",this.id)},C.prototype.update=function(t){this.targetOf=t.targetOf||null,this.initial=t.initial||this.initial||!1,!e(t.scope)&&t.scope!==this.scope&&l(this.validator.update)&&this.validator.update(this.id,{scope:t.scope}),this.scope=e(t.scope)?e(this.scope)?null:this.scope:t.scope,this.name=(e(t.name)?t.name:String(t.name))||this.name||null,this.rules=void 0!==t.rules?function(t){return t?o(t)?Object.keys(t).reduce(function(e,i){var n=[];return n=!0===t[i]?[]:Array.isArray(t[i])?t[i]:[t[i]],!1!==t[i]&&(e[i]=n),e},{}):"string"!=typeof t?(s("rules must be either a string or an object."),{}):t.split("|").reduce(function(t,e){var i=function(t){var e=[],i=t.split(":")[0];return~t.indexOf(":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:i,params:e}}(e);return i.name?(t[i.name]=i.params,t):t},{}):{}}(t.rules):this.rules,this.model=t.model||this.model,this.listen=void 0!==t.listen?t.listen:this.listen,this.classes=(t.classes||this.classes||!1)&&!this.component,this.classNames=t.classNames||this.classNames||P.classNames,this.getter=l(t.getter)?t.getter:this.getter,this._alias=t.alias||this._alias,this.events=t.events?function(t){return"string"==typeof t&&t.length?t.split("|"):[]}(t.events):this.events,this.delay=t.delay?y(this.events,t.delay,this._delay):y(this.events,this.delay,this._delay),this.updateDependencies(),this.addActionListeners(),void 0!==t.rules&&(this.flags.required=this.isRequired),this.flags.validated&&void 0!==t.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.el&&(this.updateClasses(),this.addValueListeners(),this.updateAriaAttrs())},C.prototype.reset=function(){var t=this,e={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1};Object.keys(this.flags).forEach(function(i){t.flags[i]=e[i]}),this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},C.prototype.setFlags=function(t){var e=this,i={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(t).forEach(function(n){e.flags[n]=t[n],i[n]&&void 0===t[i[n]]&&(e.flags[i[n]]=!t[n])}),void 0===t.untouched&&void 0===t.touched&&void 0===t.dirty&&void 0===t.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},C.prototype.updateDependencies=function(){var t=this;this.dependencies.forEach(function(t){return t.field.destroy()}),this.dependencies=[];var e=Object.keys(this.rules).reduce(function(e,i){return"confirmed"===i?e.push({selector:t.rules[i][0]||t.name+"_confirmation",name:i}):z.isTargetRule(i)&&e.push({selector:t.rules[i][0],name:i}),e},[]);e.length&&this.vm&&this.vm.$el&&e.forEach(function(e){var i=e.selector,n=e.name,r=null;if("$"===i[0])r=t.vm.$refs[i.slice(1)];else try{r=t.vm.$el.querySelector(i)}catch(t){r=null}if(!r)try{r=t.vm.$el.querySelector('input[name="'+i+'"]')}catch(t){r=null}if(r){var s={vm:t.vm,classes:t.classes,classNames:t.classNames,delay:t.delay,scope:t.scope,events:t.events.join("|"),initial:t.initial,targetOf:t.id};l(r.$watch)?(s.component=r,s.el=r.$el,s.getter=V.resolveGetter(r.$el,{child:r})):(s.el=r,s.getter=V.resolveGetter(r,{})),t.dependencies.push({name:n,field:new C(s.el,s)})}})},C.prototype.unwatch=function(t){if(void 0===t&&(t=null),!t)return this.watchers.forEach(function(t){return t.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(e){return t.test(e.tag)}).forEach(function(t){return t.unwatch()}),this.watchers=this.watchers.filter(function(e){return!t.test(e.tag)})},C.prototype.updateClasses=function(){this.classes&&(c(this.el,this.classNames.dirty,this.flags.dirty),c(this.el,this.classNames.pristine,this.flags.pristine),c(this.el,this.classNames.valid,!!this.flags.valid),c(this.el,this.classNames.invalid,!!this.flags.invalid),c(this.el,this.classNames.touched,this.flags.touched),c(this.el,this.classNames.untouched,this.flags.untouched))},C.prototype.addActionListeners=function(){var t=this;this.unwatch(/class/);var e=function(){t.flags.touched=!0,t.flags.untouched=!1,t.classes&&(c(t.el,t.classNames.touched,!0),c(t.el,t.classNames.untouched,!1)),t.unwatch(/^class_blur$/)},i=m(this.el),n=function(){t.flags.dirty=!0,t.flags.pristine=!1,t.classes&&(c(t.el,t.classNames.pristine,!1),c(t.el,t.classNames.dirty,!0)),t.unwatch(/^class_input$/)};if(this.component&&l(this.component.$once))return this.component.$once("input",n),this.component.$once("blur",e),this.watchers.push({tag:"class_input",unwatch:function(){t.component.$off("input",n)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){t.component.$off("blur",e)}});if(this.el){this.el.addEventListener(i,n);var r=-1===["radio","checkbox"].indexOf(this.el.type)?"blur":"click";this.el.addEventListener(r,e),this.watchers.push({tag:"class_input",unwatch:function(){t.el.removeEventListener(i,n)}}),this.watchers.push({tag:"class_blur",unwatch:function(){t.el.removeEventListener(r,e)}})}},C.prototype.addValueListeners=function(){var t=this;if(this.unwatch(/^input_.+/),this.listen){var e=this.targetOf?function(){t.validator.validate("#"+t.targetOf)}:function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];(0===e.length||l(Event)&&e[0]instanceof Event||e[0]&&e[0].srcElement)&&(e[0]=t.value),t.validator.validate("#"+t.id,e[0])},i=m(this.el),n=this.events.map(function(t){return"input"===t?i:t});if(this.model&&-1!==n.indexOf(i)){var s=r(e,this.delay[i]),a=this.vm.$watch(this.model,function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];t.flags.pending=!0,s.apply(void 0,e)});this.watchers.push({tag:"input_model",unwatch:a}),n=n.filter(function(t){return t!==i})}n.forEach(function(i){var n=r(e,t.delay[i]),s=function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];t.flags.pending=!0,n.apply(void 0,e)};if(t.component)return t.component.$on(i,s),void t.watchers.push({tag:"input_vue",unwatch:function(){t.component.$off(i,s)}});if(~["radio","checkbox"].indexOf(t.el.type)){var a=document.querySelectorAll('input[name="'+t.el.name+'"]');d(a).forEach(function(e){e.addEventListener(i,s),t.watchers.push({tag:"input_native",unwatch:function(){e.removeEventListener(i,s)}})})}else t.el.addEventListener(i,s),t.watchers.push({tag:"input_native",unwatch:function(){t.el.removeEventListener(i,s)}})})}},C.prototype.updateAriaAttrs=function(){this.aria&&this.el&&l(this.el.setAttribute)&&(this.el.setAttribute("aria-required",this.isRequired?"true":"false"),this.el.setAttribute("aria-invalid",this.flags.invalid?"true":"false"))},C.prototype.updateCustomValidity=function(){this.validity&&this.el&&l(this.el.setCustomValidity)&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},C.prototype.destroy=function(){this.watchers.forEach(function(t){return t.unwatch()}),this.watchers=[],this.dependencies.forEach(function(t){return t.field.destroy()}),this.dependencies=[]},Object.defineProperties(C.prototype,D);var R=function(){this.items=[]},S={length:{}};S.length.get=function(){return this.items.length},R.prototype.find=function(t){return v(this.items,function(e){return e.matches(t)})},R.prototype.filter=function(t){return Array.isArray(t)?this.items.filter(function(e){return t.some(function(t){return e.matches(t)})}):this.items.filter(function(e){return e.matches(t)})},R.prototype.map=function(t){return this.items.map(t)},R.prototype.remove=function(t){var e=null;if(!(e=t instanceof C?t:this.find(t)))return null;var i=this.items.indexOf(e);return this.items.splice(i,1),e},R.prototype.push=function(t){if(!(t instanceof C))throw a("FieldBag only accepts instances of Field that has an id defined.");if(!t.id)throw a("Field id must be defined.");if(this.find({id:t.id}))throw a("Field with id "+t.id+" is already added.");this.items.push(t)},Object.defineProperties(R.prototype,S);var q={},T=!0,B=["confirmed","after","before"],I=[],z=function(t,e){var i=this;void 0===e&&(e={vm:null,fastExit:!0}),this.strict=T,this.errors=new _,I.push(this.errors),this.fields=new R,this.flags={},this._createFields(t),this.paused=!1,this.fastExit=e.fastExit||!1,this.ownerId=e.vm&&e.vm._uid,this.reset=e.vm&&l(e.vm.$nextTick)?function(t){return new Promise(function(n){e.vm.$nextTick(function(){n(i._reset(t))})})}:this._reset},K={dictionary:{},locale:{},rules:{}},G={dictionary:{},locale:{},rules:{}};K.dictionary.get=function(){return k.dependency("dictionary")},G.dictionary.get=function(){return k.dependency("dictionary")},K.locale.get=function(){return this.dictionary.locale},K.locale.set=function(t){z.locale=t},G.locale.get=function(){return z.dictionary.locale},G.locale.set=function(t){var e=t!==z.dictionary.locale;z.dictionary.locale=t,e&&z.regenerate()},K.rules.get=function(){return q},G.rules.get=function(){return q},z.create=function(t,e){return new z(t,e)},z.extend=function(t,e,i){void 0===i&&(i={}),z._guardExtend(t,e),z._merge(t,e),i&&i.hasTarget&&B.push(t)},z.regenerate=function(){I.forEach(function(t){return t.regenerate()})},z.remove=function(t){delete q[t];var e=B.indexOf(t);-1!==e&&B.splice(e,1)},z.isTargetRule=function(t){return-1!==B.indexOf(t)},z.setStrictMode=function(t){void 0===t&&(t=!0),T=t},z.prototype.localize=function(t,e){z.localize(t,e)},z.localize=function(t,e){if(o(t))z.dictionary.merge(t);else{if(e){var i=t||e.name;e=f({},e),z.dictionary.merge((n={},n[i]=e,n));var n}t&&(z.locale=t)}},z.prototype.attach=function(t){arguments.length>1&&(t=f({},{name:arguments[0],rules:arguments[1]},arguments[2]||{vm:{$validator:this}}));var e=t.initialValue;return t instanceof C||(t=new C(t.el||null,t)),this.fields.push(t),t.initial?this.validate("#"+t.id,e||t.value):this._validate(t,e||t.value,!0).then(function(e){t.flags.valid=e.valid,t.flags.invalid=!e.valid}),this._addFlag(t,t.scope),t},z.prototype.flag=function(t,e){var i=this._resolveField(t);i&&e&&i.setFlags(e)},z.prototype.detach=function(t,i){var n=t instanceof C?t:this._resolveField(t,i);if(n){n.destroy(),this.errors.remove(n.name,n.scope,n.id),this.fields.remove(n);var r=this.flags;!e(n.scope)&&r["$"+n.scope]?delete r["$"+n.scope][n.name]:e(n.scope)&&delete r[n.name],this.flags=f({},r)}},z.prototype.extend=function(t,e,i){void 0===i&&(i={}),z.extend(t,e,i)},z.prototype.update=function(t,i){var n=i.scope,r=this._resolveField("#"+t);r&&(this.errors.update(t,{scope:n}),!e(r.scope)&&this.flags["$"+r.scope]?delete this.flags["$"+r.scope][r.name]:e(r.scope)&&delete this.flags[r.name],this._addFlag(r,n))},z.prototype.remove=function(t){z.remove(t)},z.prototype.validate=function(t,e,i){var n=this;if(void 0===i&&(i=null),this.paused)return Promise.resolve(!0);if(0===arguments.length)return this.validateScopes();if(1===arguments.length&&"*"===arguments[0])return this.validateAll();if(1===arguments.length&&"string"==typeof arguments[0]&&/^(.+)\.\*$/.test(arguments[0])){var r=arguments[0].match(/^(.+)\.\*$/)[1];return this.validateAll(r)}var s=this._resolveField(t,i);if(!s)return this._handleFieldNotFound(t,i);s.flags.pending=!0,1===arguments.length&&(e=s.value);var a=s.isDisabled;return this._validate(s,e,a).then(function(t){return s.setFlags({pending:!1,valid:t.valid,validated:!0}),n.errors.remove(s.name,s.scope,s.id),a?Promise.resolve(!0):(t.errors&&t.errors.forEach(function(t){return n.errors.add(t)}),t.valid)})},z.prototype.pause=function(){return this.paused=!0,this},z.prototype.resume=function(){return this.paused=!1,this},z.prototype.validateAll=function(t){var e=arguments,i=this;if(this.paused)return Promise.resolve(!0);var n=null,r=!1;"string"==typeof t?n={scope:t}:o(t)?(n=Object.keys(t).map(function(t){return{name:t,scope:e[1]||null}}),r=!0):0===arguments.length?n={scope:null}:Array.isArray(t)&&(n=t.map(function(t){return{name:t,scope:e[1]||null}}));var s=this.fields.filter(n).map(function(e){return i.validate("#"+e.id,r?t[e.name]:e.value)});return Promise.all(s).then(function(t){return t.every(function(t){return t})})},z.prototype.validateScopes=function(){var t=this;if(this.paused)return Promise.resolve(!0);var e=this.fields.map(function(e){return t.validate("#"+e.id,e.value)});return Promise.all(e).then(function(t){return t.every(function(t){return t})})},z.prototype.destroy=function(){var t=I.indexOf(this.errors);-1!==t&&I.splice(t,1)},z.prototype._createFields=function(t){var e=this;t&&Object.keys(t).forEach(function(i){var n=f({},{name:i,rules:t[i]});e.attach(n)})},z.prototype._getDateFormat=function(t){var e=null;return t.date_format&&Array.isArray(t.date_format)&&(e=t.date_format[0]),e||this.dictionary.getDateFormat(this.locale)},z.prototype._isADateRule=function(t){return!!~["after","before","date_between","date_format"].indexOf(t)},z.prototype._formatErrorMessage=function(t,e,i,n){void 0===i&&(i={}),void 0===n&&(n=null);var r=this._getFieldDisplayName(t),s=this._getLocalizedParams(e,n);return this.dictionary.getFieldMessage(this.locale,t.name,e.name,[r,s,i])},z.prototype._getLocalizedParams=function(t,e){if(void 0===e&&(e=null),~B.indexOf(t.name)&&t.params&&t.params[0]){return[e||this.dictionary.getAttribute(this.locale,t.params[0],t.params[0])].concat(t.params.slice(1))}return t.params},z.prototype._getFieldDisplayName=function(t){return t.alias||this.dictionary.getAttribute(this.locale,t.name,t.name)},z.prototype._addFlag=function(t,i){if(void 0===i&&(i=null),e(i)){this.flags=f({},this.flags,(n={},n[""+t.name]=t.flags,n));var n}else{var r,s=f({},this.flags["$"+i]||{},(r={},r[""+t.name]=t.flags,r));this.flags=f({},this.flags,(a={},a["$"+i]=s,a));var a}},z.prototype._reset=function(t){var e=this;return new Promise(function(i){if(t)return e.fields.filter(t).forEach(function(t){t.reset(),e.errors.remove(t.name,t.scope,t.id)}),i();e.fields.items.forEach(function(t){return t.reset()}),e.errors.clear(),i()})},z.prototype._test=function(t,e,i){var n=this,r=q[i.name],s=Array.isArray(i.params)?d(i.params):[],u=null;if(!r||"function"!=typeof r)throw a("No such validator '"+i.name+"' exists.");if(-1!==B.indexOf(i.name)){var c=v(t.dependencies,function(t){return t.name===i.name});c&&(u=c.field.alias,s=[c.field.value].concat(s.slice(1)))}else"required"===i.name&&t.rejectsFalse&&(s=s.length?s:[!0]);if(this._isADateRule(i.name)){var f=this._getDateFormat(t.rules);"date_format"!==i.name&&s.push(f)}var h=r(e,s);return l(h.then)?h.then(function(e){var r=!0,s={};return Array.isArray(e)?r=e.every(function(t){return o(t)?t.valid:t}):(r=o(e)?e.valid:e,s=e.data),{valid:r,error:r?void 0:n._createFieldError(t,i,s,u)}}):(o(h)||(h={valid:h,data:{}}),{valid:h.valid,error:h.valid?void 0:this._createFieldError(t,i,h.data,u)})},z._merge=function(t,e){l(e)?q[t]=e:(q[t]=e.validate,e.getMessage&&z.dictionary.setMessage(this.locale,t,e.getMessage))},z._guardExtend=function(t,e){if(!l(e)){if(!l(e.validate))throw a("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.");if(!l(e.getMessage)&&"string"!=typeof e.getMessage)throw a("Extension Error: The validator '"+t+"' object must have a 'getMessage' method or string.")}},z.prototype._createFieldError=function(t,e,i,n){var r=this;return{id:t.id,field:t.name,msg:this._formatErrorMessage(t,e,i,n),rule:e.name,scope:t.scope,regenerate:function(){return r._formatErrorMessage(t,e,i,n)}}},z.prototype._resolveField=function(t,i){if(!e(i))return this.fields.find({name:t,scope:i});if("#"===t[0])return this.fields.find({id:t.slice(1)});if(t.indexOf(".")>-1){var n=t.split("."),r=n[0],s=n.slice(1),a=this.fields.find({name:s.join("."),scope:r});if(a)return a}return this.fields.find({name:t,scope:null})},z.prototype._handleFieldNotFound=function(t,i){if(!this.strict)return Promise.resolve(!0);var n=e(i)?t:(e(i)?"":i+".")+t;throw a('Validating a non-existent field: "'+n+'". Use "attach()" first.')},z.prototype._validate=function(t,i,n){var r=this;if(void 0===n&&(n=!1),!t.isRequired&&(e(i)||""===i))return Promise.resolve({valid:!0});var s=[],a=[],o=!1;return Object.keys(t.rules).some(function(e){var n=r._test(t,i,{name:e,params:t.rules[e]});return l(n.then)?s.push(n):r.fastExit&&!n.valid?(a.push(n.error),o=!0):s.push(new Promise(function(t){t(n)})),o}),o?Promise.resolve({valid:!1,errors:a}):Promise.all(s).then(function(t){return t.map(function(t){return t.valid||a.push(t.error),t.valid}).every(function(t){return t})}).then(function(t){return{valid:t,errors:a}})},Object.defineProperties(z.prototype,K),Object.defineProperties(z,G);var U,H=function(t,e){return"undefined"==typeof Proxy?t:new Proxy(t,e)}({},{get:function(t,e){return 0===String(e).indexOf("$")?H:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1}}}),J=function(t,e){return new z(null,{vm:t,fastExit:e.fastExit})},Q={provide:function(){return this.$validator&&!g(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!g(this.$vnode)){this.$parent||k.merge(this.$options.$_veeValidate||{});var t=k.resolve(this),e=this.$options._base;this.$options.$validates&&(s('The ctor $validates option has been deprecated please set the $_veeValidate.validator option to "new" instead'),this.$validator=J(this,t)),(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=J(this,t));var i=function(t){return!!(t&&(Array.isArray(t)&&~t.indexOf("$validator")||o(t)&&t.$validator))}(this.$options.inject);this.$validator||!t.inject||i||(this.$validator=J(this,t)),(i||this.$validator)&&(!i&&this.$validator&&(e.util.defineReactive(this.$validator,"errors",this.$validator.errors),e.util.defineReactive(this.$validator,"flags",this.$validator.flags)),this.$options.computed||(this.$options.computed={}),this.$options.computed[t.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[t.fieldsBagName||"fields"]=function(){return Object.keys(this.$validator.flags).length?this.$validator.flags:H})}},beforeDestroy:function(){g(this.$vnode)||this.$validator&&this.$validator.ownerId===this._uid&&(this.$validator.pause(),this.$validator.destroy())}},W=function(e,i){return i&&i.$validator?i.$validator.fields.find({id:t(e,"id")}):null},X={bind:function(t,e,i){var n=i.context.$validator;if(n){var r=V.generate(t,e,i);n.attach(r)}else s("No validator instance is present on vm, did you forget to inject '$validator'?")},inserted:function(t,e,i){var n=W(t,i.context),r=V.resolveScope(t,e,i);n&&r!==n.scope&&(n.update({scope:r}),n.updated=!1)},update:function(t,e,n){var r=W(t,n.context);if(!(!r||r.updated&&i(e.value,e.oldValue))){var s=V.resolveScope(t,e,n),a=V.resolveRules(t,e);r.update({scope:s,rules:a})}},unbind:function(t,e,i){var n=i.context,r=W(t,n);r&&n.$validator.detach(r)}},Y=function(t,e){return void 0===e&&(e=!0),Object.keys(t).reduce(function(i,n){if(!i)return i=f({},t[n]);var r=0===n.indexOf("$");return e&&r?i=Y(t[n]):!e&&r?i:i=function(t,e){var i={pristine:function(t,e){return t&&e},dirty:function(t,e){return t||e},touched:function(t,e){return t||e},untouched:function(t,e){return t&&e},valid:function(t,e){return t&&e},invalid:function(t,e){return t||e},pending:function(t,e){return t||e},required:function(t,e){return t||e},validated:function(t,e){return t&&e}};return Object.keys(i).reduce(function(n,r){return n[r]=i[r](t[r],e[r]),n},{})}(i,t[n])},null)};return{install:function(t,e){if(void 0===e&&(e={}),U)s("already installed, Vue.use(VeeValidate) should only be called once.");else{U=t,k.merge(e);var i=k.current,n=i.locale,r=i.dictionary,a=i.i18n;r&&z.localize(r),a&&a._vm&&l(a._vm.$watch)&&a._vm.$watch("locale",function(){z.regenerate()}),a||z.localize(n),z.setStrictMode(k.current.strict),U.mixin(Q),U.directive("validate",X)}},use:function(t,e){if(void 0===e&&(e={}),!l(t))return s("The plugin must be a callable function");t({Validator:z,ErrorBag:_,Rules:z.rules},e)},directive:X,mixin:Q,mapFields:function(t){if(!t)return function(){return Y(this.$validator.flags)};var e=function(t){return Array.isArray(t)?t.reduce(function(t,e){return~e.indexOf(".")?t[e.split(".")[1]]=e:t[e]=e,t},{}):t}(t);return Object.keys(e).reduce(function(t,i){var n=e[i];return t[i]=function(){if(this.$validator.flags[n])return this.$validator.flags[n];if("*"===e[i])return Y(this.$validator.flags,!1);if(n.indexOf(".")<=0)return{};var t=n.split("."),r=t[0],s=t.slice(1);return r=this.$validator.flags["$"+r],"*"===(s=s.join("."))&&r?Y(r):r&&r[s]?r[s]:{}},t},{})},Validator:z,ErrorBag:_,version:"2.0.0-rc.27"}}); \ No newline at end of file diff --git a/package.json b/package.json index 002bf0bc0..921d43352 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vee-validate", - "version": "2.0.0-rc.26", + "version": "2.0.0-rc.27", "description": "Simple Vue.js input validation plugin", "author": "Abdelrahman Awad ", "license": "MIT", diff --git a/src/core/field.js b/src/core/field.js index e6bf1ba69..ee169604e 100644 --- a/src/core/field.js +++ b/src/core/field.js @@ -71,6 +71,7 @@ export default class Field { model: ?string; value: any; _alias: ?string; + _delay: number | Object; constructor (el: HTMLInputElement | null, options: FieldOptions | MapObject = {}) { this.id = uniqId(); @@ -83,7 +84,7 @@ export default class Field { this.rules = {}; this._cacheId(options); options = assign({}, DEFAULT_OPTIONS, options); - this._delay = typeof options.delay === 'number' ? options.delay : (options.delay && options.delay.global); // cache initial delay + this._delay = !isNullOrUndefined(options.delay) ? options.delay : 0; // cache initial delay this.validity = options.validity; this.aria = options.aria; this.flags = createFlags(); diff --git a/src/core/generator.js b/src/core/generator.js index 2af462404..aa5757d73 100644 --- a/src/core/generator.js +++ b/src/core/generator.js @@ -113,7 +113,13 @@ export default class Generator { delay = vnode.child.$attrs['data-vv-delay']; } - return (delay) ? { local: { input: parseInt(delay) }, global: deepParseInt(globalDelay) } : { global: deepParseInt(globalDelay) }; + if (!isObject(globalDelay)) { + return deepParseInt(delay || globalDelay); + } + + globalDelay.input = delay || 0; + + return deepParseInt(globalDelay); } /** diff --git a/src/install.js b/src/install.js index 6e17be2a5..4e5c5df1d 100644 --- a/src/install.js +++ b/src/install.js @@ -27,7 +27,10 @@ function install (_Vue, options = {}) { }); } - Validator.localize(locale); // set the locale + if (!i18n) { + Validator.localize(locale); // set the locale + } + Validator.setStrictMode(Config.current.strict); Vue.mixin(mixin); diff --git a/tests/core/generator.js b/tests/core/generator.js index c2d180d1f..4548ea2aa 100644 --- a/tests/core/generator.js +++ b/tests/core/generator.js @@ -72,11 +72,17 @@ test('resolves delay', () => { `; const vnode = { child: { $attrs: { 'data-vv-delay': '200' } } }; let el = document.querySelector('#el'); - expect(Generator.resolveDelay(el, {})).toEqual(expect.objectContaining({ local: { input: 100 } })); + expect(Generator.resolveDelay(el, {})).toBe(100); + + // fills the delay object if the global delay is an object of events. + expect(Generator.resolveDelay(el, {}, { delay: { input: 300, blur: 300 } })).toEqual({ + blur: 300, + input: 100 + }); el = { getAttribute: () => null }; - expect(Generator.resolveDelay(el, vnode)).toEqual(expect.objectContaining({ local: { input: 200 } })); - expect(Generator.resolveDelay(el, {}, { delay: '300' })).toEqual({ global: 300 }); + expect(Generator.resolveDelay(el, vnode)).toBe(200); + expect(Generator.resolveDelay(el, {}, { delay: '300' })).toBe(300); }) test('resolves events', () => {