Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

text-mask-addons

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

text-mask-addons - npm Package Compare versions

Comparing version 3.7.2 to 3.8.0

2

dist/createAutoCorrectedDatePipe.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.createAutoCorrectedDatePipe=t():e.createAutoCorrectedDatePipe=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(1)},function(e,t){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mm dd yyyy";return function(t){var r=[],n=e.split(/[^dmyHMS]+/),o={dd:31,mm:12,yy:99,yyyy:9999,HH:23,MM:59,SS:59},i={dd:1,mm:1,yy:0,yyyy:1,HH:0,MM:0,SS:0},u=t.split("");n.forEach(function(t){var n=e.indexOf(t),i=parseInt(o[t].toString().substr(0,1),10);parseInt(u[n],10)>i&&(u[n+1]=u[n],u[n]=0,r.push(n))});var d=n.some(function(r){var n=e.indexOf(r),u=r.length,d=t.substr(n,u).replace(/\D/g,""),s=parseInt(d,10);return s>o[r]||d.length===u&&s<i[r]});return!d&&{value:u.join(""),indexesOfPipedChars:r}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.createAutoCorrectedDatePipe=t():e.createAutoCorrectedDatePipe=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(1)},function(e,t){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mm dd yyyy",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minYear,i=void 0===r?1:r,d=t.maxYear,u=void 0===d?9999:d,s=e.split(/[^dmyHMS]+/).sort(function(e,t){return o.indexOf(e)-o.indexOf(t)});return function(t){var r=[],o={dd:31,mm:12,yy:99,yyyy:u,HH:23,MM:59,SS:59},d={dd:1,mm:1,yy:0,yyyy:i,HH:0,MM:0,SS:0},a=t.split("");s.forEach(function(t){var n=e.indexOf(t),i=parseInt(o[t].toString().substr(0,1),10);parseInt(a[n],10)>i&&(a[n+1]=a[n],a[n]=0,r.push(n))});var y=0,f=s.some(function(r){var s=e.indexOf(r),a=r.length,f=t.substr(s,a).replace(/\D/g,""),p=parseInt(f,10);"mm"===r&&(y=p||0);var c="dd"===r?n[y]:o[r];if("yyyy"===r&&(1!==i||9999!==u)){var l=parseInt(o[r].toString().substring(0,f.length),10),m=parseInt(d[r].toString().substring(0,f.length),10);return p<m||p>l}return p>c||f.length===a&&p<d[r]});return!f&&{value:a.join(""),indexesOfPipedChars:r}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var n=[31,31,29,31,30,31,30,31,31,30,31,30,31],o=["yyyy","yy","mm","dd","HH","MM","SS"]}])});

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

{"errors":[],"warnings":[],"version":"1.15.0","hash":"4e38a5f55ba89de1e53c","publicPath":"","assetsByChunkName":{"textMaskAddons":"textMaskAddons.js","emailMask":"emailMask.js","createNumberMask":"createNumberMask.js","createAutoCorrectedDatePipe":"createAutoCorrectedDatePipe.js"},"assets":[{"name":"textMaskAddons.js","size":5325,"chunks":[0],"chunkNames":["textMaskAddons"],"emitted":true},{"name":"emailMask.js","size":2171,"chunks":[1],"chunkNames":["emailMask"],"emitted":true},{"name":"createNumberMask.js","size":2528,"chunks":[2],"chunkNames":["createNumberMask"],"emitted":true},{"name":"createAutoCorrectedDatePipe.js","size":1160,"chunks":[3],"chunkNames":["createAutoCorrectedDatePipe"],"emitted":true},{"name":"stats.json","size":0,"chunks":[],"chunkNames":[]}],"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":14089,"names":["textMaskAddons"],"files":["textMaskAddons.js"],"hash":"998acf14073676c80bef","parents":[],"modules":[{"id":0,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","name":"./addons/src/index.js","index":7,"index2":7,"size":864,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createAutoCorrectedDatePipe = require('./createAutoCorrectedDatePipe');\n\nObject.defineProperty(exports, 'createAutoCorrectedDatePipe', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createAutoCorrectedDatePipe).default;\n }\n});\n\nvar _createNumberMask = require('./createNumberMask');\n\nObject.defineProperty(exports, 'createNumberMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createNumberMask).default;\n }\n});\n\nvar _emailMask = require('./emailMask');\n\nObject.defineProperty(exports, 'emailMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_emailMask).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"},{"id":1,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":1657,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/loz/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var dateFormatArray = dateFormat.split(/[^dmyHMS]+/);\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': 9999, 'HH': 23, 'MM': 59, 'SS': 59 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': 1, 'HH': 0, 'MM': 0, 'SS': 0 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n\n return value > maxValue[format] || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"},{"id":2,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":6149,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/loz/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n } else if (rawValue === decimalSymbol && allowDecimal) {\n return prefix.split(emptyString).concat(['0', decimalSymbol, digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var isNegative = rawValue[0] === minus && allowNegative;\n //If negative remove \"-\" sign\n if (isNegative) {\n rawValue = rawValue.toString().substr(1);\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = integer.replace(/^0+(0$|[^0])/, '$1');\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"},{"id":3,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/loz/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","moduleName":"./addons/src/index.js","loc":"","name":"textMaskAddons","reasons":[]}]},{"id":1,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":5447,"names":["emailMask"],"files":["emailMask.js"],"hash":"58c5a19613807ab3e3c6","parents":[],"modules":[{"id":0,"identifier":"multi emailMask","name":"multi emailMask","index":4,"index2":6,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[1],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":3,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/loz/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi emailMask","moduleIdentifier":"multi emailMask","moduleName":"multi emailMask","loc":"","name":"emailMask","reasons":[]}]},{"id":2,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":6177,"names":["createNumberMask"],"files":["createNumberMask.js"],"hash":"dca1d206eb329515c9cd","parents":[],"modules":[{"id":0,"identifier":"multi createNumberMask","name":"multi createNumberMask","index":2,"index2":3,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[2],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":2,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":6149,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/loz/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n } else if (rawValue === decimalSymbol && allowDecimal) {\n return prefix.split(emptyString).concat(['0', decimalSymbol, digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var isNegative = rawValue[0] === minus && allowNegative;\n //If negative remove \"-\" sign\n if (isNegative) {\n rawValue = rawValue.toString().substr(1);\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = integer.replace(/^0+(0$|[^0])/, '$1');\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi createNumberMask","moduleIdentifier":"multi createNumberMask","moduleName":"multi createNumberMask","loc":"","name":"createNumberMask","reasons":[]}]},{"id":3,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":1685,"names":["createAutoCorrectedDatePipe"],"files":["createAutoCorrectedDatePipe.js"],"hash":"955f0b80813b5a8f51ff","parents":[],"modules":[{"id":0,"identifier":"multi createAutoCorrectedDatePipe","name":"multi createAutoCorrectedDatePipe","index":0,"index2":1,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[3],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":1,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":1657,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/loz/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var dateFormatArray = dateFormat.split(/[^dmyHMS]+/);\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': 9999, 'HH': 23, 'MM': 59, 'SS': 59 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': 1, 'HH': 0, 'MM': 0, 'SS': 0 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n\n return value > maxValue[format] || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi createAutoCorrectedDatePipe","moduleIdentifier":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","loc":"","name":"createAutoCorrectedDatePipe","reasons":[]}]}],"modules":[{"id":0,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","name":"./addons/src/index.js","index":7,"index2":7,"size":864,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createAutoCorrectedDatePipe = require('./createAutoCorrectedDatePipe');\n\nObject.defineProperty(exports, 'createAutoCorrectedDatePipe', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createAutoCorrectedDatePipe).default;\n }\n});\n\nvar _createNumberMask = require('./createNumberMask');\n\nObject.defineProperty(exports, 'createNumberMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createNumberMask).default;\n }\n});\n\nvar _emailMask = require('./emailMask');\n\nObject.defineProperty(exports, 'emailMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_emailMask).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"},{"id":0,"identifier":"multi createAutoCorrectedDatePipe","name":"multi createAutoCorrectedDatePipe","index":0,"index2":1,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[3],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":0,"identifier":"multi createNumberMask","name":"multi createNumberMask","index":2,"index2":3,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[2],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":0,"identifier":"multi emailMask","name":"multi emailMask","index":4,"index2":6,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[1],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":1,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":1657,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/loz/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var dateFormatArray = dateFormat.split(/[^dmyHMS]+/);\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': 9999, 'HH': 23, 'MM': 59, 'SS': 59 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': 1, 'HH': 0, 'MM': 0, 'SS': 0 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n\n return value > maxValue[format] || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"},{"id":2,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":6149,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/loz/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n } else if (rawValue === decimalSymbol && allowDecimal) {\n return prefix.split(emptyString).concat(['0', decimalSymbol, digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var isNegative = rawValue[0] === minus && allowNegative;\n //If negative remove \"-\" sign\n if (isNegative) {\n rawValue = rawValue.toString().substr(1);\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = integer.replace(/^0+(0$|[^0])/, '$1');\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"},{"id":3,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/loz/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/loz/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/loz/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"children":[]}
{"errors":[],"warnings":[],"version":"1.15.0","hash":"6177522c2e157dd44156","publicPath":"","assetsByChunkName":{"textMaskAddons":"textMaskAddons.js","emailMask":"emailMask.js","createNumberMask":"createNumberMask.js","createAutoCorrectedDatePipe":"createAutoCorrectedDatePipe.js"},"assets":[{"name":"textMaskAddons.js","size":5790,"chunks":[0],"chunkNames":["textMaskAddons"],"emitted":true},{"name":"emailMask.js","size":2171,"chunks":[1],"chunkNames":["emailMask"],"emitted":true},{"name":"createNumberMask.js","size":2528,"chunks":[2],"chunkNames":["createNumberMask"],"emitted":true},{"name":"createAutoCorrectedDatePipe.js","size":1625,"chunks":[3],"chunkNames":["createAutoCorrectedDatePipe"],"emitted":true},{"name":"stats.json","size":0,"chunks":[],"chunkNames":[]}],"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":15129,"names":["textMaskAddons"],"files":["textMaskAddons.js"],"hash":"d85c8397637b5fe4d3f3","parents":[],"modules":[{"id":0,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","name":"./addons/src/index.js","index":7,"index2":7,"size":864,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createAutoCorrectedDatePipe = require('./createAutoCorrectedDatePipe');\n\nObject.defineProperty(exports, 'createAutoCorrectedDatePipe', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createAutoCorrectedDatePipe).default;\n }\n});\n\nvar _createNumberMask = require('./createNumberMask');\n\nObject.defineProperty(exports, 'createNumberMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createNumberMask).default;\n }\n});\n\nvar _emailMask = require('./emailMask');\n\nObject.defineProperty(exports, 'emailMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_emailMask).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"},{"id":1,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":2697,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/lozjackson/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nvar maxValueMonth = [31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar formatOrder = ['yyyy', 'yy', 'mm', 'dd', 'HH', 'MM', 'SS'];\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$minYear = _ref.minYear,\n minYear = _ref$minYear === undefined ? 1 : _ref$minYear,\n _ref$maxYear = _ref.maxYear,\n maxYear = _ref$maxYear === undefined ? 9999 : _ref$maxYear;\n\n var dateFormatArray = dateFormat.split(/[^dmyHMS]+/).sort(function (a, b) {\n return formatOrder.indexOf(a) - formatOrder.indexOf(b);\n });\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': maxYear, 'HH': 23, 'MM': 59, 'SS': 59 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': minYear, 'HH': 0, 'MM': 0, 'SS': 0 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var month = 0;\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n if (format === 'mm') {\n month = value || 0;\n }\n var maxValueForFormat = format === 'dd' ? maxValueMonth[month] : maxValue[format];\n if (format === 'yyyy' && (minYear !== 1 || maxYear !== 9999)) {\n var scopedMaxValue = parseInt(maxValue[format].toString().substring(0, textValue.length), 10);\n var scopedMinValue = parseInt(minValue[format].toString().substring(0, textValue.length), 10);\n return value < scopedMinValue || value > scopedMaxValue;\n }\n return value > maxValueForFormat || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"},{"id":2,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":6149,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/lozjackson/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n } else if (rawValue === decimalSymbol && allowDecimal) {\n return prefix.split(emptyString).concat(['0', decimalSymbol, digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var isNegative = rawValue[0] === minus && allowNegative;\n //If negative remove \"-\" sign\n if (isNegative) {\n rawValue = rawValue.toString().substr(1);\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = integer.replace(/^0+(0$|[^0])/, '$1');\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"},{"id":3,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","moduleName":"./addons/src/index.js","loc":"","name":"textMaskAddons","reasons":[]}]},{"id":1,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":5447,"names":["emailMask"],"files":["emailMask.js"],"hash":"58c5a19613807ab3e3c6","parents":[],"modules":[{"id":0,"identifier":"multi emailMask","name":"multi emailMask","index":4,"index2":6,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[1],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":3,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi emailMask","moduleIdentifier":"multi emailMask","moduleName":"multi emailMask","loc":"","name":"emailMask","reasons":[]}]},{"id":2,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":6177,"names":["createNumberMask"],"files":["createNumberMask.js"],"hash":"dca1d206eb329515c9cd","parents":[],"modules":[{"id":0,"identifier":"multi createNumberMask","name":"multi createNumberMask","index":2,"index2":3,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[2],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":2,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":6149,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/lozjackson/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n } else if (rawValue === decimalSymbol && allowDecimal) {\n return prefix.split(emptyString).concat(['0', decimalSymbol, digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var isNegative = rawValue[0] === minus && allowNegative;\n //If negative remove \"-\" sign\n if (isNegative) {\n rawValue = rawValue.toString().substr(1);\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = integer.replace(/^0+(0$|[^0])/, '$1');\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi createNumberMask","moduleIdentifier":"multi createNumberMask","moduleName":"multi createNumberMask","loc":"","name":"createNumberMask","reasons":[]}]},{"id":3,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":2725,"names":["createAutoCorrectedDatePipe"],"files":["createAutoCorrectedDatePipe.js"],"hash":"0b771778f08c8056164f","parents":[],"modules":[{"id":0,"identifier":"multi createAutoCorrectedDatePipe","name":"multi createAutoCorrectedDatePipe","index":0,"index2":1,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[3],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":1,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":2697,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/lozjackson/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nvar maxValueMonth = [31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar formatOrder = ['yyyy', 'yy', 'mm', 'dd', 'HH', 'MM', 'SS'];\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$minYear = _ref.minYear,\n minYear = _ref$minYear === undefined ? 1 : _ref$minYear,\n _ref$maxYear = _ref.maxYear,\n maxYear = _ref$maxYear === undefined ? 9999 : _ref$maxYear;\n\n var dateFormatArray = dateFormat.split(/[^dmyHMS]+/).sort(function (a, b) {\n return formatOrder.indexOf(a) - formatOrder.indexOf(b);\n });\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': maxYear, 'HH': 23, 'MM': 59, 'SS': 59 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': minYear, 'HH': 0, 'MM': 0, 'SS': 0 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var month = 0;\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n if (format === 'mm') {\n month = value || 0;\n }\n var maxValueForFormat = format === 'dd' ? maxValueMonth[month] : maxValue[format];\n if (format === 'yyyy' && (minYear !== 1 || maxYear !== 9999)) {\n var scopedMaxValue = parseInt(maxValue[format].toString().substring(0, textValue.length), 10);\n var scopedMinValue = parseInt(minValue[format].toString().substring(0, textValue.length), 10);\n return value < scopedMinValue || value > scopedMaxValue;\n }\n return value > maxValueForFormat || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"}],"filteredModules":0,"origins":[{"moduleId":0,"module":"multi createAutoCorrectedDatePipe","moduleIdentifier":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","loc":"","name":"createAutoCorrectedDatePipe","reasons":[]}]}],"modules":[{"id":0,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","name":"./addons/src/index.js","index":7,"index2":7,"size":864,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createAutoCorrectedDatePipe = require('./createAutoCorrectedDatePipe');\n\nObject.defineProperty(exports, 'createAutoCorrectedDatePipe', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createAutoCorrectedDatePipe).default;\n }\n});\n\nvar _createNumberMask = require('./createNumberMask');\n\nObject.defineProperty(exports, 'createNumberMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_createNumberMask).default;\n }\n});\n\nvar _emailMask = require('./emailMask');\n\nObject.defineProperty(exports, 'emailMask', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_emailMask).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"},{"id":0,"identifier":"multi createAutoCorrectedDatePipe","name":"multi createAutoCorrectedDatePipe","index":0,"index2":1,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[3],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":0,"identifier":"multi createNumberMask","name":"multi createNumberMask","index":2,"index2":3,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[2],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":0,"identifier":"multi emailMask","name":"multi emailMask","index":4,"index2":6,"size":28,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[1],"assets":[],"issuer":null,"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":1,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js","name":"./addons/src/createAutoCorrectedDatePipe.js","index":1,"index2":0,"size":2697,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,3],"assets":[],"issuer":"multi createAutoCorrectedDatePipe","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createAutoCorrectedDatePipe","module":"multi createAutoCorrectedDatePipe","moduleName":"multi createAutoCorrectedDatePipe","type":"single entry","userRequest":"/Users/lozjackson/Projects/text-mask/addons/src/createAutoCorrectedDatePipe.js"},{"moduleId":0,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createAutoCorrectedDatePipe","loc":"7:35-75"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createAutoCorrectedDatePipe;\nvar maxValueMonth = [31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar formatOrder = ['yyyy', 'yy', 'mm', 'dd', 'HH', 'MM', 'SS'];\nfunction createAutoCorrectedDatePipe() {\n var dateFormat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'mm dd yyyy';\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$minYear = _ref.minYear,\n minYear = _ref$minYear === undefined ? 1 : _ref$minYear,\n _ref$maxYear = _ref.maxYear,\n maxYear = _ref$maxYear === undefined ? 9999 : _ref$maxYear;\n\n var dateFormatArray = dateFormat.split(/[^dmyHMS]+/).sort(function (a, b) {\n return formatOrder.indexOf(a) - formatOrder.indexOf(b);\n });\n return function (conformedValue) {\n var indexesOfPipedChars = [];\n var maxValue = { 'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': maxYear, 'HH': 23, 'MM': 59, 'SS': 59 };\n var minValue = { 'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': minYear, 'HH': 0, 'MM': 0, 'SS': 0 };\n var conformedValueArr = conformedValue.split('');\n\n // Check first digit\n dateFormatArray.forEach(function (format) {\n var position = dateFormat.indexOf(format);\n var maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = 0;\n indexesOfPipedChars.push(position);\n }\n });\n\n // Check for invalid date\n var month = 0;\n var isInvalid = dateFormatArray.some(function (format) {\n var position = dateFormat.indexOf(format);\n var length = format.length;\n var textValue = conformedValue.substr(position, length).replace(/\\D/g, '');\n var value = parseInt(textValue, 10);\n if (format === 'mm') {\n month = value || 0;\n }\n var maxValueForFormat = format === 'dd' ? maxValueMonth[month] : maxValue[format];\n if (format === 'yyyy' && (minYear !== 1 || maxYear !== 9999)) {\n var scopedMaxValue = parseInt(maxValue[format].toString().substring(0, textValue.length), 10);\n var scopedMinValue = parseInt(minValue[format].toString().substring(0, textValue.length), 10);\n return value < scopedMinValue || value > scopedMaxValue;\n }\n return value > maxValueForFormat || textValue.length === length && value < minValue[format];\n });\n\n if (isInvalid) {\n return false;\n }\n\n return {\n value: conformedValueArr.join(''),\n indexesOfPipedChars: indexesOfPipedChars\n };\n };\n}"},{"id":2,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/createNumberMask.js","name":"./addons/src/createNumberMask.js","index":3,"index2":2,"size":6149,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,2],"assets":[],"issuer":"multi createNumberMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi createNumberMask","module":"multi createNumberMask","moduleName":"multi createNumberMask","type":"single entry","userRequest":"/Users/lozjackson/Projects/text-mask/addons/src/createNumberMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./createNumberMask","loc":"16:24-53"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.default = createNumberMask;\nvar dollarSign = '$';\nvar emptyString = '';\nvar comma = ',';\nvar period = '.';\nvar minus = '-';\nvar minusRegExp = /-/;\nvar nonDigitsRegExp = /\\D+/g;\nvar number = 'number';\nvar digitRegExp = /\\d/;\nvar caretTrap = '[]';\n\nfunction createNumberMask() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$prefix = _ref.prefix,\n prefix = _ref$prefix === undefined ? dollarSign : _ref$prefix,\n _ref$suffix = _ref.suffix,\n suffix = _ref$suffix === undefined ? emptyString : _ref$suffix,\n _ref$includeThousands = _ref.includeThousandsSeparator,\n includeThousandsSeparator = _ref$includeThousands === undefined ? true : _ref$includeThousands,\n _ref$thousandsSeparat = _ref.thousandsSeparatorSymbol,\n thousandsSeparatorSymbol = _ref$thousandsSeparat === undefined ? comma : _ref$thousandsSeparat,\n _ref$allowDecimal = _ref.allowDecimal,\n allowDecimal = _ref$allowDecimal === undefined ? false : _ref$allowDecimal,\n _ref$decimalSymbol = _ref.decimalSymbol,\n decimalSymbol = _ref$decimalSymbol === undefined ? period : _ref$decimalSymbol,\n _ref$decimalLimit = _ref.decimalLimit,\n decimalLimit = _ref$decimalLimit === undefined ? 2 : _ref$decimalLimit,\n _ref$requireDecimal = _ref.requireDecimal,\n requireDecimal = _ref$requireDecimal === undefined ? false : _ref$requireDecimal,\n _ref$allowNegative = _ref.allowNegative,\n allowNegative = _ref$allowNegative === undefined ? false : _ref$allowNegative,\n _ref$allowLeadingZero = _ref.allowLeadingZeroes,\n allowLeadingZeroes = _ref$allowLeadingZero === undefined ? false : _ref$allowLeadingZero,\n _ref$integerLimit = _ref.integerLimit,\n integerLimit = _ref$integerLimit === undefined ? null : _ref$integerLimit;\n\n var prefixLength = prefix && prefix.length || 0;\n var suffixLength = suffix && suffix.length || 0;\n var thousandsSeparatorSymbolLength = thousandsSeparatorSymbol && thousandsSeparatorSymbol.length || 0;\n\n function numberMask() {\n var rawValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyString;\n\n var rawValueLength = rawValue.length;\n\n if (rawValue === emptyString || rawValue[0] === prefix[0] && rawValueLength === 1) {\n return prefix.split(emptyString).concat([digitRegExp]).concat(suffix.split(emptyString));\n } else if (rawValue === decimalSymbol && allowDecimal) {\n return prefix.split(emptyString).concat(['0', decimalSymbol, digitRegExp]).concat(suffix.split(emptyString));\n }\n\n var isNegative = rawValue[0] === minus && allowNegative;\n //If negative remove \"-\" sign\n if (isNegative) {\n rawValue = rawValue.toString().substr(1);\n }\n\n var indexOfLastDecimal = rawValue.lastIndexOf(decimalSymbol);\n var hasDecimal = indexOfLastDecimal !== -1;\n\n var integer = void 0;\n var fraction = void 0;\n var mask = void 0;\n\n // remove the suffix\n if (rawValue.slice(suffixLength * -1) === suffix) {\n rawValue = rawValue.slice(0, suffixLength * -1);\n }\n\n if (hasDecimal && (allowDecimal || requireDecimal)) {\n integer = rawValue.slice(rawValue.slice(0, prefixLength) === prefix ? prefixLength : 0, indexOfLastDecimal);\n\n fraction = rawValue.slice(indexOfLastDecimal + 1, rawValueLength);\n fraction = convertToMask(fraction.replace(nonDigitsRegExp, emptyString));\n } else {\n if (rawValue.slice(0, prefixLength) === prefix) {\n integer = rawValue.slice(prefixLength);\n } else {\n integer = rawValue;\n }\n }\n\n if (integerLimit && (typeof integerLimit === 'undefined' ? 'undefined' : _typeof(integerLimit)) === number) {\n var thousandsSeparatorRegex = thousandsSeparatorSymbol === '.' ? '[.]' : '' + thousandsSeparatorSymbol;\n var numberOfThousandSeparators = (integer.match(new RegExp(thousandsSeparatorRegex, 'g')) || []).length;\n\n integer = integer.slice(0, integerLimit + numberOfThousandSeparators * thousandsSeparatorSymbolLength);\n }\n\n integer = integer.replace(nonDigitsRegExp, emptyString);\n\n if (!allowLeadingZeroes) {\n integer = integer.replace(/^0+(0$|[^0])/, '$1');\n }\n\n integer = includeThousandsSeparator ? addThousandsSeparator(integer, thousandsSeparatorSymbol) : integer;\n\n mask = convertToMask(integer);\n\n if (hasDecimal && allowDecimal || requireDecimal === true) {\n if (rawValue[indexOfLastDecimal - 1] !== decimalSymbol) {\n mask.push(caretTrap);\n }\n\n mask.push(decimalSymbol, caretTrap);\n\n if (fraction) {\n if ((typeof decimalLimit === 'undefined' ? 'undefined' : _typeof(decimalLimit)) === number) {\n fraction = fraction.slice(0, decimalLimit);\n }\n\n mask = mask.concat(fraction);\n }\n\n if (requireDecimal === true && rawValue[indexOfLastDecimal - 1] === decimalSymbol) {\n mask.push(digitRegExp);\n }\n }\n\n if (prefixLength > 0) {\n mask = prefix.split(emptyString).concat(mask);\n }\n\n if (isNegative) {\n // If user is entering a negative number, add a mask placeholder spot to attract the caret to it.\n if (mask.length === prefixLength) {\n mask.push(digitRegExp);\n }\n\n mask = [minusRegExp].concat(mask);\n }\n\n if (suffix.length > 0) {\n mask = mask.concat(suffix.split(emptyString));\n }\n\n return mask;\n }\n\n numberMask.instanceOf = 'createNumberMask';\n\n return numberMask;\n}\n\nfunction convertToMask(strNumber) {\n return strNumber.split(emptyString).map(function (char) {\n return digitRegExp.test(char) ? digitRegExp : char;\n });\n}\n\n// http://stackoverflow.com/a/10899795/604296\nfunction addThousandsSeparator(n, thousandsSeparatorSymbol) {\n return n.replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousandsSeparatorSymbol);\n}"},{"id":3,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js","name":"./addons/src/emailMask.js","index":5,"index2":5,"size":3848,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"multi emailMask","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":0,"moduleIdentifier":"multi emailMask","module":"multi emailMask","moduleName":"multi emailMask","type":"single entry","userRequest":"/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js"},{"moduleId":0,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/index.js","module":"./addons/src/index.js","moduleName":"./addons/src/index.js","type":"cjs require","userRequest":"./emailMask","loc":"25:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _emailPipe = require('./emailPipe');\n\nvar _emailPipe2 = _interopRequireDefault(_emailPipe);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar asterisk = '*';\nvar dot = '.';\nvar emptyString = '';\nvar atSymbol = '@';\nvar caretTrap = '[]';\nvar space = ' ';\nvar g = 'g';\nvar anyNonWhitespaceRegExp = /[^\\s]/;\nvar anyNonDotOrWhitespaceRegExp = /[^.\\s]/;\nvar allWhitespaceRegExp = /\\s/g;\n\nfunction emailMask(rawValue, config) {\n rawValue = rawValue.replace(allWhitespaceRegExp, emptyString);\n\n var placeholderChar = config.placeholderChar,\n currentCaretPosition = config.currentCaretPosition;\n\n var indexOfFirstAtSymbol = rawValue.indexOf(atSymbol);\n var indexOfLastDot = rawValue.lastIndexOf(dot);\n var indexOfTopLevelDomainDot = indexOfLastDot < indexOfFirstAtSymbol ? -1 : indexOfLastDot;\n\n var localPartToDomainConnector = getConnector(rawValue, indexOfFirstAtSymbol + 1, atSymbol);\n var domainNameToTopLevelDomainConnector = getConnector(rawValue, indexOfTopLevelDomainDot - 1, dot);\n\n var localPart = getLocalPart(rawValue, indexOfFirstAtSymbol, placeholderChar);\n var domainName = getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar);\n var topLevelDomain = getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition);\n\n localPart = convertToMask(localPart);\n domainName = convertToMask(domainName);\n topLevelDomain = convertToMask(topLevelDomain, true);\n\n var mask = localPart.concat(localPartToDomainConnector).concat(domainName).concat(domainNameToTopLevelDomainConnector).concat(topLevelDomain);\n\n return mask;\n}\n\nfunction getConnector(rawValue, indexOfConnection, connectionSymbol) {\n var connector = [];\n\n if (rawValue[indexOfConnection] === connectionSymbol) {\n connector.push(connectionSymbol);\n } else {\n connector.push(caretTrap, connectionSymbol);\n }\n\n connector.push(caretTrap);\n\n return connector;\n}\n\nfunction getLocalPart(rawValue, indexOfFirstAtSymbol) {\n if (indexOfFirstAtSymbol === -1) {\n return rawValue;\n } else {\n return rawValue.slice(0, indexOfFirstAtSymbol);\n }\n}\n\nfunction getDomainName(rawValue, indexOfFirstAtSymbol, indexOfTopLevelDomainDot, placeholderChar) {\n var domainName = emptyString;\n\n if (indexOfFirstAtSymbol !== -1) {\n if (indexOfTopLevelDomainDot === -1) {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, rawValue.length);\n } else {\n domainName = rawValue.slice(indexOfFirstAtSymbol + 1, indexOfTopLevelDomainDot);\n }\n }\n\n domainName = domainName.replace(new RegExp('[\\\\s' + placeholderChar + ']', g), emptyString);\n\n if (domainName === atSymbol) {\n return asterisk;\n } else if (domainName.length < 1) {\n return space;\n } else if (domainName[domainName.length - 1] === dot) {\n return domainName.slice(0, domainName.length - 1);\n } else {\n return domainName;\n }\n}\n\nfunction getTopLevelDomain(rawValue, indexOfTopLevelDomainDot, placeholderChar, currentCaretPosition) {\n var topLevelDomain = emptyString;\n\n if (indexOfTopLevelDomainDot !== -1) {\n topLevelDomain = rawValue.slice(indexOfTopLevelDomainDot + 1, rawValue.length);\n }\n\n topLevelDomain = topLevelDomain.replace(new RegExp('[\\\\s' + placeholderChar + '.]', g), emptyString);\n\n if (topLevelDomain.length === 0) {\n return rawValue[indexOfTopLevelDomainDot - 1] === dot && currentCaretPosition !== rawValue.length ? asterisk : emptyString;\n } else {\n return topLevelDomain;\n }\n}\n\nfunction convertToMask(str, noDots) {\n return str.split(emptyString).map(function (char) {\n return char === space ? char : noDots ? anyNonDotOrWhitespaceRegExp : anyNonWhitespaceRegExp;\n });\n}\n\nexports.default = { mask: emailMask, pipe: _emailPipe2.default };"},{"id":4,"identifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailPipe.js","name":"./addons/src/emailPipe.js","index":6,"index2":4,"size":1571,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0,1],"assets":[],"issuer":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js","failed":false,"errors":0,"warnings":0,"reasons":[{"moduleId":3,"moduleIdentifier":"/Users/lozjackson/Projects/text-mask/node_modules/babel-loader/lib/index.js!/Users/lozjackson/Projects/text-mask/addons/src/emailMask.js","module":"./addons/src/emailMask.js","moduleName":"./addons/src/emailMask.js","type":"cjs require","userRequest":"./emailPipe","loc":"7:17-39"}],"source":"'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = emailPipe;\nvar atSymbol = '@';\nvar allAtSymbolsRegExp = /@/g;\nvar emptyString = '';\nvar atDot = '@.';\nvar dot = '.';\nvar dotDot = '..';\nvar emptyArray = [];\nvar allDotsRegExp = /\\./g;\n\nfunction emailPipe(conformedValue, config) {\n var currentCaretPosition = config.currentCaretPosition,\n rawValue = config.rawValue,\n previousConformedValue = config.previousConformedValue,\n placeholderChar = config.placeholderChar;\n\n\n var value = conformedValue;\n\n value = removeAllAtSymbolsButFirst(value);\n\n var indexOfAtDot = value.indexOf(atDot);\n\n var emptyEmail = rawValue.match(new RegExp('[^@\\\\s.' + placeholderChar + ']')) === null;\n\n if (emptyEmail) {\n return emptyString;\n }\n\n if (value.indexOf(dotDot) !== -1 || indexOfAtDot !== -1 && currentCaretPosition !== indexOfAtDot + 1 || rawValue.indexOf(atSymbol) === -1 && previousConformedValue !== emptyString && rawValue.indexOf(dot) !== -1) {\n return false;\n }\n\n var indexOfAtSymbol = value.indexOf(atSymbol);\n var domainPart = value.slice(indexOfAtSymbol + 1, value.length);\n\n if ((domainPart.match(allDotsRegExp) || emptyArray).length > 1 && value.substr(-1) === dot && currentCaretPosition !== rawValue.length) {\n value = value.slice(0, value.length - 1);\n }\n\n return value;\n}\n\nfunction removeAllAtSymbolsButFirst(str) {\n var atSymbolCount = 0;\n\n return str.replace(allAtSymbolsRegExp, function () {\n atSymbolCount++;\n\n return atSymbolCount === 1 ? atSymbol : emptyString;\n });\n}"}],"filteredModules":0,"children":[]}

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.textMaskAddons=t():e.textMaskAddons=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);Object.defineProperty(t,"createAutoCorrectedDatePipe",{enumerable:!0,get:function(){return r(o).default}});var i=n(2);Object.defineProperty(t,"createNumberMask",{enumerable:!0,get:function(){return r(i).default}});var u=n(3);Object.defineProperty(t,"emailMask",{enumerable:!0,get:function(){return r(u).default}})},function(e,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mm dd yyyy";return function(t){var n=[],r=e.split(/[^dmyHMS]+/),o={dd:31,mm:12,yy:99,yyyy:9999,HH:23,MM:59,SS:59},i={dd:1,mm:1,yy:0,yyyy:1,HH:0,MM:0,SS:0},u=t.split("");r.forEach(function(t){var r=e.indexOf(t),i=parseInt(o[t].toString().substr(0,1),10);parseInt(u[r],10)>i&&(u[r+1]=u[r],u[r]=0,n.push(r))});var c=r.some(function(n){var r=e.indexOf(n),u=n.length,c=t.substr(r,u).replace(/\D/g,""),l=parseInt(c,10);return l>o[n]||c.length===u&&l<i[n]});return!c&&{value:u.join(""),indexesOfPipedChars:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){"use strict";function n(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=e.length;if(e===c||e[0]===g[0]&&1===t)return g.split(c).concat([v]).concat(m.split(c));if(e===P&&_)return g.split(c).concat(["0",P,v]).concat(m.split(c));var n=e[0]===s&&H;n&&(e=e.toString().substr(1));var u=e.lastIndexOf(P),l=u!==-1,a=void 0,h=void 0,b=void 0;if(e.slice($*-1)===m&&(e=e.slice(0,$*-1)),l&&(_||D)?(a=e.slice(e.slice(0,N)===g?N:0,u),h=e.slice(u+1,t),h=r(h.replace(f,c))):a=e.slice(0,N)===g?e.slice(N):e,L&&("undefined"==typeof L?"undefined":i(L))===p){var O="."===M?"[.]":""+M,S=(a.match(new RegExp(O,"g"))||[]).length;a=a.slice(0,L+S*V)}return a=a.replace(f,c),R||(a=a.replace(/^0+(0$|[^0])/,"$1")),a=x?o(a,M):a,b=r(a),(l&&_||D===!0)&&(e[u-1]!==P&&b.push(y),b.push(P,y),h&&(("undefined"==typeof C?"undefined":i(C))===p&&(h=h.slice(0,C)),b=b.concat(h)),D===!0&&e[u-1]===P&&b.push(v)),N>0&&(b=g.split(c).concat(b)),n&&(b.length===N&&b.push(v),b=[d].concat(b)),m.length>0&&(b=b.concat(m.split(c))),b}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.prefix,g=void 0===n?u:n,h=t.suffix,m=void 0===h?c:h,b=t.includeThousandsSeparator,x=void 0===b||b,O=t.thousandsSeparatorSymbol,M=void 0===O?l:O,S=t.allowDecimal,_=void 0!==S&&S,j=t.decimalSymbol,P=void 0===j?a:j,w=t.decimalLimit,C=void 0===w?2:w,k=t.requireDecimal,D=void 0!==k&&k,E=t.allowNegative,H=void 0!==E&&E,I=t.allowLeadingZeroes,R=void 0!==I&&I,A=t.integerLimit,L=void 0===A?null:A,N=g&&g.length||0,$=m&&m.length||0,V=M&&M.length||0;return e.instanceOf="createNumberMask",e}function r(e){return e.split(c).map(function(e){return v.test(e)?v:e})}function o(e,t){return e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}Object.defineProperty(t,"__esModule",{value:!0});var i="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=n;var u="$",c="",l=",",a=".",s="-",d=/-/,f=/\D+/g,p="number",v=/\d/,y="[]"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){e=e.replace(O,v);var n=t.placeholderChar,r=t.currentCaretPosition,o=e.indexOf(y),s=e.lastIndexOf(p),d=s<o?-1:s,f=i(e,o+1,y),g=i(e,d-1,p),h=u(e,o,n),m=c(e,o,d,n),b=l(e,d,n,r);h=a(h),m=a(m),b=a(b,!0);var x=h.concat(f).concat(m).concat(g).concat(b);return x}function i(e,t,n){var r=[];return e[t]===n?r.push(n):r.push(g,n),r.push(g),r}function u(e,t){return t===-1?e:e.slice(0,t)}function c(e,t,n,r){var o=v;return t!==-1&&(o=n===-1?e.slice(t+1,e.length):e.slice(t+1,n)),o=o.replace(new RegExp("[\\s"+r+"]",m),v),o===y?f:o.length<1?h:o[o.length-1]===p?o.slice(0,o.length-1):o}function l(e,t,n,r){var o=v;return t!==-1&&(o=e.slice(t+1,e.length)),o=o.replace(new RegExp("[\\s"+n+".]",m),v),0===o.length?e[t-1]===p&&r!==e.length?f:v:o}function a(e,t){return e.split(v).map(function(e){return e===h?e:t?x:b})}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),d=r(s),f="*",p=".",v="",y="@",g="[]",h=" ",m="g",b=/[^\s]/,x=/[^.\s]/,O=/\s/g;t.default={mask:o,pipe:d.default}},function(e,t){"use strict";function n(e,t){var n=t.currentCaretPosition,i=t.rawValue,f=t.previousConformedValue,p=t.placeholderChar,v=e;v=r(v);var y=v.indexOf(c),g=null===i.match(new RegExp("[^@\\s."+p+"]"));if(g)return u;if(v.indexOf(a)!==-1||y!==-1&&n!==y+1||i.indexOf(o)===-1&&f!==u&&i.indexOf(l)!==-1)return!1;var h=v.indexOf(o),m=v.slice(h+1,v.length);return(m.match(d)||s).length>1&&v.substr(-1)===l&&n!==i.length&&(v=v.slice(0,v.length-1)),v}function r(e){var t=0;return e.replace(i,function(){return t++,1===t?o:u})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var o="@",i=/@/g,u="",c="@.",l=".",a="..",s=[],d=/\./g}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.textMaskAddons=t():e.textMaskAddons=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);Object.defineProperty(t,"createAutoCorrectedDatePipe",{enumerable:!0,get:function(){return r(i).default}});var o=n(2);Object.defineProperty(t,"createNumberMask",{enumerable:!0,get:function(){return r(o).default}});var u=n(3);Object.defineProperty(t,"emailMask",{enumerable:!0,get:function(){return r(u).default}})},function(e,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mm dd yyyy",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minYear,o=void 0===n?1:n,u=t.maxYear,a=void 0===u?9999:u,c=e.split(/[^dmyHMS]+/).sort(function(e,t){return i.indexOf(e)-i.indexOf(t)});return function(t){var n=[],i={dd:31,mm:12,yy:99,yyyy:a,HH:23,MM:59,SS:59},u={dd:1,mm:1,yy:0,yyyy:o,HH:0,MM:0,SS:0},l=t.split("");c.forEach(function(t){var r=e.indexOf(t),o=parseInt(i[t].toString().substr(0,1),10);parseInt(l[r],10)>o&&(l[r+1]=l[r],l[r]=0,n.push(r))});var s=0,d=c.some(function(n){var c=e.indexOf(n),l=n.length,d=t.substr(c,l).replace(/\D/g,""),f=parseInt(d,10);"mm"===n&&(s=f||0);var p="dd"===n?r[s]:i[n];if("yyyy"===n&&(1!==o||9999!==a)){var v=parseInt(i[n].toString().substring(0,d.length),10),y=parseInt(u[n].toString().substring(0,d.length),10);return f<y||f>v}return f>p||d.length===l&&f<u[n]});return!d&&{value:l.join(""),indexesOfPipedChars:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r=[31,31,29,31,30,31,30,31,31,30,31,30,31],i=["yyyy","yy","mm","dd","HH","MM","SS"]},function(e,t){"use strict";function n(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=e.length;if(e===a||e[0]===g[0]&&1===t)return g.split(a).concat([v]).concat(h.split(a));if(e===P&&_)return g.split(a).concat(["0",P,v]).concat(h.split(a));var n=e[0]===s&&D;n&&(e=e.toString().substr(1));var u=e.lastIndexOf(P),c=u!==-1,l=void 0,m=void 0,b=void 0;if(e.slice($*-1)===h&&(e=e.slice(0,$*-1)),c&&(_||I)?(l=e.slice(e.slice(0,N)===g?N:0,u),m=e.slice(u+1,t),m=r(m.replace(f,a))):l=e.slice(0,N)===g?e.slice(N):e,L&&("undefined"==typeof L?"undefined":o(L))===p){var O="."===S?"[.]":""+S,M=(l.match(new RegExp(O,"g"))||[]).length;l=l.slice(0,L+M*V)}return l=l.replace(f,a),R||(l=l.replace(/^0+(0$|[^0])/,"$1")),l=x?i(l,S):l,b=r(l),(c&&_||I===!0)&&(e[u-1]!==P&&b.push(y),b.push(P,y),m&&(("undefined"==typeof C?"undefined":o(C))===p&&(m=m.slice(0,C)),b=b.concat(m)),I===!0&&e[u-1]===P&&b.push(v)),N>0&&(b=g.split(a).concat(b)),n&&(b.length===N&&b.push(v),b=[d].concat(b)),h.length>0&&(b=b.concat(h.split(a))),b}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.prefix,g=void 0===n?u:n,m=t.suffix,h=void 0===m?a:m,b=t.includeThousandsSeparator,x=void 0===b||b,O=t.thousandsSeparatorSymbol,S=void 0===O?c:O,M=t.allowDecimal,_=void 0!==M&&M,j=t.decimalSymbol,P=void 0===j?l:j,w=t.decimalLimit,C=void 0===w?2:w,H=t.requireDecimal,I=void 0!==H&&H,k=t.allowNegative,D=void 0!==k&&k,E=t.allowLeadingZeroes,R=void 0!==E&&E,A=t.integerLimit,L=void 0===A?null:A,N=g&&g.length||0,$=h&&h.length||0,V=S&&S.length||0;return e.instanceOf="createNumberMask",e}function r(e){return e.split(a).map(function(e){return v.test(e)?v:e})}function i(e,t){return e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}Object.defineProperty(t,"__esModule",{value:!0});var o="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=n;var u="$",a="",c=",",l=".",s="-",d=/-/,f=/\D+/g,p="number",v=/\d/,y="[]"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){e=e.replace(O,v);var n=t.placeholderChar,r=t.currentCaretPosition,i=e.indexOf(y),s=e.lastIndexOf(p),d=s<i?-1:s,f=o(e,i+1,y),g=o(e,d-1,p),m=u(e,i,n),h=a(e,i,d,n),b=c(e,d,n,r);m=l(m),h=l(h),b=l(b,!0);var x=m.concat(f).concat(h).concat(g).concat(b);return x}function o(e,t,n){var r=[];return e[t]===n?r.push(n):r.push(g,n),r.push(g),r}function u(e,t){return t===-1?e:e.slice(0,t)}function a(e,t,n,r){var i=v;return t!==-1&&(i=n===-1?e.slice(t+1,e.length):e.slice(t+1,n)),i=i.replace(new RegExp("[\\s"+r+"]",h),v),i===y?f:i.length<1?m:i[i.length-1]===p?i.slice(0,i.length-1):i}function c(e,t,n,r){var i=v;return t!==-1&&(i=e.slice(t+1,e.length)),i=i.replace(new RegExp("[\\s"+n+".]",h),v),0===i.length?e[t-1]===p&&r!==e.length?f:v:i}function l(e,t){return e.split(v).map(function(e){return e===m?e:t?x:b})}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),d=r(s),f="*",p=".",v="",y="@",g="[]",m=" ",h="g",b=/[^\s]/,x=/[^.\s]/,O=/\s/g;t.default={mask:i,pipe:d.default}},function(e,t){"use strict";function n(e,t){var n=t.currentCaretPosition,o=t.rawValue,f=t.previousConformedValue,p=t.placeholderChar,v=e;v=r(v);var y=v.indexOf(a),g=null===o.match(new RegExp("[^@\\s."+p+"]"));if(g)return u;if(v.indexOf(l)!==-1||y!==-1&&n!==y+1||o.indexOf(i)===-1&&f!==u&&o.indexOf(c)!==-1)return!1;var m=v.indexOf(i),h=v.slice(m+1,v.length);return(h.match(d)||s).length>1&&v.substr(-1)===c&&n!==o.length&&(v=v.slice(0,v.length-1)),v}function r(e){var t=0;return e.replace(o,function(){return t++,1===t?i:u})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var i="@",o=/@/g,u="",a="@.",c=".",l="..",s=[],d=/\./g}])});
{
"name": "text-mask-addons",
"version": "3.7.2",
"version": "3.8.0",
"description": "Addons for Text Mask https://github.com/text-mask/text-mask",

@@ -5,0 +5,0 @@ "main": "dist/textMaskAddons.js",

@@ -73,3 +73,8 @@ # Text Mask Addons

The `createAutoCorrectedDatePipe` returns a `autoCorrectedDatePipe`, which can help the user in entering a date.
The `createAutoCorrectedDatePipe` accepts a string specifying date format and an object with the following keys:
1. `minYear` (number): the minimum year allowed in the date field `mask`.
1. `maxYear` (number): the maximum year allowed in the date field `mask`.
For example, if the user enters a value

@@ -76,0 +81,0 @@ larger than `1` in the 1st slot of month, it appends `0` to it. That is `4` => `04`. It does a similar thing for the

@@ -1,7 +0,14 @@

export default function createAutoCorrectedDatePipe(dateFormat = 'mm dd yyyy') {
const maxValueMonth = [31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
const formatOrder = ['yyyy', 'yy', 'mm', 'dd', 'HH', 'MM', 'SS']
export default function createAutoCorrectedDatePipe(dateFormat = 'mm dd yyyy', {
minYear = 1,
maxYear = 9999
} = {}) {
const dateFormatArray = dateFormat
.split(/[^dmyHMS]+/)
.sort((a, b) => formatOrder.indexOf(a) - formatOrder.indexOf(b))
return function(conformedValue) {
const indexesOfPipedChars = []
const dateFormatArray = dateFormat.split(/[^dmyHMS]+/)
const maxValue = {'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': 9999, 'HH': 23, 'MM': 59, 'SS': 59}
const minValue = {'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': 1, 'HH': 0, 'MM': 0, 'SS': 0}
const maxValue = {'dd': 31, 'mm': 12, 'yy': 99, 'yyyy': maxYear, 'HH': 23, 'MM': 59, 'SS': 59}
const minValue = {'dd': 1, 'mm': 1, 'yy': 0, 'yyyy': minYear, 'HH': 0, 'MM': 0, 'SS': 0}
const conformedValueArr = conformedValue.split('')

@@ -22,2 +29,3 @@

// Check for invalid date
let month = 0
const isInvalid = dateFormatArray.some((format) => {

@@ -28,4 +36,12 @@ const position = dateFormat.indexOf(format)

const value = parseInt(textValue, 10)
return value > maxValue[format] || (textValue.length === length && value < minValue[format])
if (format === 'mm') {
month = value || 0
}
const maxValueForFormat = format === 'dd' ? maxValueMonth[month] : maxValue[format]
if (format === 'yyyy' && (minYear !== 1 || maxYear !== 9999)) {
const scopedMaxValue = parseInt(maxValue[format].toString().substring(0, textValue.length), 10)
const scopedMinValue = parseInt(minValue[format].toString().substring(0, textValue.length), 10)
return value < scopedMinValue || value > scopedMaxValue
}
return value > maxValueForFormat || (textValue.length === length && value < minValue[format])
})

@@ -32,0 +48,0 @@

@@ -52,2 +52,18 @@ const createAutoCorrectedDatePipe = (isVerify()) ?

it('returns false for out of range day before known month', () => {
const pipe = createAutoCorrectedDatePipe('dd/mm')
expect(pipe('30/02')).to.equal(false, "pipe('30/02')")
expect(pipe('32/01')).to.equal(false, "pipe('32/01')")
})
it('returns false if month is not known and day is greater than 31', () => {
const pipe = createAutoCorrectedDatePipe('dd/mm')
expect(pipe('32/')).to.equal(false, "pipe('32/')")
})
it('returns false if month is known and day is greater than allowed value in month', () => {
let pipe = createAutoCorrectedDatePipe('mm/dd')
expect(pipe('02/30')).to.equal(false, "pipe('02/30')")
expect(pipe('02/31')).to.equal(false, "pipe('02/31')")
expect(pipe('11/31')).to.equal(false, "pipe('11/31')")
expect(pipe('01/32')).to.equal(false, "pipe('01/32')")
})
describe('datetime', () => {

@@ -110,2 +126,69 @@ let autoCorrectedDateTimePipe

})
describe('createAutoCorrectDatePipe with min year', () => {
let autoCorrectedDateTimePipe
it('accepts minimum year as the second parameter and returns a date time pipe function', () => {
autoCorrectedDateTimePipe = createAutoCorrectedDatePipe('mm dd yyyy', {minYear: 1999})
})
it('returns false if year 1st digit is less than 1', () => {
expect(autoCorrectedDateTimePipe('12/31/0')).to.equal(false)
})
it('returns false if year 2st digit is less than 9', () => {
expect(autoCorrectedDateTimePipe('12/31/18')).to.equal(false)
})
it('returns false if year 3rd digit is less than 9', () => {
expect(autoCorrectedDateTimePipe('12/31/198')).to.equal(false)
})
it('returns false if year 4th digit is less than 9', () => {
expect(autoCorrectedDateTimePipe('12/31/1998')).to.equal(false)
})
it('allows for min year', () => {
let pipe = createAutoCorrectedDatePipe('mm dd yyyy', {minYear: 1999})
expect(pipe('12 31 1999')).to.deep.equal({value: '12 31 1999', indexesOfPipedChars: []})
})
})
describe('createAutoCorrectDatePipe with min and max year', () => {
let autoCorrectedDateTimePipe
it('accepts min and max year as the second/third parameter and returns a date time pipe function', () => {
autoCorrectedDateTimePipe = createAutoCorrectedDatePipe('mm dd yyyy', {minYear: 1999, maxYear: 2020})
})
it('returns false if year 1st digit is more than 2', () => {
expect(autoCorrectedDateTimePipe('12/31/3')).to.equal(false)
})
it('returns false if year 2st digit is more than 0', () => {
expect(autoCorrectedDateTimePipe('12/31/21')).to.equal(false)
})
it('returns false if year 3rd digit is more than 2', () => {
expect(autoCorrectedDateTimePipe('12/31/203')).to.equal(false)
})
it('returns false if year 4th digit is more than 0', () => {
expect(autoCorrectedDateTimePipe('12/31/2021')).to.equal(false)
})
it('allows for a year at the top side of the range', () => {
let pipe = createAutoCorrectedDatePipe('mm dd yyyy', {minYear: 1990, maxYear: 2020})
expect(pipe('12 31 2020')).to.deep.equal({value: '12 31 2020', indexesOfPipedChars: []})
})
it('allows for a year within the range', () => {
let pipe = createAutoCorrectedDatePipe('mm dd yyyy', {minYear: 1990, maxYear: 2020})
expect(pipe('12 31 2000')).to.deep.equal({value: '12 31 2000', indexesOfPipedChars: []})
})
it('allows for a year at the bottom side of the range', () => {
let pipe = createAutoCorrectedDatePipe('mm dd yyyy', {minYear: 1990, maxYear: 2020})
expect(pipe('12 31 1990')).to.deep.equal({value: '12 31 1990', indexesOfPipedChars: []})
})
})
})
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