\";\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.prototype.$mount;\nVue.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 outputSourceRange: process.env.NODE_ENV !== 'production',\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.compile = compileToFunctions;\n\nexport default Vue;\n","\r\nexport const ViewPort = {\r\n\tDesktop: 'desktop',\r\n\tTablet: 'tablet',\r\n\tMobile: 'mobile'\r\n};\r\n\r\nexport const Breakpoints = {\r\n\tDesktop: '992',\r\n\tTablet: '750'\r\n};\r\n\r\nexport const bootstrap = window.bootstrap = require('bootstrap');","import { hasNormalizedSlot as _hasNormalizedSlot, normalizeSlot as _normalizeSlot } from '../utils/normalize-slot';\nimport { concat } from '../utils/array';\nexport default {\n methods: {\n hasNormalizedSlot: function hasNormalizedSlot(name) {\n // Returns true if the either a $scopedSlot or $slot exists with the specified name\n return _hasNormalizedSlot(name, this.$scopedSlots, this.$slots);\n },\n normalizeSlot: function normalizeSlot(name) {\n var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Returns an array of rendered vNodes if slot found.\n // Returns undefined if not found.\n var vNodes = _normalizeSlot(name, scope, this.$scopedSlots, this.$slots);\n\n return vNodes ? concat(vNodes) : vNodes;\n }\n }\n};","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport OurVue from './vue';\nimport cloneDeep from './clone-deep';\nimport get from './get';\nimport warn from './warn';\nimport { isArray, isPlainObject, isString, isUndefined } from './inspect';\nimport { getOwnPropertyNames, hasOwnProperty } from './object';\nimport DEFAULTS from './config-defaults'; // --- Constants ---\n\nvar PROP_NAME = '$bvConfig'; // Config manager class\n\nvar BvConfig =\n/*#__PURE__*/\nfunction () {\n function BvConfig() {\n _classCallCheck(this, BvConfig);\n\n // TODO: pre-populate with default config values (needs updated tests)\n // this.$_config = cloneDeep(DEFAULTS)\n this.$_config = {};\n this.$_cachedBreakpoints = null;\n }\n\n _createClass(BvConfig, [{\n key: \"getDefaults\",\n // Returns the defaults\n value: function getDefaults()\n /* istanbul ignore next */\n {\n return this.defaults;\n } // Method to merge in user config parameters\n\n }, {\n key: \"setConfig\",\n value: function setConfig() {\n var _this = this;\n\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (!isPlainObject(config)) {\n /* istanbul ignore next */\n return;\n }\n\n var configKeys = getOwnPropertyNames(config);\n configKeys.forEach(function (cmpName) {\n /* istanbul ignore next */\n if (!hasOwnProperty(DEFAULTS, cmpName)) {\n warn(\"config: unknown config property \\\"\".concat(cmpName, \"\\\"\"));\n return;\n }\n\n var cmpConfig = config[cmpName];\n\n if (cmpName === 'breakpoints') {\n // Special case for breakpoints\n var breakpoints = config.breakpoints;\n /* istanbul ignore if */\n\n if (!isArray(breakpoints) || breakpoints.length < 2 || breakpoints.some(function (b) {\n return !isString(b) || b.length === 0;\n })) {\n warn('config: \"breakpoints\" must be an array of at least 2 breakpoint names');\n } else {\n _this.$_config.breakpoints = cloneDeep(breakpoints);\n }\n } else if (isPlainObject(cmpConfig)) {\n // Component prop defaults\n var props = getOwnPropertyNames(cmpConfig);\n props.forEach(function (prop) {\n /* istanbul ignore if */\n if (!hasOwnProperty(DEFAULTS[cmpName], prop)) {\n warn(\"config: unknown config property \\\"\".concat(cmpName, \".{$prop}\\\"\"));\n } else {\n // TODO: If we pre-populate the config with defaults, we can skip this line\n _this.$_config[cmpName] = _this.$_config[cmpName] || {};\n\n if (!isUndefined(cmpConfig[prop])) {\n _this.$_config[cmpName][prop] = cloneDeep(cmpConfig[prop]);\n }\n }\n });\n }\n });\n } // Clear the config. For testing purposes only\n\n }, {\n key: \"resetConfig\",\n value: function resetConfig() {\n this.$_config = {};\n } // Returns a deep copy of the user config\n\n }, {\n key: \"getConfig\",\n value: function getConfig() {\n return cloneDeep(this.$_config);\n }\n }, {\n key: \"getConfigValue\",\n value: function getConfigValue(key) {\n // First we try the user config, and if key not found we fall back to default value\n // NOTE: If we deep clone DEFAULTS into config, then we can skip the fallback for get\n return cloneDeep(get(this.$_config, key, get(DEFAULTS, key)));\n }\n }, {\n key: \"defaults\",\n get: function get()\n /* istanbul ignore next */\n {\n return DEFAULTS;\n }\n }], [{\n key: \"Defaults\",\n get: function get()\n /* istanbul ignore next */\n {\n return DEFAULTS;\n }\n }]);\n\n return BvConfig;\n}(); // Method for applying a global config\n\n\nexport var setConfig = function setConfig() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var Vue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : OurVue;\n // Ensure we have a $bvConfig Object on the Vue prototype.\n // We set on Vue and OurVue just in case consumer has not set an alias of `vue`.\n Vue.prototype[PROP_NAME] = OurVue.prototype[PROP_NAME] = Vue.prototype[PROP_NAME] || OurVue.prototype[PROP_NAME] || new BvConfig(); // Apply the config values\n\n Vue.prototype[PROP_NAME].setConfig(config);\n}; // Method for resetting the user config. Exported for testing purposes only.\n\nexport var resetConfig = function resetConfig() {\n if (OurVue.prototype[PROP_NAME] && OurVue.prototype[PROP_NAME].resetConfig) {\n OurVue.prototype[PROP_NAME].resetConfig();\n }\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport OurVue from './vue';\nimport warn from './warn';\nimport { setConfig } from './config-set';\nimport { hasWindowSupport, isJSDOM } from './env';\n/**\n * Checks if there are multiple instances of Vue, and warns (once) about possible issues.\n * @param {object} Vue\n */\n\nexport var checkMultipleVue = function () {\n var checkMultipleVueWarned = false;\n var MULTIPLE_VUE_WARNING = ['Multiple instances of Vue detected!', 'You may need to set up an alias for Vue in your bundler config.', 'See: https://bootstrap-vue.js.org/docs#using-module-bundlers'].join('\\n');\n return function (Vue) {\n /* istanbul ignore next */\n if (!checkMultipleVueWarned && OurVue !== Vue && !isJSDOM) {\n warn(MULTIPLE_VUE_WARNING);\n }\n\n checkMultipleVueWarned = true;\n };\n}();\n/**\n * Plugin install factory function.\n * @param {object} { components, directives }\n * @returns {function} plugin install function\n */\n\nexport var installFactory = function installFactory() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n components = _ref.components,\n directives = _ref.directives,\n plugins = _ref.plugins;\n\n var install = function install(Vue) {\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (install.installed) {\n /* istanbul ignore next */\n return;\n }\n\n install.installed = true;\n checkMultipleVue(Vue);\n setConfig(config, Vue);\n registerComponents(Vue, components);\n registerDirectives(Vue, directives);\n registerPlugins(Vue, plugins);\n };\n\n install.installed = false;\n return install;\n};\n/**\n * Plugin object factory function.\n * @param {object} { components, directives, plugins }\n * @returns {object} plugin install object\n */\n\nexport var pluginFactory = function pluginFactory() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var extend = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _objectSpread({}, extend, {\n install: installFactory(opts)\n });\n};\n/**\n * Load a group of plugins.\n * @param {object} Vue\n * @param {object} Plugin definitions\n */\n\nexport var registerPlugins = function registerPlugins(Vue) {\n var plugins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n for (var plugin in plugins) {\n if (plugin && plugins[plugin]) {\n Vue.use(plugins[plugin]);\n }\n }\n};\n/**\n * Load a component.\n * @param {object} Vue\n * @param {string} Component name\n * @param {object} Component definition\n */\n\nexport var registerComponent = function registerComponent(Vue, name, def) {\n if (Vue && name && def) {\n Vue.component(name, def);\n }\n};\n/**\n * Load a group of components.\n * @param {object} Vue\n * @param {object} Object of component definitions\n */\n\nexport var registerComponents = function registerComponents(Vue) {\n var components = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n for (var component in components) {\n registerComponent(Vue, component, components[component]);\n }\n};\n/**\n * Load a directive.\n * @param {object} Vue\n * @param {string} Directive name\n * @param {object} Directive definition\n */\n\nexport var registerDirective = function registerDirective(Vue, name, def) {\n if (Vue && name && def) {\n // Ensure that any leading V is removed from the\n // name, as Vue adds it automatically\n Vue.directive(name.replace(/^VB/, 'B'), def);\n }\n};\n/**\n * Load a group of directives.\n * @param {object} Vue\n * @param {object} Object of directive definitions\n */\n\nexport var registerDirectives = function registerDirectives(Vue) {\n var directives = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n for (var directive in directives) {\n registerDirective(Vue, directive, directives[directive]);\n }\n};\n/**\n * Install plugin if window.Vue available\n * @param {object} Plugin definition\n */\n\nexport var vueUse = function vueUse(VuePlugin) {\n /* istanbul ignore next */\n if (hasWindowSupport && window.Vue) {\n window.Vue.use(VuePlugin);\n }\n};","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport { assign, defineProperty, defineProperties, readonlyDescriptor } from './object';\n\nvar BvEvent =\n/*#__PURE__*/\nfunction () {\n function BvEvent(type) {\n var eventInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, BvEvent);\n\n // Start by emulating native Event constructor\n if (!type) {\n /* istanbul ignore next */\n throw new TypeError(\"Failed to construct '\".concat(this.constructor.name, \"'. 1 argument required, \").concat(arguments.length, \" given.\"));\n } // Merge defaults first, the eventInit, and the type last\n // so it can't be overwritten\n\n\n assign(this, BvEvent.Defaults, this.constructor.Defaults, eventInit, {\n type: type\n }); // Freeze some props as readonly, but leave them enumerable\n\n defineProperties(this, {\n type: readonlyDescriptor(),\n cancelable: readonlyDescriptor(),\n nativeEvent: readonlyDescriptor(),\n target: readonlyDescriptor(),\n relatedTarget: readonlyDescriptor(),\n vueTarget: readonlyDescriptor(),\n componentId: readonlyDescriptor()\n }); // Create a private variable using closure scoping\n\n var defaultPrevented = false; // Recreate preventDefault method. One way setter\n\n this.preventDefault = function preventDefault() {\n if (this.cancelable) {\n defaultPrevented = true;\n }\n }; // Create `defaultPrevented` publicly accessible prop that\n // can only be altered by the preventDefault method\n\n\n defineProperty(this, 'defaultPrevented', {\n enumerable: true,\n get: function get() {\n return defaultPrevented;\n }\n });\n }\n\n _createClass(BvEvent, null, [{\n key: \"Defaults\",\n get: function get() {\n return {\n type: '',\n cancelable: true,\n nativeEvent: null,\n target: null,\n relatedTarget: null,\n vueTarget: null,\n componentId: null\n };\n }\n }]);\n\n return BvEvent;\n}(); // Named Exports\n\n\nexport { BvEvent }; // Default Export\n\nexport default BvEvent;","import { keys } from './object';\nimport { eventOn, eventOff } from './dom';\nvar allListenTypes = {\n hover: true,\n click: true,\n focus: true\n};\nvar BVBoundListeners = '__BV_boundEventListeners__';\n\nvar getTargets = function getTargets(binding) {\n var targets = keys(binding.modifiers || {}).filter(function (t) {\n return !allListenTypes[t];\n });\n\n if (binding.value) {\n targets.push(binding.value);\n }\n\n return targets;\n};\n\nvar bindTargets = function bindTargets(vnode, binding, listenTypes, fn) {\n var targets = getTargets(binding);\n\n var listener = function listener() {\n fn({\n targets: targets,\n vnode: vnode\n });\n };\n\n keys(allListenTypes).forEach(function (type) {\n if (listenTypes[type] || binding.modifiers[type]) {\n eventOn(vnode.elm, type, listener);\n var boundListeners = vnode.elm[BVBoundListeners] || {};\n boundListeners[type] = boundListeners[type] || [];\n boundListeners[type].push(listener);\n vnode.elm[BVBoundListeners] = boundListeners;\n }\n }); // Return the list of targets\n\n return targets;\n};\n\nvar unbindTargets = function unbindTargets(vnode, binding, listenTypes) {\n keys(allListenTypes).forEach(function (type) {\n if (listenTypes[type] || binding.modifiers[type]) {\n var boundListeners = vnode.elm[BVBoundListeners] && vnode.elm[BVBoundListeners][type];\n\n if (boundListeners) {\n boundListeners.forEach(function (listener) {\n return eventOff(vnode.elm, type, listener);\n });\n delete vnode.elm[BVBoundListeners][type];\n }\n }\n });\n};\n\nexport { bindTargets, unbindTargets, getTargets };\nexport default bindTargets;","import { deepFreeze } from './object'; // General BootstrapVue configuration\n//\n// BREAKPOINT DEFINITIONS\n//\n// Some components (BCol and BFormGroup) generate props based on breakpoints, and this\n// occurs when the component is first loaded (evaluated), which may happen before the\n// config is created/modified\n//\n// To get around this we make these components async (lazy evaluation)\n// The component definition is only called/executed when the first access to the\n// component is used (and cached on subsequent uses)\n//\n// See: https://vuejs.org/v2/guide/components-dynamic-async.html#Async-Components\n//\n// PROP DEFAULTS\n//\n// For default values on props, we use the default value factory function approach so\n// so that the default values are pulled in at each component instantiation\n//\n// props: {\n// variant: {\n// type: String,\n// default: () => getConfigComponent('BAlert', 'variant')\n// }\n// }\n// prettier-ignore\n\nexport default deepFreeze({\n // Breakpoints\n breakpoints: ['xs', 'sm', 'md', 'lg', 'xl'],\n // Component Specific defaults are keyed by the component\n // name (PascalCase) and prop name (camelCase)\n BAlert: {\n dismissLabel: 'Close',\n variant: 'info'\n },\n BBadge: {\n variant: 'secondary'\n },\n BButton: {\n variant: 'secondary'\n },\n BButtonClose: {\n // `textVariant` is `null` to inherit the current text color\n textVariant: null,\n ariaLabel: 'Close'\n },\n BCardSubTitle: {\n // BCard and BCardBody also inherit this prop\n subTitleTextVariant: 'muted'\n },\n BCarousel: {\n labelPrev: 'Previous Slide',\n labelNext: 'Next Slide',\n labelGotoSlide: 'Goto Slide',\n labelIndicators: 'Select a slide to display'\n },\n BDropdown: {\n toggleText: 'Toggle Dropdown',\n variant: 'secondary',\n splitVariant: null\n },\n BFormFile: {\n browseText: 'Browse',\n // Chrome default file prompt\n placeholder: 'No file chosen',\n dropPlaceholder: 'Drop files here'\n },\n BFormText: {\n textVariant: 'muted'\n },\n BImg: {\n blankColor: 'transparent'\n },\n BImgLazy: {\n blankColor: 'transparent'\n },\n BJumbotron: {\n bgVariant: null,\n borderVariant: null,\n textVariant: null\n },\n BListGroupItem: {\n variant: null\n },\n BModal: {\n titleTag: 'h5',\n size: 'md',\n headerBgVariant: null,\n headerBorderVariant: null,\n headerTextVariant: null,\n headerCloseVariant: null,\n bodyBgVariant: null,\n bodyTextVariant: null,\n footerBgVariant: null,\n footerBorderVariant: null,\n footerTextVariant: null,\n cancelTitle: 'Cancel',\n cancelVariant: 'secondary',\n okTitle: 'OK',\n okVariant: 'primary',\n headerCloseLabel: 'Close'\n },\n BNavbar: {\n variant: null\n },\n BNavbarToggle: {\n label: 'Toggle navigation'\n },\n BPopover: {\n boundary: 'scrollParent',\n boundaryPadding: 5,\n customClass: null,\n delay: 0,\n variant: null\n },\n BProgress: {\n variant: null\n },\n BProgressBar: {\n variant: null\n },\n BSpinner: {\n variant: null\n },\n BTable: {\n selectedVariant: 'primary',\n headVariant: null,\n footVariant: null\n },\n BToast: {\n toaster: 'b-toaster-top-right',\n autoHideDelay: 5000,\n variant: null,\n toastClass: null,\n headerClass: null,\n bodyClass: null,\n solid: false\n },\n BToaster: {\n ariaLive: null,\n ariaAtomic: null,\n role: null\n },\n BTooltip: {\n boundary: 'scrollParent',\n boundaryPadding: 5,\n customClass: null,\n delay: 0,\n variant: null\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nimport { isArray, isPlainObject } from './inspect';\nimport { keys } from './object';\nexport var cloneDeep = function cloneDeep(obj) {\n var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : obj;\n\n if (isArray(obj)) {\n return obj.reduce(function (result, val) {\n return [].concat(_toConsumableArray(result), [cloneDeep(val, val)]);\n }, []);\n }\n\n if (isPlainObject(obj)) {\n return keys(obj).reduce(function (result, key) {\n return _objectSpread({}, result, _defineProperty({}, key, cloneDeep(obj[key], obj[key])));\n }, {});\n }\n\n return defaultValue;\n};\nexport default cloneDeep;","import $ from 'jquery';\r\n\r\nfunction displayError(el, type) {\r\n\t$(el).siblings(`.error.${type}`).removeClass('hidden');\r\n\t$(el).addClass('error-input');\r\n}\r\n\r\nfunction displaySuccess(el) {\r\n $(el).siblings('.error').addClass('hidden');\r\n $(el).siblings('.field-validation-error').addClass('hidden');\r\n\t$(el).removeClass('error-input');\r\n}\r\n\r\nfunction isEmpty(el) {\r\n if ($(el).val() === '') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}\r\n\r\nfunction isValidUSZip(sZip) {\r\n return /^\\d{5}(-\\d{4})?$/.test(sZip);\r\n}\r\n\r\nfunction isValidEmail(email) {\r\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return re.test(String(email).toLowerCase());\r\n}\r\n\r\nfunction isValidPhone(phone) {\r\n const re = /^(?:(?:\\+?1\\s*(?:[.-]\\s*)?)?(?:\\(\\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\\s*\\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\\s*(?:[.-]\\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\\s*(?:[.-]\\s*)?([0-9]{4})(?:\\s*(?:#|x\\.?|ext\\.?|extension)\\s*(\\d+))?$/;\r\n return re.test(String(phone));\r\n}\r\n\r\nconst textValidate = (el) => {\r\n if (isEmpty(el)) {\r\n displayError(el, 'empty');\r\n return 0;\r\n } else {\r\n displaySuccess(el);\r\n }\r\n return 1;\r\n};\r\n\r\nconst zipValidate = (el) => {\r\n if (isEmpty(el) || !isValidUSZip($(el).val())) {\r\n displayError(el, 'zipcode');\r\n return 0;\r\n } else {\r\n displaySuccess(el);\r\n }\r\n return 1;\r\n};\r\n\r\nconst emailValidate = (el) => {\r\n if (isEmpty(el) || !isValidEmail($(el).val())) {\r\n displayError(el, 'email');\r\n return 0;\r\n } else {\r\n displaySuccess(el);\r\n }\r\n return 1;\r\n};\r\n\r\n\r\nconst phoneValidate = (el) => {\r\n if (isEmpty(el) || !isValidPhone($(el).val())) {\r\n displayError(el, 'phone');\r\n return 0;\r\n } else {\r\n displaySuccess(el);\r\n }\r\n return 1;\r\n};\r\n\r\nconst selectValidate = (el) => {\r\n if (isEmpty(el)) {\r\n let customParent = $(el).parent('.bootstrap-select');\r\n if (customParent.length > 0) {\r\n displayError(customParent, 'empty');\r\n } else {\r\n displayError(el, 'empty');\r\n }\r\n return 0;\r\n }\r\n return 1;\r\n};\r\n\r\nconst checkboxValidate = (el) => {\r\n let name = $(el).attr('name');\r\n let checked = $(`input[name='${name}']:checked`);\r\n if (checked.length === 0) {\r\n let parent = $(el).closest('.checkbox-list');\r\n displayError(parent, 'empty');\r\n return 0;\r\n }\r\n return 1;\r\n};\r\n\r\n\r\nconst radioValidate = (el) => {\r\n let name = $(el).attr('name');\r\n let checked = $(`input[name='${name}']:checked`);\r\n if (checked.length === 0) {\r\n let parent = $(el).closest('.radio-container');\r\n displayError(parent, 'empty');\r\n return 0;\r\n }\r\n return 1;\r\n};\r\n\r\nexport default { \r\n textValidate,\r\n zipValidate,\r\n emailValidate,\r\n phoneValidate,\r\n selectValidate,\r\n checkboxValidate,\r\n radioValidate\r\n};","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\") g = 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","import * as CONST from './constants';\r\n\r\n// utility class for reusable ui related functions\r\n\r\nexport default class Util {\r\n\t// determine if the current device width is desktop, tablet or mobile\r\n\t// if (Util.getViewPort() === CONST.ViewPort.Desktop) { // do something if the viewport is desktop })\r\n\tstatic getViewPort() {\r\n\t\tconst desktopBreakpoint = CONST.Breakpoints.Desktop;\r\n\t\tconst tabletBreakpoint = CONST.Breakpoints.Tablet;\r\n\r\n\t\tconst width = window.innerWidth;\r\n\r\n\t\tif (width >= desktopBreakpoint) {\r\n\t\t\treturn CONST.ViewPort.Desktop;\r\n\t\t}\r\n\t\telse if (width >= tabletBreakpoint) {\r\n\t\t\treturn CONST.ViewPort.Tablet;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn CONST.ViewPort.Mobile;\r\n\t\t}\r\n\t}\r\n}","/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader;\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction decode (s) {\n\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api() {}\n\n\t\tfunction set (key, value, attributes) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tattributes = extend({\n\t\t\t\tpath: '/'\n\t\t\t}, api.defaults, attributes);\n\n\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t}\n\n\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\ttry {\n\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\tvalue = result;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\n\t\t\tvalue = converter.write ?\n\t\t\t\tconverter.write(value, key) :\n\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\n\t\t\tvar stringifiedAttributes = '';\n\t\t\tfor (var attributeName in attributes) {\n\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t// ...\n\t\t\t\t// 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t// character:\n\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t// ...\n\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t}\n\n\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t}\n\n\t\tfunction get (key, json) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar jar = {};\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all.\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\tdecode(cookie);\n\n\t\t\t\t\tif (json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tjar[name] = cookie;\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn key ? jar[key] : jar;\n\t\t}\n\n\t\tapi.set = set;\n\t\tapi.get = function (key) {\n\t\t\treturn get(key, false /* read as raw */);\n\t\t};\n\t\tapi.getJSON = function (key) {\n\t\t\treturn get(key, true /* read as json */);\n\t\t};\n\t\tapi.remove = function (key, attributes) {\n\t\t\tset(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.defaults = {};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nvar prototype = AxiosError.prototype;\nvar descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(function(code) {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = function(error, code, config, request, response, customProps) {\n var axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nmodule.exports = AxiosError;\n","/**\n * vuex v3.1.1\n * (c) 2019 Evan You\n * @license MIT\n */\nfunction applyMixin (Vue) {\n var version = Number(Vue.version.split('.')[0]);\n\n if (version >= 2) {\n Vue.mixin({ beforeCreate: vuexInit });\n } else {\n // override init and inject vuex init procedure\n // for 1.x backwards compatibility.\n var _init = Vue.prototype._init;\n Vue.prototype._init = function (options) {\n if ( options === void 0 ) options = {};\n\n options.init = options.init\n ? [vuexInit].concat(options.init)\n : vuexInit;\n _init.call(this, options);\n };\n }\n\n /**\n * Vuex init hook, injected into each instances init hooks list.\n */\n\n function vuexInit () {\n var options = this.$options;\n // store injection\n if (options.store) {\n this.$store = typeof options.store === 'function'\n ? options.store()\n : options.store;\n } else if (options.parent && options.parent.$store) {\n this.$store = options.parent.$store;\n }\n }\n}\n\nvar target = typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\nvar devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\nfunction devtoolPlugin (store) {\n if (!devtoolHook) { return }\n\n store._devtoolHook = devtoolHook;\n\n devtoolHook.emit('vuex:init', store);\n\n devtoolHook.on('vuex:travel-to-state', function (targetState) {\n store.replaceState(targetState);\n });\n\n store.subscribe(function (mutation, state) {\n devtoolHook.emit('vuex:mutation', mutation, state);\n });\n}\n\n/**\n * Get the first item that pass the test\n * by second argument function\n *\n * @param {Array} list\n * @param {Function} f\n * @return {*}\n */\n\n/**\n * forEach for object\n */\nfunction forEachValue (obj, fn) {\n Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });\n}\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isPromise (val) {\n return val && typeof val.then === 'function'\n}\n\nfunction assert (condition, msg) {\n if (!condition) { throw new Error((\"[vuex] \" + msg)) }\n}\n\nfunction partial (fn, arg) {\n return function () {\n return fn(arg)\n }\n}\n\n// Base data struct for store's module, package with some attribute and method\nvar Module = function Module (rawModule, runtime) {\n this.runtime = runtime;\n // Store some children item\n this._children = Object.create(null);\n // Store the origin module object which passed by programmer\n this._rawModule = rawModule;\n var rawState = rawModule.state;\n\n // Store the origin module's state\n this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};\n};\n\nvar prototypeAccessors = { namespaced: { configurable: true } };\n\nprototypeAccessors.namespaced.get = function () {\n return !!this._rawModule.namespaced\n};\n\nModule.prototype.addChild = function addChild (key, module) {\n this._children[key] = module;\n};\n\nModule.prototype.removeChild = function removeChild (key) {\n delete this._children[key];\n};\n\nModule.prototype.getChild = function getChild (key) {\n return this._children[key]\n};\n\nModule.prototype.update = function update (rawModule) {\n this._rawModule.namespaced = rawModule.namespaced;\n if (rawModule.actions) {\n this._rawModule.actions = rawModule.actions;\n }\n if (rawModule.mutations) {\n this._rawModule.mutations = rawModule.mutations;\n }\n if (rawModule.getters) {\n this._rawModule.getters = rawModule.getters;\n }\n};\n\nModule.prototype.forEachChild = function forEachChild (fn) {\n forEachValue(this._children, fn);\n};\n\nModule.prototype.forEachGetter = function forEachGetter (fn) {\n if (this._rawModule.getters) {\n forEachValue(this._rawModule.getters, fn);\n }\n};\n\nModule.prototype.forEachAction = function forEachAction (fn) {\n if (this._rawModule.actions) {\n forEachValue(this._rawModule.actions, fn);\n }\n};\n\nModule.prototype.forEachMutation = function forEachMutation (fn) {\n if (this._rawModule.mutations) {\n forEachValue(this._rawModule.mutations, fn);\n }\n};\n\nObject.defineProperties( Module.prototype, prototypeAccessors );\n\nvar ModuleCollection = function ModuleCollection (rawRootModule) {\n // register root module (Vuex.Store options)\n this.register([], rawRootModule, false);\n};\n\nModuleCollection.prototype.get = function get (path) {\n return path.reduce(function (module, key) {\n return module.getChild(key)\n }, this.root)\n};\n\nModuleCollection.prototype.getNamespace = function getNamespace (path) {\n var module = this.root;\n return path.reduce(function (namespace, key) {\n module = module.getChild(key);\n return namespace + (module.namespaced ? key + '/' : '')\n }, '')\n};\n\nModuleCollection.prototype.update = function update$1 (rawRootModule) {\n update([], this.root, rawRootModule);\n};\n\nModuleCollection.prototype.register = function register (path, rawModule, runtime) {\n var this$1 = this;\n if ( runtime === void 0 ) runtime = true;\n\n if (process.env.NODE_ENV !== 'production') {\n assertRawModule(path, rawModule);\n }\n\n var newModule = new Module(rawModule, runtime);\n if (path.length === 0) {\n this.root = newModule;\n } else {\n var parent = this.get(path.slice(0, -1));\n parent.addChild(path[path.length - 1], newModule);\n }\n\n // register nested modules\n if (rawModule.modules) {\n forEachValue(rawModule.modules, function (rawChildModule, key) {\n this$1.register(path.concat(key), rawChildModule, runtime);\n });\n }\n};\n\nModuleCollection.prototype.unregister = function unregister (path) {\n var parent = this.get(path.slice(0, -1));\n var key = path[path.length - 1];\n if (!parent.getChild(key).runtime) { return }\n\n parent.removeChild(key);\n};\n\nfunction update (path, targetModule, newModule) {\n if (process.env.NODE_ENV !== 'production') {\n assertRawModule(path, newModule);\n }\n\n // update target module\n targetModule.update(newModule);\n\n // update nested modules\n if (newModule.modules) {\n for (var key in newModule.modules) {\n if (!targetModule.getChild(key)) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n \"[vuex] trying to add a new module '\" + key + \"' on hot reloading, \" +\n 'manual reload is needed'\n );\n }\n return\n }\n update(\n path.concat(key),\n targetModule.getChild(key),\n newModule.modules[key]\n );\n }\n }\n}\n\nvar functionAssert = {\n assert: function (value) { return typeof value === 'function'; },\n expected: 'function'\n};\n\nvar objectAssert = {\n assert: function (value) { return typeof value === 'function' ||\n (typeof value === 'object' && typeof value.handler === 'function'); },\n expected: 'function or object with \"handler\" function'\n};\n\nvar assertTypes = {\n getters: functionAssert,\n mutations: functionAssert,\n actions: objectAssert\n};\n\nfunction assertRawModule (path, rawModule) {\n Object.keys(assertTypes).forEach(function (key) {\n if (!rawModule[key]) { return }\n\n var assertOptions = assertTypes[key];\n\n forEachValue(rawModule[key], function (value, type) {\n assert(\n assertOptions.assert(value),\n makeAssertionMessage(path, key, type, value, assertOptions.expected)\n );\n });\n });\n}\n\nfunction makeAssertionMessage (path, key, type, value, expected) {\n var buf = key + \" should be \" + expected + \" but \\\"\" + key + \".\" + type + \"\\\"\";\n if (path.length > 0) {\n buf += \" in module \\\"\" + (path.join('.')) + \"\\\"\";\n }\n buf += \" is \" + (JSON.stringify(value)) + \".\";\n return buf\n}\n\nvar Vue; // bind on install\n\nvar Store = function Store (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #731\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(Vue, \"must call Vue.use(Vuex) before creating a store instance.\");\n assert(typeof Promise !== 'undefined', \"vuex requires a Promise polyfill in this browser.\");\n assert(this instanceof Store, \"store must be called with the new operator.\");\n }\n\n var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];\n var strict = options.strict; if ( strict === void 0 ) strict = false;\n\n // store internal state\n this._committing = false;\n this._actions = Object.create(null);\n this._actionSubscribers = [];\n this._mutations = Object.create(null);\n this._wrappedGetters = Object.create(null);\n this._modules = new ModuleCollection(options);\n this._modulesNamespaceMap = Object.create(null);\n this._subscribers = [];\n this._watcherVM = new Vue();\n\n // bind commit and dispatch to self\n var store = this;\n var ref = this;\n var dispatch = ref.dispatch;\n var commit = ref.commit;\n this.dispatch = function boundDispatch (type, payload) {\n return dispatch.call(store, type, payload)\n };\n this.commit = function boundCommit (type, payload, options) {\n return commit.call(store, type, payload, options)\n };\n\n // strict mode\n this.strict = strict;\n\n var state = this._modules.root.state;\n\n // init root module.\n // this also recursively registers all sub-modules\n // and collects all module getters inside this._wrappedGetters\n installModule(this, state, [], this._modules.root);\n\n // initialize the store vm, which is responsible for the reactivity\n // (also registers _wrappedGetters as computed properties)\n resetStoreVM(this, state);\n\n // apply plugins\n plugins.forEach(function (plugin) { return plugin(this$1); });\n\n var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;\n if (useDevtools) {\n devtoolPlugin(this);\n }\n};\n\nvar prototypeAccessors$1 = { state: { configurable: true } };\n\nprototypeAccessors$1.state.get = function () {\n return this._vm._data.$$state\n};\n\nprototypeAccessors$1.state.set = function (v) {\n if (process.env.NODE_ENV !== 'production') {\n assert(false, \"use store.replaceState() to explicit replace store state.\");\n }\n};\n\nStore.prototype.commit = function commit (_type, _payload, _options) {\n var this$1 = this;\n\n // check object-style commit\n var ref = unifyObjectStyle(_type, _payload, _options);\n var type = ref.type;\n var payload = ref.payload;\n var options = ref.options;\n\n var mutation = { type: type, payload: payload };\n var entry = this._mutations[type];\n if (!entry) {\n if (process.env.NODE_ENV !== 'production') {\n console.error((\"[vuex] unknown mutation type: \" + type));\n }\n return\n }\n this._withCommit(function () {\n entry.forEach(function commitIterator (handler) {\n handler(payload);\n });\n });\n this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });\n\n if (\n process.env.NODE_ENV !== 'production' &&\n options && options.silent\n ) {\n console.warn(\n \"[vuex] mutation type: \" + type + \". Silent option has been removed. \" +\n 'Use the filter functionality in the vue-devtools'\n );\n }\n};\n\nStore.prototype.dispatch = function dispatch (_type, _payload) {\n var this$1 = this;\n\n // check object-style dispatch\n var ref = unifyObjectStyle(_type, _payload);\n var type = ref.type;\n var payload = ref.payload;\n\n var action = { type: type, payload: payload };\n var entry = this._actions[type];\n if (!entry) {\n if (process.env.NODE_ENV !== 'production') {\n console.error((\"[vuex] unknown action type: \" + type));\n }\n return\n }\n\n try {\n this._actionSubscribers\n .filter(function (sub) { return sub.before; })\n .forEach(function (sub) { return sub.before(action, this$1.state); });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"[vuex] error in before action subscribers: \");\n console.error(e);\n }\n }\n\n var result = entry.length > 1\n ? Promise.all(entry.map(function (handler) { return handler(payload); }))\n : entry[0](payload);\n\n return result.then(function (res) {\n try {\n this$1._actionSubscribers\n .filter(function (sub) { return sub.after; })\n .forEach(function (sub) { return sub.after(action, this$1.state); });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"[vuex] error in after action subscribers: \");\n console.error(e);\n }\n }\n return res\n })\n};\n\nStore.prototype.subscribe = function subscribe (fn) {\n return genericSubscribe(fn, this._subscribers)\n};\n\nStore.prototype.subscribeAction = function subscribeAction (fn) {\n var subs = typeof fn === 'function' ? { before: fn } : fn;\n return genericSubscribe(subs, this._actionSubscribers)\n};\n\nStore.prototype.watch = function watch (getter, cb, options) {\n var this$1 = this;\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof getter === 'function', \"store.watch only accepts a function.\");\n }\n return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)\n};\n\nStore.prototype.replaceState = function replaceState (state) {\n var this$1 = this;\n\n this._withCommit(function () {\n this$1._vm._data.$$state = state;\n });\n};\n\nStore.prototype.registerModule = function registerModule (path, rawModule, options) {\n if ( options === void 0 ) options = {};\n\n if (typeof path === 'string') { path = [path]; }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n assert(path.length > 0, 'cannot register the root module by using registerModule.');\n }\n\n this._modules.register(path, rawModule);\n installModule(this, this.state, path, this._modules.get(path), options.preserveState);\n // reset store to update getters...\n resetStoreVM(this, this.state);\n};\n\nStore.prototype.unregisterModule = function unregisterModule (path) {\n var this$1 = this;\n\n if (typeof path === 'string') { path = [path]; }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(Array.isArray(path), \"module path must be a string or an Array.\");\n }\n\n this._modules.unregister(path);\n this._withCommit(function () {\n var parentState = getNestedState(this$1.state, path.slice(0, -1));\n Vue.delete(parentState, path[path.length - 1]);\n });\n resetStore(this);\n};\n\nStore.prototype.hotUpdate = function hotUpdate (newOptions) {\n this._modules.update(newOptions);\n resetStore(this, true);\n};\n\nStore.prototype._withCommit = function _withCommit (fn) {\n var committing = this._committing;\n this._committing = true;\n fn();\n this._committing = committing;\n};\n\nObject.defineProperties( Store.prototype, prototypeAccessors$1 );\n\nfunction genericSubscribe (fn, subs) {\n if (subs.indexOf(fn) < 0) {\n subs.push(fn);\n }\n return function () {\n var i = subs.indexOf(fn);\n if (i > -1) {\n subs.splice(i, 1);\n }\n }\n}\n\nfunction resetStore (store, hot) {\n store._actions = Object.create(null);\n store._mutations = Object.create(null);\n store._wrappedGetters = Object.create(null);\n store._modulesNamespaceMap = Object.create(null);\n var state = store.state;\n // init all modules\n installModule(store, state, [], store._modules.root, true);\n // reset vm\n resetStoreVM(store, state, hot);\n}\n\nfunction resetStoreVM (store, state, hot) {\n var oldVm = store._vm;\n\n // bind store public getters\n store.getters = {};\n var wrappedGetters = store._wrappedGetters;\n var computed = {};\n forEachValue(wrappedGetters, function (fn, key) {\n // use computed to leverage its lazy-caching mechanism\n // direct inline function use will lead to closure preserving oldVm.\n // using partial to return function with only arguments preserved in closure enviroment.\n computed[key] = partial(fn, store);\n Object.defineProperty(store.getters, key, {\n get: function () { return store._vm[key]; },\n enumerable: true // for local getters\n });\n });\n\n // use a Vue instance to store the state tree\n // suppress warnings just in case the user has added\n // some funky global mixins\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n store._vm = new Vue({\n data: {\n $$state: state\n },\n computed: computed\n });\n Vue.config.silent = silent;\n\n // enable strict mode for new vm\n if (store.strict) {\n enableStrictMode(store);\n }\n\n if (oldVm) {\n if (hot) {\n // dispatch changes in all subscribed watchers\n // to force getter re-evaluation for hot reloading.\n store._withCommit(function () {\n oldVm._data.$$state = null;\n });\n }\n Vue.nextTick(function () { return oldVm.$destroy(); });\n }\n}\n\nfunction installModule (store, rootState, path, module, hot) {\n var isRoot = !path.length;\n var namespace = store._modules.getNamespace(path);\n\n // register in namespace map\n if (module.namespaced) {\n store._modulesNamespaceMap[namespace] = module;\n }\n\n // set state\n if (!isRoot && !hot) {\n var parentState = getNestedState(rootState, path.slice(0, -1));\n var moduleName = path[path.length - 1];\n store._withCommit(function () {\n Vue.set(parentState, moduleName, module.state);\n });\n }\n\n var local = module.context = makeLocalContext(store, namespace, path);\n\n module.forEachMutation(function (mutation, key) {\n var namespacedType = namespace + key;\n registerMutation(store, namespacedType, mutation, local);\n });\n\n module.forEachAction(function (action, key) {\n var type = action.root ? key : namespace + key;\n var handler = action.handler || action;\n registerAction(store, type, handler, local);\n });\n\n module.forEachGetter(function (getter, key) {\n var namespacedType = namespace + key;\n registerGetter(store, namespacedType, getter, local);\n });\n\n module.forEachChild(function (child, key) {\n installModule(store, rootState, path.concat(key), child, hot);\n });\n}\n\n/**\n * make localized dispatch, commit, getters and state\n * if there is no namespace, just use root ones\n */\nfunction makeLocalContext (store, namespace, path) {\n var noNamespace = namespace === '';\n\n var local = {\n dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if (process.env.NODE_ENV !== 'production' && !store._actions[type]) {\n console.error((\"[vuex] unknown local action type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n return store.dispatch(type, payload)\n },\n\n commit: noNamespace ? store.commit : function (_type, _payload, _options) {\n var args = unifyObjectStyle(_type, _payload, _options);\n var payload = args.payload;\n var options = args.options;\n var type = args.type;\n\n if (!options || !options.root) {\n type = namespace + type;\n if (process.env.NODE_ENV !== 'production' && !store._mutations[type]) {\n console.error((\"[vuex] unknown local mutation type: \" + (args.type) + \", global type: \" + type));\n return\n }\n }\n\n store.commit(type, payload, options);\n }\n };\n\n // getters and state object must be gotten lazily\n // because they will be changed by vm update\n Object.defineProperties(local, {\n getters: {\n get: noNamespace\n ? function () { return store.getters; }\n : function () { return makeLocalGetters(store, namespace); }\n },\n state: {\n get: function () { return getNestedState(store.state, path); }\n }\n });\n\n return local\n}\n\nfunction makeLocalGetters (store, namespace) {\n var gettersProxy = {};\n\n var splitPos = namespace.length;\n Object.keys(store.getters).forEach(function (type) {\n // skip if the target getter is not match this namespace\n if (type.slice(0, splitPos) !== namespace) { return }\n\n // extract local getter type\n var localType = type.slice(splitPos);\n\n // Add a port to the getters proxy.\n // Define as getter property because\n // we do not want to evaluate the getters in this time.\n Object.defineProperty(gettersProxy, localType, {\n get: function () { return store.getters[type]; },\n enumerable: true\n });\n });\n\n return gettersProxy\n}\n\nfunction registerMutation (store, type, handler, local) {\n var entry = store._mutations[type] || (store._mutations[type] = []);\n entry.push(function wrappedMutationHandler (payload) {\n handler.call(store, local.state, payload);\n });\n}\n\nfunction registerAction (store, type, handler, local) {\n var entry = store._actions[type] || (store._actions[type] = []);\n entry.push(function wrappedActionHandler (payload, cb) {\n var res = handler.call(store, {\n dispatch: local.dispatch,\n commit: local.commit,\n getters: local.getters,\n state: local.state,\n rootGetters: store.getters,\n rootState: store.state\n }, payload, cb);\n if (!isPromise(res)) {\n res = Promise.resolve(res);\n }\n if (store._devtoolHook) {\n return res.catch(function (err) {\n store._devtoolHook.emit('vuex:error', err);\n throw err\n })\n } else {\n return res\n }\n });\n}\n\nfunction registerGetter (store, type, rawGetter, local) {\n if (store._wrappedGetters[type]) {\n if (process.env.NODE_ENV !== 'production') {\n console.error((\"[vuex] duplicate getter key: \" + type));\n }\n return\n }\n store._wrappedGetters[type] = function wrappedGetter (store) {\n return rawGetter(\n local.state, // local state\n local.getters, // local getters\n store.state, // root state\n store.getters // root getters\n )\n };\n}\n\nfunction enableStrictMode (store) {\n store._vm.$watch(function () { return this._data.$$state }, function () {\n if (process.env.NODE_ENV !== 'production') {\n assert(store._committing, \"do not mutate vuex store state outside mutation handlers.\");\n }\n }, { deep: true, sync: true });\n}\n\nfunction getNestedState (state, path) {\n return path.length\n ? path.reduce(function (state, key) { return state[key]; }, state)\n : state\n}\n\nfunction unifyObjectStyle (type, payload, options) {\n if (isObject(type) && type.type) {\n options = payload;\n payload = type;\n type = type.type;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof type === 'string', (\"expects string as the type, but found \" + (typeof type) + \".\"));\n }\n\n return { type: type, payload: payload, options: options }\n}\n\nfunction install (_Vue) {\n if (Vue && _Vue === Vue) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(\n '[vuex] already installed. Vue.use(Vuex) should be called only once.'\n );\n }\n return\n }\n Vue = _Vue;\n applyMixin(Vue);\n}\n\n/**\n * Reduce the code which written in Vue.js for getting the state.\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.\n * @param {Object}\n */\nvar mapState = normalizeNamespace(function (namespace, states) {\n var res = {};\n normalizeMap(states).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedState () {\n var state = this.$store.state;\n var getters = this.$store.getters;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapState', namespace);\n if (!module) {\n return\n }\n state = module.context.state;\n getters = module.context.getters;\n }\n return typeof val === 'function'\n ? val.call(this, state, getters)\n : state[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for committing the mutation\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapMutations = normalizeNamespace(function (namespace, mutations) {\n var res = {};\n normalizeMap(mutations).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedMutation () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // Get the commit method from store\n var commit = this.$store.commit;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);\n if (!module) {\n return\n }\n commit = module.context.commit;\n }\n return typeof val === 'function'\n ? val.apply(this, [commit].concat(args))\n : commit.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for getting the getters\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} getters\n * @return {Object}\n */\nvar mapGetters = normalizeNamespace(function (namespace, getters) {\n var res = {};\n normalizeMap(getters).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n // The namespace has been mutated by normalizeNamespace\n val = namespace + val;\n res[key] = function mappedGetter () {\n if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {\n return\n }\n if (process.env.NODE_ENV !== 'production' && !(val in this.$store.getters)) {\n console.error((\"[vuex] unknown getter: \" + val));\n return\n }\n return this.$store.getters[val]\n };\n // mark vuex getter for devtools\n res[key].vuex = true;\n });\n return res\n});\n\n/**\n * Reduce the code which written in Vue.js for dispatch the action\n * @param {String} [namespace] - Module's namespace\n * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.\n * @return {Object}\n */\nvar mapActions = normalizeNamespace(function (namespace, actions) {\n var res = {};\n normalizeMap(actions).forEach(function (ref) {\n var key = ref.key;\n var val = ref.val;\n\n res[key] = function mappedAction () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n // get dispatch function from store\n var dispatch = this.$store.dispatch;\n if (namespace) {\n var module = getModuleByNamespace(this.$store, 'mapActions', namespace);\n if (!module) {\n return\n }\n dispatch = module.context.dispatch;\n }\n return typeof val === 'function'\n ? val.apply(this, [dispatch].concat(args))\n : dispatch.apply(this.$store, [val].concat(args))\n };\n });\n return res\n});\n\n/**\n * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object\n * @param {String} namespace\n * @return {Object}\n */\nvar createNamespacedHelpers = function (namespace) { return ({\n mapState: mapState.bind(null, namespace),\n mapGetters: mapGetters.bind(null, namespace),\n mapMutations: mapMutations.bind(null, namespace),\n mapActions: mapActions.bind(null, namespace)\n}); };\n\n/**\n * Normalize the map\n * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]\n * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]\n * @param {Array|Object} map\n * @return {Object}\n */\nfunction normalizeMap (map) {\n return Array.isArray(map)\n ? map.map(function (key) { return ({ key: key, val: key }); })\n : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })\n}\n\n/**\n * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.\n * @param {Function} fn\n * @return {Function}\n */\nfunction normalizeNamespace (fn) {\n return function (namespace, map) {\n if (typeof namespace !== 'string') {\n map = namespace;\n namespace = '';\n } else if (namespace.charAt(namespace.length - 1) !== '/') {\n namespace += '/';\n }\n return fn(namespace, map)\n }\n}\n\n/**\n * Search a special module from store by namespace. if module not exist, print error message.\n * @param {Object} store\n * @param {String} helper\n * @param {String} namespace\n * @return {Object}\n */\nfunction getModuleByNamespace (store, helper, namespace) {\n var module = store._modulesNamespaceMap[namespace];\n if (process.env.NODE_ENV !== 'production' && !module) {\n console.error((\"[vuex] module namespace not found in \" + helper + \"(): \" + namespace));\n }\n return module\n}\n\nvar index_esm = {\n Store: Store,\n install: install,\n version: '3.1.1',\n mapState: mapState,\n mapMutations: mapMutations,\n mapGetters: mapGetters,\n mapActions: mapActions,\n createNamespacedHelpers: createNamespacedHelpers\n};\n\nexport default index_esm;\nexport { Store, install, mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers };\n","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode /* vue-cli only */\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = 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 = 'data-v-' + 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 = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\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 var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}\n","var e=function(){return(e=Object.assign||function(e){for(var t,r=1,s=arguments.length;r
1 && arguments[1] !== undefined ? arguments[1] : {};\n var $slots = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n // Returns true if the either a $scopedSlot or $slot exists with the specified name\n return Boolean($scopedSlots[name] || $slots[name]);\n};\n/**\n * Returns vNodes for named slot either scoped or unscoped\n *\n * @param {String} name\n * @param {String} scope\n * @param {Object} scopedSlots\n * @param {Object} slots\n * @returns {Array|undefined} vNodes\n */\n\n\nvar normalizeSlot = function normalizeSlot(name) {\n var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var $scopedSlots = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var $slots = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n // Note: in Vue 2.6.x, all names slots are also scoped slots\n var slot = $scopedSlots[name] || $slots[name];\n return isFunction(slot) ? slot(scope) : slot;\n}; // Named exports\n\n\nexport { hasNormalizedSlot, normalizeSlot }; // Default export (backwards compatibility)\n\nexport default normalizeSlot;","import { isArray, isObject } from './inspect';\n/**\n * Get property defined by dot/array notation in string.\n *\n * @link https://gist.github.com/jeneg/9767afdcca45601ea44930ea03e0febf#gistcomment-1935901\n *\n * @param {Object} obj\n * @param {string|Array} path\n * @param {*} defaultValue (optional)\n * @return {*}\n */\n\nvar get = function get(obj, path) {\n var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n // Handle array of path values\n path = isArray(path) ? path.join('.') : path; // If no path or no object passed\n\n if (!path || !isObject(obj)) {\n return defaultValue;\n } // Handle edge case where user has dot(s) in top-level item field key\n // See https://github.com/bootstrap-vue/bootstrap-vue/issues/2762\n // Switched to `in` operator vs `hasOwnProperty` to handle obj.prototype getters\n // https://github.com/bootstrap-vue/bootstrap-vue/issues/3463\n\n\n if (path in obj) {\n return obj[path];\n } // Handle string array notation (numeric indices only)\n\n\n path = String(path).replace(/\\[(\\d+)]/g, '.$1');\n var steps = path.split('.').filter(Boolean); // Handle case where someone passes a string of only dots\n\n if (steps.length === 0) {\n return defaultValue;\n } // Traverse path in object to find result\n // We use `!=` vs `!==` to test for both `null` and `undefined`\n // Switched to `in` operator vs `hasOwnProperty` to handle obj.prototype getters\n // https://github.com/bootstrap-vue/bootstrap-vue/issues/3463\n\n\n return steps.every(function (step) {\n return isObject(obj) && step in obj && (obj = obj[step]) != null;\n }) ? obj : defaultValue;\n};\n\nexport default get;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { MutationObs, isElement } from './dom';\nimport { warnNoMutationObserverSupport } from './warn';\n/**\n * Observe a DOM element changes, falls back to eventListener mode\n * @param {Element} el The DOM element to observe\n * @param {Function} callback callback to be called on change\n * @param {object} [opts={childList: true, subtree: true}] observe options\n * @see http://stackoverflow.com/questions/3219758\n */\n\nvar observeDom = function observeDom(el, callback, opts)\n/* istanbul ignore next: difficult to test in JSDOM */\n{\n // Handle cases where we might be passed a Vue instance\n el = el ? el.$el || el : null; // Early exit when we have no element\n\n /* istanbul ignore next: difficult to test in JSDOM */\n\n if (!isElement(el)) {\n return null;\n } // Exit and throw a warning when `MutationObserver` isn't available\n\n\n if (warnNoMutationObserverSupport('observeDom')) {\n return null;\n } // Define a new observer\n\n\n var obs = new MutationObs(function (mutations) {\n var changed = false; // A mutation can contain several change records, so we loop\n // through them to see what has changed\n // We break out of the loop early if any \"significant\" change\n // has been detected\n\n for (var i = 0; i < mutations.length && !changed; i++) {\n // The mutation record\n var mutation = mutations[i]; // Mutation type\n\n var type = mutation.type; // DOM node (could be any DOM node type - HTMLElement, Text, comment, etc.)\n\n var target = mutation.target; // Detect whether a change happened based on type and target\n\n if (type === 'characterData' && target.nodeType === Node.TEXT_NODE) {\n // We ignore nodes that are not TEXT (i.e. comments, etc)\n // as they don't change layout\n changed = true;\n } else if (type === 'attributes') {\n changed = true;\n } else if (type === 'childList' && (mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0)) {\n // This includes HTMLElement and text nodes being\n // added/removed/re-arranged\n changed = true;\n }\n } // We only call the callback if a change that could affect\n // layout/size truely happened\n\n\n if (changed) {\n callback();\n }\n }); // Have the observer observe foo for changes in children, etc\n\n obs.observe(el, _objectSpread({\n childList: true,\n subtree: true\n }, opts)); // We return a reference to the observer so that `obs.disconnect()`\n // can be called if necessary\n // To reduce overhead when the root element is hidden\n\n return obs;\n};\n\nexport default observeDom;","'use strict';\n\nvar utils = require('../utils');\nvar AxiosError = require('../core/AxiosError');\nvar envFormData = require('../env/classes/FormData');\n\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nvar predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\nfunction isSpecCompliant(thing) {\n return thing && utils.isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator];\n}\n\n/**\n * Convert a data object to FormData\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n * @returns {Object}\n **/\n\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (envFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n var metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n var visitor = options.visitor || defaultVisitor;\n var dots = options.dots;\n var indexes = options.indexes;\n var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n var useBlob = _Blob && isSpecCompliant(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n var arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n (utils.isFileList(value) || utils.endsWith(key, '[]') && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !utils.isUndefined(el) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n var stack = [];\n\n var exposedHelpers = Object.assign(predicates, {\n defaultVisitor: defaultVisitor,\n convertValue: convertValue,\n isVisitable: isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n var result = !utils.isUndefined(el) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nmodule.exports = toFormData;\n","'use strict';\n\nvar AxiosError = require('../core/AxiosError');\nvar utils = require('../utils');\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nmodule.exports = CanceledError;\n","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Vue from '../../utils/vue';\nimport { mergeData } from 'vue-functional-data-merge';\nimport { getComponentConfig } from '../../utils/config';\nimport { isEvent } from '../../utils/inspect';\nimport { hasNormalizedSlot, normalizeSlot } from '../../utils/normalize-slot';\nvar NAME = 'BButtonClose';\nvar props = {\n disabled: {\n type: Boolean,\n default: false\n },\n ariaLabel: {\n type: String,\n default: function _default() {\n return getComponentConfig(NAME, 'ariaLabel');\n }\n },\n textVariant: {\n type: String,\n default: function _default() {\n return getComponentConfig(NAME, 'textVariant');\n }\n } // @vue/component\n\n};\nexport var BButtonClose =\n/*#__PURE__*/\nVue.extend({\n name: NAME,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n listeners = _ref.listeners,\n slots = _ref.slots,\n scopedSlots = _ref.scopedSlots;\n var $slots = slots();\n var $scopedSlots = scopedSlots || {};\n var componentData = {\n staticClass: 'close',\n class: _defineProperty({}, \"text-\".concat(props.textVariant), props.textVariant),\n attrs: {\n type: 'button',\n disabled: props.disabled,\n 'aria-label': props.ariaLabel ? String(props.ariaLabel) : null\n },\n on: {\n click: function click(evt) {\n // Ensure click on button HTML content is also disabled\n\n /* istanbul ignore if: bug in JSDOM still emits click on inner element */\n if (props.disabled && isEvent(evt)) {\n evt.stopPropagation();\n evt.preventDefault();\n }\n }\n } // Careful not to override the default slot with innerHTML\n\n };\n\n if (!hasNormalizedSlot('default', $scopedSlots, $slots)) {\n componentData.domProps = {\n innerHTML: '×'\n };\n }\n\n return h('button', mergeData(data, componentData), normalizeSlot('default', {}, $scopedSlots, $slots));\n }\n});\nexport default BButtonClose;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Generic Bootstrap v4 fade (no-fade) transition component\nimport Vue from './vue';\nimport { mergeData } from 'vue-functional-data-merge';\nimport { isPlainObject } from './inspect';\nvar NO_FADE_PROPS = {\n name: '',\n enterClass: '',\n enterActiveClass: '',\n enterToClass: 'show',\n leaveClass: 'show',\n leaveActiveClass: '',\n leaveToClass: ''\n};\n\nvar FADE_PROPS = _objectSpread({}, NO_FADE_PROPS, {\n enterActiveClass: 'fade',\n leaveActiveClass: 'fade'\n});\n\nexport var BVTransition =\n/*#__PURE__*/\nVue.extend({\n name: 'BVTransition',\n functional: true,\n props: {\n noFade: {\n // Only applicable to the built in transition\n // Has no effect if `trans-props` provided\n type: Boolean,\n default: false\n },\n mode: {\n type: String // default: undefined\n\n },\n // For user supplied transitions (if needed)\n transProps: {\n type: Object,\n default: null\n }\n },\n render: function render(h, _ref) {\n var children = _ref.children,\n data = _ref.data,\n listeners = _ref.listeners,\n props = _ref.props;\n var transProps = props.transProps;\n\n if (!isPlainObject(transProps)) {\n transProps = props.noFade ? NO_FADE_PROPS : FADE_PROPS;\n }\n\n transProps = _objectSpread({\n mode: props.mode\n }, transProps, {\n // We always need `css` true\n css: true\n });\n return h('transition', // Any listeners will get merged here\n mergeData(data, {\n props: transProps\n }), children);\n }\n});\nexport default BVTransition;","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.16.1\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n\nvar timeoutDuration = function () {\n var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}();\n\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\n\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n var window = element.ownerDocument.defaultView;\n var css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n\n/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nfunction getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n var noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n var offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n var nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1;\n\n // Get common ancestor container\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer;\n\n // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n var element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\n\nfunction getWindowSizes(document) {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(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\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n var rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n } catch (e) {}\n\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n\n // subtract scrollbar size from sizes\n var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n var width = sizes.width || element.clientWidth || result.width;\n var height = sizes.height || element.clientHeight || result.height;\n\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var isIE10 = isIE(10);\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop);\n var marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n var scrollTop = !excludeScroll ? getScroll(html) : 0;\n var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n var parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n var el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n // NOTE: 1 DOM access here\n\n var boundaries = { top: 0, left: 0 };\n var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n var isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n\n return boundaries;\n}\n\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n var variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n var window = element.ownerDocument.defaultView;\n var styles = window.getComputedStyle(element);\n var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n var popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (var i = 0; i < prefixes.length; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nfunction getRoundedOffsets(data, shouldRound) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var round = Math.round,\n floor = Math.floor;\n\n var noRound = function noRound(v) {\n return v;\n };\n\n var referenceWidth = round(reference.width);\n var popperWidth = round(popper.width);\n\n var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n var isVariation = data.placement.indexOf('-') !== -1;\n var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n var verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right)\n };\n}\n\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper;\n\n // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n var styles = {\n position: popper.position\n };\n\n var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n var prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n var left = void 0,\n top = void 0;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n }\n\n // Attributes\n var attributes = {\n 'x-placement': data.placement\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n\n return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.
\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n var _data$offsets$arrow;\n\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n var arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.
\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n\n var flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n // flip the variation if required\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n // flips variation if popper content overflows boundaries\n var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);\n\n var flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n });\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var basePlacement = placement.split('-')[0];\n\n var offsets = void 0;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n var transformProp = getSupportedPropertyName('transform');\n var popperStyles = data.instance.popper.style; // assignment to help minification\n var top = popperStyles.top,\n left = popperStyles.left,\n transform = popperStyles[transformProp];\n\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n var order = options.priority;\n var popper = data.offsets.popper;\n\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n return defineProperty({}, mainSide, value);\n }\n };\n\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined\n }\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n };\n\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = _extends({}, Popper.Defaults, options);\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n })\n // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n });\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n var eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n\n }]);\n return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\nexport default Popper;\n//# sourceMappingURL=popper.js.map\n","/**\n * Issue #569: collapse::toggle::state triggered too many times\n * @link https://github.com/bootstrap-vue/bootstrap-vue/issues/569\n */\n// @vue/component\nexport default {\n methods: {\n /**\n * Safely register event listeners on the root Vue node.\n * While Vue automatically removes listeners for individual components,\n * when a component registers a listener on root and is destroyed,\n * this orphans a callback because the node is gone,\n * but the root does not clear the callback.\n *\n * When registering a $root listener, it also registers a listener on\n * the component's `beforeDestroy` hook to automatically remove the\n * event listener from the $root instance.\n *\n * @param {string} event\n * @param {function} callback\n * @chainable\n */\n listenOnRoot: function listenOnRoot(event, callback) {\n var _this = this;\n\n this.$root.$on(event, callback);\n this.$on('hook:beforeDestroy', function () {\n _this.$root.$off(event, callback);\n }); // Return this for easy chaining\n\n return this;\n },\n\n /**\n * Safely register a $once event listener on the root Vue node.\n * While Vue automatically removes listeners for individual components,\n * when a component registers a listener on root and is destroyed,\n * this orphans a callback because the node is gone,\n * but the root does not clear the callback.\n *\n * When registering a $root listener, it also registers a listener on\n * the component's `beforeDestroy` hook to automatically remove the\n * event listener from the $root instance.\n *\n * @param {string} event\n * @param {function} callback\n * @chainable\n */\n listenOnRootOnce: function listenOnRootOnce(event, callback) {\n var _this2 = this;\n\n this.$root.$once(event, callback);\n this.$on('hook:beforeDestroy', function () {\n _this2.$root.$off(event, callback);\n }); // Return this for easy chaining\n\n return this;\n },\n\n /**\n * Convenience method for calling vm.$emit on vm.$root.\n * @param {string} event\n * @param {*} args\n * @chainable\n */\n emitOnRoot: function emitOnRoot(event) {\n var _this$$root;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n (_this$$root = this.$root).$emit.apply(_this$$root, [event].concat(args)); // Return this for easy chaining\n\n\n return this;\n }\n }\n};","\r\nclass FBFSCookie {\r\n getCookie(cookieName) {\r\n let name = `${cookieName}=`;\r\n let decodedCookie = decodeURIComponent(document.cookie);\r\n let ca = decodedCookie.split(';');\r\n for (let i = 0; i < ca.length; i += 1) {\r\n let c = ca[i];\r\n\r\n while (c.charAt(0) === ' ') {\r\n c = c.substring(1);\r\n }\r\n\r\n if (c.indexOf(name) === 0) {\r\n return c.substring(name.length, c.length);\r\n }\r\n }\r\n return '';\r\n }\r\n\r\n setCookie(cookieName, cookieValue) {\r\n document.cookie = `${cookieName}=${cookieValue}`;\r\n }\r\n}\r\n\r\nmodule.exports = new FBFSCookie();","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(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\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n return;\n }\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nfunction arrayToObject() {\n var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n return fields.reduce(function (prev, path) {\n var key = path.split(\".\").slice(-1)[0];\n\n if (prev[key]) {\n throw new Error(\"The key `\".concat(key, \"` is already in use.\"));\n } // eslint-disable-next-line no-param-reassign\n\n\n prev[key] = path;\n return prev;\n }, {});\n}\n\nfunction objectEntries(obj) {\n return Object.keys(obj).map(function (key) {\n return [key, obj[key]];\n });\n}\n\nfunction normalizeNamespace(fn) {\n return function () {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n\n // eslint-disable-next-line prefer-const\n var _ref = typeof params[0] === \"string\" ? [].concat(params) : [\"\"].concat(params),\n _ref2 = _slicedToArray(_ref, 4),\n namespace = _ref2[0],\n map = _ref2[1],\n getterType = _ref2[2],\n mutationType = _ref2[3];\n\n if (namespace.length && namespace.charAt(namespace.length - 1) !== \"/\") {\n namespace += \"/\";\n }\n\n getterType = \"\".concat(namespace).concat(getterType || \"getField\");\n mutationType = \"\".concat(namespace).concat(mutationType || \"updateField\");\n return fn(namespace, map, getterType, mutationType);\n };\n}\n\nfunction getField(state) {\n return function (path) {\n return path.split(/[.[\\]]+/).reduce(function (prev, key) {\n return prev[key];\n }, state);\n };\n}\nfunction updateField(state, _ref3) {\n var path = _ref3.path,\n value = _ref3.value;\n path.split(/[.[\\]]+/).reduce(function (prev, key, index, array) {\n if (array.length === index + 1) {\n // eslint-disable-next-line no-param-reassign\n prev[key] = value;\n }\n\n return prev[key];\n }, state);\n}\nvar mapFields = normalizeNamespace(function (namespace, fields, getterType, mutationType) {\n var fieldsObject = Array.isArray(fields) ? arrayToObject(fields) : fields;\n return Object.keys(fieldsObject).reduce(function (prev, key) {\n var path = fieldsObject[key];\n var field = {\n get: function get() {\n return this.$store.getters[getterType](path);\n },\n set: function set(value) {\n this.$store.commit(mutationType, {\n path: path,\n value: value\n });\n }\n }; // eslint-disable-next-line no-param-reassign\n\n prev[key] = field;\n return prev;\n }, {});\n});\nvar mapMultiRowFields = normalizeNamespace(function (namespace, paths, getterType, mutationType) {\n var pathsObject = Array.isArray(paths) ? arrayToObject(paths) : paths;\n return Object.keys(pathsObject).reduce(function (entries, key) {\n var path = pathsObject[key]; // eslint-disable-next-line no-param-reassign\n\n entries[key] = {\n get: function get() {\n var store = this.$store;\n var rows = objectEntries(store.getters[getterType](path));\n return rows.map(function (fieldsObject) {\n return Object.keys(fieldsObject[1]).reduce(function (prev, fieldKey) {\n var fieldPath = \"\".concat(path, \"[\").concat(fieldsObject[0], \"].\").concat(fieldKey);\n return Object.defineProperty(prev, fieldKey, {\n get: function get() {\n return store.getters[getterType](fieldPath);\n },\n set: function set(value) {\n store.commit(mutationType, {\n path: fieldPath,\n value: value\n });\n }\n });\n }, {});\n });\n }\n };\n return entries;\n }, {});\n});\nvar createHelpers = function createHelpers(_ref4) {\n var _ref5;\n\n var getterType = _ref4.getterType,\n mutationType = _ref4.mutationType;\n return _ref5 = {}, _defineProperty(_ref5, getterType, getField), _defineProperty(_ref5, mutationType, updateField), _defineProperty(_ref5, \"mapFields\", normalizeNamespace(function (namespace, fields) {\n return mapFields(namespace, fields, getterType, mutationType);\n })), _defineProperty(_ref5, \"mapMultiRowFields\", normalizeNamespace(function (namespace, paths) {\n return mapMultiRowFields(namespace, paths, getterType, mutationType);\n })), _ref5;\n};\n\nexport { createHelpers, getField, mapFields, mapMultiRowFields, updateField };\n","/**\n * vee-validate v2.2.15\n * (c) 2019 Abdelrahman Awad\n * @license MIT\n */\n// \n\nvar isTextInput = function (el) {\n return includes(['text', 'password', 'search', 'email', 'tel', 'url', 'textarea', 'number'], el.type);\n};\n\nvar isCheckboxOrRadioInput = function (el) {\n return includes(['radio', 'checkbox'], el.type);\n};\n\nvar isDateInput = function (el) {\n return includes(['date', 'week', 'month', 'datetime-local', 'time'], el.type);\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\nvar isNaN$1 = function (value) {\n if ('isNaN' in Number) {\n return Number.isNaN(value);\n }\n\n // eslint-disable-next-line\n return typeof(value) === 'number' && value !== value;\n};\n\n/**\n * Checks if the values are either null or undefined.\n */\nvar isNullOrUndefined = function () {\n var values = [], len = arguments.length;\n while ( len-- ) values[ len ] = arguments[ len ];\n\n return values.every(function (value) {\n return value === null || value === undefined;\n });\n};\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 changed: 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 if (isNaN$1(lhs) && isNaN$1(rhs)) {\n return true;\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)) {\n var form = getForm(el);\n\n if (form) {\n scope = getDataAttribute(form, 'scope');\n }\n }\n\n return !isNullOrUndefined(scope) ? scope : null;\n};\n\n/**\n * Get the closest form element.\n */\nvar getForm = function (el) {\n if (isNullOrUndefined(el)) { return null; }\n\n if (el.tagName === 'FORM') { return el; }\n\n if (!isNullOrUndefined(el.form)) { return el.form; }\n\n return !isNullOrUndefined(el.parentNode) ? getForm(el.parentNode) : 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 (prop in value) {\n value = value[prop];\n\n return true;\n }\n\n value = def;\n\n return false;\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 var previousPath = null;\n var isNullOrNonObject = false;\n var isValidPath = path.split('.').reduce(function (reducer, prop) {\n if (obj == null || typeof obj !== 'object') {\n isNullOrNonObject = true;\n return reducer && false;\n }\n\n if (prop in obj) {\n obj = obj[prop];\n previousPath = previousPath === null ? prop : previousPath + '.' + prop;\n\n return reducer && true;\n }\n\n return reducer && false;\n }, true);\n\n if (process.env.NODE_ENV !== 'production') {\n if (isNullOrNonObject) {\n throw new Error(previousPath + ' is not an object');\n }\n }\n\n return isValidPath;\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 (includes(rule, ':')) {\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, token) {\n if ( wait === void 0 ) wait = 0;\n if ( token === void 0 ) token = { cancelled: 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\n // check if the fn call was cancelled.\n if (!token.cancelled) { fn.apply(void 0, args); }\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (!timeout) { fn.apply(void 0, args); }\n };\n};\n\n/**\n * Appends a rule definition to a list of rules.\n */\nvar appendRule = function (rule, rules) {\n if (!rules) {\n return normalizeRules(rule);\n }\n\n if (!rule) {\n return normalizeRules(rules);\n }\n\n if (typeof rules === 'string') {\n rules = normalizeRules(rules);\n }\n\n return assign({}, rules, normalizeRules(rule));\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 if (isObject(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 (Array.isArray(className)) {\n className.forEach(function (item) { return toggleClass(el, item, status); });\n return;\n }\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 /* istanbul ignore next */\n for (var i = 0; i < length; i++) {\n array.push(arrayLike[i]);\n }\n\n /* istanbul ignore next */\n return array;\n};\n\n/**\n * Converts an array-like object to array and place other elements in an array\n */\nvar ensureArray = function (arrayLike) {\n if (Array.isArray(arrayLike)) {\n return [].concat( arrayLike );\n }\n var array = toArray(arrayLike);\n return isEmptyArray(array) ? [arrayLike] : 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\nvar findIndex = 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 i;\n }\n }\n\n return -1;\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 var idx = findIndex(array, predicate);\n\n return idx === -1 ? undefined : array[idx];\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 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 var obj, obj$1;\n\n if (isObject(source[key])) {\n if (! target[key]) {\n assign(target, ( obj = {}, obj[key] = {}, 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 });\n\n return target;\n};\n\nvar fillRulesFromElement = function (el, rules) {\n if (el.required) {\n rules = appendRule('required', rules);\n }\n\n if (isTextInput(el)) {\n if (el.type === 'email') {\n rules = appendRule((\"email\" + (el.multiple ? ':multiple' : '')), rules);\n }\n\n if (el.pattern) {\n rules = appendRule({ regex: el.pattern }, rules);\n }\n\n // 524288 is the max on some browsers and test environments.\n if (el.maxLength >= 0 && el.maxLength < 524288) {\n rules = appendRule((\"max:\" + (el.maxLength)), rules);\n }\n\n if (el.minLength > 0) {\n rules = appendRule((\"min:\" + (el.minLength)), rules);\n }\n\n if (el.type === 'number') {\n rules = appendRule('decimal', rules);\n if (el.min !== '') {\n rules = appendRule((\"min_value:\" + (el.min)), rules);\n }\n\n if (el.max !== '') {\n rules = appendRule((\"max_value:\" + (el.max)), rules);\n }\n }\n\n return rules;\n }\n\n if (isDateInput(el)) {\n var timeFormat = el.step && Number(el.step) < 60 ? 'HH:mm:ss' : 'HH:mm';\n\n if (el.type === 'date') {\n return appendRule('date_format:yyyy-MM-dd', rules);\n }\n\n if (el.type === 'datetime-local') {\n return appendRule((\"date_format:yyyy-MM-ddT\" + timeFormat), rules);\n }\n\n if (el.type === 'month') {\n return appendRule('date_format:yyyy-MM', rules);\n }\n\n if (el.type === 'week') {\n return appendRule('date_format:yyyy-[W]WW', rules);\n }\n\n if (el.type === 'time') {\n return appendRule((\"date_format:\" + timeFormat), rules);\n }\n }\n\n return rules;\n};\n\nvar values = function (obj) {\n if (isCallable(Object.values)) {\n return Object.values(obj);\n }\n\n // fallback to keys()\n /* istanbul ignore next */\n return Object.keys(obj).map(function (k) { return obj[k]; });\n};\n\nvar parseSelector = function (selector) {\n var rule = null;\n if (includes(selector, ':')) {\n rule = selector.split(':').pop();\n selector = selector.replace((\":\" + rule), '');\n }\n\n if (selector[0] === '#') {\n return {\n id: selector.slice(1),\n rule: rule,\n name: null,\n scope: null\n };\n }\n\n var scope = null;\n var name = selector;\n if (includes(selector, '.')) {\n var parts = selector.split('.');\n scope = parts[0];\n name = parts.slice(1).join('.');\n }\n\n return {\n id: null,\n scope: scope,\n name: name,\n rule: rule\n };\n};\n\nvar includes = function (collection, item) {\n return collection.indexOf(item) !== -1;\n};\n\nvar isEmptyArray = function (arr) {\n return Array.isArray(arr) && arr.length === 0;\n};\n\nvar defineNonReactive = function (obj, prop, value) {\n Object.defineProperty(obj, prop, {\n configurable: false,\n writable: true,\n value: value\n });\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 = { locale: { configurable: true } };\n\nprototypeAccessors.locale.get = function () {\n return LOCALE;\n};\n\nprototypeAccessors.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 if (!this.container[locale].messages) {\n this.container[locale].messages = {};\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 );\n\nvar drivers = {\n default: new Dictionary({\n en: {\n messages: {},\n attributes: {},\n custom: {}\n }\n })\n};\n\nvar currentDriver = 'default';\n\nvar DictionaryResolver = function DictionaryResolver () {};\n\nDictionaryResolver._checkDriverName = function _checkDriverName (driver) {\n if (!driver) {\n throw createError('you must provide a name to the dictionary driver');\n }\n};\n\nDictionaryResolver.setDriver = function setDriver (driver, implementation) {\n if ( implementation === void 0 ) implementation = null;\n\n this._checkDriverName(driver);\n if (implementation) {\n drivers[driver] = implementation;\n }\n\n currentDriver = driver;\n};\n\nDictionaryResolver.getDriver = function getDriver () {\n return drivers[currentDriver];\n};\n\n// \n\nvar ErrorBag = function ErrorBag (errorBag, id) {\n if ( errorBag === void 0 ) errorBag = null;\n if ( id === void 0 ) id = null;\n\n this.vmId = id || null;\n // make this bag a mirror of the provided one, sharing the same items reference.\n if (errorBag && errorBag instanceof ErrorBag) {\n this.items = errorBag.items;\n } else {\n this.items = [];\n }\n};\n\nErrorBag.prototype[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] = function () {\n var this$1 = this;\n\n var index = 0;\n return {\n next: function () {\n return { value: this$1.items[index++], done: index > this$1.items.length };\n }\n };\n};\n\n/**\n * Adds an error to the internal array.\n */\nErrorBag.prototype.add = function add (error) {\n var ref;\n\n (ref = this.items).push.apply(\n ref, this._normalizeError(error)\n );\n};\n\n/**\n * Normalizes passed errors to an error array.\n */\nErrorBag.prototype._normalizeError = function _normalizeError (error) {\n var this$1 = this;\n\n if (Array.isArray(error)) {\n return error.map(function (e) {\n e.scope = !isNullOrUndefined(e.scope) ? e.scope : null;\n e.vmId = !isNullOrUndefined(e.vmId) ? e.vmId : (this$1.vmId || null);\n\n return e;\n });\n }\n\n error.scope = !isNullOrUndefined(error.scope) ? error.scope : null;\n error.vmId = !isNullOrUndefined(error.vmId) ? error.vmId : (this.vmId || null);\n\n return [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 var this$1 = this;\n\n var filterFn = function (item) {\n var matchesScope = true;\n var matchesVM = true;\n if (!isNullOrUndefined(scope)) {\n matchesScope = item.scope === scope;\n }\n\n if (!isNullOrUndefined(this$1.vmId)) {\n matchesVM = item.vmId === this$1.vmId;\n }\n\n return matchesVM && matchesScope;\n };\n\n return this.items.filter(filterFn).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 var this$1 = this;\n\n var filterFn = function (item) {\n var matchesScope = true;\n var matchesVM = true;\n if (!isNullOrUndefined(scope)) {\n matchesScope = item.scope === scope;\n }\n\n if (!isNullOrUndefined(this$1.vmId)) {\n matchesVM = item.vmId === this$1.vmId;\n }\n\n return matchesVM && matchesScope;\n };\n\n return !!this.items.filter(filterFn).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 var matchesVM = isNullOrUndefined(this.vmId) ? function () { return true; } : function (i) { return i.vmId === this$1.vmId; };\n var matchesScope = function (i) { return i.scope === scope; };\n if (arguments.length === 0) {\n matchesScope = function () { return true; };\n } else if (isNullOrUndefined(scope)) {\n scope = null;\n }\n\n for (var i = 0; i < this.items.length; ++i) {\n if (matchesVM(this.items[i]) && matchesScope(this.items[i])) {\n this.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 var this$1 = this;\n if ( map === void 0 ) map = true;\n\n var isSingleField = !isNullOrUndefined(field) && !field.includes('*');\n var groupErrors = function (items) {\n var errors = items.reduce(function (collection, error) {\n if (!isNullOrUndefined(this$1.vmId) && error.vmId !== this$1.vmId) {\n return collection;\n }\n\n if (!collection[error.field]) {\n collection[error.field] = [];\n }\n\n collection[error.field].push(map ? error.msg : error);\n\n return collection;\n }, {});\n\n // reduce the collection to be a single array.\n if (isSingleField) {\n return values(errors)[0] || [];\n }\n\n return errors;\n };\n\n if (isNullOrUndefined(field)) {\n return groupErrors(this.items);\n }\n\n var selector = isNullOrUndefined(scope) ? String(field) : (scope + \".\" + field);\n var ref = this._makeCandidateFilters(selector);\n var isPrimary = ref.isPrimary;\n var isAlt = ref.isAlt;\n\n var collected = this.items.reduce(function (prev, curr) {\n if (isPrimary(curr)) {\n prev.primary.push(curr);\n }\n\n if (isAlt(curr)) {\n prev.alt.push(curr);\n }\n\n return prev;\n }, { primary: [], alt: [] });\n\n collected = collected.primary.length ? collected.primary : collected.alt;\n\n return groupErrors(collected);\n};\n\n/**\n * Gets the internal array length.\n */\nErrorBag.prototype.count = function count () {\n var this$1 = this;\n\n if (this.vmId) {\n return this.items.filter(function (e) { return e.vmId === this$1.vmId; }).length;\n }\n\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 : undefined;\n};\n\n/**\n * Gets the first error message for a specific field.\n */\nErrorBag.prototype.first = function first (field, scope) {\n if ( scope === void 0 ) scope = null;\n\n var selector = isNullOrUndefined(scope) ? field : (scope + \".\" + field);\n var match = this._match(selector);\n\n return match && match.msg;\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) || undefined;\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) || undefined;\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) || undefined;\n};\n\n/**\n * Removes errors by matching against the id or ids.\n */\nErrorBag.prototype.removeById = function removeById (id) {\n var condition = function (item) { return item.id === id; };\n if (Array.isArray(id)) {\n condition = function (item) { return id.indexOf(item.id) !== -1; };\n }\n\n for (var i = 0; i < this.items.length; ++i) {\n if (condition(this.items[i])) {\n this.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, vmId) {\n if (isNullOrUndefined(field)) {\n return;\n }\n\n var selector = isNullOrUndefined(scope) ? String(field) : (scope + \".\" + field);\n var ref = this._makeCandidateFilters(selector);\n var isPrimary = ref.isPrimary;\n var isAlt = ref.isAlt;\n var matches = function (item) { return isPrimary(item) || isAlt(item); };\n var shouldRemove = function (item) {\n if (isNullOrUndefined(vmId)) { return matches(item); }\n\n return matches(item) && item.vmId === vmId;\n };\n\n for (var i = 0; i < this.items.length; ++i) {\n if (shouldRemove(this.items[i])) {\n this.items.splice(i, 1);\n --i;\n }\n }\n};\n\nErrorBag.prototype._makeCandidateFilters = function _makeCandidateFilters (selector) {\n var this$1 = this;\n\n var matchesRule = function () { return true; };\n var matchesScope = function () { return true; };\n var matchesName = function () { return true; };\n var matchesVM = function () { return true; };\n\n var ref = parseSelector(selector);\n var id = ref.id;\n var rule = ref.rule;\n var scope = ref.scope;\n var name = ref.name;\n\n if (rule) {\n matchesRule = function (item) { return item.rule === rule; };\n }\n\n // match by id, can be combined with rule selection.\n if (id) {\n return {\n isPrimary: function (item) { return matchesRule(item) && (function (item) { return id === item.id; }); },\n isAlt: function () { return false; }\n };\n }\n\n if (isNullOrUndefined(scope)) {\n // if no scope specified, make sure the found error has no scope.\n matchesScope = function (item) { return isNullOrUndefined(item.scope); };\n } else {\n matchesScope = function (item) { return item.scope === scope; };\n }\n\n if (!isNullOrUndefined(name) && name !== '*') {\n matchesName = function (item) { return item.field === name; };\n }\n\n if (!isNullOrUndefined(this.vmId)) {\n matchesVM = function (item) { return item.vmId === this$1.vmId; };\n }\n\n // matches the first candidate.\n var isPrimary = function (item) {\n return matchesVM(item) && matchesName(item) && matchesRule(item) && matchesScope(item);\n };\n\n // matches a second candidate, which is a field with a name containing the '.' character.\n var isAlt = function (item) {\n return matchesVM(item) && matchesRule(item) && item.field === (scope + \".\" + name);\n };\n\n return {\n isPrimary: isPrimary,\n isAlt: isAlt\n };\n};\n\nErrorBag.prototype._match = function _match (selector) {\n if (isNullOrUndefined(selector)) {\n return undefined;\n }\n\n var ref = this._makeCandidateFilters(selector);\n var isPrimary = ref.isPrimary;\n var isAlt = ref.isAlt;\n\n return this.items.reduce(function (prev, item, idx, arr) {\n var isLast = idx === arr.length - 1;\n if (prev.primary) {\n return isLast ? prev.primary : prev;\n }\n\n if (isPrimary(item)) {\n prev.primary = item;\n }\n\n if (isAlt(item)) {\n prev.alt = item;\n }\n\n // keep going.\n if (!isLast) {\n return prev;\n }\n\n return prev.primary || prev.alt;\n }, {});\n};\n\nvar DEFAULT_CONFIG = {\n locale: 'en',\n delay: 0,\n errorBagName: 'errors',\n dictionary: null,\n fieldsBagName: 'fields',\n classes: false,\n classNames: null,\n events: 'input',\n inject: true,\n fastExit: true,\n aria: true,\n validity: false,\n mode: 'aggressive',\n useConstraintAttrs: true,\n i18n: null,\n i18nRootKey: 'validation'\n};\n\nvar currentConfig = assign({}, DEFAULT_CONFIG);\n\nvar resolveConfig = function (ctx) {\n var selfConfig = getPath('$options.$_veeValidate', ctx, {});\n\n return assign({}, currentConfig, selfConfig);\n};\n\nvar getConfig = function () { return currentConfig; };\n\nvar setConfig = function (newConf) {\n currentConfig = assign({}, currentConfig, newConf);\n};\n\n// VNode Utils\n\n// Gets the model object on the vnode.\nfunction findModel (vnode) {\n if (!vnode.data) {\n return null;\n }\n\n // Component Model\n if (vnode.data.model) {\n return vnode.data.model;\n }\n\n return !!(vnode.data.directives) && find(vnode.data.directives, function (d) { return d.name === 'model'; });\n}\n\nfunction extractChildren (vnode) {\n if (Array.isArray(vnode)) {\n return vnode;\n }\n\n if (Array.isArray(vnode.children)) {\n return vnode.children;\n }\n\n if (vnode.componentOptions && Array.isArray(vnode.componentOptions.children)) {\n return vnode.componentOptions.children;\n }\n\n return [];\n}\n\nfunction extractVNodes (vnode) {\n if (findModel(vnode)) {\n return [vnode];\n }\n\n var children = extractChildren(vnode);\n\n return children.reduce(function (nodes, node) {\n var candidates = extractVNodes(node);\n if (candidates.length) {\n nodes.push.apply(nodes, candidates);\n }\n\n return nodes;\n }, []);\n}\n\n// Resolves v-model config if exists.\nfunction findModelConfig (vnode) {\n if (!vnode.componentOptions) { return null; }\n\n return vnode.componentOptions.Ctor.options.model;\n}\n// Adds a listener to vnode listener object.\nfunction mergeVNodeListeners (obj, eventName, handler) {\n // Has a single listener, convert to array.\n if (isCallable(obj[eventName])) {\n var prevHandler = obj[eventName];\n obj[eventName] = [prevHandler];\n }\n\n // no listeners, create the array.\n if (isNullOrUndefined(obj[eventName])) {\n obj[eventName] = [];\n }\n\n obj[eventName].push(handler);\n}\n\n// Adds a listener to a native HTML vnode.\nfunction addNativeNodeListener (node, eventName, handler) {\n if (isNullOrUndefined(node.data.on)) {\n node.data.on = {};\n }\n\n mergeVNodeListeners(node.data.on, eventName, handler);\n}\n\n// Adds a listener to a Vue component vnode.\nfunction addComponentNodeListener (node, eventName, handler) {\n /* istanbul ignore next */\n if (!node.componentOptions.listeners) {\n node.componentOptions.listeners = {};\n }\n\n mergeVNodeListeners(node.componentOptions.listeners, eventName, handler);\n}\nfunction addVNodeListener (vnode, eventName, handler) {\n if (vnode.componentOptions) {\n addComponentNodeListener(vnode, eventName, handler);\n return;\n }\n\n addNativeNodeListener(vnode, eventName, handler);\n}\n// Determines if `change` should be used over `input` for listeners.\nfunction getInputEventName (vnode, model) {\n // Is a component.\n if (vnode.componentOptions) {\n var ref = findModelConfig(vnode) || { event: 'input' };\n var event = ref.event;\n\n return event;\n }\n\n // Lazy Models and select tag typically use change event\n if ((model && model.modifiers && model.modifiers.lazy) || vnode.tag === 'select') {\n return 'change';\n }\n\n // is a textual-type input.\n if (vnode.data.attrs && isTextInput({ type: vnode.data.attrs.type || 'text' })) {\n return 'input';\n }\n\n return 'change';\n}\n\nfunction normalizeSlots (slots, ctx) {\n return Object.keys(slots).reduce(function (arr, key) {\n slots[key].forEach(function (vnode) {\n if (!vnode.context) {\n slots[key].context = ctx;\n if (!vnode.data) {\n vnode.data = {};\n }\n vnode.data.slot = key;\n }\n });\n\n return arr.concat(slots[key]);\n }, []);\n}\nfunction createRenderless (h, children) {\n // Only render the first item of the node.\n if (Array.isArray(children) && children[0]) {\n return children[0];\n }\n\n // a single node.\n if (children) {\n return children;\n }\n\n // No slots, render nothing.\n return h();\n}\n\n/**\n * Generates the options required to construct a field.\n */\nvar Resolver = function Resolver () {};\n\nResolver.generate = function generate (el, binding, vnode) {\n var model = Resolver.resolveModel(binding, vnode);\n var options = resolveConfig(vnode.context);\n\n return {\n name: Resolver.resolveName(el, vnode),\n el: el,\n listen: !binding.modifiers.disable,\n bails: binding.modifiers.bails ? true : (binding.modifiers.continues === true ? false : undefined),\n scope: Resolver.resolveScope(el, binding, vnode),\n vm: vnode.context,\n expression: binding.value,\n component: vnode.componentInstance,\n classes: options.classes,\n classNames: options.classNames,\n getter: Resolver.resolveGetter(el, vnode, model),\n events: Resolver.resolveEvents(el, vnode) || options.events,\n model: model,\n delay: Resolver.resolveDelay(el, vnode, options),\n rules: Resolver.resolveRules(el, binding, vnode),\n immediate: !!binding.modifiers.initial || !!binding.modifiers.immediate,\n persist: !!binding.modifiers.persist,\n validity: options.validity && !vnode.componentInstance,\n aria: options.aria && !vnode.componentInstance,\n initialValue: Resolver.resolveInitialValue(vnode)\n };\n};\n\nResolver.getCtorConfig = function getCtorConfig (vnode) {\n if (!vnode.componentInstance) { return null; }\n\n var config = getPath('componentInstance.$options.$_veeValidate', vnode);\n\n return config;\n};\n\n/**\n * Resolves the rules defined on an element.\n */\nResolver.resolveRules = function resolveRules (el, binding, vnode) {\n var rules = '';\n if (!binding.value && (!binding || !binding.expression)) {\n rules = getDataAttribute(el, 'rules');\n }\n\n if (binding.value && includes(['string', 'object'], typeof binding.value.rules)) {\n rules = binding.value.rules;\n } else if (binding.value) {\n rules = binding.value;\n }\n\n if (vnode.componentInstance) {\n return rules;\n }\n\n // If validity is disabled, ignore field rules.\n var normalized = normalizeRules(rules);\n if (!getConfig().useConstraintAttrs) {\n return normalized;\n }\n\n return assign({}, fillRulesFromElement(el, {}), normalized);\n};\n\n/**\n * @param {*} vnode\n */\nResolver.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 * Resolves the delay value.\n * @param {*} el\n * @param {*} vnode\n * @param {Object} options\n */\nResolver.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.componentInstance && vnode.componentInstance.$attrs) {\n delay = vnode.componentInstance.$attrs['data-vv-delay'];\n }\n\n if (!isObject(globalDelay)) {\n return deepParseInt(delay || globalDelay);\n }\n\n if (!isNullOrUndefined(delay)) {\n globalDelay.input = delay;\n }\n\n return deepParseInt(globalDelay);\n};\n\n/**\n * Resolves the events to validate in response to.\n * @param {*} el\n * @param {*} vnode\n */\nResolver.resolveEvents = function resolveEvents (el, vnode) {\n // resolve it from the root element.\n var events = getDataAttribute(el, 'validate-on');\n\n // resolve from data-vv-validate-on if its a vue component.\n if (!events && vnode.componentInstance && vnode.componentInstance.$attrs) {\n events = vnode.componentInstance.$attrs['data-vv-validate-on'];\n }\n\n // resolve it from $_veeValidate options.\n if (!events && vnode.componentInstance) {\n var config = Resolver.getCtorConfig(vnode);\n events = config && config.events;\n }\n\n if (!events && getConfig().events) {\n events = getConfig().events;\n }\n\n // resolve the model event if its configured for custom components.\n if (events && vnode.componentInstance && includes(events, 'input')) {\n var ref = vnode.componentInstance.$options.model || { event: 'input' };\n var event = ref.event;\n // if the prop was configured but not the model.\n if (!event) {\n return events;\n }\n\n events = events.replace('input', event);\n }\n\n return events;\n};\n\n/**\n * Resolves the scope for the field.\n * @param {*} el\n * @param {*} binding\n */\nResolver.resolveScope = function resolveScope (el, binding, vnode) {\n if ( vnode === void 0 ) vnode = {};\n\n var scope = null;\n if (vnode.componentInstance && isNullOrUndefined(scope)) {\n scope = vnode.componentInstance.$attrs && vnode.componentInstance.$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 */\nResolver.resolveModel = function resolveModel (binding, vnode) {\n if (binding.arg) {\n return { expression: binding.arg };\n }\n\n var model = findModel(vnode);\n if (!model) {\n return null;\n }\n\n // https://github.com/vuejs/vue/blob/dev/src/core/util/lang.js#L26\n var watchable = !/[^\\w.$]/.test(model.expression) && hasPath(model.expression, vnode.context);\n var lazy = !!(model.modifiers && model.modifiers.lazy);\n\n if (!watchable) {\n return { expression: null, lazy: lazy };\n }\n\n return { expression: model.expression, lazy: lazy };\n};\n\n/**\n * Resolves the field name to trigger validations.\n * @return {String} The field name.\n */\nResolver.resolveName = function resolveName (el, vnode) {\n var name = getDataAttribute(el, 'name');\n\n if (!name && !vnode.componentInstance) {\n return el.name;\n }\n\n if (!name && vnode.componentInstance && vnode.componentInstance.$attrs) {\n name = vnode.componentInstance.$attrs['data-vv-name'] || vnode.componentInstance.$attrs['name'];\n }\n\n if (!name && vnode.componentInstance) {\n var config = Resolver.getCtorConfig(vnode);\n if (config && isCallable(config.name)) {\n var boundGetter = config.name.bind(vnode.componentInstance);\n\n return boundGetter();\n }\n\n return vnode.componentInstance.name;\n }\n\n return name;\n};\n\n/**\n * Returns a value getter input type.\n */\nResolver.resolveGetter = function resolveGetter (el, vnode, model) {\n if (model && model.expression) {\n return function () {\n return getPath(model.expression, vnode.context);\n };\n }\n\n if (vnode.componentInstance) {\n var path = getDataAttribute(el, 'value-path') || (vnode.componentInstance.$attrs && vnode.componentInstance.$attrs['data-vv-value-path']);\n if (path) {\n return function () {\n return getPath(path, vnode.componentInstance);\n };\n }\n\n var config = Resolver.getCtorConfig(vnode);\n if (config && isCallable(config.value)) {\n var boundGetter = config.value.bind(vnode.componentInstance);\n\n return function () {\n return boundGetter();\n };\n }\n\n var ref = vnode.componentInstance.$options.model || { prop: 'value' };\n var prop = ref.prop;\n\n return function () {\n return vnode.componentInstance[prop];\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\nvar RULES = {};\n\nvar RuleContainer = function RuleContainer () {};\n\nvar staticAccessors = { rules: { configurable: true } };\n\nRuleContainer.add = function add (name, ref) {\n var validate = ref.validate;\n var options = ref.options;\n var paramNames = ref.paramNames;\n\n RULES[name] = {\n validate: validate,\n options: options,\n paramNames: paramNames\n };\n};\n\nstaticAccessors.rules.get = function () {\n return RULES;\n};\n\nRuleContainer.has = function has (name) {\n return !!RULES[name];\n};\n\nRuleContainer.isImmediate = function isImmediate (name) {\n return !!(RULES[name] && RULES[name].options.immediate);\n};\n\nRuleContainer.isRequireRule = function isRequireRule (name) {\n return !!(RULES[name] && RULES[name].options.computesRequired);\n};\n\nRuleContainer.isTargetRule = function isTargetRule (name) {\n return !!(RULES[name] && RULES[name].options.hasTarget);\n};\n\nRuleContainer.remove = function remove (ruleName) {\n delete RULES[ruleName];\n};\n\nRuleContainer.getParamNames = function getParamNames (ruleName) {\n return RULES[ruleName] && RULES[ruleName].paramNames;\n};\n\nRuleContainer.getOptions = function getOptions (ruleName) {\n return RULES[ruleName] && RULES[ruleName].options;\n};\n\nRuleContainer.getValidatorMethod = function getValidatorMethod (ruleName) {\n return RULES[ruleName] ? RULES[ruleName].validate : null;\n};\n\nObject.defineProperties( RuleContainer, staticAccessors );\n\n// \n\nvar isEvent = function (evt) {\n return (typeof Event !== 'undefined' && isCallable(Event) && evt instanceof Event) || (evt && evt.srcElement);\n};\n\nvar normalizeEvents = function (evts) {\n if (!evts) { return []; }\n\n return (typeof evts === 'string' ? evts.split('|') : evts);\n};\n\nvar supportsPassive = true;\n\nvar detectPassiveSupport = function () {\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get () {\n supportsPassive = true;\n }\n });\n window.addEventListener('testPassive', null, opts);\n window.removeEventListener('testPassive', null, opts);\n } catch (e) {\n supportsPassive = false;\n }\n return supportsPassive;\n};\n\nvar addEventListener = function (el, eventName, cb) {\n el.addEventListener(eventName, cb, supportsPassive ? { passive: true } : false);\n};\n\n// \n\nvar DEFAULT_OPTIONS = {\n targetOf: null,\n immediate: false,\n persist: 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 (options) {\n if ( options === void 0 ) options = {};\n\n this.id = uniqId();\n this.el = options.el;\n this.updated = false;\n this.vmId = options.vmId;\n defineNonReactive(this, 'dependencies', []);\n defineNonReactive(this, 'watchers', []);\n defineNonReactive(this, 'events', []);\n this.delay = 0;\n this.rules = {};\n this.forceRequired = false;\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 = options.flags || createFlags();\n defineNonReactive(this, 'vm', options.vm);\n defineNonReactive(this, 'componentInstance', options.component);\n this.ctorConfig = this.componentInstance ? getPath('$options.$_veeValidate', this.componentInstance) : undefined;\n this.update(options);\n // set initial value.\n this.initialValue = this.value;\n this.updated = false;\n};\n\nvar prototypeAccessors$1 = { validator: { configurable: true },isRequired: { configurable: true },isDisabled: { configurable: true },alias: { configurable: true },value: { configurable: true },bails: { configurable: true },rejectsFalse: { configurable: true } };\n\nprototypeAccessors$1.validator.get = function () {\n if (!this.vm || !this.vm.$validator) {\n return { validate: function () { return Promise.resolve(true); } };\n }\n\n return this.vm.$validator;\n};\n\nprototypeAccessors$1.isRequired.get = function () {\n return !!this.rules.required || this.forceRequired;\n};\n\nprototypeAccessors$1.isDisabled.get = function () {\n return !!(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.ctorConfig && this.ctorConfig.alias) {\n alias = isCallable(this.ctorConfig.alias) ? this.ctorConfig.alias.call(this.componentInstance) : this.ctorConfig.alias;\n }\n\n if (!alias && this.el) {\n alias = getDataAttribute(this.el, 'as');\n }\n\n if (!alias && this.componentInstance) {\n return this.componentInstance.$attrs && this.componentInstance.$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\nprototypeAccessors$1.bails.get = function () {\n return this._bails;\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.componentInstance && 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 var this$1 = this;\n\n if (!options) {\n return true;\n }\n\n if (options.id) {\n return this.id === options.id;\n }\n\n var matchesComponentId = isNullOrUndefined(options.vmId) ? function () { return true; } : function (id) { return id === this$1.vmId; };\n if (!matchesComponentId(options.vmId)) {\n return false;\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 this.el._veeValidateId = this.id;\n }\n};\n\n/**\n * Keeps a reference of the most current validation run.\n */\nField.prototype.waitFor = function waitFor (pendingPromise) {\n this._waitingFor = pendingPromise;\n};\n\nField.prototype.isWaitingFor = function isWaitingFor (promise) {\n return this._waitingFor === promise;\n};\n\n/**\n * Updates the field with changed data.\n */\nField.prototype.update = function update (options) {\n var this$1 = this;\n\n this.targetOf = options.targetOf || null;\n this.immediate = options.immediate || this.immediate || false;\n this.persist = options.persist || this.persist || 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._bails = options.bails !== undefined ? options.bails : this._bails;\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.componentInstance;\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) ? normalizeEvents(options.events) : this.events;\n this.delay = makeDelayObject(this.events, options.delay || this.delay, this._delay);\n this.updateDependencies();\n this.addActionListeners();\n\n if (process.env.NODE_ENV !== 'production' && !this.name && !this.targetOf) {\n warn('A field is missing a \"name\" or \"data-vv-name\" attribute');\n }\n\n // update required flag flags\n if (options.rules !== undefined) {\n this.flags.required = this.isRequired;\n }\n\n if (Object.keys(options.rules || {}).length === 0 && this.updated) {\n var resetFlag = this.flags.validated;\n this.validator.validate((\"#\" + (this.id))).then(function () {\n this$1.flags.validated = resetFlag;\n });\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 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 if (this._cancellationToken) {\n this._cancellationToken.cancelled = true;\n delete this._cancellationToken;\n }\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 // update initial value\n this.initialValue = this.value;\n this.flags.changed = false;\n\n this.addValueListeners();\n this.addActionListeners();\n this.updateClasses(true);\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 (RuleContainer.isTargetRule(r)) {\n prev.push({ selector: this$1.rules[r][0], 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$1) {\n var selector = ref$1.selector;\n var name = ref$1.name;\n\n var ref = this$1.vm.$refs[selector];\n var el = Array.isArray(ref) ? ref[0] : ref;\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 immediate: this$1.immediate,\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 = Resolver.resolveGetter(el.$el, el.$vnode);\n } else {\n options.el = el;\n options.getter = Resolver.resolveGetter(el, {});\n }\n\n this$1.dependencies.push({ name: name, field: new Field(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 (isReset) {\n var this$1 = this;\n if ( isReset === void 0 ) isReset = false;\n\n if (!this.classes || this.isDisabled) { return; }\n var applyClasses = function (el) {\n toggleClass(el, this$1.classNames.dirty, this$1.flags.dirty);\n toggleClass(el, this$1.classNames.pristine, this$1.flags.pristine);\n toggleClass(el, this$1.classNames.touched, this$1.flags.touched);\n toggleClass(el, this$1.classNames.untouched, this$1.flags.untouched);\n\n // remove valid/invalid classes on reset.\n if (isReset) {\n toggleClass(el, this$1.classNames.valid, false);\n toggleClass(el, this$1.classNames.invalid, false);\n }\n\n // make sure we don't set any classes if the state is undetermined.\n if (!isNullOrUndefined(this$1.flags.valid) && this$1.flags.validated) {\n toggleClass(el, this$1.classNames.valid, this$1.flags.valid);\n }\n\n if (!isNullOrUndefined(this$1.flags.invalid) && this$1.flags.validated) {\n toggleClass(el, this$1.classNames.invalid, this$1.flags.invalid);\n }\n };\n\n if (!isCheckboxOrRadioInput(this.el)) {\n applyClasses(this.el);\n return;\n }\n\n var els = document.querySelectorAll((\"input[name=\\\"\" + (this.el.name) + \"\\\"]\"));\n toArray(els).forEach(applyClasses);\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 if (!this.el) { return; }\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 = isTextInput(this.el) ? 'input' : 'change';\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.componentInstance && isCallable(this.componentInstance.$once)) {\n this.componentInstance.$once('input', onInput);\n this.componentInstance.$once('blur', onBlur);\n this.watchers.push({\n tag: 'class_input',\n unwatch: function () {\n this$1.componentInstance.$off('input', onInput);\n }\n });\n this.watchers.push({\n tag: 'class_blur',\n unwatch: function () {\n this$1.componentInstance.$off('blur', onBlur);\n }\n });\n return;\n }\n\n if (!this.el) { return; }\n\n addEventListener(this.el, inputEvent, onInput);\n // Checkboxes and radio buttons on Mac don't emit blur naturally, so we listen on click instead.\n var blurEvent = isCheckboxOrRadioInput(this.el) ? 'change' : 'blur';\n addEventListener(this.el, 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\nField.prototype.checkValueChanged = function checkValueChanged () {\n // handle some people initialize the value to null, since text inputs have empty string value.\n if (this.initialValue === null && this.value === '' && isTextInput(this.el)) {\n return false;\n }\n\n return this.value !== this.initialValue;\n};\n\n/**\n * Determines the suitable primary event to listen for.\n */\nField.prototype._determineInputEvent = function _determineInputEvent () {\n // if its a custom component, use the customized model event or the input event.\n if (this.componentInstance) {\n return (this.componentInstance.$options.model && this.componentInstance.$options.model.event) || 'input';\n }\n\n if (this.model && this.model.lazy) {\n return 'change';\n }\n\n if (isTextInput(this.el)) {\n return 'input';\n }\n\n return 'change';\n};\n\n/**\n * Determines the list of events to listen to.\n */\nField.prototype._determineEventList = function _determineEventList (defaultInputEvent) {\n var this$1 = this;\n\n // if no event is configured, or it is a component or a text input then respect the user choice.\n if (!this.events.length || this.componentInstance || isTextInput(this.el)) {\n return [].concat( this.events ).map(function (evt) {\n if (evt === 'input' && this$1.model && this$1.model.lazy) {\n return 'change';\n }\n\n return evt;\n });\n }\n\n // force suitable event for non-text type fields.\n return this.events.map(function (e) {\n if (e === 'input') {\n return defaultInputEvent;\n }\n\n return e;\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 || !this.el) { return; }\n\n var token = { cancelled: false };\n var fn = this.targetOf ? function () {\n var target = this$1.validator._resolveField((\"#\" + (this$1.targetOf)));\n if (target && target.flags.validated) {\n this$1.validator.validate((\"#\" + (this$1.targetOf)));\n }\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 || isEvent(args[0])) {\n args[0] = this$1.value;\n }\n\n this$1.flags.pending = true;\n this$1._cancellationToken = token;\n this$1.validator.validate((\"#\" + (this$1.id)), args[0]);\n };\n\n var inputEvent = this._determineInputEvent();\n var events = this._determineEventList(inputEvent);\n\n // if on input validation is requested.\n if (includes(events, inputEvent)) {\n var ctx = null;\n var expression = null;\n var watchCtxVm = false;\n // if its watchable from the context vm.\n if (this.model && this.model.expression) {\n ctx = this.vm;\n expression = this.model.expression;\n watchCtxVm = true;\n }\n\n // watch it from the custom component vm instead.\n if (!expression && this.componentInstance && this.componentInstance.$options.model) {\n ctx = this.componentInstance;\n expression = this.componentInstance.$options.model.prop || 'value';\n }\n\n if (ctx && expression) {\n var debouncedFn = debounce(fn, this.delay[inputEvent], token);\n var unwatch = ctx.$watch(expression, debouncedFn);\n this.watchers.push({\n tag: 'input_model',\n unwatch: function () {\n this$1.vm.$nextTick(function () {\n unwatch();\n });\n }\n });\n\n // filter out input event when we are watching from the context vm.\n if (watchCtxVm) {\n events = events.filter(function (e) { return e !== inputEvent; });\n }\n }\n }\n\n // Add events.\n events.forEach(function (e) {\n var debouncedFn = debounce(fn, this$1.delay[e], token);\n\n this$1._addComponentEventListener(e, debouncedFn);\n this$1._addHTMLEventListener(e, debouncedFn);\n });\n};\n\nField.prototype._addComponentEventListener = function _addComponentEventListener (evt, validate) {\n var this$1 = this;\n\n if (!this.componentInstance) { return; }\n\n this.componentInstance.$on(evt, validate);\n this.watchers.push({\n tag: 'input_vue',\n unwatch: function () {\n this$1.componentInstance.$off(evt, validate);\n }\n });\n};\n\nField.prototype._addHTMLEventListener = function _addHTMLEventListener (evt, validate) {\n var this$1 = this;\n\n if (!this.el || this.componentInstance) { return; }\n\n // listen for the current element.\n var addListener = function (el) {\n addEventListener(el, evt, validate);\n this$1.watchers.push({\n tag: 'input_native',\n unwatch: function () {\n el.removeEventListener(evt, validate);\n }\n });\n };\n\n addListener(this.el);\n if (!isCheckboxOrRadioInput(this.el)) {\n return;\n }\n\n var els = document.querySelectorAll((\"input[name=\\\"\" + (this.el.name) + \"\\\"]\"));\n toArray(els).forEach(function (el) {\n // skip if it is added by v-validate and is not the current element.\n if (el._veeValidateId && el !== this$1.el) {\n return;\n }\n\n addListener(el);\n });\n};\n\n/**\n * Updates aria attributes on the element.\n */\nField.prototype.updateAriaAttrs = function updateAriaAttrs () {\n var this$1 = this;\n\n if (!this.aria || !this.el || !isCallable(this.el.setAttribute)) { return; }\n\n var applyAriaAttrs = function (el) {\n el.setAttribute('aria-required', this$1.isRequired ? 'true' : 'false');\n el.setAttribute('aria-invalid', this$1.flags.invalid ? 'true' : 'false');\n };\n\n if (!isCheckboxOrRadioInput(this.el)) {\n applyAriaAttrs(this.el);\n return;\n }\n\n var els = document.querySelectorAll((\"input[name=\\\"\" + (this.el.name) + \"\\\"]\"));\n toArray(els).forEach(applyAriaAttrs);\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) || !this.validator.errors) { 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 // ignore the result of any ongoing validation.\n if (this._cancellationToken) {\n this._cancellationToken.cancelled = true;\n }\n\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 (items) {\n if ( items === void 0 ) items = [];\n\n this.items = items || [];\n this.itemsById = this.items.reduce(function (itemsById, item) {\n itemsById[item.id] = item;\n return itemsById;\n }, {});\n};\n\nvar prototypeAccessors$2 = { length: { configurable: true } };\n\nFieldBag.prototype[typeof Symbol === 'function' ? Symbol.iterator : '@@iterator'] = function () {\n var this$1 = this;\n\n var index = 0;\n return {\n next: function () {\n return { value: this$1.items[index++], done: index > this$1.items.length };\n }\n };\n};\n\n/**\n * Gets the current items length.\n */\n\nprototypeAccessors$2.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 * Finds the field with the given id, using a plain object as a map to link\n * ids to items faster than by looping over the array and matching.\n */\nFieldBag.prototype.findById = function findById (id) {\n return this.itemsById[id] || null;\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 delete this.itemsById[item.id];\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.findById(item.id)) {\n throw createError((\"Field with id \" + (item.id) + \" is already added.\"));\n }\n\n this.items.push(item);\n this.itemsById[item.id] = item;\n};\n\nObject.defineProperties( FieldBag.prototype, prototypeAccessors$2 );\n\nvar ScopedValidator = function ScopedValidator (base, vm) {\n this.id = vm._uid;\n this._base = base;\n this._paused = false;\n\n // create a mirror bag with limited component scope.\n this.errors = new ErrorBag(base.errors, this.id);\n};\n\nvar prototypeAccessors$3 = { flags: { configurable: true },rules: { configurable: true },fields: { configurable: true },dictionary: { configurable: true },locale: { configurable: true } };\n\nprototypeAccessors$3.flags.get = function () {\n var this$1 = this;\n\n return this._base.fields.items.filter(function (f) { return f.vmId === this$1.id; }).reduce(function (acc, field) {\n if (field.scope) {\n if (!acc[(\"$\" + (field.scope))]) {\n acc[(\"$\" + (field.scope))] = {};\n }\n\n acc[(\"$\" + (field.scope))][field.name] = field.flags;\n }\n\n acc[field.name] = field.flags;\n\n return acc;\n }, {});\n};\n\nprototypeAccessors$3.rules.get = function () {\n return this._base.rules;\n};\n\nprototypeAccessors$3.fields.get = function () {\n return new FieldBag(this._base.fields.filter({ vmId: this.id }));\n};\n\nprototypeAccessors$3.dictionary.get = function () {\n return this._base.dictionary;\n};\n\nprototypeAccessors$3.locale.get = function () {\n return this._base.locale;\n};\n\nprototypeAccessors$3.locale.set = function (val) {\n this._base.locale = val;\n};\n\nScopedValidator.prototype.localize = function localize () {\n var ref;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n return (ref = this._base).localize.apply(ref, args);\n};\n\nScopedValidator.prototype.update = function update () {\n var ref;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n return (ref = this._base).update.apply(ref, args);\n};\n\nScopedValidator.prototype.attach = function attach (opts) {\n var attachOpts = assign({}, opts, { vmId: this.id });\n\n return this._base.attach(attachOpts);\n};\n\nScopedValidator.prototype.pause = function pause () {\n this._paused = true;\n};\n\nScopedValidator.prototype.resume = function resume () {\n this._paused = false;\n};\n\nScopedValidator.prototype.remove = function remove (ruleName) {\n return this._base.remove(ruleName);\n};\n\nScopedValidator.prototype.detach = function detach (name, scope) {\n return this._base.detach(name, scope, this.id);\n};\n\nScopedValidator.prototype.extend = function extend () {\n var ref;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n return (ref = this._base).extend.apply(ref, args);\n};\n\nScopedValidator.prototype.validate = function validate (descriptor, value, opts) {\n if ( opts === void 0 ) opts = {};\n\n if (this._paused) { return Promise.resolve(true); }\n\n return this._base.validate(descriptor, value, assign({}, { vmId: this.id }, opts || {}));\n};\n\nScopedValidator.prototype.verify = function verify () {\n var ref;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n return (ref = this._base).verify.apply(ref, args);\n};\n\nScopedValidator.prototype.validateAll = function validateAll (values, opts) {\n if ( opts === void 0 ) opts = {};\n\n if (this._paused) { return Promise.resolve(true); }\n\n return this._base.validateAll(values, assign({}, { vmId: this.id }, opts || {}));\n};\n\nScopedValidator.prototype.validateScopes = function validateScopes (opts) {\n if ( opts === void 0 ) opts = {};\n\n if (this._paused) { return Promise.resolve(true); }\n\n return this._base.validateScopes(assign({}, { vmId: this.id }, opts || {}));\n};\n\nScopedValidator.prototype.destroy = function destroy () {\n delete this.id;\n delete this._base;\n};\n\nScopedValidator.prototype.reset = function reset (matcher) {\n return this._base.reset(Object.assign({}, matcher || {}, { vmId: this.id }));\n};\n\nScopedValidator.prototype.flag = function flag () {\n var ref;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n return (ref = this._base).flag.apply(ref, args.concat( [this.id] ));\n};\n\nScopedValidator.prototype._resolveField = function _resolveField () {\n var ref;\n\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n return (ref = this._base)._resolveField.apply(ref, args);\n};\n\nObject.defineProperties( ScopedValidator.prototype, prototypeAccessors$3 );\n\nvar VALIDATOR = null;\n\nvar getValidator = function () {\n return VALIDATOR;\n};\n\nvar setValidator = function (value) {\n VALIDATOR = value;\n\n return value;\n};\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\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) || this.$options.$__veeInject === false) {\n return;\n }\n\n // if its a root instance set the config if it exists.\n if (!this.$parent) {\n setConfig(this.$options.$_veeValidate || {});\n }\n\n var options = resolveConfig(this);\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 = new ScopedValidator(getValidator(), this);\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 = new ScopedValidator(getValidator(), this);\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 var Vue = this.$options._base; // the vue constructor.\n Vue.util.defineReactive(this.$validator, 'errors', this.$validator.errors);\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.fields.items.reduce(function (acc, field) {\n if (field.scope) {\n if (!acc[(\"$\" + (field.scope))]) {\n acc[(\"$\" + (field.scope))] = {};\n }\n\n acc[(\"$\" + (field.scope))][field.name] = field.flags;\n\n return acc;\n }\n\n acc[field.name] = field.flags;\n\n return acc;\n }, {});\n };\n },\n beforeDestroy: function beforeDestroy () {\n if (this.$validator && this._uid === this.$validator.id) {\n this.$validator.errors.clear(); // remove errors generated by this component.\n }\n }\n};\n\n// \n\n/**\n * Finds the requested field by id from the context object.\n */\nfunction findField (el, context) {\n if (!context || !context.$validator) {\n return null;\n }\n\n return context.$validator.fields.findById(el._veeValidateId);\n}\nvar directive = {\n bind: function bind (el, binding, vnode) {\n var validator = vnode.context.$validator;\n if (!validator) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"No validator instance is present on vm, did you forget to inject '$validator'?\");\n }\n\n return;\n }\n\n var fieldOptions = Resolver.generate(el, binding, vnode);\n validator.attach(fieldOptions);\n },\n inserted: function inserted (el, binding, vnode) {\n var field = findField(el, vnode.context);\n var scope = Resolver.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 update (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 = Resolver.resolveScope(el, binding, vnode);\n var rules = Resolver.resolveRules(el, binding, vnode);\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\n// \n\nvar Validator = function Validator (validations, options, pluginContainer) {\n if ( options === void 0 ) options = { fastExit: true };\n if ( pluginContainer === void 0 ) pluginContainer = null;\n\n this.errors = new ErrorBag();\n this.fields = new FieldBag();\n this._createFields(validations);\n this.paused = false;\n this.fastExit = !isNullOrUndefined(options && options.fastExit) ? options.fastExit : true;\n this.$vee = pluginContainer || {\n _vm: {\n $nextTick: function (cb) { return isCallable(cb) ? cb() : Promise.resolve(); },\n $emit: function () {},\n $off: function () {}\n }\n };\n};\n\nvar prototypeAccessors$4 = { rules: { configurable: true },dictionary: { configurable: true },flags: { configurable: true },locale: { configurable: true } };\nvar staticAccessors$1 = { rules: { configurable: true },dictionary: { configurable: true },locale: { configurable: true } };\n\n/**\n * @deprecated\n */\nstaticAccessors$1.rules.get = function () {\n if (process.env.NODE_ENV !== 'production') {\n warn('this accessor will be deprecated, use `import { rules } from \"vee-validate\"` instead.');\n }\n\n return RuleContainer.rules;\n};\n\n/**\n * @deprecated\n */\nprototypeAccessors$4.rules.get = function () {\n if (process.env.NODE_ENV !== 'production') {\n warn('this accessor will be deprecated, use `import { rules } from \"vee-validate\"` instead.');\n }\n\n return RuleContainer.rules;\n};\n\nprototypeAccessors$4.dictionary.get = function () {\n return DictionaryResolver.getDriver();\n};\n\nstaticAccessors$1.dictionary.get = function () {\n return DictionaryResolver.getDriver();\n};\n\nprototypeAccessors$4.flags.get = function () {\n return this.fields.items.reduce(function (acc, field) {\n var obj;\n\n if (field.scope) {\n acc[(\"$\" + (field.scope))] = ( obj = {}, obj[field.name] = field.flags, obj );\n\n return acc;\n }\n\n acc[field.name] = field.flags;\n\n return acc;\n }, {});\n};\n\n/**\n * Getter for the current locale.\n */\nprototypeAccessors$4.locale.get = function () {\n return Validator.locale;\n};\n\n/**\n * Setter for the validator locale.\n */\nprototypeAccessors$4.locale.set = function (value) {\n Validator.locale = value;\n};\n\nstaticAccessors$1.locale.get = function () {\n return DictionaryResolver.getDriver().locale;\n};\n\n/**\n * Setter for the validator locale.\n */\nstaticAccessors$1.locale.set = function (value) {\n var hasChanged = value !== DictionaryResolver.getDriver().locale;\n DictionaryResolver.getDriver().locale = value;\n if (hasChanged && Validator.$vee && Validator.$vee._vm) {\n Validator.$vee._vm.$emit('localeChanged');\n }\n};\n\n/**\n * Static constructor.\n * @deprecated\n */\nValidator.create = function create (validations, options) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Please use `new` to create new validator instances.');\n }\n\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 // rules imported from the minimal bundle\n // will have the options embedded in them\n var mergedOpts = validator.options || {};\n Validator._merge(name, {\n validator: validator,\n paramNames: (options && options.paramNames) || validator.paramNames,\n options: assign({ hasTarget: false, immediate: true }, mergedOpts, options || {})\n });\n};\n\n/**\n * Removes a rule from the list of validators.\n * @deprecated\n */\nValidator.remove = function remove (name) {\n if (process.env.NODE_ENV !== 'production') {\n warn('this method will be deprecated, you can still override your rules with `extend`');\n }\n\n RuleContainer.remove(name);\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 var obj;\n\n if (isObject(lang)) {\n DictionaryResolver.getDriver().merge(lang);\n return;\n }\n\n // merge the dictionary.\n if (dictionary) {\n var locale = lang || dictionary.name;\n dictionary = assign({}, dictionary);\n DictionaryResolver.getDriver().merge(( obj = {}, obj[locale] = dictionary, 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 (fieldOpts) {\n var this$1 = this;\n\n // We search for a field with the same name & scope, having persist enabled\n var oldFieldMatcher = { name: fieldOpts.name, scope: fieldOpts.scope, persist: true };\n var oldField = fieldOpts.persist ? this.fields.find(oldFieldMatcher) : null;\n\n if (oldField) {\n // We keep the flags of the old field, then we remove its instance\n fieldOpts.flags = oldField.flags;\n oldField.destroy();\n this.fields.remove(oldField);\n }\n\n // fixes initial value detection with v-model and select elements.\n var value = fieldOpts.initialValue;\n var field = new Field(fieldOpts);\n this.fields.push(field);\n\n // validate the field initially\n if (field.immediate) {\n this.$vee._vm.$nextTick(function () { return this$1.validate((\"#\" + (field.id)), value || field.value, { vmId: fieldOpts.vmId }); });\n } else {\n this._validate(field, value || field.value, { initial: true }).then(function (result) {\n field.flags.valid = result.valid;\n field.flags.invalid = !result.valid;\n });\n }\n\n return field;\n};\n\n/**\n * Sets the flags on a field.\n */\nValidator.prototype.flag = function flag (name, flags, uid) {\n if ( uid === void 0 ) uid = null;\n\n var field = this._resolveField(name, undefined, uid);\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, uid) {\n var field = isCallable(name.destroy) ? name : this._resolveField(name, scope, uid);\n if (!field) { return; }\n\n // We destroy/remove the field & error instances if it's not a `persist` one\n if (!field.persist) {\n field.destroy();\n this.errors.remove(field.name, field.scope, field.vmId);\n this.fields.remove(field);\n }\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\nValidator.prototype.reset = function reset (matcher) {\n var this$1 = this;\n\n // two ticks\n return this.$vee._vm.$nextTick().then(function () {\n return this$1.$vee._vm.$nextTick();\n }).then(function () {\n this$1.fields.filter(matcher).forEach(function (field) {\n field.waitFor(null);\n field.reset(); // reset field flags.\n this$1.errors.remove(field.name, field.scope, matcher && matcher.vmId);\n });\n });\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};\n\n/**\n * Removes a rule from the list of validators.\n * @deprecated\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 (fieldDescriptor, value, ref) {\n var this$1 = this;\n if ( ref === void 0 ) ref = {};\n var silent = ref.silent;\n var vmId = ref.vmId;\n\n if (this.paused) { return Promise.resolve(true); }\n\n // overload to validate all.\n if (isNullOrUndefined(fieldDescriptor)) {\n return this.validateScopes({ silent: silent, vmId: vmId });\n }\n\n // overload to validate scope-less fields.\n if (fieldDescriptor === '*') {\n return this.validateAll(undefined, { silent: silent, vmId: vmId });\n }\n\n // if scope validation was requested.\n if (/^(.+)\\.\\*$/.test(fieldDescriptor)) {\n var matched = fieldDescriptor.match(/^(.+)\\.\\*$/)[1];\n return this.validateAll(matched);\n }\n\n var field = this._resolveField(fieldDescriptor);\n if (!field) {\n return this._handleFieldNotFound(fieldDescriptor);\n }\n\n if (!silent) { field.flags.pending = true; }\n if (value === undefined) {\n value = field.value;\n }\n\n var validationPromise = this._validate(field, value);\n field.waitFor(validationPromise);\n\n return validationPromise.then(function (result) {\n if (!silent && field.isWaitingFor(validationPromise)) {\n // allow next validation to mutate the state.\n field.waitFor(null);\n this$1._handleValidationResults([result], vmId);\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, ref) {\n var this$1 = this;\n if ( ref === void 0 ) ref = {};\n var silent = ref.silent;\n var vmId = ref.vmId;\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, vmId: vmId };\n } else if (isObject(values)) {\n matcher = Object.keys(values).map(function (key) {\n return { name: key, vmId: vmId, scope: null };\n });\n providedValues = true;\n } else if (Array.isArray(values)) {\n matcher = values.map(function (key) {\n return typeof key === 'object' ? Object.assign({ vmId: vmId }, key) : { name: key, vmId: vmId };\n });\n } else {\n matcher = { scope: null, vmId: vmId };\n }\n\n return Promise.all(\n this.fields.filter(matcher).map(function (field) { return this$1._validate(field, providedValues ? values[field.name] : field.value); })\n ).then(function (results) {\n if (!silent) {\n this$1._handleValidationResults(results, vmId);\n }\n\n return results.every(function (t) { return t.valid; });\n });\n};\n\n/**\n * Validates all scopes.\n */\nValidator.prototype.validateScopes = function validateScopes (ref) {\n var this$1 = this;\n if ( ref === void 0 ) ref = {};\n var silent = ref.silent;\n var vmId = ref.vmId;\n\n if (this.paused) { return Promise.resolve(true); }\n\n return Promise.all(\n this.fields.filter({ vmId: vmId }).map(function (field) { return this$1._validate(field, field.value); })\n ).then(function (results) {\n if (!silent) {\n this$1._handleValidationResults(results, vmId);\n }\n\n return results.every(function (t) { return t.valid; });\n });\n};\n\n/**\n * Validates a value against the rules.\n */\nValidator.prototype.verify = function verify (value, rules, options) {\n if ( options === void 0 ) options = {};\n\n var field = {\n name: (options && options.name) || '{field}',\n rules: normalizeRules(rules),\n bails: getPath('bails', options, true),\n forceRequired: false,\n get isRequired () {\n return !!this.rules.required || this.forceRequired;\n }\n };\n\n var targetRules = Object.keys(field.rules).filter(RuleContainer.isTargetRule);\n if (targetRules.length && options && isObject(options.values)) {\n field.dependencies = targetRules.map(function (rule) {\n var ref = field.rules[rule];\n var targetKey = ref[0];\n\n return {\n name: rule,\n field: { value: options.values[targetKey] }\n };\n });\n }\n\n return this._validate(field, value).then(function (result) {\n var errors = [];\n var ruleMap = {};\n result.errors.forEach(function (e) {\n errors.push(e.msg);\n ruleMap[e.rule] = e.msg;\n });\n\n return {\n valid: result.valid,\n errors: errors,\n failedRules: ruleMap\n };\n });\n};\n\n/**\n * Perform cleanup.\n */\nValidator.prototype.destroy = function destroy () {\n this.$vee._vm.$off('localeChanged');\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 || DictionaryResolver.getDriver().getDateFormat(this.locale);\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 DictionaryResolver.getDriver().getFieldMessage(this.locale, field.name, rule.name, [name, params, data]);\n};\n\n/**\n * We need to convert any object param to an array format since the locales do not handle params as objects yet.\n */\nValidator.prototype._convertParamObjectToArray = function _convertParamObjectToArray (obj, ruleName) {\n if (Array.isArray(obj)) {\n return obj;\n }\n\n var paramNames = RuleContainer.getParamNames(ruleName);\n if (!paramNames || !isObject(obj)) {\n return obj;\n }\n\n return paramNames.reduce(function (prev, paramName) {\n if (paramName in obj) {\n prev.push(obj[paramName]);\n }\n\n return prev;\n }, []);\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 var params = this._convertParamObjectToArray(rule.params, rule.name);\n if (rule.options.hasTarget && params && params[0]) {\n var localizedName = targetName || DictionaryResolver.getDriver().getAttribute(this.locale, params[0], params[0]);\n return [localizedName].concat(params.slice(1));\n }\n\n return 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 || DictionaryResolver.getDriver().getAttribute(this.locale, field.name, field.name);\n};\n\n/**\n * Converts an array of params to an object with named properties.\n * Only works if the rule is configured with a paramNames array.\n * Returns the same params if it cannot convert it.\n */\nValidator.prototype._convertParamArrayToObj = function _convertParamArrayToObj (params, ruleName) {\n var paramNames = RuleContainer.getParamNames(ruleName);\n if (!paramNames) {\n return params;\n }\n\n if (isObject(params)) {\n // check if the object is either a config object or a single parameter that is an object.\n var hasKeys = paramNames.some(function (name) { return Object.keys(params).indexOf(name) !== -1; });\n // if it has some of the keys, return it as is.\n if (hasKeys) {\n return params;\n }\n // otherwise wrap the object in an array.\n params = [params];\n }\n\n // Reduce the paramsNames to a param object.\n return params.reduce(function (prev, value, idx) {\n prev[paramNames[idx]] = value;\n\n return prev;\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 = RuleContainer.getValidatorMethod(rule.name);\n var params = Array.isArray(rule.params) ? toArray(rule.params) : rule.params;\n if (!params) {\n params = [];\n }\n\n var targetName = null;\n if (!validator || typeof validator !== 'function') {\n return Promise.reject(createError((\"No such validator '\" + (rule.name) + \"' exists.\")));\n }\n\n // has field dependencies.\n if (rule.options.hasTarget && field.dependencies) {\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 (rule.options.isDate) {\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, this._convertParamArrayToObj(params, rule.name));\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 data: result.data,\n errors: allValid ? [] : [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 data: result.data,\n errors: result.valid ? [] : [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, ref) {\n var validator = ref.validator;\n var options = ref.options;\n var paramNames = ref.paramNames;\n\n var validate = isCallable(validator) ? validator : validator.validate;\n if (validator.getMessage) {\n DictionaryResolver.getDriver().setMessage(Validator.locale, name, validator.getMessage);\n }\n\n RuleContainer.add(name, {\n validate: validate,\n options: options,\n paramNames: paramNames\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\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 vmId: field.vmId,\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, uid) {\n if (name[0] === '#') {\n return this.fields.findById(name.slice(1));\n }\n\n if (!isNullOrUndefined(scope)) {\n return this.fields.find({ name: name, scope: scope, vmId: uid });\n }\n\n if (includes(name, '.')) {\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, vmId: uid });\n if (field) {\n return field;\n }\n }\n\n return this.fields.find({ name: name, scope: null, vmId: uid });\n};\n\n/**\n * Handles when a field is not found.\n */\nValidator.prototype._handleFieldNotFound = function _handleFieldNotFound (name, scope) {\n var fullName = isNullOrUndefined(scope) ? name : (\"\" + (!isNullOrUndefined(scope) ? scope + '.' : '') + name);\n\n return Promise.reject(createError(\n (\"Validating a non-existent field: \\\"\" + fullName + \"\\\". Use \\\"attach()\\\" first.\")\n ));\n};\n\n/**\n * Handles validation results.\n */\nValidator.prototype._handleValidationResults = function _handleValidationResults (results, vmId) {\n var this$1 = this;\n\n var matchers = results.map(function (result) { return ({ id: result.id }); });\n this.errors.removeById(matchers.map(function (m) { return m.id; }));\n // remove by name and scope to remove any custom errors added.\n results.forEach(function (result) {\n this$1.errors.remove(result.field, result.scope, vmId);\n });\n var allErrors = results.reduce(function (prev, curr) {\n prev.push.apply(prev, curr.errors);\n\n return prev;\n }, []);\n\n this.errors.add(allErrors);\n\n // handle flags.\n this.fields.filter(matchers).forEach(function (field) {\n var result = find(results, function (r) { return r.id === field.id; });\n field.setFlags({\n pending: false,\n valid: result.valid,\n validated: true\n });\n });\n};\n\nValidator.prototype._shouldSkip = function _shouldSkip (field, value) {\n // field is configured to run through the pipeline regardless\n if (field.bails === false) {\n return false;\n }\n\n // disabled fields are skipped if useConstraintAttrs is enabled in config\n if (field.isDisabled && getConfig().useConstraintAttrs) {\n return true;\n }\n\n // skip if the field is not required and has an empty value.\n return !field.isRequired && (isNullOrUndefined(value) || value === '' || isEmptyArray(value));\n};\n\nValidator.prototype._shouldBail = function _shouldBail (field) {\n // if the field was configured explicitly.\n if (field.bails !== undefined) {\n return field.bails;\n }\n\n return this.fastExit;\n};\n\n/**\n * Starts the validation process.\n */\nValidator.prototype._validate = function _validate (field, value, ref) {\n var this$1 = this;\n if ( ref === void 0 ) ref = {};\n var initial = ref.initial;\n\n var requireRules = Object.keys(field.rules).filter(RuleContainer.isRequireRule);\n\n field.forceRequired = false;\n requireRules.forEach(function (rule) {\n var ruleOptions = RuleContainer.getOptions(rule);\n var result = this$1._test(field, value, { name: rule, params: field.rules[rule], options: ruleOptions });\n\n if (isCallable(result.then)) { throw createError('Require rules cannot be async'); }\n if (!isObject(result)) { throw createError('Require rules has to return an object (see docs)'); }\n\n if (result.data.required === true) {\n field.forceRequired = true;\n }\n });\n\n if (this._shouldSkip(field, value)) {\n return Promise.resolve({ valid: true, id: field.id, field: field.name, scope: field.scope, errors: [] });\n }\n\n var promises = [];\n var errors = [];\n var isExitEarly = false;\n if (isCallable(field.checkValueChanged)) {\n field.flags.changed = field.checkValueChanged();\n }\n\n // use of '.some()' is to break iteration in middle by returning true\n Object.keys(field.rules).filter(function (rule) {\n if (!initial || !RuleContainer.has(rule)) { return true; }\n\n return RuleContainer.isImmediate(rule);\n }).some(function (rule) {\n var ruleOptions = RuleContainer.getOptions(rule);\n var result = this$1._test(field, value, { name: rule, params: field.rules[rule], options: ruleOptions });\n if (isCallable(result.then)) {\n promises.push(result);\n } else if (!result.valid && this$1._shouldBail(field)) {\n errors.push.apply(errors, result.errors);\n isExitEarly = true;\n } else {\n // promisify the result.\n promises.push(new Promise(function (resolve) { return resolve(result); }));\n }\n\n return isExitEarly;\n });\n\n if (isExitEarly) {\n return Promise.resolve({ valid: false, errors: errors, id: field.id, field: field.name, scope: field.scope });\n }\n\n return Promise.all(promises).then(function (results) {\n return results.reduce(function (prev, v) {\n var ref;\n\n if (!v.valid) {\n (ref = prev.errors).push.apply(ref, v.errors);\n }\n\n prev.valid = prev.valid && v.valid;\n\n return prev;\n }, { valid: true, errors: errors, id: field.id, field: field.name, scope: field.scope });\n });\n};\n\nObject.defineProperties( Validator.prototype, prototypeAccessors$4 );\nObject.defineProperties( Validator, staticAccessors$1 );\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 dictionary = {};\n if (locale.messages) {\n dictionary.messages = normalizeValue(locale.messages);\n }\n\n if (locale.custom) {\n dictionary.custom = normalizeValue(locale.custom);\n }\n\n if (locale.attributes) {\n dictionary.attributes = locale.attributes;\n }\n\n if (!isNullOrUndefined(locale.dateFormat)) {\n dictionary.dateFormat = locale.dateFormat;\n }\n\n return dictionary;\n};\n\nvar I18nDictionary = function I18nDictionary (i18n, rootKey) {\n this.i18n = i18n;\n this.rootKey = rootKey;\n};\n\nvar prototypeAccessors$5 = { locale: { configurable: true } };\n\nprototypeAccessors$5.locale.get = function () {\n return this.i18n.locale;\n};\n\nprototypeAccessors$5.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 (_, key, data) {\n var path = (this.rootKey) + \".messages.\" + key;\n var dataOptions = data;\n\n if (Array.isArray(data)) {\n dataOptions = [].concat.apply([], data);\n }\n\n if (this.i18n.te(path)) {\n return this.i18n.t(path, dataOptions);\n }\n\n // fallback to the fallback message\n if (this.i18n.te(path, this.i18n.fallbackLocale)) {\n return this.i18n.t(path, this.i18n.fallbackLocale, dataOptions);\n }\n\n // fallback to the root message\n return this.i18n.t(((this.rootKey) + \".messages._default\"), dataOptions);\n};\n\nI18nDictionary.prototype.getAttribute = function getAttribute (_, key, fallback) {\n if ( fallback === void 0 ) fallback = '';\n\n var path = (this.rootKey) + \".attributes.\" + key;\n if (this.i18n.te(path)) {\n return this.i18n.t(path);\n }\n\n return fallback;\n};\n\nI18nDictionary.prototype.getFieldMessage = function getFieldMessage (_, field, key, data) {\n var path = (this.rootKey) + \".custom.\" + field + \".\" + key;\n if (this.i18n.te(path)) {\n return this.i18n.t(path, data);\n }\n\n return this.getMessage(_, 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 var obj;\n\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 if (locale.dateFormat) {\n this$1.i18n.setDateTimeFormat(localeKey, locale.dateFormat);\n }\n });\n};\n\nI18nDictionary.prototype.setMessage = function setMessage (locale, key, value) {\n var obj, obj$1;\n\n this.merge(( obj$1 = {}, obj$1[locale] = {\n messages: ( obj = {}, obj[key] = value, obj )\n }, obj$1 ));\n};\n\nI18nDictionary.prototype.setAttribute = function setAttribute (locale, key, value) {\n var obj, obj$1;\n\n this.merge(( obj$1 = {}, obj$1[locale] = {\n attributes: ( obj = {}, obj[key] = value, obj )\n }, obj$1 ));\n};\n\nObject.defineProperties( I18nDictionary.prototype, prototypeAccessors$5 );\n\nvar aggressive = function () { return ({\n on: ['input']\n}); };\n\nvar lazy = function () { return ({\n on: ['change']\n}); };\n\nvar eager = function (ref) {\n var errors = ref.errors;\n\n if (errors.length) {\n return {\n on: ['input']\n };\n }\n\n return {\n on: ['change', 'blur']\n };\n};\n\nvar passive = function () { return ({\n on: []\n}); };\n\nvar modes = {\n aggressive: aggressive,\n eager: eager,\n passive: passive,\n lazy: lazy\n};\n\n// \n\nvar Vue;\nvar pendingPlugins;\nvar pluginInstance;\n\nvar VeeValidate$1 = function VeeValidate (config, _Vue) {\n this.configure(config);\n pluginInstance = this;\n if (_Vue) {\n Vue = _Vue;\n }\n this._validator = setValidator(\n new Validator(null, { fastExit: config && config.fastExit }, this)\n );\n this._initVM(this.config);\n this._initI18n(this.config);\n};\n\nvar prototypeAccessors$6 = { i18nDriver: { configurable: true },config: { configurable: true } };\nvar staticAccessors$2 = { i18nDriver: { configurable: true },config: { configurable: true } };\n\nVeeValidate$1.setI18nDriver = function setI18nDriver (driver, instance) {\n DictionaryResolver.setDriver(driver, instance);\n};\n\nVeeValidate$1.configure = function configure (cfg) {\n setConfig(cfg);\n};\n\nVeeValidate$1.setMode = function setMode (mode, implementation) {\n setConfig({ mode: mode });\n if (!implementation) {\n return;\n }\n\n if (!isCallable(implementation)) {\n throw new Error('A mode implementation must be a function');\n }\n\n modes[mode] = implementation;\n};\n\nVeeValidate$1.use = function 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 // Don't install plugins until vee-validate is installed.\n if (!pluginInstance) {\n if (!pendingPlugins) {\n pendingPlugins = [];\n }\n pendingPlugins.push({ plugin: plugin, options: options });\n return;\n }\n\n plugin({ Validator: Validator, ErrorBag: ErrorBag, Rules: Validator.rules }, options);\n};\nVeeValidate$1.install = function install (_Vue, opts) {\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 pluginInstance = new VeeValidate$1(opts);\n // inject the plugin container statically into the validator class\n Validator.$vee = pluginInstance;\n\n detectPassiveSupport();\n\n Vue.mixin(mixin);\n Vue.directive('validate', directive);\n if (pendingPlugins) {\n pendingPlugins.forEach(function (ref) {\n var plugin = ref.plugin;\n var options = ref.options;\n\n VeeValidate$1.use(plugin, options);\n });\n pendingPlugins = null;\n }\n};\n\nprototypeAccessors$6.i18nDriver.get = function () {\n return DictionaryResolver.getDriver();\n};\n\nstaticAccessors$2.i18nDriver.get = function () {\n return DictionaryResolver.getDriver();\n};\n\nprototypeAccessors$6.config.get = function () {\n return getConfig();\n};\n\nstaticAccessors$2.config.get = function () {\n return getConfig();\n};\n\nVeeValidate$1.prototype._initVM = function _initVM (config) {\n var this$1 = this;\n\n this._vm = new Vue({\n data: function () { return ({\n errors: this$1._validator.errors,\n fields: this$1._validator.fields\n }); }\n });\n};\n\nVeeValidate$1.prototype._initI18n = function _initI18n (config) {\n var this$1 = this;\n\n var dictionary = config.dictionary;\n var i18n = config.i18n;\n var i18nRootKey = config.i18nRootKey;\n var locale = config.locale;\n var onLocaleChanged = function () {\n if (dictionary) {\n this$1.i18nDriver.merge(dictionary);\n }\n\n this$1._validator.errors.regenerate();\n };\n\n // i18 is being used for localization.\n if (i18n) {\n VeeValidate$1.setI18nDriver('i18n', new I18nDictionary(i18n, i18nRootKey));\n i18n._vm.$watch('locale', onLocaleChanged);\n } else if (typeof window !== 'undefined') {\n this._vm.$on('localeChanged', onLocaleChanged);\n }\n\n if (dictionary) {\n this.i18nDriver.merge(dictionary);\n }\n\n if (locale && !i18n) {\n this._validator.localize(locale);\n }\n};\n\nVeeValidate$1.prototype.configure = function configure (cfg) {\n setConfig(cfg);\n};\n\nObject.defineProperties( VeeValidate$1.prototype, prototypeAccessors$6 );\nObject.defineProperties( VeeValidate$1, staticAccessors$2 );\n\nVeeValidate$1.mixin = mixin;\nVeeValidate$1.directive = directive;\nVeeValidate$1.Validator = Validator;\nVeeValidate$1.ErrorBag = ErrorBag;\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 obj;\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: function (field) { return (\"The \" + field + \" field may only contain alphabetic characters\"); },\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 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 contains exactly \" + 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 excluded: function (field) { return (\"The \" + field + \" field must be a valid value\"); },\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 included: 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 ip_or_fqdn: function (field) { return (\"The \" + field + \" field must be a valid ip address or FQDN\"); },\n length: function (field, ref) {\n var length = ref[0];\n var max = ref[1];\n\n if (max) {\n return (\"The \" + field + \" length must 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 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 required_if: function (field, ref) {\n var target = ref[0];\n\n return (\"The \" + field + \" field is required when the \" + target + \" field has this value\");\n},\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}\n\nfunction toInteger (dirtyNumber) {\n if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n return NaN\n }\n\n var number = Number(dirtyNumber);\n\n if (isNaN(number)) {\n return number\n }\n\n return number < 0 ? Math.ceil(number) : Math.floor(number)\n}\n\nvar MILLISECONDS_IN_MINUTE = 60000;\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nfunction getTimezoneOffsetInMilliseconds (dirtyDate) {\n var date = new Date(dirtyDate.getTime());\n var baseTimezoneOffset = date.getTimezoneOffset();\n date.setSeconds(0, 0);\n var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE;\n\n return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset\n}\n\nvar MILLISECONDS_IN_HOUR = 3600000;\nvar MILLISECONDS_IN_MINUTE$1 = 60000;\nvar DEFAULT_ADDITIONAL_DIGITS = 2;\n\nvar patterns = {\n dateTimeDelimeter: /[T ]/,\n plainTime: /:/,\n timeZoneDelimeter: /[Z ]/i,\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 * If the function cannot parse the string or the values are invalid, it returns Invalid Date.\n *\n * If the argument is none of the above, the function returns Invalid Date.\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 {Date|String|Number} 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 == null ? DEFAULT_ADDITIONAL_DIGITS : toInteger(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 (typeof argument === 'object' && Object.prototype.toString.call(argument) === '[object Date]')\n ) {\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 === 'number' || Object.prototype.toString.call(argument) === '[object Number]') {\n return new Date(argument)\n } else if (!(typeof argument === 'string' || Object.prototype.toString.call(argument) === '[object String]')) {\n return new Date(NaN)\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 (isNaN(date)) {\n return new Date(NaN)\n }\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 if (isNaN(time)) {\n return new Date(NaN)\n }\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone);\n if (isNaN(offset)) {\n return new Date(NaN)\n }\n } else {\n // get offset accurate to hour in timezones that change offset\n offset = getTimezoneOffsetInMilliseconds(new Date(timestamp + time));\n offset = getTimezoneOffsetInMilliseconds(new Date(timestamp + time + offset));\n }\n\n return new Date(timestamp + time + offset)\n } else {\n return new Date(NaN)\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 if (patterns.timeZoneDelimeter.test(dateStrings.date)) {\n dateStrings.date = dateString.split(patterns.timeZoneDelimeter)[0];\n timeString = dateString.substr(dateStrings.date.length, dateString.length);\n }\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\n if (!validateDate(year, month)) {\n return new Date(NaN)\n }\n\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\n if (!validateDayOfYearDate(year, dayOfYear)) {\n return new Date(NaN)\n }\n\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\n if (!validateDate(year, month, day)) {\n return new Date(NaN)\n }\n\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\n if (!validateWeekDate(year, week)) {\n return new Date(NaN)\n }\n\n return dayOfISOWeekYear(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\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN)\n }\n\n return dayOfISOWeekYear(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\n if (!validateTime(hours)) {\n return NaN\n }\n\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\n if (!validateTime(hours, minutes)) {\n return NaN\n }\n\n return (hours % 24) * MILLISECONDS_IN_HOUR +\n minutes * MILLISECONDS_IN_MINUTE$1\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\n if (!validateTime(hours, minutes, seconds)) {\n return NaN\n }\n\n return (hours % 24) * MILLISECONDS_IN_HOUR +\n minutes * MILLISECONDS_IN_MINUTE$1 +\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 var hours;\n\n // ±hh\n token = patterns.timezoneHH.exec(timezoneString);\n if (token) {\n hours = parseInt(token[2], 10);\n\n if (!validateTimezone()) {\n return NaN\n }\n\n absoluteOffset = hours * MILLISECONDS_IN_HOUR;\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n // ±hh:mm or ±hhmm\n token = patterns.timezoneHHMM.exec(timezoneString);\n if (token) {\n hours = parseInt(token[2], 10);\n var minutes = parseInt(token[3], 10);\n\n if (!validateTimezone(hours, minutes)) {\n return NaN\n }\n\n absoluteOffset = hours * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE$1;\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n return 0\n}\n\nfunction dayOfISOWeekYear (isoWeekYear, week, day) {\n week = week || 0;\n day = day || 0;\n var date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 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// Validation functions\n\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction isLeapYearIndex (year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0)\n}\n\nfunction validateDate (year, month, date) {\n if (month < 0 || month > 11) {\n return false\n }\n\n if (date != null) {\n if (date < 1) {\n return false\n }\n\n var isLeapYear = isLeapYearIndex(year);\n if (isLeapYear && date > DAYS_IN_MONTH_LEAP_YEAR[month]) {\n return false\n }\n if (!isLeapYear && date > DAYS_IN_MONTH[month]) {\n return false\n }\n }\n\n return true\n}\n\nfunction validateDayOfYearDate (year, dayOfYear) {\n if (dayOfYear < 1) {\n return false\n }\n\n var isLeapYear = isLeapYearIndex(year);\n if (isLeapYear && dayOfYear > 366) {\n return false\n }\n if (!isLeapYear && dayOfYear > 365) {\n return false\n }\n\n return true\n}\n\nfunction validateWeekDate (year, week, day) {\n if (week < 0 || week > 52) {\n return false\n }\n\n if (day != null && (day < 0 || day > 6)) {\n return false\n }\n\n return true\n}\n\nfunction validateTime (hours, minutes, seconds) {\n if (hours != null && (hours < 0 || hours >= 25)) {\n return false\n }\n\n if (minutes != null && (minutes < 0 || minutes >= 60)) {\n return false\n }\n\n if (seconds != null && (seconds < 0 || seconds >= 60)) {\n return false\n }\n\n return true\n}\n\nfunction validateTimezone (hours, minutes) {\n if (minutes != null && (minutes < 0 || minutes > 59)) {\n return false\n }\n\n return true\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 = toInteger(dirtyAmount);\n return new Date(timestamp + amount)\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\nfunction buildFormatLongFn (args) {\n return function (dirtyOptions) {\n var options = dirtyOptions || {};\n var width = options.width ? String(options.width) : args.defaultWidth;\n var format = args.formats[width] || args.formats[args.defaultWidth];\n return format\n }\n}\n\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\n\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\n\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\n\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\n\nvar formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\n\nfunction formatRelative (token, date, baseDate, options) {\n return formatRelativeLocale[token]\n}\n\nfunction buildLocalizeFn (args) {\n return function (dirtyIndex, dirtyOptions) {\n var options = dirtyOptions || {};\n var width = options.width ? String(options.width) : args.defaultWidth;\n var context = options.context ? String(options.context) : 'standalone';\n\n var valuesArray;\n if (context === 'formatting' && args.formattingValues) {\n valuesArray = args.formattingValues[width] || args.formattingValues[args.defaultFormattingWidth];\n } else {\n valuesArray = args.values[width] || args.values[args.defaultWidth];\n }\n var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;\n return valuesArray[index]\n }\n}\n\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\n\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\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 monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\n\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\n\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\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 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'\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\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function (quarter) {\n return Number(quarter) - 1\n }\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaulFormattingWidth: 'wide'\n })\n};\n\nfunction buildMatchPatternFn (args) {\n return function (dirtyString, dirtyOptions) {\n var string = String(dirtyString);\n var options = dirtyOptions || {};\n\n var matchResult = string.match(args.matchPattern);\n if (!matchResult) {\n return null\n }\n var matchedString = matchResult[0];\n\n var parseResult = string.match(args.parsePattern);\n if (!parseResult) {\n return null\n }\n var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n return {\n value: value,\n rest: string.slice(matchedString.length)\n }\n }\n}\n\nfunction buildMatchFn (args) {\n return function (dirtyString, dirtyOptions) {\n var string = String(dirtyString);\n var options = dirtyOptions || {};\n var width = options.width;\n\n var matchPattern = (width && args.matchPatterns[width]) || args.matchPatterns[args.defaultMatchWidth];\n var matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null\n }\n var matchedString = matchResult[0];\n\n var parsePatterns = (width && args.parsePatterns[width]) || args.parsePatterns[args.defaultParseWidth];\n\n var value;\n if (Object.prototype.toString.call(parsePatterns) === '[object Array]') {\n value = parsePatterns.findIndex(function (pattern) {\n return pattern.test(string)\n });\n } else {\n value = findKey(parsePatterns, function (pattern) {\n return pattern.test(string)\n });\n }\n\n value = args.valueCallback ? args.valueCallback(value) : value;\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n return {\n value: value,\n rest: string.slice(matchedString.length)\n }\n }\n}\n\nfunction findKey (object, predicate) {\n for (var key in object) {\n if (object.hasOwnProperty(key) && predicate(object[key])) {\n return key\n }\n }\n}\n\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\n\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\n\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\n\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\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\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\n\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\n\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function (value) {\n return parseInt(value, 10)\n }\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function (index) {\n return index + 1\n }\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\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 = 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 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 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\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 if (arguments.length < 1) {\n throw new TypeError('1 argument required, but only ' + arguments.length + ' present')\n }\n\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 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 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 if (arguments.length < 1) {\n throw new TypeError('1 argument required, but only ' + arguments.length + ' present')\n }\n\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 = 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 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 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) + 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 startOfUTCWeek (dirtyDate, dirtyOptions) {\n if (arguments.length < 1) {\n throw new TypeError('1 argument required, but only ' + arguments.length + ' present')\n }\n\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(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, options);\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 getUTCWeekYear (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 var year = date.getUTCFullYear();\n\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale &&\n locale.options &&\n locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate =\n localeFirstWeekContainsDate == null\n ? 1\n : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate =\n options.firstWeekContainsDate == null\n ? defaultFirstWeekContainsDate\n : toInteger(options.firstWeekContainsDate);\n\n // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively')\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions);\n\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, 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 startOfUTCWeekYear (dirtyDate, dirtyOptions) {\n if (arguments.length < 1) {\n throw new TypeError('1 argument required, but only ' + arguments.length + ' present')\n }\n\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale &&\n locale.options &&\n locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate =\n localeFirstWeekContainsDate == null\n ? 1\n : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate =\n options.firstWeekContainsDate == null\n ? defaultFirstWeekContainsDate\n : toInteger(options.firstWeekContainsDate);\n\n var year = getUTCWeekYear(dirtyDate, dirtyOptions);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, dirtyOptions);\n return date\n}\n\nvar MILLISECONDS_IN_WEEK$1 = 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 getUTCWeek (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 var diff = startOfUTCWeek(date, dirtyOptions).getTime() - startOfUTCWeekYear(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$1) + 1\n}\n\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nvar formatters = {\n // Era\n G: function (date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {width: 'abbreviated'})\n // A, B\n case 'GGGGG':\n return localize.era(era, {width: 'narrow'})\n // Anno Domini, Before Christ\n case 'GGGG':\n default:\n return localize.era(era, {width: 'wide'})\n }\n },\n\n // Year\n y: function (date, token, localize, options) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n var signedYear = date.getUTCFullYear();\n\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n\n // Two digit year\n if (token === 'yy') {\n var twoDigitYear = year % 100;\n return addLeadingZeros(twoDigitYear, 2)\n }\n\n // Ordinal number\n if (token === 'yo') {\n return localize.ordinalNumber(year, {unit: 'year'})\n }\n\n // Padding\n return addLeadingZeros(year, token.length)\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n var signedWeekYear = getUTCWeekYear(date, options);\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2)\n }\n\n // Ordinal number\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {unit: 'year'})\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length)\n },\n\n // ISO week-numbering year\n R: function (date, token, localize, options) {\n var isoWeekYear = getUTCISOWeekYear(date, options);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length)\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token, localize, options) {\n var year = date.getUTCFullYear();\n return addLeadingZeros(year, token.length)\n },\n\n // Quarter\n Q: function (date, token, localize, options) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter)\n // 01, 02, 03, 04\n case 'QQ':\n return addLeadingZeros(quarter, 2)\n // 1st, 2nd, 3rd, 4th\n case 'Qo':\n return localize.ordinalNumber(quarter, {unit: 'quarter'})\n // Q1, Q2, Q3, Q4\n case 'QQQ':\n return localize.quarter(quarter, {width: 'abbreviated', context: 'formatting'})\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'QQQQQ':\n return localize.quarter(quarter, {width: 'narrow', context: 'formatting'})\n // 1st quarter, 2nd quarter, ...\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {width: 'wide', context: 'formatting'})\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize, options) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter)\n // 01, 02, 03, 04\n case 'qq':\n return addLeadingZeros(quarter, 2)\n // 1st, 2nd, 3rd, 4th\n case 'qo':\n return localize.ordinalNumber(quarter, {unit: 'quarter'})\n // Q1, Q2, Q3, Q4\n case 'qqq':\n return localize.quarter(quarter, {width: 'abbreviated', context: 'standalone'})\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'qqqqq':\n return localize.quarter(quarter, {width: 'narrow', context: 'standalone'})\n // 1st quarter, 2nd quarter, ...\n case 'qqqq':\n default:\n return localize.quarter(quarter, {width: 'wide', context: 'standalone'})\n }\n },\n\n // Month\n M: function (date, token, localize, options) {\n var month = date.getUTCMonth();\n switch (token) {\n // 1, 2, ..., 12\n case 'M':\n return String(month + 1)\n // 01, 02, ..., 12\n case 'MM':\n return addLeadingZeros(month + 1, 2)\n // 1st, 2nd, ..., 12th\n case 'Mo':\n return localize.ordinalNumber(month + 1, {unit: 'month'})\n // Jan, Feb, ..., Dec\n case 'MMM':\n return localize.month(month, {width: 'abbreviated', context: 'formatting'})\n // J, F, ..., D\n case 'MMMMM':\n return localize.month(month, {width: 'narrow', context: 'formatting'})\n // January, February, ..., December\n case 'MMMM':\n default:\n return localize.month(month, {width: 'wide', context: 'formatting'})\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize, options) {\n var month = date.getUTCMonth();\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1)\n // 01, 02, ..., 12\n case 'LL':\n return addLeadingZeros(month + 1, 2)\n // 1st, 2nd, ..., 12th\n case 'Lo':\n return localize.ordinalNumber(month + 1, {unit: 'month'})\n // Jan, Feb, ..., Dec\n case 'LLL':\n return localize.month(month, {width: 'abbreviated', context: 'standalone'})\n // J, F, ..., D\n case 'LLLLL':\n return localize.month(month, {width: 'narrow', context: 'standalone'})\n // January, February, ..., December\n case 'LLLL':\n default:\n return localize.month(month, {width: 'wide', context: 'standalone'})\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n var week = getUTCWeek(date, options);\n\n if (token === 'wo') {\n return localize.ordinalNumber(week, {unit: 'week'})\n }\n\n return addLeadingZeros(week, token.length)\n },\n\n // ISO week of year\n I: function (date, token, localize, options) {\n var isoWeek = getUTCISOWeek(date, options);\n\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {unit: 'week'})\n }\n\n return addLeadingZeros(isoWeek, token.length)\n },\n\n // Day of the month\n d: function (date, token, localize, options) {\n var dayOfMonth = date.getUTCDate();\n\n if (token === 'do') {\n return localize.ordinalNumber(dayOfMonth, {unit: 'date'})\n }\n\n return addLeadingZeros(dayOfMonth, token.length)\n },\n\n // Day of year\n D: function (date, token, localize, options) {\n var dayOfYear = getUTCDayOfYear(date, options);\n\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {unit: 'dayOfYear'})\n }\n\n return addLeadingZeros(dayOfYear, token.length)\n },\n\n // Day of week\n E: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {width: 'abbreviated', context: 'formatting'})\n // T\n case 'EEEEE':\n return localize.day(dayOfWeek, {width: 'narrow', context: 'formatting'})\n // Tu\n case 'EEEEEE':\n return localize.day(dayOfWeek, {width: 'short', context: 'formatting'})\n // Tuesday\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {width: 'wide', context: 'formatting'})\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = ((dayOfWeek - options.weekStartsOn + 8) % 7) || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek)\n // Padded numerical value\n case 'ee':\n return addLeadingZeros(localDayOfWeek, 2)\n // 1st, 2nd, ..., 7th\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {unit: 'day'})\n case 'eee':\n return localize.day(dayOfWeek, {width: 'abbreviated', context: 'formatting'})\n // T\n case 'eeeee':\n return localize.day(dayOfWeek, {width: 'narrow', context: 'formatting'})\n // Tu\n case 'eeeeee':\n return localize.day(dayOfWeek, {width: 'short', context: 'formatting'})\n // Tuesday\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {width: 'wide', context: 'formatting'})\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = ((dayOfWeek - options.weekStartsOn + 8) % 7) || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek)\n // Padded numberical value\n case 'cc':\n return addLeadingZeros(localDayOfWeek, token.length)\n // 1st, 2nd, ..., 7th\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {unit: 'day'})\n case 'ccc':\n return localize.day(dayOfWeek, {width: 'abbreviated', context: 'standalone'})\n // T\n case 'ccccc':\n return localize.day(dayOfWeek, {width: 'narrow', context: 'standalone'})\n // Tu\n case 'cccccc':\n return localize.day(dayOfWeek, {width: 'short', context: 'standalone'})\n // Tuesday\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {width: 'wide', context: 'standalone'})\n }\n },\n\n // ISO day of week\n i: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek)\n // 02\n case 'ii':\n return addLeadingZeros(isoDayOfWeek, token.length)\n // 2nd\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {unit: 'day'})\n // Tue\n case 'iii':\n return localize.day(dayOfWeek, {width: 'abbreviated', context: 'formatting'})\n // T\n case 'iiiii':\n return localize.day(dayOfWeek, {width: 'narrow', context: 'formatting'})\n // Tu\n case 'iiiiii':\n return localize.day(dayOfWeek, {width: 'short', context: 'formatting'})\n // Tuesday\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {width: 'wide', context: 'formatting'})\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = (hours / 12) >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {width: 'abbreviated', context: 'formatting'})\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {width: 'narrow', context: 'formatting'})\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {width: 'wide', context: 'formatting'})\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = (hours / 12) >= 1 ? 'pm' : 'am';\n }\n\n switch (token) {\n case 'b':\n case 'bb':\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {width: 'abbreviated', context: 'formatting'})\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {width: 'narrow', context: 'formatting'})\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {width: 'wide', context: 'formatting'})\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {width: 'abbreviated', context: 'formatting'})\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {width: 'narrow', context: 'formatting'})\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {width: 'wide', context: 'formatting'})\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize, options) {\n var hours = date.getUTCHours() % 12;\n\n if (hours === 0) {\n hours = 12;\n }\n\n if (token === 'ho') {\n return localize.ordinalNumber(hours, {unit: 'hour'})\n }\n\n return addLeadingZeros(hours, token.length)\n },\n\n // Hour [0-23]\n H: function (date, token, localize, options) {\n var hours = date.getUTCHours();\n\n if (token === 'Ho') {\n return localize.ordinalNumber(hours, {unit: 'hour'})\n }\n\n return addLeadingZeros(hours, token.length)\n },\n\n // Hour [0-11]\n K: function (date, token, localize, options) {\n var hours = date.getUTCHours() % 12;\n\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {unit: 'hour'})\n }\n\n return addLeadingZeros(hours, token.length)\n },\n\n // Hour [1-24]\n k: function (date, token, localize, options) {\n var hours = date.getUTCHours();\n\n if (hours === 0) {\n hours = 24;\n }\n\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {unit: 'hour'})\n }\n\n return addLeadingZeros(hours, token.length)\n },\n\n // Minute\n m: function (date, token, localize, options) {\n var minutes = date.getUTCMinutes();\n\n if (token === 'mo') {\n return localize.ordinalNumber(minutes, {unit: 'minute'})\n }\n\n return addLeadingZeros(minutes, token.length)\n },\n\n // Second\n s: function (date, token, localize, options) {\n var seconds = date.getUTCSeconds();\n\n if (token === 'so') {\n return localize.ordinalNumber(seconds, {unit: 'second'})\n }\n\n return addLeadingZeros(seconds, token.length)\n },\n\n // Fraction of second\n S: function (date, token, localize, options) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return addLeadingZeros(fractionalSeconds, numberOfDigits)\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return 'Z'\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset)\n\n // Hours, minutes and optional seconds without `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case 'XXXX':\n case 'XX': // Hours and minutes without `:` delimeter\n return formatTimezone(timezoneOffset)\n\n // Hours, minutes and optional seconds with `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimeter\n default:\n return formatTimezone(timezoneOffset, ':')\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset)\n\n // Hours, minutes and optional seconds without `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case 'xxxx':\n case 'xx': // Hours and minutes without `:` delimeter\n return formatTimezone(timezoneOffset)\n\n // Hours, minutes and optional seconds with `:` delimeter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimeter\n default:\n return formatTimezone(timezoneOffset, ':')\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':')\n // Long\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':')\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':')\n // Long\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':')\n }\n },\n\n // Seconds timestamp\n t: function (date, token, localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length)\n },\n\n // Milliseconds timestamp\n T: function (date, token, localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return addLeadingZeros(timestamp, token.length)\n }\n};\n\nfunction addLeadingZeros (number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n while (output.length < targetLength) {\n output = '0' + output;\n }\n return sign + output\n}\n\nfunction formatTimezone (offset, dirtyDelimeter) {\n var delimeter = dirtyDelimeter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimeter + minutes\n}\n\nfunction formatTimezoneWithOptionalMinutes (offset, dirtyDelimeter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2)\n }\n return formatTimezone(offset, dirtyDelimeter)\n}\n\nfunction formatTimezoneShort (offset, dirtyDelimeter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours)\n }\n var delimeter = dirtyDelimeter || '';\n return sign + String(hours) + delimeter + addLeadingZeros(minutes, 2)\n}\n\nfunction dateLongFormatter (pattern, formatLong, options) {\n switch (pattern) {\n case 'P':\n return formatLong.date({width: 'short'})\n case 'PP':\n return formatLong.date({width: 'medium'})\n case 'PPP':\n return formatLong.date({width: 'long'})\n case 'PPPP':\n default:\n return formatLong.date({width: 'full'})\n }\n}\n\nfunction timeLongFormatter (pattern, formatLong, options) {\n switch (pattern) {\n case 'p':\n return formatLong.time({width: 'short'})\n case 'pp':\n return formatLong.time({width: 'medium'})\n case 'ppp':\n return formatLong.time({width: 'long'})\n case 'pppp':\n default:\n return formatLong.time({width: 'full'})\n }\n}\n\nfunction dateTimeLongFormatter (pattern, formatLong, options) {\n var matchResult = pattern.match(/(P+)(p+)?/);\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong)\n }\n\n var dateTimeFormat;\n\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({width: 'short'});\n break\n case 'PP':\n dateTimeFormat = formatLong.dateTime({width: 'medium'});\n break\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({width: 'long'});\n break\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({width: 'full'});\n break\n }\n\n return dateTimeFormat\n .replace('{{date}}', dateLongFormatter(datePattern, formatLong))\n .replace('{{time}}', timeLongFormatter(timePattern, formatLong))\n}\n\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\n\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from 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 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 milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * var result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\nfunction subMilliseconds (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 = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount, dirtyOptions)\n}\n\nvar protectedTokens = ['D', 'DD', 'YY', 'YYYY'];\n\nfunction isProtectedToken(token) {\n return protectedTokens.indexOf(token) !== -1\n}\n\nfunction throwProtectedError(token) {\n throw new RangeError(\n '`options.awareOfUnicodeTokens` must be set to `true` to use `' +\n token +\n '` token; see: https://git.io/fxCyr'\n )\n}\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nvar escapedStringRegExp = /^'(.*?)'?$/;\nvar doubleQuoteRegExp = /''/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. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 8 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 8 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Su | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Su | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Su, Sa | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Su | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Su | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | AM, PM | a..aaa | AM, PM | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bbb | AM, PM, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 1, 2, ..., 11, 0 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 0001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 05/29/1453 | 7 |\n * | | PP | May 29, 1453 | 7 |\n * | | PPP | May 29th, 1453 | 7 |\n * | | PPPP | Sunday, May 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 05/29/1453, 12:00 AM | 7 |\n * | | PPpp | May 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | May 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Sunday, May 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. These tokens are often confused with others. See: https://git.io/fxCyr\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 {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {Boolean} [options.awareOfUnicodeTokens=false] - if true, allows usage of Unicode tokens causes confusion:\n * - Some of the day of year tokens (`D`, `DD`) that are confused with the day of month tokens (`d`, `dd`).\n * - Some of the local week-numbering year tokens (`YY`, `YYYY`) that are confused with the calendar year tokens (`yy`, `yyyy`).\n * See: https://git.io/fxCyr\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 * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.awareOfUnicodeTokens` must be set to `true` to use `XX` token; see: https://git.io/fxCyr\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 *\n * @example\n * // Escape string by single quote characters:\n * var result = format(\n * new Date(2014, 6, 2, 15),\n * \"h 'o''clock'\"\n * )\n * //=> \"3 o'clock\"\n */\nfunction format(dirtyDate, dirtyFormatStr, dirtyOptions) {\n if (arguments.length < 2) {\n throw new TypeError(\n '2 arguments required, but only ' + arguments.length + ' present'\n )\n }\n\n var formatStr = String(dirtyFormatStr);\n var options = dirtyOptions || {};\n\n var locale = options.locale || locale$1;\n\n var localeFirstWeekContainsDate =\n locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate =\n localeFirstWeekContainsDate == null\n ? 1\n : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate =\n options.firstWeekContainsDate == null\n ? defaultFirstWeekContainsDate\n : toInteger(options.firstWeekContainsDate);\n\n // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError(\n 'firstWeekContainsDate must be between 1 and 7 inclusively'\n )\n }\n\n var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn =\n localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn =\n options.weekStartsOn == null\n ? defaultWeekStartsOn\n : toInteger(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 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 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 = getTimezoneOffsetInMilliseconds(originalDate);\n var utcDate = subMilliseconds(originalDate, timezoneOffset, options);\n\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n\n var result = formatStr\n .match(longFormattingTokensRegExp)\n .map(function(substring) {\n var firstCharacter = substring[0];\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong, formatterOptions)\n }\n return substring\n })\n .join('')\n .match(formattingTokensRegExp)\n .map(function(substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\"\n }\n\n var firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring)\n }\n\n var formatter = formatters[firstCharacter];\n if (formatter) {\n if (!options.awareOfUnicodeTokens && isProtectedToken(substring)) {\n throwProtectedError(substring);\n }\n return formatter(utcDate, substring, locale.localize, formatterOptions)\n }\n\n return substring\n })\n .join('');\n\n return result\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\")\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\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 if (arguments.length < 2) {\n throw new TypeError('2 arguments required, but only ' + arguments.length + ' present')\n }\n\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(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 = toInteger(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 setUTCWeek (dirtyDate, dirtyWeek, 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 week = toInteger(dirtyWeek);\n var diff = getUTCWeek(date, dirtyOptions) - week;\n date.setUTCDate(date.getUTCDate() - diff * 7);\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 if (arguments.length < 2) {\n throw new TypeError('2 arguments required, but only ' + arguments.length + ' present')\n }\n\n var day = toInteger(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 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 isoWeek = toInteger(dirtyISOWeek);\n var diff = getUTCISOWeek(date, dirtyOptions) - isoWeek;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date\n}\n\nvar MILLISECONDS_IN_HOUR$1 = 3600000;\nvar MILLISECONDS_IN_MINUTE$2 = 60000;\nvar MILLISECONDS_IN_SECOND = 1000;\n\nvar numericPatterns = {\n month: /^(1[0-2]|0?\\d)/, // 0 to 12\n date: /^(3[0-1]|[0-2]?\\d)/, // 0 to 31\n dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/, // 0 to 366\n week: /^(5[0-3]|[0-4]?\\d)/, // 0 to 53\n hour23h: /^(2[0-3]|[0-1]?\\d)/, // 0 to 23\n hour24h: /^(2[0-4]|[0-1]?\\d)/, // 0 to 24\n hour11h: /^(1[0-1]|0?\\d)/, // 0 to 11\n hour12h: /^(1[0-2]|0?\\d)/, // 0 to 12\n minute: /^[0-5]?\\d/, // 0 to 59\n second: /^[0-5]?\\d/, // 0 to 59\n\n singleDigit: /^\\d/, // 0 to 9\n twoDigits: /^\\d{1,2}/, // 0 to 99\n threeDigits: /^\\d{1,3}/, // 0 to 999\n fourDigits: /^\\d{1,4}/, // 0 to 9999\n\n anyDigitsSigned: /^-?\\d+/,\n singleDigitSigned: /^-?\\d/, // 0 to 9, -0 to -9\n twoDigitsSigned: /^-?\\d{1,2}/, // 0 to 99, -0 to -99\n threeDigitsSigned: /^-?\\d{1,3}/, // 0 to 999, -0 to -999\n fourDigitsSigned: /^-?\\d{1,4}/ // 0 to 9999, -0 to -9999\n};\n\nvar timezonePatterns = {\n basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/\n};\n\nfunction parseNumericPattern (pattern, string, valueCallback) {\n var matchResult = string.match(pattern);\n\n if (!matchResult) {\n return null\n }\n\n var value = parseInt(matchResult[0], 10);\n\n return {\n value: valueCallback ? valueCallback(value) : value,\n rest: string.slice(matchResult[0].length)\n }\n}\n\nfunction parseTimezonePattern (pattern, string) {\n var matchResult = string.match(pattern);\n\n if (!matchResult) {\n return null\n }\n\n // Input is 'Z'\n if (matchResult[0] === 'Z') {\n return {\n value: 0,\n rest: string.slice(1)\n }\n }\n\n var sign = matchResult[1] === '+' ? 1 : -1;\n var hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n var minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n var seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n\n return {\n value: sign * (\n hours * MILLISECONDS_IN_HOUR$1 +\n minutes * MILLISECONDS_IN_MINUTE$2 +\n seconds * MILLISECONDS_IN_SECOND\n ),\n rest: string.slice(matchResult[0].length)\n }\n}\n\nfunction parseAnyDigitsSigned (string, valueCallback) {\n return parseNumericPattern(numericPatterns.anyDigitsSigned, string, valueCallback)\n}\n\nfunction parseNDigits (n, string, valueCallback) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigit, string, valueCallback)\n case 2:\n return parseNumericPattern(numericPatterns.twoDigits, string, valueCallback)\n case 3:\n return parseNumericPattern(numericPatterns.threeDigits, string, valueCallback)\n case 4:\n return parseNumericPattern(numericPatterns.fourDigits, string, valueCallback)\n default:\n return parseNumericPattern(new RegExp('^\\\\d{1,' + n + '}'), string, valueCallback)\n }\n}\n\nfunction parseNDigitsSigned (n, string, valueCallback) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigitSigned, string, valueCallback)\n case 2:\n return parseNumericPattern(numericPatterns.twoDigitsSigned, string, valueCallback)\n case 3:\n return parseNumericPattern(numericPatterns.threeDigitsSigned, string, valueCallback)\n case 4:\n return parseNumericPattern(numericPatterns.fourDigitsSigned, string, valueCallback)\n default:\n return parseNumericPattern(new RegExp('^-?\\\\d{1,' + n + '}'), string, valueCallback)\n }\n}\n\nfunction dayPeriodEnumToHours (enumValue) {\n switch (enumValue) {\n case 'morning':\n return 4\n case 'evening':\n return 17\n case 'pm':\n case 'noon':\n case 'afternoon':\n return 12\n case 'am':\n case 'midnight':\n case 'night':\n default:\n return 0\n }\n}\n\nfunction normalizeTwoDigitYear (twoDigitYear, currentYear) {\n var isCommonEra = currentYear > 0;\n // Absolute number of the current year:\n // 1 -> 1 AC\n // 0 -> 1 BC\n // -1 -> 2 BC\n var absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n\n var result;\n if (absCurrentYear <= 50) {\n result = twoDigitYear || 100;\n } else {\n var rangeEnd = absCurrentYear + 50;\n var rangeEndCentury = Math.floor(rangeEnd / 100) * 100;\n var isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n }\n\n return isCommonEra ? result : 1 - result\n}\n\nvar DAYS_IN_MONTH$1 = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar DAYS_IN_MONTH_LEAP_YEAR$1 = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\n// User for validation\nfunction isLeapYearIndex$1 (year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0)\n}\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O* | Timezone (GMT) |\n * | p | | P | |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n */\nvar parsers = {\n // Era\n G: {\n priority: 140,\n parse: function (string, token, match, options) {\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return match.era(string, {width: 'abbreviated'}) ||\n match.era(string, {width: 'narrow'})\n // A, B\n case 'GGGGG':\n return match.era(string, {width: 'narrow'})\n // Anno Domini, Before Christ\n case 'GGGG':\n default:\n return match.era(string, {width: 'wide'}) ||\n match.era(string, {width: 'abbreviated'}) ||\n match.era(string, {width: 'narrow'})\n }\n },\n set: function (date, value, options) {\n // Sets year 10 BC if BC, or 10 AC if AC\n date.setUTCFullYear(value === 1 ? 10 : -9, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Year\n y: {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n priority: 130,\n parse: function (string, token, match, options) {\n var valueCallback = function (year) {\n return {\n year: year,\n isTwoDigitYear: token === 'yy'\n }\n };\n\n switch (token) {\n case 'y':\n return parseNDigits(4, string, valueCallback)\n case 'yo':\n return match.ordinalNumber(string, {unit: 'year', valueCallback: valueCallback})\n default:\n return parseNDigits(token.length, string, valueCallback)\n }\n },\n validate: function (date, value, options) {\n return value.isTwoDigitYear || value.year > 0\n },\n set: function (date, value, options) {\n var currentYear = getUTCWeekYear(date, options);\n\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n\n var year = currentYear > 0 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Local week-numbering year\n Y: {\n priority: 130,\n parse: function (string, token, match, options) {\n var valueCallback = function (year) {\n return {\n year: year,\n isTwoDigitYear: token === 'YY'\n }\n };\n\n switch (token) {\n case 'Y':\n return parseNDigits(4, string, valueCallback)\n case 'Yo':\n return match.ordinalNumber(string, {unit: 'year', valueCallback: valueCallback})\n default:\n return parseNDigits(token.length, string, valueCallback)\n }\n },\n validate: function (date, value, options) {\n return value.isTwoDigitYear || value.year > 0\n },\n set: function (date, value, options) {\n var currentYear = date.getUTCFullYear();\n\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options)\n }\n\n var year = currentYear > 0 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options)\n }\n },\n\n // ISO week-numbering year\n R: {\n priority: 130,\n parse: function (string, token, match, options) {\n if (token === 'R') {\n return parseNDigitsSigned(4, string)\n }\n\n return parseNDigitsSigned(token.length, string)\n },\n set: function (date, value, options) {\n var firstWeekOfYear = new Date(0);\n firstWeekOfYear.setUTCFullYear(value, 0, 4);\n firstWeekOfYear.setUTCHours(0, 0, 0, 0);\n return startOfUTCISOWeek(firstWeekOfYear)\n }\n },\n\n // Extended year\n u: {\n priority: 130,\n parse: function (string, token, match, options) {\n if (token === 'u') {\n return parseNDigitsSigned(4, string)\n }\n\n return parseNDigitsSigned(token.length, string)\n },\n set: function (date, value, options) {\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Quarter\n Q: {\n priority: 120,\n parse: function (string, token, match, options) {\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n case 'QQ': // 01, 02, 03, 04\n return parseNDigits(token.length, string)\n // 1st, 2nd, 3rd, 4th\n case 'Qo':\n return match.ordinalNumber(string, {unit: 'quarter'})\n // Q1, Q2, Q3, Q4\n case 'QQQ':\n return match.quarter(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.quarter(string, {width: 'narrow', context: 'formatting'})\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'QQQQQ':\n return match.quarter(string, {width: 'narrow', context: 'formatting'})\n // 1st quarter, 2nd quarter, ...\n case 'QQQQ':\n default:\n return match.quarter(string, {width: 'wide', context: 'formatting'}) ||\n match.quarter(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.quarter(string, {width: 'narrow', context: 'formatting'})\n }\n },\n validate: function (date, value, options) {\n return value >= 1 && value <= 4\n },\n set: function (date, value, options) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Stand-alone quarter\n q: {\n priority: 120,\n parse: function (string, token, match, options) {\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n case 'qq': // 01, 02, 03, 04\n return parseNDigits(token.length, string)\n // 1st, 2nd, 3rd, 4th\n case 'qo':\n return match.ordinalNumber(string, {unit: 'quarter'})\n // Q1, Q2, Q3, Q4\n case 'qqq':\n return match.quarter(string, {width: 'abbreviated', context: 'standalone'}) ||\n match.quarter(string, {width: 'narrow', context: 'standalone'})\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case 'qqqqq':\n return match.quarter(string, {width: 'narrow', context: 'standalone'})\n // 1st quarter, 2nd quarter, ...\n case 'qqqq':\n default:\n return match.quarter(string, {width: 'wide', context: 'standalone'}) ||\n match.quarter(string, {width: 'abbreviated', context: 'standalone'}) ||\n match.quarter(string, {width: 'narrow', context: 'standalone'})\n }\n },\n validate: function (date, value, options) {\n return value >= 1 && value <= 4\n },\n set: function (date, value, options) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Month\n M: {\n priority: 110,\n parse: function (string, token, match, options) {\n var valueCallback = function (value) {\n return value - 1\n };\n\n switch (token) {\n // 1, 2, ..., 12\n case 'M':\n return parseNumericPattern(numericPatterns.month, string, valueCallback)\n // 01, 02, ..., 12\n case 'MM':\n return parseNDigits(2, string, valueCallback)\n // 1st, 2nd, ..., 12th\n case 'Mo':\n return match.ordinalNumber(string, {unit: 'month', valueCallback: valueCallback})\n // Jan, Feb, ..., Dec\n case 'MMM':\n return match.month(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.month(string, {width: 'narrow', context: 'formatting'})\n // J, F, ..., D\n case 'MMMMM':\n return match.month(string, {width: 'narrow', context: 'formatting'})\n // January, February, ..., December\n case 'MMMM':\n default:\n return match.month(string, {width: 'wide', context: 'formatting'}) ||\n match.month(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.month(string, {width: 'narrow', context: 'formatting'})\n }\n },\n validate: function (date, value, options) {\n return value >= 0 && value <= 11\n },\n set: function (date, value, options) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Stand-alone month\n L: {\n priority: 110,\n parse: function (string, token, match, options) {\n var valueCallback = function (value) {\n return value - 1\n };\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return parseNumericPattern(numericPatterns.month, string, valueCallback)\n // 01, 02, ..., 12\n case 'LL':\n return parseNDigits(2, string, valueCallback)\n // 1st, 2nd, ..., 12th\n case 'Lo':\n return match.ordinalNumber(string, {unit: 'month', valueCallback: valueCallback})\n // Jan, Feb, ..., Dec\n case 'LLL':\n return match.month(string, {width: 'abbreviated', context: 'standalone'}) ||\n match.month(string, {width: 'narrow', context: 'standalone'})\n // J, F, ..., D\n case 'LLLLL':\n return match.month(string, {width: 'narrow', context: 'standalone'})\n // January, February, ..., December\n case 'LLLL':\n default:\n return match.month(string, {width: 'wide', context: 'standalone'}) ||\n match.month(string, {width: 'abbreviated', context: 'standalone'}) ||\n match.month(string, {width: 'narrow', context: 'standalone'})\n }\n },\n validate: function (date, value, options) {\n return value >= 0 && value <= 11\n },\n set: function (date, value, options) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Local week of year\n w: {\n priority: 100,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'w':\n return parseNumericPattern(numericPatterns.week, string)\n case 'wo':\n return match.ordinalNumber(string, {unit: 'week'})\n default:\n return parseNDigits(token.length, string)\n }\n },\n validate: function (date, value, options) {\n return value >= 1 && value <= 53\n },\n set: function (date, value, options) {\n return startOfUTCWeek(setUTCWeek(date, value, options), options)\n }\n },\n\n // ISO week of year\n I: {\n priority: 100,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'I':\n return parseNumericPattern(numericPatterns.week, string)\n case 'Io':\n return match.ordinalNumber(string, {unit: 'week'})\n default:\n return parseNDigits(token.length, string)\n }\n },\n validate: function (date, value, options) {\n return value >= 1 && value <= 53\n },\n set: function (date, value, options) {\n return startOfUTCISOWeek(setUTCISOWeek(date, value, options), options)\n }\n },\n\n // Day of the month\n d: {\n priority: 90,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'd':\n return parseNumericPattern(numericPatterns.date, string)\n case 'do':\n return match.ordinalNumber(string, {unit: 'date'})\n default:\n return parseNDigits(token.length, string)\n }\n },\n validate: function (date, value, options) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex$1(year);\n var month = date.getUTCMonth();\n if (isLeapYear) {\n return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR$1[month]\n } else {\n return value >= 1 && value <= DAYS_IN_MONTH$1[month]\n }\n },\n set: function (date, value, options) {\n date.setUTCDate(value);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Day of year\n D: {\n priority: 90,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'D':\n case 'DD':\n return parseNumericPattern(numericPatterns.dayOfYear, string)\n case 'Do':\n return match.ordinalNumber(string, {unit: 'date'})\n default:\n return parseNDigits(token.length, string)\n }\n },\n validate: function (date, value, options) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex$1(year);\n if (isLeapYear) {\n return value >= 1 && value <= 366\n } else {\n return value >= 1 && value <= 365\n }\n },\n set: function (date, value, options) {\n date.setUTCMonth(0, value);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Day of week\n E: {\n priority: 90,\n parse: function (string, token, match, options) {\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return match.day(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.day(string, {width: 'short', context: 'formatting'}) ||\n match.day(string, {width: 'narrow', context: 'formatting'})\n // T\n case 'EEEEE':\n return match.day(string, {width: 'narrow', context: 'formatting'})\n // Tu\n case 'EEEEEE':\n return match.day(string, {width: 'short', context: 'formatting'}) ||\n match.day(string, {width: 'narrow', context: 'formatting'})\n // Tuesday\n case 'EEEE':\n default:\n return match.day(string, {width: 'wide', context: 'formatting'}) ||\n match.day(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.day(string, {width: 'short', context: 'formatting'}) ||\n match.day(string, {width: 'narrow', context: 'formatting'})\n }\n },\n validate: function (date, value, options) {\n return value >= 0 && value <= 6\n },\n set: function (date, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Local day of week\n e: {\n priority: 90,\n parse: function (string, token, match, options) {\n var valueCallback = function (value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays\n };\n\n switch (token) {\n // 3\n case 'e':\n case 'ee': // 03\n return parseNDigits(token.length, string, valueCallback)\n // 3rd\n case 'eo':\n return match.ordinalNumber(string, {unit: 'day', valueCallback: valueCallback})\n // Tue\n case 'eee':\n return match.day(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.day(string, {width: 'short', context: 'formatting'}) ||\n match.day(string, {width: 'narrow', context: 'formatting'})\n // T\n case 'eeeee':\n return match.day(string, {width: 'narrow', context: 'formatting'})\n // Tu\n case 'eeeeee':\n return match.day(string, {width: 'short', context: 'formatting'}) ||\n match.day(string, {width: 'narrow', context: 'formatting'})\n // Tuesday\n case 'eeee':\n default:\n return match.day(string, {width: 'wide', context: 'formatting'}) ||\n match.day(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.day(string, {width: 'short', context: 'formatting'}) ||\n match.day(string, {width: 'narrow', context: 'formatting'})\n }\n },\n validate: function (date, value, options) {\n return value >= 0 && value <= 6\n },\n set: function (date, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // Stand-alone local day of week\n c: {\n priority: 90,\n parse: function (string, token, match, options) {\n var valueCallback = function (value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays\n };\n\n switch (token) {\n // 3\n case 'c':\n case 'cc': // 03\n return parseNDigits(token.length, string, valueCallback)\n // 3rd\n case 'co':\n return match.ordinalNumber(string, {unit: 'day', valueCallback: valueCallback})\n // Tue\n case 'ccc':\n return match.day(string, {width: 'abbreviated', context: 'standalone'}) ||\n match.day(string, {width: 'short', context: 'standalone'}) ||\n match.day(string, {width: 'narrow', context: 'standalone'})\n // T\n case 'ccccc':\n return match.day(string, {width: 'narrow', context: 'standalone'})\n // Tu\n case 'cccccc':\n return match.day(string, {width: 'short', context: 'standalone'}) ||\n match.day(string, {width: 'narrow', context: 'standalone'})\n // Tuesday\n case 'cccc':\n default:\n return match.day(string, {width: 'wide', context: 'standalone'}) ||\n match.day(string, {width: 'abbreviated', context: 'standalone'}) ||\n match.day(string, {width: 'short', context: 'standalone'}) ||\n match.day(string, {width: 'narrow', context: 'standalone'})\n }\n },\n validate: function (date, value, options) {\n return value >= 0 && value <= 6\n },\n set: function (date, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // ISO day of week\n i: {\n priority: 90,\n parse: function (string, token, match, options) {\n var valueCallback = function (value) {\n if (value === 0) {\n return 7\n }\n return value\n };\n\n switch (token) {\n // 2\n case 'i':\n case 'ii': // 02\n return parseNDigits(token.length, string)\n // 2nd\n case 'io':\n return match.ordinalNumber(string, {unit: 'day'})\n // Tue\n case 'iii':\n return match.day(string, {width: 'abbreviated', context: 'formatting', valueCallback: valueCallback}) ||\n match.day(string, {width: 'short', context: 'formatting', valueCallback: valueCallback}) ||\n match.day(string, {width: 'narrow', context: 'formatting', valueCallback: valueCallback})\n // T\n case 'iiiii':\n return match.day(string, {width: 'narrow', context: 'formatting', valueCallback: valueCallback})\n // Tu\n case 'iiiiii':\n return match.day(string, {width: 'short', context: 'formatting', valueCallback: valueCallback}) ||\n match.day(string, {width: 'narrow', context: 'formatting', valueCallback: valueCallback})\n // Tuesday\n case 'iiii':\n default:\n return match.day(string, {width: 'wide', context: 'formatting', valueCallback: valueCallback}) ||\n match.day(string, {width: 'abbreviated', context: 'formatting', valueCallback: valueCallback}) ||\n match.day(string, {width: 'short', context: 'formatting', valueCallback: valueCallback}) ||\n match.day(string, {width: 'narrow', context: 'formatting', valueCallback: valueCallback})\n }\n },\n validate: function (date, value, options) {\n return value >= 1 && value <= 7\n },\n set: function (date, value, options) {\n date = setUTCISODay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date\n }\n },\n\n // AM or PM\n a: {\n priority: 80,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'a':\n case 'aa':\n case 'aaa':\n return match.dayPeriod(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.dayPeriod(string, {width: 'narrow', context: 'formatting'})\n case 'aaaaa':\n return match.dayPeriod(string, {width: 'narrow', context: 'formatting'})\n case 'aaaa':\n default:\n return match.dayPeriod(string, {width: 'wide', context: 'formatting'}) ||\n match.dayPeriod(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.dayPeriod(string, {width: 'narrow', context: 'formatting'})\n }\n },\n set: function (date, value, options) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date\n }\n },\n\n // AM, PM, midnight\n b: {\n priority: 80,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'b':\n case 'bb':\n case 'bbb':\n return match.dayPeriod(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.dayPeriod(string, {width: 'narrow', context: 'formatting'})\n case 'bbbbb':\n return match.dayPeriod(string, {width: 'narrow', context: 'formatting'})\n case 'bbbb':\n default:\n return match.dayPeriod(string, {width: 'wide', context: 'formatting'}) ||\n match.dayPeriod(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.dayPeriod(string, {width: 'narrow', context: 'formatting'})\n }\n },\n set: function (date, value, options) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: {\n priority: 80,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return match.dayPeriod(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.dayPeriod(string, {width: 'narrow', context: 'formatting'})\n case 'BBBBB':\n return match.dayPeriod(string, {width: 'narrow', context: 'formatting'})\n case 'BBBB':\n default:\n return match.dayPeriod(string, {width: 'wide', context: 'formatting'}) ||\n match.dayPeriod(string, {width: 'abbreviated', context: 'formatting'}) ||\n match.dayPeriod(string, {width: 'narrow', context: 'formatting'})\n }\n },\n set: function (date, value, options) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date\n }\n },\n\n // Hour [1-12]\n h: {\n priority: 70,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'h':\n return parseNumericPattern(numericPatterns.hour12h, string)\n case 'ho':\n return match.ordinalNumber(string, {unit: 'hour'})\n default:\n return parseNDigits(token.length, string)\n }\n },\n validate: function (date, value, options) {\n return value >= 1 && value <= 12\n },\n set: function (date, value, options) {\n var isPM = date.getUTCHours() >= 12;\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else if (!isPM && value === 12) {\n date.setUTCHours(0, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n return date\n }\n },\n\n // Hour [0-23]\n H: {\n priority: 70,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'H':\n return parseNumericPattern(numericPatterns.hour23h, string)\n case 'Ho':\n return match.ordinalNumber(string, {unit: 'hour'})\n default:\n return parseNDigits(token.length, string)\n }\n },\n validate: function (date, value, options) {\n return value >= 0 && value <= 23\n },\n set: function (date, value, options) {\n date.setUTCHours(value, 0, 0, 0);\n return date\n }\n },\n\n // Hour [0-11]\n K: {\n priority: 70,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'K':\n return parseNumericPattern(numericPatterns.hour11h, string)\n case 'Ko':\n return match.ordinalNumber(string, {unit: 'hour'})\n default:\n return parseNDigits(token.length, string)\n }\n },\n validate: function (date, value, options) {\n return value >= 0 && value <= 11\n },\n set: function (date, value, options) {\n var isPM = date.getUTCHours() >= 12;\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n return date\n }\n },\n\n // Hour [1-24]\n k: {\n priority: 70,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'k':\n return parseNumericPattern(numericPatterns.hour24h, string)\n case 'ko':\n return match.ordinalNumber(string, {unit: 'hour'})\n default:\n return parseNDigits(token.length, string)\n }\n },\n validate: function (date, value, options) {\n return value >= 1 && value <= 24\n },\n set: function (date, value, options) {\n var hours = value <= 24 ? value % 24 : value;\n date.setUTCHours(hours, 0, 0, 0);\n return date\n }\n },\n\n // Minute\n m: {\n priority: 60,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'm':\n return parseNumericPattern(numericPatterns.minute, string)\n case 'mo':\n return match.ordinalNumber(string, {unit: 'minute'})\n default:\n return parseNDigits(token.length, string)\n }\n },\n validate: function (date, value, options) {\n return value >= 0 && value <= 59\n },\n set: function (date, value, options) {\n date.setUTCMinutes(value, 0, 0);\n return date\n }\n },\n\n // Second\n s: {\n priority: 50,\n parse: function (string, token, match, options) {\n switch (token) {\n case 's':\n return parseNumericPattern(numericPatterns.second, string)\n case 'so':\n return match.ordinalNumber(string, {unit: 'second'})\n default:\n return parseNDigits(token.length, string)\n }\n },\n validate: function (date, value, options) {\n return value >= 0 && value <= 59\n },\n set: function (date, value, options) {\n date.setUTCSeconds(value, 0);\n return date\n }\n },\n\n // Fraction of second\n S: {\n priority: 40,\n parse: function (string, token, match, options) {\n var valueCallback = function (value) {\n return Math.floor(value * Math.pow(10, -token.length + 3))\n };\n return parseNDigits(token.length, string, valueCallback)\n },\n set: function (date, value, options) {\n date.setUTCMilliseconds(value);\n return date\n }\n },\n\n // Timezone (ISO-8601. +00:00 is `'Z'`)\n X: {\n priority: 20,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'X':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, string)\n case 'XX':\n return parseTimezonePattern(timezonePatterns.basic, string)\n case 'XXXX':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, string)\n case 'XXXXX':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, string)\n case 'XXX':\n default:\n return parseTimezonePattern(timezonePatterns.extended, string)\n }\n },\n set: function (date, value, options) {\n return new Date(date.getTime() - value)\n }\n },\n\n // Timezone (ISO-8601)\n x: {\n priority: 20,\n parse: function (string, token, match, options) {\n switch (token) {\n case 'x':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, string)\n case 'xx':\n return parseTimezonePattern(timezonePatterns.basic, string)\n case 'xxxx':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, string)\n case 'xxxxx':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, string)\n case 'xxx':\n default:\n return parseTimezonePattern(timezonePatterns.extended, string)\n }\n },\n set: function (date, value, options) {\n return new Date(date.getTime() - value)\n }\n },\n\n // Seconds timestamp\n t: {\n priority: 10,\n parse: function (string, token, match, options) {\n return parseAnyDigitsSigned(string)\n },\n set: function (date, value, options) {\n return new Date(value * 1000)\n }\n },\n\n // Milliseconds timestamp\n T: {\n priority: 10,\n parse: function (string, token, match, options) {\n return parseAnyDigitsSigned(string)\n },\n set: function (date, value, options) {\n return new Date(value)\n }\n }\n};\n\nvar TIMEZONE_UNIT_PRIORITY = 20;\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nvar formattingTokensRegExp$1 = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\nvar escapedStringRegExp$1 = /^'(.*?)'?$/;\nvar doubleQuoteRegExp$1 = /''/g;\n\nvar notWhitespaceRegExp = /\\S/;\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 string.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Accepted format string patterns:\n * | Unit |Prior| Pattern | Result examples | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era | 140 | G..GGG | AD, BC | |\n * | | | GGGG | Anno Domini, Before Christ | 2 |\n * | | | GGGGG | A, B | |\n * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |\n * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | yy | 44, 01, 00, 17 | 4 |\n * | | | yyy | 044, 001, 123, 999 | 4 |\n * | | | yyyy | 0044, 0001, 1900, 2017 | 4 |\n * | | | yyyyy | ... | 2,4 |\n * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |\n * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | YY | 44, 01, 00, 17 | 4,6 |\n * | | | YYY | 044, 001, 123, 999 | 4 |\n * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |\n * | | | YYYYY | ... | 2,4 |\n * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |\n * | | | RR | -43, 01, 00, 17 | 4,5 |\n * | | | RRR | -043, 001, 123, 999, -999 | 4,5 |\n * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |\n * | | | RRRRR | ... | 2,4,5 |\n * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |\n * | | | uu | -43, 01, 99, -99 | 4 |\n * | | | uuu | -043, 001, 123, 999, -999 | 4 |\n * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |\n * | | | uuuuu | ... | 2,4 |\n * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |\n * | | | Qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | QQ | 01, 02, 03, 04 | |\n * | | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |\n * | | | qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | qq | 01, 02, 03, 04 | |\n * | | | qqq | Q1, Q2, Q3, Q4 | |\n * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | | qqqqq | 1, 2, 3, 4 | 3 |\n * | Month (formatting) | 110 | M | 1, 2, ..., 12 | |\n * | | | Mo | 1st, 2nd, ..., 12th | 5 |\n * | | | MM | 01, 02, ..., 12 | |\n * | | | MMM | Jan, Feb, ..., Dec | |\n * | | | MMMM | January, February, ..., December | 2 |\n * | | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |\n * | | | Lo | 1st, 2nd, ..., 12th | 5 |\n * | | | LL | 01, 02, ..., 12 | |\n * | | | LLL | Jan, Feb, ..., Dec | |\n * | | | LLLL | January, February, ..., December | 2 |\n * | | | LLLLL | J, F, ..., D | |\n * | Local week of year | 100 | w | 1, 2, ..., 53 | |\n * | | | wo | 1st, 2nd, ..., 53th | 5 |\n * | | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |\n * | | | Io | 1st, 2nd, ..., 53th | 5 |\n * | | | II | 01, 02, ..., 53 | 5 |\n * | Day of month | 90 | d | 1, 2, ..., 31 | |\n * | | | do | 1st, 2nd, ..., 31st | 5 |\n * | | | dd | 01, 02, ..., 31 | |\n * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 6 |\n * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |\n * | | | DD | 01, 02, ..., 365, 366 | 6 |\n * | | | DDD | 001, 002, ..., 365, 366 | |\n * | | | DDDD | ... | 2 |\n * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Su | |\n * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | | EEEEE | M, T, W, T, F, S, S | |\n * | | | EEEEEE | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |\n * | | | io | 1st, 2nd, ..., 7th | 5 |\n * | | | ii | 01, 02, ..., 07 | 5 |\n * | | | iii | Mon, Tue, Wed, ..., Su | 5 |\n * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |\n * | | | iiiii | M, T, W, T, F, S, S | 5 |\n * | | | iiiiii | Mo, Tu, We, Th, Fr, Su, Sa | 5 |\n * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |\n * | | | eo | 2nd, 3rd, ..., 1st | 5 |\n * | | | ee | 02, 03, ..., 01 | |\n * | | | eee | Mon, Tue, Wed, ..., Su | |\n * | | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | | eeeee | M, T, W, T, F, S, S | |\n * | | | eeeeee | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |\n * | | | co | 2nd, 3rd, ..., 1st | 5 |\n * | | | cc | 02, 03, ..., 01 | |\n * | | | ccc | Mon, Tue, Wed, ..., Su | |\n * | | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | | ccccc | M, T, W, T, F, S, S | |\n * | | | cccccc | Mo, Tu, We, Th, Fr, Su, Sa | |\n * | AM, PM | 80 | a..aaa | AM, PM | |\n * | | | aaaa | a.m., p.m. | 2 |\n * | | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |\n * | | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | | bbbbb | a, p, n, mi | |\n * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |\n * | | | BBBB | at night, in the morning, ... | 2 |\n * | | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |\n * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |\n * | | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |\n * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |\n * | | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |\n * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |\n * | | | KK | 1, 2, ..., 11, 0 | |\n * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |\n * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |\n * | | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | 60 | m | 0, 1, ..., 59 | |\n * | | | mo | 0th, 1st, ..., 59th | 5 |\n * | | | mm | 00, 01, ..., 59 | |\n * | Second | 50 | s | 0, 1, ..., 59 | |\n * | | | so | 0th, 1st, ..., 59th | 5 |\n * | | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | 40 | S | 0, 1, ..., 9 | |\n * | | | SS | 00, 01, ..., 99 | |\n * | | | SSS | 000, 0001, ..., 999 | |\n * | | | SSSS | ... | 2 |\n * | Timezone (ISO-8601 w/ Z) | 20 | X | -08, +0530, Z | |\n * | | | XX | -0800, +0530, Z | |\n * | | | XXX | -08:00, +05:30, Z | |\n * | | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | 20 | x | -08, +0530, +00 | |\n * | | | xx | -0800, +0530, +0000 | |\n * | | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Seconds timestamp | 10 | t | 512969520 | |\n * | | | tt | ... | 2 |\n * | Milliseconds timestamp | 10 | T | 512969520900 | |\n * | | | TT | ... | 2 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular.\n * In `format` function, they will produce different result:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * `parse` will try to match both formatting and stand-alone units interchangably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table:\n * - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n * as wide as the sequence\n * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n * These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` will try to guess the century of two digit year by proximity with `baseDate`:\n *\n * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n * while `uu` will just assign the year as is:\n *\n * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [setISOWeekYear]{@link https://date-fns.org/docs/setISOWeekYear}\n * and [setWeekYear]{@link https://date-fns.org/docs/setWeekYear}).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `o`: ordinal number modifier\n *\n * 6. These tokens are often confused with others. See: https://git.io/fxCyr\n *\n * Values will be assigned to the date in the descending 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 * 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 - defines values missing from the parsed dateString\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 * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @param {Boolean} [options.awareOfUnicodeTokens=false] - if true, allows usage of Unicode tokens causes confusion:\n * - Some of the day of year tokens (`D`, `DD`) that are confused with the day of month tokens (`d`, `dd`).\n * - Some of the local week-numbering year tokens (`YY`, `YYYY`) that are confused with the calendar year tokens (`yy`, `yyyy`).\n * See: https://git.io/fxCyr\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.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.locale` must contain `match` property\n * @throws {RangeError} `options.awareOfUnicodeTokens` must be set to `true` to use `XX` token; see: https://git.io/fxCyr\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 Esperanto locale in the context of 2010 year:\n * import eo 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: eo}\n * )\n * //=> Sun Feb 28 2010 00:00:00\n */\nfunction parse(\n dirtyDateString,\n dirtyFormatString,\n dirtyBaseDate,\n dirtyOptions\n) {\n if (arguments.length < 3) {\n throw new TypeError(\n '3 arguments required, but only ' + arguments.length + ' present'\n )\n }\n\n var dateString = String(dirtyDateString);\n var formatString = String(dirtyFormatString);\n var options = dirtyOptions || {};\n\n var locale = options.locale || locale$1;\n\n if (!locale.match) {\n throw new RangeError('locale must contain match property')\n }\n\n var localeFirstWeekContainsDate =\n locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate =\n localeFirstWeekContainsDate == null\n ? 1\n : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate =\n options.firstWeekContainsDate == null\n ? defaultFirstWeekContainsDate\n : toInteger(options.firstWeekContainsDate);\n\n // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError(\n 'firstWeekContainsDate must be between 1 and 7 inclusively'\n )\n }\n\n var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn =\n localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn =\n options.weekStartsOn == null\n ? defaultWeekStartsOn\n : toInteger(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 if (formatString === '') {\n if (dateString === '') {\n return toDate(dirtyBaseDate, options)\n } else {\n return new Date(NaN)\n }\n }\n\n var subFnOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale\n };\n\n // If timezone isn't specified, it will be set to the system timezone\n var setters = [\n {\n priority: TIMEZONE_UNIT_PRIORITY,\n set: dateToSystemTimezone,\n index: 0\n }\n ];\n\n var i;\n\n var tokens = formatString.match(formattingTokensRegExp$1);\n\n for (i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (!options.awareOfUnicodeTokens && isProtectedToken(token)) {\n throwProtectedError(token);\n }\n\n var firstCharacter = token[0];\n var parser = parsers[firstCharacter];\n if (parser) {\n var parseResult = parser.parse(\n dateString,\n token,\n locale.match,\n subFnOptions\n );\n\n if (!parseResult) {\n return new Date(NaN)\n }\n\n setters.push({\n priority: parser.priority,\n set: parser.set,\n validate: parser.validate,\n value: parseResult.value,\n index: setters.length\n });\n\n dateString = parseResult.rest;\n } else {\n // Replace two single quote characters with one single quote character\n if (token === \"''\") {\n token = \"'\";\n } else if (firstCharacter === \"'\") {\n token = cleanEscapedString$1(token);\n }\n\n // Cut token from string, or, if string doesn't match the token, return Invalid Date\n if (dateString.indexOf(token) === 0) {\n dateString = dateString.slice(token.length);\n } else {\n return new Date(NaN)\n }\n }\n }\n\n // Check if the remaining input contains something other than whitespace\n if (dateString.length > 0 && notWhitespaceRegExp.test(dateString)) {\n return new Date(NaN)\n }\n\n var uniquePrioritySetters = setters\n .map(function(setter) {\n return setter.priority\n })\n .sort(function(a, b) {\n return b - a\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 = subMilliseconds(date, getTimezoneOffsetInMilliseconds(date));\n\n for (i = 0; i < uniquePrioritySetters.length; i++) {\n var setter = uniquePrioritySetters[i];\n\n if (\n setter.validate &&\n !setter.validate(utcDate, setter.value, subFnOptions)\n ) {\n return new Date(NaN)\n }\n\n utcDate = setter.set(utcDate, setter.value, subFnOptions);\n }\n\n return utcDate\n}\n\nfunction dateToSystemTimezone(date) {\n var convertedDate = new Date(0);\n convertedDate.setFullYear(\n date.getUTCFullYear(),\n date.getUTCMonth(),\n date.getUTCDate()\n );\n convertedDate.setHours(\n date.getUTCHours(),\n date.getUTCMinutes(),\n date.getUTCSeconds(),\n date.getUTCMilliseconds()\n );\n return convertedDate\n}\n\nfunction cleanEscapedString$1(input) {\n return input.match(escapedStringRegExp$1)[1].replace(doubleQuoteRegExp$1, \"'\")\n}\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 afterValidator = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var targetValue = ref.targetValue;\n var inclusion = ref.inclusion; if ( inclusion === void 0 ) inclusion = false;\n var format = ref.format;\n\n if (typeof format === 'undefined') {\n format = inclusion;\n inclusion = false;\n }\n\n value = parseDate$1(value, format);\n targetValue = parseDate$1(targetValue, format);\n\n // if either is not valid.\n if (!value || !targetValue) {\n return false;\n }\n\n return isAfter(value, targetValue) || (inclusion && isEqual$1(value, targetValue));\n};\n\nvar options = {\n hasTarget: true,\n isDate: true\n};\n\n// required to convert from a list of array values to an object.\nvar paramNames = ['targetValue', 'inclusion', 'format'];\n\nvar after = {\n validate: afterValidator,\n options: options,\n paramNames: paramNames\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 = {\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 fa: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,\n fr: /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,\n it: /^[A-Z\\xC0-\\xFF]*$/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 sv: /^[A-ZÅÄÖ]*$/i,\n tr: /^[A-ZÇĞİıÖŞÜ]*$/i,\n uk: /^[А-ЩЬЮЯЄІЇҐ]*$/i,\n ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,\n az: /^[A-ZÇƏĞİıÖŞÜ]*$/i\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 fa: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی\\s]*$/,\n fr: /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\\s]*$/i,\n it: /^[A-Z\\xC0-\\xFF\\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 sv: /^[A-ZÅÄÖ\\s]*$/i,\n tr: /^[A-ZÇĞİıÖŞÜ\\s]*$/i,\n uk: /^[А-ЩЬЮЯЄІЇҐ\\s]*$/i,\n ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\\s]*$/,\n az: /^[A-ZÇƏĞİıÖŞÜ\\s]*$/i\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 fa: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,\n fr: /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,\n it: /^[0-9A-Z\\xC0-\\xFF]*$/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 sv: /^[0-9A-ZÅÄÖ]*$/i,\n tr: /^[0-9A-ZÇĞİıÖŞÜ]*$/i,\n uk: /^[0-9А-ЩЬЮЯЄІЇҐ]*$/i,\n ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,\n az: /^[0-9A-ZÇƏĞİıÖŞÜ]*$/i\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 fa: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی_-]*$/,\n fr: /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,\n it: /^[0-9A-Z\\xC0-\\xFF_-]*$/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 sv: /^[0-9A-ZÅÄÖ_-]*$/i,\n tr: /^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,\n uk: /^[0-9А-ЩЬЮЯЄІЇҐ_-]*$/i,\n ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/,\n az: /^[0-9A-ZÇƏĞİıÖŞÜ_-]*$/i\n};\n\nvar validate = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var locale = ref.locale;\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).some(function (loc) { return alpha[loc].test(value); });\n }\n\n return (alpha[locale] || alpha.en).test(value);\n};\n\nvar paramNames$1 = ['locale'];\n\nvar alpha$1 = {\n validate: validate,\n paramNames: paramNames$1\n};\n\nvar validate$1 = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var locale = ref.locale;\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 paramNames$2 = ['locale'];\n\nvar alpha_dash = {\n validate: validate$1,\n paramNames: paramNames$2\n};\n\nvar validate$2 = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var locale = ref.locale;\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 paramNames$3 = ['locale'];\n\nvar alpha_num = {\n validate: validate$2,\n paramNames: paramNames$3\n};\n\nvar validate$3 = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var locale = ref.locale;\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 paramNames$4 = ['locale'];\n\nvar alpha_spaces = {\n validate: validate$3,\n paramNames: paramNames$4\n};\n\nvar validate$4 = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var targetValue = ref.targetValue;\n var inclusion = ref.inclusion; if ( inclusion === void 0 ) inclusion = false;\n var format = ref.format;\n\n if (typeof format === 'undefined') {\n format = inclusion;\n inclusion = false;\n }\n\n value = parseDate$1(value, format);\n targetValue = parseDate$1(targetValue, format);\n\n // if either is not valid.\n if (!value || !targetValue) {\n return false;\n }\n\n return isBefore(value, targetValue) || (inclusion && isEqual$1(value, targetValue));\n};\n\nvar options$1 = {\n hasTarget: true,\n isDate: true\n};\n\nvar paramNames$5 = ['targetValue', 'inclusion', 'format'];\n\nvar before = {\n validate: validate$4,\n options: options$1,\n paramNames: paramNames$5\n};\n\nvar validate$5 = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var min = ref.min;\n var max = ref.max;\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$5(val, { min: min, max: max }); });\n }\n\n return Number(min) <= value && Number(max) >= value;\n};\n\nvar paramNames$6 = ['min', 'max'];\n\nvar between = {\n validate: validate$5,\n paramNames: paramNames$6\n};\n\nvar validate$6 = function (value, ref) {\n var targetValue = ref.targetValue;\n\n return String(value) === String(targetValue);\n};\nvar options$2 = {\n hasTarget: true\n};\n\nvar paramNames$7 = ['targetValue'];\n\nvar confirmed = {\n validate: validate$6,\n options: options$2,\n paramNames: paramNames$7\n};\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\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = assertString;\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction assertString(input) {\n var isString = typeof input === 'string' || input instanceof String;\n\n if (!isString) {\n var invalidType;\n\n if (input === null) {\n invalidType = 'null';\n } else {\n invalidType = _typeof(input);\n\n if (invalidType === 'object' && input.constructor && input.constructor.hasOwnProperty('name')) {\n invalidType = input.constructor.name;\n } else {\n invalidType = \"a \".concat(invalidType);\n }\n }\n\n throw new TypeError(\"Expected string but received \".concat(invalidType, \".\"));\n }\n}\n\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n});\n\nunwrapExports(assertString_1);\n\nvar isCreditCard_1 = createCommonjsModule(function (module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isCreditCard;\n\nvar _assertString = _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}|6[27][0-9]{14})$/;\n/* eslint-enable max-len */\n\nfunction isCreditCard(str) {\n (0, _assertString.default)(str);\n var sanitized = str.replace(/[- ]+/g, '');\n\n if (!creditCard.test(sanitized)) {\n return false;\n }\n\n var sum = 0;\n var digit;\n var tmpNum;\n var shouldDouble;\n\n for (var i = sanitized.length - 1; i >= 0; i--) {\n digit = sanitized.substring(i, i + 1);\n tmpNum = parseInt(digit, 10);\n\n if (shouldDouble) {\n tmpNum *= 2;\n\n if (tmpNum >= 10) {\n sum += tmpNum % 10 + 1;\n } else {\n sum += tmpNum;\n }\n } else {\n sum += tmpNum;\n }\n\n shouldDouble = !shouldDouble;\n }\n\n return !!(sum % 10 === 0 ? sanitized : false);\n}\n\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n});\n\nvar isCreditCard = unwrapExports(isCreditCard_1);\n\nvar validate$7 = function (value) { return isCreditCard(String(value)); };\n\nvar credit_card = {\n validate: validate$7\n};\n\nvar validate$8 = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var min = ref.min;\n var max = ref.max;\n var inclusivity = ref.inclusivity; if ( inclusivity === void 0 ) inclusivity = '()';\n var format = ref.format;\n\n if (typeof format === 'undefined') {\n format = inclusivity;\n inclusivity = '()';\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 options$3 = {\n isDate: true\n};\n\nvar paramNames$8 = ['min', 'max', 'inclusivity', 'format'];\n\nvar date_between = {\n validate: validate$8,\n options: options$3,\n paramNames: paramNames$8\n};\n\nvar validate$9 = function (value, ref) {\n var format = ref.format;\n\n return !!parseDate$1(value, format);\n};\n\nvar options$4 = {\n isDate: true\n};\n\nvar paramNames$9 = ['format'];\n\nvar date_format = {\n validate: validate$9,\n options: options$4,\n paramNames: paramNames$9\n};\n\nvar validate$a = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var decimals = ref.decimals; if ( decimals === void 0 ) decimals = '*';\n var separator = ref.separator; if ( separator === void 0 ) separator = '.';\n\n if (isNullOrUndefined(value) || value === '') {\n return false;\n }\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$a(val, { decimals: decimals, separator: separator }); });\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 + \")?([eE]{1}[-]?\\\\d+)?$\"));\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 paramNames$a = ['decimals', 'separator'];\n\nvar decimal = {\n validate: validate$a,\n paramNames: paramNames$a\n};\n\nvar validate$b = function (value, ref) {\n var length = ref[0];\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$b(val, [length]); });\n }\n var strVal = String(value);\n\n return /^[0-9]*$/.test(strVal) && strVal.length === Number(length);\n};\n\nvar digits = {\n validate: validate$b\n};\n\nvar imageRegex = /\\.(jpg|svg|jpeg|png|bmp|gif)$/i;\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 validate$c = function (files, ref) {\n var width = ref[0];\n var height = ref[1];\n\n var images = ensureArray(files).filter(function (file) { return imageRegex.test(file.name); });\n if (images.length === 0) {\n return false;\n }\n return Promise.all(images.map(function (image) { return validateImage(image, width, height); }));\n};\n\nvar dimensions = {\n validate: validate$c\n};\n\nvar merge_1 = createCommonjsModule(function (module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = merge;\n\nfunction merge() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaults = arguments.length > 1 ? arguments[1] : undefined;\n\n for (var key in defaults) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = defaults[key];\n }\n }\n\n return obj;\n}\n\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n});\n\nunwrapExports(merge_1);\n\nvar isByteLength_1 = createCommonjsModule(function (module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isByteLength;\n\nvar _assertString = _interopRequireDefault(assertString_1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* eslint-disable prefer-rest-params */\nfunction isByteLength(str, options) {\n (0, _assertString.default)(str);\n var min;\n var max;\n\n if (_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\n var len = encodeURI(str).split(/%..|./).length - 1;\n return len >= min && (typeof max === 'undefined' || len <= max);\n}\n\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n});\n\nunwrapExports(isByteLength_1);\n\nvar isFQDN_1 = createCommonjsModule(function (module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isFQDN;\n\nvar _assertString = _interopRequireDefault(assertString_1);\n\nvar _merge = _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 isFQDN(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, default_fqdn_options);\n /* Remove the optional trailing dot before checking validity */\n\n if (options.allow_trailing_dot && str[str.length - 1] === '.') {\n str = str.substring(0, str.length - 1);\n }\n\n var parts = str.split('.');\n\n for (var i = 0; i < parts.length; i++) {\n if (parts[i].length > 63) {\n return false;\n }\n }\n\n if (options.require_tld) {\n var tld = parts.pop();\n\n if (!parts.length || !/^([a-z\\u00a1-\\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {\n return false;\n } // disallow spaces\n\n\n if (/[\\s\\u2002-\\u200B\\u202F\\u205F\\u3000\\uFEFF\\uDB40\\uDC20]/.test(tld)) {\n return false;\n }\n }\n\n for (var part, _i = 0; _i < parts.length; _i++) {\n part = parts[_i];\n\n if (options.allow_underscores) {\n part = part.replace(/_/g, '');\n }\n\n if (!/^[a-z\\u00a1-\\uffff0-9-]+$/i.test(part)) {\n return false;\n } // disallow full-width chars\n\n\n if (/[\\uff01-\\uff5e]/.test(part)) {\n return false;\n }\n\n if (part[0] === '-' || part[part.length - 1] === '-') {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n});\n\nvar isFQDN = unwrapExports(isFQDN_1);\n\nvar isIP_1 = createCommonjsModule(function (module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isIP;\n\nvar _assertString = _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 (0, _assertString.default)(str);\n version = String(version);\n\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\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 // 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\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 } // initial or final ::\n\n\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\n foundOmissionBlock = true;\n } else if (foundIPv4TransitionBlock && i === blocks.length - 1) ; else if (!ipv6Block.test(blocks[i])) {\n return false;\n }\n }\n\n if (foundOmissionBlock) {\n return blocks.length >= 1;\n }\n\n return blocks.length === expectedNumberOfBlocks;\n }\n\n return false;\n}\n\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n});\n\nvar isIP = unwrapExports(isIP_1);\n\nvar isEmail_1 = createCommonjsModule(function (module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isEmail;\n\nvar _assertString = _interopRequireDefault(assertString_1);\n\nvar _merge = _interopRequireDefault(merge_1);\n\nvar _isByteLength = _interopRequireDefault(isByteLength_1);\n\nvar _isFQDN = _interopRequireDefault(isFQDN_1);\n\nvar _isIP = _interopRequireDefault(isIP_1);\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/* eslint-disable max-len */\n\n/* eslint-disable no-control-regex */\n\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 gmailUserPart = /^[a-z\\d]+$/;\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\n/* eslint-enable no-control-regex */\n\nfunction isEmail(str, options) {\n (0, _assertString.default)(str);\n options = (0, _merge.default)(options, default_email_options);\n\n if (options.require_display_name || options.allow_display_name) {\n var display_email = str.match(displayName);\n\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 var lower_domain = domain.toLowerCase();\n\n if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) {\n /*\n Previously we removed dots for gmail addresses before validating.\n This was removed because it allows `multiple..dots@gmail.com`\n to be reported as valid, but it is not.\n Gmail only normalizes single dots, removing them from here is pointless,\n should be done in normalizeEmail\n */\n user = user.toLowerCase(); // Removing sub-address from username before gmail validation\n\n var username = user.split('+')[0]; // Dots are not included in gmail length restriction\n\n if (!(0, _isByteLength.default)(username.replace('.', ''), {\n min: 6,\n max: 30\n })) {\n return false;\n }\n\n var _user_parts = username.split('.');\n\n for (var i = 0; i < _user_parts.length; i++) {\n if (!gmailUserPart.test(_user_parts[i])) {\n return false;\n }\n }\n }\n\n if (!(0, _isByteLength.default)(user, {\n max: 64\n }) || !(0, _isByteLength.default)(domain, {\n max: 254\n })) {\n return false;\n }\n\n if (!(0, _isFQDN.default)(domain, {\n require_tld: options.require_tld\n })) {\n if (!options.allow_ip_domain) {\n return false;\n }\n\n if (!(0, _isIP.default)(domain)) {\n if (!domain.startsWith('[') || !domain.endsWith(']')) {\n return false;\n }\n\n var noBracketdomain = domain.substr(1, domain.length - 2);\n\n if (noBracketdomain.length === 0 || !(0, _isIP.default)(noBracketdomain)) {\n return false;\n }\n }\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 var user_parts = user.split('.');\n\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}\n\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n});\n\nvar isEmail = unwrapExports(isEmail_1);\n\nfunction objectWithoutProperties (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; }\n\nvar validate$d = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var multiple = ref.multiple; if ( multiple === void 0 ) multiple = false;\n var rest = objectWithoutProperties( ref, [\"multiple\"] );\n var options = rest;\n\n if (multiple && !Array.isArray(value)) {\n value = String(value).split(',').map(function (emailStr) { return emailStr.trim(); });\n }\n\n var validatorOptions = assign({}, options);\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return isEmail(String(val), validatorOptions); });\n }\n\n return isEmail(String(value), validatorOptions);\n};\n\nvar email = {\n validate: validate$d\n};\n\nvar validate$e = function (value, options) {\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$e(val, options); });\n }\n\n return toArray(options).some(function (item) {\n // eslint-disable-next-line\n return item == value;\n });\n};\n\nvar included = {\n validate: validate$e\n};\n\nvar validate$f = function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return !validate$e.apply(void 0, args);\n};\n\nvar excluded = {\n validate: validate$f\n};\n\nvar validate$g = function (files, extensions) {\n var regex = new RegExp((\".(\" + (extensions.join('|')) + \")$\"), 'i');\n return ensureArray(files).every(function (file) { return regex.test(file.name); });\n};\n\nvar ext = {\n validate: validate$g\n};\n\nvar validate$h = function (files) { return (Array.isArray(files) ? files : [files]).every(function (file) { return /\\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(file.name); }); };\n\nvar image = {\n validate: validate$h\n};\n\nvar validate$i = 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 integer = {\n validate: validate$i\n};\n\nvar validate$j = function (value, ref) {\n if ( ref === void 0 ) ref = {};\n var version = ref.version; 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 paramNames$b = ['version'];\n\nvar ip = {\n validate: validate$j,\n paramNames: paramNames$b\n};\n\nvar validate$k = function (value) {\n if (isNullOrUndefined(value)) {\n value = '';\n }\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return (isIP(val, '') || isFQDN(val)); });\n }\n\n return isIP(value, '') || isFQDN(value);\n};\n\nvar ip_or_fqdn = {\n validate: validate$k\n};\n\nvar validate$l = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var other = ref[0];\n\n return value === other;\n};\n\nvar is = {\n validate: validate$l\n};\n\nvar validate$m = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var other = ref[0];\n\n return value !== other;\n};\n\nvar is_not = {\n validate: validate$m\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 validate$n = function (value, ref) {\n var length = ref[0];\n var max = ref[1]; if ( max === void 0 ) max = undefined;\n\n if (isNullOrUndefined(value)) {\n return false;\n }\n\n length = Number(length);\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 length = {\n validate: validate$n\n};\n\nvar validate$o = function (value, ref) {\n var length = ref[0];\n\n if (isNullOrUndefined(value)) {\n return length >= 0;\n }\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$o(val, [length]); });\n }\n\n return String(value).length <= length;\n};\n\nvar max = {\n validate: validate$o\n};\n\nvar validate$p = function (value, ref) {\n var max = ref[0];\n\n if (isNullOrUndefined(value) || value === '') {\n return false;\n }\n\n if (Array.isArray(value)) {\n return value.length > 0 && value.every(function (val) { return validate$p(val, [max]); });\n }\n\n return Number(value) <= max;\n};\n\nvar max_value = {\n validate: validate$p\n};\n\nvar validate$q = function (files, mimes) {\n var regex = new RegExp(((mimes.join('|').replace('*', '.+')) + \"$\"), 'i');\n return ensureArray(files).every(function (file) { return regex.test(file.type); });\n};\n\nvar mimes = {\n validate: validate$q\n};\n\nvar validate$r = function (value, ref) {\n var length = ref[0];\n\n if (isNullOrUndefined(value)) {\n return false;\n }\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$r(val, [length]); });\n }\n\n return String(value).length >= length;\n};\n\nvar min = {\n validate: validate$r\n};\n\nvar validate$s = function (value, ref) {\n var min = ref[0];\n\n if (isNullOrUndefined(value) || value === '') {\n return false;\n }\n\n if (Array.isArray(value)) {\n return value.length > 0 && value.every(function (val) { return validate$s(val, [min]); });\n }\n\n return Number(value) >= min;\n};\n\nvar min_value = {\n validate: validate$s\n};\n\nvar ar = /^[٠١٢٣٤٥٦٧٨٩]+$/;\nvar en = /^[0-9]+$/;\n\nvar validate$t = function (value) {\n var testValue = function (val) {\n var strValue = String(val);\n\n return en.test(strValue) || ar.test(strValue);\n };\n\n if (Array.isArray(value)) {\n return value.every(testValue);\n }\n\n return testValue(value);\n};\n\nvar numeric = {\n validate: validate$t\n};\n\nvar validate$u = function (value, ref) {\n var expression = ref.expression;\n\n if (typeof expression === 'string') {\n expression = new RegExp(expression);\n }\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return validate$u(val, { expression: expression }); });\n }\n\n return expression.test(String(value));\n};\n\nvar paramNames$c = ['expression'];\n\nvar regex = {\n validate: validate$u,\n paramNames: paramNames$c\n};\n\nvar validate$v = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var invalidateFalse = ref[0]; if ( invalidateFalse === void 0 ) invalidateFalse = false;\n\n if (isNullOrUndefined(value) || isEmptyArray(value)) {\n return false;\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 return !!String(value).trim().length;\n};\n\nvar required = {\n validate: validate$v\n};\n\nvar validate$w = function (value, ref) {\n if ( ref === void 0 ) ref = [];\n var otherFieldVal = ref[0];\n var possibleVals = ref.slice(1);\n\n var required = possibleVals.includes(String(otherFieldVal).trim());\n\n if (!required) {\n return {\n valid: true,\n data: {\n required: required\n }\n };\n }\n\n var invalid = (isEmptyArray(value) || [false, null, undefined].includes(value));\n\n invalid = invalid || !String(value).trim().length;\n\n return {\n valid: !invalid,\n data: {\n required: required\n }\n };\n};\n\nvar options$5 = {\n hasTarget: true,\n computesRequired: true\n};\n\nvar required_if = {\n validate: validate$w,\n options: options$5\n};\n\nvar validate$x = function (files, ref) {\n var size = ref[0];\n\n if (isNaN(size)) {\n return false;\n }\n var nSize = Number(size) * 1024;\n return ensureArray(files).every(function (file) { return file.size <= nSize; });\n};\n\nvar size = {\n validate: validate$x\n};\n\nvar isURL_1 = createCommonjsModule(function (module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isURL;\n\nvar _assertString = _interopRequireDefault(assertString_1);\n\nvar _isFQDN = _interopRequireDefault(isFQDN_1);\n\nvar _isIP = _interopRequireDefault(isIP_1);\n\nvar _merge = _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};\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\n if (host === match || isRegExp(match) && match.test(host)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isURL(url, options) {\n (0, _assertString.default)(url);\n\n if (!url || url.length >= 2083 || /[\\s<>]/.test(url)) {\n return false;\n }\n\n if (url.indexOf('mailto:') === 0) {\n return false;\n }\n\n options = (0, _merge.default)(options, default_url_options);\n var protocol, auth, host, hostname, port, port_str, split, ipv6;\n split = url.split('#');\n url = split.shift();\n split = url.split('?');\n url = split.shift();\n split = url.split('://');\n\n if (split.length > 1) {\n protocol = split.shift().toLowerCase();\n\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 (url.substr(0, 2) === '//') {\n if (!options.allow_protocol_relative_urls) {\n return false;\n }\n\n split[0] = url.substr(2);\n }\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\n if (split.length > 1) {\n if (options.disallow_auth) {\n return false;\n }\n\n auth = split.shift();\n\n if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) {\n return false;\n }\n }\n\n hostname = split.join('@');\n port_str = null;\n ipv6 = null;\n var ipv6_match = hostname.match(wrapped_ipv6);\n\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\n if (split.length) {\n port_str = split.join(':');\n }\n }\n\n if (port_str !== null) {\n port = parseInt(port_str, 10);\n\n if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {\n return false;\n }\n }\n\n if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.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\n if (options.host_blacklist && checkHost(host, options.host_blacklist)) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n});\n\nvar isURL = unwrapExports(isURL_1);\n\nvar validate$y = function (value, options) {\n if ( options === void 0 ) options = {};\n\n if (isNullOrUndefined(value)) {\n value = '';\n }\n\n var validatorOptions = assign({}, options);\n\n if (Array.isArray(value)) {\n return value.every(function (val) { return isURL(val, validatorOptions); });\n }\n\n return isURL(value, validatorOptions);\n};\n\nvar url = {\n validate: validate$y\n};\n\n/* eslint-disable camelcase */\n\nvar Rules = /*#__PURE__*/Object.freeze({\n after: after,\n alpha_dash: alpha_dash,\n alpha_num: alpha_num,\n alpha_spaces: alpha_spaces,\n alpha: alpha$1,\n before: before,\n between: between,\n confirmed: confirmed,\n credit_card: credit_card,\n date_between: date_between,\n date_format: date_format,\n decimal: decimal,\n digits: digits,\n dimensions: dimensions,\n email: email,\n ext: ext,\n image: image,\n included: included,\n integer: integer,\n length: length,\n ip: ip,\n ip_or_fqdn: ip_or_fqdn,\n is_not: is_not,\n is: is,\n max: max,\n max_value: max_value,\n mimes: mimes,\n min: min,\n min_value: min_value,\n excluded: excluded,\n numeric: numeric,\n regex: regex,\n required: required,\n required_if: required_if,\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 (includes(curr, '.')) {\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 $validator = null;\n\nvar PROVIDER_COUNTER = 0;\n\nvar ValidationProvider = {\n $__veeInject: false,\n inject: {\n $_veeObserver: {\n from: '$_veeObserver',\n default: function default$1 () {\n if (!this.$vnode.context.$_veeObserver) {\n this.$vnode.context.$_veeObserver = createObserver();\n }\n\n return this.$vnode.context.$_veeObserver;\n }\n }\n },\n props: {\n vid: {\n type: [String, Number],\n default: function () {\n PROVIDER_COUNTER++;\n\n return (\"_vee_\" + PROVIDER_COUNTER);\n }\n },\n name: {\n type: String,\n default: null\n },\n mode: {\n type: [String, Function],\n default: function () {\n return getConfig().mode;\n }\n },\n events: {\n type: Array,\n validate: function () {\n /* istanbul ignore next */\n if (process.env.NODE_ENV !== 'production') {\n warn('events prop and config will be deprecated in future version please use the interaction modes instead');\n }\n\n return true;\n },\n default: function () {\n var events = getConfig().events;\n if (typeof events === 'string') {\n return events.split('|');\n }\n\n return events;\n }\n },\n rules: {\n type: [Object, String],\n default: null\n },\n immediate: {\n type: Boolean,\n default: false\n },\n persist: {\n type: Boolean,\n default: false\n },\n bails: {\n type: Boolean,\n default: function () { return getConfig().fastExit; }\n },\n debounce: {\n type: Number,\n default: function () { return getConfig().delay || 0; }\n },\n tag: {\n type: String,\n default: 'span'\n },\n slim: {\n type: Boolean,\n default: false\n }\n },\n watch: {\n rules: {\n deep: true,\n handler: function handler (val, oldVal) {\n this._needsValidation = !isEqual(val, oldVal);\n }\n }\n },\n data: function () { return ({\n messages: [],\n value: undefined,\n initialized: false,\n initialValue: undefined,\n flags: createFlags(),\n failedRules: {},\n forceRequired: false,\n isDeactivated: false,\n id: null\n }); },\n computed: {\n isValid: function isValid () {\n return this.flags.valid;\n },\n fieldDeps: function fieldDeps () {\n var this$1 = this;\n\n var rules = normalizeRules(this.rules);\n\n return Object.keys(rules).filter(RuleContainer.isTargetRule).map(function (rule) {\n var depName = rules[rule][0];\n watchCrossFieldDep(this$1, depName);\n\n return depName;\n });\n },\n normalizedEvents: function normalizedEvents () {\n var this$1 = this;\n\n var ref = computeModeSetting(this);\n var on = ref.on;\n\n return normalizeEvents(on || this.events || []).map(function (e) {\n if (e === 'input') {\n return this$1._inputEventName;\n }\n\n return e;\n });\n },\n isRequired: function isRequired () {\n var rules = normalizeRules(this.rules);\n var forceRequired = this.forceRequired;\n\n var isRequired = rules.required || forceRequired;\n this.flags.required = isRequired;\n\n return isRequired;\n },\n classes: function classes () {\n var this$1 = this;\n\n var names = getConfig().classNames;\n return Object.keys(this.flags).reduce(function (classes, flag) {\n var className = (names && names[flag]) || flag;\n if (isNullOrUndefined(this$1.flags[flag])) {\n return classes;\n }\n\n if (className) {\n classes[className] = this$1.flags[flag];\n }\n\n return classes;\n }, {});\n }\n },\n render: function render (h) {\n var this$1 = this;\n\n this.registerField();\n var ctx = createValidationCtx(this);\n\n // Gracefully handle non-existent scoped slots.\n var slot = this.$scopedSlots.default;\n /* istanbul ignore next */\n if (!isCallable(slot)) {\n if (process.env.NODE_ENV !== 'production') {\n warn('ValidationProvider expects a scoped slot. Did you forget to add \"v-slot\" to your slot?');\n }\n\n return h(this.tag, this.$slots.default);\n }\n\n var nodes = slot(ctx);\n // Handle single-root slot.\n extractVNodes(nodes).forEach(function (input) {\n addListeners.call(this$1, input);\n });\n\n return this.slim ? createRenderless(h, nodes) : h(this.tag, nodes);\n },\n beforeDestroy: function beforeDestroy () {\n // cleanup reference.\n this.$_veeObserver.unsubscribe(this);\n },\n activated: function activated () {\n this.$_veeObserver.subscribe(this);\n this.isDeactivated = false;\n },\n deactivated: function deactivated () {\n this.$_veeObserver.unsubscribe(this);\n this.isDeactivated = true;\n },\n methods: {\n setFlags: function setFlags (flags) {\n var this$1 = this;\n\n Object.keys(flags).forEach(function (flag) {\n this$1.flags[flag] = flags[flag];\n });\n },\n syncValue: function syncValue (e) {\n var value = normalizeValue$1(e);\n this.value = value;\n this.flags.changed = this.initialValue !== value;\n },\n reset: function reset () {\n this.messages = [];\n this._pendingValidation = null;\n this.initialValue = this.value;\n var flags = createFlags();\n this.setFlags(flags);\n },\n validate: function validate () {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (args.length > 0) {\n this.syncValue(args[0]);\n }\n\n return this.validateSilent().then(function (result) {\n this$1.applyResult(result);\n\n return result;\n });\n },\n validateSilent: function validateSilent () {\n var this$1 = this;\n\n this.setFlags({ pending: true });\n\n return $validator.verify(this.value, this.rules, {\n name: this.name,\n values: createValuesLookup(this),\n bails: this.bails\n }).then(function (result) {\n this$1.setFlags({ pending: false });\n if (!this$1.isRequired) {\n this$1.setFlags({ valid: result.valid, invalid: !result.valid });\n }\n\n return result;\n });\n },\n applyResult: function applyResult (ref) {\n var errors = ref.errors;\n var failedRules = ref.failedRules;\n\n this.messages = errors;\n this.failedRules = assign({}, failedRules);\n this.setFlags({\n valid: !errors.length,\n changed: this.value !== this.initialValue,\n invalid: !!errors.length,\n validated: true\n });\n },\n registerField: function registerField () {\n if (!$validator) {\n $validator = getValidator() || new Validator(null, { fastExit: getConfig().fastExit });\n }\n\n updateRenderingContextRefs(this);\n }\n }\n};\n\nfunction createValidationCtx (ctx) {\n return {\n errors: ctx.messages,\n flags: ctx.flags,\n classes: ctx.classes,\n valid: ctx.isValid,\n failedRules: ctx.failedRules,\n reset: function () { return ctx.reset(); },\n validate: function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n return ctx.validate.apply(ctx, args);\n },\n aria: {\n 'aria-invalid': ctx.flags.invalid ? 'true' : 'false',\n 'aria-required': ctx.isRequired ? 'true' : 'false'\n }\n };\n}\n\nfunction normalizeValue$1 (value) {\n if (isEvent(value)) {\n return value.target.type === 'file' ? toArray(value.target.files) : value.target.value;\n }\n\n return value;\n}\n\n/**\n * Determines if a provider needs to run validation.\n */\nfunction shouldValidate (ctx, model) {\n // when an immediate/initial validation is needed and wasn't done before.\n if (!ctx._ignoreImmediate && ctx.immediate) {\n return true;\n }\n\n // when the value changes for whatever reason.\n if (ctx.value !== model.value) {\n return true;\n }\n\n // when it needs validation due to props/cross-fields changes.\n if (ctx._needsValidation) {\n return true;\n }\n\n // when the initial value is undefined and the field wasn't rendered yet.\n if (!ctx.initialized && model.value === undefined) {\n return true;\n }\n\n return false;\n}\n\nfunction computeModeSetting (ctx) {\n var compute = isCallable(ctx.mode) ? ctx.mode : modes[ctx.mode];\n\n return compute({\n errors: ctx.messages,\n value: ctx.value,\n flags: ctx.flags\n });\n}\n\nfunction onRenderUpdate (model) {\n if (!this.initialized) {\n this.initialValue = model.value;\n }\n\n var validateNow = shouldValidate(this, model);\n this._needsValidation = false;\n this.value = model.value;\n this._ignoreImmediate = true;\n\n if (!validateNow) {\n return;\n }\n\n this.validateSilent().then(this.immediate || this.flags.validated ? this.applyResult : function (x) { return x; });\n}\n\n// Creates the common handlers for a validatable context.\nfunction createCommonHandlers (ctx) {\n var onInput = function (e) {\n ctx.syncValue(e); // track and keep the value updated.\n ctx.setFlags({ dirty: true, pristine: false });\n };\n\n // Blur event listener.\n var onBlur = function () {\n ctx.setFlags({ touched: true, untouched: false });\n };\n\n var onValidate = ctx.$veeHandler;\n var mode = computeModeSetting(ctx);\n\n // Handle debounce changes.\n if (!onValidate || ctx.$veeDebounce !== ctx.debounce) {\n onValidate = debounce(\n function () {\n ctx.$nextTick(function () {\n var pendingPromise = ctx.validateSilent();\n // avoids race conditions between successive validations.\n ctx._pendingValidation = pendingPromise;\n pendingPromise.then(function (result) {\n if (pendingPromise === ctx._pendingValidation) {\n ctx.applyResult(result);\n ctx._pendingValidation = null;\n }\n });\n });\n },\n mode.debounce || ctx.debounce\n );\n\n // Cache the handler so we don't create it each time.\n ctx.$veeHandler = onValidate;\n // cache the debounce value so we detect if it was changed.\n ctx.$veeDebounce = ctx.debounce;\n }\n\n return { onInput: onInput, onBlur: onBlur, onValidate: onValidate };\n}\n\n// Adds all plugin listeners to the vnode.\nfunction addListeners (node) {\n var model = findModel(node);\n // cache the input eventName.\n this._inputEventName = this._inputEventName || getInputEventName(node, model);\n\n onRenderUpdate.call(this, model);\n\n var ref = createCommonHandlers(this);\n var onInput = ref.onInput;\n var onBlur = ref.onBlur;\n var onValidate = ref.onValidate;\n addVNodeListener(node, this._inputEventName, onInput);\n addVNodeListener(node, 'blur', onBlur);\n\n // add the validation listeners.\n this.normalizedEvents.forEach(function (evt) {\n addVNodeListener(node, evt, onValidate);\n });\n\n this.initialized = true;\n}\n\nfunction createValuesLookup (ctx) {\n var providers = ctx.$_veeObserver.refs;\n\n return ctx.fieldDeps.reduce(function (acc, depName) {\n if (!providers[depName]) {\n return acc;\n }\n\n acc[depName] = providers[depName].value;\n\n return acc;\n }, {});\n}\n\nfunction updateRenderingContextRefs (ctx) {\n // IDs should not be nullable.\n if (isNullOrUndefined(ctx.id) && ctx.id === ctx.vid) {\n ctx.id = PROVIDER_COUNTER;\n PROVIDER_COUNTER++;\n }\n\n var id = ctx.id;\n var vid = ctx.vid;\n // Nothing has changed.\n if (ctx.isDeactivated || (id === vid && ctx.$_veeObserver.refs[id])) {\n return;\n }\n\n // vid was changed.\n if (id !== vid && ctx.$_veeObserver.refs[id] === ctx) {\n ctx.$_veeObserver.unsubscribe({ vid: id });\n }\n\n ctx.$_veeObserver.subscribe(ctx);\n ctx.id = vid;\n}\n\nfunction createObserver () {\n return {\n refs: {},\n subscribe: function subscribe (ctx) {\n this.refs[ctx.vid] = ctx;\n },\n unsubscribe: function unsubscribe (ctx) {\n delete this.refs[ctx.vid];\n }\n };\n}\n\nfunction watchCrossFieldDep (ctx, depName, withHooks) {\n if ( withHooks === void 0 ) withHooks = true;\n\n var providers = ctx.$_veeObserver.refs;\n if (!ctx._veeWatchers) {\n ctx._veeWatchers = {};\n }\n\n if (!providers[depName] && withHooks) {\n return ctx.$once('hook:mounted', function () {\n watchCrossFieldDep(ctx, depName, false);\n });\n }\n\n if (!isCallable(ctx._veeWatchers[depName]) && providers[depName]) {\n ctx._veeWatchers[depName] = providers[depName].$watch('value', function () {\n if (ctx.flags.validated) {\n ctx._needsValidation = true;\n ctx.validate();\n }\n });\n }\n}\n\nvar flagMergingStrategy = {\n pristine: 'every',\n dirty: 'some',\n touched: 'some',\n untouched: 'every',\n valid: 'every',\n invalid: 'some',\n pending: 'some',\n validated: 'every'\n};\n\nfunction mergeFlags (lhs, rhs, strategy) {\n var stratName = flagMergingStrategy[strategy];\n\n return [lhs, rhs][stratName](function (f) { return f; });\n}\n\nvar OBSERVER_COUNTER = 0;\n\nvar ValidationObserver = {\n name: 'ValidationObserver',\n provide: function provide () {\n return {\n $_veeObserver: this\n };\n },\n inject: {\n $_veeObserver: {\n from: '$_veeObserver',\n default: function default$1 () {\n if (!this.$vnode.context.$_veeObserver) {\n return null;\n }\n\n return this.$vnode.context.$_veeObserver;\n }\n }\n },\n props: {\n tag: {\n type: String,\n default: 'span'\n },\n slim: {\n type: Boolean,\n default: false\n }\n },\n data: function () { return ({\n vid: (\"obs_\" + (OBSERVER_COUNTER++)),\n refs: {},\n observers: [],\n persistedStore: {}\n }); },\n computed: {\n ctx: function ctx () {\n var this$1 = this;\n\n var ctx = {\n errors: {},\n validate: function (arg) {\n var promise = this$1.validate(arg);\n\n return {\n then: function then (thenable) {\n return promise.then(function (success) {\n if (success && isCallable(thenable)) {\n return Promise.resolve(thenable());\n }\n\n return Promise.resolve(success);\n });\n }\n };\n },\n reset: function () { return this$1.reset(); }\n };\n\n return values(this.refs).concat( Object.keys(this.persistedStore).map(function (key) {\n return {\n vid: key,\n flags: this$1.persistedStore[key].flags,\n messages: this$1.persistedStore[key].errors\n };\n }),\n this.observers ).reduce(function (acc, provider) {\n Object.keys(flagMergingStrategy).forEach(function (flag) {\n var flags = provider.flags || provider.ctx;\n if (!(flag in acc)) {\n acc[flag] = flags[flag];\n return;\n }\n\n acc[flag] = mergeFlags(acc[flag], flags[flag], flag);\n });\n\n acc.errors[provider.vid] = provider.messages || values(provider.ctx.errors).reduce(function (errs, obsErrors) {\n return errs.concat(obsErrors);\n }, []);\n\n return acc;\n }, ctx);\n }\n },\n created: function created () {\n if (this.$_veeObserver) {\n this.$_veeObserver.subscribe(this, 'observer');\n }\n },\n activated: function activated () {\n if (this.$_veeObserver) {\n this.$_veeObserver.subscribe(this, 'observer');\n }\n },\n deactivated: function deactivated () {\n if (this.$_veeObserver) {\n this.$_veeObserver.unsubscribe(this, 'observer');\n }\n },\n beforeDestroy: function beforeDestroy () {\n if (this.$_veeObserver) {\n this.$_veeObserver.unsubscribe(this, 'observer');\n }\n },\n render: function render (h) {\n var slots = this.$slots.default || this.$scopedSlots.default || [];\n if (isCallable(slots)) {\n slots = slots(this.ctx);\n }\n\n return this.slim ? createRenderless(h, slots) : h(this.tag, { on: this.$listeners, attrs: this.$attrs }, slots);\n },\n methods: {\n subscribe: function subscribe (subscriber, kind) {\n var obj;\n\n if ( kind === void 0 ) kind = 'provider';\n if (kind === 'observer') {\n this.observers.push(subscriber);\n return;\n }\n\n this.refs = Object.assign({}, this.refs, ( obj = {}, obj[subscriber.vid] = subscriber, obj ));\n if (subscriber.persist && this.persistedStore[subscriber.vid]) {\n this.restoreProviderState(subscriber);\n }\n },\n unsubscribe: function unsubscribe (ref, kind) {\n var vid = ref.vid;\n if ( kind === void 0 ) kind = 'provider';\n\n if (kind === 'provider') {\n this.removeProvider(vid);\n }\n\n var idx = findIndex(this.observers, function (o) { return o.vid === vid; });\n if (idx !== -1) {\n this.observers.splice(idx, 1);\n }\n },\n validate: function validate (ref) {\n if ( ref === void 0 ) ref = { silent: false };\n var silent = ref.silent;\n\n return Promise.all(values(this.refs).map(function (ref) { return ref[silent ? 'validateSilent' : 'validate']().then(function (r) { return r.valid; }); }).concat( this.observers.map(function (obs) { return obs.validate({ silent: silent }); })\n )).then(function (results) { return results.every(function (r) { return r; }); });\n },\n reset: function reset () {\n var this$1 = this;\n\n Object.keys(this.persistedStore).forEach(function (key) {\n this$1.$delete(this$1.persistedStore, key);\n });\n return values(this.refs).concat( this.observers).forEach(function (ref) { return ref.reset(); });\n },\n restoreProviderState: function restoreProviderState (provider) {\n var state = this.persistedStore[provider.vid];\n provider.setFlags(state.flags);\n provider.applyResult(state);\n this.$delete(this.persistedStore, provider.vid);\n },\n removeProvider: function removeProvider (vid) {\n var obj;\n\n var provider = this.refs[vid];\n // save it for the next time.\n if (provider && provider.persist) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n if (vid.indexOf('_vee_') === 0) {\n warn('Please provide a `vid` prop when using `persist`, there might be unexpected issues otherwise.');\n }\n }\n\n this.persistedStore = assign({}, this.persistedStore, ( obj = {}, obj[vid] = {\n flags: provider.flags,\n errors: provider.messages,\n failedRules: provider.failedRules\n }, obj ));\n }\n\n this.$delete(this.refs, vid);\n },\n }\n};\n\nfunction withValidation (component, ctxToProps) {\n if ( ctxToProps === void 0 ) ctxToProps = null;\n\n var options = isCallable(component) ? component.options : component;\n options.$__veeInject = false;\n var hoc = {\n name: ((options.name || 'AnonymousHoc') + \"WithValidation\"),\n props: assign({}, ValidationProvider.props),\n data: ValidationProvider.data,\n computed: assign({}, ValidationProvider.computed),\n methods: assign({}, ValidationProvider.methods),\n $__veeInject: false,\n beforeDestroy: ValidationProvider.beforeDestroy,\n inject: ValidationProvider.inject\n };\n\n // Default ctx converts ctx props to component props.\n if (!ctxToProps) {\n ctxToProps = function (ctx) { return ctx; };\n }\n\n var eventName = (options.model && options.model.event) || 'input';\n\n hoc.render = function (h) {\n var obj;\n\n this.registerField();\n var vctx = createValidationCtx(this);\n var listeners = assign({}, this.$listeners);\n\n var model = findModel(this.$vnode);\n this._inputEventName = this._inputEventName || getInputEventName(this.$vnode, model);\n onRenderUpdate.call(this, model);\n\n var ref = createCommonHandlers(this);\n var onInput = ref.onInput;\n var onBlur = ref.onBlur;\n var onValidate = ref.onValidate;\n\n mergeVNodeListeners(listeners, eventName, onInput);\n mergeVNodeListeners(listeners, 'blur', onBlur);\n this.normalizedEvents.forEach(function (evt, idx) {\n mergeVNodeListeners(listeners, evt, onValidate);\n });\n\n // Props are any attrs not associated with ValidationProvider Plus the model prop.\n // WARNING: Accidental prop overwrite will probably happen.\n var ref$1 = findModelConfig(this.$vnode) || { prop: 'value' };\n var prop = ref$1.prop;\n var props = assign({}, this.$attrs, ( obj = {}, obj[prop] = model.value, obj ), ctxToProps(vctx));\n\n return h(options, {\n attrs: this.$attrs,\n props: props,\n on: listeners\n }, normalizeSlots(this.$slots, this.$vnode.context));\n };\n\n return hoc;\n}\n\nvar version = '2.2.15';\n\nObject.keys(Rules).forEach(function (rule) {\n Validator.extend(rule, Rules[rule].validate, assign({}, Rules[rule].options, { paramNames: Rules[rule].paramNames }));\n});\n\n// Merge the english messages.\nValidator.localize({ en: locale });\n\nvar install = VeeValidate$1.install;\n\nVeeValidate$1.version = version;\nVeeValidate$1.mapFields = mapFields;\nVeeValidate$1.ValidationProvider = ValidationProvider;\nVeeValidate$1.ValidationObserver = ValidationObserver;\nVeeValidate$1.withValidation = withValidation;\n\nexport default VeeValidate$1;\nexport { ErrorBag, Rules, ValidationObserver, ValidationProvider, Validator, directive, install, mapFields, mixin, version, withValidation };\n","'use strict';\n\nvar utils = require('../utils');\nvar normalizeHeaderName = require('../helpers/normalizeHeaderName');\nvar AxiosError = require('../core/AxiosError');\nvar transitionalDefaults = require('./transitional');\nvar toFormData = require('../helpers/toFormData');\nvar toURLEncodedForm = require('../helpers/toURLEncodedForm');\nvar platform = require('../platform');\nvar formDataToJSON = require('../helpers/formDataToJSON');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('../adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('../adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n var contentType = headers && headers['Content-Type'] || '';\n var hasJSONContentType = contentType.indexOf('application/json') > -1;\n var isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n var isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n\n var isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') !== -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n var _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = require('./node/');\n","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getBoundingClientRect(element) {\n var rect = element.getBoundingClientRect();\n return {\n width: rect.width,\n height: rect.height,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n y: rect.top\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport default function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport within from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import { top, left, right, bottom } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets;\n\n var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,\n _ref3$x = _ref3.x,\n x = _ref3$x === void 0 ? 0 : _ref3$x,\n _ref3$y = _ref3.y,\n y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top) {\n sideY = bottom; // $FlowFixMe[prop-missing]\n\n y -= offsetParent[heightProp] - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left) {\n sideX = right; // $FlowFixMe[prop-missing]\n\n x -= offsetParent[widthProp] - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref4) {\n var state = _ref4.state,\n options = _ref4.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nexport default function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var referenceElement = state.elements.reference;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(referenceElement);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\";\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport within from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { max as mathMax, min as mathMin } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis || checkAltAxis) {\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = popperOffsets[mainAxis] + overflow[mainSide];\n var max = popperOffsets[mainAxis] - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n\n if (checkMainAxis) {\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var _preventedOffset = within(tether ? mathMin(_min, tetherMin) : _min, _offset, tether ? mathMax(_max, tetherMax) : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\"; // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(options) {\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","/*!\n * Bootstrap v5.0.0-beta3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\nimport * as Popper from '@popperjs/core';\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\nconst MAX_UID = 1000000;\nconst MILLISECONDS_MULTIPLIER = 1000;\nconst TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)\n\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`;\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase();\n};\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n};\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target');\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n\n if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {\n return null;\n } // Just in case some CMS puts out a full URL with the anchor appended\n\n\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = '#' + hrefAttr.split('#')[1];\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;\n }\n\n return selector;\n};\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n};\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element);\n return selector ? document.querySelector(selector) : null;\n};\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n\n let {\n transitionDuration,\n transitionDelay\n } = window.getComputedStyle(element);\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found\n\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n } // If multiple durations are defined, take the first\n\n\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n};\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END));\n};\n\nconst isElement = obj => (obj[0] || obj).nodeType;\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false;\n const durationPadding = 5;\n const emulatedDuration = duration + durationPadding;\n\n function listener() {\n called = true;\n element.removeEventListener(TRANSITION_END, listener);\n }\n\n element.addEventListener(TRANSITION_END, listener);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element);\n }\n }, emulatedDuration);\n};\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = value && isElement(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(`${componentName.toUpperCase()}: ` + `Option \"${property}\" provided type \"${valueType}\" ` + `but expected type \"${expectedTypes}\".`);\n }\n });\n};\n\nconst isVisible = element => {\n if (!element) {\n return false;\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element);\n const parentNodeStyle = getComputedStyle(element.parentNode);\n return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';\n }\n\n return false;\n};\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n\n if (element.classList.contains('disabled')) {\n return true;\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled;\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';\n};\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null;\n } // Can find the shadow root otherwise it'll return the document\n\n\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n } // when we don't find a shadow root\n\n\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n};\n\nconst noop = () => function () {};\n\nconst reflow = element => element.offsetHeight;\n\nconst getjQuery = () => {\n const {\n jQuery\n } = window;\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery;\n }\n\n return null;\n};\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback);\n } else {\n callback();\n }\n};\n\nconst isRTL = () => document.documentElement.dir === 'rtl';\n\nconst defineJQueryPlugin = (name, plugin) => {\n onDOMContentLoaded(() => {\n const $ = getjQuery();\n /* istanbul ignore if */\n\n if ($) {\n const JQUERY_NO_CONFLICT = $.fn[name];\n $.fn[name] = plugin.jQueryInterface;\n $.fn[name].Constructor = plugin;\n\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT;\n return plugin.jQueryInterface;\n };\n }\n });\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\nconst elementMap = new Map();\nvar Data = {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map());\n }\n\n const instanceMap = elementMap.get(element); // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);\n return;\n }\n\n instanceMap.set(key, instance);\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null;\n }\n\n return null;\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return;\n }\n\n const instanceMap = elementMap.get(element);\n instanceMap.delete(key); // free up element references if there are no instances left for an element\n\n if (instanceMap.size === 0) {\n elementMap.delete(element);\n }\n }\n\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\nconst stripNameRegex = /\\..*/;\nconst stripUidRegex = /::\\d+$/;\nconst eventRegistry = {}; // Events storage\n\nlet uidEvent = 1;\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n};\nconst nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);\n/**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\nfunction getUidEvent(element, uid) {\n return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;\n}\n\nfunction getEvent(element) {\n const uid = getUidEvent(element);\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n return eventRegistry[uid];\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n event.delegateTarget = element;\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let {\n target\n } = event; target && target !== this; target = target.parentNode) {\n for (let i = domElements.length; i--;) {\n if (domElements[i] === target) {\n event.delegateTarget = target;\n\n if (handler.oneOff) {\n // eslint-disable-next-line unicorn/consistent-destructuring\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n } // To please ESLint\n\n\n return null;\n };\n}\n\nfunction findHandler(events, handler, delegationSelector = null) {\n const uidEventList = Object.keys(events);\n\n for (let i = 0, len = uidEventList.length; i < len; i++) {\n const event = events[uidEventList[i]];\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event;\n }\n }\n\n return null;\n}\n\nfunction normalizeParams(originalTypeEvent, handler, delegationFn) {\n const delegation = typeof handler === 'string';\n const originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n\n let typeEvent = originalTypeEvent.replace(stripNameRegex, '');\n const custom = customEvents[typeEvent];\n\n if (custom) {\n typeEvent = custom;\n }\n\n const isNative = nativeEvents.has(typeEvent);\n\n if (!isNative) {\n typeEvent = originalTypeEvent;\n }\n\n return [delegation, originalHandler, typeEvent];\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n if (!handler) {\n handler = delegationFn;\n delegationFn = null;\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);\n const events = getEvent(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff;\n return;\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);\n fn.delegationSelector = delegation ? handler : null;\n fn.originalHandler = originalHandler;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n element.addEventListener(typeEvent, fn, delegation);\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach(handlerKey => {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey];\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false);\n },\n\n one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getEvent(element);\n const isNamespace = originalTypeEvent.startsWith('.');\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return;\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);\n return;\n }\n\n if (isNamespace) {\n Object.keys(events).forEach(elementEvent => {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n });\n }\n\n const storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach(keyHandlers => {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers];\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const $ = getjQuery();\n const typeEvent = event.replace(stripNameRegex, '');\n const inNamespace = event !== typeEvent;\n const isNative = nativeEvents.has(typeEvent);\n let jQueryEvent;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n let evt = null;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents');\n evt.initEvent(typeEvent, bubbles, true);\n } else {\n evt = new CustomEvent(event, {\n bubbles,\n cancelable: true\n });\n } // merge custom information in our event\n\n\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach(key => {\n Object.defineProperty(evt, key, {\n get() {\n return args[key];\n }\n\n });\n });\n }\n\n if (defaultPrevented) {\n evt.preventDefault();\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n }\n\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.0-beta3';\n\nclass BaseComponent {\n constructor(element) {\n element = typeof element === 'string' ? document.querySelector(element) : element;\n\n if (!element) {\n return;\n }\n\n this._element = element;\n Data.set(this._element, this.constructor.DATA_KEY, this);\n }\n\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY);\n this._element = null;\n }\n /** Static */\n\n\n static getInstance(element) {\n return Data.get(element, this.DATA_KEY);\n }\n\n static get VERSION() {\n return VERSION;\n }\n\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME$b = 'alert';\nconst DATA_KEY$b = 'bs.alert';\nconst EVENT_KEY$b = `.${DATA_KEY$b}`;\nconst DATA_API_KEY$8 = '.data-api';\nconst SELECTOR_DISMISS = '[data-bs-dismiss=\"alert\"]';\nconst EVENT_CLOSE = `close${EVENT_KEY$b}`;\nconst EVENT_CLOSED = `closed${EVENT_KEY$b}`;\nconst EVENT_CLICK_DATA_API$7 = `click${EVENT_KEY$b}${DATA_API_KEY$8}`;\nconst CLASS_NAME_ALERT = 'alert';\nconst CLASS_NAME_FADE$5 = 'fade';\nconst CLASS_NAME_SHOW$8 = 'show';\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Alert extends BaseComponent {\n // Getters\n static get DATA_KEY() {\n return DATA_KEY$b;\n } // Public\n\n\n close(element) {\n const rootElement = element ? this._getRootElement(element) : this._element;\n\n const customEvent = this._triggerCloseEvent(rootElement);\n\n if (customEvent === null || customEvent.defaultPrevented) {\n return;\n }\n\n this._removeElement(rootElement);\n } // Private\n\n\n _getRootElement(element) {\n return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`);\n }\n\n _triggerCloseEvent(element) {\n return EventHandler.trigger(element, EVENT_CLOSE);\n }\n\n _removeElement(element) {\n element.classList.remove(CLASS_NAME_SHOW$8);\n\n if (!element.classList.contains(CLASS_NAME_FADE$5)) {\n this._destroyElement(element);\n\n return;\n }\n\n const transitionDuration = getTransitionDurationFromElement(element);\n EventHandler.one(element, 'transitionend', () => this._destroyElement(element));\n emulateTransitionEnd(element, transitionDuration);\n }\n\n _destroyElement(element) {\n if (element.parentNode) {\n element.parentNode.removeChild(element);\n }\n\n EventHandler.trigger(element, EVENT_CLOSED);\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY$b);\n\n if (!data) {\n data = new Alert(this);\n }\n\n if (config === 'close') {\n data[config](this);\n }\n });\n }\n\n static handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault();\n }\n\n alertInstance.close(this);\n };\n }\n\n}\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Alert to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME$b, Alert);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME$a = 'button';\nconst DATA_KEY$a = 'bs.button';\nconst EVENT_KEY$a = `.${DATA_KEY$a}`;\nconst DATA_API_KEY$7 = '.data-api';\nconst CLASS_NAME_ACTIVE$3 = 'active';\nconst SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle=\"button\"]';\nconst EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$7}`;\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Button extends BaseComponent {\n // Getters\n static get DATA_KEY() {\n return DATA_KEY$a;\n } // Public\n\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY$a);\n\n if (!data) {\n data = new Button(this);\n }\n\n if (config === 'toggle') {\n data[config]();\n }\n });\n }\n\n}\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {\n event.preventDefault();\n const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);\n let data = Data.get(button, DATA_KEY$a);\n\n if (!data) {\n data = new Button(button);\n }\n\n data.toggle();\n});\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Button to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME$a, Button);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\nfunction normalizeData(val) {\n if (val === 'true') {\n return true;\n }\n\n if (val === 'false') {\n return false;\n }\n\n if (val === Number(val).toString()) {\n return Number(val);\n }\n\n if (val === '' || val === 'null') {\n return null;\n }\n\n return val;\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {};\n Object.keys(element.dataset).filter(key => key.startsWith('bs')).forEach(key => {\n let pureKey = key.replace(/^bs/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(element.dataset[key]);\n });\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect();\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n };\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n };\n }\n\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\nconst NODE_TEXT = 3;\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector);\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n let ancestor = element.parentNode;\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (ancestor.matches(selector)) {\n parents.push(ancestor);\n }\n\n ancestor = ancestor.parentNode;\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (next.matches(selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n }\n\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME$9 = 'carousel';\nconst DATA_KEY$9 = 'bs.carousel';\nconst EVENT_KEY$9 = `.${DATA_KEY$9}`;\nconst DATA_API_KEY$6 = '.data-api';\nconst ARROW_LEFT_KEY = 'ArrowLeft';\nconst ARROW_RIGHT_KEY = 'ArrowRight';\nconst TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\nconst SWIPE_THRESHOLD = 40;\nconst Default$8 = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true,\n touch: true\n};\nconst DefaultType$8 = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean',\n touch: 'boolean'\n};\nconst ORDER_NEXT = 'next';\nconst ORDER_PREV = 'prev';\nconst DIRECTION_LEFT = 'left';\nconst DIRECTION_RIGHT = 'right';\nconst EVENT_SLIDE = `slide${EVENT_KEY$9}`;\nconst EVENT_SLID = `slid${EVENT_KEY$9}`;\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY$9}`;\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$9}`;\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$9}`;\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY$9}`;\nconst EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$9}${DATA_API_KEY$6}`;\nconst EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$9}${DATA_API_KEY$6}`;\nconst CLASS_NAME_CAROUSEL = 'carousel';\nconst CLASS_NAME_ACTIVE$2 = 'active';\nconst CLASS_NAME_SLIDE = 'slide';\nconst CLASS_NAME_END = 'carousel-item-end';\nconst CLASS_NAME_START = 'carousel-item-start';\nconst CLASS_NAME_NEXT = 'carousel-item-next';\nconst CLASS_NAME_PREV = 'carousel-item-prev';\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event';\nconst SELECTOR_ACTIVE$1 = '.active';\nconst SELECTOR_ACTIVE_ITEM = '.active.carousel-item';\nconst SELECTOR_ITEM = '.carousel-item';\nconst SELECTOR_ITEM_IMG = '.carousel-item img';\nconst SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';\nconst SELECTOR_INDICATORS = '.carousel-indicators';\nconst SELECTOR_INDICATOR = '[data-bs-target]';\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]';\nconst POINTER_TYPE_TOUCH = 'touch';\nconst POINTER_TYPE_PEN = 'pen';\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Carousel extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._items = null;\n this._interval = null;\n this._activeElement = null;\n this._isPaused = false;\n this._isSliding = false;\n this.touchTimeout = null;\n this.touchStartX = 0;\n this.touchDeltaX = 0;\n this._config = this._getConfig(config);\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;\n this._pointerEvent = Boolean(window.PointerEvent);\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$8;\n }\n\n static get DATA_KEY() {\n return DATA_KEY$9;\n } // Public\n\n\n next() {\n if (!this._isSliding) {\n this._slide(ORDER_NEXT);\n }\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next();\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(ORDER_PREV);\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true;\n }\n\n if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {\n triggerTransitionEnd(this._element);\n this.cycle(true);\n }\n\n clearInterval(this._interval);\n this._interval = null;\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false;\n }\n\n if (this._interval) {\n clearInterval(this._interval);\n this._interval = null;\n }\n\n if (this._config && this._config.interval && !this._isPaused) {\n this._updateInterval();\n\n this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);\n }\n }\n\n to(index) {\n this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n const activeIndex = this._getItemIndex(this._activeElement);\n\n if (index > this._items.length - 1 || index < 0) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index));\n return;\n }\n\n if (activeIndex === index) {\n this.pause();\n this.cycle();\n return;\n }\n\n const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;\n\n this._slide(order, this._items[index]);\n }\n\n dispose() {\n EventHandler.off(this._element, EVENT_KEY$9);\n this._items = null;\n this._config = null;\n this._interval = null;\n this._isPaused = null;\n this._isSliding = null;\n this._activeElement = null;\n this._indicatorsElement = null;\n super.dispose();\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$8,\n ...config\n };\n typeCheckConfig(NAME$9, config, DefaultType$8);\n return config;\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX);\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return;\n }\n\n const direction = absDeltax / this.touchDeltaX;\n this.touchDeltaX = 0;\n\n if (!direction) {\n return;\n }\n\n this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT);\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event));\n EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event));\n }\n\n if (this._config.touch && this._touchSupported) {\n this._addTouchEventListeners();\n }\n }\n\n _addTouchEventListeners() {\n const start = event => {\n if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n this.touchStartX = event.clientX;\n } else if (!this._pointerEvent) {\n this.touchStartX = event.touches[0].clientX;\n }\n };\n\n const move = event => {\n // ensure swiping with one touch and not pinching\n this.touchDeltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this.touchStartX;\n };\n\n const end = event => {\n if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n this.touchDeltaX = event.clientX - this.touchStartX;\n }\n\n this._handleSwipe();\n\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n this.pause();\n\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout);\n }\n\n this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval);\n }\n };\n\n SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {\n EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault());\n });\n\n if (this._pointerEvent) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event));\n EventHandler.on(this._element, EVENT_POINTERUP, event => end(event));\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT);\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event));\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event));\n EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event));\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return;\n }\n\n if (event.key === ARROW_LEFT_KEY) {\n event.preventDefault();\n\n this._slide(DIRECTION_LEFT);\n } else if (event.key === ARROW_RIGHT_KEY) {\n event.preventDefault();\n\n this._slide(DIRECTION_RIGHT);\n }\n }\n\n _getItemIndex(element) {\n this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];\n return this._items.indexOf(element);\n }\n\n _getItemByOrder(order, activeElement) {\n const isNext = order === ORDER_NEXT;\n const isPrev = order === ORDER_PREV;\n\n const activeIndex = this._getItemIndex(activeElement);\n\n const lastItemIndex = this._items.length - 1;\n const isGoingToWrap = isPrev && activeIndex === 0 || isNext && activeIndex === lastItemIndex;\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement;\n }\n\n const delta = isPrev ? -1 : 1;\n const itemIndex = (activeIndex + delta) % this._items.length;\n return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget);\n\n const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));\n\n return EventHandler.trigger(this._element, EVENT_SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n });\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE$1, this._indicatorsElement);\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);\n activeIndicator.removeAttribute('aria-current');\n const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement);\n\n for (let i = 0; i < indicators.length; i++) {\n if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {\n indicators[i].classList.add(CLASS_NAME_ACTIVE$2);\n indicators[i].setAttribute('aria-current', 'true');\n break;\n }\n }\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n if (!element) {\n return;\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);\n\n if (elementInterval) {\n this._config.defaultInterval = this._config.defaultInterval || this._config.interval;\n this._config.interval = elementInterval;\n } else {\n this._config.interval = this._config.defaultInterval || this._config.interval;\n }\n }\n\n _slide(directionOrOrder, element) {\n const order = this._directionToOrder(directionOrOrder);\n\n const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n const activeElementIndex = this._getItemIndex(activeElement);\n\n const nextElement = element || this._getItemByOrder(order, activeElement);\n\n const nextElementIndex = this._getItemIndex(nextElement);\n\n const isCycling = Boolean(this._interval);\n const isNext = order === ORDER_NEXT;\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;\n\n const eventDirectionName = this._orderToDirection(order);\n\n if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$2)) {\n this._isSliding = false;\n return;\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);\n\n if (slideEvent.defaultPrevented) {\n return;\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return;\n }\n\n this._isSliding = true;\n\n if (isCycling) {\n this.pause();\n }\n\n this._setActiveIndicatorElement(nextElement);\n\n this._activeElement = nextElement;\n\n if (this._element.classList.contains(CLASS_NAME_SLIDE)) {\n nextElement.classList.add(orderClassName);\n reflow(nextElement);\n activeElement.classList.add(directionalClassName);\n nextElement.classList.add(directionalClassName);\n const transitionDuration = getTransitionDurationFromElement(activeElement);\n EventHandler.one(activeElement, 'transitionend', () => {\n nextElement.classList.remove(directionalClassName, orderClassName);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);\n this._isSliding = false;\n setTimeout(() => {\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n });\n }, 0);\n });\n emulateTransitionEnd(activeElement, transitionDuration);\n } else {\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n this._isSliding = false;\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n });\n }\n\n if (isCycling) {\n this.cycle();\n }\n }\n\n _directionToOrder(direction) {\n if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {\n return direction;\n }\n\n if (isRTL()) {\n return direction === DIRECTION_RIGHT ? ORDER_PREV : ORDER_NEXT;\n }\n\n return direction === DIRECTION_RIGHT ? ORDER_NEXT : ORDER_PREV;\n }\n\n _orderToDirection(order) {\n if (![ORDER_NEXT, ORDER_PREV].includes(order)) {\n return order;\n }\n\n if (isRTL()) {\n return order === ORDER_NEXT ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return order === ORDER_NEXT ? DIRECTION_RIGHT : DIRECTION_LEFT;\n } // Static\n\n\n static carouselInterface(element, config) {\n let data = Data.get(element, DATA_KEY$9);\n let _config = { ...Default$8,\n ...Manipulator.getDataAttributes(element)\n };\n\n if (typeof config === 'object') {\n _config = { ..._config,\n ...config\n };\n }\n\n const action = typeof config === 'string' ? config : _config.slide;\n\n if (!data) {\n data = new Carousel(element, _config);\n }\n\n if (typeof config === 'number') {\n data.to(config);\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`);\n }\n\n data[action]();\n } else if (_config.interval && _config.ride) {\n data.pause();\n data.cycle();\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Carousel.carouselInterface(this, config);\n });\n }\n\n static dataApiClickHandler(event) {\n const target = getElementFromSelector(this);\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return;\n }\n\n const config = { ...Manipulator.getDataAttributes(target),\n ...Manipulator.getDataAttributes(this)\n };\n const slideIndex = this.getAttribute('data-bs-slide-to');\n\n if (slideIndex) {\n config.interval = false;\n }\n\n Carousel.carouselInterface(target, config);\n\n if (slideIndex) {\n Data.get(target, DATA_KEY$9).to(slideIndex);\n }\n\n event.preventDefault();\n }\n\n}\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);\nEventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);\n\n for (let i = 0, len = carousels.length; i < len; i++) {\n Carousel.carouselInterface(carousels[i], Data.get(carousels[i], DATA_KEY$9));\n }\n});\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Carousel to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME$9, Carousel);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME$8 = 'collapse';\nconst DATA_KEY$8 = 'bs.collapse';\nconst EVENT_KEY$8 = `.${DATA_KEY$8}`;\nconst DATA_API_KEY$5 = '.data-api';\nconst Default$7 = {\n toggle: true,\n parent: ''\n};\nconst DefaultType$7 = {\n toggle: 'boolean',\n parent: '(string|element)'\n};\nconst EVENT_SHOW$5 = `show${EVENT_KEY$8}`;\nconst EVENT_SHOWN$5 = `shown${EVENT_KEY$8}`;\nconst EVENT_HIDE$5 = `hide${EVENT_KEY$8}`;\nconst EVENT_HIDDEN$5 = `hidden${EVENT_KEY$8}`;\nconst EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;\nconst CLASS_NAME_SHOW$7 = 'show';\nconst CLASS_NAME_COLLAPSE = 'collapse';\nconst CLASS_NAME_COLLAPSING = 'collapsing';\nconst CLASS_NAME_COLLAPSED = 'collapsed';\nconst WIDTH = 'width';\nconst HEIGHT = 'height';\nconst SELECTOR_ACTIVES = '.show, .collapsing';\nconst SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle=\"collapse\"]';\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Collapse extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._isTransitioning = false;\n this._config = this._getConfig(config);\n this._triggerArray = SelectorEngine.find(`${SELECTOR_DATA_TOGGLE$4}[href=\"#${this._element.id}\"],` + `${SELECTOR_DATA_TOGGLE$4}[data-bs-target=\"#${this._element.id}\"]`);\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);\n\n for (let i = 0, len = toggleList.length; i < len; i++) {\n const elem = toggleList[i];\n const selector = getSelectorFromElement(elem);\n const filterElement = SelectorEngine.find(selector).filter(foundElem => foundElem === this._element);\n\n if (selector !== null && filterElement.length) {\n this._selector = selector;\n\n this._triggerArray.push(elem);\n }\n }\n\n this._parent = this._config.parent ? this._getParent() : null;\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray);\n }\n\n if (this._config.toggle) {\n this.toggle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$7;\n }\n\n static get DATA_KEY() {\n return DATA_KEY$8;\n } // Public\n\n\n toggle() {\n if (this._element.classList.contains(CLASS_NAME_SHOW$7)) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$7)) {\n return;\n }\n\n let actives;\n let activesData;\n\n if (this._parent) {\n actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(elem => {\n if (typeof this._config.parent === 'string') {\n return elem.getAttribute('data-bs-parent') === this._config.parent;\n }\n\n return elem.classList.contains(CLASS_NAME_COLLAPSE);\n });\n\n if (actives.length === 0) {\n actives = null;\n }\n }\n\n const container = SelectorEngine.findOne(this._selector);\n\n if (actives) {\n const tempActiveData = actives.find(elem => container !== elem);\n activesData = tempActiveData ? Data.get(tempActiveData, DATA_KEY$8) : null;\n\n if (activesData && activesData._isTransitioning) {\n return;\n }\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$5);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n if (actives) {\n actives.forEach(elemActive => {\n if (container !== elemActive) {\n Collapse.collapseInterface(elemActive, 'hide');\n }\n\n if (!activesData) {\n Data.set(elemActive, DATA_KEY$8, null);\n }\n });\n }\n\n const dimension = this._getDimension();\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.style[dimension] = 0;\n\n if (this._triggerArray.length) {\n this._triggerArray.forEach(element => {\n element.classList.remove(CLASS_NAME_COLLAPSED);\n element.setAttribute('aria-expanded', true);\n });\n }\n\n this.setTransitioning(true);\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n this._element.style[dimension] = '';\n this.setTransitioning(false);\n EventHandler.trigger(this._element, EVENT_SHOWN$5);\n };\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n const scrollSize = `scroll${capitalizedDimension}`;\n const transitionDuration = getTransitionDurationFromElement(this._element);\n EventHandler.one(this._element, 'transitionend', complete);\n emulateTransitionEnd(this._element, transitionDuration);\n this._element.style[dimension] = `${this._element[scrollSize]}px`;\n }\n\n hide() {\n if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$7)) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$5);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n const dimension = this._getDimension();\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n const triggerArrayLength = this._triggerArray.length;\n\n if (triggerArrayLength > 0) {\n for (let i = 0; i < triggerArrayLength; i++) {\n const trigger = this._triggerArray[i];\n const elem = getElementFromSelector(trigger);\n\n if (elem && !elem.classList.contains(CLASS_NAME_SHOW$7)) {\n trigger.classList.add(CLASS_NAME_COLLAPSED);\n trigger.setAttribute('aria-expanded', false);\n }\n }\n }\n\n this.setTransitioning(true);\n\n const complete = () => {\n this.setTransitioning(false);\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$5);\n };\n\n this._element.style[dimension] = '';\n const transitionDuration = getTransitionDurationFromElement(this._element);\n EventHandler.one(this._element, 'transitionend', complete);\n emulateTransitionEnd(this._element, transitionDuration);\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning;\n }\n\n dispose() {\n super.dispose();\n this._config = null;\n this._parent = null;\n this._triggerArray = null;\n this._isTransitioning = null;\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$7,\n ...config\n };\n config.toggle = Boolean(config.toggle); // Coerce string values\n\n typeCheckConfig(NAME$8, config, DefaultType$7);\n return config;\n }\n\n _getDimension() {\n return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;\n }\n\n _getParent() {\n let {\n parent\n } = this._config;\n\n if (isElement(parent)) {\n // it's a jQuery object\n if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {\n parent = parent[0];\n }\n } else {\n parent = SelectorEngine.findOne(parent);\n }\n\n const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent=\"${parent}\"]`;\n SelectorEngine.find(selector, parent).forEach(element => {\n const selected = getElementFromSelector(element);\n\n this._addAriaAndCollapsedClass(selected, [element]);\n });\n return parent;\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (!element || !triggerArray.length) {\n return;\n }\n\n const isOpen = element.classList.contains(CLASS_NAME_SHOW$7);\n triggerArray.forEach(elem => {\n if (isOpen) {\n elem.classList.remove(CLASS_NAME_COLLAPSED);\n } else {\n elem.classList.add(CLASS_NAME_COLLAPSED);\n }\n\n elem.setAttribute('aria-expanded', isOpen);\n });\n } // Static\n\n\n static collapseInterface(element, config) {\n let data = Data.get(element, DATA_KEY$8);\n const _config = { ...Default$7,\n ...Manipulator.getDataAttributes(element),\n ...(typeof config === 'object' && config ? config : {})\n };\n\n if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n\n if (!data) {\n data = new Collapse(element, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Collapse.collapseInterface(this, config);\n });\n }\n\n}\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {\n // preventDefault only for elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {\n event.preventDefault();\n }\n\n const triggerData = Manipulator.getDataAttributes(this);\n const selector = getSelectorFromElement(this);\n const selectorElements = SelectorEngine.find(selector);\n selectorElements.forEach(element => {\n const data = Data.get(element, DATA_KEY$8);\n let config;\n\n if (data) {\n // update parent attribute\n if (data._parent === null && typeof triggerData.parent === 'string') {\n data._config.parent = triggerData.parent;\n data._parent = data._getParent();\n }\n\n config = 'toggle';\n } else {\n config = triggerData;\n }\n\n Collapse.collapseInterface(element, config);\n });\n});\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Collapse to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME$8, Collapse);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME$7 = 'dropdown';\nconst DATA_KEY$7 = 'bs.dropdown';\nconst EVENT_KEY$7 = `.${DATA_KEY$7}`;\nconst DATA_API_KEY$4 = '.data-api';\nconst ESCAPE_KEY$2 = 'Escape';\nconst SPACE_KEY = 'Space';\nconst TAB_KEY = 'Tab';\nconst ARROW_UP_KEY = 'ArrowUp';\nconst ARROW_DOWN_KEY = 'ArrowDown';\nconst RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button\n\nconst REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);\nconst EVENT_HIDE$4 = `hide${EVENT_KEY$7}`;\nconst EVENT_HIDDEN$4 = `hidden${EVENT_KEY$7}`;\nconst EVENT_SHOW$4 = `show${EVENT_KEY$7}`;\nconst EVENT_SHOWN$4 = `shown${EVENT_KEY$7}`;\nconst EVENT_CLICK = `click${EVENT_KEY$7}`;\nconst EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$7}${DATA_API_KEY$4}`;\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$7}${DATA_API_KEY$4}`;\nconst CLASS_NAME_DISABLED = 'disabled';\nconst CLASS_NAME_SHOW$6 = 'show';\nconst CLASS_NAME_DROPUP = 'dropup';\nconst CLASS_NAME_DROPEND = 'dropend';\nconst CLASS_NAME_DROPSTART = 'dropstart';\nconst CLASS_NAME_NAVBAR = 'navbar';\nconst SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle=\"dropdown\"]';\nconst SELECTOR_MENU = '.dropdown-menu';\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav';\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';\nconst PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';\nconst PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';\nconst PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';\nconst PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';\nconst PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';\nconst PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';\nconst Default$6 = {\n offset: [0, 2],\n boundary: 'clippingParents',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null\n};\nconst DefaultType$6 = {\n offset: '(array|string|function)',\n boundary: '(string|element)',\n reference: '(string|element|object)',\n display: 'string',\n popperConfig: '(null|object|function)'\n};\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._popper = null;\n this._config = this._getConfig(config);\n this._menu = this._getMenuElement();\n this._inNavbar = this._detectNavbar();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$6;\n }\n\n static get DefaultType() {\n return DefaultType$6;\n }\n\n static get DATA_KEY() {\n return DATA_KEY$7;\n } // Public\n\n\n toggle() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {\n return;\n }\n\n const isActive = this._element.classList.contains(CLASS_NAME_SHOW$6);\n\n Dropdown.clearMenus();\n\n if (isActive) {\n return;\n }\n\n this.show();\n }\n\n show() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW$6)) {\n return;\n }\n\n const parent = Dropdown.getParentFromElement(this._element);\n const relatedTarget = {\n relatedTarget: this._element\n };\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, relatedTarget);\n\n if (showEvent.defaultPrevented) {\n return;\n } // Totally disable Popper for Dropdowns in Navbar\n\n\n if (this._inNavbar) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'none');\n } else {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)');\n }\n\n let referenceElement = this._element;\n\n if (this._config.reference === 'parent') {\n referenceElement = parent;\n } else if (isElement(this._config.reference)) {\n referenceElement = this._config.reference; // Check if it's jQuery element\n\n if (typeof this._config.reference.jquery !== 'undefined') {\n referenceElement = this._config.reference[0];\n }\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference;\n }\n\n const popperConfig = this._getPopperConfig();\n\n const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);\n this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig);\n\n if (isDisplayStatic) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static');\n }\n } // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {\n [].concat(...document.body.children).forEach(elem => EventHandler.on(elem, 'mouseover', null, noop()));\n }\n\n this._element.focus();\n\n this._element.setAttribute('aria-expanded', true);\n\n this._menu.classList.toggle(CLASS_NAME_SHOW$6);\n\n this._element.classList.toggle(CLASS_NAME_SHOW$6);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);\n }\n\n hide() {\n if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW$6)) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n if (this._popper) {\n this._popper.destroy();\n }\n\n this._menu.classList.toggle(CLASS_NAME_SHOW$6);\n\n this._element.classList.toggle(CLASS_NAME_SHOW$6);\n\n Manipulator.removeDataAttribute(this._menu, 'popper');\n EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget);\n }\n\n dispose() {\n EventHandler.off(this._element, EVENT_KEY$7);\n this._menu = null;\n\n if (this._popper) {\n this._popper.destroy();\n\n this._popper = null;\n }\n\n super.dispose();\n }\n\n update() {\n this._inNavbar = this._detectNavbar();\n\n if (this._popper) {\n this._popper.update();\n }\n } // Private\n\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_CLICK, event => {\n event.preventDefault();\n this.toggle();\n });\n }\n\n _getConfig(config) {\n config = { ...this.constructor.Default,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n };\n typeCheckConfig(NAME$7, config, this.constructor.DefaultType);\n\n if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME$7.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`);\n }\n\n return config;\n }\n\n _getMenuElement() {\n return SelectorEngine.next(this._element, SELECTOR_MENU)[0];\n }\n\n _getPlacement() {\n const parentDropdown = this._element.parentNode;\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT;\n } // We need to trim the value because custom properties can also include spaces\n\n\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;\n }\n\n _detectNavbar() {\n return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null;\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }; // Disable Popper if we have a static display\n\n if (this._config.display === 'static') {\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }];\n }\n\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n } // Static\n\n\n static dropdownInterface(element, config) {\n let data = Data.get(element, DATA_KEY$7);\n\n const _config = typeof config === 'object' ? config : null;\n\n if (!data) {\n data = new Dropdown(element, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Dropdown.dropdownInterface(this, config);\n });\n }\n\n static clearMenus(event) {\n if (event) {\n if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) {\n return;\n }\n\n if (/input|select|textarea|form/i.test(event.target.tagName)) {\n return;\n }\n }\n\n const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);\n\n for (let i = 0, len = toggles.length; i < len; i++) {\n const context = Data.get(toggles[i], DATA_KEY$7);\n const relatedTarget = {\n relatedTarget: toggles[i]\n };\n\n if (event && event.type === 'click') {\n relatedTarget.clickEvent = event;\n }\n\n if (!context) {\n continue;\n }\n\n const dropdownMenu = context._menu;\n\n if (!toggles[i].classList.contains(CLASS_NAME_SHOW$6)) {\n continue;\n }\n\n if (event) {\n // Don't close the menu if the clicked element or one of its parents is the dropdown button\n if ([context._element].some(element => event.composedPath().includes(element))) {\n continue;\n } // Tab navigation through the dropdown menu shouldn't close the menu\n\n\n if (event.type === 'keyup' && event.key === TAB_KEY && dropdownMenu.contains(event.target)) {\n continue;\n }\n }\n\n const hideEvent = EventHandler.trigger(toggles[i], EVENT_HIDE$4, relatedTarget);\n\n if (hideEvent.defaultPrevented) {\n continue;\n } // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(elem => EventHandler.off(elem, 'mouseover', null, noop()));\n }\n\n toggles[i].setAttribute('aria-expanded', 'false');\n\n if (context._popper) {\n context._popper.destroy();\n }\n\n dropdownMenu.classList.remove(CLASS_NAME_SHOW$6);\n toggles[i].classList.remove(CLASS_NAME_SHOW$6);\n Manipulator.removeDataAttribute(dropdownMenu, 'popper');\n EventHandler.trigger(toggles[i], EVENT_HIDDEN$4, relatedTarget);\n }\n }\n\n static getParentFromElement(element) {\n return getElementFromSelector(element) || element.parentNode;\n }\n\n static dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY$2 && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {\n return;\n }\n\n const parent = Dropdown.getParentFromElement(this);\n const isActive = this.classList.contains(CLASS_NAME_SHOW$6);\n\n if (event.key === ESCAPE_KEY$2) {\n const button = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];\n button.focus();\n Dropdown.clearMenus();\n return;\n }\n\n if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {\n const button = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];\n button.click();\n return;\n }\n\n if (!isActive || event.key === SPACE_KEY) {\n Dropdown.clearMenus();\n return;\n }\n\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible);\n\n if (!items.length) {\n return;\n }\n\n let index = items.indexOf(event.target); // Up\n\n if (event.key === ARROW_UP_KEY && index > 0) {\n index--;\n } // Down\n\n\n if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {\n index++;\n } // index is -1 if the first keydown is an ArrowUp\n\n\n index = index === -1 ? 0 : index;\n items[index].focus();\n }\n\n}\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);\nEventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);\nEventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {\n event.preventDefault();\n Dropdown.dropdownInterface(this);\n});\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Dropdown to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME$7, Dropdown);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME$6 = 'modal';\nconst DATA_KEY$6 = 'bs.modal';\nconst EVENT_KEY$6 = `.${DATA_KEY$6}`;\nconst DATA_API_KEY$3 = '.data-api';\nconst ESCAPE_KEY$1 = 'Escape';\nconst Default$5 = {\n backdrop: true,\n keyboard: true,\n focus: true\n};\nconst DefaultType$5 = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean'\n};\nconst EVENT_HIDE$3 = `hide${EVENT_KEY$6}`;\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$6}`;\nconst EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;\nconst EVENT_SHOW$3 = `show${EVENT_KEY$6}`;\nconst EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;\nconst EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$6}`;\nconst EVENT_RESIZE = `resize${EVENT_KEY$6}`;\nconst EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`;\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$6}`;\nconst EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;\nconst EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;\nconst CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';\nconst CLASS_NAME_BACKDROP = 'modal-backdrop';\nconst CLASS_NAME_OPEN = 'modal-open';\nconst CLASS_NAME_FADE$4 = 'fade';\nconst CLASS_NAME_SHOW$5 = 'show';\nconst CLASS_NAME_STATIC = 'modal-static';\nconst SELECTOR_DIALOG = '.modal-dialog';\nconst SELECTOR_MODAL_BODY = '.modal-body';\nconst SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle=\"modal\"]';\nconst SELECTOR_DATA_DISMISS$2 = '[data-bs-dismiss=\"modal\"]';\nconst SELECTOR_FIXED_CONTENT$1 = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';\nconst SELECTOR_STICKY_CONTENT$1 = '.sticky-top';\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Modal extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._config = this._getConfig(config);\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);\n this._backdrop = null;\n this._isShown = false;\n this._isBodyOverflowing = false;\n this._ignoreBackdropClick = false;\n this._isTransitioning = false;\n this._scrollbarWidth = 0;\n } // Getters\n\n\n static get Default() {\n return Default$5;\n }\n\n static get DATA_KEY() {\n return DATA_KEY$6;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return;\n }\n\n if (this._isAnimated()) {\n this._isTransitioning = true;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {\n relatedTarget\n });\n\n if (this._isShown || showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n\n this._checkScrollbar();\n\n this._setScrollbar();\n\n this._adjustDialog();\n\n this._setEscapeEvent();\n\n this._setResizeEvent();\n\n EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, SELECTOR_DATA_DISMISS$2, event => this.hide(event));\n EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {\n EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {\n if (event.target === this._element) {\n this._ignoreBackdropClick = true;\n }\n });\n });\n\n this._showBackdrop(() => this._showElement(relatedTarget));\n }\n\n hide(event) {\n if (event) {\n event.preventDefault();\n }\n\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = false;\n\n const isAnimated = this._isAnimated();\n\n if (isAnimated) {\n this._isTransitioning = true;\n }\n\n this._setEscapeEvent();\n\n this._setResizeEvent();\n\n EventHandler.off(document, EVENT_FOCUSIN$1);\n\n this._element.classList.remove(CLASS_NAME_SHOW$5);\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS$2);\n EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);\n\n if (isAnimated) {\n const transitionDuration = getTransitionDurationFromElement(this._element);\n EventHandler.one(this._element, 'transitionend', event => this._hideModal(event));\n emulateTransitionEnd(this._element, transitionDuration);\n } else {\n this._hideModal();\n }\n }\n\n dispose() {\n [window, this._element, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));\n super.dispose();\n /**\n * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`\n * Do not move `document` in `htmlElements` array\n * It will remove `EVENT_CLICK_DATA_API` event that should remain\n */\n\n EventHandler.off(document, EVENT_FOCUSIN$1);\n this._config = null;\n this._dialog = null;\n this._backdrop = null;\n this._isShown = null;\n this._isBodyOverflowing = null;\n this._ignoreBackdropClick = null;\n this._isTransitioning = null;\n this._scrollbarWidth = null;\n }\n\n handleUpdate() {\n this._adjustDialog();\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$5,\n ...config\n };\n typeCheckConfig(NAME$6, config, DefaultType$5);\n return config;\n }\n\n _showElement(relatedTarget) {\n const isAnimated = this._isAnimated();\n\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);\n\n if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element);\n }\n\n this._element.style.display = 'block';\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.scrollTop = 0;\n\n if (modalBody) {\n modalBody.scrollTop = 0;\n }\n\n if (isAnimated) {\n reflow(this._element);\n }\n\n this._element.classList.add(CLASS_NAME_SHOW$5);\n\n if (this._config.focus) {\n this._enforceFocus();\n }\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus();\n }\n\n this._isTransitioning = false;\n EventHandler.trigger(this._element, EVENT_SHOWN$3, {\n relatedTarget\n });\n };\n\n if (isAnimated) {\n const transitionDuration = getTransitionDurationFromElement(this._dialog);\n EventHandler.one(this._dialog, 'transitionend', transitionComplete);\n emulateTransitionEnd(this._dialog, transitionDuration);\n } else {\n transitionComplete();\n }\n }\n\n _enforceFocus() {\n EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop\n\n EventHandler.on(document, EVENT_FOCUSIN$1, event => {\n if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {\n this._element.focus();\n }\n });\n }\n\n _setEscapeEvent() {\n if (this._isShown) {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY$1) {\n event.preventDefault();\n this.hide();\n } else if (!this._config.keyboard && event.key === ESCAPE_KEY$1) {\n this._triggerBackdropTransition();\n }\n });\n } else {\n EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS);\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog());\n } else {\n EventHandler.off(window, EVENT_RESIZE);\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none';\n\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._isTransitioning = false;\n\n this._showBackdrop(() => {\n document.body.classList.remove(CLASS_NAME_OPEN);\n\n this._resetAdjustments();\n\n this._resetScrollbar();\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$3);\n });\n }\n\n _removeBackdrop() {\n this._backdrop.parentNode.removeChild(this._backdrop);\n\n this._backdrop = null;\n }\n\n _showBackdrop(callback) {\n const isAnimated = this._isAnimated();\n\n if (this._isShown && this._config.backdrop) {\n this._backdrop = document.createElement('div');\n this._backdrop.className = CLASS_NAME_BACKDROP;\n\n if (isAnimated) {\n this._backdrop.classList.add(CLASS_NAME_FADE$4);\n }\n\n document.body.appendChild(this._backdrop);\n EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false;\n return;\n }\n\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition();\n } else {\n this.hide();\n }\n });\n\n if (isAnimated) {\n reflow(this._backdrop);\n }\n\n this._backdrop.classList.add(CLASS_NAME_SHOW$5);\n\n if (!isAnimated) {\n callback();\n return;\n }\n\n const backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);\n EventHandler.one(this._backdrop, 'transitionend', callback);\n emulateTransitionEnd(this._backdrop, backdropTransitionDuration);\n } else if (!this._isShown && this._backdrop) {\n this._backdrop.classList.remove(CLASS_NAME_SHOW$5);\n\n const callbackRemove = () => {\n this._removeBackdrop();\n\n callback();\n };\n\n if (isAnimated) {\n const backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);\n EventHandler.one(this._backdrop, 'transitionend', callbackRemove);\n emulateTransitionEnd(this._backdrop, backdropTransitionDuration);\n } else {\n callbackRemove();\n }\n } else {\n callback();\n }\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE$4);\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden';\n }\n\n this._element.classList.add(CLASS_NAME_STATIC);\n\n const modalTransitionDuration = getTransitionDurationFromElement(this._dialog);\n EventHandler.off(this._element, 'transitionend');\n EventHandler.one(this._element, 'transitionend', () => {\n this._element.classList.remove(CLASS_NAME_STATIC);\n\n if (!isModalOverflowing) {\n EventHandler.one(this._element, 'transitionend', () => {\n this._element.style.overflowY = '';\n });\n emulateTransitionEnd(this._element, modalTransitionDuration);\n }\n });\n emulateTransitionEnd(this._element, modalTransitionDuration);\n\n this._element.focus();\n } // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // ----------------------------------------------------------------------\n\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n if (!this._isBodyOverflowing && isModalOverflowing && !isRTL() || this._isBodyOverflowing && !isModalOverflowing && isRTL()) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`;\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing && !isRTL() || !this._isBodyOverflowing && isModalOverflowing && isRTL()) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px`;\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n }\n\n _checkScrollbar() {\n const rect = document.body.getBoundingClientRect();\n this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;\n this._scrollbarWidth = this._getScrollbarWidth();\n }\n\n _setScrollbar() {\n if (this._isBodyOverflowing) {\n this._setElementAttributes(SELECTOR_FIXED_CONTENT$1, 'paddingRight', calculatedValue => calculatedValue + this._scrollbarWidth);\n\n this._setElementAttributes(SELECTOR_STICKY_CONTENT$1, 'marginRight', calculatedValue => calculatedValue - this._scrollbarWidth);\n\n this._setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + this._scrollbarWidth);\n }\n\n document.body.classList.add(CLASS_NAME_OPEN);\n }\n\n _setElementAttributes(selector, styleProp, callback) {\n SelectorEngine.find(selector).forEach(element => {\n if (element !== document.body && window.innerWidth > element.clientWidth + this._scrollbarWidth) {\n return;\n }\n\n const actualValue = element.style[styleProp];\n const calculatedValue = window.getComputedStyle(element)[styleProp];\n Manipulator.setDataAttribute(element, styleProp, actualValue);\n element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px';\n });\n }\n\n _resetScrollbar() {\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT$1, 'paddingRight');\n\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT$1, 'marginRight');\n\n this._resetElementAttributes('body', 'paddingRight');\n }\n\n _resetElementAttributes(selector, styleProp) {\n SelectorEngine.find(selector).forEach(element => {\n const value = Manipulator.getDataAttribute(element, styleProp);\n\n if (typeof value === 'undefined' && element === document.body) {\n element.style[styleProp] = '';\n } else {\n Manipulator.removeDataAttribute(element, styleProp);\n element.style[styleProp] = value;\n }\n });\n }\n\n _getScrollbarWidth() {\n // thx d.walsh\n const scrollDiv = document.createElement('div');\n scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;\n document.body.appendChild(scrollDiv);\n const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarWidth;\n } // Static\n\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY$6);\n const _config = { ...Default$5,\n ...Manipulator.getDataAttributes(this),\n ...(typeof config === 'object' && config ? config : {})\n };\n\n if (!data) {\n data = new Modal(this, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](relatedTarget);\n }\n });\n }\n\n}\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {\n const target = getElementFromSelector(this);\n\n if (this.tagName === 'A' || this.tagName === 'AREA') {\n event.preventDefault();\n }\n\n EventHandler.one(target, EVENT_SHOW$3, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$3, () => {\n if (isVisible(this)) {\n this.focus();\n }\n });\n });\n let data = Data.get(target, DATA_KEY$6);\n\n if (!data) {\n const config = { ...Manipulator.getDataAttributes(target),\n ...Manipulator.getDataAttributes(this)\n };\n data = new Modal(target, config);\n }\n\n data.toggle(this);\n});\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Modal to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(NAME$6, Modal);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed';\nconst SELECTOR_STICKY_CONTENT = '.sticky-top';\n\nconst getWidth = () => {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n};\n\nconst hide = (width = getWidth()) => {\n document.body.style.overflow = 'hidden';\n\n _setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);\n\n _setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);\n\n _setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width);\n};\n\nconst _setElementAttributes = (selector, styleProp, callback) => {\n const scrollbarWidth = getWidth();\n SelectorEngine.find(selector).forEach(element => {\n if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return;\n }\n\n const actualValue = element.style[styleProp];\n const calculatedValue = window.getComputedStyle(element)[styleProp];\n Manipulator.setDataAttribute(element, styleProp, actualValue);\n element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px';\n });\n};\n\nconst reset = () => {\n document.body.style.overflow = 'auto';\n\n _resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');\n\n _resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');\n\n _resetElementAttributes('body', 'paddingRight');\n};\n\nconst _resetElementAttributes = (selector, styleProp) => {\n SelectorEngine.find(selector).forEach(element => {\n const value = Manipulator.getDataAttribute(element, styleProp);\n\n if (typeof value === 'undefined' && element === document.body) {\n element.style.removeProperty(styleProp);\n } else {\n Manipulator.removeDataAttribute(element, styleProp);\n element.style[styleProp] = value;\n }\n });\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME$5 = 'offcanvas';\nconst DATA_KEY$5 = 'bs.offcanvas';\nconst EVENT_KEY$5 = `.${DATA_KEY$5}`;\nconst DATA_API_KEY$2 = '.data-api';\nconst EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$5}${DATA_API_KEY$2}`;\nconst ESCAPE_KEY = 'Escape';\nconst Default$4 = {\n backdrop: true,\n keyboard: true,\n scroll: false\n};\nconst DefaultType$4 = {\n backdrop: 'boolean',\n keyboard: 'boolean',\n scroll: 'boolean'\n};\nconst CLASS_NAME_BACKDROP_BODY = 'offcanvas-backdrop';\nconst CLASS_NAME_SHOW$4 = 'show';\nconst CLASS_NAME_TOGGLING = 'offcanvas-toggling';\nconst OPEN_SELECTOR = '.offcanvas.show';\nconst ACTIVE_SELECTOR = `${OPEN_SELECTOR}, .${CLASS_NAME_TOGGLING}`;\nconst EVENT_SHOW$2 = `show${EVENT_KEY$5}`;\nconst EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;\nconst EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;\nconst EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY$5}`;\nconst EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;\nconst EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;\nconst SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss=\"offcanvas\"]';\nconst SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle=\"offcanvas\"]';\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Offcanvas extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._config = this._getConfig(config);\n this._isShown = false;\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$4;\n }\n\n static get DATA_KEY() {\n return DATA_KEY$5;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n this._element.style.visibility = 'visible';\n\n if (this._config.backdrop) {\n document.body.classList.add(CLASS_NAME_BACKDROP_BODY);\n }\n\n if (!this._config.scroll) {\n hide();\n }\n\n this._element.classList.add(CLASS_NAME_TOGGLING);\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.classList.add(CLASS_NAME_SHOW$4);\n\n const completeCallBack = () => {\n this._element.classList.remove(CLASS_NAME_TOGGLING);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$2, {\n relatedTarget\n });\n\n this._enforceFocusOnElement(this._element);\n };\n\n setTimeout(completeCallBack, getTransitionDurationFromElement(this._element));\n }\n\n hide() {\n if (!this._isShown) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._element.classList.add(CLASS_NAME_TOGGLING);\n\n EventHandler.off(document, EVENT_FOCUSIN);\n\n this._element.blur();\n\n this._isShown = false;\n\n this._element.classList.remove(CLASS_NAME_SHOW$4);\n\n const completeCallback = () => {\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._element.style.visibility = 'hidden';\n\n if (this._config.backdrop) {\n document.body.classList.remove(CLASS_NAME_BACKDROP_BODY);\n }\n\n if (!this._config.scroll) {\n reset();\n }\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$2);\n\n this._element.classList.remove(CLASS_NAME_TOGGLING);\n };\n\n setTimeout(completeCallback, getTransitionDurationFromElement(this._element));\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$4,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' ? config : {})\n };\n typeCheckConfig(NAME$5, config, DefaultType$4);\n return config;\n }\n\n _enforceFocusOnElement(element) {\n EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop\n\n EventHandler.on(document, EVENT_FOCUSIN, event => {\n if (document !== event.target && element !== event.target && !element.contains(event.target)) {\n element.focus();\n }\n });\n element.focus();\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, () => this.hide());\n EventHandler.on(document, 'keydown', event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY) {\n this.hide();\n }\n });\n EventHandler.on(document, EVENT_CLICK_DATA_API$1, event => {\n const target = SelectorEngine.findOne(getSelectorFromElement(event.target));\n\n if (!this._element.contains(event.target) && target !== this._element) {\n this.hide();\n }\n });\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Data.get(this, DATA_KEY$5) || new Offcanvas(this, typeof config === 'object' ? config : {});\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n}\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$2, () => {\n // focus on trigger when it is closed\n if (isVisible(this)) {\n this.focus();\n }\n }); // avoid conflict when clicking a toggler of an offcanvas, while another is open\n\n const allReadyOpen = SelectorEngine.findOne(ACTIVE_SELECTOR);\n\n if (allReadyOpen && allReadyOpen !== target) {\n return;\n }\n\n const data = Data.get(target, DATA_KEY$5) || new Offcanvas(target);\n data.toggle(this);\n});\nEventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {\n SelectorEngine.find(OPEN_SELECTOR).forEach(el => (Data.get(el, DATA_KEY$5) || new Offcanvas(el)).show());\n});\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\ndefineJQueryPlugin(NAME$5, Offcanvas);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\nconst uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i;\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\n\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\n\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i;\n\nconst allowedAttribute = (attr, allowedAttributeList) => {\n const attrName = attr.nodeName.toLowerCase();\n\n if (allowedAttributeList.includes(attrName)) {\n if (uriAttrs.has(attrName)) {\n return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));\n }\n\n return true;\n }\n\n const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp); // Check if a regular expression validates the attribute.\n\n for (let i = 0, len = regExp.length; i < len; i++) {\n if (regExp[i].test(attrName)) {\n return true;\n }\n }\n\n return false;\n};\n\nconst DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n};\nfunction sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {\n if (!unsafeHtml.length) {\n return unsafeHtml;\n }\n\n if (sanitizeFn && typeof sanitizeFn === 'function') {\n return sanitizeFn(unsafeHtml);\n }\n\n const domParser = new window.DOMParser();\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');\n const allowlistKeys = Object.keys(allowList);\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'));\n\n for (let i = 0, len = elements.length; i < len; i++) {\n const el = elements[i];\n const elName = el.nodeName.toLowerCase();\n\n if (!allowlistKeys.includes(elName)) {\n el.parentNode.removeChild(el);\n continue;\n }\n\n const attributeList = [].concat(...el.attributes);\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);\n attributeList.forEach(attr => {\n if (!allowedAttribute(attr, allowedAttributes)) {\n el.removeAttribute(attr.nodeName);\n }\n });\n }\n\n return createdDocument.body.innerHTML;\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME$4 = 'tooltip';\nconst DATA_KEY$4 = 'bs.tooltip';\nconst EVENT_KEY$4 = `.${DATA_KEY$4}`;\nconst CLASS_PREFIX$1 = 'bs-tooltip';\nconst BSCLS_PREFIX_REGEX$1 = new RegExp(`(^|\\\\s)${CLASS_PREFIX$1}\\\\S+`, 'g');\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);\nconst DefaultType$3 = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n offset: '(array|string|function)',\n container: '(string|element|boolean)',\n fallbackPlacements: 'array',\n boundary: '(string|element)',\n customClass: '(string|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n allowList: 'object',\n popperConfig: '(null|object|function)'\n};\nconst AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n};\nconst Default$3 = {\n animation: true,\n template: '',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: [0, 0],\n container: false,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n boundary: 'clippingParents',\n customClass: '',\n sanitize: true,\n sanitizeFn: null,\n allowList: DefaultAllowlist,\n popperConfig: null\n};\nconst Event$2 = {\n HIDE: `hide${EVENT_KEY$4}`,\n HIDDEN: `hidden${EVENT_KEY$4}`,\n SHOW: `show${EVENT_KEY$4}`,\n SHOWN: `shown${EVENT_KEY$4}`,\n INSERTED: `inserted${EVENT_KEY$4}`,\n CLICK: `click${EVENT_KEY$4}`,\n FOCUSIN: `focusin${EVENT_KEY$4}`,\n FOCUSOUT: `focusout${EVENT_KEY$4}`,\n MOUSEENTER: `mouseenter${EVENT_KEY$4}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY$4}`\n};\nconst CLASS_NAME_FADE$3 = 'fade';\nconst CLASS_NAME_MODAL = 'modal';\nconst CLASS_NAME_SHOW$3 = 'show';\nconst HOVER_STATE_SHOW = 'show';\nconst HOVER_STATE_OUT = 'out';\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner';\nconst TRIGGER_HOVER = 'hover';\nconst TRIGGER_FOCUS = 'focus';\nconst TRIGGER_CLICK = 'click';\nconst TRIGGER_MANUAL = 'manual';\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)');\n }\n\n super(element); // private\n\n this._isEnabled = true;\n this._timeout = 0;\n this._hoverState = '';\n this._activeTrigger = {};\n this._popper = null; // Protected\n\n this.config = this._getConfig(config);\n this.tip = null;\n\n this._setListeners();\n } // Getters\n\n\n static get Default() {\n return Default$3;\n }\n\n static get NAME() {\n return NAME$4;\n }\n\n static get DATA_KEY() {\n return DATA_KEY$4;\n }\n\n static get Event() {\n return Event$2;\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY$4;\n }\n\n static get DefaultType() {\n return DefaultType$3;\n } // Public\n\n\n enable() {\n this._isEnabled = true;\n }\n\n disable() {\n this._isEnabled = false;\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return;\n }\n\n if (event) {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger.click = !context._activeTrigger.click;\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context);\n } else {\n context._leave(null, context);\n }\n } else {\n if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) {\n this._leave(null, this);\n\n return;\n }\n\n this._enter(null, this);\n }\n }\n\n dispose() {\n clearTimeout(this._timeout);\n EventHandler.off(this._element, this.constructor.EVENT_KEY);\n EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);\n\n if (this.tip && this.tip.parentNode) {\n this.tip.parentNode.removeChild(this.tip);\n }\n\n this._isEnabled = null;\n this._timeout = null;\n this._hoverState = null;\n this._activeTrigger = null;\n\n if (this._popper) {\n this._popper.destroy();\n }\n\n this._popper = null;\n this.config = null;\n this.tip = null;\n super.dispose();\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements');\n }\n\n if (!(this.isWithContent() && this._isEnabled)) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);\n const shadowRoot = findShadowRoot(this._element);\n const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return;\n }\n\n const tip = this.getTipElement();\n const tipId = getUID(this.constructor.NAME);\n tip.setAttribute('id', tipId);\n\n this._element.setAttribute('aria-describedby', tipId);\n\n this.setContent();\n\n if (this.config.animation) {\n tip.classList.add(CLASS_NAME_FADE$3);\n }\n\n const placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement;\n\n const attachment = this._getAttachment(placement);\n\n this._addAttachmentClass(attachment);\n\n const container = this._getContainer();\n\n Data.set(tip, this.constructor.DATA_KEY, this);\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.appendChild(tip);\n EventHandler.trigger(this._element, this.constructor.Event.INSERTED);\n }\n\n if (this._popper) {\n this._popper.update();\n } else {\n this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));\n }\n\n tip.classList.add(CLASS_NAME_SHOW$3);\n const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass;\n\n if (customClass) {\n tip.classList.add(...customClass.split(' '));\n } // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(element => {\n EventHandler.on(element, 'mouseover', noop());\n });\n }\n\n const complete = () => {\n const prevHoverState = this._hoverState;\n this._hoverState = null;\n EventHandler.trigger(this._element, this.constructor.Event.SHOWN);\n\n if (prevHoverState === HOVER_STATE_OUT) {\n this._leave(null, this);\n }\n };\n\n if (this.tip.classList.contains(CLASS_NAME_FADE$3)) {\n const transitionDuration = getTransitionDurationFromElement(this.tip);\n EventHandler.one(this.tip, 'transitionend', complete);\n emulateTransitionEnd(this.tip, transitionDuration);\n } else {\n complete();\n }\n }\n\n hide() {\n if (!this._popper) {\n return;\n }\n\n const tip = this.getTipElement();\n\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip);\n }\n\n this._cleanTipClass();\n\n this._element.removeAttribute('aria-describedby');\n\n EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);\n\n if (this._popper) {\n this._popper.destroy();\n\n this._popper = null;\n }\n };\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n tip.classList.remove(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(element => EventHandler.off(element, 'mouseover', noop));\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false;\n this._activeTrigger[TRIGGER_FOCUS] = false;\n this._activeTrigger[TRIGGER_HOVER] = false;\n\n if (this.tip.classList.contains(CLASS_NAME_FADE$3)) {\n const transitionDuration = getTransitionDurationFromElement(tip);\n EventHandler.one(tip, 'transitionend', complete);\n emulateTransitionEnd(tip, transitionDuration);\n } else {\n complete();\n }\n\n this._hoverState = '';\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.update();\n }\n } // Protected\n\n\n isWithContent() {\n return Boolean(this.getTitle());\n }\n\n getTipElement() {\n if (this.tip) {\n return this.tip;\n }\n\n const element = document.createElement('div');\n element.innerHTML = this.config.template;\n this.tip = element.children[0];\n return this.tip;\n }\n\n setContent() {\n const tip = this.getTipElement();\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());\n tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$3);\n }\n\n setElementContent(element, content) {\n if (element === null) {\n return;\n }\n\n if (typeof content === 'object' && isElement(content)) {\n if (content.jquery) {\n content = content[0];\n } // content is a DOM node or a jQuery\n\n\n if (this.config.html) {\n if (content.parentNode !== element) {\n element.innerHTML = '';\n element.appendChild(content);\n }\n } else {\n element.textContent = content.textContent;\n }\n\n return;\n }\n\n if (this.config.html) {\n if (this.config.sanitize) {\n content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn);\n }\n\n element.innerHTML = content;\n } else {\n element.textContent = content;\n }\n }\n\n getTitle() {\n let title = this._element.getAttribute('data-bs-original-title');\n\n if (!title) {\n title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title;\n }\n\n return title;\n }\n\n updateAttachment(attachment) {\n if (attachment === 'right') {\n return 'end';\n }\n\n if (attachment === 'left') {\n return 'start';\n }\n\n return attachment;\n } // Private\n\n\n _initializeOnDelegatedTarget(event, context) {\n const dataKey = this.constructor.DATA_KEY;\n context = context || Data.get(event.delegateTarget, dataKey);\n\n if (!context) {\n context = new this.constructor(event.delegateTarget, this._getDelegateConfig());\n Data.set(event.delegateTarget, dataKey, context);\n }\n\n return context;\n }\n\n _getOffset() {\n const {\n offset\n } = this.config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [{\n name: 'flip',\n options: {\n altBoundary: true,\n fallbackPlacements: this.config.fallbackPlacements\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }, {\n name: 'preventOverflow',\n options: {\n boundary: this.config.boundary\n }\n }, {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n }, {\n name: 'onChange',\n enabled: true,\n phase: 'afterWrite',\n fn: data => this._handlePopperPlacementChange(data)\n }],\n onFirstUpdate: data => {\n if (data.options.placement !== data.placement) {\n this._handlePopperPlacementChange(data);\n }\n }\n };\n return { ...defaultBsPopperConfig,\n ...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig)\n };\n }\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`);\n }\n\n _getContainer() {\n if (this.config.container === false) {\n return document.body;\n }\n\n if (isElement(this.config.container)) {\n return this.config.container;\n }\n\n return SelectorEngine.findOne(this.config.container);\n }\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()];\n }\n\n _setListeners() {\n const triggers = this.config.trigger.split(' ');\n triggers.forEach(trigger => {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event));\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;\n const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;\n EventHandler.on(this._element, eventIn, this.config.selector, event => this._enter(event));\n EventHandler.on(this._element, eventOut, this.config.selector, event => this._leave(event));\n }\n });\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide();\n }\n };\n\n EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);\n\n if (this.config.selector) {\n this.config = { ...this.config,\n trigger: 'manual',\n selector: ''\n };\n } else {\n this._fixTitle();\n }\n }\n\n _fixTitle() {\n const title = this._element.getAttribute('title');\n\n const originalTitleType = typeof this._element.getAttribute('data-bs-original-title');\n\n if (title || originalTitleType !== 'string') {\n this._element.setAttribute('data-bs-original-title', title || '');\n\n if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {\n this._element.setAttribute('aria-label', title);\n }\n\n this._element.setAttribute('title', '');\n }\n }\n\n _enter(event, context) {\n context = this._initializeOnDelegatedTarget(event, context);\n\n if (event) {\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;\n }\n\n if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {\n context._hoverState = HOVER_STATE_SHOW;\n return;\n }\n\n clearTimeout(context._timeout);\n context._hoverState = HOVER_STATE_SHOW;\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show();\n return;\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_SHOW) {\n context.show();\n }\n }, context.config.delay.show);\n }\n\n _leave(event, context) {\n context = this._initializeOnDelegatedTarget(event, context);\n\n if (event) {\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);\n }\n\n if (context._isWithActiveTrigger()) {\n return;\n }\n\n clearTimeout(context._timeout);\n context._hoverState = HOVER_STATE_OUT;\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide();\n return;\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_OUT) {\n context.hide();\n }\n }, context.config.delay.hide);\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true;\n }\n }\n\n return false;\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element);\n Object.keys(dataAttributes).forEach(dataAttr => {\n if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {\n delete dataAttributes[dataAttr];\n }\n });\n\n if (config && typeof config.container === 'object' && config.container.jquery) {\n config.container = config.container[0];\n }\n\n config = { ...this.constructor.Default,\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n };\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n\n typeCheckConfig(NAME$4, config, this.constructor.DefaultType);\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);\n }\n\n return config;\n }\n\n _getDelegateConfig() {\n const config = {};\n\n if (this.config) {\n for (const key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key];\n }\n }\n }\n\n return config;\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement();\n const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);\n\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));\n }\n }\n\n _handlePopperPlacementChange(popperData) {\n const {\n state\n } = popperData;\n\n if (!state) {\n return;\n }\n\n this.tip = state.elements.popper;\n\n this._cleanTipClass();\n\n this._addAttachmentClass(this._getAttachment(state.placement));\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY$4);\n\n const _config = typeof config === 'object' && config;\n\n if (!data && /dispose|hide/.test(config)) {\n return;\n }\n\n if (!data) {\n data = new Tooltip(this, _config);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n}\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tooltip to jQuery only if jQuery is present\n */\n\n\ndefineJQueryPlugin(NAME$4, Tooltip);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME$3 = 'popover';\nconst DATA_KEY$3 = 'bs.popover';\nconst EVENT_KEY$3 = `.${DATA_KEY$3}`;\nconst CLASS_PREFIX = 'bs-popover';\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g');\nconst Default$2 = { ...Tooltip.Default,\n placement: 'right',\n offset: [0, 8],\n trigger: 'click',\n content: '',\n template: ''\n};\nconst DefaultType$2 = { ...Tooltip.DefaultType,\n content: '(string|element|function)'\n};\nconst Event$1 = {\n HIDE: `hide${EVENT_KEY$3}`,\n HIDDEN: `hidden${EVENT_KEY$3}`,\n SHOW: `show${EVENT_KEY$3}`,\n SHOWN: `shown${EVENT_KEY$3}`,\n INSERTED: `inserted${EVENT_KEY$3}`,\n CLICK: `click${EVENT_KEY$3}`,\n FOCUSIN: `focusin${EVENT_KEY$3}`,\n FOCUSOUT: `focusout${EVENT_KEY$3}`,\n MOUSEENTER: `mouseenter${EVENT_KEY$3}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY$3}`\n};\nconst CLASS_NAME_FADE$2 = 'fade';\nconst CLASS_NAME_SHOW$2 = 'show';\nconst SELECTOR_TITLE = '.popover-header';\nconst SELECTOR_CONTENT = '.popover-body';\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default$2;\n }\n\n static get NAME() {\n return NAME$3;\n }\n\n static get DATA_KEY() {\n return DATA_KEY$3;\n }\n\n static get Event() {\n return Event$1;\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY$3;\n }\n\n static get DefaultType() {\n return DefaultType$2;\n } // Overrides\n\n\n isWithContent() {\n return this.getTitle() || this._getContent();\n }\n\n setContent() {\n const tip = this.getTipElement(); // we use append for html objects to maintain js events\n\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());\n\n let content = this._getContent();\n\n if (typeof content === 'function') {\n content = content.call(this._element);\n }\n\n this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);\n tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);\n } // Private\n\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);\n }\n\n _getContent() {\n return this._element.getAttribute('data-bs-content') || this.config.content;\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement();\n const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);\n\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY$3);\n\n const _config = typeof config === 'object' ? config : null;\n\n if (!data && /dispose|hide/.test(config)) {\n return;\n }\n\n if (!data) {\n data = new Popover(this, _config);\n Data.set(this, DATA_KEY$3, data);\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n}\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Popover to jQuery only if jQuery is present\n */\n\n\ndefineJQueryPlugin(NAME$3, Popover);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.0-beta3): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME$2 = 'scrollspy';\nconst DATA_KEY$2 = 'bs.scrollspy';\nconst EVENT_KEY$2 = `.${DATA_KEY$2}`;\nconst DATA_API_KEY$1 = '.data-api';\nconst Default$1 = {\n offset: 10,\n method: 'auto',\n target: ''\n};\nconst DefaultType$1 = {\n offset: 'number',\n method: 'string',\n target: '(string|element)'\n};\nconst EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;\nconst EVENT_SCROLL = `scroll${EVENT_KEY$2}`;\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY$2}${DATA_API_KEY$1}`;\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';\nconst CLASS_NAME_ACTIVE$1 = 'active';\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]';\nconst SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';\nconst SELECTOR_NAV_LINKS = '.nav-link';\nconst SELECTOR_NAV_ITEMS = '.nav-item';\nconst SELECTOR_LIST_ITEMS = '.list-group-item';\nconst SELECTOR_DROPDOWN$1 = '.dropdown';\nconst SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';\nconst METHOD_OFFSET = 'offset';\nconst METHOD_POSITION = 'position';\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;\n this._config = this._getConfig(config);\n this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;\n this._offsets = [];\n this._targets = [];\n this._activeTarget = null;\n this._scrollHeight = 0;\n EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process());\n this.refresh();\n\n this._process();\n } // Getters\n\n\n static get Default() {\n return Default$1;\n }\n\n static get DATA_KEY() {\n return DATA_KEY$2;\n } // Public\n\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;\n const offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;\n const offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;\n this._offsets = [];\n this._targets = [];\n this._scrollHeight = this._getScrollHeight();\n const targets = SelectorEngine.find(this._selector);\n targets.map(element => {\n const targetSelector = getSelectorFromElement(element);\n const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;\n\n if (target) {\n const targetBCR = target.getBoundingClientRect();\n\n if (targetBCR.width || targetBCR.height) {\n return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];\n }\n }\n\n return null;\n }).filter(item => item).sort((a, b) => a[0] - b[0]).forEach(item => {\n this._offsets.push(item[0]);\n\n this._targets.push(item[1]);\n });\n }\n\n dispose() {\n super.dispose();\n EventHandler.off(this._scrollElement, EVENT_KEY$2);\n this._scrollElement = null;\n this._config = null;\n this._selector = null;\n this._offsets = null;\n this._targets = null;\n this._activeTarget = null;\n this._scrollHeight = null;\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$1,\n ...(typeof config === 'object' && config ? config : {})\n };\n\n if (typeof config.target !== 'string' && isElement(config.target)) {\n let {\n id\n } = config.target;\n\n if (!id) {\n id = getUID(NAME$2);\n config.target.id = id;\n }\n\n config.target = `#${id}`;\n }\n\n typeCheckConfig(NAME$2, config, DefaultType$1);\n return config;\n }\n\n _getScrollTop() {\n return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset;\n\n const scrollHeight = this._getScrollHeight();\n\n const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh();\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1];\n\n if (this._activeTarget !== target) {\n this._activate(target);\n }\n\n return;\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null;\n\n this._clear();\n\n return;\n }\n\n for (let i = this._offsets.length; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);\n\n if (isActiveTarget) {\n this._activate(this._targets[i]);\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target;\n\n this._clear();\n\n const queries = this._selector.split(',').map(selector => `${selector}[data-bs-target=\"${target}\"],${selector}[href=\"${target}\"]`);\n\n const link = SelectorEngine.findOne(queries.join(','));\n\n if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);\n link.classList.add(CLASS_NAME_ACTIVE$1);\n } else {\n // Set triggered link as active\n link.classList.add(CLASS_NAME_ACTIVE$1);\n SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {\n // Set triggered links parents as active\n // With both and