.'\n );\n }\n }\n addAttr(el, name, JSON.stringify(value));\n // #6887 firefox doesn't update muted state if set via attribute\n // even immediately after element creation\n if (!el.component &&\n name === 'muted' &&\n platformMustUseProp(el.tag, el.attrsMap.type, name)) {\n addProp(el, name, 'true');\n }\n }\n }\n}\n\nfunction checkInFor (el) {\n var parent = el;\n while (parent) {\n if (parent.for !== undefined) {\n return true\n }\n parent = parent.parent;\n }\n return false\n}\n\nfunction parseModifiers (name) {\n var match = name.match(modifierRE);\n if (match) {\n var ret = {};\n match.forEach(function (m) { ret[m.slice(1)] = true; });\n return ret\n }\n}\n\nfunction makeAttrsMap (attrs) {\n var map = {};\n for (var i = 0, l = attrs.length; i < l; i++) {\n if (\n process.env.NODE_ENV !== 'production' &&\n map[attrs[i].name] && !isIE && !isEdge\n ) {\n warn$2('duplicate attribute: ' + attrs[i].name);\n }\n map[attrs[i].name] = attrs[i].value;\n }\n return map\n}\n\n// for script (e.g. type=\"x/template\") or style, do not decode content\nfunction isTextTag (el) {\n return el.tag === 'script' || el.tag === 'style'\n}\n\nfunction isForbiddenTag (el) {\n return (\n el.tag === 'style' ||\n (el.tag === 'script' && (\n !el.attrsMap.type ||\n el.attrsMap.type === 'text/javascript'\n ))\n )\n}\n\nvar ieNSBug = /^xmlns:NS\\d+/;\nvar ieNSPrefix = /^NS\\d+:/;\n\n/* istanbul ignore next */\nfunction guardIESVGBug (attrs) {\n var res = [];\n for (var i = 0; i < attrs.length; i++) {\n var attr = attrs[i];\n if (!ieNSBug.test(attr.name)) {\n attr.name = attr.name.replace(ieNSPrefix, '');\n res.push(attr);\n }\n }\n return res\n}\n\nfunction checkForAliasModel (el, value) {\n var _el = el;\n while (_el) {\n if (_el.for && _el.alias === value) {\n warn$2(\n \"<\" + (el.tag) + \" v-model=\\\"\" + value + \"\\\">: \" +\n \"You are binding v-model directly to a v-for iteration alias. \" +\n \"This will not be able to modify the v-for source array because \" +\n \"writing to the alias is like modifying a function local variable. \" +\n \"Consider using an array of objects and use v-model on an object property instead.\"\n );\n }\n _el = _el.parent;\n }\n}\n\n/* */\n\n/**\n * Expand input[v-model] with dyanmic type bindings into v-if-else chains\n * Turn this:\n *
\n */\n\nfunction preTransformNode (el, options) {\n if (el.tag === 'input') {\n var map = el.attrsMap;\n if (map['v-model'] && (map['v-bind:type'] || map[':type'])) {\n var typeBinding = getBindingAttr(el, 'type');\n var ifCondition = getAndRemoveAttr(el, 'v-if', true);\n var ifConditionExtra = ifCondition ? (\"&&(\" + ifCondition + \")\") : \"\";\n var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;\n var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);\n // 1. checkbox\n var branch0 = cloneASTElement(el);\n // process for on the main node\n processFor(branch0);\n addRawAttr(branch0, 'type', 'checkbox');\n processElement(branch0, options);\n branch0.processed = true; // prevent it from double-processed\n branch0.if = \"(\" + typeBinding + \")==='checkbox'\" + ifConditionExtra;\n addIfCondition(branch0, {\n exp: branch0.if,\n block: branch0\n });\n // 2. add radio else-if condition\n var branch1 = cloneASTElement(el);\n getAndRemoveAttr(branch1, 'v-for', true);\n addRawAttr(branch1, 'type', 'radio');\n processElement(branch1, options);\n addIfCondition(branch0, {\n exp: \"(\" + typeBinding + \")==='radio'\" + ifConditionExtra,\n block: branch1\n });\n // 3. other\n var branch2 = cloneASTElement(el);\n getAndRemoveAttr(branch2, 'v-for', true);\n addRawAttr(branch2, ':type', typeBinding);\n processElement(branch2, options);\n addIfCondition(branch0, {\n exp: ifCondition,\n block: branch2\n });\n\n if (hasElse) {\n branch0.else = true;\n } else if (elseIfCondition) {\n branch0.elseif = elseIfCondition;\n }\n\n return branch0\n }\n }\n}\n\nfunction cloneASTElement (el) {\n return createASTElement(el.tag, el.attrsList.slice(), el.parent)\n}\n\nvar model$2 = {\n preTransformNode: preTransformNode\n};\n\nvar modules$1 = [\n klass$1,\n style$1,\n model$2\n];\n\n/* */\n\nfunction text (el, dir) {\n if (dir.value) {\n addProp(el, 'textContent', (\"_s(\" + (dir.value) + \")\"));\n }\n}\n\n/* */\n\nfunction html (el, dir) {\n if (dir.value) {\n addProp(el, 'innerHTML', (\"_s(\" + (dir.value) + \")\"));\n }\n}\n\nvar directives$1 = {\n model: model,\n text: text,\n html: html\n};\n\n/* */\n\nvar baseOptions = {\n expectHTML: true,\n modules: modules$1,\n directives: directives$1,\n isPreTag: isPreTag,\n isUnaryTag: isUnaryTag,\n mustUseProp: mustUseProp,\n canBeLeftOpenTag: canBeLeftOpenTag,\n isReservedTag: isReservedTag,\n getTagNamespace: getTagNamespace,\n staticKeys: genStaticKeys(modules$1)\n};\n\n/* */\n\nvar isStaticKey;\nvar isPlatformReservedTag;\n\nvar genStaticKeysCached = cached(genStaticKeys$1);\n\n/**\n * Goal of the optimizer: walk the generated template AST tree\n * and detect sub-trees that are purely static, i.e. parts of\n * the DOM that never needs to change.\n *\n * Once we detect these sub-trees, we can:\n *\n * 1. Hoist them into constants, so that we no longer need to\n * create fresh nodes for them on each re-render;\n * 2. Completely skip them in the patching process.\n */\nfunction optimize (root, options) {\n if (!root) { return }\n isStaticKey = genStaticKeysCached(options.staticKeys || '');\n isPlatformReservedTag = options.isReservedTag || no;\n // first pass: mark all non-static nodes.\n markStatic$1(root);\n // second pass: mark static roots.\n markStaticRoots(root, false);\n}\n\nfunction genStaticKeys$1 (keys) {\n return makeMap(\n 'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +\n (keys ? ',' + keys : '')\n )\n}\n\nfunction markStatic$1 (node) {\n node.static = isStatic(node);\n if (node.type === 1) {\n // do not make component slot content static. this avoids\n // 1. components not able to mutate slot nodes\n // 2. static slot content fails for hot-reloading\n if (\n !isPlatformReservedTag(node.tag) &&\n node.tag !== 'slot' &&\n node.attrsMap['inline-template'] == null\n ) {\n return\n }\n for (var i = 0, l = node.children.length; i < l; i++) {\n var child = node.children[i];\n markStatic$1(child);\n if (!child.static) {\n node.static = false;\n }\n }\n if (node.ifConditions) {\n for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {\n var block = node.ifConditions[i$1].block;\n markStatic$1(block);\n if (!block.static) {\n node.static = false;\n }\n }\n }\n }\n}\n\nfunction markStaticRoots (node, isInFor) {\n if (node.type === 1) {\n if (node.static || node.once) {\n node.staticInFor = isInFor;\n }\n // For a node to qualify as a static root, it should have children that\n // are not just static text. Otherwise the cost of hoisting out will\n // outweigh the benefits and it's better off to just always render it fresh.\n if (node.static && node.children.length && !(\n node.children.length === 1 &&\n node.children[0].type === 3\n )) {\n node.staticRoot = true;\n return\n } else {\n node.staticRoot = false;\n }\n if (node.children) {\n for (var i = 0, l = node.children.length; i < l; i++) {\n markStaticRoots(node.children[i], isInFor || !!node.for);\n }\n }\n if (node.ifConditions) {\n for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {\n markStaticRoots(node.ifConditions[i$1].block, isInFor);\n }\n }\n }\n}\n\nfunction isStatic (node) {\n if (node.type === 2) { // expression\n return false\n }\n if (node.type === 3) { // text\n return true\n }\n return !!(node.pre || (\n !node.hasBindings && // no dynamic bindings\n !node.if && !node.for && // not v-if or v-for or v-else\n !isBuiltInTag(node.tag) && // not a built-in\n isPlatformReservedTag(node.tag) && // not a component\n !isDirectChildOfTemplateFor(node) &&\n Object.keys(node).every(isStaticKey)\n ))\n}\n\nfunction isDirectChildOfTemplateFor (node) {\n while (node.parent) {\n node = node.parent;\n if (node.tag !== 'template') {\n return false\n }\n if (node.for) {\n return true\n }\n }\n return false\n}\n\n/* */\n\nvar fnExpRE = /^\\s*([\\w$_]+|\\([^)]*?\\))\\s*=>|^function\\s*\\(/;\nvar simplePathRE = /^\\s*[A-Za-z_$][\\w$]*(?:\\.[A-Za-z_$][\\w$]*|\\['.*?']|\\[\".*?\"]|\\[\\d+]|\\[[A-Za-z_$][\\w$]*])*\\s*$/;\n\n// keyCode aliases\nvar keyCodes = {\n esc: 27,\n tab: 9,\n enter: 13,\n space: 32,\n up: 38,\n left: 37,\n right: 39,\n down: 40,\n 'delete': [8, 46]\n};\n\n// #4868: modifiers that prevent the execution of the listener\n// need to explicitly return null so that we can determine whether to remove\n// the listener for .once\nvar genGuard = function (condition) { return (\"if(\" + condition + \")return null;\"); };\n\nvar modifierCode = {\n stop: '$event.stopPropagation();',\n prevent: '$event.preventDefault();',\n self: genGuard(\"$event.target !== $event.currentTarget\"),\n ctrl: genGuard(\"!$event.ctrlKey\"),\n shift: genGuard(\"!$event.shiftKey\"),\n alt: genGuard(\"!$event.altKey\"),\n meta: genGuard(\"!$event.metaKey\"),\n left: genGuard(\"'button' in $event && $event.button !== 0\"),\n middle: genGuard(\"'button' in $event && $event.button !== 1\"),\n right: genGuard(\"'button' in $event && $event.button !== 2\")\n};\n\nfunction genHandlers (\n events,\n isNative,\n warn\n) {\n var res = isNative ? 'nativeOn:{' : 'on:{';\n for (var name in events) {\n res += \"\\\"\" + name + \"\\\":\" + (genHandler(name, events[name])) + \",\";\n }\n return res.slice(0, -1) + '}'\n}\n\nfunction genHandler (\n name,\n handler\n) {\n if (!handler) {\n return 'function(){}'\n }\n\n if (Array.isArray(handler)) {\n return (\"[\" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + \"]\")\n }\n\n var isMethodPath = simplePathRE.test(handler.value);\n var isFunctionExpression = fnExpRE.test(handler.value);\n\n if (!handler.modifiers) {\n if (isMethodPath || isFunctionExpression) {\n return handler.value\n }\n /* istanbul ignore if */\n return (\"function($event){\" + (handler.value) + \"}\") // inline statement\n } else {\n var code = '';\n var genModifierCode = '';\n var keys = [];\n for (var key in handler.modifiers) {\n if (modifierCode[key]) {\n genModifierCode += modifierCode[key];\n // left/right\n if (keyCodes[key]) {\n keys.push(key);\n }\n } else if (key === 'exact') {\n var modifiers = (handler.modifiers);\n genModifierCode += genGuard(\n ['ctrl', 'shift', 'alt', 'meta']\n .filter(function (keyModifier) { return !modifiers[keyModifier]; })\n .map(function (keyModifier) { return (\"$event.\" + keyModifier + \"Key\"); })\n .join('||')\n );\n } else {\n keys.push(key);\n }\n }\n if (keys.length) {\n code += genKeyFilter(keys);\n }\n // Make sure modifiers like prevent and stop get executed after key filtering\n if (genModifierCode) {\n code += genModifierCode;\n }\n var handlerCode = isMethodPath\n ? handler.value + '($event)'\n : isFunctionExpression\n ? (\"(\" + (handler.value) + \")($event)\")\n : handler.value;\n /* istanbul ignore if */\n return (\"function($event){\" + code + handlerCode + \"}\")\n }\n}\n\nfunction genKeyFilter (keys) {\n return (\"if(!('button' in $event)&&\" + (keys.map(genFilterCode).join('&&')) + \")return null;\")\n}\n\nfunction genFilterCode (key) {\n var keyVal = parseInt(key, 10);\n if (keyVal) {\n return (\"$event.keyCode!==\" + keyVal)\n }\n var code = keyCodes[key];\n return (\n \"_k($event.keyCode,\" +\n (JSON.stringify(key)) + \",\" +\n (JSON.stringify(code)) + \",\" +\n \"$event.key)\"\n )\n}\n\n/* */\n\nfunction on (el, dir) {\n if (process.env.NODE_ENV !== 'production' && dir.modifiers) {\n warn(\"v-on without argument does not support modifiers.\");\n }\n el.wrapListeners = function (code) { return (\"_g(\" + code + \",\" + (dir.value) + \")\"); };\n}\n\n/* */\n\nfunction bind$1 (el, dir) {\n el.wrapData = function (code) {\n return (\"_b(\" + code + \",'\" + (el.tag) + \"',\" + (dir.value) + \",\" + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + \")\")\n };\n}\n\n/* */\n\nvar baseDirectives = {\n on: on,\n bind: bind$1,\n cloak: noop\n};\n\n/* */\n\nvar CodegenState = function CodegenState (options) {\n this.options = options;\n this.warn = options.warn || baseWarn;\n this.transforms = pluckModuleFunction(options.modules, 'transformCode');\n this.dataGenFns = pluckModuleFunction(options.modules, 'genData');\n this.directives = extend(extend({}, baseDirectives), options.directives);\n var isReservedTag = options.isReservedTag || no;\n this.maybeComponent = function (el) { return !isReservedTag(el.tag); };\n this.onceId = 0;\n this.staticRenderFns = [];\n};\n\n\n\nfunction generate (\n ast,\n options\n) {\n var state = new CodegenState(options);\n var code = ast ? genElement(ast, state) : '_c(\"div\")';\n return {\n render: (\"with(this){return \" + code + \"}\"),\n staticRenderFns: state.staticRenderFns\n }\n}\n\nfunction genElement (el, state) {\n if (el.staticRoot && !el.staticProcessed) {\n return genStatic(el, state)\n } else if (el.once && !el.onceProcessed) {\n return genOnce(el, state)\n } else if (el.for && !el.forProcessed) {\n return genFor(el, state)\n } else if (el.if && !el.ifProcessed) {\n return genIf(el, state)\n } else if (el.tag === 'template' && !el.slotTarget) {\n return genChildren(el, state) || 'void 0'\n } else if (el.tag === 'slot') {\n return genSlot(el, state)\n } else {\n // component or element\n var code;\n if (el.component) {\n code = genComponent(el.component, el, state);\n } else {\n var data = el.plain ? undefined : genData$2(el, state);\n\n var children = el.inlineTemplate ? null : genChildren(el, state, true);\n code = \"_c('\" + (el.tag) + \"'\" + (data ? (\",\" + data) : '') + (children ? (\",\" + children) : '') + \")\";\n }\n // module transforms\n for (var i = 0; i < state.transforms.length; i++) {\n code = state.transforms[i](el, code);\n }\n return code\n }\n}\n\n// hoist static sub-trees out\nfunction genStatic (el, state) {\n el.staticProcessed = true;\n state.staticRenderFns.push((\"with(this){return \" + (genElement(el, state)) + \"}\"));\n return (\"_m(\" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + \")\")\n}\n\n// v-once\nfunction genOnce (el, state) {\n el.onceProcessed = true;\n if (el.if && !el.ifProcessed) {\n return genIf(el, state)\n } else if (el.staticInFor) {\n var key = '';\n var parent = el.parent;\n while (parent) {\n if (parent.for) {\n key = parent.key;\n break\n }\n parent = parent.parent;\n }\n if (!key) {\n process.env.NODE_ENV !== 'production' && state.warn(\n \"v-once can only be used inside v-for that is keyed. \"\n );\n return genElement(el, state)\n }\n return (\"_o(\" + (genElement(el, state)) + \",\" + (state.onceId++) + \",\" + key + \")\")\n } else {\n return genStatic(el, state)\n }\n}\n\nfunction genIf (\n el,\n state,\n altGen,\n altEmpty\n) {\n el.ifProcessed = true; // avoid recursion\n return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)\n}\n\nfunction genIfConditions (\n conditions,\n state,\n altGen,\n altEmpty\n) {\n if (!conditions.length) {\n return altEmpty || '_e()'\n }\n\n var condition = conditions.shift();\n if (condition.exp) {\n return (\"(\" + (condition.exp) + \")?\" + (genTernaryExp(condition.block)) + \":\" + (genIfConditions(conditions, state, altGen, altEmpty)))\n } else {\n return (\"\" + (genTernaryExp(condition.block)))\n }\n\n // v-if with v-once should generate code like (a)?_m(0):_m(1)\n function genTernaryExp (el) {\n return altGen\n ? altGen(el, state)\n : el.once\n ? genOnce(el, state)\n : genElement(el, state)\n }\n}\n\nfunction genFor (\n el,\n state,\n altGen,\n altHelper\n) {\n var exp = el.for;\n var alias = el.alias;\n var iterator1 = el.iterator1 ? (\",\" + (el.iterator1)) : '';\n var iterator2 = el.iterator2 ? (\",\" + (el.iterator2)) : '';\n\n if (process.env.NODE_ENV !== 'production' &&\n state.maybeComponent(el) &&\n el.tag !== 'slot' &&\n el.tag !== 'template' &&\n !el.key\n ) {\n state.warn(\n \"<\" + (el.tag) + \" v-for=\\\"\" + alias + \" in \" + exp + \"\\\">: component lists rendered with \" +\n \"v-for should have explicit keys. \" +\n \"See https://vuejs.org/guide/list.html#key for more info.\",\n true /* tip */\n );\n }\n\n el.forProcessed = true; // avoid recursion\n return (altHelper || '_l') + \"((\" + exp + \"),\" +\n \"function(\" + alias + iterator1 + iterator2 + \"){\" +\n \"return \" + ((altGen || genElement)(el, state)) +\n '})'\n}\n\nfunction genData$2 (el, state) {\n var data = '{';\n\n // directives first.\n // directives may mutate the el's other properties before they are generated.\n var dirs = genDirectives(el, state);\n if (dirs) { data += dirs + ','; }\n\n // key\n if (el.key) {\n data += \"key:\" + (el.key) + \",\";\n }\n // ref\n if (el.ref) {\n data += \"ref:\" + (el.ref) + \",\";\n }\n if (el.refInFor) {\n data += \"refInFor:true,\";\n }\n // pre\n if (el.pre) {\n data += \"pre:true,\";\n }\n // record original tag name for components using \"is\" attribute\n if (el.component) {\n data += \"tag:\\\"\" + (el.tag) + \"\\\",\";\n }\n // module data generation functions\n for (var i = 0; i < state.dataGenFns.length; i++) {\n data += state.dataGenFns[i](el);\n }\n // attributes\n if (el.attrs) {\n data += \"attrs:{\" + (genProps(el.attrs)) + \"},\";\n }\n // DOM props\n if (el.props) {\n data += \"domProps:{\" + (genProps(el.props)) + \"},\";\n }\n // event handlers\n if (el.events) {\n data += (genHandlers(el.events, false, state.warn)) + \",\";\n }\n if (el.nativeEvents) {\n data += (genHandlers(el.nativeEvents, true, state.warn)) + \",\";\n }\n // slot target\n // only for non-scoped slots\n if (el.slotTarget && !el.slotScope) {\n data += \"slot:\" + (el.slotTarget) + \",\";\n }\n // scoped slots\n if (el.scopedSlots) {\n data += (genScopedSlots(el.scopedSlots, state)) + \",\";\n }\n // component v-model\n if (el.model) {\n data += \"model:{value:\" + (el.model.value) + \",callback:\" + (el.model.callback) + \",expression:\" + (el.model.expression) + \"},\";\n }\n // inline-template\n if (el.inlineTemplate) {\n var inlineTemplate = genInlineTemplate(el, state);\n if (inlineTemplate) {\n data += inlineTemplate + \",\";\n }\n }\n data = data.replace(/,$/, '') + '}';\n // v-bind data wrap\n if (el.wrapData) {\n data = el.wrapData(data);\n }\n // v-on data wrap\n if (el.wrapListeners) {\n data = el.wrapListeners(data);\n }\n return data\n}\n\nfunction genDirectives (el, state) {\n var dirs = el.directives;\n if (!dirs) { return }\n var res = 'directives:[';\n var hasRuntime = false;\n var i, l, dir, needRuntime;\n for (i = 0, l = dirs.length; i < l; i++) {\n dir = dirs[i];\n needRuntime = true;\n var gen = state.directives[dir.name];\n if (gen) {\n // compile-time directive that manipulates AST.\n // returns true if it also needs a runtime counterpart.\n needRuntime = !!gen(el, dir, state.warn);\n }\n if (needRuntime) {\n hasRuntime = true;\n res += \"{name:\\\"\" + (dir.name) + \"\\\",rawName:\\\"\" + (dir.rawName) + \"\\\"\" + (dir.value ? (\",value:(\" + (dir.value) + \"),expression:\" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (\",arg:\\\"\" + (dir.arg) + \"\\\"\") : '') + (dir.modifiers ? (\",modifiers:\" + (JSON.stringify(dir.modifiers))) : '') + \"},\";\n }\n }\n if (hasRuntime) {\n return res.slice(0, -1) + ']'\n }\n}\n\nfunction genInlineTemplate (el, state) {\n var ast = el.children[0];\n if (process.env.NODE_ENV !== 'production' && (\n el.children.length !== 1 || ast.type !== 1\n )) {\n state.warn('Inline-template components must have exactly one child element.');\n }\n if (ast.type === 1) {\n var inlineRenderFns = generate(ast, state.options);\n return (\"inlineTemplate:{render:function(){\" + (inlineRenderFns.render) + \"},staticRenderFns:[\" + (inlineRenderFns.staticRenderFns.map(function (code) { return (\"function(){\" + code + \"}\"); }).join(',')) + \"]}\")\n }\n}\n\nfunction genScopedSlots (\n slots,\n state\n) {\n return (\"scopedSlots:_u([\" + (Object.keys(slots).map(function (key) {\n return genScopedSlot(key, slots[key], state)\n }).join(',')) + \"])\")\n}\n\nfunction genScopedSlot (\n key,\n el,\n state\n) {\n if (el.for && !el.forProcessed) {\n return genForScopedSlot(key, el, state)\n }\n var fn = \"function(\" + (String(el.slotScope)) + \"){\" +\n \"return \" + (el.tag === 'template'\n ? el.if\n ? ((el.if) + \"?\" + (genChildren(el, state) || 'undefined') + \":undefined\")\n : genChildren(el, state) || 'undefined'\n : genElement(el, state)) + \"}\";\n return (\"{key:\" + key + \",fn:\" + fn + \"}\")\n}\n\nfunction genForScopedSlot (\n key,\n el,\n state\n) {\n var exp = el.for;\n var alias = el.alias;\n var iterator1 = el.iterator1 ? (\",\" + (el.iterator1)) : '';\n var iterator2 = el.iterator2 ? (\",\" + (el.iterator2)) : '';\n el.forProcessed = true; // avoid recursion\n return \"_l((\" + exp + \"),\" +\n \"function(\" + alias + iterator1 + iterator2 + \"){\" +\n \"return \" + (genScopedSlot(key, el, state)) +\n '})'\n}\n\nfunction genChildren (\n el,\n state,\n checkSkip,\n altGenElement,\n altGenNode\n) {\n var children = el.children;\n if (children.length) {\n var el$1 = children[0];\n // optimize single v-for\n if (children.length === 1 &&\n el$1.for &&\n el$1.tag !== 'template' &&\n el$1.tag !== 'slot'\n ) {\n return (altGenElement || genElement)(el$1, state)\n }\n var normalizationType = checkSkip\n ? getNormalizationType(children, state.maybeComponent)\n : 0;\n var gen = altGenNode || genNode;\n return (\"[\" + (children.map(function (c) { return gen(c, state); }).join(',')) + \"]\" + (normalizationType ? (\",\" + normalizationType) : ''))\n }\n}\n\n// determine the normalization needed for the children array.\n// 0: no normalization needed\n// 1: simple normalization needed (possible 1-level deep nested array)\n// 2: full normalization needed\nfunction getNormalizationType (\n children,\n maybeComponent\n) {\n var res = 0;\n for (var i = 0; i < children.length; i++) {\n var el = children[i];\n if (el.type !== 1) {\n continue\n }\n if (needsNormalization(el) ||\n (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {\n res = 2;\n break\n }\n if (maybeComponent(el) ||\n (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {\n res = 1;\n }\n }\n return res\n}\n\nfunction needsNormalization (el) {\n return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'\n}\n\nfunction genNode (node, state) {\n if (node.type === 1) {\n return genElement(node, state)\n } if (node.type === 3 && node.isComment) {\n return genComment(node)\n } else {\n return genText(node)\n }\n}\n\nfunction genText (text) {\n return (\"_v(\" + (text.type === 2\n ? text.expression // no need for () because already wrapped in _s()\n : transformSpecialNewlines(JSON.stringify(text.text))) + \")\")\n}\n\nfunction genComment (comment) {\n return (\"_e(\" + (JSON.stringify(comment.text)) + \")\")\n}\n\nfunction genSlot (el, state) {\n var slotName = el.slotName || '\"default\"';\n var children = genChildren(el, state);\n var res = \"_t(\" + slotName + (children ? (\",\" + children) : '');\n var attrs = el.attrs && (\"{\" + (el.attrs.map(function (a) { return ((camelize(a.name)) + \":\" + (a.value)); }).join(',')) + \"}\");\n var bind$$1 = el.attrsMap['v-bind'];\n if ((attrs || bind$$1) && !children) {\n res += \",null\";\n }\n if (attrs) {\n res += \",\" + attrs;\n }\n if (bind$$1) {\n res += (attrs ? '' : ',null') + \",\" + bind$$1;\n }\n return res + ')'\n}\n\n// componentName is el.component, take it as argument to shun flow's pessimistic refinement\nfunction genComponent (\n componentName,\n el,\n state\n) {\n var children = el.inlineTemplate ? null : genChildren(el, state, true);\n return (\"_c(\" + componentName + \",\" + (genData$2(el, state)) + (children ? (\",\" + children) : '') + \")\")\n}\n\nfunction genProps (props) {\n var res = '';\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n /* istanbul ignore if */\n {\n res += \"\\\"\" + (prop.name) + \"\\\":\" + (transformSpecialNewlines(prop.value)) + \",\";\n }\n }\n return res.slice(0, -1)\n}\n\n// #3895, #4268\nfunction transformSpecialNewlines (text) {\n return text\n .replace(/\\u2028/g, '\\\\u2028')\n .replace(/\\u2029/g, '\\\\u2029')\n}\n\n/* */\n\n// these keywords should not appear inside expressions, but operators like\n// typeof, instanceof and in are allowed\nvar prohibitedKeywordRE = new RegExp('\\\\b' + (\n 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +\n 'super,throw,while,yield,delete,export,import,return,switch,default,' +\n 'extends,finally,continue,debugger,function,arguments'\n).split(',').join('\\\\b|\\\\b') + '\\\\b');\n\n// these unary operators should not be used as property/method names\nvar unaryOperatorsRE = new RegExp('\\\\b' + (\n 'delete,typeof,void'\n).split(',').join('\\\\s*\\\\([^\\\\)]*\\\\)|\\\\b') + '\\\\s*\\\\([^\\\\)]*\\\\)');\n\n// strip strings in expressions\nvar stripStringRE = /'(?:[^'\\\\]|\\\\.)*'|\"(?:[^\"\\\\]|\\\\.)*\"|`(?:[^`\\\\]|\\\\.)*\\$\\{|\\}(?:[^`\\\\]|\\\\.)*`|`(?:[^`\\\\]|\\\\.)*`/g;\n\n// detect problematic expressions in a template\nfunction detectErrors (ast) {\n var errors = [];\n if (ast) {\n checkNode(ast, errors);\n }\n return errors\n}\n\nfunction checkNode (node, errors) {\n if (node.type === 1) {\n for (var name in node.attrsMap) {\n if (dirRE.test(name)) {\n var value = node.attrsMap[name];\n if (value) {\n if (name === 'v-for') {\n checkFor(node, (\"v-for=\\\"\" + value + \"\\\"\"), errors);\n } else if (onRE.test(name)) {\n checkEvent(value, (name + \"=\\\"\" + value + \"\\\"\"), errors);\n } else {\n checkExpression(value, (name + \"=\\\"\" + value + \"\\\"\"), errors);\n }\n }\n }\n }\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n checkNode(node.children[i], errors);\n }\n }\n } else if (node.type === 2) {\n checkExpression(node.expression, node.text, errors);\n }\n}\n\nfunction checkEvent (exp, text, errors) {\n var stipped = exp.replace(stripStringRE, '');\n var keywordMatch = stipped.match(unaryOperatorsRE);\n if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {\n errors.push(\n \"avoid using JavaScript unary operator as property name: \" +\n \"\\\"\" + (keywordMatch[0]) + \"\\\" in expression \" + (text.trim())\n );\n }\n checkExpression(exp, text, errors);\n}\n\nfunction checkFor (node, text, errors) {\n checkExpression(node.for || '', text, errors);\n checkIdentifier(node.alias, 'v-for alias', text, errors);\n checkIdentifier(node.iterator1, 'v-for iterator', text, errors);\n checkIdentifier(node.iterator2, 'v-for iterator', text, errors);\n}\n\nfunction checkIdentifier (\n ident,\n type,\n text,\n errors\n) {\n if (typeof ident === 'string') {\n try {\n new Function((\"var \" + ident + \"=_\"));\n } catch (e) {\n errors.push((\"invalid \" + type + \" \\\"\" + ident + \"\\\" in expression: \" + (text.trim())));\n }\n }\n}\n\nfunction checkExpression (exp, text, errors) {\n try {\n new Function((\"return \" + exp));\n } catch (e) {\n var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);\n if (keywordMatch) {\n errors.push(\n \"avoid using JavaScript keyword as property name: \" +\n \"\\\"\" + (keywordMatch[0]) + \"\\\"\\n Raw expression: \" + (text.trim())\n );\n } else {\n errors.push(\n \"invalid expression: \" + (e.message) + \" in\\n\\n\" +\n \" \" + exp + \"\\n\\n\" +\n \" Raw expression: \" + (text.trim()) + \"\\n\"\n );\n }\n }\n}\n\n/* */\n\nfunction createFunction (code, errors) {\n try {\n return new Function(code)\n } catch (err) {\n errors.push({ err: err, code: code });\n return noop\n }\n}\n\nfunction createCompileToFunctionFn (compile) {\n var cache = Object.create(null);\n\n return function compileToFunctions (\n template,\n options,\n vm\n ) {\n options = extend({}, options);\n var warn$$1 = options.warn || warn;\n delete options.warn;\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production') {\n // detect possible CSP restriction\n try {\n new Function('return 1');\n } catch (e) {\n if (e.toString().match(/unsafe-eval|CSP/)) {\n warn$$1(\n 'It seems you are using the standalone build of Vue.js in an ' +\n 'environment with Content Security Policy that prohibits unsafe-eval. ' +\n 'The template compiler cannot work in this environment. Consider ' +\n 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\n 'templates into render functions.'\n );\n }\n }\n }\n\n // check cache\n var key = options.delimiters\n ? String(options.delimiters) + template\n : template;\n if (cache[key]) {\n return cache[key]\n }\n\n // compile\n var compiled = compile(template, options);\n\n // check compilation errors/tips\n if (process.env.NODE_ENV !== 'production') {\n if (compiled.errors && compiled.errors.length) {\n warn$$1(\n \"Error compiling template:\\n\\n\" + template + \"\\n\\n\" +\n compiled.errors.map(function (e) { return (\"- \" + e); }).join('\\n') + '\\n',\n vm\n );\n }\n if (compiled.tips && compiled.tips.length) {\n compiled.tips.forEach(function (msg) { return tip(msg, vm); });\n }\n }\n\n // turn code into functions\n var res = {};\n var fnGenErrors = [];\n res.render = createFunction(compiled.render, fnGenErrors);\n res.staticRenderFns = compiled.staticRenderFns.map(function (code) {\n return createFunction(code, fnGenErrors)\n });\n\n // check function generation errors.\n // this should only happen if there is a bug in the compiler itself.\n // mostly for codegen development use\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production') {\n if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {\n warn$$1(\n \"Failed to generate render function:\\n\\n\" +\n fnGenErrors.map(function (ref) {\n var err = ref.err;\n var code = ref.code;\n\n return ((err.toString()) + \" in\\n\\n\" + code + \"\\n\");\n }).join('\\n'),\n vm\n );\n }\n }\n\n return (cache[key] = res)\n }\n}\n\n/* */\n\nfunction createCompilerCreator (baseCompile) {\n return function createCompiler (baseOptions) {\n function compile (\n template,\n options\n ) {\n var finalOptions = Object.create(baseOptions);\n var errors = [];\n var tips = [];\n finalOptions.warn = function (msg, tip) {\n (tip ? tips : errors).push(msg);\n };\n\n if (options) {\n // merge custom modules\n if (options.modules) {\n finalOptions.modules =\n (baseOptions.modules || []).concat(options.modules);\n }\n // merge custom directives\n if (options.directives) {\n finalOptions.directives = extend(\n Object.create(baseOptions.directives || null),\n options.directives\n );\n }\n // copy other options\n for (var key in options) {\n if (key !== 'modules' && key !== 'directives') {\n finalOptions[key] = options[key];\n }\n }\n }\n\n var compiled = baseCompile(template, finalOptions);\n if (process.env.NODE_ENV !== 'production') {\n errors.push.apply(errors, detectErrors(compiled.ast));\n }\n compiled.errors = errors;\n compiled.tips = tips;\n return compiled\n }\n\n return {\n compile: compile,\n compileToFunctions: createCompileToFunctionFn(compile)\n }\n }\n}\n\n/* */\n\n// `createCompilerCreator` allows creating compilers that use alternative\n// parser/optimizer/codegen, e.g the SSR optimizing compiler.\n// Here we just export a default compiler using the default parts.\nvar createCompiler = createCompilerCreator(function baseCompile (\n template,\n options\n) {\n var ast = parse(template.trim(), options);\n if (options.optimize !== false) {\n optimize(ast, options);\n }\n var code = generate(ast, options);\n return {\n ast: ast,\n render: code.render,\n staticRenderFns: code.staticRenderFns\n }\n});\n\n/* */\n\nvar ref$1 = createCompiler(baseOptions);\nvar compileToFunctions = ref$1.compileToFunctions;\n\n/* */\n\n// check whether current browser encodes a char inside attribute values\nvar div;\nfunction getShouldDecode (href) {\n div = div || document.createElement('div');\n div.innerHTML = href ? \"
\" : \"\";\n return div.innerHTML.indexOf('
') > 0\n}\n\n// #3663: IE encodes newlines inside attribute values while other browsers don't\nvar shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;\n// #6828: chrome encodes content in a[href]\nvar shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false;\n\n/* */\n\nvar idToTemplate = cached(function (id) {\n var el = query(id);\n return el && el.innerHTML\n});\n\nvar mount = Vue$3.prototype.$mount;\nVue$3.prototype.$mount = function (\n el,\n hydrating\n) {\n el = el && query(el);\n\n /* istanbul ignore if */\n if (el === document.body || el === document.documentElement) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Do not mount Vue to or - mount to normal elements instead.\"\n );\n return this\n }\n\n var options = this.$options;\n // resolve template/el and convert to render function\n if (!options.render) {\n var template = options.template;\n if (template) {\n if (typeof template === 'string') {\n if (template.charAt(0) === '#') {\n template = idToTemplate(template);\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !template) {\n warn(\n (\"Template element not found or is empty: \" + (options.template)),\n this\n );\n }\n }\n } else if (template.nodeType) {\n template = template.innerHTML;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn('invalid template option:' + template, this);\n }\n return this\n }\n } else if (el) {\n template = getOuterHTML(el);\n }\n if (template) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n mark('compile');\n }\n\n var ref = compileToFunctions(template, {\n shouldDecodeNewlines: shouldDecodeNewlines,\n shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,\n delimiters: options.delimiters,\n comments: options.comments\n }, this);\n var render = ref.render;\n var staticRenderFns = ref.staticRenderFns;\n options.render = render;\n options.staticRenderFns = staticRenderFns;\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && config.performance && mark) {\n mark('compile end');\n measure((\"vue \" + (this._name) + \" compile\"), 'compile', 'compile end');\n }\n }\n }\n return mount.call(this, el, hydrating)\n};\n\n/**\n * Get outerHTML of elements, taking care\n * of SVG elements in IE as well.\n */\nfunction getOuterHTML (el) {\n if (el.outerHTML) {\n return el.outerHTML\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML\n }\n}\n\nVue$3.compile = compileToFunctions;\n\nexport default Vue$3;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue/dist/vue.esm.js\n// module id = 7+uW\n// module chunks = 0","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_an-object.js\n// module id = 77Pl\n// module chunks = 0","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_global.js\n// module id = 7KvD\n// module chunks = 0","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/object/define-property.js\n// module id = 9bBU\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/object/define-property.js\n// module id = C4MV\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = DuR2\n// module chunks = 0","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_is-object.js\n// module id = EqjI\n// module chunks = 0","var core = module.exports = { version: '2.5.3' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_core.js\n// module id = FeBl\n// module chunks = 0","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_to-primitive.js\n// module id = MmMw\n// module chunks = 0","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_dom-create.js\n// module id = ON07\n// module chunks = 0","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_fails.js\n// module id = S82l\n// module chunks = 0","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_ie8-dom-define.js\n// module id = SfB7\n// module chunks = 0","/*!\n * vue-i18n v7.4.0 \n * (c) 2018 kazuya kawaguchi\n * Released under the MIT License.\n */\n/* */\n\n/**\n * utilites\n */\n\nfunction warn (msg, err) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n return toString.call(obj) === OBJECT_STRING\n}\n\nfunction isNull (val) {\n return val === null || val === undefined\n}\n\nfunction parseArgs () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var locale = null;\n var params = null;\n if (args.length === 1) {\n if (isObject(args[0]) || Array.isArray(args[0])) {\n params = args[0];\n } else if (typeof args[0] === 'string') {\n locale = args[0];\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n locale = args[0];\n }\n /* istanbul ignore if */\n if (isObject(args[1]) || Array.isArray(args[1])) {\n params = args[1];\n }\n }\n\n return { locale: locale, params: params }\n}\n\nfunction getOldChoiceIndexFixed (choice) {\n return choice\n ? choice > 1\n ? 1\n : 0\n : 1\n}\n\nfunction getChoiceIndex (choice, choicesLength) {\n choice = Math.abs(choice);\n\n if (choicesLength === 2) { return getOldChoiceIndexFixed(choice) }\n\n return choice ? Math.min(choice, 2) : 0\n}\n\nfunction fetchChoice (message, choice) {\n /* istanbul ignore if */\n if (!message && typeof message !== 'string') { return null }\n var choices = message.split('|');\n\n choice = getChoiceIndex(choice, choices.length);\n if (!choices[choice]) { return message }\n return choices[choice].trim()\n}\n\nfunction looseClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction remove (arr, item) {\n if (arr.length) {\n var index = arr.indexOf(item);\n if (index > -1) {\n return arr.splice(index, 1)\n }\n }\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\nfunction merge (target) {\n var arguments$1 = arguments;\n\n var output = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments$1[i];\n if (source !== undefined && source !== null) {\n var key = (void 0);\n for (key in source) {\n if (hasOwn(source, key)) {\n if (isObject(source[key])) {\n output[key] = merge(output[key], source[key]);\n } else {\n output[key] = source[key];\n }\n }\n }\n }\n }\n return output\n}\n\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\nvar canUseDateTimeFormat =\n typeof Intl !== 'undefined' && typeof Intl.DateTimeFormat !== 'undefined';\n\nvar canUseNumberFormat =\n typeof Intl !== 'undefined' && typeof Intl.NumberFormat !== 'undefined';\n\n/* */\n\nfunction extend (Vue) {\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$t', {\n get: function get () {\n var this$1 = this;\n\n return function (key) {\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n\n var i18n = this$1.$i18n;\n return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this$1 ].concat( values ))\n }\n }\n });\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$tc', {\n get: function get$1 () {\n var this$1 = this;\n\n return function (key, choice) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n var i18n = this$1.$i18n;\n return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this$1, choice ].concat( values ))\n }\n }\n });\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$te', {\n get: function get$2 () {\n var this$1 = this;\n\n return function (key, locale) {\n var i18n = this$1.$i18n;\n return i18n._te(key, i18n.locale, i18n._getMessages(), locale)\n }\n }\n });\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$d', {\n get: function get$3 () {\n var this$1 = this;\n\n return function (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n return (ref = this$1.$i18n).d.apply(ref, [ value ].concat( args ))\n var ref;\n }\n }\n });\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$n', {\n get: function get$4 () {\n var this$1 = this;\n\n return function (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n return (ref = this$1.$i18n).n.apply(ref, [ value ].concat( args ))\n var ref;\n }\n }\n });\n}\n\n/* */\n\nvar mixin = {\n beforeCreate: function beforeCreate () {\n var options = this.$options;\n options.i18n = options.i18n || (options.__i18n ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n if (options.__i18n) {\n try {\n var localeMessages = {};\n options.__i18n.forEach(function (resource) {\n localeMessages = merge(localeMessages, JSON.parse(resource));\n });\n Object.keys(localeMessages).forEach(function (locale) {\n options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);\n });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n this._i18n = options.i18n;\n this._i18nWatcher = this._i18n.watchI18nData();\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (isPlainObject(options.i18n)) {\n // component local i18n\n if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n options.i18n.root = this.$root.$i18n;\n options.i18n.formatter = this.$root.$i18n.formatter;\n options.i18n.fallbackLocale = this.$root.$i18n.fallbackLocale;\n options.i18n.silentTranslationWarn = this.$root.$i18n.silentTranslationWarn;\n }\n\n // init locale messages via custom blocks\n if (options.__i18n) {\n try {\n var localeMessages$1 = {};\n options.__i18n.forEach(function (resource) {\n localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));\n });\n options.i18n.messages = localeMessages$1;\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n this._i18n = new VueI18n(options.i18n);\n this._i18nWatcher = this._i18n.watchI18nData();\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n\n if (options.i18n.sync === undefined || !!options.i18n.sync) {\n this._localeWatcher = this.$i18n.watchLocale();\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n // root i18n\n this._i18n = this.$root.$i18n;\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n // parent i18n\n this._i18n = options.parent.$i18n;\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n }\n },\n\n beforeDestroy: function beforeDestroy () {\n if (!this._i18n) { return }\n\n if (this._subscribing) {\n this._i18n.unsubscribeDataChanging(this);\n delete this._subscribing;\n }\n\n if (this._i18nWatcher) {\n this._i18nWatcher();\n delete this._i18nWatcher;\n }\n\n if (this._localeWatcher) {\n this._localeWatcher();\n delete this._localeWatcher;\n }\n\n this._i18n = null;\n }\n};\n\n/* */\n\nvar component = {\n name: 'i18n',\n functional: true,\n props: {\n tag: {\n type: String,\n default: 'span'\n },\n path: {\n type: String,\n required: true\n },\n locale: {\n type: String\n },\n places: {\n type: [Array, Object]\n }\n },\n render: function render (h, ref) {\n var props = ref.props;\n var data = ref.data;\n var children = ref.children;\n var parent = ref.parent;\n\n var i18n = parent.$i18n;\n\n children = (children || []).filter(function (child) {\n return child.tag || (child.text = child.text.trim())\n });\n\n if (!i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return children\n }\n\n var path = props.path;\n var locale = props.locale;\n\n var params = {};\n var places = props.places || {};\n\n var hasPlaces = Array.isArray(places)\n ? places.length > 0\n : Object.keys(places).length > 0;\n\n var everyPlace = children.every(function (child) {\n if (child.data && child.data.attrs) {\n var place = child.data.attrs.place;\n return (typeof place !== 'undefined') && place !== ''\n }\n });\n\n if (hasPlaces && children.length > 0 && !everyPlace) {\n warn('If places prop is set, all child elements must have place prop set.');\n }\n\n if (Array.isArray(places)) {\n places.forEach(function (el, i) {\n params[i] = el;\n });\n } else {\n Object.keys(places).forEach(function (key) {\n params[key] = places[key];\n });\n }\n\n children.forEach(function (child, i) {\n var key = everyPlace\n ? (\"\" + (child.data.attrs.place))\n : (\"\" + i);\n params[key] = child;\n });\n\n return h(props.tag, data, i18n.i(path, locale, params))\n }\n};\n\n/* */\n\nfunction bind (el, binding, vnode) {\n if (!assert(el, vnode)) { return }\n\n t$1(el, binding, vnode);\n}\n\nfunction update (el, binding, vnode, oldVNode) {\n if (!assert(el, vnode)) { return }\n\n if (localeEqual(el, vnode) && looseEqual(binding.value, binding.oldValue)) { return }\n\n t$1(el, binding, vnode);\n}\n\nfunction assert (el, vnode) {\n var vm = vnode.context;\n if (!vm) {\n warn('not exist Vue instance in VNode context');\n return false\n }\n\n if (!vm.$i18n) {\n warn('not exist VueI18n instance in Vue instance');\n return false\n }\n\n return true\n}\n\nfunction localeEqual (el, vnode) {\n var vm = vnode.context;\n return el._locale === vm.$i18n.locale\n}\n\nfunction t$1 (el, binding, vnode) {\n var value = binding.value;\n\n var ref = parseValue(value);\n var path = ref.path;\n var locale = ref.locale;\n var args = ref.args;\n if (!path && !locale && !args) {\n warn('not support value type');\n return\n }\n\n if (!path) {\n warn('required `path` in v-t directive');\n return\n }\n\n var vm = vnode.context;\n el._vt = el.textContent = (ref$1 = vm.$i18n).t.apply(ref$1, [ path ].concat( makeParams(locale, args) ));\n el._locale = vm.$i18n.locale;\n var ref$1;\n}\n\nfunction parseValue (value) {\n var path;\n var locale;\n var args;\n\n if (typeof value === 'string') {\n path = value;\n } else if (isPlainObject(value)) {\n path = value.path;\n locale = value.locale;\n args = value.args;\n }\n\n return { path: path, locale: locale, args: args }\n}\n\nfunction makeParams (locale, args) {\n var params = [];\n\n locale && params.push(locale);\n if (args && (Array.isArray(args) || isPlainObject(args))) {\n params.push(args);\n }\n\n return params\n}\n\nvar Vue;\n\nfunction install (_Vue) {\n Vue = _Vue;\n\n var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && install.installed) {\n warn('already installed.');\n return\n }\n install.installed = true;\n\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && version < 2) {\n warn((\"vue-i18n (\" + (install.version) + \") need to use Vue 2.0 or later (Vue: \" + (Vue.version) + \").\"));\n return\n }\n\n Object.defineProperty(Vue.prototype, '$i18n', {\n get: function get () { return this._i18n }\n });\n\n extend(Vue);\n Vue.mixin(mixin);\n Vue.directive('t', { bind: bind, update: update });\n Vue.component(component.name, component);\n\n // use object-based merge strategy\n var strats = Vue.config.optionMergeStrategies;\n strats.i18n = strats.methods;\n}\n\n/* */\n\nvar BaseFormatter = function BaseFormatter () {\n this._caches = Object.create(null);\n};\n\nBaseFormatter.prototype.interpolate = function interpolate (message, values) {\n var tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message);\n this._caches[message] = tokens;\n }\n return compile(tokens, values)\n};\n\nvar RE_TOKEN_LIST_VALUE = /^(\\d)+/;\nvar RE_TOKEN_NAMED_VALUE = /^(\\w)+/;\n\nfunction parse (format) {\n var tokens = [];\n var position = 0;\n\n var text = '';\n while (position < format.length) {\n var char = format[position++];\n if (char === '{') {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n\n text = '';\n var sub = '';\n char = format[position++];\n while (char !== '}') {\n sub += char;\n char = format[position++];\n }\n\n var type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type: type });\n } else if (char === '%') {\n // when found rails i18n syntax, skip text capture\n if (format[(position)] !== '{') {\n text += char;\n }\n } else {\n text += char;\n }\n }\n\n text && tokens.push({ type: 'text', value: text });\n\n return tokens\n}\n\nfunction compile (tokens, values) {\n var compiled = [];\n var index = 0;\n\n var mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') { return compiled }\n\n while (index < tokens.length) {\n var token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break\n case 'named':\n if (mode === 'named') {\n compiled.push((values)[token.value]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Type of token '\" + (token.type) + \"' and format of value '\" + mode + \"' don't match!\"));\n }\n }\n break\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Detect 'unknown' type of token!\");\n }\n break\n }\n index++;\n }\n\n return compiled\n}\n\n/* */\n\n/**\n * Path paerser\n * - Inspired:\n * Vue.js Path parser\n */\n\n// actions\nvar APPEND = 0;\nvar PUSH = 1;\nvar INC_SUB_PATH_DEPTH = 2;\nvar PUSH_SUB_PATH = 3;\n\n// states\nvar BEFORE_PATH = 0;\nvar IN_PATH = 1;\nvar BEFORE_IDENT = 2;\nvar IN_IDENT = 3;\nvar IN_SUB_PATH = 4;\nvar IN_SINGLE_QUOTE = 5;\nvar IN_DOUBLE_QUOTE = 6;\nvar AFTER_PATH = 7;\nvar ERROR = 8;\n\nvar pathStateMachine = [];\n\npathStateMachine[BEFORE_PATH] = {\n 'ws': [BEFORE_PATH],\n 'ident': [IN_IDENT, APPEND],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[IN_PATH] = {\n 'ws': [IN_PATH],\n '.': [BEFORE_IDENT],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[BEFORE_IDENT] = {\n 'ws': [BEFORE_IDENT],\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND]\n};\n\npathStateMachine[IN_IDENT] = {\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND],\n 'ws': [IN_PATH, PUSH],\n '.': [BEFORE_IDENT, PUSH],\n '[': [IN_SUB_PATH, PUSH],\n 'eof': [AFTER_PATH, PUSH]\n};\n\npathStateMachine[IN_SUB_PATH] = {\n \"'\": [IN_SINGLE_QUOTE, APPEND],\n '\"': [IN_DOUBLE_QUOTE, APPEND],\n '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],\n ']': [IN_PATH, PUSH_SUB_PATH],\n 'eof': ERROR,\n 'else': [IN_SUB_PATH, APPEND]\n};\n\npathStateMachine[IN_SINGLE_QUOTE] = {\n \"'\": [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_SINGLE_QUOTE, APPEND]\n};\n\npathStateMachine[IN_DOUBLE_QUOTE] = {\n '\"': [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_DOUBLE_QUOTE, APPEND]\n};\n\n/**\n * Check if an expression is a literal value.\n */\n\nvar literalValueRE = /^\\s?(true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral (exp) {\n return literalValueRE.test(exp)\n}\n\n/**\n * Strip quotes from a string\n */\n\nfunction stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}\n\n/**\n * Determine the type of a character in a keypath.\n */\n\nfunction getPathCharType (ch) {\n if (ch === undefined || ch === null) { return 'eof' }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n case 0x30: // 0\n return ch\n\n case 0x5F: // _\n case 0x24: // $\n case 0x2D: // -\n return 'ident'\n\n case 0x20: // Space\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws'\n }\n\n // a-z, A-Z\n if ((code >= 0x61 && code <= 0x7A) || (code >= 0x41 && code <= 0x5A)) {\n return 'ident'\n }\n\n // 1-9\n if (code >= 0x31 && code <= 0x39) { return 'number' }\n\n return 'else'\n}\n\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\n\nfunction formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(path)) { return false }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed\n}\n\n/**\n * Parse a string path into an array of segments\n */\n\nfunction parse$1 (path) {\n var keys = [];\n var index = -1;\n var mode = BEFORE_PATH;\n var subPathDepth = 0;\n var c;\n var key;\n var newChar;\n var type;\n var transition;\n var action;\n var typeMap;\n var actions = [];\n\n actions[PUSH] = function () {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n\n actions[APPEND] = function () {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n\n actions[INC_SUB_PATH_DEPTH] = function () {\n actions[APPEND]();\n subPathDepth++;\n };\n\n actions[PUSH_SUB_PATH] = function () {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = IN_SUB_PATH;\n actions[APPEND]();\n } else {\n subPathDepth = 0;\n key = formatSubPath(key);\n if (key === false) {\n return false\n } else {\n actions[PUSH]();\n }\n }\n };\n\n function maybeUnescapeQuote () {\n var nextChar = path[index + 1];\n if ((mode === IN_SINGLE_QUOTE && nextChar === \"'\") ||\n (mode === IN_DOUBLE_QUOTE && nextChar === '\"')) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[APPEND]();\n return true\n }\n }\n\n while (mode !== null) {\n index++;\n c = path[index];\n\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue\n }\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || ERROR;\n\n if (transition === ERROR) {\n return // parse error\n }\n\n mode = transition[0];\n action = actions[transition[1]];\n if (action) {\n newChar = transition[2];\n newChar = newChar === undefined\n ? c\n : newChar;\n if (action() === false) {\n return\n }\n }\n\n if (mode === AFTER_PATH) {\n return keys\n }\n }\n}\n\n\n\n\n\nfunction empty (target) {\n /* istanbul ignore else */\n if (Array.isArray(target)) {\n return target.length === 0\n } else {\n return false\n }\n}\n\nvar I18nPath = function I18nPath () {\n this._cache = Object.create(null);\n};\n\n/**\n * External parse that check for a cache hit first\n */\nI18nPath.prototype.parsePath = function parsePath (path) {\n var hit = this._cache[path];\n if (!hit) {\n hit = parse$1(path);\n if (hit) {\n this._cache[path] = hit;\n }\n }\n return hit || []\n};\n\n/**\n * Get path value from path string\n */\nI18nPath.prototype.getPathValue = function getPathValue (obj, path) {\n if (!isObject(obj)) { return null }\n\n var paths = this.parsePath(path);\n if (empty(paths)) {\n return null\n } else {\n var length = paths.length;\n var ret = null;\n var last = obj;\n var i = 0;\n while (i < length) {\n var value = last[paths[i]];\n if (value === undefined) {\n last = null;\n break\n }\n last = value;\n i++;\n }\n\n ret = last;\n return ret\n }\n};\n\n/* */\n\nvar VueI18n = function VueI18n (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n var locale = options.locale || 'en-US';\n var fallbackLocale = options.fallbackLocale || 'en-US';\n var messages = options.messages || {};\n var dateTimeFormats = options.dateTimeFormats || {};\n var numberFormats = options.numberFormats || {};\n\n this._vm = null;\n this._formatter = options.formatter || new BaseFormatter();\n this._missing = options.missing || null;\n this._root = options.root || null;\n this._sync = options.sync === undefined ? true : !!options.sync;\n this._fallbackRoot = options.fallbackRoot === undefined\n ? true\n : !!options.fallbackRoot;\n this._silentTranslationWarn = options.silentTranslationWarn === undefined\n ? false\n : !!options.silentTranslationWarn;\n this._dateTimeFormatters = {};\n this._numberFormatters = {};\n this._path = new I18nPath();\n this._dataListeners = [];\n\n this._exist = function (message, key) {\n if (!message || !key) { return false }\n return !isNull(this$1._path.getPathValue(message, key))\n };\n\n this._initVM({\n locale: locale,\n fallbackLocale: fallbackLocale,\n messages: messages,\n dateTimeFormats: dateTimeFormats,\n numberFormats: numberFormats\n });\n};\n\nvar prototypeAccessors = { vm: {},messages: {},dateTimeFormats: {},numberFormats: {},locale: {},fallbackLocale: {},missing: {},formatter: {},silentTranslationWarn: {} };\n\nVueI18n.prototype._initVM = function _initVM (data) {\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n this._vm = new Vue({ data: data });\n Vue.config.silent = silent;\n};\n\nVueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {\n this._dataListeners.push(vm);\n};\n\nVueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {\n remove(this._dataListeners, vm);\n};\n\nVueI18n.prototype.watchI18nData = function watchI18nData () {\n var self = this;\n return this._vm.$watch('$data', function () {\n var i = self._dataListeners.length;\n while (i--) {\n Vue.nextTick(function () {\n self._dataListeners[i] && self._dataListeners[i].$forceUpdate();\n });\n }\n }, { deep: true })\n};\n\nVueI18n.prototype.watchLocale = function watchLocale () {\n /* istanbul ignore if */\n if (!this._sync || !this._root) { return null }\n var target = this._vm;\n return this._root.vm.$watch('locale', function (val) {\n target.$set(target, 'locale', val);\n target.$forceUpdate();\n }, { immediate: true })\n};\n\nprototypeAccessors.vm.get = function () { return this._vm };\n\nprototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };\nprototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };\nprototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };\n\nprototypeAccessors.locale.get = function () { return this._vm.locale };\nprototypeAccessors.locale.set = function (locale) {\n this._vm.$set(this._vm, 'locale', locale);\n};\n\nprototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };\nprototypeAccessors.fallbackLocale.set = function (locale) {\n this._vm.$set(this._vm, 'fallbackLocale', locale);\n};\n\nprototypeAccessors.missing.get = function () { return this._missing };\nprototypeAccessors.missing.set = function (handler) { this._missing = handler; };\n\nprototypeAccessors.formatter.get = function () { return this._formatter };\nprototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };\n\nprototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };\nprototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };\n\nVueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };\nVueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };\nVueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };\n\nVueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm) {\n if (!isNull(result)) { return result }\n if (this.missing) {\n this.missing.apply(null, [locale, key, vm]);\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._silentTranslationWarn) {\n warn(\n \"Cannot translate the value of keypath '\" + key + \"'. \" +\n 'Use the value of keypath as default.'\n );\n }\n }\n return key\n};\n\nVueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {\n return !val && !isNull(this._root) && this._fallbackRoot\n};\n\nVueI18n.prototype._interpolate = function _interpolate (\n locale,\n message,\n key,\n host,\n interpolateMode,\n values\n) {\n if (!message) { return null }\n\n var pathRet = this._path.getPathValue(message, key);\n if (Array.isArray(pathRet)) { return pathRet }\n\n var ret;\n if (isNull(pathRet)) {\n /* istanbul ignore else */\n if (isPlainObject(message)) {\n ret = message[key];\n if (typeof ret !== 'string') {\n if (process.env.NODE_ENV !== 'production' && !this._silentTranslationWarn) {\n warn((\"Value of key '\" + key + \"' is not a string!\"));\n }\n return null\n }\n } else {\n return null\n }\n } else {\n /* istanbul ignore else */\n if (typeof pathRet === 'string') {\n ret = pathRet;\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._silentTranslationWarn) {\n warn((\"Value of key '\" + key + \"' is not a string!\"));\n }\n return null\n }\n }\n\n // Check for the existance of links within the translated string\n if (ret.indexOf('@:') >= 0) {\n ret = this._link(locale, message, ret, host, interpolateMode, values);\n }\n\n return !values ? ret : this._render(ret, interpolateMode, values)\n};\n\nVueI18n.prototype._link = function _link (\n locale,\n message,\n str,\n host,\n interpolateMode,\n values\n) {\n var this$1 = this;\n\n var ret = str;\n\n // Match all the links within the local\n // We are going to replace each of\n // them with its translation\n var matches = ret.match(/(@:[\\w\\-_|.]+)/g);\n for (var idx in matches) {\n // ie compatible: filter custom array\n // prototype method\n if (!matches.hasOwnProperty(idx)) {\n continue\n }\n var link = matches[idx];\n // Remove the leading @:\n var linkPlaceholder = link.substr(2);\n // Translate the link\n var translated = this$1._interpolate(\n locale, message, linkPlaceholder, host,\n interpolateMode === 'raw' ? 'string' : interpolateMode,\n interpolateMode === 'raw' ? undefined : values\n );\n\n if (this$1._isFallbackRoot(translated)) {\n if (process.env.NODE_ENV !== 'production' && !this$1._silentTranslationWarn) {\n warn((\"Fall back to translate the link placeholder '\" + linkPlaceholder + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this$1._root) { throw Error('unexpected error') }\n var root = this$1._root;\n translated = root._translate(\n root._getMessages(), root.locale, root.fallbackLocale,\n linkPlaceholder, host, interpolateMode, values\n );\n }\n translated = this$1._warnDefault(locale, linkPlaceholder, translated, host);\n\n // Replace the link with the translated\n ret = !translated ? ret : ret.replace(link, translated);\n }\n\n return ret\n};\n\nVueI18n.prototype._render = function _render (message, interpolateMode, values) {\n var ret = this._formatter.interpolate(message, values);\n // if interpolateMode is **not** 'string' ('row'),\n // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter\n return interpolateMode === 'string' ? ret.join('') : ret\n};\n\nVueI18n.prototype._translate = function _translate (\n messages,\n locale,\n fallback,\n key,\n host,\n interpolateMode,\n args\n) {\n var res =\n this._interpolate(locale, messages[locale], key, host, interpolateMode, args);\n if (!isNull(res)) { return res }\n\n res = this._interpolate(fallback, messages[fallback], key, host, interpolateMode, args);\n if (!isNull(res)) {\n if (process.env.NODE_ENV !== 'production' && !this._silentTranslationWarn) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with '\" + fallback + \"' locale.\"));\n }\n return res\n } else {\n return null\n }\n};\n\nVueI18n.prototype._t = function _t (key, _locale, messages, host) {\n var values = [], len = arguments.length - 4;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];\n\n if (!key) { return '' }\n\n var parsedArgs = parseArgs.apply(void 0, values);\n var locale = parsedArgs.locale || _locale;\n\n var ret = this._translate(\n messages, locale, this.fallbackLocale, key,\n host, 'string', parsedArgs.params\n );\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._silentTranslationWarn) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return (ref = this._root).t.apply(ref, [ key ].concat( values ))\n } else {\n return this._warnDefault(locale, key, ret, host)\n }\n var ref;\n};\n\nVueI18n.prototype.t = function t (key) {\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n\n return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))\n var ref;\n};\n\nVueI18n.prototype._i = function _i (key, locale, messages, host, values) {\n var ret =\n this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._silentTranslationWarn) {\n warn((\"Fall back to interpolate the keypath '\" + key + \"' with root locale.\"));\n }\n if (!this._root) { throw Error('unexpected error') }\n return this._root.i(key, locale, values)\n } else {\n return this._warnDefault(locale, key, ret, host)\n }\n};\n\nVueI18n.prototype.i = function i (key, locale, values) {\n /* istanbul ignore if */\n if (!key) { return '' }\n\n if (typeof locale !== 'string') {\n locale = this.locale;\n }\n\n return this._i(key, locale, this._getMessages(), null, values)\n};\n\nVueI18n.prototype._tc = function _tc (\n key,\n _locale,\n messages,\n host,\n choice\n) {\n var values = [], len = arguments.length - 5;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];\n\n if (!key) { return '' }\n if (choice === undefined) {\n choice = 1;\n }\n return fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)\n var ref;\n};\n\nVueI18n.prototype.tc = function tc (key, choice) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))\n var ref;\n};\n\nVueI18n.prototype._te = function _te (key, locale, messages) {\n var args = [], len = arguments.length - 3;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];\n\n var _locale = parseArgs.apply(void 0, args).locale || locale;\n return this._exist(messages[_locale], key)\n};\n\nVueI18n.prototype.te = function te (key, locale) {\n return this._te(key, this.locale, this._getMessages(), locale)\n};\n\nVueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {\n return looseClone(this._vm.messages[locale] || {})\n};\n\nVueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {\n this._vm.messages[locale] = message;\n};\n\n VueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {\n this._vm.messages[locale] = Vue.util.extend(this._vm.messages[locale] || {}, message);\n};\n\nVueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {\n return looseClone(this._vm.dateTimeFormats[locale] || {})\n};\n\nVueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {\n this._vm.dateTimeFormats[locale] = format;\n};\n\nVueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {\n this._vm.dateTimeFormats[locale] = Vue.util.extend(this._vm.dateTimeFormats[locale] || {}, format);\n};\n\nVueI18n.prototype._localizeDateTime = function _localizeDateTime (\n value,\n locale,\n fallback,\n dateTimeFormats,\n key\n) {\n var _locale = locale;\n var formats = dateTimeFormats[_locale];\n\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Fall back to '\" + fallback + \"' datetime formats from '\" + locale + \" datetime formats.\"));\n }\n _locale = fallback;\n formats = dateTimeFormats[_locale];\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n var id = _locale + \"__\" + key;\n var formatter = this._dateTimeFormatters[id];\n if (!formatter) {\n formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);\n }\n return formatter.format(value)\n }\n};\n\nVueI18n.prototype._d = function _d (value, locale, key) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.dateTimeFormat) {\n warn('Cannot format a Date value due to not support Intl.DateTimeFormat.');\n return ''\n }\n\n if (!key) {\n return new Intl.DateTimeFormat(locale).format(value)\n }\n\n var ret =\n this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Fall back to datetime localization of root: key '\" + key + \"' .\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.d(value, key, locale)\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.d = function d (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n\n if (args.length === 1) {\n if (typeof args[0] === 'string') {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n key = args[0];\n }\n if (typeof args[1] === 'string') {\n locale = args[1];\n }\n }\n\n return this._d(value, locale, key)\n};\n\nVueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {\n return looseClone(this._vm.numberFormats[locale] || {})\n};\n\nVueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {\n this._vm.numberFormats[locale] = format;\n};\n\nVueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {\n this._vm.numberFormats[locale] = Vue.util.extend(this._vm.numberFormats[locale] || {}, format);\n};\n\nVueI18n.prototype._localizeNumber = function _localizeNumber (\n value,\n locale,\n fallback,\n numberFormats,\n key\n) {\n var _locale = locale;\n var formats = numberFormats[_locale];\n\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Fall back to '\" + fallback + \"' number formats from '\" + locale + \" number formats.\"));\n }\n _locale = fallback;\n formats = numberFormats[_locale];\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n var id = _locale + \"__\" + key;\n var formatter = this._numberFormatters[id];\n if (!formatter) {\n formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);\n }\n return formatter.format(value)\n }\n};\n\nVueI18n.prototype._n = function _n (value, locale, key) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.numberFormat) {\n warn('Cannot format a Date value due to not support Intl.NumberFormat.');\n return ''\n }\n\n if (!key) {\n return new Intl.NumberFormat(locale).format(value)\n }\n\n var ret =\n this._localizeNumber(value, locale, this.fallbackLocale, this._getNumberFormats(), key);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Fall back to number localization of root: key '\" + key + \"' .\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.n(value, key, locale)\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.n = function n (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n\n if (args.length === 1) {\n if (typeof args[0] === 'string') {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n key = args[0];\n }\n if (typeof args[1] === 'string') {\n locale = args[1];\n }\n }\n\n return this._n(value, locale, key)\n};\n\nObject.defineProperties( VueI18n.prototype, prototypeAccessors );\n\nVueI18n.availabilities = {\n dateTimeFormat: canUseDateTimeFormat,\n numberFormat: canUseNumberFormat\n};\nVueI18n.install = install;\nVueI18n.version = '7.4.0';\n\n/* istanbul ignore if */\nif (typeof window !== 'undefined' && window.Vue) {\n window.Vue.use(VueI18n);\n}\n\nexport default VueI18n;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-i18n/dist/vue-i18n.esm.js\n// module id = TXmL\n// module chunks = 0","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file.\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/component-normalizer.js\n// module id = VU/8\n// module chunks = 0","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_property-desc.js\n// module id = X8DO\n// module chunks = 0","!function(t,n){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define([],n):\"object\"==typeof exports?exports.VueAvatar=n():t.VueAvatar=n()}(this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var e={};return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,\"a\",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p=\"/\",n(n.s=9)}([function(t,n){var e=t.exports=\"undefined\"!=typeof window&&window.Math==Math?window:\"undefined\"!=typeof self&&self.Math==Math?self:Function(\"return this\")();\"number\"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t}},function(t,n,e){t.exports=!e(3)(function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a})},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){var e=t.exports={version:\"2.5.1\"};\"number\"==typeof __e&&(__e=e)},function(t,n,e){var r=e(6),o=e(7);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(30);t.exports=Object(\"z\").propertyIsEnumerable(0)?Object:function(t){return\"String\"==r(t)?t.split(\"\"):Object(t)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError(\"Can't call method on \"+t);return t}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0}),n.Avatar=void 0;var r=e(10),o=function(t){return t&&t.__esModule?t:{default:t}}(r);n.Avatar=o.default,n.default=o.default},function(t,n,e){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=e(12),o=e.n(r),i=e(41),u=e(11),c=u(o.a,i.a,!1,null,null,null);n.default=c.exports},function(t,n){t.exports=function(t,n,e,r,o,i){var u,c=t=t||{},a=typeof t.default;\"object\"!==a&&\"function\"!==a||(u=t,c=t.default);var s=\"function\"==typeof c?c.options:c;n&&(s.render=n.render,s.staticRenderFns=n.staticRenderFns,s._compiled=!0),e&&(s.functional=!0),o&&(s._scopeId=o);var f;if(i?(f=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||\"undefined\"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},s._ssrRegister=f):r&&(f=r),f){var l=s.functional,p=l?s.render:s.beforeCreate;l?(s._injectStyles=f,s.render=function(t,n){return f.call(n),p(t,n)}):s.beforeCreate=p?[].concat(p,f):[f]}return{esModule:u,exports:c,options:s}}},function(t,n,e){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0});var r=e(13),o=function(t){return t&&t.__esModule?t:{default:t}}(r);n.default={name:\"avatar\",props:{username:{type:String,required:!0},initials:{type:String},backgroundColor:{type:String},color:{type:String},customStyle:{type:Object},size:{type:Number,default:50},src:{type:String},rounded:{type:Boolean,default:!0},lighten:{type:Number,default:80}},data:function(){return{backgroundColors:[\"#F44336\",\"#FF4081\",\"#9C27B0\",\"#673AB7\",\"#3F51B5\",\"#2196F3\",\"#03A9F4\",\"#00BCD4\",\"#009688\",\"#4CAF50\",\"#8BC34A\",\"#CDDC39\",\"#FFC107\",\"#FF9800\",\"#FF5722\",\"#795548\",\"#9E9E9E\",\"#607D8B\"]}},mounted:function(){this.$emit(\"avatar-initials\",this.username,this.userInitial)},computed:{background:function(){return this.backgroundColor||this.randomBackgroundColor(this.username.length,this.backgroundColors)},fontColor:function(){return this.color||this.lightenColor(this.background,this.lighten)},isImage:function(){return Boolean(this.src)},style:function(){var t={width:this.size+\"px\",height:this.size+\"px\",borderRadius:this.rounded?\"50%\":0,textAlign:\"center\",verticalAlign:\"middle\"},n={background:\"transparent url(\"+this.src+\") no-repeat scroll 0% 0% / \"+this.size+\"px \"+this.size+\"px content-box border-box\"},e={backgroundColor:this.background,font:Math.floor(this.size/2.5)+\"px/100px Helvetica, Arial, sans-serif\",fontWeight:\"bold\",color:this.fontColor,lineHeight:this.size+Math.floor(this.size/20)+\"px\"},r=this.isImage?n:e;return(0,o.default)(t,r),t},userInitial:function(){return this.initials||this.initial(this.username)}},methods:{initial:function(t){for(var n=t.split(/[ -]/),e=\"\",r=0;r3&&-1!==e.search(/[A-Z]/)&&(e=e.replace(/[a-z]+/g,\"\")),e=e.substr(0,3).toUpperCase()},randomBackgroundColor:function(t,n){return n[t%n.length]},lightenColor:function(t,n){var e=!1;\"#\"===t[0]&&(t=t.slice(1),e=!0);var r=parseInt(t,16),o=(r>>16)+n;o>255?o=255:o<0&&(o=0);var i=(r>>8&255)+n;i>255?i=255:i<0&&(i=0);var u=(255&r)+n;return u>255?u=255:u<0&&(u=0),(e?\"#\":\"\")+(u|i<<8|o<<16).toString(16)}}}},function(t,n,e){t.exports={default:e(14),__esModule:!0}},function(t,n,e){e(15),t.exports=e(4).Object.assign},function(t,n,e){var r=e(16);r(r.S+r.F,\"Object\",{assign:e(26)})},function(t,n,e){var r=e(0),o=e(4),i=e(17),u=e(19),c=function(t,n,e){var a,s,f,l=t&c.F,p=t&c.G,d=t&c.S,h=t&c.P,v=t&c.B,y=t&c.W,g=p?o:o[n]||(o[n]={}),b=g.prototype,x=p?r:d?r[n]:(r[n]||{}).prototype;p&&(e=n);for(a in e)(s=!l&&x&&void 0!==x[a])&&a in g||(f=s?x[a]:e[a],g[a]=p&&\"function\"!=typeof x[a]?e[a]:v&&s?i(f,r):y&&x[a]==f?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(f):h&&\"function\"==typeof f?i(Function.call,f):f,h&&((g.virtual||(g.virtual={}))[a]=f,t&c.R&&b&&!b[a]&&u(b,a,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,n,e){var r=e(18);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(t+\" is not a function!\");return t}},function(t,n,e){var r=e(20),o=e(25);t.exports=e(2)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(21),o=e(22),i=e(24),u=Object.defineProperty;n.f=e(2)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(t){}if(\"get\"in e||\"set\"in e)throw TypeError(\"Accessors not supported!\");return\"value\"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(1);t.exports=function(t){if(!r(t))throw TypeError(t+\" is not an object!\");return t}},function(t,n,e){t.exports=!e(2)&&!e(3)(function(){return 7!=Object.defineProperty(e(23)(\"div\"),\"a\",{get:function(){return 7}}).a})},function(t,n,e){var r=e(1),o=e(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,e){var r=e(1);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&\"function\"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if(\"function\"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&\"function\"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError(\"Can't convert object to primitive value\")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){\"use strict\";var r=e(27),o=e(38),i=e(39),u=e(40),c=e(6),a=Object.assign;t.exports=!a||e(3)(function(){var t={},n={},e=Symbol(),r=\"abcdefghijklmnopqrst\";return t[e]=7,r.split(\"\").forEach(function(t){n[t]=t}),7!=a({},t)[e]||Object.keys(a({},n)).join(\"\")!=r})?function(t,n){for(var e=u(t),a=arguments.length,s=1,f=o.f,l=i.f;a>s;)for(var p,d=c(arguments[s++]),h=f?r(d).concat(f(d)):r(d),v=h.length,y=0;v>y;)l.call(d,p=h[y++])&&(e[p]=d[p]);return e}:a},function(t,n,e){var r=e(28),o=e(37);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){var r=e(29),o=e(5),i=e(31)(!1),u=e(34)(\"IE_PROTO\");t.exports=function(t,n){var e,c=o(t),a=0,s=[];for(e in c)e!=u&&r(c,e)&&s.push(e);for(;n.length>a;)r(c,e=n[a++])&&(~i(s,e)||s.push(e));return s}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(5),o=e(32),i=e(33);t.exports=function(t){return function(n,e,u){var c,a=r(n),s=o(a.length),f=i(u,s);if(t&&e!=e){for(;s>f;)if((c=a[f++])!=c)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===e)return t||f||0;return!t&&-1}}},function(t,n,e){var r=e(8),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n,e){var r=e(8),o=Math.max,i=Math.min;t.exports=function(t,n){return t=r(t),t<0?o(t+n,0):i(t,n)}},function(t,n,e){var r=e(35)(\"keys\"),o=e(36);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n,e){var r=e(0),o=r[\"__core-js_shared__\"]||(r[\"__core-js_shared__\"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return\"Symbol(\".concat(void 0===t?\"\":t,\")_\",(++e+r).toString(36))}},function(t,n){t.exports=\"constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf\".split(\",\")},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(7);t.exports=function(t){return Object(r(t))}},function(t,n,e){\"use strict\";var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e(\"div\",{staticClass:\"vue-avatar--wrapper\",style:[t.style,t.customStyle]},[this.src?t._e():e(\"span\",[t._v(t._s(t.userInitial))])])},o=[],i={render:r,staticRenderFns:o};n.a=i}])});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-avatar/dist/vue-avatar.min.js\n// module id = Y50r\n// module chunks = 0","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (obj, key, value) {\n if (key in obj) {\n (0, _defineProperty2.default)(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/helpers/defineProperty.js\n// module id = bOdI\n// module chunks = 0","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_object-dp.js\n// module id = evD5\n// module chunks = 0","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_hide.js\n// module id = hJx8\n// module chunks = 0","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && key in exports) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_export.js\n// module id = kM2E\n// module chunks = 0","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/_a-function.js\n// module id = lOnJ\n// module chunks = 0","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/modules/es6.object.define-property.js\n// module id = mClu\n// module chunks = 0","module.exports = { \"default\": require(\"core-js/library/fn/json/stringify\"), __esModule: true };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/babel-runtime/core-js/json/stringify.js\n// module id = mvHQ\n// module chunks = 0","var core = require('../../modules/_core');\nvar $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });\nmodule.exports = function stringify(it) { // eslint-disable-line no-unused-vars\n return $JSON.stringify.apply($JSON, arguments);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/core-js/library/fn/json/stringify.js\n// module id = qkKv\n// module chunks = 0","/**\n * vee-validate v2.0.3\n * (c) 2018 Abdelrahman Awad\n * @license MIT\n */\n// \n\n/**\n * Gets the data attribute. the name must be kebab-case.\n */\nvar getDataAttribute = function (el, name) { return el.getAttribute((\"data-vv-\" + name)); };\n\n/**\n * Checks if the value is either null or undefined.\n */\nvar isNullOrUndefined = function (value) {\n return value === null || value === undefined;\n};\n\n/**\n * Sets the data attribute.\n */\nvar setDataAttribute = function (el, name, value) { return el.setAttribute((\"data-vv-\" + name), value); };\n\n/**\n * Creates the default flags object.\n */\nvar createFlags = function () { return ({\n untouched: true,\n touched: false,\n dirty: false,\n pristine: true,\n valid: null,\n invalid: null,\n validated: false,\n pending: false,\n required: false\n}); };\n\n/**\n * Shallow object comparison.\n */\nvar isEqual = function (lhs, rhs) {\n if (lhs instanceof RegExp && rhs instanceof RegExp) {\n return isEqual(lhs.source, rhs.source) && isEqual(lhs.flags, rhs.flags);\n }\n\n if (Array.isArray(lhs) && Array.isArray(rhs)) {\n if (lhs.length !== rhs.length) { return false; }\n\n for (var i = 0; i < lhs.length; i++) {\n if (!isEqual(lhs[i], rhs[i])) {\n return false;\n }\n }\n\n return true;\n }\n\n // if both are objects, compare each key recursively.\n if (isObject(lhs) && isObject(rhs)) {\n return Object.keys(lhs).every(function (key) {\n return isEqual(lhs[key], rhs[key]);\n }) && Object.keys(rhs).every(function (key) {\n return isEqual(lhs[key], rhs[key]);\n });\n }\n\n return lhs === rhs;\n};\n\n/**\n * Determines the input field scope.\n */\nvar getScope = function (el) {\n var scope = getDataAttribute(el, 'scope');\n if (isNullOrUndefined(scope) && el.form) {\n scope = getDataAttribute(el.form, 'scope');\n }\n\n return !isNullOrUndefined(scope) ? scope : null;\n};\n\n/**\n * Gets the value in an object safely.\n */\nvar getPath = function (path, target, def) {\n if ( def === void 0 ) def = undefined;\n\n if (!path || !target) { return def; }\n\n var value = target;\n path.split('.').every(function (prop) {\n if (! Object.prototype.hasOwnProperty.call(value, prop) && value[prop] === undefined) {\n value = def;\n\n return false;\n }\n\n value = value[prop];\n\n return true;\n });\n\n return value;\n};\n\n/**\n * Checks if path exists within an object.\n */\nvar hasPath = function (path, target) {\n var obj = target;\n return path.split('.').every(function (prop) {\n if (! Object.prototype.hasOwnProperty.call(obj, prop)) {\n return false;\n }\n\n obj = obj[prop];\n\n return true;\n });\n};\n\n/**\n * Parses a rule string expression.\n */\nvar parseRule = function (rule) {\n var params = [];\n var name = rule.split(':')[0];\n\n if (~rule.indexOf(':')) {\n params = rule.split(':').slice(1).join(':').split(',');\n }\n\n return { name: name, params: params };\n};\n\n/**\n * Debounces a function.\n */\nvar debounce = function (fn, wait, immediate) {\n if ( wait === void 0 ) wait = 0;\n if ( immediate === void 0 ) immediate = false;\n\n if (wait === 0) {\n return fn;\n }\n\n var timeout;\n\n return function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var later = function () {\n timeout = null;\n if (!immediate) { fn.apply(void 0, args); }\n };\n /* istanbul ignore next */\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n /* istanbul ignore next */\n if (callNow) { fn.apply(void 0, args); }\n };\n};\n\n/**\n * Normalizes the given rules expression.\n */\nvar normalizeRules = function (rules) {\n // if falsy value return an empty object.\n if (!rules) {\n return {};\n }\n\n if (isObject(rules)) {\n // $FlowFixMe\n return Object.keys(rules).reduce(function (prev, curr) {\n var params = [];\n // $FlowFixMe\n if (rules[curr] === true) {\n params = [];\n } else if (Array.isArray(rules[curr])) {\n params = rules[curr];\n } else {\n params = [rules[curr]];\n }\n\n // $FlowFixMe\n if (rules[curr] !== false) {\n prev[curr] = params;\n }\n\n return prev;\n }, {});\n }\n\n if (typeof rules !== 'string') {\n warn('rules must be either a string or an object.');\n return {};\n }\n\n return rules.split('|').reduce(function (prev, rule) {\n var parsedRule = parseRule(rule);\n if (!parsedRule.name) {\n return prev;\n }\n\n prev[parsedRule.name] = parsedRule.params;\n return prev;\n }, {});\n};\n\n/**\n * Emits a warning to the console.\n */\nvar warn = function (message) {\n console.warn((\"[vee-validate] \" + message)); // eslint-disable-line\n};\n\n/**\n * Creates a branded error object.\n */\nvar createError = function (message) { return new Error((\"[vee-validate] \" + message)); };\n\n/**\n * Checks if the value is an object.\n */\nvar isObject = function (obj) { return obj !== null && obj && typeof obj === 'object' && ! Array.isArray(obj); };\n\n/**\n * Checks if a function is callable.\n */\nvar isCallable = function (func) { return typeof func === 'function'; };\n\n/**\n * Check if element has the css class on it.\n */\nvar hasClass = function (el, className) {\n if (el.classList) {\n return el.classList.contains(className);\n }\n\n return !!el.className.match(new RegExp((\"(\\\\s|^)\" + className + \"(\\\\s|$)\")));\n};\n\n/**\n * Adds the provided css className to the element.\n */\nvar addClass = function (el, className) {\n if (el.classList) {\n el.classList.add(className);\n return;\n }\n\n if (!hasClass(el, className)) {\n el.className += \" \" + className;\n }\n};\n\n/**\n * Remove the provided css className from the element.\n */\nvar removeClass = function (el, className) {\n if (el.classList) {\n el.classList.remove(className);\n return;\n }\n\n if (hasClass(el, className)) {\n var reg = new RegExp((\"(\\\\s|^)\" + className + \"(\\\\s|$)\"));\n el.className = el.className.replace(reg, ' ');\n }\n};\n\n/**\n * Adds or removes a class name on the input depending on the status flag.\n */\nvar toggleClass = function (el, className, status) {\n if (!el || !className) { return; }\n\n if (status) {\n return addClass(el, className);\n }\n\n removeClass(el, className);\n};\n\n/**\n * Converts an array-like object to array, provides a simple polyfill for Array.from\n */\nvar toArray = function (arrayLike) {\n if (isCallable(Array.from)) {\n return Array.from(arrayLike);\n }\n\n var array = [];\n var length = arrayLike.length;\n for (var i = 0; i < length; i++) {\n array.push(arrayLike[i]);\n }\n\n return array;\n};\n\n/**\n * Assign polyfill from the mdn.\n */\nvar assign = function (target) {\n var others = [], len = arguments.length - 1;\n while ( len-- > 0 ) others[ len ] = arguments[ len + 1 ];\n\n /* istanbul ignore else */\n if (isCallable(Object.assign)) {\n return Object.assign.apply(Object, [ target ].concat( others ));\n }\n\n /* istanbul ignore next */\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n /* istanbul ignore next */\n var to = Object(target);\n /* istanbul ignore next */\n others.forEach(function (arg) {\n // Skip over if undefined or null\n if (arg != null) {\n Object.keys(arg).forEach(function (key) {\n to[key] = arg[key];\n });\n }\n });\n /* istanbul ignore next */\n return to;\n};\n\nvar id = 0;\nvar idTemplate = '{id}';\n\n/**\n * Generates a unique id.\n */\nvar uniqId = function () {\n // handle too many uses of uniqId, although unlikely.\n if (id >= 9999) {\n id = 0;\n // shift the template.\n idTemplate = idTemplate.replace('{id}', '_{id}');\n }\n\n id++;\n var newId = idTemplate.replace('{id}', String(id));\n\n return newId;\n};\n\n/**\n * finds the first element that satisfies the predicate callback, polyfills array.find\n */\nvar find = function (arrayLike, predicate) {\n var array = Array.isArray(arrayLike) ? arrayLike : toArray(arrayLike);\n for (var i = 0; i < array.length; i++) {\n if (predicate(array[i])) {\n return array[i];\n }\n }\n\n return undefined;\n};\n\n/**\n * Returns a suitable event name for the input element.\n */\nvar getInputEventName = function (el) {\n if (el && (el.tagName === 'SELECT' || ~['radio', 'checkbox', 'file'].indexOf(el.type))) {\n return 'change';\n }\n\n return 'input';\n};\n\nvar isBuiltInComponent = function (vnode) {\n if (!vnode) {\n return false;\n }\n\n var tag = vnode.componentOptions.tag;\n\n return /keep-alive|transition|transition-group/.test(tag);\n};\n\nvar makeEventsArray = function (events) {\n return (typeof events === 'string' && events.length) ? events.split('|') : [];\n};\n\nvar makeDelayObject = function (events, delay, delayConfig) {\n if (typeof delay === 'number') {\n return events.reduce(function (prev, e) {\n prev[e] = delay;\n return prev;\n }, {});\n }\n\n return events.reduce(function (prev, e) {\n if (typeof delay === 'object' && e in delay) {\n prev[e] = delay[e];\n return prev;\n }\n\n if (typeof delayConfig === 'number') {\n prev[e] = delayConfig;\n return prev;\n }\n\n prev[e] = (delayConfig && delayConfig[e]) || 0;\n\n return prev;\n }, {});\n};\n\nvar deepParseInt = function (input) {\n if (typeof input === 'number') { return input; }\n\n if (typeof input === 'string') { return parseInt(input); }\n\n var map = {};\n for (var element in input) {\n map[element] = parseInt(input[element]);\n }\n\n return map;\n};\n\nvar merge = function (target, source) {\n if (! (isObject(target) && isObject(source))) {\n return target;\n }\n\n Object.keys(source).forEach(function (key) {\n if (isObject(source[key])) {\n if (! target[key]) {\n assign(target, ( obj = {}, obj[key] = {}, obj ));\n var obj;\n }\n\n merge(target[key], source[key]);\n return;\n }\n\n assign(target, ( obj$1 = {}, obj$1[key] = source[key], obj$1 ));\n var obj$1;\n });\n\n return target;\n};\n\n// \n\nvar ErrorBag = function ErrorBag () {\n this.items = [];\n};\n\n/**\n * Adds an error to the internal array.\n */\nErrorBag.prototype.add = function add (error) {\n // handle old signature.\n if (arguments.length > 1) {\n error = {\n field: arguments[0],\n msg: arguments[1],\n rule: arguments[2],\n scope: !isNullOrUndefined(arguments[3]) ? arguments[3] : null,\n regenerate: null\n };\n }\n\n error.scope = !isNullOrUndefined(error.scope) ? error.scope : null;\n this.items.push(error);\n};\n\n/**\n * Regenrates error messages if they have a generator function.\n */\nErrorBag.prototype.regenerate = function regenerate () {\n this.items.forEach(function (i) {\n i.msg = isCallable(i.regenerate) ? i.regenerate() : i.msg;\n });\n};\n\n/**\n * Updates a field error with the new field scope.\n */\nErrorBag.prototype.update = function update (id, error) {\n var item = find(this.items, function (i) { return i.id === id; });\n if (!item) {\n return;\n }\n\n var idx = this.items.indexOf(item);\n this.items.splice(idx, 1);\n item.scope = error.scope;\n this.items.push(item);\n};\n\n/**\n * Gets all error messages from the internal array.\n */\nErrorBag.prototype.all = function all (scope) {\n if (isNullOrUndefined(scope)) {\n return this.items.map(function (e) { return e.msg; });\n }\n\n return this.items.filter(function (e) { return e.scope === scope; }).map(function (e) { return e.msg; });\n};\n\n/**\n * Checks if there are any errors in the internal array.\n */\nErrorBag.prototype.any = function any (scope) {\n if (isNullOrUndefined(scope)) {\n return !!this.items.length;\n }\n\n return !!this.items.filter(function (e) { return e.scope === scope; }).length;\n};\n\n/**\n * Removes all items from the internal array.\n */\nErrorBag.prototype.clear = function clear (scope) {\n var this$1 = this;\n\n if (isNullOrUndefined(scope)) {\n scope = null;\n }\n\n for (var i = 0; i < this.items.length; ++i) {\n if (this$1.items[i].scope === scope) {\n this$1.items.splice(i, 1);\n --i;\n }\n }\n};\n\n/**\n * Collects errors into groups or for a specific field.\n */\nErrorBag.prototype.collect = function collect (field, scope, map) {\n if ( map === void 0 ) map = true;\n\n if (!field) {\n var collection = {};\n this.items.forEach(function (e) {\n if (! collection[e.field]) {\n collection[e.field] = [];\n }\n\n collection[e.field].push(map ? e.msg : e);\n });\n\n return collection;\n }\n\n field = !isNullOrUndefined(field) ? String(field) : field;\n if (isNullOrUndefined(scope)) {\n return this.items.filter(function (e) { return e.field === field; }).map(function (e) { return (map ? e.msg : e); });\n }\n\n return this.items.filter(function (e) { return e.field === field && e.scope === scope; })\n .map(function (e) { return (map ? e.msg : e); });\n};\n/**\n * Gets the internal array length.\n */\nErrorBag.prototype.count = function count () {\n return this.items.length;\n};\n\n/**\n * Finds and fetches the first error message for the specified field id.\n */\nErrorBag.prototype.firstById = function firstById (id) {\n var error = find(this.items, function (i) { return i.id === id; });\n\n return error ? error.msg : null;\n};\n\n/**\n * Gets the first error message for a specific field.\n */\nErrorBag.prototype.first = function first (field, scope) {\n var this$1 = this;\n if ( scope === void 0 ) scope = null;\n\n field = !isNullOrUndefined(field) ? String(field) : field;\n var selector = this._selector(field);\n var scoped = this._scope(field);\n\n if (scoped) {\n var result = this.first(scoped.name, scoped.scope);\n // if such result exist, return it. otherwise it could be a field.\n // with dot in its name.\n if (result) {\n return result;\n }\n }\n\n if (selector) {\n return this.firstByRule(selector.name, selector.rule, scope);\n }\n\n for (var i = 0; i < this.items.length; ++i) {\n if (this$1.items[i].field === field && (this$1.items[i].scope === scope)) {\n return this$1.items[i].msg;\n }\n }\n\n return null;\n};\n\n/**\n * Returns the first error rule for the specified field\n */\nErrorBag.prototype.firstRule = function firstRule (field, scope) {\n var errors = this.collect(field, scope, false);\n\n return (errors.length && errors[0].rule) || null;\n};\n\n/**\n * Checks if the internal array has at least one error for the specified field.\n */\nErrorBag.prototype.has = function has (field, scope) {\n if ( scope === void 0 ) scope = null;\n\n return !!this.first(field, scope);\n};\n\n/**\n * Gets the first error message for a specific field and a rule.\n */\nErrorBag.prototype.firstByRule = function firstByRule (name, rule, scope) {\n if ( scope === void 0 ) scope = null;\n\n var error = this.collect(name, scope, false).filter(function (e) { return e.rule === rule; })[0];\n\n return (error && error.msg) || null;\n};\n\n/**\n * Gets the first error message for a specific field that not match the rule.\n */\nErrorBag.prototype.firstNot = function firstNot (name, rule, scope) {\n if ( rule === void 0 ) rule = 'required';\n if ( scope === void 0 ) scope = null;\n\n var error = this.collect(name, scope, false).filter(function (e) { return e.rule !== rule; })[0];\n\n return (error && error.msg) || null;\n};\n\n/**\n * Removes errors by matching against the id.\n */\nErrorBag.prototype.removeById = function removeById (id) {\n var this$1 = this;\n\n for (var i = 0; i < this.items.length; ++i) {\n if (this$1.items[i].id === id) {\n this$1.items.splice(i, 1);\n --i;\n }\n }\n};\n\n/**\n * Removes all error messages associated with a specific field.\n */\nErrorBag.prototype.remove = function remove (field, scope, id) {\n var this$1 = this;\n\n field = !isNullOrUndefined(field) ? String(field) : field;\n var removeCondition = function (e) {\n if (e.id && id) {\n return e.id === id;\n }\n\n if (!isNullOrUndefined(scope)) {\n return e.field === field && e.scope === scope;\n }\n\n return e.field === field && e.scope === null;\n };\n\n for (var i = 0; i < this.items.length; ++i) {\n if (removeCondition(this$1.items[i])) {\n this$1.items.splice(i, 1);\n --i;\n }\n }\n};\n\n/**\n * Get the field attributes if there's a rule selector.\n */\nErrorBag.prototype._selector = function _selector (field) {\n if (field.indexOf(':') > -1) {\n var ref = field.split(':');\n var name = ref[0];\n var rule = ref[1];\n\n return { name: name, rule: rule };\n }\n\n return null;\n};\n\n/**\n * Get the field scope if specified using dot notation.\n */\nErrorBag.prototype._scope = function _scope (field) {\n if (field.indexOf('.') > -1) {\n var ref = field.split('.');\n var scope = ref[0];\n var name = ref.slice(1);\n\n return { name: name.join('.'), scope: scope };\n }\n\n return null;\n};\n\n// \n\nvar LOCALE = 'en';\n\nvar Dictionary = function Dictionary (dictionary) {\n if ( dictionary === void 0 ) dictionary = {};\n\n this.container = {};\n this.merge(dictionary);\n};\n\nvar prototypeAccessors$2 = { locale: {} };\n\nprototypeAccessors$2.locale.get = function () {\n return LOCALE;\n};\n\nprototypeAccessors$2.locale.set = function (value) {\n LOCALE = value || 'en';\n};\n\nDictionary.prototype.hasLocale = function hasLocale (locale) {\n return !!this.container[locale];\n};\n\nDictionary.prototype.setDateFormat = function setDateFormat (locale, format) {\n if (!this.container[locale]) {\n this.container[locale] = {};\n }\n\n this.container[locale].dateFormat = format;\n};\n\nDictionary.prototype.getDateFormat = function getDateFormat (locale) {\n if (!this.container[locale] || !this.container[locale].dateFormat) {\n return null;\n }\n\n return this.container[locale].dateFormat;\n};\n\nDictionary.prototype.getMessage = function getMessage (locale, key, data) {\n var message = null;\n if (!this.hasMessage(locale, key)) {\n message = this._getDefaultMessage(locale);\n } else {\n message = this.container[locale].messages[key];\n }\n\n return isCallable(message) ? message.apply(void 0, data) : message;\n};\n\n/**\n * Gets a specific message for field. falls back to the rule message.\n */\nDictionary.prototype.getFieldMessage = function getFieldMessage (locale, field, key, data) {\n if (!this.hasLocale(locale)) {\n return this.getMessage(locale, key, data);\n }\n\n var dict = this.container[locale].custom && this.container[locale].custom[field];\n if (!dict || !dict[key]) {\n return this.getMessage(locale, key, data);\n }\n\n var message = dict[key];\n return isCallable(message) ? message.apply(void 0, data) : message;\n};\n\nDictionary.prototype._getDefaultMessage = function _getDefaultMessage (locale) {\n if (this.hasMessage(locale, '_default')) {\n return this.container[locale].messages._default;\n }\n\n return this.container.en.messages._default;\n};\n\nDictionary.prototype.getAttribute = function getAttribute (locale, key, fallback) {\n if ( fallback === void 0 ) fallback = '';\n\n if (!this.hasAttribute(locale, key)) {\n return fallback;\n }\n\n return this.container[locale].attributes[key];\n};\n\nDictionary.prototype.hasMessage = function hasMessage (locale, key) {\n return !! (\n this.hasLocale(locale) &&\n this.container[locale].messages &&\n this.container[locale].messages[key]\n );\n};\n\nDictionary.prototype.hasAttribute = function hasAttribute (locale, key) {\n return !! (\n this.hasLocale(locale) &&\n this.container[locale].attributes &&\n this.container[locale].attributes[key]\n );\n};\n\nDictionary.prototype.merge = function merge$1 (dictionary) {\n merge(this.container, dictionary);\n};\n\nDictionary.prototype.setMessage = function setMessage (locale, key, message) {\n if (! this.hasLocale(locale)) {\n this.container[locale] = {\n messages: {},\n attributes: {}\n };\n }\n\n this.container[locale].messages[key] = message;\n};\n\nDictionary.prototype.setAttribute = function setAttribute (locale, key, attribute) {\n if (! this.hasLocale(locale)) {\n this.container[locale] = {\n messages: {},\n attributes: {}\n };\n }\n\n this.container[locale].attributes[key] = attribute;\n};\n\nObject.defineProperties( Dictionary.prototype, prototypeAccessors$2 );\n\n// \n\nvar normalizeValue = function (value) {\n if (isObject(value)) {\n return Object.keys(value).reduce(function (prev, key) {\n prev[key] = normalizeValue(value[key]);\n\n return prev;\n }, {});\n }\n\n if (isCallable(value)) {\n return value('{0}', ['{1}', '{2}', '{3}']);\n }\n\n return value;\n};\n\nvar normalizeFormat = function (locale) {\n // normalize messages\n var messages = normalizeValue(locale.messages);\n var custom = normalizeValue(locale.custom);\n\n return {\n messages: messages,\n custom: custom,\n attributes: locale.attributes,\n dateFormat: locale.dateFormat\n };\n};\n\nvar I18nDictionary = function I18nDictionary (i18n, rootKey) {\n this.i18n = i18n;\n this.rootKey = rootKey;\n};\n\nvar prototypeAccessors$3 = { locale: {} };\n\nprototypeAccessors$3.locale.get = function () {\n return this.i18n.locale;\n};\n\nprototypeAccessors$3.locale.set = function (value) {\n warn('Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead');\n};\n\nI18nDictionary.prototype.getDateFormat = function getDateFormat (locale) {\n return this.i18n.getDateTimeFormat(locale || this.locale);\n};\n\nI18nDictionary.prototype.setDateFormat = function setDateFormat (locale, value) {\n this.i18n.setDateTimeFormat(locale || this.locale, value);\n};\n\nI18nDictionary.prototype.getMessage = function getMessage (locale, key, data) {\n var path = (this.rootKey) + \".messages.\" + key;\n if (!this.i18n.te(path)) {\n return this.i18n.t(((this.rootKey) + \".messages._default\"), locale, data);\n }\n\n return this.i18n.t(path, locale, data);\n};\n\nI18nDictionary.prototype.getAttribute = function getAttribute (locale, key, fallback) {\n if ( fallback === void 0 ) fallback = '';\n\n var path = (this.rootKey) + \".attributes.\" + key;\n if (!this.i18n.te(path)) {\n return fallback;\n }\n\n return this.i18n.t(path, locale);\n};\n\nI18nDictionary.prototype.getFieldMessage = function getFieldMessage (locale, field, key, data) {\n var path = (this.rootKey) + \".custom.\" + field + \".\" + key;\n if (this.i18n.te(path)) {\n return this.i18n.t(path);\n }\n\n return this.getMessage(locale, key, data);\n};\n\nI18nDictionary.prototype.merge = function merge$1 (dictionary) {\n var this$1 = this;\n\n Object.keys(dictionary).forEach(function (localeKey) {\n // i18n doesn't deep merge\n // first clone the existing locale (avoid mutations to locale)\n var clone = merge({}, getPath((localeKey + \".\" + (this$1.rootKey)), this$1.i18n.messages, {}));\n // Merge cloned locale with new one\n var locale = merge(clone, normalizeFormat(dictionary[localeKey]));\n this$1.i18n.mergeLocaleMessage(localeKey, ( obj = {}, obj[this$1.rootKey] = locale, obj ));\n var obj;\n if (locale.dateFormat) {\n this$1.i18n.setDateTimeFormat(localeKey, locale.dateFormat);\n }\n });\n};\n\nI18nDictionary.prototype.setMessage = function setMessage (locale, key, value) {\n this.merge(( obj$1 = {}, obj$1[locale] = {\n messages: ( obj = {}, obj[key] = value, obj )\n }, obj$1 ));\n var obj;\n var obj$1;\n};\n\nI18nDictionary.prototype.setAttribute = function setAttribute (locale, key, value) {\n this.merge(( obj$1 = {}, obj$1[locale] = {\n attributes: ( obj = {}, obj[key] = value, obj )\n }, obj$1 ));\n var obj;\n var obj$1;\n};\n\nObject.defineProperties( I18nDictionary.prototype, prototypeAccessors$3 );\n\n// \n\nvar defaultConfig = {\n locale: 'en',\n delay: 0,\n errorBagName: 'errors',\n dictionary: null,\n strict: true,\n fieldsBagName: 'fields',\n classes: false,\n classNames: null,\n events: 'input|blur',\n inject: true,\n fastExit: true,\n aria: true,\n validity: false,\n i18n: null,\n i18nRootKey: 'validation'\n};\n\nvar currentConfig = assign({}, defaultConfig);\nvar dependencies = {\n dictionary: new Dictionary({\n en: {\n messages: {},\n attributes: {},\n custom: {}\n }\n })\n};\n\nvar Config = function Config () {};\n\nvar staticAccessors$1 = { default: {},current: {} };\n\nstaticAccessors$1.default.get = function () {\n return defaultConfig;\n};\n\nstaticAccessors$1.current.get = function () {\n return currentConfig;\n};\n\nConfig.dependency = function dependency (key) {\n return dependencies[key];\n};\n\n/**\n * Merges the config with a new one.\n */\nConfig.merge = function merge$$1 (config) {\n currentConfig = assign({}, currentConfig, config);\n if (currentConfig.i18n) {\n Config.register('dictionary', new I18nDictionary(currentConfig.i18n, currentConfig.i18nRootKey));\n }\n};\n\n/**\n * Registers a dependency.\n */\nConfig.register = function register (key, value) {\n dependencies[key] = value;\n};\n\n/**\n * Resolves the working config from a Vue instance.\n */\nConfig.resolve = function resolve (context) {\n var selfConfig = getPath('$options.$_veeValidate', context, {});\n\n return assign({}, Config.current, selfConfig);\n};\n\nObject.defineProperties( Config, staticAccessors$1 );\n\n/**\n * Generates the options required to construct a field.\n */\nvar Generator = function Generator () {};\n\nGenerator.generate = function generate (el, binding, vnode) {\n var model = Generator.resolveModel(binding, vnode);\n var options = Config.resolve(vnode.context);\n\n return {\n name: Generator.resolveName(el, vnode),\n el: el,\n listen: !binding.modifiers.disable,\n scope: Generator.resolveScope(el, binding, vnode),\n vm: Generator.makeVM(vnode.context),\n expression: binding.value,\n component: vnode.child,\n classes: options.classes,\n classNames: options.classNames,\n getter: Generator.resolveGetter(el, vnode, model),\n events: Generator.resolveEvents(el, vnode) || options.events,\n model: model,\n delay: Generator.resolveDelay(el, vnode, options),\n rules: Generator.resolveRules(el, binding),\n initial: !!binding.modifiers.initial,\n validity: options.validity,\n aria: options.aria,\n initialValue: Generator.resolveInitialValue(vnode)\n };\n};\n\nGenerator.getCtorConfig = function getCtorConfig (vnode) {\n if (!vnode.child) { return null; }\n\n var config = getPath('child.$options.$_veeValidate', vnode);\n\n return config;\n};\n\n/**\n * Resolves the rules defined on an element.\n */\nGenerator.resolveRules = function resolveRules (el, binding) {\n if (!binding.value && (!binding || !binding.expression)) {\n return getDataAttribute(el, 'rules');\n }\n\n if (~['string', 'object'].indexOf(typeof binding.value.rules)) {\n return binding.value.rules;\n }\n\n return binding.value;\n};\n\n/**\n * @param {*} vnode\n */\nGenerator.resolveInitialValue = function resolveInitialValue (vnode) {\n var model = vnode.data.model || find(vnode.data.directives, function (d) { return d.name === 'model'; });\n\n return model && model.value;\n};\n\n/**\n * Creates a non-circular partial VM instance from a Vue instance.\n * @param {*} vm\n */\nGenerator.makeVM = function makeVM (vm) {\n return {\n get $el () {\n return vm.$el;\n },\n get $refs () {\n return vm.$refs;\n },\n $watch: vm.$watch ? vm.$watch.bind(vm) : function () {},\n $validator: vm.$validator ? {\n errors: vm.$validator.errors,\n validate: vm.$validator.validate.bind(vm.$validator),\n update: vm.$validator.update.bind(vm.$validator)\n } : null\n };\n};\n\n/**\n * Resolves the delay value.\n * @param {*} el\n * @param {*} vnode\n * @param {Object} options\n */\nGenerator.resolveDelay = function resolveDelay (el, vnode, options) {\n var delay = getDataAttribute(el, 'delay');\n var globalDelay = (options && 'delay' in options) ? options.delay : 0;\n\n if (!delay && vnode.child && vnode.child.$attrs) {\n delay = vnode.child.$attrs['data-vv-delay'];\n }\n\n if (!isObject(globalDelay)) {\n return deepParseInt(delay || globalDelay);\n }\n\n globalDelay.input = delay || 0;\n\n return deepParseInt(globalDelay);\n};\n\n/**\n * Resolves the events to validate in response to.\n * @param {*} el\n * @param {*} vnode\n */\nGenerator.resolveEvents = function resolveEvents (el, vnode) {\n var events = getDataAttribute(el, 'validate-on');\n\n if (!events && vnode.child && vnode.child.$attrs) {\n events = vnode.child.$attrs['data-vv-validate-on'];\n }\n\n if (!events && vnode.child) {\n var config = Generator.getCtorConfig(vnode);\n events = config && config.events;\n }\n\n return events;\n};\n\n/**\n * Resolves the scope for the field.\n * @param {*} el\n * @param {*} binding\n */\nGenerator.resolveScope = function resolveScope (el, binding, vnode) {\n if ( vnode === void 0 ) vnode = {};\n\n var scope = null;\n if (vnode.child && isNullOrUndefined(scope)) {\n scope = vnode.child.$attrs && vnode.child.$attrs['data-vv-scope'];\n }\n\n return !isNullOrUndefined(scope) ? scope : getScope(el);\n};\n\n/**\n * Checks if the node directives contains a v-model or a specified arg.\n * Args take priority over models.\n *\n * @return {Object}\n */\nGenerator.resolveModel = function resolveModel (binding, vnode) {\n if (binding.arg) {\n return binding.arg;\n }\n\n var model = vnode.data.model || find(vnode.data.directives, function (d) { return d.name === 'model'; });\n if (!model) {\n return null;\n }\n\n var watchable = /^[a-z_]+[0-9]*(\\w*\\.[a-z_]\\w*)*$/i.test(model.expression) && hasPath(model.expression, vnode.context);\n if (!watchable) {\n return null;\n }\n\n return model.expression;\n};\n\n/**\n * Resolves the field name to trigger validations.\n * @return {String} The field name.\n */\nGenerator.resolveName = function resolveName (el, vnode) {\n var name = getDataAttribute(el, 'name');\n\n if (!name && !vnode.child) {\n return el.name;\n }\n\n if (!name && vnode.child && vnode.child.$attrs) {\n name = vnode.child.$attrs['data-vv-name'] || vnode.child.$attrs['name'];\n }\n\n if (!name && vnode.child) {\n var config = Generator.getCtorConfig(vnode);\n if (config && isCallable(config.name)) {\n var boundGetter = config.name.bind(vnode.child);\n\n return boundGetter();\n }\n\n return vnode.child.name;\n }\n\n return name;\n};\n\n/**\n * Returns a value getter input type.\n */\nGenerator.resolveGetter = function resolveGetter (el, vnode, model) {\n if (model) {\n return function () {\n return getPath(model, vnode.context);\n };\n }\n\n if (vnode.child) {\n var path = getDataAttribute(el, 'value-path') || (vnode.child.$attrs && vnode.child.$attrs['data-vv-value-path']);\n if (path) {\n return function () {\n return getPath(path, vnode.child);\n };\n }\n\n var config = Generator.getCtorConfig(vnode);\n if (config && isCallable(config.value)) {\n var boundGetter = config.value.bind(vnode.child);\n\n return function () {\n return boundGetter();\n };\n }\n\n return function () {\n return vnode.child.value;\n };\n }\n\n switch (el.type) {\n case 'checkbox': return function () {\n var els = document.querySelectorAll((\"input[name=\\\"\" + (el.name) + \"\\\"]\"));\n\n els = toArray(els).filter(function (el) { return el.checked; });\n if (!els.length) { return undefined; }\n\n return els.map(function (checkbox) { return checkbox.value; });\n };\n case 'radio': return function () {\n var els = document.querySelectorAll((\"input[name=\\\"\" + (el.name) + \"\\\"]\"));\n var elm = find(els, function (el) { return el.checked; });\n\n return elm && elm.value;\n };\n case 'file': return function (context) {\n return toArray(el.files);\n };\n case 'select-multiple': return function () {\n return toArray(el.options).filter(function (opt) { return opt.selected; }).map(function (opt) { return opt.value; });\n };\n default: return function () {\n return el && el.value;\n };\n }\n};\n\n// \n\nvar DEFAULT_OPTIONS = {\n targetOf: null,\n initial: false,\n scope: null,\n listen: true,\n name: null,\n rules: {},\n vm: null,\n classes: false,\n validity: true,\n aria: true,\n events: 'input|blur',\n delay: 0,\n classNames: {\n touched: 'touched', // the control has been blurred\n untouched: 'untouched', // the control hasn't been blurred\n valid: 'valid', // model is valid\n invalid: 'invalid', // model is invalid\n pristine: 'pristine', // control has not been interacted with\n dirty: 'dirty' // control has been interacted with\n }\n};\n\nvar Field = function Field (el, options) {\n if ( options === void 0 ) options = {};\n\n this.id = uniqId();\n this.el = el;\n this.updated = false;\n this.dependencies = [];\n this.watchers = [];\n this.events = [];\n this.delay = 0;\n this.rules = {};\n this._cacheId(options);\n this.classNames = assign({}, DEFAULT_OPTIONS.classNames);\n options = assign({}, DEFAULT_OPTIONS, options);\n this._delay = !isNullOrUndefined(options.delay) ? options.delay : 0; // cache initial delay\n this.validity = options.validity;\n this.aria = options.aria;\n this.flags = createFlags();\n this.vm = options.vm;\n this.component = options.component;\n this.ctorConfig = this.component ? getPath('$options.$_veeValidate', this.component) : undefined;\n this.update(options);\n this.updated = false;\n};\n\nvar prototypeAccessors$1 = { validator: {},isRequired: {},isDisabled: {},alias: {},value: {},rejectsFalse: {} };\n\nprototypeAccessors$1.validator.get = function () {\n if (!this.vm || !this.vm.$validator) {\n warn('No validator instance detected.');\n return { validate: function () {} };\n }\n\n return this.vm.$validator;\n};\n\nprototypeAccessors$1.isRequired.get = function () {\n return !!this.rules.required;\n};\n\nprototypeAccessors$1.isDisabled.get = function () {\n return !!(this.component && this.component.disabled) || !!(this.el && this.el.disabled);\n};\n\n/**\n * Gets the display name (user-friendly name).\n */\nprototypeAccessors$1.alias.get = function () {\n if (this._alias) {\n return this._alias;\n }\n\n var alias = null;\n if (this.el) {\n alias = getDataAttribute(this.el, 'as');\n }\n\n if (!alias && this.component) {\n return this.component.$attrs && this.component.$attrs['data-vv-as'];\n }\n\n return alias;\n};\n\n/**\n * Gets the input value.\n */\n\nprototypeAccessors$1.value.get = function () {\n if (!isCallable(this.getter)) {\n return undefined;\n }\n\n return this.getter();\n};\n\n/**\n * If the field rejects false as a valid value for the required rule.\n */\n\nprototypeAccessors$1.rejectsFalse.get = function () {\n if (this.component && this.ctorConfig) {\n return !!this.ctorConfig.rejectsFalse;\n }\n\n if (!this.el) {\n return false;\n }\n\n return this.el.type === 'checkbox';\n};\n\n/**\n * Determines if the instance matches the options provided.\n */\nField.prototype.matches = function matches (options) {\n if (options.id) {\n return this.id === options.id;\n }\n\n if (options.name === undefined && options.scope === undefined) {\n return true;\n }\n\n if (options.scope === undefined) {\n return this.name === options.name;\n }\n\n if (options.name === undefined) {\n return this.scope === options.scope;\n }\n\n return options.name === this.name && options.scope === this.scope;\n};\n\n/**\n * Caches the field id.\n */\nField.prototype._cacheId = function _cacheId (options) {\n if (this.el && !options.targetOf) {\n setDataAttribute(this.el, 'id', this.id); // cache field id if it is independent and has a root element.\n }\n};\n\n/**\n * Updates the field with changed data.\n */\nField.prototype.update = function update (options) {\n this.targetOf = options.targetOf || null;\n this.initial = options.initial || this.initial || false;\n\n // update errors scope if the field scope was changed.\n if (!isNullOrUndefined(options.scope) && options.scope !== this.scope && isCallable(this.validator.update)) {\n this.validator.update(this.id, { scope: options.scope });\n }\n this.scope = !isNullOrUndefined(options.scope) ? options.scope\n : !isNullOrUndefined(this.scope) ? this.scope : null;\n this.name = (!isNullOrUndefined(options.name) ? String(options.name) : options.name) || this.name || null;\n this.rules = options.rules !== undefined ? normalizeRules(options.rules) : this.rules;\n this.model = options.model || this.model;\n this.listen = options.listen !== undefined ? options.listen : this.listen;\n this.classes = (options.classes || this.classes || false) && !this.component;\n this.classNames = isObject(options.classNames) ? merge(this.classNames, options.classNames) : this.classNames;\n this.getter = isCallable(options.getter) ? options.getter : this.getter;\n this._alias = options.alias || this._alias;\n this.events = (options.events) ? makeEventsArray(options.events) : this.events;\n this.delay = (options.delay) ? makeDelayObject(this.events, options.delay, this._delay) : makeDelayObject(this.events, this.delay, this._delay);\n this.updateDependencies();\n this.addActionListeners();\n\n // update required flag flags\n if (options.rules !== undefined) {\n this.flags.required = this.isRequired;\n }\n\n // validate if it was validated before and field was updated and there was a rules mutation.\n if (this.flags.validated && options.rules !== undefined && this.updated) {\n this.validator.validate((\"#\" + (this.id)));\n }\n\n this.updated = true;\n this.addValueListeners();\n\n // no need to continue.\n if (!this.el) {\n return;\n }\n\n this.updateClasses();\n this.updateAriaAttrs();\n};\n\n/**\n * Resets field flags and errors.\n */\nField.prototype.reset = function reset () {\n var this$1 = this;\n\n var defaults = createFlags();\n Object.keys(this.flags).filter(function (flag) { return flag !== 'required'; }).forEach(function (flag) {\n this$1.flags[flag] = defaults[flag];\n });\n\n this.addActionListeners();\n this.updateClasses();\n this.updateAriaAttrs();\n this.updateCustomValidity();\n};\n\n/**\n * Sets the flags and their negated counterparts, and updates the classes and re-adds action listeners.\n */\nField.prototype.setFlags = function setFlags (flags) {\n var this$1 = this;\n\n var negated = {\n pristine: 'dirty',\n dirty: 'pristine',\n valid: 'invalid',\n invalid: 'valid',\n touched: 'untouched',\n untouched: 'touched'\n };\n\n Object.keys(flags).forEach(function (flag) {\n this$1.flags[flag] = flags[flag];\n // if it has a negation and was not specified, set it as well.\n if (negated[flag] && flags[negated[flag]] === undefined) {\n this$1.flags[negated[flag]] = !flags[flag];\n }\n });\n\n if (\n flags.untouched !== undefined ||\n flags.touched !== undefined ||\n flags.dirty !== undefined ||\n flags.pristine !== undefined\n ) {\n this.addActionListeners();\n }\n this.updateClasses();\n this.updateAriaAttrs();\n this.updateCustomValidity();\n};\n\n/**\n * Determines if the field requires references to target fields.\n*/\nField.prototype.updateDependencies = function updateDependencies () {\n var this$1 = this;\n\n // reset dependencies.\n this.dependencies.forEach(function (d) { return d.field.destroy(); });\n this.dependencies = [];\n\n // we get the selectors for each field.\n var fields = Object.keys(this.rules).reduce(function (prev, r) {\n if (Validator.isTargetRule(r)) {\n var selector = this$1.rules[r][0];\n if (r === 'confirmed' && !selector) {\n selector = (this$1.name) + \"_confirmation\";\n }\n\n prev.push({ selector: selector, name: r });\n }\n\n return prev;\n }, []);\n\n if (!fields.length || !this.vm || !this.vm.$el) { return; }\n\n // must be contained within the same component, so we use the vm root element constrain our dom search.\n fields.forEach(function (ref) {\n var selector = ref.selector;\n var name = ref.name;\n\n var el = null;\n // vue ref selector.\n if (selector[0] === '$') {\n var ref$1 = this$1.vm.$refs[selector.slice(1)];\n el = Array.isArray(ref$1) ? ref$1[0] : ref$1;\n } else {\n try {\n // try query selector\n el = this$1.vm.$el.querySelector(selector);\n } catch (err) {\n el = null;\n }\n }\n\n if (!el) {\n try {\n el = this$1.vm.$el.querySelector((\"input[name=\\\"\" + selector + \"\\\"]\"));\n } catch (err) {\n el = null;\n }\n }\n\n if (!el) {\n return;\n }\n\n var options = {\n vm: this$1.vm,\n classes: this$1.classes,\n classNames: this$1.classNames,\n delay: this$1.delay,\n scope: this$1.scope,\n events: this$1.events.join('|'),\n initial: this$1.initial,\n targetOf: this$1.id\n };\n\n // probably a component.\n if (isCallable(el.$watch)) {\n options.component = el;\n options.el = el.$el;\n options.getter = Generator.resolveGetter(el.$el, { child: el });\n } else {\n options.el = el;\n options.getter = Generator.resolveGetter(el, {});\n }\n\n this$1.dependencies.push({ name: name, field: new Field(options.el, options) });\n });\n};\n\n/**\n * Removes listeners.\n */\nField.prototype.unwatch = function unwatch (tag) {\n if ( tag === void 0 ) tag = null;\n\n if (!tag) {\n this.watchers.forEach(function (w) { return w.unwatch(); });\n this.watchers = [];\n return;\n }\n\n this.watchers.filter(function (w) { return tag.test(w.tag); }).forEach(function (w) { return w.unwatch(); });\n this.watchers = this.watchers.filter(function (w) { return !tag.test(w.tag); });\n};\n\n/**\n * Updates the element classes depending on each field flag status.\n */\nField.prototype.updateClasses = function updateClasses () {\n if (!this.classes || this.isDisabled) { return; }\n\n toggleClass(this.el, this.classNames.dirty, this.flags.dirty);\n toggleClass(this.el, this.classNames.pristine, this.flags.pristine);\n toggleClass(this.el, this.classNames.touched, this.flags.touched);\n toggleClass(this.el, this.classNames.untouched, this.flags.untouched);\n // make sure we don't set any classes if the state is undetermined.\n if (!isNullOrUndefined(this.flags.valid) && this.flags.validated) {\n toggleClass(this.el, this.classNames.valid, this.flags.valid);\n }\n\n if (!isNullOrUndefined(this.flags.invalid) && this.flags.validated) {\n toggleClass(this.el, this.classNames.invalid, this.flags.invalid);\n }\n};\n\n/**\n * Adds the listeners required for automatic classes and some flags.\n */\nField.prototype.addActionListeners = function addActionListeners () {\n var this$1 = this;\n\n // remove previous listeners.\n this.unwatch(/class/);\n\n var onBlur = function () {\n this$1.flags.touched = true;\n this$1.flags.untouched = false;\n if (this$1.classes) {\n toggleClass(this$1.el, this$1.classNames.touched, true);\n toggleClass(this$1.el, this$1.classNames.untouched, false);\n }\n\n // only needed once.\n this$1.unwatch(/^class_blur$/);\n };\n\n var inputEvent = getInputEventName(this.el);\n var onInput = function () {\n this$1.flags.dirty = true;\n this$1.flags.pristine = false;\n if (this$1.classes) {\n toggleClass(this$1.el, this$1.classNames.pristine, false);\n toggleClass(this$1.el, this$1.classNames.dirty, true);\n }\n\n // only needed once.\n this$1.unwatch(/^class_input$/);\n };\n\n if (this.component && isCallable(this.component.$once)) {\n this.component.$once('input', onInput);\n this.component.$once('blur', onBlur);\n this.watchers.push({\n tag: 'class_input',\n unwatch: function () {\n this$1.component.$off('input', onInput);\n }\n });\n this.watchers.push({\n tag: 'class_blur',\n unwatch: function () {\n this$1.component.$off('blur', onBlur);\n }\n });\n return;\n }\n\n if (!this.el) { return; }\n\n this.el.addEventListener(inputEvent, onInput);\n // Checkboxes and radio buttons on Mac don't emit blur naturally, so we listen on click instead.\n var blurEvent = ['radio', 'checkbox'].indexOf(this.el.type) === -1 ? 'blur' : 'click';\n this.el.addEventListener(blurEvent, onBlur);\n this.watchers.push({\n tag: 'class_input',\n unwatch: function () {\n this$1.el.removeEventListener(inputEvent, onInput);\n }\n });\n\n this.watchers.push({\n tag: 'class_blur',\n unwatch: function () {\n this$1.el.removeEventListener(blurEvent, onBlur);\n }\n });\n};\n\n/**\n * Adds the listeners required for validation.\n */\nField.prototype.addValueListeners = function addValueListeners () {\n var this$1 = this;\n\n this.unwatch(/^input_.+/);\n if (!this.listen) { return; }\n\n var fn = this.targetOf ? function () {\n this$1.validator.validate((\"#\" + (this$1.targetOf)));\n } : function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // if its a DOM event, resolve the value, otherwise use the first parameter as the value.\n if (args.length === 0 || (isCallable(Event) && args[0] instanceof Event) || (args[0] && args[0].srcElement)) {\n args[0] = this$1.value;\n }\n this$1.validator.validate((\"#\" + (this$1.id)), args[0]);\n };\n\n var inputEvent = getInputEventName(this.el);\n // replace input event with suitable one.\n var events = this.events.map(function (e) {\n return e === 'input' ? inputEvent : e;\n });\n\n // if there is a watchable model and an on input validation is requested.\n if (this.model && events.indexOf(inputEvent) !== -1) {\n var debouncedFn = debounce(fn, this.delay[inputEvent]);\n var unwatch = this.vm.$watch(this.model, function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n this$1.flags.pending = true;\n debouncedFn.apply(void 0, args);\n });\n this.watchers.push({\n tag: 'input_model',\n unwatch: unwatch\n });\n // filter out input event as it is already handled by the watcher API.\n events = events.filter(function (e) { return e !== inputEvent; });\n }\n\n // Add events.\n events.forEach(function (e) {\n var debouncedFn = debounce(fn, this$1.delay[e]);\n var validate = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n this$1.flags.pending = true;\n debouncedFn.apply(void 0, args);\n };\n\n this$1._addComponentEventListener(e, validate);\n this$1._addHTMLEventListener(e, validate);\n });\n};\n\nField.prototype._addComponentEventListener = function _addComponentEventListener (evt, validate) {\n var this$1 = this;\n\n if (!this.component) { return; }\n\n this.component.$on(evt, validate);\n this.watchers.push({\n tag: 'input_vue',\n unwatch: function () {\n this$1.component.$off(evt, validate);\n }\n });\n};\n\nField.prototype._addHTMLEventListener = function _addHTMLEventListener (evt, validate) {\n var this$1 = this;\n\n if (!this.el) { return; }\n\n if (~['radio', 'checkbox'].indexOf(this.el.type)) {\n var els = document.querySelectorAll((\"input[name=\\\"\" + (this.el.name) + \"\\\"]\"));\n toArray(els).forEach(function (el) {\n el.addEventListener(evt, validate);\n this$1.watchers.push({\n tag: 'input_native',\n unwatch: function () {\n el.removeEventListener(evt, validate);\n }\n });\n });\n\n return;\n }\n\n this.el.addEventListener(evt, validate);\n this.watchers.push({\n tag: 'input_native',\n unwatch: function () {\n this$1.el.removeEventListener(evt, validate);\n }\n });\n};\n\n/**\n * Updates aria attributes on the element.\n */\nField.prototype.updateAriaAttrs = function updateAriaAttrs () {\n if (!this.aria || !this.el || !isCallable(this.el.setAttribute)) { return; }\n\n this.el.setAttribute('aria-required', this.isRequired ? 'true' : 'false');\n this.el.setAttribute('aria-invalid', this.flags.invalid ? 'true' : 'false');\n};\n\n/**\n * Updates the custom validity for the field.\n */\nField.prototype.updateCustomValidity = function updateCustomValidity () {\n if (!this.validity || !this.el || !isCallable(this.el.setCustomValidity)) { return; }\n\n this.el.setCustomValidity(this.flags.valid ? '' : (this.validator.errors.firstById(this.id) || ''));\n};\n\n/**\n * Removes all listeners.\n */\nField.prototype.destroy = function destroy () {\n this.unwatch();\n this.dependencies.forEach(function (d) { return d.field.destroy(); });\n this.dependencies = [];\n};\n\nObject.defineProperties( Field.prototype, prototypeAccessors$1 );\n\n// \n\nvar FieldBag = function FieldBag () {\n this.items = [];\n};\n\nvar prototypeAccessors$4 = { length: {} };\n\n/**\n * Gets the current items length.\n */\n\nprototypeAccessors$4.length.get = function () {\n return this.items.length;\n};\n\n/**\n * Finds the first field that matches the provided matcher object.\n */\nFieldBag.prototype.find = function find$1 (matcher) {\n return find(this.items, function (item) { return item.matches(matcher); });\n};\n\n/**\n * Filters the items down to the matched fields.\n */\nFieldBag.prototype.filter = function filter (matcher) {\n // multiple matchers to be tried.\n if (Array.isArray(matcher)) {\n return this.items.filter(function (item) { return matcher.some(function (m) { return item.matches(m); }); });\n }\n\n return this.items.filter(function (item) { return item.matches(matcher); });\n};\n\n/**\n * Maps the field items using the mapping function.\n */\nFieldBag.prototype.map = function map (mapper) {\n return this.items.map(mapper);\n};\n\n/**\n * Finds and removes the first field that matches the provided matcher object, returns the removed item.\n */\nFieldBag.prototype.remove = function remove (matcher) {\n var item = null;\n if (matcher instanceof Field) {\n item = matcher;\n } else {\n item = this.find(matcher);\n }\n\n if (!item) { return null; }\n\n var index = this.items.indexOf(item);\n this.items.splice(index, 1);\n\n return item;\n};\n\n/**\n * Adds a field item to the list.\n */\nFieldBag.prototype.push = function push (item) {\n if (! (item instanceof Field)) {\n throw createError('FieldBag only accepts instances of Field that has an id defined.');\n }\n\n if (!item.id) {\n throw createError('Field id must be defined.');\n }\n\n if (this.find({ id: item.id })) {\n throw createError((\"Field with id \" + (item.id) + \" is already added.\"));\n }\n\n this.items.push(item);\n};\n\nObject.defineProperties( FieldBag.prototype, prototypeAccessors$4 );\n\n// \n\nvar RULES = {};\nvar STRICT_MODE = true;\nvar TARGET_RULES = ['confirmed', 'after', 'before'];\nvar ERRORS = []; // HOLD errors references to trigger regeneration.\n\nvar Validator = function Validator (validations, options) {\n var this$1 = this;\n if ( options === void 0 ) options = { vm: null, fastExit: true };\n\n this.strict = STRICT_MODE;\n this.errors = new ErrorBag();\n ERRORS.push(this.errors);\n this.fields = new FieldBag();\n this.flags = {};\n this._createFields(validations);\n this.paused = false;\n this.fastExit = options.fastExit || false;\n this.ownerId = options.vm && options.vm._uid;\n // create it statically since we don't need constant access to the vm.\n this.reset = options.vm && isCallable(options.vm.$nextTick) ? function (matcher) {\n return new Promise(function (resolve) {\n options.vm.$nextTick(function () {\n options.vm.$nextTick(function () {\n resolve(this$1._reset(matcher));\n });\n });\n });\n } : this._reset;\n};\n\nvar prototypeAccessors = { dictionary: {},locale: {},rules: {} };\nvar staticAccessors = { dictionary: {},locale: {},rules: {} };\n\n/**\n * Getter for the dictionary.\n */\nprototypeAccessors.dictionary.get = function () {\n return Config.dependency('dictionary');\n};\n\n/**\n * Static Getter for the dictionary.\n */\nstaticAccessors.dictionary.get = function () {\n return Config.dependency('dictionary');\n};\n\n/**\n * Getter for the current locale.\n */\nprototypeAccessors.locale.get = function () {\n return this.dictionary.locale;\n};\n\n/**\n * Setter for the validator locale.\n */\nprototypeAccessors.locale.set = function (value) {\n Validator.locale = value;\n};\n\n/**\n* Static getter for the validator locale.\n*/\nstaticAccessors.locale.get = function () {\n return Validator.dictionary.locale;\n};\n\n/**\n * Static setter for the validator locale.\n */\nstaticAccessors.locale.set = function (value) {\n var hasChanged = value !== Validator.dictionary.locale;\n Validator.dictionary.locale = value;\n if (hasChanged) {\n Validator.regenerate();\n }\n};\n\n/**\n * Getter for the rules object.\n */\nprototypeAccessors.rules.get = function () {\n return RULES;\n};\n\n/**\n * Static Getter for the rules object.\n */\nstaticAccessors.rules.get = function () {\n return RULES;\n};\n\n/**\n * Static constructor.\n */\nValidator.create = function create (validations, options) {\n return new Validator(validations, options);\n};\n\n/**\n * Adds a custom validator to the list of validation rules.\n */\nValidator.extend = function extend (name, validator, options) {\n if ( options === void 0 ) options = {};\n\n Validator._guardExtend(name, validator);\n Validator._merge(name, validator);\n if (options && options.hasTarget) {\n TARGET_RULES.push(name);\n }\n};\n\n/**\n * Regenerates error messages across all validators.\n */\nValidator.regenerate = function regenerate () {\n ERRORS.forEach(function (errorBag) { return errorBag.regenerate(); });\n};\n\n/**\n * Removes a rule from the list of validators.\n */\nValidator.remove = function remove (name) {\n delete RULES[name];\n var idx = TARGET_RULES.indexOf(name);\n if (idx === -1) { return; }\n\n TARGET_RULES.splice(idx, 1);\n};\n\n/**\n * Checks if the given rule name is a rule that targets other fields.\n */\nValidator.isTargetRule = function isTargetRule (name) {\n return TARGET_RULES.indexOf(name) !== -1;\n};\n\n/**\n * Sets the operating mode for all newly created validators.\n * strictMode = true: Values without a rule are invalid and cause failure.\n * strictMode = false: Values without a rule are valid and are skipped.\n */\nValidator.setStrictMode = function setStrictMode (strictMode) {\n if ( strictMode === void 0 ) strictMode = true;\n\n STRICT_MODE = strictMode;\n};\n\n/**\n * Adds and sets the current locale for the validator.\n */\nValidator.prototype.localize = function localize (lang, dictionary) {\n Validator.localize(lang, dictionary);\n};\n\n/**\n * Adds and sets the current locale for the validator.\n */\nValidator.localize = function localize (lang, dictionary) {\n if (isObject(lang)) {\n Validator.dictionary.merge(lang);\n return;\n }\n\n // merge the dictionary.\n if (dictionary) {\n var locale = lang || dictionary.name;\n dictionary = assign({}, dictionary);\n Validator.dictionary.merge(( obj = {}, obj[locale] = dictionary, obj ));\n var obj;\n }\n\n if (lang) {\n // set the locale.\n Validator.locale = lang;\n }\n};\n\n/**\n * Registers a field to be validated.\n */\nValidator.prototype.attach = function attach (field) {\n // deprecate: handle old signature.\n if (arguments.length > 1) {\n warn('This signature of the attach method has been deprecated, please consult the docs.');\n field = assign({}, {\n name: arguments[0],\n rules: arguments[1]\n }, arguments[2] || { vm: { $validator: this } });\n }\n\n // fixes initial value detection with v-model and select elements.\n var value = field.initialValue;\n if (!(field instanceof Field)) {\n field = new Field(field.el || null, field);\n }\n\n this.fields.push(field);\n\n // validate the field initially\n if (field.initial) {\n this.validate((\"#\" + (field.id)), value || field.value);\n } else {\n this._validate(field, value || field.value, true).then(function (result) {\n field.flags.valid = result.valid;\n field.flags.invalid = !result.valid;\n });\n }\n\n this._addFlag(field, field.scope);\n return field;\n};\n\n/**\n * Sets the flags on a field.\n */\nValidator.prototype.flag = function flag (name, flags) {\n var field = this._resolveField(name);\n if (! field || !flags) {\n return;\n }\n\n field.setFlags(flags);\n};\n\n/**\n * Removes a field from the validator.\n */\nValidator.prototype.detach = function detach (name, scope) {\n var field = name instanceof Field ? name : this._resolveField(name, scope);\n if (!field) { return; }\n\n field.destroy();\n this.errors.remove(field.name, field.scope, field.id);\n this.fields.remove(field);\n var flags = this.flags;\n if (!isNullOrUndefined(field.scope) && flags[(\"$\" + (field.scope))]) {\n delete flags[(\"$\" + (field.scope))][field.name];\n } else if (isNullOrUndefined(field.scope)) {\n delete flags[field.name];\n }\n\n this.flags = assign({}, flags);\n};\n\n/**\n * Adds a custom validator to the list of validation rules.\n */\nValidator.prototype.extend = function extend (name, validator, options) {\n if ( options === void 0 ) options = {};\n\n Validator.extend(name, validator, options);\n};\n\n/**\n * Updates a field, updating both errors and flags.\n */\nValidator.prototype.update = function update (id, ref) {\n var scope = ref.scope;\n\n var field = this._resolveField((\"#\" + id));\n if (!field) { return; }\n\n // remove old scope.\n this.errors.update(id, { scope: scope });\n if (!isNullOrUndefined(field.scope) && this.flags[(\"$\" + (field.scope))]) {\n delete this.flags[(\"$\" + (field.scope))][field.name];\n } else if (isNullOrUndefined(field.scope)) {\n delete this.flags[field.name];\n }\n\n this._addFlag(field, scope);\n};\n\n/**\n * Removes a rule from the list of validators.\n */\nValidator.prototype.remove = function remove (name) {\n Validator.remove(name);\n};\n\n/**\n * Validates a value against a registered field validations.\n */\nValidator.prototype.validate = function validate (name, value, scope) {\n var this$1 = this;\n if ( scope === void 0 ) scope = null;\n\n if (this.paused) { return Promise.resolve(true); }\n\n // overload to validate all.\n if (arguments.length === 0) {\n return this.validateScopes();\n }\n\n // overload to validate scope-less fields.\n if (arguments.length === 1 && arguments[0] === '*') {\n return this.validateAll();\n }\n\n // overload to validate a scope.\n if (arguments.length === 1 && typeof arguments[0] === 'string' && /^(.+)\\.\\*$/.test(arguments[0])) {\n var matched = arguments[0].match(/^(.+)\\.\\*$/)[1];\n return this.validateAll(matched);\n }\n\n var field = this._resolveField(name, scope);\n if (!field) {\n return this._handleFieldNotFound(name, scope);\n }\n\n field.flags.pending = true;\n if (arguments.length === 1) {\n value = field.value;\n }\n\n var silentRun = field.isDisabled;\n\n return this._validate(field, value, silentRun).then(function (result) {\n this$1.errors.remove(field.name, field.scope, field.id);\n if (silentRun) {\n return Promise.resolve(true);\n } else if (result.errors) {\n result.errors.forEach(function (e) { return this$1.errors.add(e); });\n }\n\n field.setFlags({\n pending: false,\n valid: result.valid,\n validated: true\n });\n\n return result.valid;\n });\n};\n\n/**\n * Pauses the validator.\n */\nValidator.prototype.pause = function pause () {\n this.paused = true;\n\n return this;\n};\n\n/**\n * Resumes the validator.\n */\nValidator.prototype.resume = function resume () {\n this.paused = false;\n\n return this;\n};\n\n/**\n * Validates each value against the corresponding field validations.\n */\nValidator.prototype.validateAll = function validateAll (values) {\n var arguments$1 = arguments;\n var this$1 = this;\n\n if (this.paused) { return Promise.resolve(true); }\n\n var matcher = null;\n var providedValues = false;\n\n if (typeof values === 'string') {\n matcher = { scope: values };\n } else if (isObject(values)) {\n matcher = Object.keys(values).map(function (key) {\n return { name: key, scope: arguments$1[1] || null };\n });\n providedValues = true;\n } else if (arguments.length === 0) {\n matcher = { scope: null }; // global scope.\n } else if (Array.isArray(values)) {\n matcher = values.map(function (key) {\n return { name: key, scope: arguments$1[1] || null };\n });\n }\n\n var promises = this.fields.filter(matcher).map(function (field) { return this$1.validate(\n (\"#\" + (field.id)),\n providedValues ? values[field.name] : field.value\n ); });\n\n return Promise.all(promises).then(function (results) { return results.every(function (t) { return t; }); });\n};\n\n/**\n * Validates all scopes.\n */\nValidator.prototype.validateScopes = function validateScopes () {\n var this$1 = this;\n\n if (this.paused) { return Promise.resolve(true); }\n\n var promises = this.fields.map(function (field) { return this$1.validate(\n (\"#\" + (field.id)),\n field.value\n ); });\n\n return Promise.all(promises).then(function (results) { return results.every(function (t) { return t; }); });\n};\n\n/**\n * Perform cleanup.\n */\nValidator.prototype.destroy = function destroy () {\n // Remove ErrorBag instance.\n var idx = ERRORS.indexOf(this.errors);\n if (idx === -1) { return; }\n\n ERRORS.splice(idx, 1);\n};\n\n/**\n * Creates the fields to be validated.\n */\nValidator.prototype._createFields = function _createFields (validations) {\n var this$1 = this;\n\n if (!validations) { return; }\n\n Object.keys(validations).forEach(function (field) {\n var options = assign({}, { name: field, rules: validations[field] });\n this$1.attach(options);\n });\n};\n\n/**\n * Date rules need the existence of a format, so date_format must be supplied.\n */\nValidator.prototype._getDateFormat = function _getDateFormat (validations) {\n var format = null;\n if (validations.date_format && Array.isArray(validations.date_format)) {\n format = validations.date_format[0];\n }\n\n return format || this.dictionary.getDateFormat(this.locale);\n};\n\n/**\n * Checks if the passed rule is a date rule.\n */\nValidator.prototype._isADateRule = function _isADateRule (rule) {\n return !! ~['after', 'before', 'date_between', 'date_format'].indexOf(rule);\n};\n\n/**\n * Formats an error message for field and a rule.\n */\nValidator.prototype._formatErrorMessage = function _formatErrorMessage (field, rule, data, targetName) {\n if ( data === void 0 ) data = {};\n if ( targetName === void 0 ) targetName = null;\n\n var name = this._getFieldDisplayName(field);\n var params = this._getLocalizedParams(rule, targetName);\n\n return this.dictionary.getFieldMessage(this.locale, field.name, rule.name, [name, params, data]);\n};\n\n/**\n * Translates the parameters passed to the rule (mainly for target fields).\n */\nValidator.prototype._getLocalizedParams = function _getLocalizedParams (rule, targetName) {\n if ( targetName === void 0 ) targetName = null;\n\n if (~TARGET_RULES.indexOf(rule.name) && rule.params && rule.params[0]) {\n var localizedName = targetName || this.dictionary.getAttribute(this.locale, rule.params[0], rule.params[0]);\n return [localizedName].concat(rule.params.slice(1));\n }\n\n return rule.params;\n};\n\n/**\n * Resolves an appropriate display name, first checking 'data-as' or the registered 'prettyName'\n */\nValidator.prototype._getFieldDisplayName = function _getFieldDisplayName (field) {\n return field.alias || this.dictionary.getAttribute(this.locale, field.name, field.name);\n};\n\n/**\n * Adds a field flags to the flags collection.\n */\nValidator.prototype._addFlag = function _addFlag (field, scope) {\n if ( scope === void 0 ) scope = null;\n\n if (isNullOrUndefined(scope)) {\n this.flags = assign({}, this.flags, ( obj = {}, obj[(\"\" + (field.name))] = field.flags, obj ));\n var obj;\n return;\n }\n\n var scopeObj = assign({}, this.flags[(\"$\" + scope)] || {}, ( obj$1 = {}, obj$1[(\"\" + (field.name))] = field.flags, obj$1 ));\n var obj$1;\n this.flags = assign({}, this.flags, ( obj$2 = {}, obj$2[(\"$\" + scope)] = scopeObj, obj$2 ));\n var obj$2;\n};\n\n/**\n * Resets fields that matches the matcher options or all fields if not specified.\n */\nValidator.prototype._reset = function _reset (matcher) {\n var this$1 = this;\n\n return new Promise(function (resolve) {\n if (matcher) {\n this$1.fields.filter(matcher).forEach(function (field) {\n field.reset(); // reset field flags.\n this$1.errors.remove(field.name, field.scope, field.id);\n });\n\n return resolve();\n }\n\n this$1.fields.items.forEach(function (i) { return i.reset(); });\n this$1.errors.clear();\n resolve();\n });\n};\n\n/**\n * Tests a single input value against a rule.\n */\nValidator.prototype._test = function _test (field, value, rule) {\n var this$1 = this;\n\n var validator = RULES[rule.name];\n var params = Array.isArray(rule.params) ? toArray(rule.params) : [];\n var targetName = null;\n if (!validator || typeof validator !== 'function') {\n throw createError((\"No such validator '\" + (rule.name) + \"' exists.\"));\n }\n\n // has field dependencies.\n if (TARGET_RULES.indexOf(rule.name) !== -1) {\n var target = find(field.dependencies, function (d) { return d.name === rule.name; });\n if (target) {\n targetName = target.field.alias;\n params = [target.field.value].concat(params.slice(1));\n }\n } else if (rule.name === 'required' && field.rejectsFalse) {\n // invalidate false if no args were specified and the field rejects false by default.\n params = params.length ? params : [true];\n }\n\n if (this._isADateRule(rule.name)) {\n var dateFormat = this._getDateFormat(field.rules);\n if (rule.name !== 'date_format') {\n params.push(dateFormat);\n }\n }\n\n var result = validator(value, params);\n\n // If it is a promise.\n if (isCallable(result.then)) {\n return result.then(function (values) {\n var allValid = true;\n var data = {};\n if (Array.isArray(values)) {\n allValid = values.every(function (t) { return (isObject(t) ? t.valid : t); });\n } else { // Is a single object/boolean.\n allValid = isObject(values) ? values.valid : values;\n data = values.data;\n }\n\n return {\n valid: allValid,\n error: allValid ? undefined : this$1._createFieldError(field, rule, data, targetName)\n };\n });\n }\n\n if (!isObject(result)) {\n result = { valid: result, data: {} };\n }\n\n return {\n valid: result.valid,\n error: result.valid ? undefined : this._createFieldError(field, rule, result.data, targetName)\n };\n};\n\n/**\n * Merges a validator object into the RULES and Messages.\n */\nValidator._merge = function _merge (name, validator) {\n if (isCallable(validator)) {\n RULES[name] = validator;\n return;\n }\n\n RULES[name] = validator.validate;\n if (validator.getMessage) {\n Validator.dictionary.setMessage(this.locale, name, validator.getMessage);\n }\n};\n\n/**\n * Guards from extension violations.\n */\nValidator._guardExtend = function _guardExtend (name, validator) {\n if (isCallable(validator)) {\n return;\n }\n\n if (!isCallable(validator.validate)) {\n throw createError(\n (\"Extension Error: The validator '\" + name + \"' must be a function or have a 'validate' method.\")\n );\n }\n\n if (!isCallable(validator.getMessage) && typeof validator.getMessage !== 'string') {\n throw createError(\n (\"Extension Error: The validator '\" + name + \"' object must have a 'getMessage' method or string.\")\n );\n }\n};\n\n/**\n * Creates a Field Error Object.\n */\nValidator.prototype._createFieldError = function _createFieldError (field, rule, data, targetName) {\n var this$1 = this;\n\n return {\n id: field.id,\n field: field.name,\n msg: this._formatErrorMessage(field, rule, data, targetName),\n rule: rule.name,\n scope: field.scope,\n regenerate: function () {\n return this$1._formatErrorMessage(field, rule, data, targetName);\n }\n };\n};\n\n/**\n * Tries different strategies to find a field.\n */\nValidator.prototype._resolveField = function _resolveField (name, scope) {\n if (!isNullOrUndefined(scope)) {\n return this.fields.find({ name: name, scope: scope });\n }\n\n if (name[0] === '#') {\n return this.fields.find({ id: name.slice(1) });\n }\n\n if (name.indexOf('.') > -1) {\n var ref = name.split('.');\n var fieldScope = ref[0];\n var fieldName = ref.slice(1);\n var field = this.fields.find({ name: fieldName.join('.'), scope: fieldScope });\n if (field) {\n return field;\n }\n }\n\n return this.fields.find({ name: name, scope: null });\n};\n\n/**\n * Handles when a field is not found depending on the strict flag.\n */\nValidator.prototype._handleFieldNotFound = function _handleFieldNotFound (name, scope) {\n if (!this.strict) { return Promise.resolve(true); }\n\n var fullName = isNullOrUndefined(scope) ? name : (\"\" + (!isNullOrUndefined(scope) ? scope + '.' : '') + name);\n throw createError(\n (\"Validating a non-existent field: \\\"\" + fullName + \"\\\". Use \\\"attach()\\\" first.\")\n );\n};\n\n/**\n * Starts the validation process.\n */\nValidator.prototype._validate = function _validate (field, value, silent) {\n var this$1 = this;\n if ( silent === void 0 ) silent = false;\n\n if (!field.isRequired && (isNullOrUndefined(value) || value === '')) {\n return Promise.resolve({ valid: true });\n }\n\n var promises = [];\n var errors = [];\n var isExitEarly = false;\n // use of '.some()' is to break iteration in middle by returning true\n Object.keys(field.rules).some(function (rule) {\n var result = this$1._test(field, value, { name: rule, params: field.rules[rule] });\n if (isCallable(result.then)) {\n promises.push(result);\n } else if (this$1.fastExit && !result.valid) {\n errors.push(result.error);\n isExitEarly = true;\n } else {\n // promisify the result.\n promises.push(new Promise(function (resolve) {\n resolve(result);\n }));\n }\n\n return isExitEarly;\n });\n\n if (isExitEarly) {\n return Promise.resolve({\n valid: false,\n errors: errors\n });\n }\n\n return Promise.all(promises).then(function (values) { return values.map(function (v) {\n if (!v.valid) {\n errors.push(v.error);\n }\n\n return v.valid;\n }).every(function (t) { return t; }); }\n ).then(function (result) {\n return {\n valid: result,\n errors: errors\n };\n });\n};\n\nObject.defineProperties( Validator.prototype, prototypeAccessors );\nObject.defineProperties( Validator, staticAccessors );\n\n// \n\n/**\n * Checks if a parent validator instance was requested.\n */\nvar requestsValidator = function (injections) {\n if (isObject(injections) && injections.$validator) {\n return true;\n }\n\n return false;\n};\n\n/**\n * Creates a validator instance.\n */\nvar createValidator = function (vm, options) { return new Validator(null, { vm: vm, fastExit: options.fastExit }); };\n\nvar mixin = {\n provide: function provide () {\n if (this.$validator && !isBuiltInComponent(this.$vnode)) {\n return {\n $validator: this.$validator\n };\n }\n\n return {};\n },\n beforeCreate: function beforeCreate () {\n // if built in do nothing.\n if (isBuiltInComponent(this.$vnode)) {\n return;\n }\n\n // if its a root instance set the config if it exists.\n if (!this.$parent) {\n Config.merge(this.$options.$_veeValidate || {});\n }\n\n var options = Config.resolve(this);\n var Vue = this.$options._base; // the vue constructor.\n // TODO: Deprecate\n /* istanbul ignore next */\n if (this.$options.$validates) {\n warn('The ctor $validates option has been deprecated please set the $_veeValidate.validator option to \"new\" instead');\n this.$validator = createValidator(this, options);\n }\n\n // if its a root instance, inject anyways, or if it requested a new instance.\n if (!this.$parent || (this.$options.$_veeValidate && /new/.test(this.$options.$_veeValidate.validator))) {\n this.$validator = createValidator(this, options);\n }\n\n var requested = requestsValidator(this.$options.inject);\n\n // if automatic injection is enabled and no instance was requested.\n if (! this.$validator && options.inject && !requested) {\n this.$validator = createValidator(this, options);\n }\n\n // don't inject errors or fieldBag as no validator was resolved.\n if (! requested && ! this.$validator) {\n return;\n }\n\n // There is a validator but it isn't injected, mark as reactive.\n if (! requested && this.$validator) {\n Vue.util.defineReactive(this.$validator, 'errors', this.$validator.errors);\n Vue.util.defineReactive(this.$validator, 'flags', this.$validator.flags);\n }\n\n if (! this.$options.computed) {\n this.$options.computed = {};\n }\n\n this.$options.computed[options.errorBagName || 'errors'] = function errorBagGetter () {\n return this.$validator.errors;\n };\n this.$options.computed[options.fieldsBagName || 'fields'] = function fieldBagGetter () {\n return this.$validator.flags;\n };\n },\n beforeDestroy: function beforeDestroy () {\n if (isBuiltInComponent(this.$vnode)) { return; }\n\n // mark the validator paused to prevent delayed validation.\n if (this.$validator && this.$validator.ownerId === this._uid) {\n this.$validator.pause();\n this.$validator.destroy();\n }\n }\n};\n\n// \n\n/**\n * Finds the requested field by id from the context object.\n */\nvar findField = function (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.find({ id: getDataAttribute(el, 'id') });\n};\n\nvar directive = {\n bind: function bind (el, binding, vnode) {\n var validator = vnode.context.$validator;\n if (! validator) {\n warn(\"No validator instance is present on vm, did you forget to inject '$validator'?\");\n return;\n }\n\n var fieldOptions = Generator.generate(el, binding, vnode);\n validator.attach(fieldOptions);\n },\n inserted: function (el, binding, vnode) {\n var field = findField(el, vnode.context);\n var scope = Generator.resolveScope(el, binding, vnode);\n\n // skip if scope hasn't changed.\n if (!field || scope === field.scope) { return; }\n\n // only update scope.\n field.update({ scope: scope });\n\n // allows the field to re-evaluated once more in the update hook.\n field.updated = false;\n },\n update: function (el, binding, vnode) {\n var field = findField(el, vnode.context);\n\n // make sure we don't do unneccasary work if no important change was done.\n if (!field || (field.updated && isEqual(binding.value, binding.oldValue))) { return; }\n var scope = Generator.resolveScope(el, binding, vnode);\n var rules = Generator.resolveRules(el, binding);\n\n field.update({\n scope: scope,\n rules: rules\n });\n },\n unbind: function unbind (el, binding, ref) {\n var context = ref.context;\n\n var field = findField(el, context);\n if (!field) { return; }\n\n context.$validator.detach(field);\n }\n};\n\nvar Vue;\n\nfunction install (_Vue, options) {\n if ( options === void 0 ) options = {};\n\n if (Vue && _Vue === Vue) {\n if (process.env.NODE_ENV !== 'production') {\n warn('already installed, Vue.use(VeeValidate) should only be called once.');\n }\n return;\n }\n\n Vue = _Vue;\n Config.merge(options);\n var ref = Config.current;\n var dictionary = ref.dictionary;\n var i18n = ref.i18n;\n\n if (dictionary) {\n Validator.localize(dictionary); // merge the dictionary.\n }\n\n // try to watch locale changes.\n if (i18n && i18n._vm && isCallable(i18n._vm.$watch)) {\n i18n._vm.$watch('locale', function () {\n Validator.regenerate();\n });\n }\n\n if (!i18n && options.locale) {\n Validator.localize(options.locale); // set the locale\n }\n\n Validator.setStrictMode(Config.current.strict);\n\n Vue.mixin(mixin);\n Vue.directive('validate', directive);\n}\n\n/**\n * Formates file size.\n *\n * @param {Number|String} size\n */\nvar formatFileSize = function (size) {\n var units = ['Byte', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n var threshold = 1024;\n size = Number(size) * threshold;\n var i = size === 0 ? 0 : Math.floor(Math.log(size) / Math.log(threshold));\n return (((size / Math.pow(threshold, i)).toFixed(2) * 1) + \" \" + (units[i]));\n};\n\n/**\n * Checks if vee-validate is defined globally.\n */\nvar isDefinedGlobally = function () {\n return typeof VeeValidate !== 'undefined';\n};\n\nvar messages = {\n _default: function (field) { return (\"The \" + field + \" value is not valid.\"); },\n after: function (field, ref) {\n var target = ref[0];\n var inclusion = ref[1];\n\n return (\"The \" + field + \" must be after \" + (inclusion ? 'or equal to ' : '') + target + \".\");\n},\n alpha_dash: function (field) { return (\"The \" + field + \" field may contain alpha-numeric characters as well as dashes and underscores.\"); },\n alpha_num: function (field) { return (\"The \" + field + \" field may only contain alpha-numeric characters.\"); },\n alpha_spaces: function (field) { return (\"The \" + field + \" field may only contain alphabetic characters as well as spaces.\"); },\n alpha: function (field) { return (\"The \" + field + \" field may only contain alphabetic characters.\"); },\n before: function (field, ref) {\n var target = ref[0];\n var inclusion = ref[1];\n\n return (\"The \" + field + \" must be before \" + (inclusion ? 'or equal to ' : '') + target + \".\");\n},\n between: function (field, ref) {\n var min = ref[0];\n var max = ref[1];\n\n return (\"The \" + field + \" field must be between \" + min + \" and \" + max + \".\");\n},\n confirmed: function (field) { return (\"The \" + field + \" confirmation does not match.\"); },\n credit_card: function (field) { return (\"The \" + field + \" field is invalid.\"); },\n date_between: function (field, ref) {\n var min = ref[0];\n var max = ref[1];\n\n return (\"The \" + field + \" must be between \" + min + \" and \" + max + \".\");\n},\n date_format: function (field, ref) {\n var format = ref[0];\n\n return (\"The \" + field + \" must be in the format \" + format + \".\");\n},\n decimal: function (field, ref) {\n if ( ref === void 0 ) ref = [];\n var decimals = ref[0]; if ( decimals === void 0 ) decimals = '*';\n\n return (\"The \" + field + \" field must be numeric and may contain \" + (!decimals || decimals === '*' ? '' : decimals) + \" decimal points.\");\n},\n digits: function (field, ref) {\n var length = ref[0];\n\n return (\"The \" + field + \" field must be numeric and exactly contain \" + length + \" digits.\");\n},\n dimensions: function (field, ref) {\n var width = ref[0];\n var height = ref[1];\n\n return (\"The \" + field + \" field must be \" + width + \" pixels by \" + height + \" pixels.\");\n},\n email: function (field) { return (\"The \" + field + \" field must be a valid email.\"); },\n ext: function (field) { return (\"The \" + field + \" field must be a valid file.\"); },\n image: function (field) { return (\"The \" + field + \" field must be an image.\"); },\n in: function (field) { return (\"The \" + field + \" field must be a valid value.\"); },\n integer: function (field) { return (\"The \" + field + \" field must be an integer.\"); },\n ip: function (field) { return (\"The \" + field + \" field must be a valid ip address.\"); },\n length: function (field, ref) {\n var length = ref[0];\n var max = ref[1];\n\n if (max) {\n return (\"The \" + field + \" length be between \" + length + \" and \" + max + \".\");\n }\n\n return (\"The \" + field + \" length must be \" + length + \".\");\n },\n max: function (field, ref) {\n var length = ref[0];\n\n return (\"The \" + field + \" field may not be greater than \" + length + \" characters.\");\n},\n max_value: function (field, ref) {\n var max = ref[0];\n\n return (\"The \" + field + \" field must be \" + max + \" or less.\");\n},\n mimes: function (field) { return (\"The \" + field + \" field must have a valid file type.\"); },\n min: function (field, ref) {\n var length = ref[0];\n\n return (\"The \" + field + \" field must be at least \" + length + \" characters.\");\n},\n min_value: function (field, ref) {\n var min = ref[0];\n\n return (\"The \" + field + \" field must be \" + min + \" or more.\");\n},\n not_in: function (field) { return (\"The \" + field + \" field must be a valid value.\"); },\n numeric: function (field) { return (\"The \" + field + \" field may only contain numeric characters.\"); },\n regex: function (field) { return (\"The \" + field + \" field format is invalid.\"); },\n required: function (field) { return (\"The \" + field + \" field is required.\"); },\n size: function (field, ref) {\n var size = ref[0];\n\n return (\"The \" + field + \" size must be less than \" + (formatFileSize(size)) + \".\");\n},\n url: function (field) { return (\"The \" + field + \" field is not a valid URL.\"); }\n};\n\nvar locale = {\n name: 'en',\n messages: messages,\n attributes: {}\n};\n\nif (isDefinedGlobally()) {\n // eslint-disable-next-line\n VeeValidate.Validator.localize(( obj = {}, obj[locale.name] = locale, obj ));\n var obj;\n}\n\n// \n\nfunction use (plugin, options) {\n if ( options === void 0 ) options = {};\n\n if (!isCallable(plugin)) {\n return warn('The plugin must be a callable function');\n }\n\n plugin({ Validator: Validator, ErrorBag: ErrorBag, Rules: Validator.rules }, options);\n}\n\nvar MILLISECONDS_IN_HOUR = 3600000;\nvar MILLISECONDS_IN_MINUTE = 60000;\nvar DEFAULT_ADDITIONAL_DIGITS = 2;\n\nvar patterns = {\n dateTimeDelimeter: /[T ]/,\n plainTime: /:/,\n\n // year tokens\n YY: /^(\\d{2})$/,\n YYY: [\n /^([+-]\\d{2})$/, // 0 additional digits\n /^([+-]\\d{3})$/, // 1 additional digit\n /^([+-]\\d{4})$/ // 2 additional digits\n ],\n YYYY: /^(\\d{4})/,\n YYYYY: [\n /^([+-]\\d{4})/, // 0 additional digits\n /^([+-]\\d{5})/, // 1 additional digit\n /^([+-]\\d{6})/ // 2 additional digits\n ],\n\n // date tokens\n MM: /^-(\\d{2})$/,\n DDD: /^-?(\\d{3})$/,\n MMDD: /^-?(\\d{2})-?(\\d{2})$/,\n Www: /^-?W(\\d{2})$/,\n WwwD: /^-?W(\\d{2})-?(\\d{1})$/,\n\n HH: /^(\\d{2}([.,]\\d*)?)$/,\n HHMM: /^(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n HHMMSS: /^(\\d{2}):?(\\d{2}):?(\\d{2}([.,]\\d*)?)$/,\n\n // timezone tokens\n timezone: /([Z+-].*)$/,\n timezoneZ: /^(Z)$/,\n timezoneHH: /^([+-])(\\d{2})$/,\n timezoneHHMM: /^([+-])(\\d{2}):?(\\d{2})$/\n};\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If an argument is a string, the function tries to parse it.\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument is null, it is treated as an invalid date.\n *\n * If all above fails, the function passes the given argument to Date constructor.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n * All *date-fns* functions will throw `RangeError` if `options.additionalDigits` is not 0, 1, 2 or undefined.\n *\n * @param {*} argument - the value to convert\n * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * var result = toDate('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * var result = toDate('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\nfunction toDate (argument, dirtyOptions) {\n if (arguments.length < 1) {\n throw new TypeError('1 argument required, but only ' + arguments.length + ' present')\n }\n\n if (argument === null) {\n return new Date(NaN)\n }\n\n var options = dirtyOptions || {};\n\n var additionalDigits = options.additionalDigits === undefined ? DEFAULT_ADDITIONAL_DIGITS : Number(options.additionalDigits);\n if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n throw new RangeError('additionalDigits must be 0, 1 or 2')\n }\n\n // Clone the date\n if (argument instanceof Date) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime())\n } else if (typeof argument !== 'string') {\n return new Date(argument)\n }\n\n var dateStrings = splitDateString(argument);\n\n var parseYearResult = parseYear(dateStrings.date, additionalDigits);\n var year = parseYearResult.year;\n var restDateString = parseYearResult.restDateString;\n\n var date = parseDate(restDateString, year);\n\n if (date) {\n var timestamp = date.getTime();\n var time = 0;\n var offset;\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone);\n } else {\n // get offset accurate to hour in timezones that change offset\n offset = new Date(timestamp + time).getTimezoneOffset();\n offset = new Date(timestamp + time + offset * MILLISECONDS_IN_MINUTE).getTimezoneOffset();\n }\n\n return new Date(timestamp + time + offset * MILLISECONDS_IN_MINUTE)\n } else {\n return new Date(argument)\n }\n}\n\nfunction splitDateString (dateString) {\n var dateStrings = {};\n var array = dateString.split(patterns.dateTimeDelimeter);\n var timeString;\n\n if (patterns.plainTime.test(array[0])) {\n dateStrings.date = null;\n timeString = array[0];\n } else {\n dateStrings.date = array[0];\n timeString = array[1];\n }\n\n if (timeString) {\n var token = patterns.timezone.exec(timeString);\n if (token) {\n dateStrings.time = timeString.replace(token[1], '');\n dateStrings.timezone = token[1];\n } else {\n dateStrings.time = timeString;\n }\n }\n\n return dateStrings\n}\n\nfunction parseYear (dateString, additionalDigits) {\n var patternYYY = patterns.YYY[additionalDigits];\n var patternYYYYY = patterns.YYYYY[additionalDigits];\n\n var token;\n\n // YYYY or ±YYYYY\n token = patterns.YYYY.exec(dateString) || patternYYYYY.exec(dateString);\n if (token) {\n var yearString = token[1];\n return {\n year: parseInt(yearString, 10),\n restDateString: dateString.slice(yearString.length)\n }\n }\n\n // YY or ±YYY\n token = patterns.YY.exec(dateString) || patternYYY.exec(dateString);\n if (token) {\n var centuryString = token[1];\n return {\n year: parseInt(centuryString, 10) * 100,\n restDateString: dateString.slice(centuryString.length)\n }\n }\n\n // Invalid ISO-formatted year\n return {\n year: null\n }\n}\n\nfunction parseDate (dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) {\n return null\n }\n\n var token;\n var date;\n var month;\n var week;\n\n // YYYY\n if (dateString.length === 0) {\n date = new Date(0);\n date.setUTCFullYear(year);\n return date\n }\n\n // YYYY-MM\n token = patterns.MM.exec(dateString);\n if (token) {\n date = new Date(0);\n month = parseInt(token[1], 10) - 1;\n date.setUTCFullYear(year, month);\n return date\n }\n\n // YYYY-DDD or YYYYDDD\n token = patterns.DDD.exec(dateString);\n if (token) {\n date = new Date(0);\n var dayOfYear = parseInt(token[1], 10);\n date.setUTCFullYear(year, 0, dayOfYear);\n return date\n }\n\n // YYYY-MM-DD or YYYYMMDD\n token = patterns.MMDD.exec(dateString);\n if (token) {\n date = new Date(0);\n month = parseInt(token[1], 10) - 1;\n var day = parseInt(token[2], 10);\n date.setUTCFullYear(year, month, day);\n return date\n }\n\n // YYYY-Www or YYYYWww\n token = patterns.Www.exec(dateString);\n if (token) {\n week = parseInt(token[1], 10) - 1;\n return dayOfISOYear(year, week)\n }\n\n // YYYY-Www-D or YYYYWwwD\n token = patterns.WwwD.exec(dateString);\n if (token) {\n week = parseInt(token[1], 10) - 1;\n var dayOfWeek = parseInt(token[2], 10) - 1;\n return dayOfISOYear(year, week, dayOfWeek)\n }\n\n // Invalid ISO-formatted date\n return null\n}\n\nfunction parseTime (timeString) {\n var token;\n var hours;\n var minutes;\n\n // hh\n token = patterns.HH.exec(timeString);\n if (token) {\n hours = parseFloat(token[1].replace(',', '.'));\n return (hours % 24) * MILLISECONDS_IN_HOUR\n }\n\n // hh:mm or hhmm\n token = patterns.HHMM.exec(timeString);\n if (token) {\n hours = parseInt(token[1], 10);\n minutes = parseFloat(token[2].replace(',', '.'));\n return (hours % 24) * MILLISECONDS_IN_HOUR +\n minutes * MILLISECONDS_IN_MINUTE\n }\n\n // hh:mm:ss or hhmmss\n token = patterns.HHMMSS.exec(timeString);\n if (token) {\n hours = parseInt(token[1], 10);\n minutes = parseInt(token[2], 10);\n var seconds = parseFloat(token[3].replace(',', '.'));\n return (hours % 24) * MILLISECONDS_IN_HOUR +\n minutes * MILLISECONDS_IN_MINUTE +\n seconds * 1000\n }\n\n // Invalid ISO-formatted time\n return null\n}\n\nfunction parseTimezone (timezoneString) {\n var token;\n var absoluteOffset;\n\n // Z\n token = patterns.timezoneZ.exec(timezoneString);\n if (token) {\n return 0\n }\n\n // ±hh\n token = patterns.timezoneHH.exec(timezoneString);\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60;\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n // ±hh:mm or ±hhmm\n token = patterns.timezoneHHMM.exec(timezoneString);\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10);\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n return 0\n}\n\nfunction dayOfISOYear (isoYear, week, day) {\n week = week || 0;\n day = day || 0;\n var date = new Date(0);\n date.setUTCFullYear(isoYear, 0, 4);\n var fourthOfJanuaryDay = date.getUTCDay() || 7;\n var diff = week * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date\n}\n\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added\n * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * var result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\nfunction addMilliseconds (dirtyDate, dirtyAmount, dirtyOptions) {\n if (arguments.length < 2) {\n throw new TypeError('2 arguments required, but only ' + arguments.length + ' present')\n }\n\n var timestamp = toDate(dirtyDate, dirtyOptions).getTime();\n var amount = Number(dirtyAmount);\n return new Date(timestamp + amount)\n}\n\nfunction cloneObject (dirtyObject) {\n dirtyObject = dirtyObject || {};\n var object = {};\n\n for (var property in dirtyObject) {\n if (dirtyObject.hasOwnProperty(property)) {\n object[property] = dirtyObject[property];\n }\n }\n\n return object\n}\n\nvar MILLISECONDS_IN_MINUTE$2 = 60000;\n\n/**\n * @name addMinutes\n * @category Minute Helpers\n * @summary Add the specified number of minutes to the given date.\n *\n * @description\n * Add the specified number of minutes to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be added\n * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @returns {Date} the new date with the minutes added\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Add 30 minutes to 10 July 2014 12:00:00:\n * var result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 12:30:00\n */\nfunction addMinutes (dirtyDate, dirtyAmount, dirtyOptions) {\n if (arguments.length < 2) {\n throw new TypeError('2 arguments required, but only ' + arguments.length + ' present')\n }\n\n var amount = Number(dirtyAmount);\n return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_MINUTE$2, dirtyOptions)\n}\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // For the valid date:\n * var result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * var result = isValid('2014-02-31')\n * //=> true\n *\n * @example\n * // For the invalid date:\n * var result = isValid(new Date(''))\n * //=> false\n */\nfunction isValid (dirtyDate, dirtyOptions) {\n if (arguments.length < 1) {\n throw new TypeError('1 argument required, but only ' + arguments.length + ' present')\n }\n\n var date = toDate(dirtyDate, dirtyOptions);\n return !isNaN(date)\n}\n\nvar formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n\n halfAMinute: 'half a minute',\n\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\n\nfunction formatDistance (token, count, options) {\n options = options || {};\n\n var result;\n if (typeof formatDistanceLocale[token] === 'string') {\n result = formatDistanceLocale[token];\n } else if (count === 1) {\n result = formatDistanceLocale[token].one;\n } else {\n result = formatDistanceLocale[token].other.replace('{{count}}', count);\n }\n\n if (options.addSuffix) {\n if (options.comparison > 0) {\n return 'in ' + result\n } else {\n return result + ' ago'\n }\n }\n\n return result\n}\n\nvar tokensToBeShortedPattern = /MMMM|MM|DD|dddd/g;\n\nfunction buildShortLongFormat (format) {\n return format.replace(tokensToBeShortedPattern, function (token) {\n return token.slice(1)\n })\n}\n\n/**\n * @name buildFormatLongFn\n * @category Locale Helpers\n * @summary Build `formatLong` property for locale used by `format`, `formatRelative` and `parse` functions.\n *\n * @description\n * Build `formatLong` property for locale used by `format`, `formatRelative` and `parse` functions.\n * Returns a function which takes one of the following tokens as the argument:\n * `'LTS'`, `'LT'`, `'L'`, `'LL'`, `'LLL'`, `'l'`, `'ll'`, `'lll'`, `'llll'`\n * and returns a long format string written as `format` token strings.\n * See [format]{@link https://date-fns.org/docs/format}\n *\n * `'l'`, `'ll'`, `'lll'` and `'llll'` formats are built automatically\n * by shortening some of the tokens from corresponding unshortened formats\n * (e.g., if `LL` is `'MMMM DD YYYY'` then `ll` will be `MMM D YYYY`)\n *\n * @param {Object} obj - the object with long formats written as `format` token strings\n * @param {String} obj.LT - time format: hours and minutes\n * @param {String} obj.LTS - time format: hours, minutes and seconds\n * @param {String} obj.L - short date format: numeric day, month and year\n * @param {String} [obj.l] - short date format: numeric day, month and year (shortened)\n * @param {String} obj.LL - long date format: day, month in words, and year\n * @param {String} [obj.ll] - long date format: day, month in words, and year (shortened)\n * @param {String} obj.LLL - long date and time format\n * @param {String} [obj.lll] - long date and time format (shortened)\n * @param {String} obj.LLLL - long date, time and weekday format\n * @param {String} [obj.llll] - long date, time and weekday format (shortened)\n * @returns {Function} `formatLong` property of the locale\n *\n * @example\n * // For `en-US` locale:\n * locale.formatLong = buildFormatLongFn({\n * LT: 'h:mm aa',\n * LTS: 'h:mm:ss aa',\n * L: 'MM/DD/YYYY',\n * LL: 'MMMM D YYYY',\n * LLL: 'MMMM D YYYY h:mm aa',\n * LLLL: 'dddd, MMMM D YYYY h:mm aa'\n * })\n */\nfunction buildFormatLongFn (obj) {\n var formatLongLocale = {\n LTS: obj.LTS,\n LT: obj.LT,\n L: obj.L,\n LL: obj.LL,\n LLL: obj.LLL,\n LLLL: obj.LLLL,\n l: obj.l || buildShortLongFormat(obj.L),\n ll: obj.ll || buildShortLongFormat(obj.LL),\n lll: obj.lll || buildShortLongFormat(obj.LLL),\n llll: obj.llll || buildShortLongFormat(obj.LLLL)\n };\n\n return function (token) {\n return formatLongLocale[token]\n }\n}\n\nvar formatLong = buildFormatLongFn({\n LT: 'h:mm aa',\n LTS: 'h:mm:ss aa',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D YYYY',\n LLL: 'MMMM D YYYY h:mm aa',\n LLLL: 'dddd, MMMM D YYYY h:mm aa'\n});\n\nvar formatRelativeLocale = {\n lastWeek: '[last] dddd [at] LT',\n yesterday: '[yesterday at] LT',\n today: '[today at] LT',\n tomorrow: '[tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n other: 'L'\n};\n\nfunction formatRelative (token, date, baseDate, options) {\n return formatRelativeLocale[token]\n}\n\n/**\n * @name buildLocalizeFn\n * @category Locale Helpers\n * @summary Build `localize.weekday`, `localize.month` and `localize.timeOfDay` properties for the locale.\n *\n * @description\n * Build `localize.weekday`, `localize.month` and `localize.timeOfDay` properties for the locale\n * used by `format` function.\n * If no `type` is supplied to the options of the resulting function, `defaultType` will be used (see example).\n *\n * `localize.weekday` function takes the weekday index as argument (0 - Sunday).\n * `localize.month` takes the month index (0 - January).\n * `localize.timeOfDay` takes the hours. Use `indexCallback` to convert them to an array index (see example).\n *\n * @param {Object} values - the object with arrays of values\n * @param {String} defaultType - the default type for the localize function\n * @param {Function} [indexCallback] - the callback which takes the resulting function argument\n * and converts it into value array index\n * @returns {Function} the resulting function\n *\n * @example\n * var timeOfDayValues = {\n * uppercase: ['AM', 'PM'],\n * lowercase: ['am', 'pm'],\n * long: ['a.m.', 'p.m.']\n * }\n * locale.localize.timeOfDay = buildLocalizeFn(timeOfDayValues, 'long', function (hours) {\n * // 0 is a.m. array index, 1 is p.m. array index\n * return (hours / 12) >= 1 ? 1 : 0\n * })\n * locale.localize.timeOfDay(16, {type: 'uppercase'}) //=> 'PM'\n * locale.localize.timeOfDay(5) //=> 'a.m.'\n */\nfunction buildLocalizeFn (values, defaultType, indexCallback) {\n return function (dirtyIndex, dirtyOptions) {\n var options = dirtyOptions || {};\n var type = options.type ? String(options.type) : defaultType;\n var valuesArray = values[type] || values[defaultType];\n var index = indexCallback ? indexCallback(Number(dirtyIndex)) : Number(dirtyIndex);\n return valuesArray[index]\n }\n}\n\n/**\n * @name buildLocalizeArrayFn\n * @category Locale Helpers\n * @summary Build `localize.weekdays`, `localize.months` and `localize.timesOfDay` properties for the locale.\n *\n * @description\n * Build `localize.weekdays`, `localize.months` and `localize.timesOfDay` properties for the locale.\n * If no `type` is supplied to the options of the resulting function, `defaultType` will be used (see example).\n *\n * @param {Object} values - the object with arrays of values\n * @param {String} defaultType - the default type for the localize function\n * @returns {Function} the resulting function\n *\n * @example\n * var weekdayValues = {\n * narrow: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n * short: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n * long: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n * }\n * locale.localize.weekdays = buildLocalizeArrayFn(weekdayValues, 'long')\n * locale.localize.weekdays({type: 'narrow'}) //=> ['Su', 'Mo', ...]\n * locale.localize.weekdays() //=> ['Sunday', 'Monday', ...]\n */\nfunction buildLocalizeArrayFn (values, defaultType) {\n return function (dirtyOptions) {\n var options = dirtyOptions || {};\n var type = options.type ? String(options.type) : defaultType;\n return values[type] || values[defaultType]\n }\n}\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nvar weekdayValues = {\n narrow: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n short: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n long: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\n\nvar monthValues = {\n short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n long: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\n\n// `timeOfDay` is used to designate which part of the day it is, when used with 12-hour clock.\n// Use the system which is used the most commonly in the locale.\n// For example, if the country doesn't use a.m./p.m., you can use `night`/`morning`/`afternoon`/`evening`:\n//\n// var timeOfDayValues = {\n// any: ['in the night', 'in the morning', 'in the afternoon', 'in the evening']\n// }\n//\n// And later:\n//\n// var localize = {\n// // The callback takes the hours as the argument and returns the array index\n// timeOfDay: buildLocalizeFn(timeOfDayValues, 'any', function (hours) {\n// if (hours >= 17) {\n// return 3\n// } else if (hours >= 12) {\n// return 2\n// } else if (hours >= 4) {\n// return 1\n// } else {\n// return 0\n// }\n// }),\n// timesOfDay: buildLocalizeArrayFn(timeOfDayValues, 'any')\n// }\nvar timeOfDayValues = {\n uppercase: ['AM', 'PM'],\n lowercase: ['am', 'pm'],\n long: ['a.m.', 'p.m.']\n};\n\nfunction ordinalNumber (dirtyNumber, dirtyOptions) {\n var number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`:\n //\n // var options = dirtyOptions || {}\n // var unit = String(options.unit)\n //\n // where `unit` can be 'month', 'quarter', 'week', 'isoWeek', 'dayOfYear',\n // 'dayOfMonth' or 'dayOfWeek'\n\n var rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st'\n case 2:\n return number + 'nd'\n case 3:\n return number + 'rd'\n }\n }\n return number + 'th'\n}\n\nvar localize = {\n ordinalNumber: ordinalNumber,\n weekday: buildLocalizeFn(weekdayValues, 'long'),\n weekdays: buildLocalizeArrayFn(weekdayValues, 'long'),\n month: buildLocalizeFn(monthValues, 'long'),\n months: buildLocalizeArrayFn(monthValues, 'long'),\n timeOfDay: buildLocalizeFn(timeOfDayValues, 'long', function (hours) {\n return (hours / 12) >= 1 ? 1 : 0\n }),\n timesOfDay: buildLocalizeArrayFn(timeOfDayValues, 'long')\n};\n\n/**\n * @name buildMatchFn\n * @category Locale Helpers\n * @summary Build `match.weekdays`, `match.months` and `match.timesOfDay` properties for the locale.\n *\n * @description\n * Build `match.weekdays`, `match.months` and `match.timesOfDay` properties for the locale used by `parse` function.\n * If no `type` is supplied to the options of the resulting function, `defaultType` will be used (see example).\n * The result of the match function will be passed into corresponding parser function\n * (`match.weekday`, `match.month` or `match.timeOfDay` respectively. See `buildParseFn`).\n *\n * @param {Object} values - the object with RegExps\n * @param {String} defaultType - the default type for the match function\n * @returns {Function} the resulting function\n *\n * @example\n * var matchWeekdaysPatterns = {\n * narrow: /^(su|mo|tu|we|th|fr|sa)/i,\n * short: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n * long: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n * }\n * locale.match.weekdays = buildMatchFn(matchWeekdaysPatterns, 'long')\n * locale.match.weekdays('Sunday', {type: 'narrow'}) //=> ['Su', 'Su', ...]\n * locale.match.weekdays('Sunday') //=> ['Sunday', 'Sunday', ...]\n */\nfunction buildMatchFn (patterns, defaultType) {\n return function (dirtyString, dirtyOptions) {\n var options = dirtyOptions || {};\n var type = options.type ? String(options.type) : defaultType;\n var pattern = patterns[type] || patterns[defaultType];\n var string = String(dirtyString);\n return string.match(pattern)\n }\n}\n\n/**\n * @name buildParseFn\n * @category Locale Helpers\n * @summary Build `match.weekday`, `match.month` and `match.timeOfDay` properties for the locale.\n *\n * @description\n * Build `match.weekday`, `match.month` and `match.timeOfDay` properties for the locale used by `parse` function.\n * The argument of the resulting function is the result of the corresponding match function\n * (`match.weekdays`, `match.months` or `match.timesOfDay` respectively. See `buildMatchFn`).\n *\n * @param {Object} values - the object with arrays of RegExps\n * @param {String} defaultType - the default type for the parser function\n * @returns {Function} the resulting function\n *\n * @example\n * var parseWeekdayPatterns = {\n * any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n * }\n * locale.match.weekday = buildParseFn(matchWeekdaysPatterns, 'long')\n * var matchResult = locale.match.weekdays('Friday')\n * locale.match.weekday(matchResult) //=> 5\n */\nfunction buildParseFn (patterns, defaultType) {\n return function (matchResult, dirtyOptions) {\n var options = dirtyOptions || {};\n var type = options.type ? String(options.type) : defaultType;\n var patternsArray = patterns[type] || patterns[defaultType];\n var string = matchResult[1];\n\n return patternsArray.findIndex(function (pattern) {\n return pattern.test(string)\n })\n }\n}\n\n/**\n * @name buildMatchPatternFn\n * @category Locale Helpers\n * @summary Build match function from a single RegExp.\n *\n * @description\n * Build match function from a single RegExp.\n * Usually used for building `match.ordinalNumbers` property of the locale.\n *\n * @param {Object} pattern - the RegExp\n * @returns {Function} the resulting function\n *\n * @example\n * locale.match.ordinalNumbers = buildMatchPatternFn(/^(\\d+)(th|st|nd|rd)?/i)\n * locale.match.ordinalNumbers('3rd') //=> ['3rd', '3', 'rd', ...]\n */\nfunction buildMatchPatternFn (pattern) {\n return function (dirtyString) {\n var string = String(dirtyString);\n return string.match(pattern)\n }\n}\n\n/**\n * @name parseDecimal\n * @category Locale Helpers\n * @summary Parses the match result into decimal number.\n *\n * @description\n * Parses the match result into decimal number.\n * Uses the string matched with the first set of parentheses of match RegExp.\n *\n * @param {Array} matchResult - the object returned by matching function\n * @returns {Number} the parsed value\n *\n * @example\n * locale.match = {\n * ordinalNumbers: (dirtyString) {\n * return String(dirtyString).match(/^(\\d+)(th|st|nd|rd)?/i)\n * },\n * ordinalNumber: parseDecimal\n * }\n */\nfunction parseDecimal (matchResult) {\n return parseInt(matchResult[1], 10)\n}\n\nvar matchOrdinalNumbersPattern = /^(\\d+)(th|st|nd|rd)?/i;\n\nvar matchWeekdaysPatterns = {\n narrow: /^(su|mo|tu|we|th|fr|sa)/i,\n short: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n long: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\n\nvar parseWeekdayPatterns = {\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\n\nvar matchMonthsPatterns = {\n short: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n long: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\n\nvar parseMonthPatterns = {\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\n\n// `timeOfDay` is used to designate which part of the day it is, when used with 12-hour clock.\n// Use the system which is used the most commonly in the locale.\n// For example, if the country doesn't use a.m./p.m., you can use `night`/`morning`/`afternoon`/`evening`:\n//\n// var matchTimesOfDayPatterns = {\n// long: /^((in the)? (night|morning|afternoon|evening?))/i\n// }\n//\n// var parseTimeOfDayPatterns = {\n// any: [/(night|morning)/i, /(afternoon|evening)/i]\n// }\nvar matchTimesOfDayPatterns = {\n short: /^(am|pm)/i,\n long: /^([ap]\\.?\\s?m\\.?)/i\n};\n\nvar parseTimeOfDayPatterns = {\n any: [/^a/i, /^p/i]\n};\n\nvar match = {\n ordinalNumbers: buildMatchPatternFn(matchOrdinalNumbersPattern),\n ordinalNumber: parseDecimal,\n weekdays: buildMatchFn(matchWeekdaysPatterns, 'long'),\n weekday: buildParseFn(parseWeekdayPatterns, 'any'),\n months: buildMatchFn(matchMonthsPatterns, 'long'),\n month: buildParseFn(parseMonthPatterns, 'any'),\n timesOfDay: buildMatchFn(matchTimesOfDayPatterns, 'long'),\n timeOfDay: buildParseFn(parseTimeOfDayPatterns, 'any')\n};\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n */\nvar locale$1 = {\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1\n }\n};\n\nvar MILLISECONDS_IN_DAY$1 = 86400000;\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction getUTCDayOfYear (dirtyDate, dirtyOptions) {\n var date = toDate(dirtyDate, dirtyOptions);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY$1) + 1\n}\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction startOfUTCISOWeek (dirtyDate, dirtyOptions) {\n var weekStartsOn = 1;\n\n var date = toDate(dirtyDate, dirtyOptions);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date\n}\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction getUTCISOWeekYear (dirtyDate, dirtyOptions) {\n var date = toDate(dirtyDate, dirtyOptions);\n var year = date.getUTCFullYear();\n\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear, dirtyOptions);\n\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear, dirtyOptions);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year\n } else {\n return year - 1\n }\n}\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction startOfUTCISOWeekYear (dirtyDate, dirtyOptions) {\n var year = getUTCISOWeekYear(dirtyDate, dirtyOptions);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary, dirtyOptions);\n return date\n}\n\nvar MILLISECONDS_IN_WEEK$2 = 604800000;\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction getUTCISOWeek (dirtyDate, dirtyOptions) {\n var date = toDate(dirtyDate, dirtyOptions);\n var diff = startOfUTCISOWeek(date, dirtyOptions).getTime() - startOfUTCISOWeekYear(date, dirtyOptions).getTime();\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round(diff / MILLISECONDS_IN_WEEK$2) + 1\n}\n\nvar formatters = {\n // Month: 1, 2, ..., 12\n 'M': function (date) {\n return date.getUTCMonth() + 1\n },\n\n // Month: 1st, 2nd, ..., 12th\n 'Mo': function (date, options) {\n var month = date.getUTCMonth() + 1;\n return options.locale.localize.ordinalNumber(month, {unit: 'month'})\n },\n\n // Month: 01, 02, ..., 12\n 'MM': function (date) {\n return addLeadingZeros(date.getUTCMonth() + 1, 2)\n },\n\n // Month: Jan, Feb, ..., Dec\n 'MMM': function (date, options) {\n return options.locale.localize.month(date.getUTCMonth(), {type: 'short'})\n },\n\n // Month: January, February, ..., December\n 'MMMM': function (date, options) {\n return options.locale.localize.month(date.getUTCMonth(), {type: 'long'})\n },\n\n // Quarter: 1, 2, 3, 4\n 'Q': function (date) {\n return Math.ceil((date.getUTCMonth() + 1) / 3)\n },\n\n // Quarter: 1st, 2nd, 3rd, 4th\n 'Qo': function (date, options) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n return options.locale.localize.ordinalNumber(quarter, {unit: 'quarter'})\n },\n\n // Day of month: 1, 2, ..., 31\n 'D': function (date) {\n return date.getUTCDate()\n },\n\n // Day of month: 1st, 2nd, ..., 31st\n 'Do': function (date, options) {\n return options.locale.localize.ordinalNumber(date.getUTCDate(), {unit: 'dayOfMonth'})\n },\n\n // Day of month: 01, 02, ..., 31\n 'DD': function (date) {\n return addLeadingZeros(date.getUTCDate(), 2)\n },\n\n // Day of year: 1, 2, ..., 366\n 'DDD': function (date) {\n return getUTCDayOfYear(date)\n },\n\n // Day of year: 1st, 2nd, ..., 366th\n 'DDDo': function (date, options) {\n return options.locale.localize.ordinalNumber(getUTCDayOfYear(date), {unit: 'dayOfYear'})\n },\n\n // Day of year: 001, 002, ..., 366\n 'DDDD': function (date) {\n return addLeadingZeros(getUTCDayOfYear(date), 3)\n },\n\n // Day of week: Su, Mo, ..., Sa\n 'dd': function (date, options) {\n return options.locale.localize.weekday(date.getUTCDay(), {type: 'narrow'})\n },\n\n // Day of week: Sun, Mon, ..., Sat\n 'ddd': function (date, options) {\n return options.locale.localize.weekday(date.getUTCDay(), {type: 'short'})\n },\n\n // Day of week: Sunday, Monday, ..., Saturday\n 'dddd': function (date, options) {\n return options.locale.localize.weekday(date.getUTCDay(), {type: 'long'})\n },\n\n // Day of week: 0, 1, ..., 6\n 'd': function (date) {\n return date.getUTCDay()\n },\n\n // Day of week: 0th, 1st, 2nd, ..., 6th\n 'do': function (date, options) {\n return options.locale.localize.ordinalNumber(date.getUTCDay(), {unit: 'dayOfWeek'})\n },\n\n // Day of ISO week: 1, 2, ..., 7\n 'E': function (date) {\n return date.getUTCDay() || 7\n },\n\n // ISO week: 1, 2, ..., 53\n 'W': function (date) {\n return getUTCISOWeek(date)\n },\n\n // ISO week: 1st, 2nd, ..., 53th\n 'Wo': function (date, options) {\n return options.locale.localize.ordinalNumber(getUTCISOWeek(date), {unit: 'isoWeek'})\n },\n\n // ISO week: 01, 02, ..., 53\n 'WW': function (date) {\n return addLeadingZeros(getUTCISOWeek(date), 2)\n },\n\n // Year: 00, 01, ..., 99\n 'YY': function (date) {\n return addLeadingZeros(date.getUTCFullYear(), 4).substr(2)\n },\n\n // Year: 1900, 1901, ..., 2099\n 'YYYY': function (date) {\n return addLeadingZeros(date.getUTCFullYear(), 4)\n },\n\n // ISO week-numbering year: 00, 01, ..., 99\n 'GG': function (date) {\n return String(getUTCISOWeekYear(date)).substr(2)\n },\n\n // ISO week-numbering year: 1900, 1901, ..., 2099\n 'GGGG': function (date) {\n return getUTCISOWeekYear(date)\n },\n\n // Hour: 0, 1, ... 23\n 'H': function (date) {\n return date.getUTCHours()\n },\n\n // Hour: 00, 01, ..., 23\n 'HH': function (date) {\n return addLeadingZeros(date.getUTCHours(), 2)\n },\n\n // Hour: 1, 2, ..., 12\n 'h': function (date) {\n var hours = date.getUTCHours();\n if (hours === 0) {\n return 12\n } else if (hours > 12) {\n return hours % 12\n } else {\n return hours\n }\n },\n\n // Hour: 01, 02, ..., 12\n 'hh': function (date) {\n return addLeadingZeros(formatters['h'](date), 2)\n },\n\n // Minute: 0, 1, ..., 59\n 'm': function (date) {\n return date.getUTCMinutes()\n },\n\n // Minute: 00, 01, ..., 59\n 'mm': function (date) {\n return addLeadingZeros(date.getUTCMinutes(), 2)\n },\n\n // Second: 0, 1, ..., 59\n 's': function (date) {\n return date.getUTCSeconds()\n },\n\n // Second: 00, 01, ..., 59\n 'ss': function (date) {\n return addLeadingZeros(date.getUTCSeconds(), 2)\n },\n\n // 1/10 of second: 0, 1, ..., 9\n 'S': function (date) {\n return Math.floor(date.getUTCMilliseconds() / 100)\n },\n\n // 1/100 of second: 00, 01, ..., 99\n 'SS': function (date) {\n return addLeadingZeros(Math.floor(date.getUTCMilliseconds() / 10), 2)\n },\n\n // Millisecond: 000, 001, ..., 999\n 'SSS': function (date) {\n return addLeadingZeros(date.getUTCMilliseconds(), 3)\n },\n\n // Timezone: -01:00, +00:00, ... +12:00\n 'Z': function (date, options) {\n var originalDate = options._originalDate || date;\n return formatTimezone(originalDate.getTimezoneOffset(), ':')\n },\n\n // Timezone: -0100, +0000, ... +1200\n 'ZZ': function (date, options) {\n var originalDate = options._originalDate || date;\n return formatTimezone(originalDate.getTimezoneOffset())\n },\n\n // Seconds timestamp: 512969520\n 'X': function (date, options) {\n var originalDate = options._originalDate || date;\n return Math.floor(originalDate.getTime() / 1000)\n },\n\n // Milliseconds timestamp: 512969520900\n 'x': function (date, options) {\n var originalDate = options._originalDate || date;\n return originalDate.getTime()\n },\n\n // AM, PM\n 'A': function (date, options) {\n return options.locale.localize.timeOfDay(date.getUTCHours(), {type: 'uppercase'})\n },\n\n // am, pm\n 'a': function (date, options) {\n return options.locale.localize.timeOfDay(date.getUTCHours(), {type: 'lowercase'})\n },\n\n // a.m., p.m.\n 'aa': function (date, options) {\n return options.locale.localize.timeOfDay(date.getUTCHours(), {type: 'long'})\n }\n};\n\nfunction formatTimezone (offset, delimeter) {\n delimeter = delimeter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2)\n}\n\nfunction addLeadingZeros (number, targetLength) {\n var output = Math.abs(number).toString();\n while (output.length < targetLength) {\n output = '0' + output;\n }\n return output\n}\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction addUTCMinutes (dirtyDate, dirtyAmount, dirtyOptions) {\n var date = toDate(dirtyDate, dirtyOptions);\n var amount = Number(dirtyAmount);\n date.setUTCMinutes(date.getUTCMinutes() + amount);\n return date\n}\n\nvar longFormattingTokensRegExp = /(\\[[^[]*])|(\\\\)?(LTS|LT|LLLL|LLL|LL|L|llll|lll|ll|l)/g;\nvar defaultFormattingTokensRegExp = /(\\[[^[]*])|(\\\\)?(x|ss|s|mm|m|hh|h|do|dddd|ddd|dd|d|aa|a|ZZ|Z|YYYY|YY|X|Wo|WW|W|SSS|SS|S|Qo|Q|Mo|MMMM|MMM|MM|M|HH|H|GGGG|GG|E|Do|DDDo|DDDD|DDD|DD|D|A|.)/g;\n\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format.\n *\n * Accepted tokens:\n * | Unit | Token | Result examples |\n * |-------------------------|-------|----------------------------------|\n * | Month | M | 1, 2, ..., 12 |\n * | | Mo | 1st, 2nd, ..., 12th |\n * | | MM | 01, 02, ..., 12 |\n * | | MMM | Jan, Feb, ..., Dec |\n * | | MMMM | January, February, ..., December |\n * | Quarter | Q | 1, 2, 3, 4 |\n * | | Qo | 1st, 2nd, 3rd, 4th |\n * | Day of month | D | 1, 2, ..., 31 |\n * | | Do | 1st, 2nd, ..., 31st |\n * | | DD | 01, 02, ..., 31 |\n * | Day of year | DDD | 1, 2, ..., 366 |\n * | | DDDo | 1st, 2nd, ..., 366th |\n * | | DDDD | 001, 002, ..., 366 |\n * | Day of week | d | 0, 1, ..., 6 |\n * | | do | 0th, 1st, ..., 6th |\n * | | dd | Su, Mo, ..., Sa |\n * | | ddd | Sun, Mon, ..., Sat |\n * | | dddd | Sunday, Monday, ..., Saturday |\n * | Day of ISO week | E | 1, 2, ..., 7 |\n * | ISO week | W | 1, 2, ..., 53 |\n * | | Wo | 1st, 2nd, ..., 53rd |\n * | | WW | 01, 02, ..., 53 |\n * | Year | YY | 00, 01, ..., 99 |\n * | | YYYY | 1900, 1901, ..., 2099 |\n * | ISO week-numbering year | GG | 00, 01, ..., 99 |\n * | | GGGG | 1900, 1901, ..., 2099 |\n * | AM/PM | A | AM, PM |\n * | | a | am, pm |\n * | | aa | a.m., p.m. |\n * | Hour | H | 0, 1, ... 23 |\n * | | HH | 00, 01, ... 23 |\n * | | h | 1, 2, ..., 12 |\n * | | hh | 01, 02, ..., 12 |\n * | Minute | m | 0, 1, ..., 59 |\n * | | mm | 00, 01, ..., 59 |\n * | Second | s | 0, 1, ..., 59 |\n * | | ss | 00, 01, ..., 59 |\n * | 1/10 of second | S | 0, 1, ..., 9 |\n * | 1/100 of second | SS | 00, 01, ..., 99 |\n * | Millisecond | SSS | 000, 001, ..., 999 |\n * | Timezone | Z | -01:00, +00:00, ... +12:00 |\n * | | ZZ | -0100, +0000, ..., +1200 |\n * | Seconds timestamp | X | 512969520 |\n * | Milliseconds timestamp | x | 512969520900 |\n * | Long format | LT | 05:30 a.m. |\n * | | LTS | 05:30:15 a.m. |\n * | | L | 07/02/1995 |\n * | | l | 7/2/1995 |\n * | | LL | July 2 1995 |\n * | | ll | Jul 2 1995 |\n * | | LLL | July 2 1995 05:30 a.m. |\n * | | lll | Jul 2 1995 05:30 a.m. |\n * | | LLLL | Sunday, July 2 1995 05:30 a.m. |\n * | | llll | Sun, Jul 2 1995 05:30 a.m. |\n *\n * The characters wrapped in square brackets are escaped.\n *\n * The result may vary by locale.\n *\n * @param {Date|String|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(\n * new Date(2014, 1, 11),\n * 'MM/DD/YYYY'\n * )\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * var result = format(\n * new Date(2014, 6, 2),\n * 'Do [de] MMMM YYYY',\n * {locale: eoLocale}\n * )\n * //=> '2-a de julio 2014'\n */\nfunction format (dirtyDate, dirtyFormatStr, dirtyOptions) {\n if (arguments.length < 2) {\n throw new TypeError('2 arguments required, but only ' + arguments.length + ' present')\n }\n\n var formatStr = String(dirtyFormatStr);\n var options = dirtyOptions || {};\n\n var locale = options.locale || locale$1;\n\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property')\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property')\n }\n\n var localeFormatters = locale.formatters || {};\n var formattingTokensRegExp = locale.formattingTokensRegExp || defaultFormattingTokensRegExp;\n var formatLong = locale.formatLong;\n\n var originalDate = toDate(dirtyDate, options);\n\n if (!isValid(originalDate, options)) {\n return 'Invalid Date'\n }\n\n // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n var timezoneOffset = originalDate.getTimezoneOffset();\n var utcDate = addUTCMinutes(originalDate, -timezoneOffset, options);\n\n var formatterOptions = cloneObject(options);\n formatterOptions.locale = locale;\n formatterOptions.formatters = formatters;\n\n // When UTC functions will be implemented, options._originalDate will likely be a part of public API.\n // Right now, please don't use it in locales. If you have to use an original date,\n // please restore it from `date`, adding a timezone offset to it.\n formatterOptions._originalDate = originalDate;\n\n var result = formatStr\n .replace(longFormattingTokensRegExp, function (substring) {\n if (substring[0] === '[') {\n return substring\n }\n\n if (substring[0] === '\\\\') {\n return cleanEscapedString(substring)\n }\n\n return formatLong(substring)\n })\n .replace(formattingTokensRegExp, function (substring) {\n var formatter = localeFormatters[substring] || formatters[substring];\n\n if (formatter) {\n return formatter(utcDate, formatterOptions)\n } else {\n return cleanEscapedString(substring)\n }\n });\n\n return result\n}\n\nfunction cleanEscapedString (input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|]$/g, '')\n }\n return input.replace(/\\\\/g, '')\n}\n\n/**\n * @name subMinutes\n * @category Minute Helpers\n * @summary Subtract the specified number of minutes from the given date.\n *\n * @description\n * Subtract the specified number of minutes from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be subtracted\n * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @returns {Date} the new date with the mintues subtracted\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Subtract 30 minutes from 10 July 2014 12:00:00:\n * var result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 11:30:00\n */\nfunction subMinutes (dirtyDate, dirtyAmount, dirtyOptions) {\n if (arguments.length < 2) {\n throw new TypeError('2 arguments required, but only ' + arguments.length + ' present')\n }\n\n var amount = Number(dirtyAmount);\n return addMinutes(dirtyDate, -amount, dirtyOptions)\n}\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|String|Number} date - the date that should be after the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nfunction isAfter (dirtyDate, dirtyDateToCompare, dirtyOptions) {\n if (arguments.length < 2) {\n throw new TypeError('2 arguments required, but only ' + arguments.length + ' present')\n }\n\n var date = toDate(dirtyDate, dirtyOptions);\n var dateToCompare = toDate(dirtyDateToCompare, dirtyOptions);\n return date.getTime() > dateToCompare.getTime()\n}\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param {Date|String|Number} date - the date that should be before the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nfunction isBefore (dirtyDate, dirtyDateToCompare, dirtyOptions) {\n if (arguments.length < 2) {\n throw new TypeError('2 arguments required, but only ' + arguments.length + ' present')\n }\n\n var date = toDate(dirtyDate, dirtyOptions);\n var dateToCompare = toDate(dirtyDateToCompare, dirtyOptions);\n return date.getTime() < dateToCompare.getTime()\n}\n\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @returns {Boolean} the dates are equal\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0)\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nfunction isEqual$1 (dirtyLeftDate, dirtyRightDate, dirtyOptions) {\n if (arguments.length < 2) {\n throw new TypeError('2 arguments required, but only ' + arguments.length + ' present')\n }\n\n var dateLeft = toDate(dirtyLeftDate, dirtyOptions);\n var dateRight = toDate(dirtyRightDate, dirtyOptions);\n return dateLeft.getTime() === dateRight.getTime()\n}\n\nvar patterns$1 = {\n 'M': /^(1[0-2]|0?\\d)/, // 0 to 12\n 'D': /^(3[0-1]|[0-2]?\\d)/, // 0 to 31\n 'DDD': /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/, // 0 to 366\n 'W': /^(5[0-3]|[0-4]?\\d)/, // 0 to 53\n 'YYYY': /^(\\d{1,4})/, // 0 to 9999\n 'H': /^(2[0-3]|[0-1]?\\d)/, // 0 to 23\n 'm': /^([0-5]?\\d)/, // 0 to 59\n 'Z': /^([+-])(\\d{2}):(\\d{2})/,\n 'ZZ': /^([+-])(\\d{2})(\\d{2})/,\n singleDigit: /^(\\d)/,\n twoDigits: /^(\\d{2})/,\n threeDigits: /^(\\d{3})/,\n fourDigits: /^(\\d{4})/,\n anyDigits: /^(\\d+)/\n};\n\nfunction parseDecimal$1 (matchResult) {\n return parseInt(matchResult[1], 10)\n}\n\nvar parsers = {\n // Year: 00, 01, ..., 99\n 'YY': {\n unit: 'twoDigitYear',\n match: patterns$1.twoDigits,\n parse: function (matchResult) {\n return parseDecimal$1(matchResult)\n }\n },\n\n // Year: 1900, 1901, ..., 2099\n 'YYYY': {\n unit: 'year',\n match: patterns$1.YYYY,\n parse: parseDecimal$1\n },\n\n // ISO week-numbering year: 00, 01, ..., 99\n 'GG': {\n unit: 'isoYear',\n match: patterns$1.twoDigits,\n parse: function (matchResult) {\n return parseDecimal$1(matchResult) + 1900\n }\n },\n\n // ISO week-numbering year: 1900, 1901, ..., 2099\n 'GGGG': {\n unit: 'isoYear',\n match: patterns$1.YYYY,\n parse: parseDecimal$1\n },\n\n // Quarter: 1, 2, 3, 4\n 'Q': {\n unit: 'quarter',\n match: patterns$1.singleDigit,\n parse: parseDecimal$1\n },\n\n // Ordinal quarter\n 'Qo': {\n unit: 'quarter',\n match: function (string, options) {\n return options.locale.match.ordinalNumbers(string, {unit: 'quarter'})\n },\n parse: function (matchResult, options) {\n return options.locale.match.ordinalNumber(matchResult, {unit: 'quarter'})\n }\n },\n\n // Month: 1, 2, ..., 12\n 'M': {\n unit: 'month',\n match: patterns$1.M,\n parse: function (matchResult) {\n return parseDecimal$1(matchResult) - 1\n }\n },\n\n // Ordinal month\n 'Mo': {\n unit: 'month',\n match: function (string, options) {\n return options.locale.match.ordinalNumbers(string, {unit: 'month'})\n },\n parse: function (matchResult, options) {\n return options.locale.match.ordinalNumber(matchResult, {unit: 'month'}) - 1\n }\n },\n\n // Month: 01, 02, ..., 12\n 'MM': {\n unit: 'month',\n match: patterns$1.twoDigits,\n parse: function (matchResult) {\n return parseDecimal$1(matchResult) - 1\n }\n },\n\n // Month: Jan, Feb, ..., Dec\n 'MMM': {\n unit: 'month',\n match: function (string, options) {\n return options.locale.match.months(string, {type: 'short'})\n },\n parse: function (matchResult, options) {\n return options.locale.match.month(matchResult, {type: 'short'})\n }\n },\n\n // Month: January, February, ..., December\n 'MMMM': {\n unit: 'month',\n match: function (string, options) {\n return options.locale.match.months(string, {type: 'long'}) ||\n options.locale.match.months(string, {type: 'short'})\n },\n parse: function (matchResult, options) {\n var parseResult = options.locale.match.month(matchResult, {type: 'long'});\n\n if (parseResult == null) {\n parseResult = options.locale.match.month(matchResult, {type: 'short'});\n }\n\n return parseResult\n }\n },\n\n // ISO week: 1, 2, ..., 53\n 'W': {\n unit: 'isoWeek',\n match: patterns$1.W,\n parse: parseDecimal$1\n },\n\n // Ordinal ISO week\n 'Wo': {\n unit: 'isoWeek',\n match: function (string, options) {\n return options.locale.match.ordinalNumbers(string, {unit: 'isoWeek'})\n },\n parse: function (matchResult, options) {\n return options.locale.match.ordinalNumber(matchResult, {unit: 'isoWeek'})\n }\n },\n\n // ISO week: 01, 02, ..., 53\n 'WW': {\n unit: 'isoWeek',\n match: patterns$1.twoDigits,\n parse: parseDecimal$1\n },\n\n // Day of week: 0, 1, ..., 6\n 'd': {\n unit: 'dayOfWeek',\n match: patterns$1.singleDigit,\n parse: parseDecimal$1\n },\n\n // Ordinal day of week\n 'do': {\n unit: 'dayOfWeek',\n match: function (string, options) {\n return options.locale.match.ordinalNumbers(string, {unit: 'dayOfWeek'})\n },\n parse: function (matchResult, options) {\n return options.locale.match.ordinalNumber(matchResult, {unit: 'dayOfWeek'})\n }\n },\n\n // Day of week: Su, Mo, ..., Sa\n 'dd': {\n unit: 'dayOfWeek',\n match: function (string, options) {\n return options.locale.match.weekdays(string, {type: 'narrow'})\n },\n parse: function (matchResult, options) {\n return options.locale.match.weekday(matchResult, {type: 'narrow'})\n }\n },\n\n // Day of week: Sun, Mon, ..., Sat\n 'ddd': {\n unit: 'dayOfWeek',\n match: function (string, options) {\n return options.locale.match.weekdays(string, {type: 'short'}) ||\n options.locale.match.weekdays(string, {type: 'narrow'})\n },\n parse: function (matchResult, options) {\n var parseResult = options.locale.match.weekday(matchResult, {type: 'short'});\n\n if (parseResult == null) {\n parseResult = options.locale.match.weekday(matchResult, {type: 'narrow'});\n }\n\n return parseResult\n }\n },\n\n // Day of week: Sunday, Monday, ..., Saturday\n 'dddd': {\n unit: 'dayOfWeek',\n match: function (string, options) {\n return options.locale.match.weekdays(string, {type: 'long'}) ||\n options.locale.match.weekdays(string, {type: 'short'}) ||\n options.locale.match.weekdays(string, {type: 'narrow'})\n },\n parse: function (matchResult, options) {\n var parseResult = options.locale.match.weekday(matchResult, {type: 'long'});\n\n if (parseResult == null) {\n parseResult = options.locale.match.weekday(matchResult, {type: 'short'});\n\n if (parseResult == null) {\n parseResult = options.locale.match.weekday(matchResult, {type: 'narrow'});\n }\n }\n\n return parseResult\n }\n },\n\n // Day of ISO week: 1, 2, ..., 7\n 'E': {\n unit: 'dayOfISOWeek',\n match: patterns$1.singleDigit,\n parse: function (matchResult) {\n return parseDecimal$1(matchResult)\n }\n },\n\n // Day of month: 1, 2, ..., 31\n 'D': {\n unit: 'dayOfMonth',\n match: patterns$1.D,\n parse: parseDecimal$1\n },\n\n // Ordinal day of month\n 'Do': {\n unit: 'dayOfMonth',\n match: function (string, options) {\n return options.locale.match.ordinalNumbers(string, {unit: 'dayOfMonth'})\n },\n parse: function (matchResult, options) {\n return options.locale.match.ordinalNumber(matchResult, {unit: 'dayOfMonth'})\n }\n },\n\n // Day of month: 01, 02, ..., 31\n 'DD': {\n unit: 'dayOfMonth',\n match: patterns$1.twoDigits,\n parse: parseDecimal$1\n },\n\n // Day of year: 1, 2, ..., 366\n 'DDD': {\n unit: 'dayOfYear',\n match: patterns$1.DDD,\n parse: parseDecimal$1\n },\n\n // Ordinal day of year\n 'DDDo': {\n unit: 'dayOfYear',\n match: function (string, options) {\n return options.locale.match.ordinalNumbers(string, {unit: 'dayOfYear'})\n },\n parse: function (matchResult, options) {\n return options.locale.match.ordinalNumber(matchResult, {unit: 'dayOfYear'})\n }\n },\n\n // Day of year: 001, 002, ..., 366\n 'DDDD': {\n unit: 'dayOfYear',\n match: patterns$1.threeDigits,\n parse: parseDecimal$1\n },\n\n // AM, PM\n 'A': {\n unit: 'timeOfDay',\n match: function (string, options) {\n return options.locale.match.timesOfDay(string, {type: 'short'})\n },\n parse: function (matchResult, options) {\n return options.locale.match.timeOfDay(matchResult, {type: 'short'})\n }\n },\n\n // a.m., p.m.\n 'aa': {\n unit: 'timeOfDay',\n match: function (string, options) {\n return options.locale.match.timesOfDay(string, {type: 'long'}) ||\n options.locale.match.timesOfDay(string, {type: 'short'})\n },\n parse: function (matchResult, options) {\n var parseResult = options.locale.match.timeOfDay(matchResult, {type: 'long'});\n\n if (parseResult == null) {\n parseResult = options.locale.match.timeOfDay(matchResult, {type: 'short'});\n }\n\n return parseResult\n }\n },\n\n // Hour: 0, 1, ... 23\n 'H': {\n unit: 'hours',\n match: patterns$1.H,\n parse: parseDecimal$1\n },\n\n // Hour: 00, 01, ..., 23\n 'HH': {\n unit: 'hours',\n match: patterns$1.twoDigits,\n parse: parseDecimal$1\n },\n\n // Hour: 1, 2, ..., 12\n 'h': {\n unit: 'timeOfDayHours',\n match: patterns$1.M,\n parse: parseDecimal$1\n },\n\n // Hour: 01, 02, ..., 12\n 'hh': {\n unit: 'timeOfDayHours',\n match: patterns$1.twoDigits,\n parse: parseDecimal$1\n },\n\n // Minute: 0, 1, ..., 59\n 'm': {\n unit: 'minutes',\n match: patterns$1.m,\n parse: parseDecimal$1\n },\n\n // Minute: 00, 01, ..., 59\n 'mm': {\n unit: 'minutes',\n match: patterns$1.twoDigits,\n parse: parseDecimal$1\n },\n\n // Second: 0, 1, ..., 59\n 's': {\n unit: 'seconds',\n match: patterns$1.m,\n parse: parseDecimal$1\n },\n\n // Second: 00, 01, ..., 59\n 'ss': {\n unit: 'seconds',\n match: patterns$1.twoDigits,\n parse: parseDecimal$1\n },\n\n // 1/10 of second: 0, 1, ..., 9\n 'S': {\n unit: 'milliseconds',\n match: patterns$1.singleDigit,\n parse: function (matchResult) {\n return parseDecimal$1(matchResult) * 100\n }\n },\n\n // 1/100 of second: 00, 01, ..., 99\n 'SS': {\n unit: 'milliseconds',\n match: patterns$1.twoDigits,\n parse: function (matchResult) {\n return parseDecimal$1(matchResult) * 10\n }\n },\n\n // Millisecond: 000, 001, ..., 999\n 'SSS': {\n unit: 'milliseconds',\n match: patterns$1.threeDigits,\n parse: parseDecimal$1\n },\n\n // Timezone: -01:00, +00:00, ... +12:00\n 'Z': {\n unit: 'timezone',\n match: patterns$1.Z,\n parse: function (matchResult) {\n var sign = matchResult[1];\n var hours = parseInt(matchResult[2], 10);\n var minutes = parseInt(matchResult[3], 10);\n var absoluteOffset = hours * 60 + minutes;\n return (sign === '+') ? absoluteOffset : -absoluteOffset\n }\n },\n\n // Timezone: -0100, +0000, ... +1200\n 'ZZ': {\n unit: 'timezone',\n match: patterns$1.ZZ,\n parse: function (matchResult) {\n var sign = matchResult[1];\n var hours = parseInt(matchResult[2], 10);\n var minutes = parseInt(matchResult[3], 10);\n var absoluteOffset = hours * 60 + minutes;\n return (sign === '+') ? absoluteOffset : -absoluteOffset\n }\n },\n\n // Seconds timestamp: 512969520\n 'X': {\n unit: 'timestamp',\n match: patterns$1.anyDigits,\n parse: function (matchResult) {\n return parseDecimal$1(matchResult) * 1000\n }\n },\n\n // Milliseconds timestamp: 512969520900\n 'x': {\n unit: 'timestamp',\n match: patterns$1.anyDigits,\n parse: parseDecimal$1\n }\n};\n\nparsers['a'] = parsers['A'];\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction setUTCDay (dirtyDate, dirtyDay, dirtyOptions) {\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn === undefined ? 0 : Number(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn === undefined ? defaultWeekStartsOn : Number(options.weekStartsOn);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively')\n }\n\n var date = toDate(dirtyDate, dirtyOptions);\n var day = Number(dirtyDay);\n\n var currentDay = date.getUTCDay();\n\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n\n date.setUTCDate(date.getUTCDate() + diff);\n return date\n}\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction setUTCISODay (dirtyDate, dirtyDay, dirtyOptions) {\n var day = Number(dirtyDay);\n\n if (day % 7 === 0) {\n day = day - 7;\n }\n\n var weekStartsOn = 1;\n var date = toDate(dirtyDate, dirtyOptions);\n var currentDay = date.getUTCDay();\n\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n\n date.setUTCDate(date.getUTCDate() + diff);\n return date\n}\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction setUTCISOWeek (dirtyDate, dirtyISOWeek, dirtyOptions) {\n var date = toDate(dirtyDate, dirtyOptions);\n var isoWeek = Number(dirtyISOWeek);\n var diff = getUTCISOWeek(date, dirtyOptions) - isoWeek;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date\n}\n\nvar MILLISECONDS_IN_DAY$3 = 86400000;\n\n// This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\nfunction setUTCISOWeekYear (dirtyDate, dirtyISOYear, dirtyOptions) {\n var date = toDate(dirtyDate, dirtyOptions);\n var isoYear = Number(dirtyISOYear);\n var dateStartOfYear = startOfUTCISOWeekYear(date, dirtyOptions);\n var diff = Math.floor((date.getTime() - dateStartOfYear.getTime()) / MILLISECONDS_IN_DAY$3);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(isoYear, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n date = startOfUTCISOWeekYear(fourthOfJanuary, dirtyOptions);\n date.setUTCDate(date.getUTCDate() + diff);\n return date\n}\n\nvar MILLISECONDS_IN_MINUTE$7 = 60000;\n\nfunction setTimeOfDay (hours, timeOfDay) {\n var isAM = timeOfDay === 0;\n\n if (isAM) {\n if (hours === 12) {\n return 0\n }\n } else {\n if (hours !== 12) {\n return 12 + hours\n }\n }\n\n return hours\n}\n\nvar units = {\n twoDigitYear: {\n priority: 10,\n set: function (dateValues, value) {\n var century = Math.floor(dateValues.date.getUTCFullYear() / 100);\n var year = century * 100 + value;\n dateValues.date.setUTCFullYear(year, 0, 1);\n dateValues.date.setUTCHours(0, 0, 0, 0);\n return dateValues\n }\n },\n\n year: {\n priority: 10,\n set: function (dateValues, value) {\n dateValues.date.setUTCFullYear(value, 0, 1);\n dateValues.date.setUTCHours(0, 0, 0, 0);\n return dateValues\n }\n },\n\n isoYear: {\n priority: 10,\n set: function (dateValues, value, options) {\n dateValues.date = startOfUTCISOWeekYear(setUTCISOWeekYear(dateValues.date, value, options), options);\n return dateValues\n }\n },\n\n quarter: {\n priority: 20,\n set: function (dateValues, value) {\n dateValues.date.setUTCMonth((value - 1) * 3, 1);\n dateValues.date.setUTCHours(0, 0, 0, 0);\n return dateValues\n }\n },\n\n month: {\n priority: 30,\n set: function (dateValues, value) {\n dateValues.date.setUTCMonth(value, 1);\n dateValues.date.setUTCHours(0, 0, 0, 0);\n return dateValues\n }\n },\n\n isoWeek: {\n priority: 40,\n set: function (dateValues, value, options) {\n dateValues.date = startOfUTCISOWeek(setUTCISOWeek(dateValues.date, value, options), options);\n return dateValues\n }\n },\n\n dayOfWeek: {\n priority: 50,\n set: function (dateValues, value, options) {\n dateValues.date = setUTCDay(dateValues.date, value, options);\n dateValues.date.setUTCHours(0, 0, 0, 0);\n return dateValues\n }\n },\n\n dayOfISOWeek: {\n priority: 50,\n set: function (dateValues, value, options) {\n dateValues.date = setUTCISODay(dateValues.date, value, options);\n dateValues.date.setUTCHours(0, 0, 0, 0);\n return dateValues\n }\n },\n\n dayOfMonth: {\n priority: 50,\n set: function (dateValues, value) {\n dateValues.date.setUTCDate(value);\n dateValues.date.setUTCHours(0, 0, 0, 0);\n return dateValues\n }\n },\n\n dayOfYear: {\n priority: 50,\n set: function (dateValues, value) {\n dateValues.date.setUTCMonth(0, value);\n dateValues.date.setUTCHours(0, 0, 0, 0);\n return dateValues\n }\n },\n\n timeOfDay: {\n priority: 60,\n set: function (dateValues, value, options) {\n dateValues.timeOfDay = value;\n return dateValues\n }\n },\n\n hours: {\n priority: 70,\n set: function (dateValues, value, options) {\n dateValues.date.setUTCHours(value, 0, 0, 0);\n return dateValues\n }\n },\n\n timeOfDayHours: {\n priority: 70,\n set: function (dateValues, value, options) {\n var timeOfDay = dateValues.timeOfDay;\n if (timeOfDay != null) {\n value = setTimeOfDay(value, timeOfDay);\n }\n dateValues.date.setUTCHours(value, 0, 0, 0);\n return dateValues\n }\n },\n\n minutes: {\n priority: 80,\n set: function (dateValues, value) {\n dateValues.date.setUTCMinutes(value, 0, 0);\n return dateValues\n }\n },\n\n seconds: {\n priority: 90,\n set: function (dateValues, value) {\n dateValues.date.setUTCSeconds(value, 0);\n return dateValues\n }\n },\n\n milliseconds: {\n priority: 100,\n set: function (dateValues, value) {\n dateValues.date.setUTCMilliseconds(value);\n return dateValues\n }\n },\n\n timezone: {\n priority: 110,\n set: function (dateValues, value) {\n dateValues.date = new Date(dateValues.date.getTime() - value * MILLISECONDS_IN_MINUTE$7);\n return dateValues\n }\n },\n\n timestamp: {\n priority: 120,\n set: function (dateValues, value) {\n dateValues.date = new Date(value);\n return dateValues\n }\n }\n};\n\nvar TIMEZONE_UNIT_PRIORITY = 110;\nvar MILLISECONDS_IN_MINUTE$6 = 60000;\n\nvar longFormattingTokensRegExp$1 = /(\\[[^[]*])|(\\\\)?(LTS|LT|LLLL|LLL|LL|L|llll|lll|ll|l)/g;\nvar defaultParsingTokensRegExp = /(\\[[^[]*])|(\\\\)?(x|ss|s|mm|m|hh|h|do|dddd|ddd|dd|d|aa|a|ZZ|Z|YYYY|YY|X|Wo|WW|W|SSS|SS|S|Qo|Q|Mo|MMMM|MMM|MM|M|HH|H|GGGG|GG|E|Do|DDDo|DDDD|DDD|DD|D|A|.)/g;\n\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format.\n *\n * Accepted format tokens:\n * | Unit | Priority | Token | Input examples |\n * |-------------------------|----------|-------|----------------------------------|\n * | Year | 10 | YY | 00, 01, ..., 99 |\n * | | | YYYY | 1900, 1901, ..., 2099 |\n * | ISO week-numbering year | 10 | GG | 00, 01, ..., 99 |\n * | | | GGGG | 1900, 1901, ..., 2099 |\n * | Quarter | 20 | Q | 1, 2, 3, 4 |\n * | | | Qo | 1st, 2nd, 3rd, 4th |\n * | Month | 30 | M | 1, 2, ..., 12 |\n * | | | Mo | 1st, 2nd, ..., 12th |\n * | | | MM | 01, 02, ..., 12 |\n * | | | MMM | Jan, Feb, ..., Dec |\n * | | | MMMM | January, February, ..., December |\n * | ISO week | 40 | W | 1, 2, ..., 53 |\n * | | | Wo | 1st, 2nd, ..., 53rd |\n * | | | WW | 01, 02, ..., 53 |\n * | Day of week | 50 | d | 0, 1, ..., 6 |\n * | | | do | 0th, 1st, ..., 6th |\n * | | | dd | Su, Mo, ..., Sa |\n * | | | ddd | Sun, Mon, ..., Sat |\n * | | | dddd | Sunday, Monday, ..., Saturday |\n * | Day of ISO week | 50 | E | 1, 2, ..., 7 |\n * | Day of month | 50 | D | 1, 2, ..., 31 |\n * | | | Do | 1st, 2nd, ..., 31st |\n * | | | DD | 01, 02, ..., 31 |\n * | Day of year | 50 | DDD | 1, 2, ..., 366 |\n * | | | DDDo | 1st, 2nd, ..., 366th |\n * | | | DDDD | 001, 002, ..., 366 |\n * | Time of day | 60 | A | AM, PM |\n * | | | a | am, pm |\n * | | | aa | a.m., p.m. |\n * | Hour | 70 | H | 0, 1, ... 23 |\n * | | | HH | 00, 01, ... 23 |\n * | Time of day hour | 70 | h | 1, 2, ..., 12 |\n * | | | hh | 01, 02, ..., 12 |\n * | Minute | 80 | m | 0, 1, ..., 59 |\n * | | | mm | 00, 01, ..., 59 |\n * | Second | 90 | s | 0, 1, ..., 59 |\n * | | | ss | 00, 01, ..., 59 |\n * | 1/10 of second | 100 | S | 0, 1, ..., 9 |\n * | 1/100 of second | 100 | SS | 00, 01, ..., 99 |\n * | Millisecond | 100 | SSS | 000, 001, ..., 999 |\n * | Timezone | 110 | Z | -01:00, +00:00, ... +12:00 |\n * | | | ZZ | -0100, +0000, ..., +1200 |\n * | Seconds timestamp | 120 | X | 512969520 |\n * | Milliseconds timestamp | 120 | x | 512969520900 |\n *\n * Values will be assigned to the date in the ascending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `baseDate` which works as a context of parsing.\n *\n * `baseDate` must be passed for correct work of the function.\n * If you're not sure which `baseDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/DD/YYYY', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `baseDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * Also, `parse` unfolds long formats like those in [format]{@link https://date-fns.org/docs/format}:\n * | Token | Input examples |\n * |-------|--------------------------------|\n * | LT | 05:30 a.m. |\n * | LTS | 05:30:15 a.m. |\n * | L | 07/02/1995 |\n * | l | 7/2/1995 |\n * | LL | July 2 1995 |\n * | ll | Jul 2 1995 |\n * | LLL | July 2 1995 05:30 a.m. |\n * | lll | Jul 2 1995 05:30 a.m. |\n * | LLLL | Sunday, July 2 1995 05:30 a.m. |\n * | llll | Sun, Jul 2 1995 05:30 a.m. |\n *\n * The characters wrapped in square brackets in the format string are escaped.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `baseDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {String} dateString - the string to parse\n * @param {String} formatString - the string of tokens\n * @param {Date|String|Number} baseDate - the date to took the missing higher priority values from\n * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}\n * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the parsed date\n * @throws {TypeError} 3 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.locale` must contain `match` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse(\n * '02/11/2014',\n * 'MM/DD/YYYY',\n * new Date()\n * )\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in English locale in the context of 2010 year:\n * import eoLocale from 'date-fns/locale/eo'\n * var result = parse(\n * '28-a de februaro',\n * 'Do [de] MMMM',\n * new Date(2010, 0, 1)\n * {locale: eoLocale}\n * )\n * //=> Sun Feb 28 2010 00:00:00\n */\nfunction parse (dirtyDateString, dirtyFormatString, dirtyBaseDate, dirtyOptions) {\n if (arguments.length < 3) {\n throw new TypeError('3 arguments required, but only ' + arguments.length + ' present')\n }\n\n var dateString = String(dirtyDateString);\n var options = dirtyOptions || {};\n\n var weekStartsOn = options.weekStartsOn === undefined ? 0 : Number(options.weekStartsOn);\n\n // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively')\n }\n\n var locale = options.locale || locale$1;\n var localeParsers = locale.parsers || {};\n var localeUnits = locale.units || {};\n\n if (!locale.match) {\n throw new RangeError('locale must contain match property')\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property')\n }\n\n var formatString = String(dirtyFormatString)\n .replace(longFormattingTokensRegExp$1, function (substring) {\n if (substring[0] === '[') {\n return substring\n }\n\n if (substring[0] === '\\\\') {\n return cleanEscapedString$1(substring)\n }\n\n return locale.formatLong(substring)\n });\n\n if (formatString === '') {\n if (dateString === '') {\n return toDate(dirtyBaseDate, options)\n } else {\n return new Date(NaN)\n }\n }\n\n var subFnOptions = cloneObject(options);\n subFnOptions.locale = locale;\n\n var tokens = formatString.match(locale.parsingTokensRegExp || defaultParsingTokensRegExp);\n var tokensLength = tokens.length;\n\n // If timezone isn't specified, it will be set to the system timezone\n var setters = [{\n priority: TIMEZONE_UNIT_PRIORITY,\n set: dateToSystemTimezone,\n index: 0\n }];\n\n var i;\n for (i = 0; i < tokensLength; i++) {\n var token = tokens[i];\n var parser = localeParsers[token] || parsers[token];\n if (parser) {\n var matchResult;\n\n if (parser.match instanceof RegExp) {\n matchResult = parser.match.exec(dateString);\n } else {\n matchResult = parser.match(dateString, subFnOptions);\n }\n\n if (!matchResult) {\n return new Date(NaN)\n }\n\n var unitName = parser.unit;\n var unit = localeUnits[unitName] || units[unitName];\n\n setters.push({\n priority: unit.priority,\n set: unit.set,\n value: parser.parse(matchResult, subFnOptions),\n index: setters.length\n });\n\n var substring = matchResult[0];\n dateString = dateString.slice(substring.length);\n } else {\n var head = tokens[i].match(/^\\[.*]$/) ? tokens[i].replace(/^\\[|]$/g, '') : tokens[i];\n if (dateString.indexOf(head) === 0) {\n dateString = dateString.slice(head.length);\n } else {\n return new Date(NaN)\n }\n }\n }\n\n var uniquePrioritySetters = setters\n .map(function (setter) {\n return setter.priority\n })\n .sort(function (a, b) {\n return a - b\n })\n .filter(function (priority, index, array) {\n return array.indexOf(priority) === index\n })\n .map(function (priority) {\n return setters\n .filter(function (setter) {\n return setter.priority === priority\n })\n .reverse()\n })\n .map(function (setterArray) {\n return setterArray[0]\n });\n\n var date = toDate(dirtyBaseDate, options);\n\n if (isNaN(date)) {\n return new Date(NaN)\n }\n\n // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/37\n var utcDate = subMinutes(date, date.getTimezoneOffset());\n\n var dateValues = {date: utcDate};\n\n var settersLength = uniquePrioritySetters.length;\n for (i = 0; i < settersLength; i++) {\n var setter = uniquePrioritySetters[i];\n dateValues = setter.set(dateValues, setter.value, subFnOptions);\n }\n\n return dateValues.date\n}\n\nfunction dateToSystemTimezone (dateValues) {\n var date = dateValues.date;\n var time = date.getTime();\n\n // Get the system timezone offset at (moment of time - offset)\n var offset = date.getTimezoneOffset();\n\n // Get the system timezone offset at the exact moment of time\n offset = new Date(time + offset * MILLISECONDS_IN_MINUTE$6).getTimezoneOffset();\n\n // Convert date in timezone \"UTC+00:00\" to the system timezone\n dateValues.date = new Date(time + offset * MILLISECONDS_IN_MINUTE$6);\n\n return dateValues\n}\n\nfunction cleanEscapedString$1 (input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|]$/g, '')\n }\n return input.replace(/\\\\/g, '')\n}\n\n// This file is generated automatically by `scripts/build/indices.js`. Please, don't change it.\n\n// \n\n/**\n * Custom parse behavior on top of date-fns parse function.\n */\nfunction parseDate$1 (date, format$$1) {\n if (typeof date !== 'string') {\n return isValid(date) ? date : null;\n }\n\n var parsed = parse(date, format$$1, new Date());\n\n // if date is not valid or the formatted output after parsing does not match\n // the string value passed in (avoids overflows)\n if (!isValid(parsed) || format(parsed, format$$1) !== date) {\n return null;\n }\n\n return parsed;\n}\n\nvar after = function (value, ref) {\n var otherValue = ref[0];\n var inclusion = ref[1];\n var format = ref[2];\n\n if (typeof format === 'undefined') {\n format = inclusion;\n inclusion = false;\n }\n value = parseDate$1(value, format);\n otherValue = parseDate$1(otherValue, format);\n\n // if either is not valid.\n if (!value || !otherValue) {\n return false;\n }\n\n return isAfter(value, otherValue) || (inclusion && isEqual$1(value, otherValue));\n};\n\n/**\n * Some Alpha Regex helpers.\n * https://github.com/chriso/validator.js/blob/master/src/lib/alpha.js\n */\n\nvar alpha$1 = {\n en: /^[A-Z]*$/i,\n cs: /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,\n da: /^[A-ZÆØÅ]*$/i,\n de: /^[A-ZÄÖÜß]*$/i,\n es: /^[A-ZÁÉÍÑÓÚÜ]*$/i,\n fr: /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,\n lt: /^[A-ZĄČĘĖĮŠŲŪŽ]*$/i,\n nl: /^[A-ZÉËÏÓÖÜ]*$/i,\n hu: /^[A-ZÁÉÍÓÖŐÚÜŰ]*$/i,\n pl: /^[A-ZĄĆĘŚŁŃÓŻŹ]*$/i,\n pt: /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,\n ru: /^[А-ЯЁ]*$/i,\n sk: /^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,\n sr: /^[A-ZČĆŽŠĐ]*$/i,\n tr: /^[A-ZÇĞİıÖŞÜ]*$/i,\n uk: /^[А-ЩЬЮЯЄІЇҐ]*$/i,\n ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/\n};\n\nvar alphaSpaces = {\n en: /^[A-Z\\s]*$/i,\n cs: /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ\\s]*$/i,\n da: /^[A-ZÆØÅ\\s]*$/i,\n de: /^[A-ZÄÖÜß\\s]*$/i,\n es: /^[A-ZÁÉÍÑÓÚÜ\\s]*$/i,\n fr: /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\\s]*$/i,\n lt: /^[A-ZĄČĘĖĮŠŲŪŽ\\s]*$/i,\n nl: /^[A-ZÉËÏÓÖÜ\\s]*$/i,\n hu: /^[A-ZÁÉÍÓÖŐÚÜŰ\\s]*$/i,\n pl: /^[A-ZĄĆĘŚŁŃÓŻŹ\\s]*$/i,\n pt: /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ\\s]*$/i,\n ru: /^[А-ЯЁ\\s]*$/i,\n sk: /^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ\\s]*$/i,\n sr: /^[A-ZČĆŽŠĐ\\s]*$/i,\n tr: /^[A-ZÇĞİıÖŞÜ\\s]*$/i,\n uk: /^[А-ЩЬЮЯЄІЇҐ\\s]*$/i,\n ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\\s]*$/\n};\n\nvar alphanumeric = {\n en: /^[0-9A-Z]*$/i,\n cs: /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,\n da: /^[0-9A-ZÆØÅ]$/i,\n de: /^[0-9A-ZÄÖÜß]*$/i,\n es: /^[0-9A-ZÁÉÍÑÓÚÜ]*$/i,\n fr: /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,\n lt: /^[0-9A-ZĄČĘĖĮŠŲŪŽ]*$/i,\n hu: /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]*$/i,\n nl: /^[0-9A-ZÉËÏÓÖÜ]*$/i,\n pl: /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]*$/i,\n pt: /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,\n ru: /^[0-9А-ЯЁ]*$/i,\n sk: /^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,\n sr: /^[0-9A-ZČĆŽŠĐ]*$/i,\n tr: /^[0-9A-ZÇĞİıÖŞÜ]*$/i,\n uk: /^[0-9А-ЩЬЮЯЄІЇҐ]*$/i,\n ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/\n};\n\nvar alphaDash = {\n en: /^[0-9A-Z_-]*$/i,\n cs: /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ_-]*$/i,\n da: /^[0-9A-ZÆØÅ_-]*$/i,\n de: /^[0-9A-ZÄÖÜß_-]*$/i,\n es: /^[0-9A-ZÁÉÍÑÓÚÜ_-]*$/i,\n fr: /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,\n lt: /^[0-9A-ZĄČĘĖĮŠŲŪŽ_-]*$/i,\n nl: /^[0-9A-ZÉËÏÓÖÜ_-]*$/i,\n hu: /^[0-9A-ZÁÉÍÓÖŐÚÜŰ_-]*$/i,\n pl: /^[0-9A-ZĄĆĘŚŁŃÓŻŹ_-]*$/i,\n pt: /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ_-]*$/i,\n ru: /^[0-9А-ЯЁ_-]*$/i,\n sk: /^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ_-]*$/i,\n sr: /^[0-9A-ZČĆŽŠĐ_-]*$/i,\n tr: /^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,\n uk: /^[0-9А-ЩЬЮЯЄІЇҐ_-]*$/i,\n ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/\n};\n\nvar validate = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var locale = ref[0]; if ( locale === void 0 ) locale = null;\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate(val, [locale]); });\n }\n\n // Match at least one locale.\n if (! locale) {\n return Object.keys(alpha$1).some(function (loc) { return alpha$1[loc].test(value); });\n }\n\n return (alpha$1[locale] || alpha$1.en).test(value);\n};\n\nvar validate$1 = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var locale = ref[0]; if ( locale === void 0 ) locale = null;\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$1(val, [locale]); });\n }\n\n // Match at least one locale.\n if (! locale) {\n return Object.keys(alphaDash).some(function (loc) { return alphaDash[loc].test(value); });\n }\n\n return (alphaDash[locale] || alphaDash.en).test(value);\n};\n\nvar validate$2 = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var locale = ref[0]; if ( locale === void 0 ) locale = null;\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$2(val, [locale]); });\n }\n\n // Match at least one locale.\n if (! locale) {\n return Object.keys(alphanumeric).some(function (loc) { return alphanumeric[loc].test(value); });\n }\n\n return (alphanumeric[locale] || alphanumeric.en).test(value);\n};\n\nvar validate$3 = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var locale = ref[0]; if ( locale === void 0 ) locale = null;\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$3(val, [locale]); });\n }\n\n // Match at least one locale.\n if (! locale) {\n return Object.keys(alphaSpaces).some(function (loc) { return alphaSpaces[loc].test(value); });\n }\n\n return (alphaSpaces[locale] || alphaSpaces.en).test(value);\n};\n\nvar before = function (value, ref) {\n var otherValue = ref[0];\n var inclusion = ref[1];\n var format = ref[2];\n\n if (typeof format === 'undefined') {\n format = inclusion;\n inclusion = false;\n }\n value = parseDate$1(value, format);\n otherValue = parseDate$1(otherValue, format);\n\n // if either is not valid.\n if (!value || !otherValue) {\n return false;\n }\n\n return isBefore(value, otherValue) || (inclusion && isEqual$1(value, otherValue));\n};\n\nvar validate$4 = function (value, ref) {\n var min = ref[0];\n var max = ref[1];\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$4(val, [min, max]); });\n }\n\n return Number(min) <= value && Number(max) >= value;\n};\n\nvar confirmed = function (value, other) { return String(value) === String(other); };\n\nfunction unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar assertString_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = assertString;\nfunction assertString(input) {\n var isString = typeof input === 'string' || input instanceof String;\n\n if (!isString) {\n throw new TypeError('This library (validator.js) validates strings only');\n }\n}\nmodule.exports = exports['default'];\n});\n\nunwrapExports(assertString_1);\n\nvar isCreditCard_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isCreditCard;\n\n\n\nvar _assertString2 = _interopRequireDefault(assertString_1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable max-len */\nvar creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|62[0-9]{14})$/;\n/* eslint-enable max-len */\n\nfunction isCreditCard(str) {\n (0, _assertString2.default)(str);\n var sanitized = str.replace(/[- ]+/g, '');\n if (!creditCard.test(sanitized)) {\n return false;\n }\n var sum = 0;\n var digit = void 0;\n var tmpNum = void 0;\n var shouldDouble = void 0;\n for (var i = sanitized.length - 1; i >= 0; i--) {\n digit = sanitized.substring(i, i + 1);\n tmpNum = parseInt(digit, 10);\n if (shouldDouble) {\n tmpNum *= 2;\n if (tmpNum >= 10) {\n sum += tmpNum % 10 + 1;\n } else {\n sum += tmpNum;\n }\n } else {\n sum += tmpNum;\n }\n shouldDouble = !shouldDouble;\n }\n return !!(sum % 10 === 0 ? sanitized : false);\n}\nmodule.exports = exports['default'];\n});\n\nvar isCreditCard = unwrapExports(isCreditCard_1);\n\nvar credit_card = function (value) { return isCreditCard(String(value)); };\n\nvar validate$5 = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var decimals = ref[0]; if ( decimals === void 0 ) decimals = '*';\n var separator = ref[1]; if ( separator === void 0 ) separator = '.';\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$5(val, [decimals, separator]); });\n }\n\n if (value === null || value === undefined || value === '') {\n return true;\n }\n\n // if is 0.\n if (Number(decimals) === 0) {\n return /^-?\\d*$/.test(value);\n }\n\n var regexPart = decimals === '*' ? '+' : (\"{1,\" + decimals + \"}\");\n var regex = new RegExp((\"^-?\\\\d*(\\\\\" + separator + \"\\\\d\" + regexPart + \")?$\"));\n\n if (! regex.test(value)) {\n return false;\n }\n\n var parsedValue = parseFloat(value);\n\n // eslint-disable-next-line\n return parsedValue === parsedValue;\n};\n\nvar date_between = function (value, params) {\n var min;\n var max;\n var format;\n var inclusivity = '()';\n\n if (params.length > 3) {\n var assign;\n (assign = params, min = assign[0], max = assign[1], inclusivity = assign[2], format = assign[3]);\n } else {\n var assign$1;\n (assign$1 = params, min = assign$1[0], max = assign$1[1], format = assign$1[2]);\n }\n\n var minDate = parseDate$1(String(min), format);\n var maxDate = parseDate$1(String(max), format);\n var dateVal = parseDate$1(String(value), format);\n\n if (!minDate || !maxDate || !dateVal) {\n return false;\n }\n\n if (inclusivity === '()') {\n return isAfter(dateVal, minDate) && isBefore(dateVal, maxDate);\n }\n\n if (inclusivity === '(]') {\n return isAfter(dateVal, minDate) && (isEqual$1(dateVal, maxDate) || isBefore(dateVal, maxDate));\n }\n\n if (inclusivity === '[)') {\n return isBefore(dateVal, maxDate) && (isEqual$1(dateVal, minDate) || isAfter(dateVal, minDate));\n }\n\n return isEqual$1(dateVal, maxDate) || isEqual$1(dateVal, minDate) ||\n (isBefore(dateVal, maxDate) && isAfter(dateVal, minDate));\n};\n\nvar date_format = function (value, ref) {\n var format = ref[0];\n\n return !!parseDate$1(value, format);\n};\n\nvar validate$6 = function (value, ref) {\n var length = ref[0];\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$6(val, [length]); });\n }\n var strVal = String(value);\n\n return /^[0-9]*$/.test(strVal) && strVal.length === Number(length);\n};\n\nvar validateImage = function (file, width, height) {\n var URL = window.URL || window.webkitURL;\n return new Promise(function (resolve) {\n var image = new Image();\n image.onerror = function () { return resolve({ valid: false }); };\n image.onload = function () { return resolve({\n valid: image.width === Number(width) && image.height === Number(height)\n }); };\n\n image.src = URL.createObjectURL(file);\n });\n};\n\nvar dimensions = function (files, ref) {\n var width = ref[0];\n var height = ref[1];\n\n var list = [];\n for (var i = 0; i < files.length; i++) {\n // if file is not an image, reject.\n if (! /\\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(files[i].name)) {\n return false;\n }\n\n list.push(files[i]);\n }\n\n return Promise.all(list.map(function (file) { return validateImage(file, width, height); }));\n};\n\nvar merge_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = merge;\nfunction merge() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaults = arguments[1];\n\n for (var key in defaults) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = defaults[key];\n }\n }\n return obj;\n}\nmodule.exports = exports['default'];\n});\n\nunwrapExports(merge_1);\n\nvar isByteLength_1 = createCommonjsModule(function (module, exports) {\n'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 = isByteLength;\n\n\n\nvar _assertString2 = _interopRequireDefault(assertString_1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable prefer-rest-params */\nfunction isByteLength(str, options) {\n (0, _assertString2.default)(str);\n var min = void 0;\n var max = void 0;\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n min = options.min || 0;\n max = options.max;\n } else {\n // backwards compatibility: isByteLength(str, min [, max])\n min = arguments[1];\n max = arguments[2];\n }\n var len = encodeURI(str).split(/%..|./).length - 1;\n return len >= min && (typeof max === 'undefined' || len <= max);\n}\nmodule.exports = exports['default'];\n});\n\nunwrapExports(isByteLength_1);\n\nvar isFQDN = createCommonjsModule(function (module, exports) {\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isFDQN;\n\n\n\nvar _assertString2 = _interopRequireDefault(assertString_1);\n\n\n\nvar _merge2 = _interopRequireDefault(merge_1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar default_fqdn_options = {\n require_tld: true,\n allow_underscores: false,\n allow_trailing_dot: false\n};\n\nfunction isFDQN(str, options) {\n (0, _assertString2.default)(str);\n options = (0, _merge2.default)(options, default_fqdn_options);\n\n /* Remove the optional trailing dot before checking validity */\n if (options.allow_trailing_dot && str[str.length - 1] === '.') {\n str = str.substring(0, str.length - 1);\n }\n var parts = str.split('.');\n if (options.require_tld) {\n var tld = parts.pop();\n if (!parts.length || !/^([a-z\\u00a1-\\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {\n return false;\n }\n // disallow spaces\n if (/[\\s\\u2002-\\u200B\\u202F\\u205F\\u3000\\uFEFF\\uDB40\\uDC20]/.test(tld)) {\n return false;\n }\n }\n for (var part, i = 0; i < parts.length; i++) {\n part = parts[i];\n if (options.allow_underscores) {\n part = part.replace(/_/g, '');\n }\n if (!/^[a-z\\u00a1-\\uffff0-9-]+$/i.test(part)) {\n return false;\n }\n // disallow full-width chars\n if (/[\\uff01-\\uff5e]/.test(part)) {\n return false;\n }\n if (part[0] === '-' || part[part.length - 1] === '-') {\n return false;\n }\n }\n return true;\n}\nmodule.exports = exports['default'];\n});\n\nunwrapExports(isFQDN);\n\nvar isEmail_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isEmail;\n\n\n\nvar _assertString2 = _interopRequireDefault(assertString_1);\n\n\n\nvar _merge2 = _interopRequireDefault(merge_1);\n\n\n\nvar _isByteLength2 = _interopRequireDefault(isByteLength_1);\n\n\n\nvar _isFQDN2 = _interopRequireDefault(isFQDN);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar default_email_options = {\n allow_display_name: false,\n require_display_name: false,\n allow_utf8_local_part: true,\n require_tld: true\n};\n\n/* eslint-disable max-len */\n/* eslint-disable no-control-regex */\nvar displayName = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\.\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\,\\.\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF\\s]*<(.+)>$/i;\nvar emailUserPart = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]+$/i;\nvar quotedEmailUser = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]))*$/i;\nvar emailUserUtf8Part = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+$/i;\nvar quotedEmailUserUtf8 = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))*$/i;\n/* eslint-enable max-len */\n/* eslint-enable no-control-regex */\n\nfunction isEmail(str, options) {\n (0, _assertString2.default)(str);\n options = (0, _merge2.default)(options, default_email_options);\n\n if (options.require_display_name || options.allow_display_name) {\n var display_email = str.match(displayName);\n if (display_email) {\n str = display_email[1];\n } else if (options.require_display_name) {\n return false;\n }\n }\n\n var parts = str.split('@');\n var domain = parts.pop();\n var user = parts.join('@');\n\n var lower_domain = domain.toLowerCase();\n if (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com') {\n user = user.replace(/\\./g, '').toLowerCase();\n }\n\n if (!(0, _isByteLength2.default)(user, { max: 64 }) || !(0, _isByteLength2.default)(domain, { max: 254 })) {\n return false;\n }\n\n if (!(0, _isFQDN2.default)(domain, { require_tld: options.require_tld })) {\n return false;\n }\n\n if (user[0] === '\"') {\n user = user.slice(1, user.length - 1);\n return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);\n }\n\n var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;\n\n var user_parts = user.split('.');\n for (var i = 0; i < user_parts.length; i++) {\n if (!pattern.test(user_parts[i])) {\n return false;\n }\n }\n\n return true;\n}\nmodule.exports = exports['default'];\n});\n\nvar isEmail = unwrapExports(isEmail_1);\n\nvar validate$7 = function (value) {\n if (Array.isArray(value)) {\n return value.every(function (val) { return isEmail(String(val)); });\n }\n\n return isEmail(String(value));\n};\n\nvar ext = function (files, extensions) {\n var regex = new RegExp((\".(\" + (extensions.join('|')) + \")$\"), 'i');\n\n return files.every(function (file) { return regex.test(file.name); });\n};\n\nvar image = function (files) { return files.every(function (file) { return /\\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(file.name); }\n); };\n\nvar validate$8 = function (value, options) {\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$8(val, options); });\n }\n\n // eslint-disable-next-line\n return !! options.filter(function (option) { return option == value; }).length;\n};\n\nvar isIP_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isIP;\n\n\n\nvar _assertString2 = _interopRequireDefault(assertString_1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ipv4Maybe = /^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/;\nvar ipv6Block = /^[0-9A-F]{1,4}$/i;\n\nfunction isIP(str) {\n var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n (0, _assertString2.default)(str);\n version = String(version);\n if (!version) {\n return isIP(str, 4) || isIP(str, 6);\n } else if (version === '4') {\n if (!ipv4Maybe.test(str)) {\n return false;\n }\n var parts = str.split('.').sort(function (a, b) {\n return a - b;\n });\n return parts[3] <= 255;\n } else if (version === '6') {\n var blocks = str.split(':');\n var foundOmissionBlock = false; // marker to indicate ::\n\n // At least some OS accept the last 32 bits of an IPv6 address\n // (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says\n // that '::ffff:a.b.c.d' is valid for IPv4-mapped IPv6 addresses,\n // and '::a.b.c.d' is deprecated, but also valid.\n var foundIPv4TransitionBlock = isIP(blocks[blocks.length - 1], 4);\n var expectedNumberOfBlocks = foundIPv4TransitionBlock ? 7 : 8;\n\n if (blocks.length > expectedNumberOfBlocks) {\n return false;\n }\n // initial or final ::\n if (str === '::') {\n return true;\n } else if (str.substr(0, 2) === '::') {\n blocks.shift();\n blocks.shift();\n foundOmissionBlock = true;\n } else if (str.substr(str.length - 2) === '::') {\n blocks.pop();\n blocks.pop();\n foundOmissionBlock = true;\n }\n\n for (var i = 0; i < blocks.length; ++i) {\n // test for a :: which can not be at the string start/end\n // since those cases have been handled above\n if (blocks[i] === '' && i > 0 && i < blocks.length - 1) {\n if (foundOmissionBlock) {\n return false; // multiple :: in address\n }\n foundOmissionBlock = true;\n } else if (foundIPv4TransitionBlock && i === blocks.length - 1) {\n // it has been checked before that the last\n // block is a valid IPv4 address\n } else if (!ipv6Block.test(blocks[i])) {\n return false;\n }\n }\n if (foundOmissionBlock) {\n return blocks.length >= 1;\n }\n return blocks.length === expectedNumberOfBlocks;\n }\n return false;\n}\nmodule.exports = exports['default'];\n});\n\nvar isIP = unwrapExports(isIP_1);\n\nvar ip = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var version = ref[0]; if ( version === void 0 ) version = 4;\n\n if (isNullOrUndefined(value)) {\n value = '';\n }\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return isIP(val, version); });\n }\n\n return isIP(value, version);\n};\n\nvar is = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var other = ref[0];\n\n return value === other;\n};\n\nvar is_not = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var other = ref[0];\n\n return value !== other;\n};\n\n/**\n * @param {Array|String} value\n * @param {Number} length\n * @param {Number} max\n */\nvar compare = function (value, length, max) {\n if (max === undefined) {\n return value.length === length;\n }\n\n // cast to number.\n max = Number(max);\n\n return value.length >= length && value.length <= max;\n};\n\nvar length = function (value, ref) {\n var length = ref[0];\n var max = ref[1]; if ( max === void 0 ) max = undefined;\n\n length = Number(length);\n if (value === undefined || value === null) {\n return false;\n }\n\n if (typeof value === 'number') {\n value = String(value);\n }\n\n if (!value.length) {\n value = toArray(value);\n }\n\n return compare(value, length, max);\n};\n\nvar integer = function (value) {\n if (Array.isArray(value)) {\n return value.every(function (val) { return /^-?[0-9]+$/.test(String(val)); });\n }\n\n return /^-?[0-9]+$/.test(String(value));\n};\n\nvar max$1 = function (value, ref) {\n var length = ref[0];\n\n if (value === undefined || value === null) {\n return length >= 0;\n }\n\n return String(value).length <= length;\n};\n\nvar max_value = function (value, ref) {\n var max = ref[0];\n\n if (Array.isArray(value) || value === null || value === undefined || value === '') {\n return false;\n }\n\n return Number(value) <= max;\n};\n\nvar mimes = function (files, mimes) {\n var regex = new RegExp(((mimes.join('|').replace('*', '.+')) + \"$\"), 'i');\n\n return files.every(function (file) { return regex.test(file.type); });\n};\n\nvar min$1 = function (value, ref) {\n var length = ref[0];\n\n if (value === undefined || value === null) {\n return false;\n }\n return String(value).length >= length;\n};\n\nvar min_value = function (value, ref) {\n var min = ref[0];\n\n if (Array.isArray(value) || value === null || value === undefined || value === '') {\n return false;\n }\n\n return Number(value) >= min;\n};\n\nvar validate$9 = function (value, options) {\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$9(val, options); });\n }\n\n // eslint-disable-next-line\n return ! options.filter(function (option) { return option == value; }).length;\n};\n\nvar numeric = function (value) {\n if (Array.isArray(value)) {\n return value.every(function (val) { return /^[0-9]+$/.test(String(val)); });\n }\n\n return /^[0-9]+$/.test(String(value));\n};\n\nvar regex = function (value, ref) {\n var regex = ref[0];\n var flags = ref.slice(1);\n\n if (regex instanceof RegExp) {\n return regex.test(value);\n }\n\n return new RegExp(regex, flags).test(String(value));\n};\n\nvar required = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var invalidateFalse = ref[0]; if ( invalidateFalse === void 0 ) invalidateFalse = false;\n\n if (Array.isArray(value)) {\n return !! value.length;\n }\n\n // incase a field considers `false` as an empty value like checkboxes.\n if (value === false && invalidateFalse) {\n return false;\n }\n\n if (value === undefined || value === null) {\n return false;\n }\n\n return !! String(value).trim().length;\n};\n\nvar size = function (files, ref) {\n var size = ref[0];\n\n if (isNaN(size)) {\n return false;\n }\n\n var nSize = Number(size) * 1024;\n for (var i = 0; i < files.length; i++) {\n if (files[i].size > nSize) {\n return false;\n }\n }\n\n return true;\n};\n\nvar isURL_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isURL;\n\n\n\nvar _assertString2 = _interopRequireDefault(assertString_1);\n\n\n\nvar _isFQDN2 = _interopRequireDefault(isFQDN);\n\n\n\nvar _isIP2 = _interopRequireDefault(isIP_1);\n\n\n\nvar _merge2 = _interopRequireDefault(merge_1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar default_url_options = {\n protocols: ['http', 'https', 'ftp'],\n require_tld: true,\n require_protocol: false,\n require_host: true,\n require_valid_protocol: true,\n allow_underscores: false,\n allow_trailing_dot: false,\n allow_protocol_relative_urls: false\n};\n\nvar wrapped_ipv6 = /^\\[([^\\]]+)\\](?::([0-9]+))?$/;\n\nfunction isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n}\n\nfunction checkHost(host, matches) {\n for (var i = 0; i < matches.length; i++) {\n var match = matches[i];\n if (host === match || isRegExp(match) && match.test(host)) {\n return true;\n }\n }\n return false;\n}\n\nfunction isURL(url, options) {\n (0, _assertString2.default)(url);\n if (!url || url.length >= 2083 || /[\\s<>]/.test(url)) {\n return false;\n }\n if (url.indexOf('mailto:') === 0) {\n return false;\n }\n options = (0, _merge2.default)(options, default_url_options);\n var protocol = void 0,\n auth = void 0,\n host = void 0,\n hostname = void 0,\n port = void 0,\n port_str = void 0,\n split = void 0,\n ipv6 = void 0;\n\n split = url.split('#');\n url = split.shift();\n\n split = url.split('?');\n url = split.shift();\n\n split = url.split('://');\n if (split.length > 1) {\n protocol = split.shift();\n if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {\n return false;\n }\n } else if (options.require_protocol) {\n return false;\n } else if (options.allow_protocol_relative_urls && url.substr(0, 2) === '//') {\n split[0] = url.substr(2);\n }\n url = split.join('://');\n\n if (url === '') {\n return false;\n }\n\n split = url.split('/');\n url = split.shift();\n\n if (url === '' && !options.require_host) {\n return true;\n }\n\n split = url.split('@');\n if (split.length > 1) {\n auth = split.shift();\n if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) {\n return false;\n }\n }\n hostname = split.join('@');\n\n port_str = null;\n ipv6 = null;\n var ipv6_match = hostname.match(wrapped_ipv6);\n if (ipv6_match) {\n host = '';\n ipv6 = ipv6_match[1];\n port_str = ipv6_match[2] || null;\n } else {\n split = hostname.split(':');\n host = split.shift();\n if (split.length) {\n port_str = split.join(':');\n }\n }\n\n if (port_str !== null) {\n port = parseInt(port_str, 10);\n if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {\n return false;\n }\n }\n\n if (!(0, _isIP2.default)(host) && !(0, _isFQDN2.default)(host, options) && (!ipv6 || !(0, _isIP2.default)(ipv6, 6))) {\n return false;\n }\n\n host = host || ipv6;\n\n if (options.host_whitelist && !checkHost(host, options.host_whitelist)) {\n return false;\n }\n if (options.host_blacklist && checkHost(host, options.host_blacklist)) {\n return false;\n }\n\n return true;\n}\nmodule.exports = exports['default'];\n});\n\nvar isURL = unwrapExports(isURL_1);\n\nvar url = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var requireProtocol = ref[0]; if ( requireProtocol === void 0 ) requireProtocol = false;\n\n var options = { require_protocol: !!requireProtocol, allow_underscores: true };\n if (isNullOrUndefined(value)) {\n value = '';\n }\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return isURL(val, options); });\n }\n\n return isURL(value, options);\n};\n\n/* eslint-disable camelcase */\nvar Rules = {\n after: after,\n alpha_dash: validate$1,\n alpha_num: validate$2,\n alpha_spaces: validate$3,\n alpha: validate,\n before: before,\n between: validate$4,\n confirmed: confirmed,\n credit_card: credit_card,\n date_between: date_between,\n date_format: date_format,\n decimal: validate$5,\n digits: validate$6,\n dimensions: dimensions,\n email: validate$7,\n ext: ext,\n image: image,\n in: validate$8,\n integer: integer,\n length: length,\n ip: ip,\n is_not: is_not,\n is: is,\n max: max$1,\n max_value: max_value,\n mimes: mimes,\n min: min$1,\n min_value: min_value,\n not_in: validate$9,\n numeric: numeric,\n regex: regex,\n required: required,\n size: size,\n url: url\n};\n\n// \n\nvar normalize = function (fields) {\n if (Array.isArray(fields)) {\n return fields.reduce(function (prev, curr) {\n if (~curr.indexOf('.')) {\n prev[curr.split('.')[1]] = curr;\n } else {\n prev[curr] = curr;\n }\n\n return prev;\n }, {});\n }\n\n return fields;\n};\n\n// Combines two flags using either AND or OR depending on the flag type.\nvar combine = function (lhs, rhs) {\n var mapper = {\n pristine: function (lhs, rhs) { return lhs && rhs; },\n dirty: function (lhs, rhs) { return lhs || rhs; },\n touched: function (lhs, rhs) { return lhs || rhs; },\n untouched: function (lhs, rhs) { return lhs && rhs; },\n valid: function (lhs, rhs) { return lhs && rhs; },\n invalid: function (lhs, rhs) { return lhs || rhs; },\n pending: function (lhs, rhs) { return lhs || rhs; },\n required: function (lhs, rhs) { return lhs || rhs; },\n validated: function (lhs, rhs) { return lhs && rhs; }\n };\n\n return Object.keys(mapper).reduce(function (flags, flag) {\n flags[flag] = mapper[flag](lhs[flag], rhs[flag]);\n\n return flags;\n }, {});\n};\n\nvar mapScope = function (scope, deep) {\n if ( deep === void 0 ) deep = true;\n\n return Object.keys(scope).reduce(function (flags, field) {\n if (!flags) {\n flags = assign({}, scope[field]);\n return flags;\n }\n\n // scope.\n var isScope = field.indexOf('$') === 0;\n if (deep && isScope) {\n return combine(mapScope(scope[field]), flags);\n } else if (!deep && isScope) {\n return flags;\n }\n\n flags = combine(flags, scope[field]);\n\n return flags;\n }, null);\n};\n\n/**\n * Maps fields to computed functions.\n */\nvar mapFields = function (fields) {\n if (!fields) {\n return function () {\n return mapScope(this.$validator.flags);\n };\n }\n\n var normalized = normalize(fields);\n return Object.keys(normalized).reduce(function (prev, curr) {\n var field = normalized[curr];\n prev[curr] = function mappedField () {\n // if field exists\n if (this.$validator.flags[field]) {\n return this.$validator.flags[field];\n }\n\n // scopeless fields were selected.\n if (normalized[curr] === '*') {\n return mapScope(this.$validator.flags, false);\n }\n\n // if it has a scope defined\n var index = field.indexOf('.');\n if (index <= 0) {\n return {};\n }\n\n var ref = field.split('.');\n var scope = ref[0];\n var name = ref.slice(1);\n\n scope = this.$validator.flags[(\"$\" + scope)];\n name = name.join('.');\n\n // an entire scope was selected: scope.*\n if (name === '*' && scope) {\n return mapScope(scope);\n }\n\n if (scope && scope[name]) {\n return scope[name];\n }\n\n return {};\n };\n\n return prev;\n }, {});\n};\n\nvar version = '2.0.3';\n\nvar rulesPlugin = function (ref) {\n var Validator$$1 = ref.Validator;\n\n Object.keys(Rules).forEach(function (rule) {\n Validator$$1.extend(rule, Rules[rule]);\n });\n\n // Merge the english messages.\n Validator$$1.localize('en', locale);\n};\n\nuse(rulesPlugin);\n\nvar index_esm = {\n install: install,\n use: use,\n directive: directive,\n mixin: mixin,\n mapFields: mapFields,\n Validator: Validator,\n ErrorBag: ErrorBag,\n Rules: Rules,\n version: version\n};\n\nexport { install, use, directive, mixin, mapFields, Validator, ErrorBag, Rules, version };\nexport default index_esm;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vee-validate/dist/vee-validate.esm.js\n// module id = sUu7\n// module chunks = 0"],"sourceRoot":""}