Socket
Socket
Sign inDemoInstall

vee-validate

Package Overview
Dependencies
Maintainers
1
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vee-validate - npm Package Compare versions

Comparing version 2.0.0-beta.22 to 2.0.0-beta.23

dist/locale/hu.js

4

dist/vee-validate.min.js

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

!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){return e&&e.__esModule?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function r(e,t,r,i){if(void 0===i&&(i=null),t){i=oe({},je,i);var n=r.dirty(t),o=r.valid(t),a=r.failed(t);n?(re(e,i.touched),ie(e,i.untouched)):(re(e,i.untouched),ie(e,i.touched)),o?(re(e,i.valid),ie(e,i.invalid)):(a&&re(e,i.invalid),ie(e,i.valid))}}function i(e,t){t=oe({},je,t),re(e,t.dirty),ie(e,t.pristine)}function n(e,t){t=oe({},je,t),re(e,t.pristine),ie(e,t.dirty)}var o=function(e){return/^[a-zA-Z]*$/.test(e)},a=function(e){return/^[a-zA-Z0-9_-]*$/.test(e)},s=function(e){return/^[a-zA-Z0-9]*$/.test(e)},u=function(e){return/^[a-zA-Z\s]*$/.test(e)},l=function(e,t){var r=t[0],i=t[1];return Number(r)<=e&&Number(i)>=e},c=function(e,t,r){var i=t[0],n=i?document.querySelector("input[name='"+i+"']"):document.querySelector("input[name='"+r+"_confirmation']");return!(!n||String(e)!==n.value)},f=t(function(e,t){function r(e){if("string"!=typeof e)throw new TypeError("This library (validator.js) validates strings only")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default}),d=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){(0,o.default)(e);var t=e.replace(/[^0-9]+/g,"");if(!a.test(t))return!1;for(var r=0,i=void 0,n=void 0,s=void 0,u=t.length-1;u>=0;u--)i=t.substring(u,u+1),n=parseInt(i,10),s?(n*=2,r+=n>=10?n%10+1:n):r+=n,s=!s;return!(r%10!==0||!t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=f,o=r(n),a=/^(?: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}),h=e(d),p=function(e){return h(String(e))},v=function(e,t){var r=Array.isArray(t)?t[0]||"*":"*";if(Array.isArray(e))return!1;if(null===e||void 0===e||""===e)return!0;if(0===Number(r))return/^-?\d*$/.test(e);var i="*"===r?"+":"{1,"+r+"}",n=new RegExp("^-?\\d*(\\.\\d"+i+")?$");if(!n.test(e))return!1;var o=parseFloat(e);return o===o},m=function(e,t){var r=t[0],i=String(e);return/^[0-9]*$/.test(i)&&i.length===Number(r)},g=function(e,t,r){var i=window.URL||window.webkitURL;return new Promise(function(n){var o=new Image;o.onerror=function(){return n({valid:!1})},o.onload=function(){return n({valid:o.width===Number(t)&&o.height===Number(r)})},o.src=i.createObjectURL(e)})},_=function(e,t){for(var r=t[0],i=t[1],n=[],o=0;o<e.length;o++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e[o].name))return!1;n.push(e[o])}return Promise.all(n.map(function(e){return g(e,r,i)}))},y=t(function(e,t){function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var r in t)"undefined"==typeof e[r]&&(e[r]=t[r]);return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default}),b=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){(0,a.default)(e);var r=void 0,i=void 0;"object"===("undefined"==typeof t?"undefined":n(t))?(r=t.min||0,i=t.max):(r=arguments[1],i=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=r&&("undefined"==typeof i||o<=i)}Object.defineProperty(t,"__esModule",{value:!0});var n="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=i;var o=f,a=r(o);e.exports=t.default}),x=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){(0,o.default)(e),t=(0,s.default)(t,u),t.allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var r=e.split(".");if(t.require_tld){var i=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(i))return!1}for(var n,a=0;a<r.length;a++){if(n=r[a],t.allow_underscores&&(n=n.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(n))return!1;if(/[\uff01-\uff5e]/.test(n))return!1;if("-"===n[0]||"-"===n[n.length-1])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=f,o=r(n),a=y,s=r(a),u={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};e.exports=t.default}),F=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if((0,o.default)(e),t=(0,s.default)(t,h),t.allow_display_name){var r=e.match(p);r&&(e=r[1])}var i=e.split("@"),n=i.pop(),a=i.join("@"),u=n.toLowerCase();if("gmail.com"!==u&&"googlemail.com"!==u||(a=a.replace(/\./g,"").toLowerCase()),!(0,l.default)(a,{max:64})||!(0,l.default)(n,{max:256}))return!1;if(!(0,d.default)(n,{require_tld:t.require_tld}))return!1;if('"'===a[0])return a=a.slice(1,a.length-1),t.allow_utf8_local_part?_.test(a):m.test(a);for(var c=t.allow_utf8_local_part?g:v,f=a.split("."),y=0;y<f.length;y++)if(!c.test(f[y]))return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=f,o=r(n),a=y,s=r(a),u=b,l=r(u),c=x,d=r(c),h={allow_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},p=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,v=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,m=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,g=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,_=/^([\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}),$=e(F),w=function(e){return $(String(e))},E=function(e,t){var r=new RegExp(".("+t.join("|")+")$","i");return e.every(function(e){return r.test(e.name)})},j=function(e){return e.every(function(e){return/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e.name)})},A=function(e,t){return!!t.filter(function(t){return t==e}).length},L=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,o.default)(e),t=String(t),!t)return i(e,4)||i(e,6);if("4"===t){if(!a.test(e))return!1;var r=e.split(".").sort(function(e,t){return e-t});return r[3]<=255}if("6"===t){var n=e.split(":"),u=!1,l=i(n[n.length-1],4),c=l?7:8;if(n.length>c)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(n.shift(),n.shift(),u=!0):"::"===e.substr(e.length-2)&&(n.pop(),n.pop(),u=!0);for(var f=0;f<n.length;++f)if(""===n[f]&&f>0&&f<n.length-1){if(u)return!1;u=!0}else if(l&&f===n.length-1);else if(!s.test(n[f]))return!1;return u?n.length>=1:n.length===c}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=f,o=r(n),a=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,s=/^[0-9A-F]{1,4}$/i;e.exports=t.default}),O=e(L),S=function(e,t){void 0===t&&(t=[4]);var r=t[0];return O(e,r)},T=function(e,t){var r=t[0];return void 0===e||null===e?r>=0:String(e).length<=r},N=function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)<=r},k=function(e,t){var r=new RegExp(t.join("|").replace("*",".+")+"$","i");return e.every(function(e){return r.test(e.type)})},M=function(e,t){var r=t[0];return void 0!==e&&null!==e&&String(e).length>=r},D=function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)>=r},q=function(e,t){return!t.filter(function(t){return t==e}).length},B=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,o.default)(e),a.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=f,o=r(n),a=/^[-+]?[0-9]+$/;e.exports=t.default}),R=e(B),V=function(e){return R(String(e))},z=function(e,t){var r=t[0],i=t.slice(1);return r instanceof RegExp?r.test(e):new RegExp(r,i).test(String(e))},C=function(e){return Array.isArray(e)?!!e.length:void 0!==e&&null!==e&&!!String(e).trim().length},P=function(e,t){var r=t[0];if(isNaN(r))return!1;for(var i=1024*Number(r),n=0;n<e.length;n++)if(e[n].size>i)return!1;return!0},U=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(e===n||i(n)&&n.test(e))return!0}return!1}function o(e,t){if((0,s.default)(e),!e||e.length>=2083||/\s/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,p.default)(t,v);var r=void 0,i=void 0,o=void 0,a=void 0,u=void 0,c=void 0,f=void 0,h=void 0;if(f=e.split("#"),e=f.shift(),f=e.split("?"),e=f.shift(),f=e.split("://"),f.length>1){if(r=f.shift(),t.require_valid_protocol&&t.protocols.indexOf(r)===-1)return!1}else{if(t.require_protocol)return!1;t.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(f[0]=e.substr(2))}if(e=f.join("://"),f=e.split("/"),e=f.shift(),""===e&&!t.require_host)return!0;if(f=e.split("@"),f.length>1&&(i=f.shift(),i.indexOf(":")>=0&&i.split(":").length>2))return!1;a=f.join("@"),c=h=null;var g=a.match(m);return g?(o="",h=g[1],c=g[2]||null):(f=a.split(":"),o=f.shift(),f.length&&(c=f.join(":"))),!(null!==c&&(u=parseInt(c,10),!/^[0-9]+$/.test(c)||u<=0||u>65535))&&(!!((0,d.default)(o)||(0,l.default)(o,t)||h&&(0,d.default)(h,6)||"localhost"===o)&&(o=o||h,!(t.host_whitelist&&!n(o,t.host_whitelist))&&(!t.host_blacklist||!n(o,t.host_blacklist))))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=f,s=r(a),u=x,l=r(u),c=L,d=r(c),h=y,p=r(h),v={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},m=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default}),G=e(U),I=function(e,t){void 0===t&&(t=[!0]);var r=t[0];return G(e,{require_protocol:!!r})},Z={alpha_dash:a,alpha_num:s,alpha_spaces:u,alpha:o,between:l,confirmed:c,credit_card:p,decimal:v,digits:m,dimensions:_,email:w,ext:E,image:j,in:A,ip:S,max:T,max_value:N,mimes:k,min:M,min_value:D,not_in:q,numeric:V,regex:z,required:C,size:P,url:I},Y=function(){this.errors=[]};Y.prototype.add=function(e,t,r,i){void 0===i&&(i="__global__"),this.errors.push({field:e,msg:t,rule:r,scope:i})},Y.prototype.all=function(e){return e||(e="__global__"),this.errors.filter(function(t){return t.scope===e}).map(function(e){return e.msg})},Y.prototype.any=function(e){return e||(e="__global__"),!!this.errors.filter(function(t){return t.scope===e}).length},Y.prototype.clear=function(e){e||(e="__global__"),this.errors=this.errors.filter(function(t){return t.scope!==e})},Y.prototype.collect=function(e,t,r){if(void 0===r&&(r=!0),!e){var i={};return this.errors.forEach(function(e){i[e.field]||(i[e.field]=[]),i[e.field].push(r?e.msg:e)}),i}return t?this.errors.filter(function(r){return r.field===e&&r.scope===t}).map(function(e){return r?e.msg:e}):this.errors.filter(function(t){return t.field===e&&"__global__"===t.scope}).map(function(e){return r?e.msg:e})},Y.prototype.count=function(){return this.errors.length},Y.prototype.first=function(e,t){var r=this;void 0===t&&(t="__global__");var i=this._selector(e),n=this._scope(e);if(n)return this.first(n.name,n.scope);if(i)return this.firstByRule(i.name,i.rule,t);for(var o=0;o<this.errors.length;o++)if(r.errors[o].field===e&&r.errors[o].scope===t)return r.errors[o].msg;return null},Y.prototype.firstRule=function(e,t){var r=this.collect(e,t,!1);return r.length&&r[0].rule||null},Y.prototype.has=function(e,t){return void 0===t&&(t="__global__"),!!this.first(e,t)},Y.prototype.firstByRule=function(e,t,r){var i=this.collect(e,r,!1).filter(function(e){return e.rule===t})[0];return i&&i.msg||null},Y.prototype.remove=function(e,t){return t?void(this.errors=this.errors.filter(function(r){return r.field!==e||r.scope!==t})):void(this.errors=this.errors.filter(function(t){return t.field!==e&&"__global__"===t.scope}))},Y.prototype._selector=function(e){if(e.indexOf(":")>-1){var t=e.split(":"),r=t[0],i=t[1];return{name:r,rule:i}}return null},Y.prototype._scope=function(e){if(e.indexOf(".")>-1){var t=e.split("."),r=t[0],i=t[1];return{name:i,scope:r}}return null};var J=function(){function e(e){this.msg="[vee-validate]: "+e}return e.prototype.toString=function(){return this.msg},e}(),K=function(e,t){return e.getAttribute("data-vv-"+t)},H=function(e){var t=K(e,"scope");return!t&&e.form&&(t=K(e.form,"scope")),t},Q=function(e,t,r){void 0===t&&(t=0);var i;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];var a=function(){i=null,r||e.apply(void 0,n)},s=r&&!i;clearTimeout(i),i=setTimeout(a,t),s&&e(n)}},W=function(e){console&&console.warn("[vee-validate]: "+e)},X=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)},ee=function(e){return"function"==typeof e},te=function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},re=function(e,t){e.classList?e.classList.add(t):te(e,t)||(e.className+=" "+t)},ie=function(e,t){if(e.classList)e.classList.remove(t);else if(te(e,t)){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(r," ")}},ne=function(e){if(Array.from)return Array.from(e);for(var t=[],r=e.length,i=0;i<r;i++)t.push(e[i]);return t},oe=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(Object.assign)return Object.assign.apply(Object,[e].concat(t));if(null==e)throw new TypeError("Cannot convert undefined or null to object");var i=Object(e);return t.forEach(function(e){null!=e&&Object.keys(e).forEach(function(t){i[t]=e[t]})}),i},ae=function(e){void 0===e&&(e={}),this.dictionary={},this.merge(e)};ae.prototype.hasLocale=function(e){return!!this.dictionary[e]},ae.prototype.getMessage=function(e,t,r){return void 0===r&&(r=""),this.hasMessage(e,t)?this.dictionary[e].messages[t]:r},ae.prototype.getAttribute=function(e,t,r){return void 0===r&&(r=""),this.hasAttribute(e,t)?this.dictionary[e].attributes[t]:r},ae.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].messages&&this.dictionary[e].messages[t])},ae.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].attributes&&this.dictionary[e].attributes[t])},ae.prototype.merge=function(e){this._merge(this.dictionary,e)},ae.prototype.setMessage=function(e,t,r){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].messages[t]=r},ae.prototype.setAttribute=function(e,t,r){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].attributes[t]=r},ae.prototype._merge=function(e,t){var r=this;return X(e)&&X(t)?(Object.keys(t).forEach(function(i){if(X(t[i])){if(!e[i]){oe(e,(n={},n[i]={},n));var n}return void r._merge(e[i],t[i])}oe(e,(o={},o[i]=t[i],o));var o}),e):e};var se={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."},between:function(e,t){var r=t[0],i=t[1];return"The "+e+" field must be between "+r+" and "+i+"."},confirmed:function(e){return"The "+e+" confirmation does not match."},credit_card:function(e){return"The "+e+" field is invalid."},decimal:function(e,t){void 0===t&&(t=["*"]);var r=t[0];return"The "+e+" field must be numeric and may contain "+("*"===r?"":r)+" decimal points."},digits:function(e,t){var r=t[0];return"The "+e+" field must be numeric and exactly contain "+r+" digits."},dimensions:function(e,t){var r=t[0],i=t[1];return"The "+e+" field must be "+r+" pixels by "+i+" 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."},ip:function(e){return"The "+e+" field must be a valid ip address."},max:function(e,t){var r=t[0];return"The "+e+" field may not be greater than "+r+" characters."},max_value:function(e,t){var r=t[0];return"The "+e+" field must be "+r+" or less."},mimes:function(e){return"The "+e+" field must have a valid file type."},min:function(e,t){var r=t[0];return"The "+e+" field must be at least "+r+" characters."},min_value:function(e,t){var r=t[0];return"The "+e+" field must be "+r+" 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){var r=t[0];return"The "+e+" field must be less than "+r+" KB."},url:function(e){return"The "+e+" field is not a valid URL."}},ue=function(e){return function(t,r){var i=r[0],n=r[1],o=e(t,n,!0),a=document.querySelector("input[name='"+i+"']");if(!o.isValid()||!a)return!1;var s=e(a.value,n,!0);return!!s.isValid()&&o.isAfter(s)}},le=function(e){return function(t,r){var i=r[0],n=r[1],o=e(t,n,!0),a=document.querySelector("input[name='"+i+"']");if(!o.isValid()||!a)return!1;var s=e(a.value,n,!0);return!!s.isValid()&&o.isBefore(s)}},ce=function(e){return function(t,r){var i=r[0];return e(t,i,!0).isValid()}},fe=function(e){return function(t,r){var i=r[0],n=r[1],o=r[2],a=e(i,o,!0),s=e(n,o,!0),u=e(t,o,!0);return!!(a.isValid()&&s.isValid()&&u.isValid())&&u.isBetween(a,s)}},de={after:function(e,t){var r=t[0];return"The "+e+" must be after "+r+"."},before:function(e,t){var r=t[0];return"The "+e+" must be before "+r+"."},date_between:function(e,t){var r=t[0],i=t[1];return"The "+e+" must be between "+r+" and "+i+"."},date_format:function(e,t){var r=t[0];return"The "+e+" must be in the format "+r+"."}},he={make:function(e){return{date_format:ce(e),after:ue(e),before:le(e),date_between:fe(e)}},messages:de,installed:!1},pe=function(){this.fields={}};pe.prototype._add=function(e){this.fields[e]={},this._setFlags(e,{dirty:!1,valid:!1},!0)},pe.prototype._remove=function(e){delete this.fields[e]},pe.prototype.reset=function(e){var t=this;return e?void this._setFlags(e,{dirty:!1,valid:!1},!0):void Object.keys(this.fields).forEach(function(e){t._setFlags(e,{dirty:!1,valid:!1},!0)})},pe.prototype._setFlags=function(e,t,r){var i=this;return void 0===r&&(r=!1),Object.keys(t).every(function(n){return i._setFlag(e,n,t[n],r)})},pe.prototype._setFlag=function(e,t,r,i){void 0===i&&(i=!1);var n="set"+t.charAt(0).toUpperCase()+t.slice(1);return"function"==typeof this[n]&&(this[n](e,r,i),!0)},pe.prototype.setDirty=function(e,t,r){void 0===r&&(r=!1),this.fields[e].dirty=t,this.fields[e].clean=r||!t,this.fields[e].passed=this.fields[e].valid&&t,this.fields[e].failed=!this.fields[e].valid&&t},pe.prototype.setValid=function(e,t){this.fields[e].valid=t,this.fields[e].passed=this.fields[e].dirty&&t,this.fields[e].failed=this.fields[e].dirty&&!t},pe.prototype._getFieldFlag=function(e,t){return!!this.fields[e]&&this.fields[e][t]},pe.prototype.dirty=function(e){var t=this;return e?this._getFieldFlag(e,"dirty"):Object.keys(this.fields).some(function(e){return t.fields[e].dirty})},pe.prototype.valid=function(e){var t=this;return e?this._getFieldFlag(e,"valid"):Object.keys(this.fields).every(function(e){return t.fields[e].valid})},pe.prototype.passed=function(e){var t=this;return e?this._getFieldFlag(e,"passed"):Object.keys(this.fields).every(function(e){return t.fields[e].passed})},pe.prototype.failed=function(e){var t=this;return e?this._getFieldFlag(e,"failed"):Object.keys(this.fields).some(function(e){return t.fields[e].failed})},pe.prototype.clean=function(e){return e?this._getFieldFlag(e,"clean"):!this.dirty()};var ve="en",me=!0,ge=new ae({en:{messages:se,attributes:{}}}),_e=function(e,t,r){void 0===r&&(r={init:!0}),this.strictMode=me,this.$scopes={__global__:{}},this.fieldBag=new pe,this._createFields(e),this.errorBag=new Y,this.$vm=t,this.$deferred=[],this.$ready=!1,"function"==typeof moment&&this.installDateTimeValidators(moment),r.init&&this.init()};_e._merge=function(e,t){return ee(t)?(Z[e]=t,void ge.setMessage("en",e,function(e){return"The "+e+" value is not valid."})):(Z[e]=t.validate,t.getMessage&&ee(t.getMessage)&&ge.setMessage("en",e,t.getMessage),void(t.messages&&ge.merge(Object.keys(t.messages).reduce(function(r,i){var n=r;n[i]={messages:(o={},o[e]=t.messages[i],o)};var o;return n},{}))))},_e._guardExtend=function(e,t){if(Z[e])throw new J("Extension Error: There is an existing validator with the same name '"+e+"'.");if(!ee(t)){if(!ee(t.validate))throw new J("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.");if(!ee(t.getMessage)&&!X(t.messages))throw new J("Extension Error: The validator '"+e+"' must have a 'getMessage' method or have a 'messages' object.")}},_e.create=function(e,t,r){return new _e(e,t,r)},_e.extend=function(e,t){_e._guardExtend(e,t),_e._merge(e,t)},_e.installDateTimeValidators=function(e){if("function"!=typeof e)return W("To use the date-time validators you must provide moment reference."),!1;if(he.installed)return!0;var t=he.make(e);return Object.keys(t).forEach(function(e){_e.extend(e,t[e])}),_e.updateDictionary({en:{messages:he.messages}}),he.installed=!0,!0},_e.remove=function(e){delete Z[e]},_e.setLocale=function(e){void 0===e&&(e="en"),ge.hasLocale(e)||W("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),ve=e},_e.setStrictMode=function(e){void 0===e&&(e=!0),me=e},_e.updateDictionary=function(e){ge.merge(e)},_e.prototype._resolveScope=function(e){if("string"==typeof e)return e;if(ee(e)){var t=e();return"string"==typeof t?t:"__global__"}return"__global__"},_e.prototype._resolveValuesFromGetters=function(e){var t=this;if(void 0===e&&(e="__global__"),!this.$scopes[e])return{};var r={};return Object.keys(this.$scopes[e]).forEach(function(i){var n=t.$scopes[e][i],o=n.getter,a=n.context,s=t._resolveScope(n.scope);o&&a&&("__global__"===e||s===e)&&(r[i]={value:o(a()),scope:s})}),r},_e.prototype._createFields=function(e){var t=this;e&&Object.keys(e).forEach(function(r){t._createField(r,e[r])})},_e.prototype._createField=function(e,t,r){void 0===r&&(r="__global__"),r=this._resolveScope(r),this.$scopes[r]||(this.$scopes[r]={}),this.$scopes[r][e]||(this.$scopes[r][e]={});var i=this.$scopes[r][e];this.fieldBag._add(e),i.validations=this._normalizeRules(e,t,r),i.required=this._isRequired(i)},_e.prototype._normalizeRules=function(e,t,r){return t?"string"==typeof t?this._normalizeString(t):X(t)?this._normalizeObject(t):(W("Your checks for '"+r+"."+e+"' must be either a string or an object."),{}):{}},_e.prototype._isRequired=function(e){return e.validations&&e.validations.required},_e.prototype._normalizeObject=function(e){var t=this,r={};return Object.keys(e).forEach(function(i){var n=[];n=e[i]===!0?[]:Array.isArray(e[i])?e[i]:[e[i]],e[i]===!1?delete r[i]:r[i]=n,he.installed&&t._isADateRule(i)&&r[i].push(t._getDateFormat(r))}),r},_e.prototype._getDateFormat=function(e){return e.date_format&&Array.isArray(e.date_format)?e.date_format[0]:null},_e.prototype._isADateRule=function(e){return!!~["after","before","date_between"].indexOf(e)},_e.prototype._normalizeString=function(e){var t=this,r={};return e.split("|").forEach(function(e){var i=t._parseRule(e);i.name&&("required"===i.name&&(r.required=!0),r[i.name]=i.params,he.installed&&t._isADateRule(i.name)&&r[i.name].push(t._getDateFormat(r)))}),r},_e.prototype._parseRule=function(e){var t=[],r=e.split(":")[0];return~e.indexOf(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:r,params:t}},_e.prototype._formatErrorMessage=function(e,t,r,i){void 0===r&&(r={}),void 0===i&&(i="__global__");var n=this._getFieldDisplayName(e,i),o=this._getLocalizedParams(t);return ge.hasLocale(ve)&&"function"==typeof ge.getMessage(ve,t.name)?ge.getMessage(ve,t.name)(n,o,r):ge.getMessage("en",t.name)(n,o,r)},_e.prototype._getLocalizedParams=function(e){return~["after","before","confirmed"].indexOf(e.name)&&e.params&&e.params[0]?[ge.getAttribute(ve,e.params[0],e.params[0])]:e.params},_e.prototype._getFieldDisplayName=function(e,t){return void 0===t&&(t="__global__"),this.$scopes[t][e].name||ge.getAttribute(ve,e,e)},_e.prototype._test=function(e,t,r,i){var n=this;void 0===i&&(i="__global__");var o=Z[r.name];if(!o||"function"!=typeof o)throw new J("No such validator '"+r.name+"' exists.");var a=o(t,r.params,e);return ee(a.then)?a.then(function(t){var o=!0,a={};return Array.isArray(t)?o=t.every(function(e){return e.valid}):(o=t.valid,a=t.data),o||n.errorBag.add(e,n._formatErrorMessage(e,r,a,i),r.name,i),o}):(X(a)||(a={valid:a,data:{}}),a.valid||this.errorBag.add(e,this._formatErrorMessage(e,r,a.data,i),r.name,i),a.valid)},_e.prototype.attach=function e(t,r,i){var n=this;void 0===i&&(i={});var e=function(){i.scope=n._resolveScope(i.scope),n.updateField(t,r,i);var e=n.$scopes[i.scope][t];e.scope=i.scope,e.name=i.prettyName,e.getter=i.getter,e.context=i.context,e.listeners=i.listeners||{detach:function(){}}},o=ee(i.scope)?i.scope():i.scope;return o||this.$ready?void e():void this.$deferred.push(e)},_e.prototype.init=function(){return this.$ready=!0,this.$deferred.forEach(function(e){e()}),this.$deferred=[],this},_e.prototype.append=function(e,t,r){void 0===r&&(r={}),r.scope=this._resolveScope(r.scope),this.$scopes[r.scope]&&this.$scopes[r.scope][e]||this.attach(e,t,r);var i=this.$scopes[r.scope][e],n=this._normalizeRules(e,t,r.scope);Object.keys(n).forEach(function(e){i.validations[e]=n[e]})},_e.prototype.updateField=function(e,t,r){void 0===r&&(r={});var i=this.$scopes[r.scope]&&this.$scopes[r.scope][e]||null,n=i?JSON.stringify(i.validations):"";this._createField(e,t,r.scope),i=this.$scopes[r.scope]&&this.$scopes[r.scope][e]||null;var o=i?JSON.stringify(i.validations):"";o!==n&&this.errorBag.remove(e,r.scope)},_e.prototype.detach=function(e,t){void 0===t&&(t="__global__"),this.$scopes[t]&&this.$scopes[t][e]&&(this.$scopes[t][e].listeners.detach(),this.errorBag.remove(e,t),this.fieldBag._remove(e),delete this.$scopes[t][e])},_e.prototype.extend=function(e,t){_e.extend(e,t)},_e.prototype.getErrors=function(){return this.errorBag},_e.prototype.getLocale=function(){return ve},_e.prototype.installDateTimeValidators=function(e){_e.installDateTimeValidators(e)},_e.prototype.remove=function(e){_e.remove(e)},_e.prototype.setLocale=function(e){ge.hasLocale(e)||W("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),ve=e},_e.prototype.setStrictMode=function(e){void 0===e&&(e=!0),this.strictMode=e},_e.prototype.updateDictionary=function(e){_e.updateDictionary(e)},_e.prototype.addScope=function(e){e&&!this.$scopes[e]&&(this.$scopes[e]={})},_e.prototype.validate=function(e,t,r){var i=this;if(void 0===r&&(r="__global__"),e&&e.indexOf(".")>-1){var n;n=e.split("."),r=n[0],e=n[1]}if(r||(r="__global__"),!this.$scopes[r]||!this.$scopes[r][e]){if(!this.strictMode)return!0;var o="__global__"===r?e:r+"."+e;return W('Validating a non-existant field: "'+o+'". Use "attach()" first.'),!1}var a=this.$scopes[r][e];if(this.errorBag.remove(e,r),!a.required&&~[null,void 0,""].indexOf(t))return this.fieldBag._setFlags(e,{valid:!0,dirty:!0}),!0;var s=!0,u=[];return Object.keys(a.validations).forEach(function(n){var o=i._test(e,t,{name:n,params:a.validations[n]},r);return ee(o.then)?void u.push(o):void(s=s&&o)}),u.length?Promise.all(u).then(function(t){var r=t.every(function(e){return e})&&s;return i.fieldBag._setFlags(e,{valid:r,dirty:!0}),r}):(this.fieldBag._setFlags(e,{valid:s,dirty:!0}),s)},_e.prototype.validateAll=function(e){var t,r=this;e&&"string"!=typeof e?(t={},Object.keys(e).forEach(function(r){t[r]={value:e[r]}})):(this.errorBag.clear(e),t=this._resolveValuesFromGetters(e));var i=!0,n=[];return Object.keys(t).forEach(function(e){var o=r.validate(e,t[e].value,t[e].scope);return ee(o.then)?void n.push(o):void(i=i&&o)}),Promise.all(n).then(function(e){var t=e.every(function(e){return e})&&i;if(!t)throw new J("Validation Failed");return t})},_e.prototype.validateScopes=function(){var e=this;return Promise.all(Object.keys(this.$scopes).map(function(t){return e.validateAll(t)}))};var ye=[],be=function(e){for(var t=0;t<ye.length;t++)if(ye[t].$vm===e)return ye[t].$validator},xe=function(e){var t=be(e);return t||(t=_e.create(void 0,e,{init:!1}),ye.push({$vm:e,$validator:t})),t},Fe=function(e){for(var t=0;t<ye.length;t++)if(ye[t].$vm===e)return ye.splice(t,1),!0;return!1},$e=function(e){return{data:function(){return t={},t[e.errorBagName]=this.$validator.errorBag,t;var t},computed:(t={},t[e.fieldsBagName]={get:function(){return this.$validator.fieldBag}},t),mounted:function(){this.$validator.init()},destroyed:function(){Fe(this)}};var t},we=function(e,t,r,i){this.unwatch=void 0,this.callbacks=[],this.el=e,this.scope=X(t.value)?t.value.scope:H(e),this.binding=t,this.vm=r.context,this.component=r.child,this.options=i,this.fieldName=this._resolveFieldName(),r.data&&r.data.directives&&(this.model=this._resolveModel(r.data.directives))};we.prototype._resolveModel=function(e){var t=null;return e.some(function(e){return"model"===e.name&&(t=e.expression,!0)}),t},we.prototype._resolveFieldName=function(){return this.component?K(this.el,"name")||this.component.name:this.el.name||K(this.el,"name")},we.prototype._hasFieldDependency=function(e){var t=this,r=!1;return!!e&&(X(e)?(Object.keys(e).forEach(function(t){if(/confirmed|after|before/.test(t))return r=e[t],!1}),r):(e.split("|").every(function(e){return/\b(confirmed|after|before):/.test(e)?(r=e.split(":")[1],!1):!/\b(confirmed)/.test(e)||(r=t.fieldName+"_confirmation",!1)}),r))},we.prototype._inputListener=function(){this._validate(this.el.value)},we.prototype._fileListener=function(){var e=this._validate(ne(this.el.files));!e&&this.binding.modifiers.reject&&(this.el.value="")},we.prototype._radioListener=function(){var e=document.querySelector('input[name="'+this.el.name+'"]:checked');this._validate(e?e.value:null)},we.prototype._checkboxListener=function(){var e=this,t=document.querySelectorAll('input[name="'+this.el.name+'"]:checked');return t&&t.length?void ne(t).forEach(function(t){e._validate(t.value)}):void this._validate(null)},we.prototype._validate=function(e){return this.vm.$validator.validate(this.fieldName,e,this.scope||H(this.el))},we.prototype._getScopedListener=function(e){var t=this;return function(r){(!r||r===t.scope||r instanceof Event)&&e()}},we.prototype._getRules=function(){return this.binding.expression?X(this.binding.value)?this.binding.value.rules:this.binding.value:K(this.el,"rules")},we.prototype._attachValidatorEvent=function(){var e=this,t=this._getScopedListener(this._getSuitableListener().listener.bind(this)),r=this._hasFieldDependency(this._getRules());r&&this.vm.$nextTick(function(){var i=document.querySelector("input[name='"+r+"']");return i?(i.addEventListener("input",t),void e.callbacks.push({name:"input",listener:t,el:i})):void W("Cannot find target field, no additional listeners were attached.")})},we.prototype._getSuitableListener=function(){var e;if("SELECT"===this.el.tagName)return{names:["change","blur"],listener:this._inputListener};switch(this.el.type){case"file":e={names:["change"],listener:this._fileListener};break;case"radio":e={names:["change"],listener:this._radioListener};break;case"checkbox":e={names:["change"],listener:this._checkboxListener};break;default:e={names:["input","blur"],listener:this._inputListener}}var t=K(this.el,"validate-on");return t&&(e.names=t.split("|")),e},we.prototype._attachComponentListeners=function(){var e=this;this.componentListener=Q(function(t){e._validate(t)},K(this.el,"delay")||this.options.delay),this.component.$on("input",this.componentListener);
},we.prototype._attachFieldListeners=function(){var e=this;if(this.component)return void this._attachComponentListeners();var t=this._getSuitableListener(),r=Q(t.listener.bind(this),K(this.el,"delay")||this.options.delay);return~["radio","checkbox"].indexOf(this.el.type)?void this.vm.$nextTick(function(){var i=document.querySelectorAll('input[name="'+e.el.name+'"]');ne(i).forEach(function(i){t.names.forEach(function(t){i.addEventListener(t,r),e.callbacks.push({name:t,listener:r,el:i})})})}):void t.names.forEach(function(t){e.el.addEventListener(t,r),e.callbacks.push({name:t,listener:r,el:e.el})})},we.prototype._resolveValueGetter=function(){var e=this;if(this.component)return{context:function(){return e.component},getter:function(e){return e[K(e.$el,"value-path")]||e.value}};switch(this.el.type){case"checkbox":return{context:function(){return document.querySelectorAll('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.length?ne(e).map(function(e){return e.value}):null}};case"radio":return{context:function(){return document.querySelector('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.value}};case"file":return{context:function(){return e.el},getter:function(e){return ne(e.files)}};default:return{context:function(){return e.el},getter:function(e){return e.value}}}},we.prototype._getArg=function(){return this.model?this.model:this.binding.arg?this.binding.arg:X(this.binding.value)?this.binding.value.arg:null},we.prototype.attach=function(){var e=this,t=this._resolveValueGetter(),r=t.context,i=t.getter;this.vm.$validator.attach(this.fieldName,this._getRules(),{scope:function(){return e.scope||H(e.el)},prettyName:K(this.el,"as"),context:r,getter:i,listeners:this}),this._attachValidatorEvent();var n=this._getArg();return n?void(this.unwatch=this.vm.$watch(n,function(t){e.vm.$validator.validate(e.fieldName,t,e.scope||H(e.el))},{deep:!0})):void this._attachFieldListeners()},we.prototype.detach=function(){this.component&&this.component.$off("input",this.componentListener),this.unwatch&&this.unwatch(),this.callbacks.forEach(function(e){e.el.removeEventListener(e.name,e.listener)})};var Ee=[],je={touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"},Ae=function(e){return{bind:function(t,o,a){var s=new we(t,o,a,e);if(s.attach(),Ee.push({vm:a.context,el:t,instance:s}),e.enableAutoClasses){var u=e.classNames;n(t,u),t.onfocus=function(){i(t,u)},r(t,s.fieldName,a.context[e.fieldsBagName],u)}},update:function(t,i,n){var o=i.expression,a=i.value,s=i.oldValue,u=n.context,l=Ee.filter(function(e){return e.vm===u&&e.el===t})[0];if(e.enableAutoClasses&&r(t,l.instance.fieldName,u[e.fieldsBagName],e.classNames),o&&("string"!=typeof a||"string"!=typeof s||a!==s)){var c=X(a)?a.scope||H(t):H(t);u.$validator.updateField(l.instance.fieldName,X(a)?a.rules:a,{scope:c||"__global__"})}},unbind:function(e,t,r){var i=t.value,n=r.context,o=Ee.filter(function(t){return t.vm===n&&t.el===e})[0];if("undefined"!=typeof o){var a=X(i)?i.scope:H(e);n.$validator.detach(o.instance.fieldName,a),Ee.splice(Ee.indexOf(o),1)}}}},Le=function(e,t){void 0===t&&(t={});var r=t.locale;void 0===r&&(r="en");var i=t.delay;void 0===i&&(i=0);var n=t.errorBagName;void 0===n&&(n="errors");var o=t.dictionary;void 0===o&&(o=null);var a=t.strict;void 0===a&&(a=!0);var s=t.fieldsBagName;void 0===s&&(s="fields");var u=t.enableAutoClasses;void 0===u&&(u=!1);var l=t.classNames;void 0===l&&(l=null),o&&_e.updateDictionary(o),_e.setLocale(r),_e.setStrictMode(a);var c={locale:r,delay:i,dictionary:o,errorBagName:n,fieldsBagName:s,enableAutoClasses:u,classNames:l};Object.defineProperties(e.prototype,{$validator:{get:function(){return xe(this)}}}),e.mixin($e(c)),e.directive("validate",Ae(c))},Oe={install:Le,Validator:_e,ErrorBag:Y,version:"2.0.0-beta.22"};return Oe});
!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){return e&&e.__esModule?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function r(e,t,r){t&&(t.dirty?(re(e,r.touched),ie(e,r.untouched)):(re(e,r.untouched),ie(e,r.touched)),t.valid||t.passed?(re(e,r.valid),ie(e,r.invalid)):(re(e,r.invalid),ie(e,r.valid)))}function i(e,t){re(e,t.dirty),ie(e,t.pristine)}function n(e,t){re(e,t.pristine),ie(e,t.dirty)}var o=function(e){return/^[a-zA-Z]*$/.test(e)},a=function(e){return/^[a-zA-Z0-9_-]*$/.test(e)},s=function(e){return/^[a-zA-Z0-9]*$/.test(e)},u=function(e){return/^[a-zA-Z\s]*$/.test(e)},l=function(e,t){var r=t[0],i=t[1];return Number(r)<=e&&Number(i)>=e},c=function(e,t,r){var i=t[0],n=i?document.querySelector("input[name='"+i+"']"):document.querySelector("input[name='"+r+"_confirmation']");return!(!n||String(e)!==n.value)},f=t(function(e,t){function r(e){if("string"!=typeof e)throw new TypeError("This library (validator.js) validates strings only")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default}),d=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){(0,o.default)(e);var t=e.replace(/[^0-9]+/g,"");if(!a.test(t))return!1;for(var r=0,i=void 0,n=void 0,s=void 0,u=t.length-1;u>=0;u--)i=t.substring(u,u+1),n=parseInt(i,10),s?(n*=2,r+=n>=10?n%10+1:n):r+=n,s=!s;return!(r%10!==0||!t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=f,o=r(n),a=/^(?: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}),h=e(d),p=function(e){return h(String(e))},v=function(e,t){var r=Array.isArray(t)?t[0]||"*":"*";if(Array.isArray(e))return!1;if(null===e||void 0===e||""===e)return!0;if(0===Number(r))return/^-?\d*$/.test(e);var i="*"===r?"+":"{1,"+r+"}",n=new RegExp("^-?\\d*(\\.\\d"+i+")?$");if(!n.test(e))return!1;var o=parseFloat(e);return o===o},m=function(e,t){var r=t[0],i=String(e);return/^[0-9]*$/.test(i)&&i.length===Number(r)},_=function(e,t,r){var i=window.URL||window.webkitURL;return new Promise(function(n){var o=new Image;o.onerror=function(){return n({valid:!1})},o.onload=function(){return n({valid:o.width===Number(t)&&o.height===Number(r)})},o.src=i.createObjectURL(e)})},g=function(e,t){for(var r=t[0],i=t[1],n=[],o=0;o<e.length;o++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e[o].name))return!1;n.push(e[o])}return Promise.all(n.map(function(e){return _(e,r,i)}))},y=t(function(e,t){function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var r in t)"undefined"==typeof e[r]&&(e[r]=t[r]);return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default}),b=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){(0,a.default)(e);var r=void 0,i=void 0;"object"===("undefined"==typeof t?"undefined":n(t))?(r=t.min||0,i=t.max):(r=arguments[1],i=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=r&&("undefined"==typeof i||o<=i)}Object.defineProperty(t,"__esModule",{value:!0});var n="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=i;var o=f,a=r(o);e.exports=t.default}),x=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){(0,o.default)(e),t=(0,s.default)(t,u),t.allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var r=e.split(".");if(t.require_tld){var i=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(i))return!1}for(var n,a=0;a<r.length;a++){if(n=r[a],t.allow_underscores&&(n=n.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(n))return!1;if(/[\uff01-\uff5e]/.test(n))return!1;if("-"===n[0]||"-"===n[n.length-1])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=f,o=r(n),a=y,s=r(a),u={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};e.exports=t.default}),F=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if((0,o.default)(e),t=(0,s.default)(t,h),t.allow_display_name){var r=e.match(p);r&&(e=r[1])}var i=e.split("@"),n=i.pop(),a=i.join("@"),u=n.toLowerCase();if("gmail.com"!==u&&"googlemail.com"!==u||(a=a.replace(/\./g,"").toLowerCase()),!(0,l.default)(a,{max:64})||!(0,l.default)(n,{max:256}))return!1;if(!(0,d.default)(n,{require_tld:t.require_tld}))return!1;if('"'===a[0])return a=a.slice(1,a.length-1),t.allow_utf8_local_part?g.test(a):m.test(a);for(var c=t.allow_utf8_local_part?_:v,f=a.split("."),y=0;y<f.length;y++)if(!c.test(f[y]))return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=f,o=r(n),a=y,s=r(a),u=b,l=r(u),c=x,d=r(c),h={allow_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},p=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,v=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,m=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,_=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,g=/^([\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}),$=e(F),w=function(e){return $(String(e))},E=function(e,t){var r=new RegExp(".("+t.join("|")+")$","i");return e.every(function(e){return r.test(e.name)})},j=function(e){return e.every(function(e){return/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e.name)})},L=function(e,t){return!!t.filter(function(t){return t==e}).length},A=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,o.default)(e),t=String(t),!t)return i(e,4)||i(e,6);if("4"===t){if(!a.test(e))return!1;var r=e.split(".").sort(function(e,t){return e-t});return r[3]<=255}if("6"===t){var n=e.split(":"),u=!1,l=i(n[n.length-1],4),c=l?7:8;if(n.length>c)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(n.shift(),n.shift(),u=!0):"::"===e.substr(e.length-2)&&(n.pop(),n.pop(),u=!0);for(var f=0;f<n.length;++f)if(""===n[f]&&f>0&&f<n.length-1){if(u)return!1;u=!0}else if(l&&f===n.length-1);else if(!s.test(n[f]))return!1;return u?n.length>=1:n.length===c}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=f,o=r(n),a=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,s=/^[0-9A-F]{1,4}$/i;e.exports=t.default}),O=e(A),N=function(e,t){void 0===t&&(t=[4]);var r=t[0];return O(e,r)},S=function(e,t){var r=t[0];return void 0===e||null===e?r>=0:String(e).length<=r},T=function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)<=r},k=function(e,t){var r=new RegExp(t.join("|").replace("*",".+")+"$","i");return e.every(function(e){return r.test(e.type)})},M=function(e,t){var r=t[0];return void 0!==e&&null!==e&&String(e).length>=r},D=function(e,t){var r=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)>=r},B=function(e,t){return!t.filter(function(t){return t==e}).length},q=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,o.default)(e),a.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=f,o=r(n),a=/^[-+]?[0-9]+$/;e.exports=t.default}),R=e(q),z=function(e){return R(String(e))},V=function(e,t){var r=t[0],i=t.slice(1);return r instanceof RegExp?r.test(e):new RegExp(r,i).test(String(e))},P=function(e){return Array.isArray(e)?!!e.length:void 0!==e&&null!==e&&!!String(e).trim().length},C=function(e,t){var r=t[0];if(isNaN(r))return!1;for(var i=1024*Number(r),n=0;n<e.length;n++)if(e[n].size>i)return!1;return!0},U=t(function(e,t){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(e===n||i(n)&&n.test(e))return!0}return!1}function o(e,t){if((0,s.default)(e),!e||e.length>=2083||/\s/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,p.default)(t,v);var r=void 0,i=void 0,o=void 0,a=void 0,u=void 0,c=void 0,f=void 0,h=void 0;if(f=e.split("#"),e=f.shift(),f=e.split("?"),e=f.shift(),f=e.split("://"),f.length>1){if(r=f.shift(),t.require_valid_protocol&&t.protocols.indexOf(r)===-1)return!1}else{if(t.require_protocol)return!1;t.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(f[0]=e.substr(2))}if(e=f.join("://"),f=e.split("/"),e=f.shift(),""===e&&!t.require_host)return!0;if(f=e.split("@"),f.length>1&&(i=f.shift(),i.indexOf(":")>=0&&i.split(":").length>2))return!1;a=f.join("@"),c=h=null;var _=a.match(m);return _?(o="",h=_[1],c=_[2]||null):(f=a.split(":"),o=f.shift(),f.length&&(c=f.join(":"))),!(null!==c&&(u=parseInt(c,10),!/^[0-9]+$/.test(c)||u<=0||u>65535))&&(!!((0,d.default)(o)||(0,l.default)(o,t)||h&&(0,d.default)(h,6)||"localhost"===o)&&(o=o||h,!(t.host_whitelist&&!n(o,t.host_whitelist))&&(!t.host_blacklist||!n(o,t.host_blacklist))))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=f,s=r(a),u=x,l=r(u),c=A,d=r(c),h=y,p=r(h),v={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},m=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default}),I=e(U),G=function(e,t){void 0===t&&(t=[!0]);var r=t[0];return I(e,{require_protocol:!!r})},Z={alpha_dash:a,alpha_num:s,alpha_spaces:u,alpha:o,between:l,confirmed:c,credit_card:p,decimal:v,digits:m,dimensions:g,email:w,ext:E,image:j,in:L,ip:N,max:S,max_value:T,mimes:k,min:M,min_value:D,not_in:B,numeric:z,regex:V,required:P,size:C,url:G},Y=function(){this.errors=[]};Y.prototype.add=function(e,t,r,i){void 0===i&&(i="__global__"),this.errors.push({field:e,msg:t,rule:r,scope:i})},Y.prototype.all=function(e){return e?this.errors.filter(function(t){return t.scope===e}).map(function(e){return e.msg}):this.errors.map(function(e){return e.msg})},Y.prototype.any=function(e){return e?!!this.errors.filter(function(t){return t.scope===e}).length:!!this.errors.length},Y.prototype.clear=function(e){e||(e="__global__"),this.errors=this.errors.filter(function(t){return t.scope!==e})},Y.prototype.collect=function(e,t,r){if(void 0===r&&(r=!0),!e){var i={};return this.errors.forEach(function(e){i[e.field]||(i[e.field]=[]),i[e.field].push(r?e.msg:e)}),i}return t?this.errors.filter(function(r){return r.field===e&&r.scope===t}).map(function(e){return r?e.msg:e}):this.errors.filter(function(t){return t.field===e&&"__global__"===t.scope}).map(function(e){return r?e.msg:e})},Y.prototype.count=function(){return this.errors.length},Y.prototype.first=function(e,t){var r=this;void 0===t&&(t="__global__");var i=this._selector(e),n=this._scope(e);if(n){var o=this.first(n.name,n.scope);if(o)return o}if(i)return this.firstByRule(i.name,i.rule,t);for(var a=0;a<this.errors.length;a++)if(r.errors[a].field===e&&r.errors[a].scope===t)return r.errors[a].msg;return null},Y.prototype.firstRule=function(e,t){var r=this.collect(e,t,!1);return r.length&&r[0].rule||null},Y.prototype.has=function(e,t){return void 0===t&&(t="__global__"),!!this.first(e,t)},Y.prototype.firstByRule=function(e,t,r){var i=this.collect(e,r,!1).filter(function(e){return e.rule===t})[0];return i&&i.msg||null},Y.prototype.remove=function(e,t){return t?void(this.errors=this.errors.filter(function(r){return r.field!==e||r.scope!==t})):void(this.errors=this.errors.filter(function(t){return t.field!==e&&"__global__"===t.scope}))},Y.prototype._selector=function(e){if(e.indexOf(":")>-1){var t=e.split(":"),r=t[0],i=t[1];return{name:r,rule:i}}return null},Y.prototype._scope=function(e){if(e.indexOf(".")>-1){var t=e.split("."),r=t[0],i=t[1];return{name:i,scope:r}}return null};var J=function(){function e(e){this.msg="[vee-validate]: "+e}return e.prototype.toString=function(){return this.msg},e}(),W=function(e,t){return e.getAttribute("data-vv-"+t)},K=function(e){var t=W(e,"scope");return!t&&e.form&&(t=W(e.form,"scope")),t},H=function(e,t,r){void 0===t&&(t=0);var i;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];var a=function(){i=null,r||e.apply(void 0,n)},s=r&&!i;clearTimeout(i),i=setTimeout(a,t),s&&e(n)}},Q=function(e){console&&console.warn("[vee-validate]: "+e)},X=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)},ee=function(e){return"function"==typeof e},te=function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},re=function(e,t){e.classList?e.classList.add(t):te(e,t)||(e.className+=" "+t)},ie=function(e,t){if(e.classList)e.classList.remove(t);else if(te(e,t)){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(r," ")}},ne=function(e){if(Array.from)return Array.from(e);for(var t=[],r=e.length,i=0;i<r;i++)t.push(e[i]);return t},oe=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(Object.assign)return Object.assign.apply(Object,[e].concat(t));if(null==e)throw new TypeError("Cannot convert undefined or null to object");var i=Object(e);return t.forEach(function(e){null!=e&&Object.keys(e).forEach(function(t){i[t]=e[t]})}),i},ae=function(e,t){if(e.find)return e.find(t);var r;return e.some(function(e){return!!t(e)&&(r=e,!0)}),r},se=function(e,t,r){return e?"string"==typeof t?t:X(t.rules)?t.rules:t:W(r,"rules")},ue=function(e){void 0===e&&(e={}),this.dictionary={},this.merge(e)};ue.prototype.hasLocale=function(e){return!!this.dictionary[e]},ue.prototype.getMessage=function(e,t,r){return void 0===r&&(r=""),this.hasMessage(e,t)?this.dictionary[e].messages[t]:r},ue.prototype.getAttribute=function(e,t,r){return void 0===r&&(r=""),this.hasAttribute(e,t)?this.dictionary[e].attributes[t]:r},ue.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].messages&&this.dictionary[e].messages[t])},ue.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].attributes&&this.dictionary[e].attributes[t])},ue.prototype.merge=function(e){this._merge(this.dictionary,e)},ue.prototype.setMessage=function(e,t,r){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].messages[t]=r},ue.prototype.setAttribute=function(e,t,r){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].attributes[t]=r},ue.prototype._merge=function(e,t){var r=this;return X(e)&&X(t)?(Object.keys(t).forEach(function(i){if(X(t[i])){if(!e[i]){oe(e,(n={},n[i]={},n));var n}return void r._merge(e[i],t[i])}oe(e,(o={},o[i]=t[i],o));var o}),e):e};var le={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."},between:function(e,t){var r=t[0],i=t[1];return"The "+e+" field must be between "+r+" and "+i+"."},confirmed:function(e){return"The "+e+" confirmation does not match."},credit_card:function(e){return"The "+e+" field is invalid."},decimal:function(e,t){void 0===t&&(t=["*"]);var r=t[0];return"The "+e+" field must be numeric and may contain "+("*"===r?"":r)+" decimal points."},digits:function(e,t){var r=t[0];return"The "+e+" field must be numeric and exactly contain "+r+" digits."},dimensions:function(e,t){var r=t[0],i=t[1];return"The "+e+" field must be "+r+" pixels by "+i+" 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."},ip:function(e){return"The "+e+" field must be a valid ip address."},max:function(e,t){var r=t[0];return"The "+e+" field may not be greater than "+r+" characters."},max_value:function(e,t){var r=t[0];return"The "+e+" field must be "+r+" or less."},mimes:function(e){return"The "+e+" field must have a valid file type."},min:function(e,t){var r=t[0];return"The "+e+" field must be at least "+r+" characters."},min_value:function(e,t){var r=t[0];return"The "+e+" field must be "+r+" 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){var r=t[0];return"The "+e+" field must be less than "+r+" KB."},url:function(e){return"The "+e+" field is not a valid URL."}},ce=function(e){return function(t,r){var i=r[0],n=r[1],o=e(t,n,!0),a=document.querySelector("input[name='"+i+"']");if(!o.isValid()||!a)return!1;var s=e(a.value,n,!0);return!!s.isValid()&&o.isAfter(s)}},fe=function(e){return function(t,r){var i=r[0],n=r[1],o=e(t,n,!0),a=document.querySelector("input[name='"+i+"']");if(!o.isValid()||!a)return!1;var s=e(a.value,n,!0);return!!s.isValid()&&o.isBefore(s)}},de=function(e){return function(t,r){var i=r[0];return e(t,i,!0).isValid()}},he=function(e){return function(t,r){var i=r[0],n=r[1],o=r[2],a=e(i,o,!0),s=e(n,o,!0),u=e(t,o,!0);return!!(a.isValid()&&s.isValid()&&u.isValid())&&u.isBetween(a,s)}},pe={after:function(e,t){var r=t[0];return"The "+e+" must be after "+r+"."},before:function(e,t){var r=t[0];return"The "+e+" must be before "+r+"."},date_between:function(e,t){var r=t[0],i=t[1];return"The "+e+" must be between "+r+" and "+i+"."},date_format:function(e,t){var r=t[0];return"The "+e+" must be in the format "+r+"."}},ve={make:function(e){return{date_format:de(e),after:ce(e),before:fe(e),date_between:he(e)}},messages:pe,installed:!1},me=function(){this.fields={}};me.prototype._add=function(e){this.fields[e]={},this._setFlags(e,{dirty:!1,valid:!1},!0)},me.prototype._addIfNotExists=function(e){this.fields[e]||this._add(e)},me.prototype._remove=function(e){delete this.fields[e]},me.prototype.reset=function(e){var t=this;return e?void this._setFlags(e,{dirty:!1,valid:!1},!0):void Object.keys(this.fields).forEach(function(e){t._setFlags(e,{dirty:!1,valid:!1},!0)})},me.prototype._setFlags=function(e,t,r){var i=this;return void 0===r&&(r=!1),Object.keys(t).every(function(n){return i._setFlag(e,n,t[n],r)})},me.prototype._setFlag=function(e,t,r,i){void 0===i&&(i=!1);var n="set"+t.charAt(0).toUpperCase()+t.slice(1);return"function"==typeof this[n]&&(this[n](e,r,i),!0)},me.prototype.setDirty=function(e,t,r){void 0===r&&(r=!1),this.fields[e].dirty=t,this.fields[e].clean=r||!t,this.fields[e].passed=this.fields[e].valid&&t,this.fields[e].failed=!this.fields[e].valid&&t},me.prototype.setValid=function(e,t){this.fields[e].valid=t,this.fields[e].passed=this.fields[e].dirty&&t,this.fields[e].failed=this.fields[e].dirty&&!t},me.prototype._getFieldFlag=function(e,t){return!!this.fields[e]&&this.fields[e][t]},me.prototype.dirty=function(e){var t=this;return e?this._getFieldFlag(e,"dirty"):Object.keys(this.fields).some(function(e){return t.fields[e].dirty})},me.prototype.valid=function(e){var t=this;return e?this._getFieldFlag(e,"valid"):Object.keys(this.fields).every(function(e){return t.fields[e].valid})},me.prototype.passed=function(e){var t=this;return e?this._getFieldFlag(e,"passed"):Object.keys(this.fields).every(function(e){return t.fields[e].passed})},me.prototype.failed=function(e){var t=this;return e?this._getFieldFlag(e,"failed"):Object.keys(this.fields).some(function(e){return t.fields[e].failed})},me.prototype.clean=function(e){return e?this._getFieldFlag(e,"clean"):!this.dirty()};var _e="en",ge=!0,ye=new ue({en:{messages:le,attributes:{}}}),be=function(e,t){void 0===t&&(t={init:!0}),this.strictMode=ge,this.$scopes={__global__:{}},this.fieldBag=new me,this._createFields(e),this.errorBag=new Y,this.$deferred=[],this.$ready=!1,"function"==typeof moment&&this.installDateTimeValidators(moment),t.init&&this.init()};be._merge=function(e,t){return ee(t)?(Z[e]=t,void ye.setMessage("en",e,function(e){return"The "+e+" value is not valid."})):(Z[e]=t.validate,t.getMessage&&ee(t.getMessage)&&ye.setMessage("en",e,t.getMessage),void(t.messages&&ye.merge(Object.keys(t.messages).reduce(function(r,i){var n=r;n[i]={messages:(o={},o[e]=t.messages[i],o)};var o;return n},{}))))},be._guardExtend=function(e,t){if(Z[e])throw new J("Extension Error: There is an existing validator with the same name '"+e+"'.");if(!ee(t)){if(!ee(t.validate))throw new J("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.");if(!ee(t.getMessage)&&!X(t.messages))throw new J("Extension Error: The validator '"+e+"' must have a 'getMessage' method or have a 'messages' object.")}},be.create=function(e,t,r){return new be(e,t,r)},be.extend=function(e,t){be._guardExtend(e,t),be._merge(e,t)},be.installDateTimeValidators=function(e){if("function"!=typeof e)return Q("To use the date-time validators you must provide moment reference."),!1;if(ve.installed)return!0;var t=ve.make(e);return Object.keys(t).forEach(function(e){be.extend(e,t[e])}),be.updateDictionary({en:{messages:ve.messages}}),ve.installed=!0,!0},be.remove=function(e){delete Z[e]},be.setLocale=function(e){void 0===e&&(e="en"),ye.hasLocale(e)||Q("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),_e=e},be.setStrictMode=function(e){void 0===e&&(e=!0),ge=e},be.updateDictionary=function(e){ye.merge(e)},be.prototype._resolveScope=function(e){if("string"==typeof e)return e;if(ee(e)){var t=e();return"string"==typeof t?t:"__global__"}return"__global__"},be.prototype._resolveValuesFromGetters=function(e){var t=this;if(void 0===e&&(e="__global__"),!this.$scopes[e])return{};var r={};return Object.keys(this.$scopes[e]).forEach(function(i){var n=t.$scopes[e][i],o=n.getter,a=n.context,s=t._resolveScope(n.scope);o&&a&&("__global__"===e||s===e)&&(r[i]={value:o(a()),scope:s})}),r},be.prototype._createFields=function(e){var t=this;e&&Object.keys(e).forEach(function(r){t._createField(r,e[r])})},be.prototype._createField=function(e,t,r){void 0===r&&(r="__global__"),r=this._resolveScope(r),this.$scopes[r]||(this.$scopes[r]={}),this.$scopes[r][e]||(this.$scopes[r][e]={});var i=this.$scopes[r][e];this.fieldBag._addIfNotExists(e),i.validations=this._normalizeRules(e,t,r),i.required=this._isRequired(i)},be.prototype._normalizeRules=function(e,t,r){return t?"string"==typeof t?this._normalizeString(t):X(t)?this._normalizeObject(t):(Q("Your checks for '"+r+"."+e+"' must be either a string or an object."),{}):{}},be.prototype._isRequired=function(e){return e.validations&&e.validations.required},be.prototype._normalizeObject=function(e){var t=this,r={};return Object.keys(e).forEach(function(i){var n=[];n=e[i]===!0?[]:Array.isArray(e[i])?e[i]:[e[i]],e[i]===!1?delete r[i]:r[i]=n,ve.installed&&t._isADateRule(i)&&r[i].push(t._getDateFormat(r))}),r},be.prototype._getDateFormat=function(e){return e.date_format&&Array.isArray(e.date_format)?e.date_format[0]:null},be.prototype._isADateRule=function(e){return!!~["after","before","date_between"].indexOf(e)},be.prototype._normalizeString=function(e){var t=this,r={};return e.split("|").forEach(function(e){var i=t._parseRule(e);i.name&&("required"===i.name&&(r.required=!0),r[i.name]=i.params,ve.installed&&t._isADateRule(i.name)&&r[i.name].push(t._getDateFormat(r)))}),r},be.prototype._parseRule=function(e){var t=[],r=e.split(":")[0];return~e.indexOf(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:r,params:t}},be.prototype._formatErrorMessage=function(e,t,r,i){void 0===r&&(r={}),void 0===i&&(i="__global__");var n=this._getFieldDisplayName(e,i),o=this._getLocalizedParams(t,i);return ye.hasLocale(_e)&&"function"==typeof ye.getMessage(_e,t.name)?ye.getMessage(_e,t.name)(n,o,r):ye.getMessage("en",t.name)(n,o,r)},be.prototype._getLocalizedParams=function(e,t){return void 0===t&&(t="__global__"),~["after","before","confirmed"].indexOf(e.name)&&e.params&&e.params[0]?this.$scopes[t][e.params[0]]?[this.$scopes[t][e.params[0]].name]:[ye.getAttribute(_e,e.params[0],e.params[0])]:e.params},be.prototype._getFieldDisplayName=function(e,t){return void 0===t&&(t="__global__"),this.$scopes[t][e].name||ye.getAttribute(_e,e,e)},be.prototype._test=function(e,t,r,i){var n=this;void 0===i&&(i="__global__");var o=Z[r.name];if(!o||"function"!=typeof o)throw new J("No such validator '"+r.name+"' exists.");var a=o(t,r.params,e);return ee(a.then)?a.then(function(t){var o=!0,a={};return Array.isArray(t)?o=t.every(function(e){return e.valid}):(o=t.valid,a=t.data),o||n.errorBag.add(e,n._formatErrorMessage(e,r,a,i),r.name,i),o}):(X(a)||(a={valid:a,data:{}}),a.valid||this.errorBag.add(e,this._formatErrorMessage(e,r,a.data,i),r.name,i),a.valid)},be.prototype.attach=function e(t,r,i){var n=this;void 0===i&&(i={});var e=function(){i.scope=n._resolveScope(i.scope),n.updateField(t,r,i);var e=n.$scopes[i.scope][t];e.scope=i.scope,e.name=i.prettyName,e.getter=i.getter,e.context=i.context,e.listeners=i.listeners||{detach:function(){}}},o=ee(i.scope)?i.scope():i.scope;return o||this.$ready?void e():void this.$deferred.push(e)},be.prototype.init=function(){return this.$ready=!0,this.$deferred.forEach(function(e){e()}),this.$deferred=[],this},be.prototype.append=function(e,t,r){void 0===r&&(r={}),r.scope=this._resolveScope(r.scope),this.$scopes[r.scope]&&this.$scopes[r.scope][e]||this.attach(e,t,r);var i=this.$scopes[r.scope][e],n=this._normalizeRules(e,t,r.scope);Object.keys(n).forEach(function(e){i.validations[e]=n[e]})},be.prototype.updateField=function(e,t,r){void 0===r&&(r={});var i=this.$scopes[r.scope]&&this.$scopes[r.scope][e]||null,n=i?JSON.stringify(i.validations):"";this._createField(e,t,r.scope),i=this.$scopes[r.scope]&&this.$scopes[r.scope][e]||null;var o=i?JSON.stringify(i.validations):"";o!==n&&this.errorBag.remove(e,r.scope)},be.prototype.detach=function(e,t){void 0===t&&(t="__global__"),this.$scopes[t]&&this.$scopes[t][e]&&(this.$scopes[t][e].listeners.detach(),this.errorBag.remove(e,t),this.fieldBag._remove(e),delete this.$scopes[t][e])},be.prototype.extend=function(e,t){be.extend(e,t)},be.prototype.getErrors=function(){return this.errorBag},be.prototype.getLocale=function(){return _e},be.prototype.installDateTimeValidators=function(e){be.installDateTimeValidators(e)},be.prototype.remove=function(e){be.remove(e)},be.prototype.setLocale=function(e){ye.hasLocale(e)||Q("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),_e=e},be.prototype.setStrictMode=function(e){void 0===e&&(e=!0),this.strictMode=e},be.prototype.updateDictionary=function(e){be.updateDictionary(e)},be.prototype.addScope=function(e){e&&!this.$scopes[e]&&(this.$scopes[e]={})},be.prototype.validate=function(e,t,r){var i=this;if(void 0===r&&(r="__global__"),e&&e.indexOf(".")>-1&&!this.$scopes.__global__[e]){var n;n=e.split("."),r=n[0],e=n[1]}if(r||(r="__global__"),!this.$scopes[r]||!this.$scopes[r][e]){if(!this.strictMode)return!0;var o="__global__"===r?e:r+"."+e;return Q('Validating a non-existant field: "'+o+'". Use "attach()" first.'),!1}var a=this.$scopes[r][e];if(this.errorBag.remove(e,r),!a.required&&~[null,void 0,""].indexOf(t))return this.fieldBag._setFlags(e,{valid:!0,dirty:!0}),!0;var s=[],u=Object.keys(a.validations).every(function(n){var o=i._test(e,t,{name:n,params:a.validations[n]},r);return ee(o.then)&&s.push(o),o});return s.length?Promise.all(s).then(function(t){var r=t.every(function(e){return e})&&u;return i.fieldBag._setFlags(e,{valid:r,dirty:!0}),r}):(this.fieldBag._setFlags(e,{valid:u,dirty:!0}),u)},be.prototype.validateAll=function(e){var t,r=this;e&&"string"!=typeof e?(t={},Object.keys(e).forEach(function(r){t[r]={value:e[r]}})):(this.errorBag.clear(e),t=this._resolveValuesFromGetters(e));var i=!0,n=[];return Object.keys(t).forEach(function(e){var o=r.validate(e,t[e].value,t[e].scope);return ee(o.then)?void n.push(o):void(i=i&&o)}),Promise.all(n).then(function(e){var t=e.every(function(e){return e})&&i;if(!t)throw new J("Validation Failed");return t})},be.prototype.validateScopes=function(){var e=this;return Promise.all(Object.keys(this.$scopes).map(function(t){return e.validateAll(t)}))};var xe=function(e,t){return{computed:(r={},r[t.errorBagName]={get:function(){return this.$validator.errorBag}},r[t.fieldsBagName]={get:function(){return this.$validator.fieldBag}},r),beforeCreate:function(){this.$validator=new be(null,{init:!1}),e.util.defineReactive(this.$validator,"errorBag",this.$validator.errorBag),e.util.defineReactive(this.$validator,"fieldBag",this.$validator.fieldBag)},mounted:function(){this.$validator.init()}};var r},Fe=function(e,t,r,i){this.unwatch=void 0,this.callbacks=[],this.el=e,this.scope=X(t.value)?t.value.scope:K(e),this.binding=t,this.vm=r.context,this.component=r.child,this.options=i,this.fieldName=this._resolveFieldName(),this.model=this._resolveModel(r.data.directives)};Fe.prototype._resolveModel=function(e){var t=/^[a-z_]+[0-9]*(\w*\.[a-z_]\w*)*$/i,r=ae(e,function(e){return"model"===e.name&&t.test(e.expression)});return r&&this._isExistingPath(r.expression)&&r.expression},Fe.prototype._isExistingPath=function(e){var t=this.vm;return e.split(".").every(function(e){return!!Object.prototype.hasOwnProperty.call(t,e)&&(t=t[e],!0)})},Fe.prototype._resolveFieldName=function(){return this.component?W(this.el,"name")||this.component.name:W(this.el,"name")||this.el.name},Fe.prototype._hasFieldDependency=function(e){var t=this,r=!1;return!!e&&(X(e)?(Object.keys(e).forEach(function(t){if(/confirmed|after|before/.test(t))return r=e[t],!1}),r):(e.split("|").every(function(e){return/\b(confirmed|after|before):/.test(e)?(r=e.split(":")[1],!1):!/\b(confirmed)/.test(e)||(r=t.fieldName+"_confirmation",!1)}),r))},Fe.prototype._inputListener=function(){this._validate(this.el.value)},Fe.prototype._fileListener=function(){var e=this._validate(ne(this.el.files));!e&&this.binding.modifiers.reject&&(this.el.value="")},Fe.prototype._radioListener=function(){var e=document.querySelector('input[name="'+this.el.name+'"]:checked');this._validate(e?e.value:null)},Fe.prototype._checkboxListener=function(){var e=this,t=document.querySelectorAll('input[name="'+this.el.name+'"]:checked');return t&&t.length?void ne(t).forEach(function(t){e._validate(t.value)}):void this._validate(null)},Fe.prototype._validate=function(e){return this.vm.$validator.validate(this.fieldName,e,this.scope||K(this.el))},Fe.prototype._getScopedListener=function(e){var t=this;return function(r){(!r||r===t.scope||r instanceof Event)&&e()}},Fe.prototype._attachValidatorEvent=function(){var e=this,t=this._getScopedListener(this._getSuitableListener().listener.bind(this)),r=this._hasFieldDependency(se(this.binding.expression,this.binding.value,this.el));r&&this.vm.$nextTick(function(){var i=document.querySelector("input[name='"+r+"']");return i?(i.addEventListener("input",t),void e.callbacks.push({name:"input",listener:t,el:i})):void Q("Cannot find target field, no additional listeners were attached.")})},Fe.prototype._getSuitableListener=function(){var e;if("SELECT"===this.el.tagName)return{names:["change","blur"],listener:this._inputListener};switch(this.el.type){case"file":e={names:["change"],listener:this._fileListener};break;case"radio":e={names:["change"],listener:this._radioListener};break;case"checkbox":e={names:["change"],listener:this._checkboxListener};break;default:e={
names:["input","blur"],listener:this._inputListener}}var t=W(this.el,"validate-on");return t&&(e.names=t.split("|")),e},Fe.prototype._attachComponentListeners=function(){var e=this;this.componentListener=H(function(t){e._validate(t)},W(this.el,"delay")||this.options.delay),this.component.$on("input",this.componentListener)},Fe.prototype._attachFieldListeners=function(){var e=this;if(this.component)return void this._attachComponentListeners();var t=this._getSuitableListener(),r=H(t.listener.bind(this),W(this.el,"delay")||this.options.delay);return~["radio","checkbox"].indexOf(this.el.type)?void this.vm.$nextTick(function(){var i=document.querySelectorAll('input[name="'+e.el.name+'"]');ne(i).forEach(function(i){t.names.forEach(function(t){i.addEventListener(t,r),e.callbacks.push({name:t,listener:r,el:i})})})}):void t.names.forEach(function(t){e.el.addEventListener(t,r),e.callbacks.push({name:t,listener:r,el:e.el})})},Fe.prototype._resolveValueGetter=function(){var e=this;if(this.component)return{context:function(){return e.component},getter:function(e){return e[W(e.$el,"value-path")]||e.value}};switch(this.el.type){case"checkbox":return{context:function(){return document.querySelectorAll('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.length?ne(e).map(function(e){return e.value}):null}};case"radio":return{context:function(){return document.querySelector('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.value}};case"file":return{context:function(){return e.el},getter:function(e){return ne(e.files)}};default:return{context:function(){return e.el},getter:function(e){return e.value}}}},Fe.prototype._getArg=function(){return this.binding.arg?this.binding.arg:this.model?this.model:X(this.binding.value)?this.binding.value.arg:null},Fe.prototype._attachModelWatcher=function(e){var t=this,r=W(this.el,"validate-on")||"input|blur",i=H(this._getSuitableListener().listener.bind(this),W(this.el,"delay")||this.options.delay);r.split("|").forEach(function(r){if(~["input","change"].indexOf(r)){var n=H(function(e){t.vm.$validator.validate(t.fieldName,e,t.scope||K(t.el))},W(t.el,"delay")||t.options.delay);return void(t.unwatch=t.vm.$watch(e,n,{deep:!0}))}t.el.addEventListener(r,i),t.callbacks.push({name:r,listener:i,el:t.el})})},Fe.prototype.attach=function(){var e=this,t=this._resolveValueGetter(),r=t.context,i=t.getter;this.vm.$validator.attach(this.fieldName,se(this.binding.expression,this.binding.value,this.el),{scope:function(){return e.scope||K(e.el)},prettyName:W(this.el,"as"),context:r,getter:i,listeners:this}),this._attachValidatorEvent();var n=this._getArg();return n?void this._attachModelWatcher(n):void this._attachFieldListeners()},Fe.prototype.detach=function(){this.component&&this.component.$off("input",this.componentListener),this.unwatch&&this.unwatch(),this.callbacks.forEach(function(e){e.el.removeEventListener(e.name,e.listener)}),this.callbacks=[]};var $e=[],we=function(e){return{bind:function(t,o,a){var s=new Fe(t,o,a,e);s.attach(),$e.push({vm:a.context,el:t,instance:s}),e.enableAutoClasses&&(n(t,e.classNames),t.onfocus=function(){i(t,e.classNames)},r(t,a.context.$validator.fieldBag.fields[s.fieldName],e.classNames))},update:function(t,i,n){var o=i.expression,a=i.value,s=i.oldValue,u=n.context,l=ae($e,function(e){return e.vm===u&&e.el===t}),c=l.instance;if(e.enableAutoClasses&&r(t,u.$validator.fieldBag.fields[c.fieldName],e.classNames),o&&("string"!=typeof a||"string"!=typeof s||a!==s)){var f=X(a)?a.scope||K(t):K(t);u.$validator.updateField(c.fieldName,se(o,a,t),{scope:f||"__global__"})}},unbind:function(e,t,r){var i=t.value,n=r.context,o=ae($e,function(t){return t.vm===n&&t.el===e});if("undefined"!=typeof o){var a=X(i)?i.scope:K(e)||"__global__";n.$validator.detach(o.instance.fieldName,a),$e.splice($e.indexOf(o),1)}}}},Ee={touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"},je=function(e,t){void 0===t&&(t={});var r=t.locale;void 0===r&&(r="en");var i=t.delay;void 0===i&&(i=0);var n=t.errorBagName;void 0===n&&(n="errors");var o=t.dictionary;void 0===o&&(o=null);var a=t.strict;void 0===a&&(a=!0);var s=t.fieldsBagName;void 0===s&&(s="fields");var u=t.enableAutoClasses;void 0===u&&(u=!1);var l=t.classNames;void 0===l&&(l={}),o&&be.updateDictionary(o),be.setLocale(r),be.setStrictMode(a);var c={locale:r,delay:i,dictionary:o,errorBagName:n,fieldsBagName:s,enableAutoClasses:u,classNames:oe({},Ee,l)};e.mixin(xe(e,c)),e.directive("validate",we(c))},Le={install:je,Validator:be,ErrorBag:Y,version:"2.0.0-beta.22"};return Le});
{
"name": "vee-validate",
"version": "2.0.0-beta.22",
"version": "2.0.0-beta.23",
"description": "Simple Vue.js input validation plugin",
"main": "dist/vee-validate.js",
"typings": "types/index.d.ts",
"homepage": "http://vee-validate.logaretm.com",

@@ -58,4 +59,8 @@ "repository": "https://github.com/logaretm/vee-validate",

"uglify-js": "^2.7.5",
"validator": "^6.1.0"
"validator": "^6.1.0",
"vue": "^2.1.10"
},
"peerDependencies": {
"vue": "2.x"
}
}

@@ -40,3 +40,3 @@ # Vee-Validate

```
bower install vee-validate#2.0.0-beta.22 --save
bower install vee-validate#2.0.0-beta.23 --save
```

@@ -98,8 +98,2 @@

### Compatibility
This plugin should be compatible with the major browsers, but it requires few polyfills to work on older ones.
The reason they are not included is because most of the workflows already use polyfills within their code, so to cut down the package size the redundant polyfills were removed, you can use [Polyfill.io](https://polyfill.io/v2/docs/) to provide the needed polyfills for all browsers automatically, or feel free to provide them on your own.
### Contributing

@@ -115,4 +109,4 @@

- [Form Validation using Vue.js 2](https://dotdev.co/form-validation-using-vue-js-2-35abd6b18c5d#.m95idzlj2) by [Alex Kyriakidis](https://github.com/hootlex)
- [Vue Multi Step From](http://statemachine.davestewart.io/html/examples/vue/vue-sign-up.html) by [Dave Stewart](https://github.com/davestewart)
- [Vue Multi Step Form](http://statemachine.davestewart.io/html/examples/vue/vue-sign-up.html) by [Dave Stewart](https://github.com/davestewart)
### license MIT

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

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc