\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RightSidebar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RightSidebar.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./RightSidebar.vue?vue&type=template&id=1b874d32&\"\nimport script from \"./RightSidebar.vue?vue&type=script&lang=js&\"\nexport * from \"./RightSidebar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./RightSidebar.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\r\n
\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=651550e7&scoped=true&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style1 from \"./index.vue?vue&type=style&index=1&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"651550e7\",\n null\n \n)\n\nexport default component.exports","import { isToday } from './utils'\r\n\r\nexport const kFormatter = num => (num > 999 ? `${(num / 1000).toFixed(1)}k` : num)\r\n\r\nexport const title = (value, replacer = ' ') => {\r\n if (!value) return ''\r\n const str = value.toString()\r\n\r\n const arr = str.split(replacer)\r\n const capitalizedArray = []\r\n arr.forEach(word => {\r\n const capitalized = word.charAt(0).toUpperCase() + word.slice(1)\r\n capitalizedArray.push(capitalized)\r\n })\r\n return capitalizedArray.join(' ')\r\n}\r\n\r\nexport const avatarText = value => {\r\n if (!value) return ''\r\n const nameArray = value.split(' ')\r\n const str = nameArray.map(word => word.charAt(0).toUpperCase()).join('')\r\n const last2 = str.slice(str.length - 2)\r\n // return nameArray.map(word => word.charAt(0).toUpperCase()).join('')\r\n return last2\r\n}\r\n\r\n/**\r\n * Format and return date in Humanize format\r\n * Intl docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format\r\n * Intl Constructor: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat\r\n * @param {String} value date to format\r\n * @param {Object} formatting Intl object to format with\r\n */\r\nexport const formatDate = (value, formatting = { month: 'short', day: 'numeric', year: 'numeric' }) => {\r\n if (!value) return value\r\n return new Intl.DateTimeFormat('en-US', formatting).format(new Date(value))\r\n}\r\n\r\n/**\r\n * Return short human friendly month representation of date\r\n * Can also convert date to only time if date is of today (Better UX)\r\n * @param {String} value date to format\r\n * @param {Boolean} toTimeForCurrentDay Shall convert to time if day is today/current\r\n */\r\nexport const formatDateToMonthShort = (value, toTimeForCurrentDay = true) => {\r\n const date = new Date(value)\r\n let formatting = { month: 'short', day: 'numeric' }\r\n\r\n if (toTimeForCurrentDay && isToday(date)) {\r\n formatting = { hour: 'numeric', minute: 'numeric' }\r\n }\r\n\r\n return new Intl.DateTimeFormat('en-US', formatting).format(new Date(value))\r\n}\r\n\r\n// Strip all the tags from markup and return plain text\r\nexport const filterTags = value => value.replace(/<\\/?[^>]+(>|$)/g, '')\r\n","'use strict';\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.repeat` method implementation\n// https://tc39.github.io/ecma262/#sec-string.prototype.repeat\nmodule.exports = ''.repeat || function repeat(count) {\n var str = String(requireObjectCoercible(this));\n var result = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n return result;\n};\n","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import { Vue, mergeData } from '../../vue';\nimport { NAME_FORM } from '../../constants/components';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n id: makeProp(PROP_TYPE_STRING),\n inline: makeProp(PROP_TYPE_BOOLEAN, false),\n novalidate: makeProp(PROP_TYPE_BOOLEAN, false),\n validated: makeProp(PROP_TYPE_BOOLEAN, false)\n}, NAME_FORM); // --- Main component ---\n// @vue/component\n\nexport var BForm = /*#__PURE__*/Vue.extend({\n name: NAME_FORM,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n return h('form', mergeData(data, {\n class: {\n 'form-inline': props.inline,\n 'was-validated': props.validated\n },\n attrs: {\n id: props.id,\n novalidate: props.novalidate\n }\n }), children);\n }\n});","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var before = require('./before');\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\nmodule.exports = once;\n","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { NAME_TOOLTIP } from '../../constants/components';\nimport { IS_BROWSER } from '../../constants/env';\nimport { EVENT_NAME_SHOW } from '../../constants/events';\nimport { concat } from '../../utils/array';\nimport { getComponentConfig } from '../../utils/config';\nimport { getScopeId } from '../../utils/get-scope-id';\nimport { identity } from '../../utils/identity';\nimport { isFunction, isNumber, isPlainObject, isString, isUndefined, isUndefinedOrNull } from '../../utils/inspect';\nimport { looseEqual } from '../../utils/loose-equal';\nimport { toInteger } from '../../utils/number';\nimport { keys } from '../../utils/object';\nimport { BVTooltip } from '../../components/tooltip/helpers/bv-tooltip'; // Key which we use to store tooltip object on element\n\nvar BV_TOOLTIP = '__BV_Tooltip__'; // Default trigger\n\nvar DefaultTrigger = 'hover focus'; // Valid event triggers\n\nvar validTriggers = {\n focus: true,\n hover: true,\n click: true,\n blur: true,\n manual: true\n}; // Directive modifier test regular expressions. Pre-compile for performance\n\nvar htmlRE = /^html$/i;\nvar noninteractiveRE = /^noninteractive$/i;\nvar noFadeRE = /^nofade$/i;\nvar placementRE = /^(auto|top(left|right)?|bottom(left|right)?|left(top|bottom)?|right(top|bottom)?)$/i;\nvar boundaryRE = /^(window|viewport|scrollParent)$/i;\nvar delayRE = /^d\\d+$/i;\nvar delayShowRE = /^ds\\d+$/i;\nvar delayHideRE = /^dh\\d+$/i;\nvar offsetRE = /^o-?\\d+$/i;\nvar variantRE = /^v-.+$/i;\nvar spacesRE = /\\s+/; // Build a Tooltip config based on bindings (if any)\n// Arguments and modifiers take precedence over passed value config object\n\nvar parseBindings = function parseBindings(bindings, vnode)\n/* istanbul ignore next: not easy to test */\n{\n // We start out with a basic config\n var config = {\n title: undefined,\n trigger: '',\n // Default set below if needed\n placement: 'top',\n fallbackPlacement: 'flip',\n container: false,\n // Default of body\n animation: true,\n offset: 0,\n id: null,\n html: false,\n interactive: true,\n disabled: false,\n delay: getComponentConfig(NAME_TOOLTIP, 'delay', 50),\n boundary: String(getComponentConfig(NAME_TOOLTIP, 'boundary', 'scrollParent')),\n boundaryPadding: toInteger(getComponentConfig(NAME_TOOLTIP, 'boundaryPadding', 5), 0),\n variant: getComponentConfig(NAME_TOOLTIP, 'variant'),\n customClass: getComponentConfig(NAME_TOOLTIP, 'customClass')\n }; // Process `bindings.value`\n\n if (isString(bindings.value) || isNumber(bindings.value)) {\n // Value is tooltip content (HTML optionally supported)\n config.title = bindings.value;\n } else if (isFunction(bindings.value)) {\n // Title generator function\n config.title = bindings.value;\n } else if (isPlainObject(bindings.value)) {\n // Value is config object, so merge\n config = _objectSpread(_objectSpread({}, config), bindings.value);\n } // If title is not provided, try title attribute\n\n\n if (isUndefined(config.title)) {\n // Try attribute\n var data = vnode.data || {};\n config.title = data.attrs && !isUndefinedOrNull(data.attrs.title) ? data.attrs.title : undefined;\n } // Normalize delay\n\n\n if (!isPlainObject(config.delay)) {\n config.delay = {\n show: toInteger(config.delay, 0),\n hide: toInteger(config.delay, 0)\n };\n } // If argument, assume element ID of container element\n\n\n if (bindings.arg) {\n // Element ID specified as arg\n // We must prepend '#' to become a CSS selector\n config.container = \"#\".concat(bindings.arg);\n } // Process modifiers\n\n\n keys(bindings.modifiers).forEach(function (mod) {\n if (htmlRE.test(mod)) {\n // Title allows HTML\n config.html = true;\n } else if (noninteractiveRE.test(mod)) {\n // Noninteractive\n config.interactive = false;\n } else if (noFadeRE.test(mod)) {\n // No animation\n config.animation = false;\n } else if (placementRE.test(mod)) {\n // Placement of tooltip\n config.placement = mod;\n } else if (boundaryRE.test(mod)) {\n // Boundary of tooltip\n mod = mod === 'scrollparent' ? 'scrollParent' : mod;\n config.boundary = mod;\n } else if (delayRE.test(mod)) {\n // Delay value\n var delay = toInteger(mod.slice(1), 0);\n config.delay.show = delay;\n config.delay.hide = delay;\n } else if (delayShowRE.test(mod)) {\n // Delay show value\n config.delay.show = toInteger(mod.slice(2), 0);\n } else if (delayHideRE.test(mod)) {\n // Delay hide value\n config.delay.hide = toInteger(mod.slice(2), 0);\n } else if (offsetRE.test(mod)) {\n // Offset value, negative allowed\n config.offset = toInteger(mod.slice(1), 0);\n } else if (variantRE.test(mod)) {\n // Variant\n config.variant = mod.slice(2) || null;\n }\n }); // Special handling of event trigger modifiers trigger is\n // a space separated list\n\n var selectedTriggers = {}; // Parse current config object trigger\n\n concat(config.trigger || '').filter(identity).join(' ').trim().toLowerCase().split(spacesRE).forEach(function (trigger) {\n if (validTriggers[trigger]) {\n selectedTriggers[trigger] = true;\n }\n }); // Parse modifiers for triggers\n\n keys(bindings.modifiers).forEach(function (mod) {\n mod = mod.toLowerCase();\n\n if (validTriggers[mod]) {\n // If modifier is a valid trigger\n selectedTriggers[mod] = true;\n }\n }); // Sanitize triggers\n\n config.trigger = keys(selectedTriggers).join(' ');\n\n if (config.trigger === 'blur') {\n // Blur by itself is useless, so convert it to 'focus'\n config.trigger = 'focus';\n }\n\n if (!config.trigger) {\n // Use default trigger\n config.trigger = DefaultTrigger;\n } // Return the config\n\n\n return config;\n}; // Add/update Tooltip on our element\n\n\nvar applyTooltip = function applyTooltip(el, bindings, vnode) {\n if (!IS_BROWSER) {\n /* istanbul ignore next */\n return;\n }\n\n var config = parseBindings(bindings, vnode);\n\n if (!el[BV_TOOLTIP]) {\n var $parent = vnode.context;\n el[BV_TOOLTIP] = new BVTooltip({\n parent: $parent,\n // Add the parent's scoped style attribute data\n _scopeId: getScopeId($parent, undefined)\n });\n el[BV_TOOLTIP].__bv_prev_data__ = {};\n el[BV_TOOLTIP].$on(EVENT_NAME_SHOW, function ()\n /* istanbul ignore next: for now */\n {\n // Before showing the tooltip, we update the title if it is a function\n if (isFunction(config.title)) {\n el[BV_TOOLTIP].updateData({\n title: config.title(el)\n });\n }\n });\n }\n\n var data = {\n title: config.title,\n triggers: config.trigger,\n placement: config.placement,\n fallbackPlacement: config.fallbackPlacement,\n variant: config.variant,\n customClass: config.customClass,\n container: config.container,\n boundary: config.boundary,\n delay: config.delay,\n offset: config.offset,\n noFade: !config.animation,\n id: config.id,\n interactive: config.interactive,\n disabled: config.disabled,\n html: config.html\n };\n var oldData = el[BV_TOOLTIP].__bv_prev_data__;\n el[BV_TOOLTIP].__bv_prev_data__ = data;\n\n if (!looseEqual(data, oldData)) {\n // We only update the instance if data has changed\n var newData = {\n target: el\n };\n keys(data).forEach(function (prop) {\n // We only pass data properties that have changed\n if (data[prop] !== oldData[prop]) {\n // if title is a function, we execute it here\n newData[prop] = prop === 'title' && isFunction(data[prop]) ? data[prop](el) : data[prop];\n }\n });\n el[BV_TOOLTIP].updateData(newData);\n }\n}; // Remove Tooltip on our element\n\n\nvar removeTooltip = function removeTooltip(el) {\n if (el[BV_TOOLTIP]) {\n el[BV_TOOLTIP].$destroy();\n el[BV_TOOLTIP] = null;\n }\n\n delete el[BV_TOOLTIP];\n}; // Export our directive\n\n\nexport var VBTooltip = {\n bind: function bind(el, bindings, vnode) {\n applyTooltip(el, bindings, vnode);\n },\n // We use `componentUpdated` here instead of `update`, as the former\n // waits until the containing component and children have finished updating\n componentUpdated: function componentUpdated(el, bindings, vnode) {\n // Performed in a `$nextTick()` to prevent render update loops\n vnode.context.$nextTick(function () {\n applyTooltip(el, bindings, vnode);\n });\n },\n unbind: function unbind(el) {\n removeTooltip(el);\n }\n};","module.exports = isPromise;\nmodule.exports.default = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","var arrayWithHoles = require(\"./arrayWithHoles.js\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableRest = require(\"./nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// Mixin to determine if an event listener has been registered\n// either via `v-on:name` (in the parent) or programmatically\n// via `vm.$on('name', ...)`\n// See: https://github.com/vuejs/vue/issues/10825\nimport { Vue } from '../vue';\nimport { isArray, isUndefined } from '../utils/inspect'; // @vue/component\n\nexport var hasListenerMixin = Vue.extend({\n methods: {\n hasListener: function hasListener(name) {\n // Only includes listeners registered via `v-on:name`\n var $listeners = this.$listeners || {}; // Includes `v-on:name` and `this.$on('name')` registered listeners\n // Note this property is not part of the public Vue API, but it is\n // the only way to determine if a listener was added via `vm.$on`\n\n var $events = this._events || {}; // Registered listeners in `this._events` are always an array,\n // but might be zero length\n\n return !isUndefined($listeners[name]) || isArray($events[name]) && $events[name].length > 0;\n }\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../vue';\nimport { NAME_TR } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Constants ---\n\nvar LIGHT = 'light';\nvar DARK = 'dark'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n variant: makeProp(PROP_TYPE_STRING)\n}, NAME_TR); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTr = /*#__PURE__*/Vue.extend({\n name: NAME_TR,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableTr: this\n };\n },\n inject: {\n bvTableRowGroup: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / ``\n inTbody: function inTbody() {\n return this.bvTableRowGroup.isTbody;\n },\n // Sniffed by `` / ``\n inThead: function inThead() {\n return this.bvTableRowGroup.isThead;\n },\n // Sniffed by `` / ``\n inTfoot: function inTfoot() {\n return this.bvTableRowGroup.isTfoot;\n },\n // Sniffed by `` / ``\n isDark: function isDark() {\n return this.bvTableRowGroup.isDark;\n },\n // Sniffed by `` / ``\n isStacked: function isStacked() {\n return this.bvTableRowGroup.isStacked;\n },\n // Sniffed by `` / ``\n isResponsive: function isResponsive() {\n return this.bvTableRowGroup.isResponsive;\n },\n // Sniffed by `` / ``\n // Sticky headers are only supported in thead\n isStickyHeader: function isStickyHeader() {\n return this.bvTableRowGroup.isStickyHeader;\n },\n // Sniffed by / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTableRowGroup.hasStickyHeader;\n },\n // Sniffed by `` / ``\n tableVariant: function tableVariant() {\n return this.bvTableRowGroup.tableVariant;\n },\n // Sniffed by `` / ``\n headVariant: function headVariant() {\n return this.inThead ? this.bvTableRowGroup.headVariant : null;\n },\n // Sniffed by `` / ``\n footVariant: function footVariant() {\n return this.inTfoot ? this.bvTableRowGroup.footVariant : null;\n },\n isRowDark: function isRowDark() {\n return this.headVariant === LIGHT || this.footVariant === LIGHT ?\n /* istanbul ignore next */\n false : this.headVariant === DARK || this.footVariant === DARK ?\n /* istanbul ignore next */\n true : this.isDark;\n },\n trClasses: function trClasses() {\n var variant = this.variant;\n return [variant ? \"\".concat(this.isRowDark ? 'bg' : 'table', \"-\").concat(variant) : null];\n },\n trAttrs: function trAttrs() {\n return _objectSpread({\n role: 'row'\n }, this.bvAttrs);\n }\n },\n render: function render(h) {\n return h('tr', {\n class: this.trClasses,\n attrs: this.trAttrs,\n // Pass native listeners to child\n on: this.bvListeners\n }, this.normalizeSlot());\n }\n});","import { Vue } from '../../../vue';\nimport { SLOT_NAME_BOTTOM_ROW } from '../../../constants/slots';\nimport { isFunction } from '../../../utils/inspect';\nimport { BTr } from '../tr'; // --- Props ---\n\nexport var props = {}; // --- Mixin ---\n// @vue/component\n\nexport var bottomRowMixin = Vue.extend({\n props: props,\n methods: {\n renderBottomRow: function renderBottomRow() {\n var fields = this.computedFields,\n stacked = this.stacked,\n tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n var h = this.$createElement; // Static bottom row slot (hidden in visibly stacked mode as we can't control the data-label)\n // If in *always* stacked mode, we don't bother rendering the row\n\n if (!this.hasNormalizedSlot(SLOT_NAME_BOTTOM_ROW) || stacked === true || stacked === '') {\n return h();\n }\n\n return h(BTr, {\n staticClass: 'b-table-bottom-row',\n class: [isFunction(tbodyTrClass) ?\n /* istanbul ignore next */\n tbodyTrClass(null, 'row-bottom') : tbodyTrClass],\n attrs: isFunction(tbodyTrAttr) ?\n /* istanbul ignore next */\n tbodyTrAttr(null, 'row-bottom') : tbodyTrAttr,\n key: 'b-bottom-row'\n }, this.normalizeSlot(SLOT_NAME_BOTTOM_ROW, {\n columns: fields.length,\n fields: fields\n }));\n }\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../vue';\nimport { NAME_TABLE_CELL } from '../../constants/components';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING } from '../../constants/props';\nimport { isTag } from '../../utils/dom';\nimport { isUndefinedOrNull } from '../../utils/inspect';\nimport { toInteger } from '../../utils/number';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { toString } from '../../utils/string';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Helper methods ---\n// Parse a rowspan or colspan into a digit (or `null` if < `1` )\n\nvar parseSpan = function parseSpan(value) {\n value = toInteger(value, 0);\n return value > 0 ? value : null;\n};\n/* istanbul ignore next */\n\n\nvar spanValidator = function spanValidator(value) {\n return isUndefinedOrNull(value) || parseSpan(value) > 0;\n}; // --- Props ---\n\n\nexport var props = makePropsConfigurable({\n colspan: makeProp(PROP_TYPE_NUMBER_STRING, null, spanValidator),\n rowspan: makeProp(PROP_TYPE_NUMBER_STRING, null, spanValidator),\n stackedHeading: makeProp(PROP_TYPE_STRING),\n stickyColumn: makeProp(PROP_TYPE_BOOLEAN, false),\n variant: makeProp(PROP_TYPE_STRING)\n}, NAME_TABLE_CELL); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTd = /*#__PURE__*/Vue.extend({\n name: NAME_TABLE_CELL,\n // Mixin order is important!\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n inject: {\n bvTableTr: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Overridden by ``\n tag: function tag() {\n return 'td';\n },\n inTbody: function inTbody() {\n return this.bvTableTr.inTbody;\n },\n inThead: function inThead() {\n return this.bvTableTr.inThead;\n },\n inTfoot: function inTfoot() {\n return this.bvTableTr.inTfoot;\n },\n isDark: function isDark() {\n return this.bvTableTr.isDark;\n },\n isStacked: function isStacked() {\n return this.bvTableTr.isStacked;\n },\n // We only support stacked-heading in tbody in stacked mode\n isStackedCell: function isStackedCell() {\n return this.inTbody && this.isStacked;\n },\n isResponsive: function isResponsive() {\n return this.bvTableTr.isResponsive;\n },\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n // Sticky headers only apply to cells in table `thead`\n isStickyHeader: function isStickyHeader() {\n return this.bvTableTr.isStickyHeader;\n },\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return this.bvTableTr.hasStickyHeader;\n },\n // Needed to handle background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n // Sticky column cells are only available in responsive\n // mode (horizontal scrolling) or when sticky header mode\n // Applies to cells in `thead`, `tbody` and `tfoot`\n isStickyColumn: function isStickyColumn() {\n return !this.isStacked && (this.isResponsive || this.hasStickyHeader) && this.stickyColumn;\n },\n rowVariant: function rowVariant() {\n return this.bvTableTr.variant;\n },\n headVariant: function headVariant() {\n return this.bvTableTr.headVariant;\n },\n footVariant: function footVariant() {\n return this.bvTableTr.footVariant;\n },\n tableVariant: function tableVariant() {\n return this.bvTableTr.tableVariant;\n },\n computedColspan: function computedColspan() {\n return parseSpan(this.colspan);\n },\n computedRowspan: function computedRowspan() {\n return parseSpan(this.rowspan);\n },\n // We use computed props here for improved performance by caching\n // the results of the string interpolation\n cellClasses: function cellClasses() {\n var variant = this.variant,\n headVariant = this.headVariant,\n isStickyColumn = this.isStickyColumn;\n\n if (!variant && this.isStickyHeader && !headVariant || !variant && isStickyColumn && this.inTfoot && !this.footVariant || !variant && isStickyColumn && this.inThead && !headVariant || !variant && isStickyColumn && this.inTbody) {\n // Needed for sticky-header mode as Bootstrap v4 table cells do\n // not inherit parent's `background-color`\n variant = this.rowVariant || this.tableVariant || 'b-table-default';\n }\n\n return [variant ? \"\".concat(this.isDark ? 'bg' : 'table', \"-\").concat(variant) : null, isStickyColumn ? 'b-table-sticky-column' : null];\n },\n cellAttrs: function cellAttrs() {\n var stackedHeading = this.stackedHeading; // We use computed props here for improved performance by caching\n // the results of the object spread (Object.assign)\n\n var headOrFoot = this.inThead || this.inTfoot; // Make sure col/rowspan's are > 0 or null\n\n var colspan = this.computedColspan;\n var rowspan = this.computedRowspan; // Default role and scope\n\n var role = 'cell';\n var scope = null; // Compute role and scope\n // We only add scopes with an explicit span of 1 or greater\n\n if (headOrFoot) {\n // Header or footer cells\n role = 'columnheader';\n scope = colspan > 0 ? 'colspan' : 'col';\n } else if (isTag(this.tag, 'th')) {\n // th's in tbody\n role = 'rowheader';\n scope = rowspan > 0 ? 'rowgroup' : 'row';\n }\n\n return _objectSpread(_objectSpread({\n colspan: colspan,\n rowspan: rowspan,\n role: role,\n scope: scope\n }, this.bvAttrs), {}, {\n // Add in the stacked cell label data-attribute if in\n // stacked mode (if a stacked heading label is provided)\n 'data-label': this.isStackedCell && !isUndefinedOrNull(stackedHeading) ?\n /* istanbul ignore next */\n toString(stackedHeading) : null\n });\n }\n },\n render: function render(h) {\n var $content = [this.normalizeSlot()];\n return h(this.tag, {\n class: this.cellClasses,\n attrs: this.cellAttrs,\n // Transfer any native listeners\n on: this.bvListeners\n }, [this.isStackedCell ? h('div', [$content]) : $content]);\n }\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 '../../../vue';\nimport { MODEL_EVENT_NAME_PREFIX } from '../../../constants/events';\nimport { PROP_TYPE_BOOLEAN } from '../../../constants/props';\nimport { SLOT_NAME_TABLE_BUSY } from '../../../constants/slots';\nimport { stopEvent } from '../../../utils/events';\nimport { isFunction } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { BTr } from '../tr';\nimport { BTd } from '../td'; // --- Constants ---\n\nvar MODEL_PROP_NAME_BUSY = 'busy';\nvar MODEL_EVENT_NAME_BUSY = MODEL_EVENT_NAME_PREFIX + MODEL_PROP_NAME_BUSY; // --- Props ---\n\nexport var props = _defineProperty({}, MODEL_PROP_NAME_BUSY, makeProp(PROP_TYPE_BOOLEAN, false)); // --- Mixin ---\n// @vue/component\n\nexport var busyMixin = Vue.extend({\n props: props,\n data: function data() {\n return {\n localBusy: false\n };\n },\n computed: {\n computedBusy: function computedBusy() {\n return this[MODEL_PROP_NAME_BUSY] || this.localBusy;\n }\n },\n watch: {\n localBusy: function localBusy(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.$emit(MODEL_EVENT_NAME_BUSY, newValue);\n }\n }\n },\n methods: {\n // Event handler helper\n stopIfBusy: function stopIfBusy(event) {\n // If table is busy (via provider) then don't propagate\n if (this.computedBusy) {\n stopEvent(event);\n return true;\n }\n\n return false;\n },\n // Render the busy indicator or return `null` if not busy\n renderBusy: function renderBusy() {\n var tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n var h = this.$createElement; // Return a busy indicator row, or `null` if not busy\n\n if (this.computedBusy && this.hasNormalizedSlot(SLOT_NAME_TABLE_BUSY)) {\n return h(BTr, {\n staticClass: 'b-table-busy-slot',\n class: [isFunction(tbodyTrClass) ?\n /* istanbul ignore next */\n tbodyTrClass(null, SLOT_NAME_TABLE_BUSY) : tbodyTrClass],\n attrs: isFunction(tbodyTrAttr) ?\n /* istanbul ignore next */\n tbodyTrAttr(null, SLOT_NAME_TABLE_BUSY) : tbodyTrAttr,\n key: 'table-busy-slot'\n }, [h(BTd, {\n props: {\n colspan: this.computedFields.length || null\n }\n }, [this.normalizeSlot(SLOT_NAME_TABLE_BUSY)])]);\n } // We return `null` here so that we can determine if we need to\n // render the table items rows or not\n\n\n return null;\n }\n }\n});","import { Vue } from '../../../vue';\nimport { PROP_TYPE_STRING } from '../../../constants/props';\nimport { SLOT_NAME_TABLE_CAPTION } from '../../../constants/slots';\nimport { htmlOrText } from '../../../utils/html';\nimport { makeProp } from '../../../utils/props'; // --- Props ---\n\nexport var props = {\n caption: makeProp(PROP_TYPE_STRING),\n captionHtml: makeProp(PROP_TYPE_STRING) // `caption-top` is part of table-render mixin (styling)\n // captionTop: makeProp(PROP_TYPE_BOOLEAN, false)\n\n}; // --- Mixin ---\n// @vue/component\n\nexport var captionMixin = Vue.extend({\n props: props,\n computed: {\n captionId: function captionId() {\n // Even though `this.safeId` looks like a method, it is a computed prop\n // that returns a new function if the underlying ID changes\n return this.isStacked ? this.safeId('_caption_') : null;\n }\n },\n methods: {\n renderCaption: function renderCaption() {\n var caption = this.caption,\n captionHtml = this.captionHtml;\n var h = this.$createElement;\n var $caption = h();\n var hasCaptionSlot = this.hasNormalizedSlot(SLOT_NAME_TABLE_CAPTION);\n\n if (hasCaptionSlot || caption || captionHtml) {\n $caption = h('caption', {\n attrs: {\n id: this.captionId\n },\n domProps: hasCaptionSlot ? {} : htmlOrText(captionHtml, caption),\n key: 'caption'\n }, this.normalizeSlot(SLOT_NAME_TABLE_CAPTION));\n }\n\n return $caption;\n }\n }\n});","import { Vue } from '../../../vue';\nimport { SLOT_NAME_TABLE_COLGROUP } from '../../../constants/slots'; // --- Props ---\n\nexport var props = {}; // --- Mixin ---\n// @vue/component\n\nexport var colgroupMixin = Vue.extend({\n methods: {\n renderColgroup: function renderColgroup() {\n var fields = this.computedFields;\n var h = this.$createElement;\n var $colgroup = h();\n\n if (this.hasNormalizedSlot(SLOT_NAME_TABLE_COLGROUP)) {\n $colgroup = h('colgroup', {\n key: 'colgroup'\n }, [this.normalizeSlot(SLOT_NAME_TABLE_COLGROUP, {\n columns: fields.length,\n fields: fields\n })]);\n }\n\n return $colgroup;\n }\n }\n});","import { Vue } from '../../../vue';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';\nimport { SLOT_NAME_EMPTY, SLOT_NAME_EMPTYFILTERED, SLOT_NAME_TABLE_BUSY } from '../../../constants/slots';\nimport { htmlOrText } from '../../../utils/html';\nimport { isFunction } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { BTr } from '../tr';\nimport { BTd } from '../td'; // --- Props ---\n\nexport var props = {\n emptyFilteredHtml: makeProp(PROP_TYPE_STRING),\n emptyFilteredText: makeProp(PROP_TYPE_STRING, 'There are no records matching your request'),\n emptyHtml: makeProp(PROP_TYPE_STRING),\n emptyText: makeProp(PROP_TYPE_STRING, 'There are no records to show'),\n showEmpty: makeProp(PROP_TYPE_BOOLEAN, false)\n}; // --- Mixin ---\n// @vue/component\n\nexport var emptyMixin = Vue.extend({\n props: props,\n methods: {\n renderEmpty: function renderEmpty() {\n var items = this.computedItems;\n var h = this.$createElement;\n var $empty = h();\n\n if (this.showEmpty && (!items || items.length === 0) && !(this.computedBusy && this.hasNormalizedSlot(SLOT_NAME_TABLE_BUSY))) {\n var fields = this.computedFields,\n isFiltered = this.isFiltered,\n emptyText = this.emptyText,\n emptyHtml = this.emptyHtml,\n emptyFilteredText = this.emptyFilteredText,\n emptyFilteredHtml = this.emptyFilteredHtml,\n tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n $empty = this.normalizeSlot(isFiltered ? SLOT_NAME_EMPTYFILTERED : SLOT_NAME_EMPTY, {\n emptyFilteredHtml: emptyFilteredHtml,\n emptyFilteredText: emptyFilteredText,\n emptyHtml: emptyHtml,\n emptyText: emptyText,\n fields: fields,\n // Not sure why this is included, as it will always be an empty array\n items: items\n });\n\n if (!$empty) {\n $empty = h('div', {\n class: ['text-center', 'my-2'],\n domProps: isFiltered ? htmlOrText(emptyFilteredHtml, emptyFilteredText) : htmlOrText(emptyHtml, emptyText)\n });\n }\n\n $empty = h(BTd, {\n props: {\n colspan: fields.length || null\n }\n }, [h('div', {\n attrs: {\n role: 'alert',\n 'aria-live': 'polite'\n }\n }, [$empty])]);\n $empty = h(BTr, {\n staticClass: 'b-table-empty-row',\n class: [isFunction(tbodyTrClass) ?\n /* istanbul ignore next */\n tbodyTrClass(null, 'row-empty') : tbodyTrClass],\n attrs: isFunction(tbodyTrAttr) ?\n /* istanbul ignore next */\n tbodyTrAttr(null, 'row-empty') : tbodyTrAttr,\n key: isFiltered ? 'b-empty-filtered-row' : 'b-empty-row'\n }, [$empty]);\n }\n\n return $empty;\n }\n }\n});","import { isDate, isObject, isUndefinedOrNull } from './inspect';\nimport { keys } from './object';\nimport { toString } from './string'; // Recursively stringifies the values of an object, space separated, in an\n// SSR safe deterministic way (keys are sorted before stringification)\n//\n// ex:\n// { b: 3, c: { z: 'zzz', d: null, e: 2 }, d: [10, 12, 11], a: 'one' }\n// becomes\n// 'one 3 2 zzz 10 12 11'\n//\n// Strings are returned as-is\n// Numbers get converted to string\n// `null` and `undefined` values are filtered out\n// Dates are converted to their native string format\n\nexport var stringifyObjectValues = function stringifyObjectValues(value) {\n if (isUndefinedOrNull(value)) {\n return '';\n } // Arrays are also object, and keys just returns the array indexes\n // Date objects we convert to strings\n\n\n if (isObject(value) && !isDate(value)) {\n return keys(value).sort() // Sort to prevent SSR issues on pre-rendered sorted tables\n .map(function (k) {\n return stringifyObjectValues(value[k]);\n }).filter(function (v) {\n return !!v;\n }) // Ignore empty strings\n .join(' ');\n }\n\n return toString(value);\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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// Constants used by table helpers\nexport var FIELD_KEY_CELL_VARIANT = '_cellVariants';\nexport var FIELD_KEY_ROW_VARIANT = '_rowVariant';\nexport var FIELD_KEY_SHOW_DETAILS = '_showDetails'; // Object of item keys that should be ignored for headers and\n// stringification and filter events\n\nexport var IGNORED_FIELD_KEYS = [FIELD_KEY_CELL_VARIANT, FIELD_KEY_ROW_VARIANT, FIELD_KEY_SHOW_DETAILS].reduce(function (result, key) {\n return _objectSpread(_objectSpread({}, result), {}, _defineProperty({}, key, true));\n}, {}); // Filter CSS selector for click/dblclick/etc. events\n// If any of these selectors match the clicked element, we ignore the event\n\nexport var EVENT_FILTER = ['a', 'a *', // Include content inside links\n'button', 'button *', // Include content inside buttons\n'input:not(.disabled):not([disabled])', 'select:not(.disabled):not([disabled])', 'textarea:not(.disabled):not([disabled])', '[role=\"link\"]', '[role=\"link\"] *', '[role=\"button\"]', '[role=\"button\"] *', '[tabindex]:not(.disabled):not([disabled])'].join(',');","import { arrayIncludes } from '../../../utils/array';\nimport { isArray, isFunction } from '../../../utils/inspect';\nimport { clone, keys, pick } from '../../../utils/object';\nimport { IGNORED_FIELD_KEYS } from './constants'; // Return a copy of a row after all reserved fields have been filtered out\n\nexport var sanitizeRow = function sanitizeRow(row, ignoreFields, includeFields) {\n var fieldsObj = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n // We first need to format the row based on the field configurations\n // This ensures that we add formatted values for keys that may not\n // exist in the row itself\n var formattedRow = keys(fieldsObj).reduce(function (result, key) {\n var field = fieldsObj[key];\n var filterByFormatted = field.filterByFormatted;\n var formatter = isFunction(filterByFormatted) ?\n /* istanbul ignore next */\n filterByFormatted : filterByFormatted ?\n /* istanbul ignore next */\n field.formatter : null;\n\n if (isFunction(formatter)) {\n result[key] = formatter(row[key], key, row);\n }\n\n return result;\n }, clone(row)); // Determine the allowed keys:\n // - Ignore special fields that start with `_`\n // - Ignore fields in the `ignoreFields` array\n // - Include only fields in the `includeFields` array\n\n var allowedKeys = keys(formattedRow).filter(function (key) {\n return !IGNORED_FIELD_KEYS[key] && !(isArray(ignoreFields) && ignoreFields.length > 0 && arrayIncludes(ignoreFields, key)) && !(isArray(includeFields) && includeFields.length > 0 && !arrayIncludes(includeFields, key));\n });\n return pick(formattedRow, allowedKeys);\n};","import { isObject } from '../../../utils/inspect';\nimport { stringifyObjectValues } from '../../../utils/stringify-object-values';\nimport { sanitizeRow } from './sanitize-row'; // Stringifies the values of a record, ignoring any special top level field keys\n// TODO: Add option to stringify `scopedSlot` items\n\nexport var stringifyRecordValues = function stringifyRecordValues(row, ignoreFields, includeFields, fieldsObj) {\n return isObject(row) ? stringifyObjectValues(sanitizeRow(row, ignoreFields, includeFields, fieldsObj)) :\n /* istanbul ignore next */\n '';\n};","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { Vue } from '../../../vue';\nimport { NAME_TABLE } from '../../../constants/components';\nimport { EVENT_NAME_FILTERED } from '../../../constants/events';\nimport { PROP_TYPE_REG_EXP, PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_FUNCTION, PROP_TYPE_ARRAY, PROP_TYPE_NUMBER_STRING } from '../../../constants/props';\nimport { RX_DIGITS, RX_SPACES } from '../../../constants/regex';\nimport { concat } from '../../../utils/array';\nimport { cloneDeep } from '../../../utils/clone-deep';\nimport { identity } from '../../../utils/identity';\nimport { isFunction, isString, isRegExp } from '../../../utils/inspect';\nimport { looseEqual } from '../../../utils/loose-equal';\nimport { toInteger } from '../../../utils/number';\nimport { hasPropFunction, makeProp } from '../../../utils/props';\nimport { escapeRegExp } from '../../../utils/string';\nimport { warn } from '../../../utils/warn';\nimport { stringifyRecordValues } from './stringify-record-values'; // --- Constants ---\n\nvar DEBOUNCE_DEPRECATED_MSG = 'Prop \"filter-debounce\" is deprecated. Use the debounce feature of \"\" instead.'; // --- Props ---\n\nexport var props = {\n filter: makeProp([].concat(_toConsumableArray(PROP_TYPE_ARRAY_OBJECT_STRING), [PROP_TYPE_REG_EXP])),\n filterDebounce: makeProp(PROP_TYPE_NUMBER_STRING, 0, function (value) {\n return RX_DIGITS.test(String(value));\n }),\n filterFunction: makeProp(PROP_TYPE_FUNCTION),\n filterIgnoredFields: makeProp(PROP_TYPE_ARRAY, []),\n filterIncludedFields: makeProp(PROP_TYPE_ARRAY, [])\n}; // --- Mixin ---\n// @vue/component\n\nexport var filteringMixin = Vue.extend({\n props: props,\n data: function data() {\n return {\n // Flag for displaying which empty slot to show and some event triggering\n isFiltered: false,\n // Where we store the copy of the filter criteria after debouncing\n // We pre-set it with the sanitized filter value\n localFilter: this.filterSanitize(this.filter)\n };\n },\n computed: {\n computedFilterIgnored: function computedFilterIgnored() {\n return concat(this.filterIgnoredFields || []).filter(identity);\n },\n computedFilterIncluded: function computedFilterIncluded() {\n return concat(this.filterIncludedFields || []).filter(identity);\n },\n computedFilterDebounce: function computedFilterDebounce() {\n var ms = toInteger(this.filterDebounce, 0);\n /* istanbul ignore next */\n\n if (ms > 0) {\n warn(DEBOUNCE_DEPRECATED_MSG, NAME_TABLE);\n }\n\n return ms;\n },\n localFiltering: function localFiltering() {\n return this.hasProvider ? !!this.noProviderFiltering : true;\n },\n // For watching changes to `filteredItems` vs `localItems`\n filteredCheck: function filteredCheck() {\n var filteredItems = this.filteredItems,\n localItems = this.localItems,\n localFilter = this.localFilter;\n return {\n filteredItems: filteredItems,\n localItems: localItems,\n localFilter: localFilter\n };\n },\n // Sanitized/normalize filter-function prop\n localFilterFn: function localFilterFn() {\n // Return `null` to signal to use internal filter function\n var filterFunction = this.filterFunction;\n return hasPropFunction(filterFunction) ? filterFunction : null;\n },\n // Returns the records in `localItems` that match the filter criteria\n // Returns the original `localItems` array if not sorting\n filteredItems: function filteredItems() {\n // Note the criteria is debounced and sanitized\n var items = this.localItems,\n criteria = this.localFilter; // Resolve the filtering function, when requested\n // We prefer the provided filtering function and fallback to the internal one\n // When no filtering criteria is specified the filtering factories will return `null`\n\n var filterFn = this.localFiltering ? this.filterFnFactory(this.localFilterFn, criteria) || this.defaultFilterFnFactory(criteria) : null; // We only do local filtering when requested and there are records to filter\n\n return filterFn && items.length > 0 ? items.filter(filterFn) : items;\n }\n },\n watch: {\n // Watch for debounce being set to 0\n computedFilterDebounce: function computedFilterDebounce(newValue) {\n if (!newValue && this.$_filterTimer) {\n this.clearFilterTimer();\n this.localFilter = this.filterSanitize(this.filter);\n }\n },\n // Watch for changes to the filter criteria, and debounce if necessary\n filter: {\n // We need a deep watcher in case the user passes\n // an object when using `filter-function`\n deep: true,\n handler: function handler(newCriteria) {\n var _this = this;\n\n var timeout = this.computedFilterDebounce;\n this.clearFilterTimer();\n\n if (timeout && timeout > 0) {\n // If we have a debounce time, delay the update of `localFilter`\n this.$_filterTimer = setTimeout(function () {\n _this.localFilter = _this.filterSanitize(newCriteria);\n }, timeout);\n } else {\n // Otherwise, immediately update `localFilter` with `newFilter` value\n this.localFilter = this.filterSanitize(newCriteria);\n }\n }\n },\n // Watch for changes to the filter criteria and filtered items vs `localItems`\n // Set visual state and emit events as required\n filteredCheck: function filteredCheck(_ref) {\n var filteredItems = _ref.filteredItems,\n localFilter = _ref.localFilter;\n // Determine if the dataset is filtered or not\n var isFiltered = false;\n\n if (!localFilter) {\n // If filter criteria is falsey\n isFiltered = false;\n } else if (looseEqual(localFilter, []) || looseEqual(localFilter, {})) {\n // If filter criteria is an empty array or object\n isFiltered = false;\n } else if (localFilter) {\n // If filter criteria is truthy\n isFiltered = true;\n }\n\n if (isFiltered) {\n this.$emit(EVENT_NAME_FILTERED, filteredItems, filteredItems.length);\n }\n\n this.isFiltered = isFiltered;\n },\n isFiltered: function isFiltered(newValue, oldValue) {\n if (newValue === false && oldValue === true) {\n // We need to emit a filtered event if `isFiltered` transitions from `true` to\n // `false` so that users can update their pagination controls\n var localItems = this.localItems;\n this.$emit(EVENT_NAME_FILTERED, localItems, localItems.length);\n }\n }\n },\n created: function created() {\n var _this2 = this;\n\n // Create private non-reactive props\n this.$_filterTimer = null; // If filter is \"pre-set\", set the criteria\n // This will trigger any watchers/dependents\n // this.localFilter = this.filterSanitize(this.filter)\n // Set the initial filtered state in a `$nextTick()` so that\n // we trigger a filtered event if needed\n\n this.$nextTick(function () {\n _this2.isFiltered = Boolean(_this2.localFilter);\n });\n },\n beforeDestroy: function beforeDestroy() {\n this.clearFilterTimer();\n },\n methods: {\n clearFilterTimer: function clearFilterTimer() {\n clearTimeout(this.$_filterTimer);\n this.$_filterTimer = null;\n },\n filterSanitize: function filterSanitize(criteria) {\n // Sanitizes filter criteria based on internal or external filtering\n if (this.localFiltering && !this.localFilterFn && !(isString(criteria) || isRegExp(criteria))) {\n // If using internal filter function, which only accepts string or RegExp,\n // return '' to signify no filter\n return '';\n } // Could be a string, object or array, as needed by external filter function\n // We use `cloneDeep` to ensure we have a new copy of an object or array\n // without Vue's reactive observers\n\n\n return cloneDeep(criteria);\n },\n // Filter Function factories\n filterFnFactory: function filterFnFactory(filterFn, criteria) {\n // Wrapper factory for external filter functions\n // Wrap the provided filter-function and return a new function\n // Returns `null` if no filter-function defined or if criteria is falsey\n // Rather than directly grabbing `this.computedLocalFilterFn` or `this.filterFunction`\n // we have it passed, so that the caller computed prop will be reactive to changes\n // in the original filter-function (as this routine is a method)\n if (!filterFn || !isFunction(filterFn) || !criteria || looseEqual(criteria, []) || looseEqual(criteria, {})) {\n return null;\n } // Build the wrapped filter test function, passing the criteria to the provided function\n\n\n var fn = function fn(item) {\n // Generated function returns true if the criteria matches part\n // of the serialized data, otherwise false\n return filterFn(item, criteria);\n }; // Return the wrapped function\n\n\n return fn;\n },\n defaultFilterFnFactory: function defaultFilterFnFactory(criteria) {\n var _this3 = this;\n\n // Generates the default filter function, using the given filter criteria\n // Returns `null` if no criteria or criteria format not supported\n if (!criteria || !(isString(criteria) || isRegExp(criteria))) {\n // Built in filter can only support strings or RegExp criteria (at the moment)\n return null;\n } // Build the RegExp needed for filtering\n\n\n var regExp = criteria;\n\n if (isString(regExp)) {\n // Escape special RegExp characters in the string and convert contiguous\n // whitespace to \\s+ matches\n var pattern = escapeRegExp(criteria).replace(RX_SPACES, '\\\\s+'); // Build the RegExp (no need for global flag, as we only need\n // to find the value once in the string)\n\n regExp = new RegExp(\".*\".concat(pattern, \".*\"), 'i');\n } // Generate the wrapped filter test function to use\n\n\n var fn = function fn(item) {\n // This searches all row values (and sub property values) in the entire (excluding\n // special `_` prefixed keys), because we convert the record to a space-separated\n // string containing all the value properties (recursively), even ones that are\n // not visible (not specified in this.fields)\n // Users can ignore filtering on specific fields, or on only certain fields,\n // and can optionall specify searching results of fields with formatter\n //\n // TODO: Enable searching on scoped slots (optional, as it will be SLOW)\n //\n // Generated function returns true if the criteria matches part of\n // the serialized data, otherwise false\n //\n // We set `lastIndex = 0` on the `RegExp` in case someone specifies the `/g` global flag\n regExp.lastIndex = 0;\n return regExp.test(stringifyRecordValues(item, _this3.computedFilterIgnored, _this3.computedFilterIncluded, _this3.computedFieldsObj));\n }; // Return the generated function\n\n\n return fn;\n }\n }\n});","import { identity } from '../../../utils/identity';\nimport { isArray, isFunction, isObject, isString } from '../../../utils/inspect';\nimport { clone, keys } from '../../../utils/object';\nimport { startCase } from '../../../utils/string';\nimport { IGNORED_FIELD_KEYS } from './constants'; // Private function to massage field entry into common object format\n\nvar processField = function processField(key, value) {\n var field = null;\n\n if (isString(value)) {\n // Label shortcut\n field = {\n key: key,\n label: value\n };\n } else if (isFunction(value)) {\n // Formatter shortcut\n field = {\n key: key,\n formatter: value\n };\n } else if (isObject(value)) {\n field = clone(value);\n field.key = field.key || key;\n } else if (value !== false) {\n // Fallback to just key\n\n /* istanbul ignore next */\n field = {\n key: key\n };\n }\n\n return field;\n}; // We normalize fields into an array of objects\n// [ { key:..., label:..., ...}, {...}, ..., {..}]\n\n\nexport var normalizeFields = function normalizeFields(origFields, items) {\n var fields = [];\n\n if (isArray(origFields)) {\n // Normalize array Form\n origFields.filter(identity).forEach(function (f) {\n if (isString(f)) {\n fields.push({\n key: f,\n label: startCase(f)\n });\n } else if (isObject(f) && f.key && isString(f.key)) {\n // Full object definition. We use assign so that we don't mutate the original\n fields.push(clone(f));\n } else if (isObject(f) && keys(f).length === 1) {\n // Shortcut object (i.e. { 'foo_bar': 'This is Foo Bar' }\n var key = keys(f)[0];\n var field = processField(key, f[key]);\n\n if (field) {\n fields.push(field);\n }\n }\n });\n } // If no field provided, take a sample from first record (if exits)\n\n\n if (fields.length === 0 && isArray(items) && items.length > 0) {\n var sample = items[0];\n keys(sample).forEach(function (k) {\n if (!IGNORED_FIELD_KEYS[k]) {\n fields.push({\n key: k,\n label: startCase(k)\n });\n }\n });\n } // Ensure we have a unique array of fields and that they have String labels\n\n\n var memo = {};\n return fields.filter(function (f) {\n if (!memo[f.key]) {\n memo[f.key] = true;\n f.label = isString(f.label) ? f.label : startCase(f.key);\n return true;\n }\n\n return false;\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../../vue';\nimport { EVENT_NAME_CONTEXT_CHANGED } from '../../../constants/events';\nimport { PROP_TYPE_ARRAY, PROP_TYPE_STRING } from '../../../constants/props';\nimport { isArray, isFunction, isString } from '../../../utils/inspect';\nimport { looseEqual } from '../../../utils/loose-equal';\nimport { mathMax } from '../../../utils/math';\nimport { makeModelMixin } from '../../../utils/model';\nimport { toInteger } from '../../../utils/number';\nimport { clone, sortKeys } from '../../../utils/object';\nimport { makeProp } from '../../../utils/props';\nimport { normalizeFields } from './normalize-fields'; // --- Constants ---\n\nvar _makeModelMixin = makeModelMixin('value', {\n type: PROP_TYPE_ARRAY,\n defaultValue: []\n}),\n modelMixin = _makeModelMixin.mixin,\n modelProps = _makeModelMixin.props,\n MODEL_PROP_NAME = _makeModelMixin.prop,\n MODEL_EVENT_NAME = _makeModelMixin.event;\n\nexport { MODEL_PROP_NAME, MODEL_EVENT_NAME }; // --- Props ---\n\nexport var props = sortKeys(_objectSpread(_objectSpread({}, modelProps), {}, _defineProperty({\n fields: makeProp(PROP_TYPE_ARRAY, null),\n // Provider mixin adds in `Function` type\n items: makeProp(PROP_TYPE_ARRAY, []),\n // Primary key for record\n // If provided the value in each row must be unique!\n primaryKey: makeProp(PROP_TYPE_STRING)\n}, MODEL_PROP_NAME, makeProp(PROP_TYPE_ARRAY, [])))); // --- Mixin ---\n// @vue/component\n\nexport var itemsMixin = Vue.extend({\n mixins: [modelMixin],\n props: props,\n data: function data() {\n var items = this.items;\n return {\n // Our local copy of the items\n // Must be an array\n localItems: isArray(items) ? items.slice() : []\n };\n },\n computed: {\n computedFields: function computedFields() {\n // We normalize fields into an array of objects\n // `[ { key:..., label:..., ...}, {...}, ..., {..}]`\n return normalizeFields(this.fields, this.localItems);\n },\n computedFieldsObj: function computedFieldsObj() {\n // Fields as a simple lookup hash object\n // Mainly for formatter lookup and use in `scopedSlots` for convenience\n // If the field has a formatter, it normalizes formatter to a\n // function ref or `undefined` if no formatter\n var $parent = this.$parent;\n return this.computedFields.reduce(function (obj, f) {\n // We use object spread here so we don't mutate the original field object\n obj[f.key] = clone(f);\n\n if (f.formatter) {\n // Normalize formatter to a function ref or `undefined`\n var formatter = f.formatter;\n\n if (isString(formatter) && isFunction($parent[formatter])) {\n formatter = $parent[formatter];\n } else if (!isFunction(formatter)) {\n /* istanbul ignore next */\n formatter = undefined;\n } // Return formatter function or `undefined` if none\n\n\n obj[f.key].formatter = formatter;\n }\n\n return obj;\n }, {});\n },\n computedItems: function computedItems() {\n // Fallback if various mixins not provided\n return (this.paginatedItems || this.sortedItems || this.filteredItems || this.localItems ||\n /* istanbul ignore next */\n []).slice();\n },\n context: function context() {\n // Current state of sorting, filtering and pagination props/values\n return {\n filter: this.localFilter,\n sortBy: this.localSortBy,\n sortDesc: this.localSortDesc,\n perPage: mathMax(toInteger(this.perPage, 0), 0),\n currentPage: mathMax(toInteger(this.currentPage, 0), 1),\n apiUrl: this.apiUrl\n };\n }\n },\n watch: {\n items: function items(newValue) {\n // Set `localItems`/`filteredItems` to a copy of the provided array\n this.localItems = isArray(newValue) ? newValue.slice() : [];\n },\n // Watch for changes on `computedItems` and update the `v-model`\n computedItems: function computedItems(newValue, oldValue) {\n if (!looseEqual(newValue, oldValue)) {\n this.$emit(MODEL_EVENT_NAME, newValue);\n }\n },\n // Watch for context changes\n context: function context(newValue, oldValue) {\n // Emit context information for external paging/filtering/sorting handling\n if (!looseEqual(newValue, oldValue)) {\n this.$emit(EVENT_NAME_CONTEXT_CHANGED, newValue);\n }\n }\n },\n mounted: function mounted() {\n // Initially update the `v-model` of displayed items\n this.$emit(MODEL_EVENT_NAME, this.computedItems);\n },\n methods: {\n // Method to get the formatter method for a given field key\n getFieldFormatter: function getFieldFormatter(key) {\n var field = this.computedFieldsObj[key]; // `this.computedFieldsObj` has pre-normalized the formatter to a\n // function ref if present, otherwise `undefined`\n\n return field ? field.formatter : undefined;\n }\n }\n});","import { Vue } from '../../../vue';\nimport { PROP_TYPE_NUMBER_STRING } from '../../../constants/props';\nimport { mathMax } from '../../../utils/math';\nimport { toInteger } from '../../../utils/number';\nimport { makeProp } from '../../../utils/props'; // --- Props ---\n\nexport var props = {\n currentPage: makeProp(PROP_TYPE_NUMBER_STRING, 1),\n perPage: makeProp(PROP_TYPE_NUMBER_STRING, 0)\n}; // --- Mixin ---\n// @vue/component\n\nexport var paginationMixin = Vue.extend({\n props: props,\n computed: {\n localPaging: function localPaging() {\n return this.hasProvider ? !!this.noProviderPaging : true;\n },\n paginatedItems: function paginatedItems() {\n var items = this.sortedItems || this.filteredItems || this.localItems || [];\n var currentPage = mathMax(toInteger(this.currentPage, 1), 1);\n var perPage = mathMax(toInteger(this.perPage, 0), 0); // Apply local pagination\n\n if (this.localPaging && perPage) {\n // Grab the current page of data (which may be past filtered items limit)\n items = items.slice((currentPage - 1) * perPage, currentPage * perPage);\n } // Return the items to display in the table\n\n\n return items;\n }\n }\n});","import { Vue } from '../../../vue';\nimport { NAME_TABLE } from '../../../constants/components';\nimport { EVENT_NAME_REFRESH, EVENT_NAME_REFRESHED } from '../../../constants/events';\nimport { PROP_TYPE_ARRAY_FUNCTION, PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';\nimport { getRootActionEventName, getRootEventName } from '../../../utils/events';\nimport { isArray, isFunction, isPromise } from '../../../utils/inspect';\nimport { looseEqual } from '../../../utils/loose-equal';\nimport { clone } from '../../../utils/object';\nimport { makeProp } from '../../../utils/props';\nimport { warn } from '../../../utils/warn';\nimport { listenOnRootMixin } from '../../../mixins/listen-on-root'; // --- Constants ---\n\nvar ROOT_EVENT_NAME_REFRESHED = getRootEventName(NAME_TABLE, EVENT_NAME_REFRESHED);\nvar ROOT_ACTION_EVENT_NAME_REFRESH = getRootActionEventName(NAME_TABLE, EVENT_NAME_REFRESH); // --- Props ---\n\nexport var props = {\n // Passed to the context object\n // Not used by `` directly\n apiUrl: makeProp(PROP_TYPE_STRING),\n // Adds in 'Function' support\n items: makeProp(PROP_TYPE_ARRAY_FUNCTION, []),\n noProviderFiltering: makeProp(PROP_TYPE_BOOLEAN, false),\n noProviderPaging: makeProp(PROP_TYPE_BOOLEAN, false),\n noProviderSorting: makeProp(PROP_TYPE_BOOLEAN, false)\n}; // --- Mixin ---\n// @vue/component\n\nexport var providerMixin = Vue.extend({\n mixins: [listenOnRootMixin],\n props: props,\n computed: {\n hasProvider: function hasProvider() {\n return isFunction(this.items);\n },\n providerTriggerContext: function providerTriggerContext() {\n // Used to trigger the provider function via a watcher. Only the fields that\n // are needed for triggering a provider update are included. Note that the\n // regular this.context is sent to the provider during fetches though, as they\n // may need all the prop info.\n var ctx = {\n apiUrl: this.apiUrl,\n filter: null,\n sortBy: null,\n sortDesc: null,\n perPage: null,\n currentPage: null\n };\n\n if (!this.noProviderFiltering) {\n // Either a string, or could be an object or array.\n ctx.filter = this.localFilter;\n }\n\n if (!this.noProviderSorting) {\n ctx.sortBy = this.localSortBy;\n ctx.sortDesc = this.localSortDesc;\n }\n\n if (!this.noProviderPaging) {\n ctx.perPage = this.perPage;\n ctx.currentPage = this.currentPage;\n }\n\n return clone(ctx);\n }\n },\n watch: {\n // Provider update triggering\n items: function items(newValue) {\n // If a new provider has been specified, trigger an update\n if (this.hasProvider || isFunction(newValue)) {\n this.$nextTick(this._providerUpdate);\n }\n },\n providerTriggerContext: function providerTriggerContext(newValue, oldValue) {\n // Trigger the provider to update as the relevant context values have changed.\n if (!looseEqual(newValue, oldValue)) {\n this.$nextTick(this._providerUpdate);\n }\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n // Call the items provider if necessary\n if (this.hasProvider && (!this.localItems || this.localItems.length === 0)) {\n // Fetch on mount if localItems is empty\n this._providerUpdate();\n } // Listen for global messages to tell us to force refresh the table\n\n\n this.listenOnRoot(ROOT_ACTION_EVENT_NAME_REFRESH, function (id) {\n if (id === _this.id || id === _this) {\n _this.refresh();\n }\n });\n },\n methods: {\n refresh: function refresh() {\n var items = this.items,\n refresh = this.refresh; // Public Method: Force a refresh of the provider function\n\n this.$off(EVENT_NAME_REFRESHED, refresh);\n\n if (this.computedBusy) {\n // Can't force an update when forced busy by user (busy prop === true)\n if (this.localBusy && this.hasProvider) {\n // But if provider running (localBusy), re-schedule refresh once `refreshed` emitted\n this.$on(EVENT_NAME_REFRESHED, refresh);\n }\n } else {\n this.clearSelected();\n\n if (this.hasProvider) {\n this.$nextTick(this._providerUpdate);\n } else {\n /* istanbul ignore next */\n this.localItems = isArray(items) ? items.slice() : [];\n }\n }\n },\n // Provider related methods\n _providerSetLocal: function _providerSetLocal(items) {\n this.localItems = isArray(items) ? items.slice() : [];\n this.localBusy = false;\n this.$emit(EVENT_NAME_REFRESHED); // New root emit\n\n if (this.id) {\n this.emitOnRoot(ROOT_EVENT_NAME_REFRESHED, this.id);\n }\n },\n _providerUpdate: function _providerUpdate() {\n var _this2 = this;\n\n // Refresh the provider function items.\n if (!this.hasProvider) {\n // Do nothing if no provider\n return;\n } // If table is busy, wait until refreshed before calling again\n\n\n if (this.computedBusy) {\n // Schedule a new refresh once `refreshed` is emitted\n this.$nextTick(this.refresh);\n return;\n } // Set internal busy state\n\n\n this.localBusy = true; // Call provider function with context and optional callback after DOM is fully updated\n\n this.$nextTick(function () {\n try {\n // Call provider function passing it the context and optional callback\n var data = _this2.items(_this2.context, _this2._providerSetLocal);\n\n if (isPromise(data)) {\n // Provider returned Promise\n data.then(function (items) {\n // Provider resolved with items\n _this2._providerSetLocal(items);\n });\n } else if (isArray(data)) {\n // Provider returned Array data\n _this2._providerSetLocal(data);\n } else {\n /* istanbul ignore if */\n if (_this2.items.length !== 2) {\n // Check number of arguments provider function requested\n // Provider not using callback (didn't request second argument), so we clear\n // busy state as most likely there was an error in the provider function\n\n /* istanbul ignore next */\n warn(\"Provider function didn't request callback and did not return a promise or data.\", NAME_TABLE);\n _this2.localBusy = false;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n // Provider function borked on us, so we spew out a warning\n // and clear the busy state\n warn(\"Provider function error [\".concat(e.name, \"] \").concat(e.message, \".\"), NAME_TABLE);\n _this2.localBusy = false;\n\n _this2.$off(EVENT_NAME_REFRESHED, _this2.refresh);\n }\n });\n }\n }\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 '../../../vue';\nimport { EVENT_NAME_CONTEXT_CHANGED, EVENT_NAME_FILTERED, EVENT_NAME_ROW_CLICKED, EVENT_NAME_ROW_SELECTED } from '../../../constants/events';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';\nimport { arrayIncludes, createArray } from '../../../utils/array';\nimport { identity } from '../../../utils/identity';\nimport { isArray, isNumber } from '../../../utils/inspect';\nimport { looseEqual } from '../../../utils/loose-equal';\nimport { mathMax, mathMin } from '../../../utils/math';\nimport { makeProp } from '../../../utils/props';\nimport { sanitizeRow } from './sanitize-row'; // --- Constants ---\n\nvar SELECT_MODES = ['range', 'multi', 'single']; // --- Props ---\n\nexport var props = {\n // Disable use of click handlers for row selection\n noSelectOnClick: makeProp(PROP_TYPE_BOOLEAN, false),\n selectMode: makeProp(PROP_TYPE_STRING, 'multi', function (value) {\n return arrayIncludes(SELECT_MODES, value);\n }),\n selectable: makeProp(PROP_TYPE_BOOLEAN, false),\n selectedVariant: makeProp(PROP_TYPE_STRING, 'active')\n}; // --- Mixin ---\n// @vue/component\n\nexport var selectableMixin = Vue.extend({\n props: props,\n data: function data() {\n return {\n selectedRows: [],\n selectedLastRow: -1\n };\n },\n computed: {\n isSelectable: function isSelectable() {\n return this.selectable && this.selectMode;\n },\n hasSelectableRowClick: function hasSelectableRowClick() {\n return this.isSelectable && !this.noSelectOnClick;\n },\n supportsSelectableRows: function supportsSelectableRows() {\n return true;\n },\n selectableHasSelection: function selectableHasSelection() {\n var selectedRows = this.selectedRows;\n return this.isSelectable && selectedRows && selectedRows.length > 0 && selectedRows.some(identity);\n },\n selectableIsMultiSelect: function selectableIsMultiSelect() {\n return this.isSelectable && arrayIncludes(['range', 'multi'], this.selectMode);\n },\n selectableTableClasses: function selectableTableClasses() {\n var _ref;\n\n var isSelectable = this.isSelectable;\n return _ref = {\n 'b-table-selectable': isSelectable\n }, _defineProperty(_ref, \"b-table-select-\".concat(this.selectMode), isSelectable), _defineProperty(_ref, 'b-table-selecting', this.selectableHasSelection), _defineProperty(_ref, 'b-table-selectable-no-click', isSelectable && !this.hasSelectableRowClick), _ref;\n },\n selectableTableAttrs: function selectableTableAttrs() {\n return {\n // TODO:\n // Should this attribute not be included when no-select-on-click is set\n // since this attribute implies keyboard navigation?\n 'aria-multiselectable': !this.isSelectable ? null : this.selectableIsMultiSelect ? 'true' : 'false'\n };\n }\n },\n watch: {\n computedItems: function computedItems(newValue, oldValue) {\n // Reset for selectable\n var equal = false;\n\n if (this.isSelectable && this.selectedRows.length > 0) {\n // Quick check against array length\n equal = isArray(newValue) && isArray(oldValue) && newValue.length === oldValue.length;\n\n for (var i = 0; equal && i < newValue.length; i++) {\n // Look for the first non-loosely equal row, after ignoring reserved fields\n equal = looseEqual(sanitizeRow(newValue[i]), sanitizeRow(oldValue[i]));\n }\n }\n\n if (!equal) {\n this.clearSelected();\n }\n },\n selectable: function selectable(newValue) {\n this.clearSelected();\n this.setSelectionHandlers(newValue);\n },\n selectMode: function selectMode() {\n this.clearSelected();\n },\n hasSelectableRowClick: function hasSelectableRowClick(newValue) {\n this.clearSelected();\n this.setSelectionHandlers(!newValue);\n },\n selectedRows: function selectedRows(_selectedRows, oldValue) {\n var _this = this;\n\n if (this.isSelectable && !looseEqual(_selectedRows, oldValue)) {\n var items = []; // `.forEach()` skips over non-existent indices (on sparse arrays)\n\n _selectedRows.forEach(function (v, idx) {\n if (v) {\n items.push(_this.computedItems[idx]);\n }\n });\n\n this.$emit(EVENT_NAME_ROW_SELECTED, items);\n }\n }\n },\n beforeMount: function beforeMount() {\n // Set up handlers if needed\n if (this.isSelectable) {\n this.setSelectionHandlers(true);\n }\n },\n methods: {\n // Public methods\n selectRow: function selectRow(index) {\n // Select a particular row (indexed based on computedItems)\n if (this.isSelectable && isNumber(index) && index >= 0 && index < this.computedItems.length && !this.isRowSelected(index)) {\n var selectedRows = this.selectableIsMultiSelect ? this.selectedRows.slice() : [];\n selectedRows[index] = true;\n this.selectedLastClicked = -1;\n this.selectedRows = selectedRows;\n }\n },\n unselectRow: function unselectRow(index) {\n // Un-select a particular row (indexed based on `computedItems`)\n if (this.isSelectable && isNumber(index) && this.isRowSelected(index)) {\n var selectedRows = this.selectedRows.slice();\n selectedRows[index] = false;\n this.selectedLastClicked = -1;\n this.selectedRows = selectedRows;\n }\n },\n selectAllRows: function selectAllRows() {\n var length = this.computedItems.length;\n\n if (this.isSelectable && length > 0) {\n this.selectedLastClicked = -1;\n this.selectedRows = this.selectableIsMultiSelect ? createArray(length, true) : [true];\n }\n },\n isRowSelected: function isRowSelected(index) {\n // Determine if a row is selected (indexed based on `computedItems`)\n return !!(isNumber(index) && this.selectedRows[index]);\n },\n clearSelected: function clearSelected() {\n // Clear any active selected row(s)\n this.selectedLastClicked = -1;\n this.selectedRows = [];\n },\n // Internal private methods\n selectableRowClasses: function selectableRowClasses(index) {\n if (this.isSelectable && this.isRowSelected(index)) {\n var variant = this.selectedVariant;\n return _defineProperty({\n 'b-table-row-selected': true\n }, \"\".concat(this.dark ? 'bg' : 'table', \"-\").concat(variant), variant);\n }\n\n return {};\n },\n selectableRowAttrs: function selectableRowAttrs(index) {\n return {\n 'aria-selected': !this.isSelectable ? null : this.isRowSelected(index) ? 'true' : 'false'\n };\n },\n setSelectionHandlers: function setSelectionHandlers(on) {\n var method = on && !this.noSelectOnClick ? '$on' : '$off'; // Handle row-clicked event\n\n this[method](EVENT_NAME_ROW_CLICKED, this.selectionHandler); // Clear selection on filter, pagination, and sort changes\n\n this[method](EVENT_NAME_FILTERED, this.clearSelected);\n this[method](EVENT_NAME_CONTEXT_CHANGED, this.clearSelected);\n },\n selectionHandler: function selectionHandler(item, index, event) {\n /* istanbul ignore if: should never happen */\n if (!this.isSelectable || this.noSelectOnClick) {\n // Don't do anything if table is not in selectable mode\n this.clearSelected();\n return;\n }\n\n var selectMode = this.selectMode,\n selectedLastRow = this.selectedLastRow;\n var selectedRows = this.selectedRows.slice();\n var selected = !selectedRows[index]; // Note 'multi' mode needs no special event handling\n\n if (selectMode === 'single') {\n selectedRows = [];\n } else if (selectMode === 'range') {\n if (selectedLastRow > -1 && event.shiftKey) {\n // range\n for (var idx = mathMin(selectedLastRow, index); idx <= mathMax(selectedLastRow, index); idx++) {\n selectedRows[idx] = true;\n }\n\n selected = true;\n } else {\n if (!(event.ctrlKey || event.metaKey)) {\n // Clear range selection if any\n selectedRows = [];\n selected = true;\n }\n\n this.selectedLastRow = selected ? index : -1;\n }\n }\n\n selectedRows[index] = selected;\n this.selectedRows = selectedRows;\n }\n }\n});","var _props, _watch;\n\nfunction 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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../../vue';\nimport { EVENT_NAME_HEAD_CLICKED, EVENT_NAME_SORT_CHANGED, MODEL_EVENT_NAME_PREFIX } from '../../../constants/events';\nimport { PROP_TYPE_ARRAY_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_FUNCTION, PROP_TYPE_OBJECT, PROP_TYPE_STRING } from '../../../constants/props';\nimport { arrayIncludes } from '../../../utils/array';\nimport { isFunction, isUndefinedOrNull } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { stableSort } from '../../../utils/stable-sort';\nimport { trim } from '../../../utils/string';\nimport { defaultSortCompare } from './default-sort-compare'; // --- Constants ---\n\nvar MODEL_PROP_NAME_SORT_BY = 'sortBy';\nvar MODEL_EVENT_NAME_SORT_BY = MODEL_EVENT_NAME_PREFIX + MODEL_PROP_NAME_SORT_BY;\nvar MODEL_PROP_NAME_SORT_DESC = 'sortDesc';\nvar MODEL_EVENT_NAME_SORT_DESC = MODEL_EVENT_NAME_PREFIX + MODEL_PROP_NAME_SORT_DESC;\nvar SORT_DIRECTION_ASC = 'asc';\nvar SORT_DIRECTION_DESC = 'desc';\nvar SORT_DIRECTION_LAST = 'last';\nvar SORT_DIRECTIONS = [SORT_DIRECTION_ASC, SORT_DIRECTION_DESC, SORT_DIRECTION_LAST]; // --- Props ---\n\nexport var props = (_props = {\n labelSortAsc: makeProp(PROP_TYPE_STRING, 'Click to sort Ascending'),\n labelSortClear: makeProp(PROP_TYPE_STRING, 'Click to clear sorting'),\n labelSortDesc: makeProp(PROP_TYPE_STRING, 'Click to sort Descending'),\n noFooterSorting: makeProp(PROP_TYPE_BOOLEAN, false),\n noLocalSorting: makeProp(PROP_TYPE_BOOLEAN, false),\n // Another prop that should have had a better name\n // It should be `noSortClear` (on non-sortable headers)\n // We will need to make sure the documentation is clear on what\n // this prop does (as well as in the code for future reference)\n noSortReset: makeProp(PROP_TYPE_BOOLEAN, false)\n}, _defineProperty(_props, MODEL_PROP_NAME_SORT_BY, makeProp(PROP_TYPE_STRING)), _defineProperty(_props, \"sortCompare\", makeProp(PROP_TYPE_FUNCTION)), _defineProperty(_props, \"sortCompareLocale\", makeProp(PROP_TYPE_ARRAY_STRING)), _defineProperty(_props, \"sortCompareOptions\", makeProp(PROP_TYPE_OBJECT, {\n numeric: true\n})), _defineProperty(_props, MODEL_PROP_NAME_SORT_DESC, makeProp(PROP_TYPE_BOOLEAN, false)), _defineProperty(_props, \"sortDirection\", makeProp(PROP_TYPE_STRING, SORT_DIRECTION_ASC, function (value) {\n return arrayIncludes(SORT_DIRECTIONS, value);\n})), _defineProperty(_props, \"sortIconLeft\", makeProp(PROP_TYPE_BOOLEAN, false)), _defineProperty(_props, \"sortNullLast\", makeProp(PROP_TYPE_BOOLEAN, false)), _props); // --- Mixin ---\n// @vue/component\n\nexport var sortingMixin = Vue.extend({\n props: props,\n data: function data() {\n return {\n localSortBy: this[MODEL_PROP_NAME_SORT_BY] || '',\n localSortDesc: this[MODEL_PROP_NAME_SORT_DESC] || false\n };\n },\n computed: {\n localSorting: function localSorting() {\n return this.hasProvider ? !!this.noProviderSorting : !this.noLocalSorting;\n },\n isSortable: function isSortable() {\n return this.computedFields.some(function (f) {\n return f.sortable;\n });\n },\n // Sorts the filtered items and returns a new array of the sorted items\n // When not sorted, the original items array will be returned\n sortedItems: function sortedItems() {\n var sortBy = this.localSortBy,\n sortDesc = this.localSortDesc,\n locale = this.sortCompareLocale,\n nullLast = this.sortNullLast,\n sortCompare = this.sortCompare,\n localSorting = this.localSorting;\n var items = (this.filteredItems || this.localItems || []).slice();\n\n var localeOptions = _objectSpread(_objectSpread({}, this.sortCompareOptions), {}, {\n usage: 'sort'\n });\n\n if (sortBy && localSorting) {\n var field = this.computedFieldsObj[sortBy] || {};\n var sortByFormatted = field.sortByFormatted;\n var formatter = isFunction(sortByFormatted) ?\n /* istanbul ignore next */\n sortByFormatted : sortByFormatted ? this.getFieldFormatter(sortBy) : undefined; // `stableSort` returns a new array, and leaves the original array intact\n\n return stableSort(items, function (a, b) {\n var result = null; // Call user provided `sortCompare` routine first\n\n if (isFunction(sortCompare)) {\n // TODO:\n // Change the `sortCompare` signature to the one of `defaultSortCompare`\n // with the next major version bump\n result = sortCompare(a, b, sortBy, sortDesc, formatter, localeOptions, locale);\n } // Fallback to built-in `defaultSortCompare` if `sortCompare`\n // is not defined or returns `null`/`false`\n\n\n if (isUndefinedOrNull(result) || result === false) {\n result = defaultSortCompare(a, b, {\n sortBy: sortBy,\n formatter: formatter,\n locale: locale,\n localeOptions: localeOptions,\n nullLast: nullLast\n });\n } // Negate result if sorting in descending order\n\n\n return (result || 0) * (sortDesc ? -1 : 1);\n });\n }\n\n return items;\n }\n },\n watch: (_watch = {\n /* istanbul ignore next: pain in the butt to test */\n isSortable: function isSortable(newValue) {\n if (newValue) {\n if (this.isSortable) {\n this.$on(EVENT_NAME_HEAD_CLICKED, this.handleSort);\n }\n } else {\n this.$off(EVENT_NAME_HEAD_CLICKED, this.handleSort);\n }\n }\n }, _defineProperty(_watch, MODEL_PROP_NAME_SORT_DESC, function (newValue) {\n /* istanbul ignore next */\n if (newValue === this.localSortDesc) {\n return;\n }\n\n this.localSortDesc = newValue || false;\n }), _defineProperty(_watch, MODEL_PROP_NAME_SORT_BY, function (newValue) {\n /* istanbul ignore next */\n if (newValue === this.localSortBy) {\n return;\n }\n\n this.localSortBy = newValue || '';\n }), _defineProperty(_watch, \"localSortDesc\", function localSortDesc(newValue, oldValue) {\n // Emit update to sort-desc.sync\n if (newValue !== oldValue) {\n this.$emit(MODEL_EVENT_NAME_SORT_DESC, newValue);\n }\n }), _defineProperty(_watch, \"localSortBy\", function localSortBy(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.$emit(MODEL_EVENT_NAME_SORT_BY, newValue);\n }\n }), _watch),\n created: function created() {\n if (this.isSortable) {\n this.$on(EVENT_NAME_HEAD_CLICKED, this.handleSort);\n }\n },\n methods: {\n // Handlers\n // Need to move from thead-mixin\n handleSort: function handleSort(key, field, event, isFoot) {\n var _this = this;\n\n if (!this.isSortable) {\n /* istanbul ignore next */\n return;\n }\n\n if (isFoot && this.noFooterSorting) {\n return;\n } // TODO: make this tri-state sorting\n // cycle desc => asc => none => desc => ...\n\n\n var sortChanged = false;\n\n var toggleLocalSortDesc = function toggleLocalSortDesc() {\n var sortDirection = field.sortDirection || _this.sortDirection;\n\n if (sortDirection === SORT_DIRECTION_ASC) {\n _this.localSortDesc = false;\n } else if (sortDirection === SORT_DIRECTION_DESC) {\n _this.localSortDesc = true;\n } else {// sortDirection === 'last'\n // Leave at last sort direction from previous column\n }\n };\n\n if (field.sortable) {\n var sortKey = !this.localSorting && field.sortKey ? field.sortKey : key;\n\n if (this.localSortBy === sortKey) {\n // Change sorting direction on current column\n this.localSortDesc = !this.localSortDesc;\n } else {\n // Start sorting this column ascending\n this.localSortBy = sortKey; // this.localSortDesc = false\n\n toggleLocalSortDesc();\n }\n\n sortChanged = true;\n } else if (this.localSortBy && !this.noSortReset) {\n this.localSortBy = '';\n toggleLocalSortDesc();\n sortChanged = true;\n }\n\n if (sortChanged) {\n // Sorting parameters changed\n this.$emit(EVENT_NAME_SORT_CHANGED, this.context);\n }\n },\n // methods to compute classes and attrs for thead>th cells\n sortTheadThClasses: function sortTheadThClasses(key, field, isFoot) {\n return {\n // If sortable and sortIconLeft are true, then place sort icon on the left\n 'b-table-sort-icon-left': field.sortable && this.sortIconLeft && !(isFoot && this.noFooterSorting)\n };\n },\n sortTheadThAttrs: function sortTheadThAttrs(key, field, isFoot) {\n if (!this.isSortable || isFoot && this.noFooterSorting) {\n // No attributes if not a sortable table\n return {};\n }\n\n var sortable = field.sortable; // Assemble the aria-sort attribute value\n\n var ariaSort = sortable && this.localSortBy === key ? this.localSortDesc ? 'descending' : 'ascending' : sortable ? 'none' : null; // Return the attribute\n\n return {\n 'aria-sort': ariaSort\n };\n },\n sortTheadThLabel: function sortTheadThLabel(key, field, isFoot) {\n // A label to be placed in an `.sr-only` element in the header cell\n if (!this.isSortable || isFoot && this.noFooterSorting) {\n // No label if not a sortable table\n return null;\n }\n\n var sortable = field.sortable; // The correctness of these labels is very important for screen-reader users.\n\n var labelSorting = '';\n\n if (sortable) {\n if (this.localSortBy === key) {\n // currently sorted sortable column.\n labelSorting = this.localSortDesc ? this.labelSortAsc : this.labelSortDesc;\n } else {\n // Not currently sorted sortable column.\n // Not using nested ternary's here for clarity/readability\n // Default for ariaLabel\n labelSorting = this.localSortDesc ? this.labelSortDesc : this.labelSortAsc; // Handle sortDirection setting\n\n var sortDirection = this.sortDirection || field.sortDirection;\n\n if (sortDirection === SORT_DIRECTION_ASC) {\n labelSorting = this.labelSortAsc;\n } else if (sortDirection === SORT_DIRECTION_DESC) {\n labelSorting = this.labelSortDesc;\n }\n }\n } else if (!this.noSortReset) {\n // Non sortable column\n labelSorting = this.localSortBy ? this.labelSortClear : '';\n } // Return the sr-only sort label or null if no label\n\n\n return trim(labelSorting) || null;\n }\n }\n});","import { get } from '../../../utils/get';\nimport { isDate, isFunction, isNumber, isNumeric, isUndefinedOrNull } from '../../../utils/inspect';\nimport { toFloat } from '../../../utils/number';\nimport { stringifyObjectValues } from '../../../utils/stringify-object-values';\n\nvar normalizeValue = function normalizeValue(value) {\n if (isUndefinedOrNull(value)) {\n return '';\n }\n\n if (isNumeric(value)) {\n return toFloat(value, value);\n }\n\n return value;\n}; // Default sort compare routine\n//\n// TODO:\n// Add option to sort by multiple columns (tri-state per column,\n// plus order of columns in sort) where `sortBy` could be an array\n// of objects `[ {key: 'foo', sortDir: 'asc'}, {key:'bar', sortDir: 'desc'} ...]`\n// or an array of arrays `[ ['foo','asc'], ['bar','desc'] ]`\n// Multisort will most likely be handled in `mixin-sort.js` by\n// calling this method for each sortBy\n\n\nexport var defaultSortCompare = function defaultSortCompare(a, b) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref$sortBy = _ref.sortBy,\n sortBy = _ref$sortBy === void 0 ? null : _ref$sortBy,\n _ref$formatter = _ref.formatter,\n formatter = _ref$formatter === void 0 ? null : _ref$formatter,\n _ref$locale = _ref.locale,\n locale = _ref$locale === void 0 ? undefined : _ref$locale,\n _ref$localeOptions = _ref.localeOptions,\n localeOptions = _ref$localeOptions === void 0 ? {} : _ref$localeOptions,\n _ref$nullLast = _ref.nullLast,\n nullLast = _ref$nullLast === void 0 ? false : _ref$nullLast;\n\n // Get the value by `sortBy`\n var aa = get(a, sortBy, null);\n var bb = get(b, sortBy, null); // Apply user-provided formatter\n\n if (isFunction(formatter)) {\n aa = formatter(aa, sortBy, a);\n bb = formatter(bb, sortBy, b);\n } // Internally normalize value\n // `null` / `undefined` => ''\n // `'0'` => `0`\n\n\n aa = normalizeValue(aa);\n bb = normalizeValue(bb);\n\n if (isDate(aa) && isDate(bb) || isNumber(aa) && isNumber(bb)) {\n // Special case for comparing dates and numbers\n // Internally dates are compared via their epoch number values\n return aa < bb ? -1 : aa > bb ? 1 : 0;\n } else if (nullLast && aa === '' && bb !== '') {\n // Special case when sorting `null` / `undefined` / '' last\n return 1;\n } else if (nullLast && aa !== '' && bb === '') {\n // Special case when sorting `null` / `undefined` / '' last\n return -1;\n } // Do localized string comparison\n\n\n return stringifyObjectValues(aa).localeCompare(stringifyObjectValues(bb), locale, localeOptions);\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 '../../../vue';\nimport { PROP_TYPE_BOOLEAN_STRING } from '../../../constants/props';\nimport { makeProp } from '../../../utils/props'; // --- Props ---\n\nexport var props = {\n stacked: makeProp(PROP_TYPE_BOOLEAN_STRING, false)\n}; // --- Mixin ---\n// @vue/component\n\nexport var stackedMixin = Vue.extend({\n props: props,\n computed: {\n isStacked: function isStacked() {\n var stacked = this.stacked; // `true` when always stacked, or returns breakpoint specified\n\n return stacked === '' ? true : stacked;\n },\n isStackedAlways: function isStackedAlways() {\n return this.isStacked === true;\n },\n stackedTableClasses: function stackedTableClasses() {\n var isStackedAlways = this.isStackedAlways;\n return _defineProperty({\n 'b-table-stacked': isStackedAlways\n }, \"b-table-stacked-\".concat(this.stacked), !isStackedAlways && this.isStacked);\n }\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../../vue';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_BOOLEAN_STRING, PROP_TYPE_STRING } from '../../../constants/props';\nimport { identity } from '../../../utils/identity';\nimport { isBoolean } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { toString } from '../../../utils/string';\nimport { attrsMixin } from '../../../mixins/attrs'; // Main `
` render mixin\n// Includes all main table styling options\n// --- Props ---\n\nexport var props = {\n bordered: makeProp(PROP_TYPE_BOOLEAN, false),\n borderless: makeProp(PROP_TYPE_BOOLEAN, false),\n captionTop: makeProp(PROP_TYPE_BOOLEAN, false),\n dark: makeProp(PROP_TYPE_BOOLEAN, false),\n fixed: makeProp(PROP_TYPE_BOOLEAN, false),\n hover: makeProp(PROP_TYPE_BOOLEAN, false),\n noBorderCollapse: makeProp(PROP_TYPE_BOOLEAN, false),\n outlined: makeProp(PROP_TYPE_BOOLEAN, false),\n responsive: makeProp(PROP_TYPE_BOOLEAN_STRING, false),\n small: makeProp(PROP_TYPE_BOOLEAN, false),\n // If a string, it is assumed to be the table `max-height` value\n stickyHeader: makeProp(PROP_TYPE_BOOLEAN_STRING, false),\n striped: makeProp(PROP_TYPE_BOOLEAN, false),\n tableClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n tableVariant: makeProp(PROP_TYPE_STRING)\n}; // --- Mixin ---\n// @vue/component\n\nexport var tableRendererMixin = Vue.extend({\n mixins: [attrsMixin],\n provide: function provide() {\n return {\n bvTable: this\n };\n },\n // Don't place attributes on root element automatically,\n // as table could be wrapped in responsive `
`\n inheritAttrs: false,\n props: props,\n computed: {\n // Layout related computed props\n isResponsive: function isResponsive() {\n var responsive = this.responsive;\n responsive = responsive === '' ? true : responsive;\n return this.isStacked ? false : responsive;\n },\n isStickyHeader: function isStickyHeader() {\n var stickyHeader = this.stickyHeader;\n stickyHeader = stickyHeader === '' ? true : stickyHeader;\n return this.isStacked ? false : stickyHeader;\n },\n wrapperClasses: function wrapperClasses() {\n var isResponsive = this.isResponsive;\n return [this.isStickyHeader ? 'b-table-sticky-header' : '', isResponsive === true ? 'table-responsive' : isResponsive ? \"table-responsive-\".concat(this.responsive) : ''].filter(identity);\n },\n wrapperStyles: function wrapperStyles() {\n var isStickyHeader = this.isStickyHeader;\n return isStickyHeader && !isBoolean(isStickyHeader) ? {\n maxHeight: isStickyHeader\n } : {};\n },\n tableClasses: function tableClasses() {\n var hover = this.hover,\n tableVariant = this.tableVariant;\n hover = this.isTableSimple ? hover : hover && this.computedItems.length > 0 && !this.computedBusy;\n return [// User supplied classes\n this.tableClass, // Styling classes\n {\n 'table-striped': this.striped,\n 'table-hover': hover,\n 'table-dark': this.dark,\n 'table-bordered': this.bordered,\n 'table-borderless': this.borderless,\n 'table-sm': this.small,\n // The following are b-table custom styles\n border: this.outlined,\n 'b-table-fixed': this.fixed,\n 'b-table-caption-top': this.captionTop,\n 'b-table-no-border-collapse': this.noBorderCollapse\n }, tableVariant ? \"\".concat(this.dark ? 'bg' : 'table', \"-\").concat(tableVariant) : '', // Stacked table classes\n this.stackedTableClasses, // Selectable classes\n this.selectableTableClasses];\n },\n tableAttrs: function tableAttrs() {\n var items = this.computedItems,\n filteredItems = this.filteredItems,\n fields = this.computedFields,\n selectableTableAttrs = this.selectableTableAttrs; // Preserve user supplied aria-describedby, if provided in `$attrs`\n\n var adb = [(this.bvAttrs || {})['aria-describedby'], this.captionId].filter(identity).join(' ') || null;\n var ariaAttrs = this.isTableSimple ? {} : {\n 'aria-busy': this.computedBusy ? 'true' : 'false',\n 'aria-colcount': toString(fields.length),\n 'aria-describedby': adb\n };\n var rowCount = items && filteredItems && filteredItems.length > items.length ? toString(filteredItems.length) : null;\n return _objectSpread(_objectSpread(_objectSpread({\n // We set `aria-rowcount` before merging in `$attrs`,\n // in case user has supplied their own\n 'aria-rowcount': rowCount\n }, this.bvAttrs), {}, {\n // Now we can override any `$attrs` here\n id: this.safeId(),\n role: 'table'\n }, ariaAttrs), selectableTableAttrs);\n }\n },\n render: function render(h) {\n var wrapperClasses = this.wrapperClasses,\n renderCaption = this.renderCaption,\n renderColgroup = this.renderColgroup,\n renderThead = this.renderThead,\n renderTbody = this.renderTbody,\n renderTfoot = this.renderTfoot;\n var $content = [];\n\n if (this.isTableSimple) {\n $content.push(this.normalizeSlot());\n } else {\n // Build the `
`\n\n\n var $table = h('table', {\n staticClass: 'table b-table',\n class: this.tableClasses,\n attrs: this.tableAttrs,\n key: 'b-table'\n }, $content.filter(identity)); // Add responsive/sticky wrapper if needed and return table\n\n return wrapperClasses.length > 0 ? h('div', {\n class: wrapperClasses,\n style: this.wrapperStyles,\n key: 'wrap'\n }, [$table]) : $table;\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../vue';\nimport { NAME_TBODY } from '../../constants/components';\nimport { PROP_TYPE_OBJECT } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n tbodyTransitionHandlers: makeProp(PROP_TYPE_OBJECT),\n tbodyTransitionProps: makeProp(PROP_TYPE_OBJECT)\n}, NAME_TBODY); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTbody = /*#__PURE__*/Vue.extend({\n name: NAME_TBODY,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableRowGroup: this\n };\n },\n inject: {\n // Sniffed by `` / `` / ``\n bvTable: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / `` / ``\n isTbody: function isTbody() {\n return true;\n },\n // Sniffed by `` / `` / ``\n isDark: function isDark() {\n return this.bvTable.dark;\n },\n // Sniffed by `` / `` / ``\n isStacked: function isStacked() {\n return this.bvTable.isStacked;\n },\n // Sniffed by `` / `` / ``\n isResponsive: function isResponsive() {\n return this.bvTable.isResponsive;\n },\n // Sniffed by `` / `` / ``\n // Sticky headers are only supported in thead\n isStickyHeader: function isStickyHeader() {\n return false;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n tableVariant: function tableVariant() {\n return this.bvTable.tableVariant;\n },\n isTransitionGroup: function isTransitionGroup() {\n return this.tbodyTransitionProps || this.tbodyTransitionHandlers;\n },\n tbodyAttrs: function tbodyAttrs() {\n return _objectSpread({\n role: 'rowgroup'\n }, this.bvAttrs);\n },\n tbodyProps: function tbodyProps() {\n var tbodyTransitionProps = this.tbodyTransitionProps;\n return tbodyTransitionProps ? _objectSpread(_objectSpread({}, tbodyTransitionProps), {}, {\n tag: 'tbody'\n }) : {};\n }\n },\n render: function render(h) {\n var data = {\n props: this.tbodyProps,\n attrs: this.tbodyAttrs\n };\n\n if (this.isTransitionGroup) {\n // We use native listeners if a transition group for any delegated events\n data.on = this.tbodyTransitionHandlers || {};\n data.nativeOn = this.bvListeners;\n } else {\n // Otherwise we place any listeners on the tbody element\n data.on = this.bvListeners;\n }\n\n return h(this.isTransitionGroup ? 'transition-group' : 'tbody', data, this.normalizeSlot());\n }\n});","import { closest, getAttr, getById, matches, select } from '../../../utils/dom';\nimport { EVENT_FILTER } from './constants';\nvar TABLE_TAG_NAMES = ['TD', 'TH', 'TR']; // Returns `true` if we should ignore the click/double-click/keypress event\n// Avoids having the user need to use `@click.stop` on the form control\n\nexport var filterEvent = function filterEvent(event) {\n // Exit early when we don't have a target element\n if (!event || !event.target) {\n /* istanbul ignore next */\n return false;\n }\n\n var el = event.target; // Exit early when element is disabled or a table element\n\n if (el.disabled || TABLE_TAG_NAMES.indexOf(el.tagName) !== -1) {\n return false;\n } // Ignore the click when it was inside a dropdown menu\n\n\n if (closest('.dropdown-menu', el)) {\n return true;\n }\n\n var label = el.tagName === 'LABEL' ? el : closest('label', el); // If the label's form control is not disabled then we don't propagate event\n // Modern browsers have `label.control` that references the associated input, but IE 11\n // does not have this property on the label element, so we resort to DOM lookups\n\n if (label) {\n var labelFor = getAttr(label, 'for');\n var input = labelFor ? getById(labelFor) : select('input, select, textarea', label);\n\n if (input && !input.disabled) {\n return true;\n }\n } // Otherwise check if the event target matches one of the selectors in the\n // event filter (i.e. anchors, non disabled inputs, etc.)\n // Return `true` if we should ignore the event\n\n\n return matches(el, EVENT_FILTER);\n};","import { getSel, isElement } from '../../../utils/dom'; // Helper to determine if a there is an active text selection on the document page\n// Used to filter out click events caused by the mouse up at end of selection\n//\n// Accepts an element as only argument to test to see if selection overlaps or is\n// contained within the element\n\nexport var textSelectionActive = function textSelectionActive() {\n var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n var sel = getSel();\n return sel && sel.toString().trim() !== '' && sel.containsNode && isElement(el) ?\n /* istanbul ignore next */\n sel.containsNode(el, true) : false;\n};","import { Vue } from '../../vue';\nimport { NAME_TH } from '../../constants/components';\nimport { makePropsConfigurable } from '../../utils/props';\nimport { BTd, props as BTdProps } from './td'; // --- Props ---\n\nexport var props = makePropsConfigurable(BTdProps, NAME_TH); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTh = /*#__PURE__*/Vue.extend({\n name: NAME_TH,\n extends: BTd,\n props: props,\n computed: {\n tag: function tag() {\n return 'th';\n }\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { Vue } from '../../../vue';\nimport { EVENT_NAME_ROW_CLICKED, EVENT_NAME_ROW_HOVERED, EVENT_NAME_ROW_UNHOVERED } from '../../../constants/events';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_FUNCTION, PROP_TYPE_OBJECT_FUNCTION } from '../../../constants/props';\nimport { SLOT_NAME_ROW_DETAILS } from '../../../constants/slots';\nimport { get } from '../../../utils/get';\nimport { isFunction, isString, isUndefinedOrNull } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { toString } from '../../../utils/string';\nimport { BTr } from '../tr';\nimport { BTd } from '../td';\nimport { BTh } from '../th';\nimport { FIELD_KEY_CELL_VARIANT, FIELD_KEY_ROW_VARIANT, FIELD_KEY_SHOW_DETAILS } from './constants'; // --- Props ---\n\nexport var props = {\n detailsTdClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n tbodyTrAttr: makeProp(PROP_TYPE_OBJECT_FUNCTION),\n tbodyTrClass: makeProp([].concat(_toConsumableArray(PROP_TYPE_ARRAY_OBJECT_STRING), [PROP_TYPE_FUNCTION]))\n}; // --- Mixin ---\n// @vue/component\n\nexport var tbodyRowMixin = Vue.extend({\n props: props,\n methods: {\n // Methods for computing classes, attributes and styles for table cells\n getTdValues: function getTdValues(item, key, tdValue, defaultValue) {\n var $parent = this.$parent;\n\n if (tdValue) {\n var value = get(item, key, '');\n\n if (isFunction(tdValue)) {\n return tdValue(value, key, item);\n } else if (isString(tdValue) && isFunction($parent[tdValue])) {\n return $parent[tdValue](value, key, item);\n }\n\n return tdValue;\n }\n\n return defaultValue;\n },\n getThValues: function getThValues(item, key, thValue, type, defaultValue) {\n var $parent = this.$parent;\n\n if (thValue) {\n var value = get(item, key, '');\n\n if (isFunction(thValue)) {\n return thValue(value, key, item, type);\n } else if (isString(thValue) && isFunction($parent[thValue])) {\n return $parent[thValue](value, key, item, type);\n }\n\n return thValue;\n }\n\n return defaultValue;\n },\n // Method to get the value for a field\n getFormattedValue: function getFormattedValue(item, field) {\n var key = field.key;\n var formatter = this.getFieldFormatter(key);\n var value = get(item, key, null);\n\n if (isFunction(formatter)) {\n value = formatter(value, key, item);\n }\n\n return isUndefinedOrNull(value) ? '' : value;\n },\n // Factory function methods\n toggleDetailsFactory: function toggleDetailsFactory(hasDetailsSlot, item) {\n var _this = this;\n\n // Returns a function to toggle a row's details slot\n return function () {\n if (hasDetailsSlot) {\n _this.$set(item, FIELD_KEY_SHOW_DETAILS, !item[FIELD_KEY_SHOW_DETAILS]);\n }\n };\n },\n // Row event handlers\n rowHovered: function rowHovered(event) {\n // `mouseenter` handler (non-bubbling)\n // `this.tbodyRowEvtStopped` from tbody mixin\n if (!this.tbodyRowEvtStopped(event)) {\n // `this.emitTbodyRowEvent` from tbody mixin\n this.emitTbodyRowEvent(EVENT_NAME_ROW_HOVERED, event);\n }\n },\n rowUnhovered: function rowUnhovered(event) {\n // `mouseleave` handler (non-bubbling)\n // `this.tbodyRowEvtStopped` from tbody mixin\n if (!this.tbodyRowEvtStopped(event)) {\n // `this.emitTbodyRowEvent` from tbody mixin\n this.emitTbodyRowEvent(EVENT_NAME_ROW_UNHOVERED, event);\n }\n },\n // Renders a TD or TH for a row's field\n renderTbodyRowCell: function renderTbodyRowCell(field, colIndex, item, rowIndex) {\n var _this2 = this;\n\n var isStacked = this.isStacked;\n var key = field.key,\n label = field.label,\n isRowHeader = field.isRowHeader;\n var h = this.$createElement;\n var hasDetailsSlot = this.hasNormalizedSlot(SLOT_NAME_ROW_DETAILS);\n var formatted = this.getFormattedValue(item, field);\n var stickyColumn = !isStacked && (this.isResponsive || this.stickyHeader) && field.stickyColumn; // We only uses the helper components for sticky columns to\n // improve performance of BTable/BTableLite by reducing the\n // total number of vue instances created during render\n\n var cellTag = stickyColumn ? isRowHeader ? BTh : BTd : isRowHeader ? 'th' : 'td';\n var cellVariant = item[FIELD_KEY_CELL_VARIANT] && item[FIELD_KEY_CELL_VARIANT][key] ? item[FIELD_KEY_CELL_VARIANT][key] : field.variant || null;\n var data = {\n // For the Vue key, we concatenate the column index and\n // field key (as field keys could be duplicated)\n // TODO: Although we do prevent duplicate field keys...\n // So we could change this to: `row-${rowIndex}-cell-${key}`\n class: [field.class ? field.class : '', this.getTdValues(item, key, field.tdClass, '')],\n props: {},\n attrs: _objectSpread({\n 'aria-colindex': String(colIndex + 1)\n }, isRowHeader ? this.getThValues(item, key, field.thAttr, 'row', {}) : this.getTdValues(item, key, field.tdAttr, {})),\n key: \"row-\".concat(rowIndex, \"-cell-\").concat(colIndex, \"-\").concat(key)\n };\n\n if (stickyColumn) {\n // We are using the helper BTd or BTh\n data.props = {\n stackedHeading: isStacked ? label : null,\n stickyColumn: true,\n variant: cellVariant\n };\n } else {\n // Using native TD or TH element, so we need to\n // add in the attributes and variant class\n data.attrs['data-label'] = isStacked && !isUndefinedOrNull(label) ? toString(label) : null;\n data.attrs.role = isRowHeader ? 'rowheader' : 'cell';\n data.attrs.scope = isRowHeader ? 'row' : null; // Add in the variant class\n\n if (cellVariant) {\n data.class.push(\"\".concat(this.dark ? 'bg' : 'table', \"-\").concat(cellVariant));\n }\n }\n\n var slotScope = {\n item: item,\n index: rowIndex,\n field: field,\n unformatted: get(item, key, ''),\n value: formatted,\n toggleDetails: this.toggleDetailsFactory(hasDetailsSlot, item),\n detailsShowing: Boolean(item[FIELD_KEY_SHOW_DETAILS])\n }; // If table supports selectable mode, then add in the following scope\n // this.supportsSelectableRows will be undefined if mixin isn't loaded\n\n if (this.supportsSelectableRows) {\n slotScope.rowSelected = this.isRowSelected(rowIndex);\n\n slotScope.selectRow = function () {\n return _this2.selectRow(rowIndex);\n };\n\n slotScope.unselectRow = function () {\n return _this2.unselectRow(rowIndex);\n };\n } // The new `v-slot` syntax doesn't like a slot name starting with\n // a square bracket and if using in-document HTML templates, the\n // v-slot attributes are lower-cased by the browser.\n // Switched to round bracket syntax to prevent confusion with\n // dynamic slot name syntax.\n // We look for slots in this order: `cell(${key})`, `cell(${key.toLowerCase()})`, 'cell()'\n // Slot names are now cached by mixin tbody in `this.$_bodyFieldSlotNameCache`\n // Will be `null` if no slot (or fallback slot) exists\n\n\n var slotName = this.$_bodyFieldSlotNameCache[key];\n var $childNodes = slotName ? this.normalizeSlot(slotName, slotScope) : toString(formatted);\n\n if (this.isStacked) {\n // We wrap in a DIV to ensure rendered as a single cell when visually stacked!\n $childNodes = [h('div', [$childNodes])];\n } // Render either a td or th cell\n\n\n return h(cellTag, data, [$childNodes]);\n },\n // Renders an item's row (or rows if details supported)\n renderTbodyRow: function renderTbodyRow(item, rowIndex) {\n var _this3 = this;\n\n var fields = this.computedFields,\n striped = this.striped,\n primaryKey = this.primaryKey,\n currentPage = this.currentPage,\n perPage = this.perPage,\n tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n var h = this.$createElement;\n var hasDetailsSlot = this.hasNormalizedSlot(SLOT_NAME_ROW_DETAILS);\n var rowShowDetails = item[FIELD_KEY_SHOW_DETAILS] && hasDetailsSlot;\n var hasRowClickHandler = this.$listeners[EVENT_NAME_ROW_CLICKED] || this.hasSelectableRowClick; // We can return more than one TR if rowDetails enabled\n\n var $rows = []; // Details ID needed for `aria-details` when details showing\n // We set it to `null` when not showing so that attribute\n // does not appear on the element\n\n var detailsId = rowShowDetails ? this.safeId(\"_details_\".concat(rowIndex, \"_\")) : null; // For each item data field in row\n\n var $tds = fields.map(function (field, colIndex) {\n return _this3.renderTbodyRowCell(field, colIndex, item, rowIndex);\n }); // Calculate the row number in the dataset (indexed from 1)\n\n var ariaRowIndex = null;\n\n if (currentPage && perPage && perPage > 0) {\n ariaRowIndex = String((currentPage - 1) * perPage + rowIndex + 1);\n } // Create a unique :key to help ensure that sub components are re-rendered rather than\n // re-used, which can cause issues. If a primary key is not provided we use the rendered\n // rows index within the tbody.\n // See: https://github.com/bootstrap-vue/bootstrap-vue/issues/2410\n\n\n var primaryKeyValue = toString(get(item, primaryKey)) || null;\n var rowKey = primaryKeyValue || toString(rowIndex); // If primary key is provided, use it to generate a unique ID on each tbody > tr\n // In the format of '{tableId}__row_{primaryKeyValue}'\n\n var rowId = primaryKeyValue ? this.safeId(\"_row_\".concat(primaryKeyValue)) : null; // Selectable classes and attributes\n\n var selectableClasses = this.selectableRowClasses ? this.selectableRowClasses(rowIndex) : {};\n var selectableAttrs = this.selectableRowAttrs ? this.selectableRowAttrs(rowIndex) : {}; // Additional classes and attributes\n\n var userTrClasses = isFunction(tbodyTrClass) ? tbodyTrClass(item, 'row') : tbodyTrClass;\n var userTrAttrs = isFunction(tbodyTrAttr) ?\n /* istanbul ignore next */\n tbodyTrAttr(item, 'row') : tbodyTrAttr; // Add the item row\n\n $rows.push(h(BTr, {\n class: [userTrClasses, selectableClasses, rowShowDetails ? 'b-table-has-details' : ''],\n props: {\n variant: item[FIELD_KEY_ROW_VARIANT] || null\n },\n attrs: _objectSpread(_objectSpread({\n id: rowId\n }, userTrAttrs), {}, {\n // Users cannot override the following attributes\n tabindex: hasRowClickHandler ? '0' : null,\n 'data-pk': primaryKeyValue || null,\n 'aria-details': detailsId,\n 'aria-owns': detailsId,\n 'aria-rowindex': ariaRowIndex\n }, selectableAttrs),\n on: {\n // Note: These events are not A11Y friendly!\n mouseenter: this.rowHovered,\n mouseleave: this.rowUnhovered\n },\n key: \"__b-table-row-\".concat(rowKey, \"__\"),\n ref: 'item-rows',\n refInFor: true\n }, $tds)); // Row Details slot\n\n if (rowShowDetails) {\n var detailsScope = {\n item: item,\n index: rowIndex,\n fields: fields,\n toggleDetails: this.toggleDetailsFactory(hasDetailsSlot, item)\n }; // If table supports selectable mode, then add in the following scope\n // this.supportsSelectableRows will be undefined if mixin isn't loaded\n\n if (this.supportsSelectableRows) {\n detailsScope.rowSelected = this.isRowSelected(rowIndex);\n\n detailsScope.selectRow = function () {\n return _this3.selectRow(rowIndex);\n };\n\n detailsScope.unselectRow = function () {\n return _this3.unselectRow(rowIndex);\n };\n } // Render the details slot in a TD\n\n\n var $details = h(BTd, {\n props: {\n colspan: fields.length\n },\n class: this.detailsTdClass\n }, [this.normalizeSlot(SLOT_NAME_ROW_DETAILS, detailsScope)]); // Add a hidden row to keep table row striping consistent when details showing\n // Only added if the table is striped\n\n if (striped) {\n $rows.push( // We don't use `BTr` here as we don't need the extra functionality\n h('tr', {\n staticClass: 'd-none',\n attrs: {\n 'aria-hidden': 'true',\n role: 'presentation'\n },\n key: \"__b-table-details-stripe__\".concat(rowKey)\n }));\n } // Add the actual details row\n\n\n var userDetailsTrClasses = isFunction(this.tbodyTrClass) ?\n /* istanbul ignore next */\n this.tbodyTrClass(item, SLOT_NAME_ROW_DETAILS) : this.tbodyTrClass;\n var userDetailsTrAttrs = isFunction(this.tbodyTrAttr) ?\n /* istanbul ignore next */\n this.tbodyTrAttr(item, SLOT_NAME_ROW_DETAILS) : this.tbodyTrAttr;\n $rows.push(h(BTr, {\n staticClass: 'b-table-details',\n class: [userDetailsTrClasses],\n props: {\n variant: item[FIELD_KEY_ROW_VARIANT] || null\n },\n attrs: _objectSpread(_objectSpread({}, userDetailsTrAttrs), {}, {\n // Users cannot override the following attributes\n id: detailsId,\n tabindex: '-1'\n }),\n key: \"__b-table-details__\".concat(rowKey)\n }, [$details]));\n } else if (hasDetailsSlot) {\n // Only add the placeholder if a the table has a row-details slot defined (but not shown)\n $rows.push(h());\n\n if (striped) {\n // Add extra placeholder if table is striped\n $rows.push(h());\n }\n } // Return the row(s)\n\n\n return $rows;\n }\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../../vue';\nimport { EVENT_NAME_ROW_CLICKED, EVENT_NAME_ROW_CONTEXTMENU, EVENT_NAME_ROW_DBLCLICKED, EVENT_NAME_ROW_MIDDLE_CLICKED } from '../../../constants/events';\nimport { CODE_DOWN, CODE_END, CODE_ENTER, CODE_HOME, CODE_SPACE, CODE_UP } from '../../../constants/key-codes';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING } from '../../../constants/props';\nimport { arrayIncludes, from as arrayFrom } from '../../../utils/array';\nimport { attemptFocus, closest, isActiveElement, isElement } from '../../../utils/dom';\nimport { stopEvent } from '../../../utils/events';\nimport { sortKeys } from '../../../utils/object';\nimport { makeProp, pluckProps } from '../../../utils/props';\nimport { BTbody, props as BTbodyProps } from '../tbody';\nimport { filterEvent } from './filter-event';\nimport { textSelectionActive } from './text-selection-active';\nimport { tbodyRowMixin, props as tbodyRowProps } from './mixin-tbody-row'; // --- Helper methods ---\n\nvar getCellSlotName = function getCellSlotName(value) {\n return \"cell(\".concat(value || '', \")\");\n}; // --- Props ---\n\n\nexport var props = sortKeys(_objectSpread(_objectSpread(_objectSpread({}, BTbodyProps), tbodyRowProps), {}, {\n tbodyClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)\n})); // --- Mixin ---\n// @vue/component\n\nexport var tbodyMixin = Vue.extend({\n mixins: [tbodyRowMixin],\n props: props,\n beforeDestroy: function beforeDestroy() {\n this.$_bodyFieldSlotNameCache = null;\n },\n methods: {\n // Returns all the item TR elements (excludes detail and spacer rows)\n // `this.$refs['item-rows']` is an array of item TR components/elements\n // Rows should all be `` components, but we map to TR elements\n // Also note that `this.$refs['item-rows']` may not always be in document order\n getTbodyTrs: function getTbodyTrs() {\n var $refs = this.$refs;\n var tbody = $refs.tbody ? $refs.tbody.$el || $refs.tbody : null;\n var trs = ($refs['item-rows'] || []).map(function (tr) {\n return tr.$el || tr;\n });\n return tbody && tbody.children && tbody.children.length > 0 && trs && trs.length > 0 ? arrayFrom(tbody.children).filter(function (tr) {\n return arrayIncludes(trs, tr);\n }) :\n /* istanbul ignore next */\n [];\n },\n // Returns index of a particular TBODY item TR\n // We set `true` on closest to include self in result\n getTbodyTrIndex: function getTbodyTrIndex(el) {\n /* istanbul ignore next: should not normally happen */\n if (!isElement(el)) {\n return -1;\n }\n\n var tr = el.tagName === 'TR' ? el : closest('tr', el, true);\n return tr ? this.getTbodyTrs().indexOf(tr) : -1;\n },\n // Emits a row event, with the item object, row index and original event\n emitTbodyRowEvent: function emitTbodyRowEvent(type, event) {\n if (type && this.hasListener(type) && event && event.target) {\n var rowIndex = this.getTbodyTrIndex(event.target);\n\n if (rowIndex > -1) {\n // The array of TRs correlate to the `computedItems` array\n var item = this.computedItems[rowIndex];\n this.$emit(type, item, rowIndex, event);\n }\n }\n },\n tbodyRowEvtStopped: function tbodyRowEvtStopped(event) {\n return this.stopIfBusy && this.stopIfBusy(event);\n },\n // Delegated row event handlers\n onTbodyRowKeydown: function onTbodyRowKeydown(event) {\n // Keyboard navigation and row click emulation\n var target = event.target,\n keyCode = event.keyCode;\n\n if (this.tbodyRowEvtStopped(event) || target.tagName !== 'TR' || !isActiveElement(target) || target.tabIndex !== 0) {\n // Early exit if not an item row TR\n return;\n }\n\n if (arrayIncludes([CODE_ENTER, CODE_SPACE], keyCode)) {\n // Emulated click for keyboard users, transfer to click handler\n stopEvent(event);\n this.onTBodyRowClicked(event);\n } else if (arrayIncludes([CODE_UP, CODE_DOWN, CODE_HOME, CODE_END], keyCode)) {\n // Keyboard navigation\n var rowIndex = this.getTbodyTrIndex(target);\n\n if (rowIndex > -1) {\n stopEvent(event);\n var trs = this.getTbodyTrs();\n var shift = event.shiftKey;\n\n if (keyCode === CODE_HOME || shift && keyCode === CODE_UP) {\n // Focus first row\n attemptFocus(trs[0]);\n } else if (keyCode === CODE_END || shift && keyCode === CODE_DOWN) {\n // Focus last row\n attemptFocus(trs[trs.length - 1]);\n } else if (keyCode === CODE_UP && rowIndex > 0) {\n // Focus previous row\n attemptFocus(trs[rowIndex - 1]);\n } else if (keyCode === CODE_DOWN && rowIndex < trs.length - 1) {\n // Focus next row\n attemptFocus(trs[rowIndex + 1]);\n }\n }\n }\n },\n onTBodyRowClicked: function onTBodyRowClicked(event) {\n // Don't emit event when the table is busy, the user clicked\n // on a non-disabled control or is selecting text\n if (this.tbodyRowEvtStopped(event) || filterEvent(event) || textSelectionActive(this.$el)) {\n return;\n }\n\n this.emitTbodyRowEvent(EVENT_NAME_ROW_CLICKED, event);\n },\n onTbodyRowMiddleMouseRowClicked: function onTbodyRowMiddleMouseRowClicked(event) {\n if (!this.tbodyRowEvtStopped(event) && event.which === 2) {\n this.emitTbodyRowEvent(EVENT_NAME_ROW_MIDDLE_CLICKED, event);\n }\n },\n onTbodyRowContextmenu: function onTbodyRowContextmenu(event) {\n if (!this.tbodyRowEvtStopped(event)) {\n this.emitTbodyRowEvent(EVENT_NAME_ROW_CONTEXTMENU, event);\n }\n },\n onTbodyRowDblClicked: function onTbodyRowDblClicked(event) {\n if (!this.tbodyRowEvtStopped(event) && !filterEvent(event)) {\n this.emitTbodyRowEvent(EVENT_NAME_ROW_DBLCLICKED, event);\n }\n },\n // Render the tbody element and children\n // Note:\n // Row hover handlers are handled by the tbody-row mixin\n // As mouseenter/mouseleave events do not bubble\n renderTbody: function renderTbody() {\n var _this = this;\n\n var items = this.computedItems,\n renderBusy = this.renderBusy,\n renderTopRow = this.renderTopRow,\n renderEmpty = this.renderEmpty,\n renderBottomRow = this.renderBottomRow;\n var h = this.$createElement;\n var hasRowClickHandler = this.hasListener(EVENT_NAME_ROW_CLICKED) || this.hasSelectableRowClick; // Prepare the tbody rows\n\n var $rows = []; // Add the item data rows or the busy slot\n\n var $busy = renderBusy ? renderBusy() : null;\n\n if ($busy) {\n // If table is busy and a busy slot, then return only the busy \"row\" indicator\n $rows.push($busy);\n } else {\n // Table isn't busy, or we don't have a busy slot\n // Create a slot cache for improved performance when looking up cell slot names\n // Values will be keyed by the field's `key` and will store the slot's name\n // Slots could be dynamic (i.e. `v-if`), so we must compute on each render\n // Used by tbody-row mixin render helper\n var cache = {};\n var defaultSlotName = getCellSlotName();\n defaultSlotName = this.hasNormalizedSlot(defaultSlotName) ? defaultSlotName : null;\n this.computedFields.forEach(function (field) {\n var key = field.key;\n var slotName = getCellSlotName(key);\n var lowercaseSlotName = getCellSlotName(key.toLowerCase());\n cache[key] = _this.hasNormalizedSlot(slotName) ? slotName : _this.hasNormalizedSlot(lowercaseSlotName) ?\n /* istanbul ignore next */\n lowercaseSlotName : defaultSlotName;\n }); // Created as a non-reactive property so to not trigger component updates\n // Must be a fresh object each render\n\n this.$_bodyFieldSlotNameCache = cache; // Add static top row slot (hidden in visibly stacked mode\n // as we can't control `data-label` attr)\n\n $rows.push(renderTopRow ? renderTopRow() : h()); // Render the rows\n\n items.forEach(function (item, rowIndex) {\n // Render the individual item row (rows if details slot)\n $rows.push(_this.renderTbodyRow(item, rowIndex));\n }); // Empty items / empty filtered row slot (only shows if `items.length < 1`)\n\n $rows.push(renderEmpty ? renderEmpty() : h()); // Static bottom row slot (hidden in visibly stacked mode\n // as we can't control `data-label` attr)\n\n $rows.push(renderBottomRow ? renderBottomRow() : h());\n } // Note: these events will only emit if a listener is registered\n\n\n var handlers = {\n auxclick: this.onTbodyRowMiddleMouseRowClicked,\n // TODO:\n // Perhaps we do want to automatically prevent the\n // default context menu from showing if there is a\n // `row-contextmenu` listener registered\n contextmenu: this.onTbodyRowContextmenu,\n // The following event(s) is not considered A11Y friendly\n dblclick: this.onTbodyRowDblClicked // Hover events (`mouseenter`/`mouseleave`) are handled by `tbody-row` mixin\n\n }; // Add in click/keydown listeners if needed\n\n if (hasRowClickHandler) {\n handlers.click = this.onTBodyRowClicked;\n handlers.keydown = this.onTbodyRowKeydown;\n } // Assemble rows into the tbody\n\n\n var $tbody = h(BTbody, {\n class: this.tbodyClass || null,\n props: pluckProps(BTbodyProps, this.$props),\n // BTbody transfers all native event listeners to the root element\n // TODO: Only set the handlers if the table is not busy\n on: handlers,\n ref: 'tbody'\n }, $rows); // Return the assembled tbody\n\n return $tbody;\n }\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../vue';\nimport { NAME_TFOOT } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n // Supported values: 'lite', 'dark', or null\n footVariant: makeProp(PROP_TYPE_STRING)\n}, NAME_TFOOT); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTfoot = /*#__PURE__*/Vue.extend({\n name: NAME_TFOOT,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableRowGroup: this\n };\n },\n inject: {\n // Sniffed by `` / `` / ``\n bvTable: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / `` / ``\n isTfoot: function isTfoot() {\n return true;\n },\n // Sniffed by `` / `` / ``\n isDark: function isDark() {\n return this.bvTable.dark;\n },\n // Sniffed by `` / `` / ``\n isStacked: function isStacked() {\n return this.bvTable.isStacked;\n },\n // Sniffed by `` / `` / ``\n isResponsive: function isResponsive() {\n return this.bvTable.isResponsive;\n },\n // Sniffed by `` / `` / ``\n // Sticky headers are only supported in thead\n isStickyHeader: function isStickyHeader() {\n return false;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n tableVariant: function tableVariant() {\n return this.bvTable.tableVariant;\n },\n tfootClasses: function tfootClasses() {\n return [this.footVariant ? \"thead-\".concat(this.footVariant) : null];\n },\n tfootAttrs: function tfootAttrs() {\n return _objectSpread(_objectSpread({}, this.bvAttrs), {}, {\n role: 'rowgroup'\n });\n }\n },\n render: function render(h) {\n return h('tfoot', {\n class: this.tfootClasses,\n attrs: this.tfootAttrs,\n // Pass down any native listeners\n on: this.bvListeners\n }, this.normalizeSlot());\n }\n});","import { Vue } from '../../../vue';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';\nimport { SLOT_NAME_CUSTOM_FOOT } from '../../../constants/slots';\nimport { makeProp } from '../../../utils/props';\nimport { BTfoot } from '../tfoot'; // --- Props ---\n\nexport var props = {\n footClone: makeProp(PROP_TYPE_BOOLEAN, false),\n // Any Bootstrap theme variant (or custom)\n // Falls back to `headRowVariant`\n footRowVariant: makeProp(PROP_TYPE_STRING),\n // 'dark', 'light', or `null` (or custom)\n footVariant: makeProp(PROP_TYPE_STRING),\n tfootClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n tfootTrClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)\n}; // --- Mixin ---\n// @vue/component\n\nexport var tfootMixin = Vue.extend({\n props: props,\n methods: {\n renderTFootCustom: function renderTFootCustom() {\n var h = this.$createElement;\n\n if (this.hasNormalizedSlot(SLOT_NAME_CUSTOM_FOOT)) {\n return h(BTfoot, {\n class: this.tfootClass || null,\n props: {\n footVariant: this.footVariant || this.headVariant || null\n },\n key: 'bv-tfoot-custom'\n }, this.normalizeSlot(SLOT_NAME_CUSTOM_FOOT, {\n items: this.computedItems.slice(),\n fields: this.computedFields.slice(),\n columns: this.computedFields.length\n }));\n }\n\n return h();\n },\n renderTfoot: function renderTfoot() {\n // Passing true to renderThead will make it render a tfoot\n return this.footClone ? this.renderThead(true) : this.renderTFootCustom();\n }\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../vue';\nimport { NAME_THEAD } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n // Also sniffed by `` / `` / ``\n // Supported values: 'lite', 'dark', or `null`\n headVariant: makeProp(PROP_TYPE_STRING)\n}, NAME_THEAD); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BThead = /*#__PURE__*/Vue.extend({\n name: NAME_THEAD,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableRowGroup: this\n };\n },\n inject: {\n // Sniffed by `` / `` / ``\n bvTable: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / `` / ``\n isThead: function isThead() {\n return true;\n },\n // Sniffed by `` / `` / ``\n isDark: function isDark() {\n return this.bvTable.dark;\n },\n // Sniffed by `` / `` / ``\n isStacked: function isStacked() {\n return this.bvTable.isStacked;\n },\n // Sniffed by `` / `` / ``\n isResponsive: function isResponsive() {\n return this.bvTable.isResponsive;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n // Sticky headers only apply to cells in table `thead`\n isStickyHeader: function isStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n tableVariant: function tableVariant() {\n return this.bvTable.tableVariant;\n },\n theadClasses: function theadClasses() {\n return [this.headVariant ? \"thead-\".concat(this.headVariant) : null];\n },\n theadAttrs: function theadAttrs() {\n return _objectSpread({\n role: 'rowgroup'\n }, this.bvAttrs);\n }\n },\n render: function render(h) {\n return h('thead', {\n class: this.theadClasses,\n attrs: this.theadAttrs,\n // Pass down any native listeners\n on: this.bvListeners\n }, this.normalizeSlot());\n }\n});","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction 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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../../vue';\nimport { EVENT_NAME_HEAD_CLICKED } from '../../../constants/events';\nimport { CODE_ENTER, CODE_SPACE } from '../../../constants/key-codes';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../../constants/props';\nimport { SLOT_NAME_THEAD_TOP } from '../../../constants/slots';\nimport { stopEvent } from '../../../utils/events';\nimport { htmlOrText } from '../../../utils/html';\nimport { identity } from '../../../utils/identity';\nimport { isUndefinedOrNull } from '../../../utils/inspect';\nimport { noop } from '../../../utils/noop';\nimport { makeProp } from '../../../utils/props';\nimport { startCase } from '../../../utils/string';\nimport { BThead } from '../thead';\nimport { BTfoot } from '../tfoot';\nimport { BTr } from '../tr';\nimport { BTh } from '../th';\nimport { filterEvent } from './filter-event';\nimport { textSelectionActive } from './text-selection-active'; // --- Helper methods ---\n\nvar getHeadSlotName = function getHeadSlotName(value) {\n return \"head(\".concat(value || '', \")\");\n};\n\nvar getFootSlotName = function getFootSlotName(value) {\n return \"foot(\".concat(value || '', \")\");\n}; // --- Props ---\n\n\nexport var props = {\n // Any Bootstrap theme variant (or custom)\n headRowVariant: makeProp(PROP_TYPE_STRING),\n // 'light', 'dark' or `null` (or custom)\n headVariant: makeProp(PROP_TYPE_STRING),\n theadClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n theadTrClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)\n}; // --- Mixin ---\n// @vue/component\n\nexport var theadMixin = Vue.extend({\n props: props,\n methods: {\n fieldClasses: function fieldClasses(field) {\n // Header field (
) classes\n return [field.class ? field.class : '', field.thClass ? field.thClass : ''];\n },\n headClicked: function headClicked(event, field, isFoot) {\n if (this.stopIfBusy && this.stopIfBusy(event)) {\n // If table is busy (via provider) then don't propagate\n return;\n } else if (filterEvent(event)) {\n // Clicked on a non-disabled control so ignore\n return;\n } else if (textSelectionActive(this.$el)) {\n // User is selecting text, so ignore\n\n /* istanbul ignore next: JSDOM doesn't support getSelection() */\n return;\n }\n\n stopEvent(event);\n this.$emit(EVENT_NAME_HEAD_CLICKED, field.key, field, event, isFoot);\n },\n renderThead: function renderThead() {\n var _this = this;\n\n var isFoot = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var fields = this.computedFields,\n isSortable = this.isSortable,\n isSelectable = this.isSelectable,\n headVariant = this.headVariant,\n footVariant = this.footVariant,\n headRowVariant = this.headRowVariant,\n footRowVariant = this.footRowVariant;\n var h = this.$createElement; // In always stacked mode, we don't bother rendering the head/foot\n // Or if no field headings (empty table)\n\n if (this.isStackedAlways || fields.length === 0) {\n return h();\n }\n\n var hasHeadClickListener = isSortable || this.hasListener(EVENT_NAME_HEAD_CLICKED); // Reference to `selectAllRows` and `clearSelected()`, if table is selectable\n\n var selectAllRows = isSelectable ? this.selectAllRows : noop;\n var clearSelected = isSelectable ? this.clearSelected : noop; // Helper function to generate a field
cell\n\n var makeCell = function makeCell(field, colIndex) {\n var label = field.label,\n labelHtml = field.labelHtml,\n variant = field.variant,\n stickyColumn = field.stickyColumn,\n key = field.key;\n var ariaLabel = null;\n\n if (!field.label.trim() && !field.headerTitle) {\n // In case field's label and title are empty/blank\n // We need to add a hint about what the column is about for non-sighted users\n\n /* istanbul ignore next */\n ariaLabel = startCase(field.key);\n }\n\n var on = {};\n\n if (hasHeadClickListener) {\n on.click = function (event) {\n _this.headClicked(event, field, isFoot);\n };\n\n on.keydown = function (event) {\n var keyCode = event.keyCode;\n\n if (keyCode === CODE_ENTER || keyCode === CODE_SPACE) {\n _this.headClicked(event, field, isFoot);\n }\n };\n }\n\n var sortAttrs = isSortable ? _this.sortTheadThAttrs(key, field, isFoot) : {};\n var sortClass = isSortable ? _this.sortTheadThClasses(key, field, isFoot) : null;\n var sortLabel = isSortable ? _this.sortTheadThLabel(key, field, isFoot) : null;\n var data = {\n class: [_this.fieldClasses(field), sortClass],\n props: {\n variant: variant,\n stickyColumn: stickyColumn\n },\n style: field.thStyle || {},\n attrs: _objectSpread(_objectSpread({\n // We only add a `tabindex` of `0` if there is a head-clicked listener\n // and the current field is sortable\n tabindex: hasHeadClickListener && field.sortable ? '0' : null,\n abbr: field.headerAbbr || null,\n title: field.headerTitle || null,\n 'aria-colindex': colIndex + 1,\n 'aria-label': ariaLabel\n }, _this.getThValues(null, key, field.thAttr, isFoot ? 'foot' : 'head', {})), sortAttrs),\n on: on,\n key: key\n }; // Handle edge case where in-document templates are used with new\n // `v-slot:name` syntax where the browser lower-cases the v-slot's\n // name (attributes become lower cased when parsed by the browser)\n // We have replaced the square bracket syntax with round brackets\n // to prevent confusion with dynamic slot names\n\n var slotNames = [getHeadSlotName(key), getHeadSlotName(key.toLowerCase()), getHeadSlotName()]; // Footer will fallback to header slot names\n\n if (isFoot) {\n slotNames = [getFootSlotName(key), getFootSlotName(key.toLowerCase()), getFootSlotName()].concat(_toConsumableArray(slotNames));\n }\n\n var scope = {\n label: label,\n column: key,\n field: field,\n isFoot: isFoot,\n // Add in row select methods\n selectAllRows: selectAllRows,\n clearSelected: clearSelected\n };\n var $content = _this.normalizeSlot(slotNames, scope) || h('div', {\n domProps: htmlOrText(labelHtml, label)\n });\n var $srLabel = sortLabel ? h('span', {\n staticClass: 'sr-only'\n }, \" (\".concat(sortLabel, \")\")) : null; // Return the header cell\n\n return h(BTh, data, [$content, $srLabel].filter(identity));\n }; // Generate the array of
cells\n\n\n var $cells = fields.map(makeCell).filter(identity); // Generate the row(s)\n\n var $trs = [];\n\n if (isFoot) {\n $trs.push(h(BTr, {\n class: this.tfootTrClass,\n props: {\n variant: isUndefinedOrNull(footRowVariant) ? headRowVariant :\n /* istanbul ignore next */\n footRowVariant\n }\n }, $cells));\n } else {\n var scope = {\n columns: fields.length,\n fields: fields,\n // Add in row select methods\n selectAllRows: selectAllRows,\n clearSelected: clearSelected\n };\n $trs.push(this.normalizeSlot(SLOT_NAME_THEAD_TOP, scope) || h());\n $trs.push(h(BTr, {\n class: this.theadTrClass,\n props: {\n variant: headRowVariant\n }\n }, $cells));\n }\n\n return h(isFoot ? BTfoot : BThead, {\n class: (isFoot ? this.tfootClass : this.theadClass) || null,\n props: isFoot ? {\n footVariant: footVariant || headVariant || null\n } : {\n headVariant: headVariant || null\n },\n key: isFoot ? 'bv-tfoot' : 'bv-thead'\n }, $trs);\n }\n }\n});","import { Vue } from '../../../vue';\nimport { SLOT_NAME_TOP_ROW } from '../../../constants/slots';\nimport { isFunction } from '../../../utils/inspect';\nimport { BTr } from '../tr'; // --- Props ---\n\nexport var props = {}; // --- Mixin ---\n// @vue/component\n\nexport var topRowMixin = Vue.extend({\n methods: {\n renderTopRow: function renderTopRow() {\n var fields = this.computedFields,\n stacked = this.stacked,\n tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n var h = this.$createElement; // Add static Top Row slot (hidden in visibly stacked mode as we can't control the data-label)\n // If in *always* stacked mode, we don't bother rendering the row\n\n if (!this.hasNormalizedSlot(SLOT_NAME_TOP_ROW) || stacked === true || stacked === '') {\n return h();\n }\n\n return h(BTr, {\n staticClass: 'b-table-top-row',\n class: [isFunction(tbodyTrClass) ? tbodyTrClass(null, 'row-top') : tbodyTrClass],\n attrs: isFunction(tbodyTrAttr) ? tbodyTrAttr(null, 'row-top') : tbodyTrAttr,\n key: 'b-top-row'\n }, [this.normalizeSlot(SLOT_NAME_TOP_ROW, {\n columns: fields.length,\n fields: fields\n })]);\n }\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue } from '../../vue';\nimport { NAME_TABLE } from '../../constants/components';\nimport { sortKeys } from '../../utils/object';\nimport { makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { hasListenerMixin } from '../../mixins/has-listener';\nimport { idMixin, props as idProps } from '../../mixins/id';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { bottomRowMixin, props as bottomRowProps } from './helpers/mixin-bottom-row';\nimport { busyMixin, props as busyProps } from './helpers/mixin-busy';\nimport { captionMixin, props as captionProps } from './helpers/mixin-caption';\nimport { colgroupMixin, props as colgroupProps } from './helpers/mixin-colgroup';\nimport { emptyMixin, props as emptyProps } from './helpers/mixin-empty';\nimport { filteringMixin, props as filteringProps } from './helpers/mixin-filtering';\nimport { itemsMixin, props as itemsProps } from './helpers/mixin-items';\nimport { paginationMixin, props as paginationProps } from './helpers/mixin-pagination';\nimport { providerMixin, props as providerProps } from './helpers/mixin-provider';\nimport { selectableMixin, props as selectableProps } from './helpers/mixin-selectable';\nimport { sortingMixin, props as sortingProps } from './helpers/mixin-sorting';\nimport { stackedMixin, props as stackedProps } from './helpers/mixin-stacked';\nimport { tableRendererMixin, props as tableRendererProps } from './helpers/mixin-table-renderer';\nimport { tbodyMixin, props as tbodyProps } from './helpers/mixin-tbody';\nimport { tfootMixin, props as tfootProps } from './helpers/mixin-tfoot';\nimport { theadMixin, props as theadProps } from './helpers/mixin-thead';\nimport { topRowMixin, props as topRowProps } from './helpers/mixin-top-row'; // --- Props ---\n\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, idProps), bottomRowProps), busyProps), captionProps), colgroupProps), emptyProps), filteringProps), itemsProps), paginationProps), providerProps), selectableProps), sortingProps), stackedProps), tableRendererProps), tbodyProps), tfootProps), theadProps), topRowProps)), NAME_TABLE); // --- Main component ---\n// @vue/component\n\nexport var BTable = /*#__PURE__*/Vue.extend({\n name: NAME_TABLE,\n // Order of mixins is important!\n // They are merged from first to last, followed by this component\n mixins: [// General mixins\n attrsMixin, hasListenerMixin, idMixin, normalizeSlotMixin, // Required table mixins\n itemsMixin, tableRendererMixin, stackedMixin, theadMixin, tfootMixin, tbodyMixin, // Table features mixins\n stackedMixin, filteringMixin, sortingMixin, paginationMixin, captionMixin, colgroupMixin, selectableMixin, emptyMixin, topRowMixin, bottomRowMixin, busyMixin, providerMixin],\n props: props // Render function is provided by `tableRendererMixin`\n\n});","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","'use strict';\n\nfunction fuzzysearch (needle, haystack) {\n var tlen = haystack.length;\n var qlen = needle.length;\n if (qlen > tlen) {\n return false;\n }\n if (qlen === tlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < qlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < tlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}\n\nmodule.exports = fuzzysearch;\n","import { Vue, mergeData } from '../../vue';\nimport { NAME_MEDIA } from '../../constants/components';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_ASIDE, SLOT_NAME_DEFAULT } from '../../constants/slots';\nimport { normalizeSlot } from '../../utils/normalize-slot';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { BMediaAside } from './media-aside';\nimport { BMediaBody } from './media-body'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n noBody: makeProp(PROP_TYPE_BOOLEAN, false),\n rightAlign: makeProp(PROP_TYPE_BOOLEAN, false),\n tag: makeProp(PROP_TYPE_STRING, 'div'),\n verticalAlign: makeProp(PROP_TYPE_STRING, 'top')\n}, NAME_MEDIA); // --- Main component ---\n// @vue/component\n\nexport var BMedia = /*#__PURE__*/Vue.extend({\n name: NAME_MEDIA,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n slots = _ref.slots,\n scopedSlots = _ref.scopedSlots,\n children = _ref.children;\n var noBody = props.noBody,\n rightAlign = props.rightAlign,\n verticalAlign = props.verticalAlign;\n var $children = noBody ? children : [];\n\n if (!noBody) {\n var slotScope = {};\n var $slots = slots();\n var $scopedSlots = scopedSlots || {};\n $children.push(h(BMediaBody, normalizeSlot(SLOT_NAME_DEFAULT, slotScope, $scopedSlots, $slots)));\n var $aside = normalizeSlot(SLOT_NAME_ASIDE, slotScope, $scopedSlots, $slots);\n\n if ($aside) {\n $children[rightAlign ? 'push' : 'unshift'](h(BMediaAside, {\n props: {\n right: rightAlign,\n verticalAlign: verticalAlign\n }\n }, $aside));\n }\n }\n\n return h(props.tag, mergeData(data, {\n staticClass: 'media'\n }), $children);\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(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(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 { Vue, mergeData } from '../../vue';\nimport { NAME_INPUT_GROUP_PREPEND } from '../../constants/components';\nimport { omit } from '../../utils/object';\nimport { makePropsConfigurable } from '../../utils/props';\nimport { BInputGroupAddon, props as BInputGroupAddonProps } from './input-group-addon'; // --- Props ---\n\nexport var props = makePropsConfigurable(omit(BInputGroupAddonProps, ['append']), NAME_INPUT_GROUP_PREPEND); // --- Main component ---\n// @vue/component\n\nexport var BInputGroupPrepend = /*#__PURE__*/Vue.extend({\n name: NAME_INPUT_GROUP_PREPEND,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n // Pass all our data down to child, and set `append` to `true`\n return h(BInputGroupAddon, mergeData(data, {\n props: _objectSpread(_objectSpread({}, props), {}, {\n append: false\n })\n }), children);\n }\n});","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/* eslint-disable */\r\nimport BaseService from \"../../BaseService\";\r\n\r\nconst { http, axios, buildHeaders, buildEndpoint } = BaseService();\r\n\r\n// API\r\n//////////////////////////////////////////////////////////////////\r\n\r\nexport function GetPagingParams(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/get-paging-params\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function GetCanBoCongChucDaXoa(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/get-paging-params-deleted\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\nexport function GetCanBoCongChucKhoiDang(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/get-paging-params-khoi-dang\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\nexport function GetCanBoCongChucNghiViec(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/get-paging-params-nghi-viec\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function GetPagingParamsSync(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/get-paging-params-sync-failed\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function CanBoCongChucTraCuu(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/get-paging-params-tra-cuu\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function CanBoCongChucGetAllOfCanBo(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/getAll\",\r\n method: \"get\",\r\n data,\r\n });\r\n}\r\n\r\nexport function CanBoCongChucGetByIddv(id) {\r\n return http({\r\n url: \"CanBoCongChuc/get-cbcc-by-iddv/\" + id,\r\n method: \"get\",\r\n });\r\n}\r\n\r\nexport function CanBoCongChucGetInfo(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/GetInfo\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function GetInfoExport(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/GetInfoExport\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function GetInfoByUsername(postdata) {\r\n return http({\r\n url: \"CanBoCongChuc/get-by-email/\" + postdata,\r\n method: \"get\",\r\n });\r\n}\r\n\r\nexport function CanBoCongChucCreate(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/Create\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function CanBoCongChucUpdate(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/update\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function CanBoCongChucDelete(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/Delete\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function UpdateThongTinChung(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/updateThongTinChung\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function UpdateThongTinKhac(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/updateThongTinKhac\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function UpdateBienCheHopDong(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/UpdateBienCheHopDong\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function UpdateLuong(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/UpdateLuong\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function UpdateDaoTaoBoiDuong(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/UpdateDaoTaoBoiDuong\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function UpdateLichSuBanThan(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/updateLichSuBanThan\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\nexport function UpdateNhanXetDanhGia(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/updateNhanXetDanhGia\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function UpdateThuNhapVaDatSanXuat(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/UpdateThuNhapVaDatSanXuat\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function CanBoCongChucCreateNghiViec(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/CreateNghiViec\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\nexport function CanBoCongChucCreateKhoiDang(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/CreateKhoiDang\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function CanBoCongChucUpdateNghiViec(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/UpdateNghiViec\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function CanBoCongChucDeleteKhoiDang(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/DeleteKhoiDang\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function CanBoCongChucKhoiPhucDelete(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"CanBoCongChuc/KhoiPhucDeleted\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function ResetAvatarUser(id) {\r\n return http({\r\n url: \"CanBoCongChuc/reset-avatar/\" + id,\r\n method: \"get\",\r\n });\r\n}\r\n","var classof = require('../internals/classof-raw');\n\n// `thisNumberValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-thisnumbervalue\nmodule.exports = function (value) {\n if (typeof value != 'number' && classof(value) != 'Number') {\n throw TypeError('Incorrect invocation');\n }\n return +value;\n};\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import { Vue, mergeData } from '../../vue';\nimport { NAME_INPUT_GROUP_ADDON } from '../../constants/components';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { BInputGroupText } from './input-group-text'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n append: makeProp(PROP_TYPE_BOOLEAN, false),\n id: makeProp(PROP_TYPE_STRING),\n isText: makeProp(PROP_TYPE_BOOLEAN, false),\n tag: makeProp(PROP_TYPE_STRING, 'div')\n}, NAME_INPUT_GROUP_ADDON); // --- Main component ---\n// @vue/component\n\nexport var BInputGroupAddon = /*#__PURE__*/Vue.extend({\n name: NAME_INPUT_GROUP_ADDON,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n var append = props.append;\n return h(props.tag, mergeData(data, {\n class: {\n 'input-group-append': append,\n 'input-group-prepend': !append\n },\n attrs: {\n id: props.id\n }\n }), props.isText ? [h(BInputGroupText, children)] : children);\n }\n});","import { ref, nextTick } from '@vue/composition-api'\r\n\r\n// ===========================================================\r\n// ! This is coupled with \"veeValidate\" plugin\r\n// ===========================================================\r\n\r\nexport default function formValidation(resetFormData, clearFormData = () => {}) {\r\n // ------------------------------------------------\r\n // refFormObserver\r\n // ! This is for veeValidate Observer\r\n // * Used for veeValidate form observer\r\n // ------------------------------------------------\r\n const refFormObserver = ref(null)\r\n\r\n // ------------------------------------------------\r\n // resetObserver\r\n // ! This function is coupled with veeValidate\r\n // * It resets form observer\r\n // ------------------------------------------------\r\n const resetObserver = () => {\r\n refFormObserver.value.reset()\r\n }\r\n\r\n // ------------------------------------------------\r\n // getValidationState\r\n // ! This function is coupled with veeValidate\r\n // * It returns true/false based on validation\r\n // ------------------------------------------------\r\n // eslint-disable-next-line object-curly-newline\r\n const getValidationState = ({ dirty, validated, required: fieldRequired, changed, valid = null }) => {\r\n const result = dirty || validated ? valid : null\r\n return !fieldRequired && !changed ? null : result\r\n }\r\n\r\n // ------------------------------------------------\r\n // resetForm\r\n // ! This function is coupled with veeValidate\r\n // * This uses resetFormData arg to reset form data\r\n // ------------------------------------------------\r\n const resetForm = () => {\r\n resetFormData()\r\n nextTick(() => {\r\n resetObserver()\r\n })\r\n }\r\n\r\n // ------------------------------------------------\r\n // clearForm\r\n // ! This function is coupled with veeValidate\r\n // * This uses clearFormData arg to reset form data\r\n // ------------------------------------------------\r\n const clearForm = () => {\r\n clearFormData()\r\n nextTick(() => {\r\n resetObserver()\r\n })\r\n }\r\n\r\n return {\r\n refFormObserver,\r\n resetObserver,\r\n getValidationState,\r\n resetForm,\r\n clearForm,\r\n }\r\n}\r\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Filters.vue?vue&type=style&index=0&lang=scss&\"","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","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, mergeData } from '../../vue';\nimport { NAME_INPUT_GROUP } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_APPEND, SLOT_NAME_DEFAULT, SLOT_NAME_PREPEND } from '../../constants/slots';\nimport { htmlOrText } from '../../utils/html';\nimport { hasNormalizedSlot, normalizeSlot } from '../../utils/normalize-slot';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { BInputGroupAppend } from './input-group-append';\nimport { BInputGroupPrepend } from './input-group-prepend';\nimport { BInputGroupText } from './input-group-text'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n append: makeProp(PROP_TYPE_STRING),\n appendHtml: makeProp(PROP_TYPE_STRING),\n id: makeProp(PROP_TYPE_STRING),\n prepend: makeProp(PROP_TYPE_STRING),\n prependHtml: makeProp(PROP_TYPE_STRING),\n size: makeProp(PROP_TYPE_STRING),\n tag: makeProp(PROP_TYPE_STRING, 'div')\n}, NAME_INPUT_GROUP); // --- Main component ---\n// @vue/component\n\nexport var BInputGroup = /*#__PURE__*/Vue.extend({\n name: NAME_INPUT_GROUP,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n slots = _ref.slots,\n scopedSlots = _ref.scopedSlots;\n var prepend = props.prepend,\n prependHtml = props.prependHtml,\n append = props.append,\n appendHtml = props.appendHtml,\n size = props.size;\n var $scopedSlots = scopedSlots || {};\n var $slots = slots();\n var slotScope = {};\n var $prepend = h();\n var hasPrependSlot = hasNormalizedSlot(SLOT_NAME_PREPEND, $scopedSlots, $slots);\n\n if (hasPrependSlot || prepend || prependHtml) {\n $prepend = h(BInputGroupPrepend, [hasPrependSlot ? normalizeSlot(SLOT_NAME_PREPEND, slotScope, $scopedSlots, $slots) : h(BInputGroupText, {\n domProps: htmlOrText(prependHtml, prepend)\n })]);\n }\n\n var $append = h();\n var hasAppendSlot = hasNormalizedSlot(SLOT_NAME_APPEND, $scopedSlots, $slots);\n\n if (hasAppendSlot || append || appendHtml) {\n $append = h(BInputGroupAppend, [hasAppendSlot ? normalizeSlot(SLOT_NAME_APPEND, slotScope, $scopedSlots, $slots) : h(BInputGroupText, {\n domProps: htmlOrText(appendHtml, append)\n })]);\n }\n\n return h(props.tag, mergeData(data, {\n staticClass: 'input-group',\n class: _defineProperty({}, \"input-group-\".concat(size), size),\n attrs: {\n id: props.id || null,\n role: 'group'\n }\n }), [$prepend, normalizeSlot(SLOT_NAME_DEFAULT, slotScope, $scopedSlots, $slots), $append]);\n }\n});","export var HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n];\nexport var defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n};\n","export var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n};\nexport default english;\n","export var pad = function (number, length) {\n if (length === void 0) { length = 2; }\n return (\"000\" + number).slice(length * -1);\n};\nexport var int = function (bool) { return (bool === true ? 1 : 0); };\nexport function debounce(fn, wait) {\n var t;\n return function () {\n var _this = this;\n var args = arguments;\n clearTimeout(t);\n t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n };\n}\nexport var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n};\n","export function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n}\nexport function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n}\nexport function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n}\nexport function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n}\n","import { int, pad } from \"../utils\";\nvar doNothing = function () { return undefined; };\nexport var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\nexport var revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n};\nexport var tokenRegex = {\n D: \"\",\n F: \"\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n};\nexport var formats = {\n Z: function (date) { return date.toISOString(); },\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n H: function (date) { return pad(date.getHours()); },\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: function (date) { return pad(date.getSeconds()); },\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: function (date) { return pad(date.getFullYear(), 4); },\n d: function (date) { return pad(date.getDate()); },\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n i: function (date) { return pad(date.getMinutes()); },\n j: function (date) { return date.getDate(); },\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function (date) { return pad(date.getMonth() + 1); },\n n: function (date) { return date.getMonth() + 1; },\n s: function (date) { return date.getSeconds(); },\n u: function (date) { return date.getTime(); },\n w: function (date) { return date.getDay(); },\n y: function (date) { return String(date.getFullYear()).substring(2); },\n};\n","import { tokenRegex, revFormat, formats, } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\"\n ? formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n};\nexport var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (config && config.parseDate) {\n parsedDate = config.parseDate(date, format);\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr)) {\n parsedDate = new Date(date);\n }\n else {\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (tokenRegex[token] && !escaped) {\n regexStr += tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n }\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n};\nexport function compareDates(date1, date2, timeless) {\n if (timeless === void 0) { timeless = true; }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n}\nexport var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n return hours * 3600 + minutes * 60 + seconds;\n};\nexport var parseSeconds = function (secondsSinceMidnight) {\n var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n};\nexport var duration = {\n DAY: 86400000,\n};\nexport function getDefaultHours(config) {\n var hours = config.defaultHour;\n var minutes = config.defaultMinute;\n var seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n var minHour = config.minDate.getHours();\n var minMinutes = config.minDate.getMinutes();\n var minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n var maxHr = config.maxDate.getHours();\n var maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours: hours, minutes: minutes, seconds: seconds };\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { defaults as defaultOptions, HOOKS, } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget, } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, calculateSecondsSinceMidnight, parseSeconds, } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nvar DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign(__assign({}, defaultOptions), flatpickr.defaultConfig),\n l10n: English,\n };\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self.onMouseOver = onMouseOver;\n self._createElement = createElement;\n self.createDay = createDay;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.updateValue = updateValue;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) { month = self.currentMonth; }\n if (yr === void 0) { yr = self.currentYear; }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function getClosestActiveElement() {\n var _a;\n return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n .activeElement || document.activeElement);\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n var defaultDate = self.config.minDate === undefined ||\n compareDates(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n var defaults = getDefaultHours(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (self.config.maxTime !== undefined &&\n self.config.minTime !== undefined &&\n self.config.minTime > self.config.maxTime) {\n var minBound = calculateSecondsSinceMidnight(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n var maxBound = calculateSecondsSinceMidnight(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n var currentTime = calculateSecondsSinceMidnight(hours, minutes, seconds);\n if (currentTime > maxBound && currentTime < minBound) {\n var result = parseSeconds(minBound);\n hours = result[0];\n minutes = result[1];\n seconds = result[2];\n }\n }\n else {\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date && date instanceof Date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = pad(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = pad(seconds);\n }\n function onYearInput(event) {\n var eventTarget = getEventTarget(event);\n var year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: function () { return element.removeEventListener(event, handler, options); },\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver(getEventTarget(e));\n });\n bind(self._input, \"keydown\", onKeyDown);\n if (self.calendarContainer !== undefined) {\n bind(self.calendarContainer, \"keydown\", onKeyDown);\n }\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return getEventTarget(e).select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", function (e) {\n updateTime(e);\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n var eventTarget = getEventTarget(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n var target = e && getEventTarget(e);\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, _dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n i % 7 === 6) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var activeElement = getClosestActiveElement();\n var dayFocused = isInView(activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n clearNode(self.daysContainer);\n if (self.weekNumbers)\n clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = getEventTarget(e);\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement,\n };\n }\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n var defaults = getDefaultHours(self.config);\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n else\n clearNode(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers,\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) { isOffset = true; }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n if (toInitial === void 0) { toInitial = true; }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.config.allowInput) {\n self.setDate(self._input.value, false, self.config.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1)\n self.clear(false);\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n var _a;\n if (timeless === void 0) { timeless = true; }\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n var isInput = e.target === self._input;\n var valueChanged = self._input.value.trimEnd() !== getDateStr();\n if (isInput &&\n valueChanged &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n var eventTarget = getEventTarget(e);\n var isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n self.close();\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n var activeElement = getClosestActiveElement();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (activeElement && isInView(activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(eventTarget);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem, cellClass) {\n if (cellClass === void 0) { cellClass = \"flatpickr-day\"; }\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(cellClass) ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n hoverableCells.forEach(function (dayElem) {\n var date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return;\n }\n else if (containsDisabled && !outOfRange)\n return;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n isBetween(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n });\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) { positionElement = self._positionElement; }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n var eventTarget = getEventTarget(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n },\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\"),\n });\n var minMaxTimeSetter = function (type) { return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n }; };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset + inputBounds.left;\n var isCenter = false;\n var isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n var right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n var editableSheet = null;\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (!sheet.cssRules)\n continue;\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = findParent(getEventTarget(e), isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n positionElement: [updatePositionElement],\n clickOpens: [\n function () {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (HOOKS.indexOf(option) > -1)\n self.config[option] = arrayify(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) { triggerChange = false; }\n if (format === void 0) { format = self.config.dateFormat; }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter(function (x) { return x; });\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n updatePositionElement();\n }\n function updatePositionElement() {\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n var selectedDate = self.selectedDates[i];\n if (selectedDate instanceof Date &&\n compareDates(selectedDate, date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (compareDates(date, self.selectedDates[0]) >= 0 &&\n compareDates(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(specificFormat) {\n var format = specificFormat ||\n (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange) {\n if (triggerChange === void 0) { triggerChange = true; }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var eventTarget = getEventTarget(e);\n var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n var isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", eventTarget = getEventTarget(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n int(!isHourElem) +\n (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = pad(newValue);\n }\n }\n init();\n return self;\n}\nfunction _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\nvar flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n en: __assign({}, English),\n default: __assign({}, English),\n};\nflatpickr.localize = function (l10n) {\n flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n}\nexport default flatpickr;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/* eslint-disable */\r\nimport BaseService from \"../../BaseService\";\r\n\r\nconst { http } = BaseService();\r\n\r\n// API\r\n\r\nexport function GetAll() {\r\n return http({\r\n url: \"UnitRole/get\",\r\n method: \"get\",\r\n });\r\n}\r\n\r\nexport function GetByCurrentUser() {\r\n return http({\r\n url: \"UnitRole/GetByCurrentUser\",\r\n method: \"get\",\r\n });\r\n}\r\n\r\nexport function GetById(data) {\r\n return http({\r\n url: \"UnitRole/get-by-id/\" + data,\r\n method: \"get\",\r\n });\r\n}\r\n\r\nexport function RolesCreate(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"UnitRole/Create\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function RolesUpdate(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"UnitRole/Update\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\nexport function UpdateAction(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"UnitRole/update-action\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function RolesDelete(postdata) {\r\n // const data = { ...postdata };\r\n return http({\r\n url: \"UnitRole/Delete/\" + postdata,\r\n method: \"post\",\r\n });\r\n}\r\n\r\n/////////////////////////////////////////////\r\n","\"use strict\";\nif (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n}\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\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, mergeData } from '../../vue';\nimport { NAME_MEDIA_ASIDE } from '../../constants/components';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n right: makeProp(PROP_TYPE_BOOLEAN, false),\n tag: makeProp(PROP_TYPE_STRING, 'div'),\n verticalAlign: makeProp(PROP_TYPE_STRING, 'top')\n}, NAME_MEDIA_ASIDE); // --- Main component ---\n// @vue/component\n\nexport var BMediaAside = /*#__PURE__*/Vue.extend({\n name: NAME_MEDIA_ASIDE,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n var verticalAlign = props.verticalAlign;\n var align = verticalAlign === 'top' ? 'start' : verticalAlign === 'bottom' ? 'end' :\n /* istanbul ignore next */\n verticalAlign;\n return h(props.tag, mergeData(data, {\n staticClass: 'media-aside',\n class: _defineProperty({\n 'media-aside-right': props.right\n }, \"align-self-\".concat(align), align)\n }), children);\n }\n});","/* eslint-disable */\r\nimport { initialAbility } from \"@/libs/acl/config\";\r\nimport BaseService from \"../../BaseService\";\r\n\r\nconst { http } = BaseService();\r\n\r\n// API\r\n\r\nexport function DonViGetList(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"DonVi/get-list-dv-by-id\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function GetTreeDVSD(id) {\r\n // const data = { ...postdata };\r\n return http({\r\n url: \"DonVi/get-don-vi-su-dung/\" + id,\r\n method: \"get\",\r\n });\r\n}\r\n\r\nexport function GetTree() {\r\n // const data = { ...postdata };\r\n return http({\r\n url: \"DonVi/GetTree\",\r\n method: \"get\",\r\n });\r\n}\r\n\r\nexport function GetTreeAll() {\r\n // const data = { ...postdata };\r\n return http({\r\n url: \"DonVi/GetTreeAll\",\r\n method: \"get\",\r\n });\r\n}\r\n\r\nexport function GetTreeUserDonVi() {\r\n // const data = { ...postdata };\r\n return http({\r\n url: \"DonVi/GetTreeExceptUserDonVi\",\r\n method: \"get\",\r\n });\r\n}\r\n\r\nexport function GetById(data) {\r\n return http({\r\n url: \"DonVi/get-by-id/\" + data,\r\n method: \"get\",\r\n });\r\n}\r\n\r\nexport function DonViCreate(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"DonVi/Create\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function DonViUpdate(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"DonVi/Update\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\nexport function DonViDelete(postdata) {\r\n const data = { ...postdata };\r\n return http({\r\n url: \"DonVi/Delete\",\r\n method: \"post\",\r\n data,\r\n });\r\n}\r\n\r\n////////////////////////////////////////\r\n","import { Vue, mergeData } from '../../vue';\nimport { NAME_MEDIA_BODY } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n tag: makeProp(PROP_TYPE_STRING, 'div')\n}, NAME_MEDIA_BODY); // --- Main component ---\n// @vue/component\n\nexport var BMediaBody = /*#__PURE__*/Vue.extend({\n name: NAME_MEDIA_BODY,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n return h(props.tag, mergeData(data, {\n staticClass: 'media-body'\n }), children);\n }\n});","import { makeModelMixin } from '../utils/model';\n\nvar _makeModelMixin = makeModelMixin('value'),\n mixin = _makeModelMixin.mixin,\n props = _makeModelMixin.props,\n prop = _makeModelMixin.prop,\n event = _makeModelMixin.event;\n\nexport { mixin as modelMixin, props, prop as MODEL_PROP_NAME, event as MODEL_EVENT_NAME };","import { Vue } from '../vue';\nimport { PROP_TYPE_ARRAY_OBJECT, PROP_TYPE_STRING } from '../constants/props';\nimport { get } from '../utils/get';\nimport { stripTags } from '../utils/html';\nimport { isArray, isPlainObject, isUndefined } from '../utils/inspect';\nimport { keys } from '../utils/object';\nimport { makeProp, makePropsConfigurable } from '../utils/props';\nimport { warn } from '../utils/warn'; // --- Constants ---\n\nvar OPTIONS_OBJECT_DEPRECATED_MSG = 'Setting prop \"options\" to an object is deprecated. Use the array format instead.'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n disabledField: makeProp(PROP_TYPE_STRING, 'disabled'),\n htmlField: makeProp(PROP_TYPE_STRING, 'html'),\n options: makeProp(PROP_TYPE_ARRAY_OBJECT, []),\n textField: makeProp(PROP_TYPE_STRING, 'text'),\n valueField: makeProp(PROP_TYPE_STRING, 'value')\n}, 'formOptionControls'); // --- Mixin ---\n// @vue/component\n\nexport var formOptionsMixin = Vue.extend({\n props: props,\n computed: {\n formOptions: function formOptions() {\n return this.normalizeOptions(this.options);\n }\n },\n methods: {\n normalizeOption: function normalizeOption(option) {\n var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n // When the option is an object, normalize it\n if (isPlainObject(option)) {\n var value = get(option, this.valueField);\n var text = get(option, this.textField);\n return {\n value: isUndefined(value) ? key || text : value,\n text: stripTags(String(isUndefined(text) ? key : text)),\n html: get(option, this.htmlField),\n disabled: Boolean(get(option, this.disabledField))\n };\n } // Otherwise create an `