`\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 `
` (from caption mixin)\n $content.push(renderCaption ? renderCaption() : null); // Build the ``\n\n $content.push(renderColgroup ? renderColgroup() : null); // Build the ``\n\n $content.push(renderThead ? renderThead() : null); // Build the ``\n\n $content.push(renderTbody ? renderTbody() : null); // Build the ``\n\n $content.push(renderTfoot ? renderTfoot() : null);\n } // Assemble ``\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});","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-card',[_c('b-row',[_c('b-col',{attrs:{\"sm\":\"3\"}},[_c('date-input',{attrs:{\"id\":\"xparam2\",\"name\":\"xparam2\",\"value\":_vm.xparam2,\"label\":\"Период: с\",\"api\":\"\",\"subtract\":\"-1 month\",\"rules\":\"\"},on:{\"update:value\":function($event){_vm.xparam2=$event}}})],1),_c('b-col',{attrs:{\"sm\":\"3\"}},[_c('date-input',{attrs:{\"id\":\"xparam3\",\"name\":\"xparam3\",\"value\":_vm.xparam3,\"label\":\"по\",\"api\":\"\",\"subtract\":\"\",\"rules\":\"\"},on:{\"update:value\":function($event){_vm.xparam3=$event}}})],1),_c('b-col',[_c('div',{staticClass:\"d-flex justify-content-end pt-2\"},[_c('div',[_c('refresh-button',{attrs:{\"label\":\"Обновить\",\"refresh\":_vm.refresh,\"variant\":\"outline-primary\"},on:{\"update:refresh\":function($event){_vm.refresh=$event}}})],1)])]),_c('b-col',{attrs:{\"sm\":\"12\"}},[_c('basic-table',{attrs:{\"columns\":[{\"key\":\"refer\",\"label\":\"\\u041e\\u0442\\u043a\\u0443\\u0434\\u0430\",\"sortable\":false,\"thClass\":\"text-center\",\"expand\":{\"tabs\":[{\"title\":\"\\u0420\\u0435\\u0433\\u0438\\u0441\\u0442\\u0440\\u0430\\u0446\\u0438\\u0438\",\"content\":\"table\",\"api\":\"https:\\/\\/api.hoglabest.com\\/api\\/v1\\/json\\/lk\\/refer\\/link\\/xgrid\\/buyer\",\"hidePagination\":true,\"columns\":[{\"key\":\"buyerC\",\"sortable\":false,\"label\":\"\\u041d\\u043e\\u043c\\u0435\\u0440\",\"thClass\":\"text-center\",\"tdClass\":\"text-right\"},{\"key\":\"FIO\",\"sortable\":false,\"label\":\"\\u0424\\u0418\\u041e\",\"thClass\":\"text-center\"},{\"key\":\"date\",\"sortable\":false,\"label\":\"\\u0414\\u0430\\u0442\\u0430 \\u0440\\u0435\\u0433.\",\"thClass\":\"text-center\",\"tdClass\":\"text-center\"},{\"key\":\"town_name\",\"sortable\":false,\"label\":\"\\u0413\\u043e\\u0440\\u043e\\u0434\",\"thClass\":\"text-center\"},{\"key\":\"inpt_name\",\"sortable\":false,\"label\":\"\\u0412\\u0445\\u043e\\u0434\",\"thClass\":\"text-center\"}]},{\"title\":\"\\u0417\\u0430\\u043a\\u0430\\u0437\\u044b\",\"content\":\"table\",\"api\":\"https:\\/\\/api.hoglabest.com\\/api\\/v1\\/json\\/lk\\/refer\\/link\\/grid\\/inv\",\"hidePagination\":true,\"columns\":[{\"key\":\"id\",\"sortable\":false,\"label\":\"\\u2116\",\"thClass\":\"text-center\",\"tdClass\":\"text-right\"},{\"key\":\"date\",\"sortable\":false,\"label\":\"\\u0414\\u0430\\u0442\\u0430\",\"thClass\":\"text-center\",\"tdClass\":\"text-center\"},{\"key\":\"FIO\",\"sortable\":false,\"label\":\"\\u0424\\u0418\\u041e\",\"thClass\":\"text-center\"},{\"key\":\"sumBall\",\"sortable\":false,\"label\":\"\\u0421\\u0443\\u043c\\u043c\\u0430, \\u0431\\u0430\\u043b\",\"thClass\":\"text-center\",\"tdClass\":\"text-right\"},{\"key\":\"status\",\"sortable\":false,\"label\":\"\\u0421\\u0442\\u0430\\u0442\\u0443\\u0441\",\"thClass\":\"text-center\"}]}]}},{\"key\":\"domain_name\",\"label\":\"\\u041a\\u0443\\u0434\\u0430\",\"sortable\":false,\"thClass\":\"text-center\"},{\"key\":\"sType\",\"label\":\"\\u0422\\u0438\\u043f\",\"sortable\":false,\"thClass\":\"text-center\"},{\"key\":\"lastDate\",\"label\":\"\\u041c\\u0430\\u043a\\u0441. \\u0434\\u0430\\u0442\\u0430\",\"sortable\":false,\"thClass\":\"text-center\",\"tdClass\":\"text-center\"},{\"key\":\"cntAll\",\"label\":\"\\u041a\\u043e\\u043b-\\u0432\\u043e \\u043f\\u0440\\u043e\\u0441\\u043c\\u043e\\u0442\\u0440\\u043e\\u0432\",\"sortable\":false,\"thClass\":\"text-center\",\"tdClass\":\"text-right\"},{\"key\":\"cntUser\",\"label\":\"\\u041a\\u043e\\u043b-\\u0432\\u043e \\u0432\\u0438\\u0437\\u0438\\u0442\\u043e\\u0432\",\"sortable\":false,\"thClass\":\"text-center\",\"tdClass\":\"text-right\"},{\"key\":\"cntReg\",\"label\":\"\\u041a\\u043e\\u043b-\\u0432\\u043e \\u0440\\u0435\\u0433\\u0438\\u0441\\u0442\\u0440\\u0430\\u0446\\u0438\\u0439\",\"sortable\":false,\"thClass\":\"text-center\",\"tdClass\":\"text-right\"},{\"key\":\"cntOrder\",\"label\":\"\\u041a\\u043e\\u043b-\\u0432\\u043e \\u0437\\u0430\\u043a\\u0430\\u0437\\u043e\\u0432\",\"sortable\":false,\"thClass\":\"text-center\",\"tdClass\":\"text-right\"}],\"refresh\":_vm.refresh,\"xparam2\":_vm.xparam2,\"xparam3\":_vm.xparam3,\"api\":\"https://api.hoglabest.com/api/v1/json/lk/refer/link/grid\"}})],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"," \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n ","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./NavigationReport.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./NavigationReport.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./NavigationReport.vue?vue&type=template&id=c22bde0c&\"\nimport script from \"./NavigationReport.vue?vue&type=script&lang=js&\"\nexport * from \"./NavigationReport.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/@vue/cli-service/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","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});","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./DateInput.vue?vue&type=style&index=0&lang=scss&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"responsive relative\"},[_c('b-overlay',{attrs:{\"show\":_vm.loading,\"no-wrap\":\"\",\"variant\":_vm.$store.state.appConfig.layout.skin === 'dark' ? 'black' : 'white'}}),_c('b-table',{ref:\"refBasicTable\",attrs:{\"items\":_vm.gridData || [],\"fields\":_vm.columns,\"sort-by\":_vm.sortBy,\"sort-desc\":_vm.isSortDirDesc,\"no-local-sorting\":\"\",\"show-empty\":\"\"},on:{\"update:sortBy\":function($event){_vm.sortBy=$event},\"update:sort-by\":function($event){_vm.sortBy=$event},\"update:sortDesc\":function($event){_vm.isSortDirDesc=$event},\"update:sort-desc\":function($event){_vm.isSortDirDesc=$event}},scopedSlots:_vm._u([{key:\"empty\",fn:function(){return [_c('div',{staticClass:\"text-center\"},[_vm._v(\" Нет данных \")])]},proxy:true},{key:\"cell(id)\",fn:function(data){return [_c('div',[(data.field.expand)?_c('div',{staticClass:\"d-flex align-items-center\"},[_c('BButton',{staticClass:\"mr-2 btn-icon rounded-circle\",attrs:{\"variant\":\"flat-primary\",\"size\":\"sm\"},on:{\"click\":function($event){return _vm.rowClicked(data.item)}}},[_c('feather-icon',{class:{ rotate: data.item._showDetails },attrs:{\"icon\":\"ChevronRightIcon\"}})],1),_c('span',[_vm._v(\" \"+_vm._s(data.item.id)+\" \")])],1):_c('div',[_c('span',[_vm._v(\" \"+_vm._s(data.item.id)+\" \")])])])]}},{key:\"cell(refer)\",fn:function(data){return [_c('div',[(data.field.expand)?_c('div',{staticClass:\"d-flex align-items-center\"},[_c('BButton',{staticClass:\"mr-2 btn-icon rounded-circle\",attrs:{\"variant\":\"flat-primary\",\"size\":\"sm\"},on:{\"click\":function($event){return _vm.rowClicked(data.item)}}},[_c('feather-icon',{class:{ rotate: data.item._showDetails },attrs:{\"icon\":\"ChevronRightIcon\"}})],1),_c('span',[_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.refer)}})])],1):_c('span',[_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.refer)}})])])]}},{key:\"row-details\",fn:function(row){return [_c('b-card',{staticClass:\"mb-0\",attrs:{\"no-body\":\"\"}},[(row.fields[0] && row.fields[0].expand && row.fields[0].expand.tabs)?_c('b-tabs',{attrs:{\"content\":\"\"}},_vm._l((row.fields[0].expand.tabs),function(tab,key){return _c('b-tab',{key:key,attrs:{\"active\":key === 0},scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_c('span',{staticClass:\"d-none d-sm-inline\"},[_vm._v(_vm._s(tab.title))])]},proxy:true}],null,true)},[(tab.content === 'table')?_c('inner-table',{attrs:{\"items\":[],\"columns\":tab.columns,\"api\":tab.api,\"api-id\":row.item.id,\"hide-pagination\":tab.hidePagination}}):_vm._e(),(tab.content === 'html')?_c('div',{staticClass:\"p-1\"},[_c('html-content',{attrs:{\"api\":tab.api,\"api-id\":row.item.id}})],1):_vm._e()],1)}),1):_vm._e()],1)]}},{key:\"cell(FIO)\",fn:function(data){return [_c('div',[(data.field.expand)?_c('div',{staticClass:\"d-flex align-items-center\"},[_c('BButton',{staticClass:\"mr-2 btn-icon rounded-circle\",attrs:{\"variant\":\"flat-primary\",\"size\":\"sm\"},on:{\"click\":function($event){return _vm.rowClicked(data.item)}}},[_c('feather-icon',{class:{ rotate: data.item._showDetails },attrs:{\"icon\":\"ChevronRightIcon\"}})],1),_c('div',[(data.item.avatar)?_c('b-media',{attrs:{\"vertical-align\":\"center\"},scopedSlots:_vm._u([{key:\"aside\",fn:function(){return [_c('b-avatar',{attrs:{\"size\":\"32\",\"src\":data.item.avatar.src && (\"\" + (_vm.server + data.item.avatar.src)),\"text\":_vm.avatarText(data.item.FIO.replace(/[0-9]/g, '')),\"variant\":data.item.avatar.color}})]},proxy:true}],null,true)},[_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.FIO)}})]):_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.FIO)}})],1)],1):_c('div',[(data.item.avatar)?_c('b-media',{attrs:{\"vertical-align\":\"center\"},scopedSlots:_vm._u([{key:\"aside\",fn:function(){return [_c('b-avatar',{attrs:{\"size\":\"32\",\"src\":data.item.avatar.src && (\"\" + (_vm.server + data.item.avatar.src)),\"text\":_vm.avatarText(data.item.FIO.replace(/[0-9]/g, '')),\"variant\":data.item.avatar.color}})]},proxy:true}],null,true)},[_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.FIO)}})]):_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.FIO)}})],1)])]}},{key:\"cell(inv_Date)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.inv_Date)}})]}},{key:\"cell(h_date)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.h_date)}})]}},{key:\"cell(Payment)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.Payment)}})]}},{key:\"cell(inpt_name)\",fn:function(data){return [_c('span',{staticClass:\"d-inline-flex align-items-center\",domProps:{\"innerHTML\":_vm._s(data.item.inpt_name)}})]}},{key:\"cell(Status)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.Status)}})]}},{key:\"cell(bp_sType)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.bp_sType)}})]}},{key:\"cell(status)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.status)}})]}},{key:\"cell(BB_sType)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.BB_sType)}})]}},{key:\"cell(Descr)\",fn:function(data){return [_c('div',{domProps:{\"innerHTML\":_vm._s(data.item.Descr)}})]}},{key:\"cell(bp_Comment)\",fn:function(data){return [_c('div',{domProps:{\"innerHTML\":_vm._s(data.item.bp_Comment)}})]}},{key:\"cell(BB_Comment)\",fn:function(data){return [_c('div',{domProps:{\"innerHTML\":_vm._s(data.item.BB_Comment)}})]}},{key:\"cell(h_Descr)\",fn:function(data){return [_c('div',{domProps:{\"innerHTML\":_vm._s(data.item.h_Descr)}})]}},{key:\"cell(BB_icon)\",fn:function(data){return [_c('b-button',{directives:[{name:\"b-tooltip\",rawName:\"v-b-tooltip.hover.v-primary\",modifiers:{\"hover\":true,\"v-primary\":true}}],attrs:{\"title\":data.item.BB_hint,\"variant\":\"flat-info\"}},[_c('i',{class:data.item.BB_icon})])]}},{key:\"cell(bp_icon)\",fn:function(data){return [_c('b-button',{directives:[{name:\"b-tooltip\",rawName:\"v-b-tooltip.hover.v-primary\",modifiers:{\"hover\":true,\"v-primary\":true}}],attrs:{\"title\":data.item.bp_hint,\"variant\":\"flat-info\"}},[_c('i',{class:data.item.bp_icon})])]}},{key:\"cell(actions)\",fn:function(data){return [(data.field.actions && data.field.actions.length)?_c('b-dropdown',{attrs:{\"variant\":\"link\",\"no-caret\":\"\",\"right\":_vm.$store.state.appConfig.isRTL},scopedSlots:_vm._u([{key:\"button-content\",fn:function(){return [_c('feather-icon',{staticClass:\"align-middle text-body\",attrs:{\"icon\":\"MoreVerticalIcon\",\"size\":\"16\"}})]},proxy:true}],null,true)},_vm._l((data.field.actions),function(action,key){return _c('div',{key:key},[((!data.item.Actions || !action.name) || (data.item.Actions && data.item.Actions.indexOf(action.name) > -1))?_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.execAction(Object.assign({}, action, {apiId: data.item.id}))}}},[_c('feather-icon',{attrs:{\"icon\":action.icon}}),_c('span',{staticClass:\"align-middle ml-50\"},[_vm._v(_vm._s(action.label.replace('{id}', data.item.id)))])],1):_vm._e()],1)}),0):_vm._e()]}}])})],1),(!_vm.hidePagination)?_c('b-row',{staticClass:\"mt-2\"},[_c('b-col',{staticClass:\"d-flex align-items-center justify-content-center justify-content-sm-start\",attrs:{\"cols\":\"12\",\"sm\":\"6\"}},[_c('span',{staticClass:\"text-muted\"},[_vm._v(_vm._s(_vm.dataMeta.from)+\" - \"+_vm._s(_vm.dataMeta.to)+\" \"+_vm._s(_vm.$t('of'))+\" \"+_vm._s(_vm.dataMeta.of))])]),_c('b-col',{staticClass:\"d-flex align-items-center justify-content-center justify-content-sm-end\",attrs:{\"cols\":\"12\",\"sm\":\"6\"}},[_c('b-pagination',{staticClass:\"mb-0 mt-1 mt-sm-0\",attrs:{\"total-rows\":_vm.total,\"per-page\":_vm.perPage,\"first-number\":\"\",\"last-number\":\"\",\"prev-class\":\"prev-item\",\"next-class\":\"next-item\"},scopedSlots:_vm._u([{key:\"prev-text\",fn:function(){return [_c('feather-icon',{attrs:{\"icon\":\"ChevronLeftIcon\",\"size\":\"18\"}})]},proxy:true},{key:\"next-text\",fn:function(){return [_c('feather-icon',{attrs:{\"icon\":\"ChevronRightIcon\",\"size\":\"18\"}})]},proxy:true}],null,false,1308952388),model:{value:(_vm.currentPage),callback:function ($$v) {_vm.currentPage=$$v},expression:\"currentPage\"}})],1)],1):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import axios from '@axios'\n\nexport default {\n namespaced: true,\n state: {},\n getters: {},\n mutations: {},\n actions: {\n // eslint-disable-next-line\n async fetchData(context, payload) {\n const url = payload.apiId ? `${payload.api}/${payload.apiId}` : payload.api\n\n return axios.get(url, {\n params: payload.params,\n })\n },\n /* eslint-disable */\n async execAction(context, payload) {\n const url = payload.apiId ? `${payload.api}/${payload.apiId}` : payload.api\n\n if (payload.alert) {\n // eslint-disable-next-line no-underscore-dangle\n return this._vm.$swal({\n text: `${payload.label.replace('{id}', payload.apiId)}?`,\n icon: 'question',\n showCancelButton: true,\n confirmButtonText: 'Да',\n cancelButtonText: 'Нет',\n customClass: {\n confirmButton: 'btn btn-primary',\n cancelButton: 'btn btn-outline-danger ml-1',\n },\n buttonsStyling: false,\n showLoaderOnConfirm: true,\n preConfirm() {\n return axios.get(url, {\n params: payload.params,\n })\n .then(res => res)\n .catch(err => err.response)\n },\n }).then(result => {\n if (result.isConfirmed) {\n const { data, success } = result.value.data\n if (success) {\n // eslint-disable-next-line no-underscore-dangle\n return this._vm.$swal({\n icon: 'success',\n text: 'Операция успешно выполнена!',\n customClass: {\n confirmButton: 'btn btn-success',\n },\n }).then(() => true)\n } else {\n // eslint-disable-next-line no-underscore-dangle\n return this._vm.$swal({\n icon: 'error',\n text: data.msg,\n customClass: {\n confirmButton: 'btn btn-primary',\n },\n }).then(() => false)\n }\n }\n })\n } else if (payload.name === 'Comment') {\n // eslint-disable-next-line no-underscore-dangle\n return this._vm.$swal({\n text: payload.label.replace('{id}', payload.apiId),\n icon: 'question',\n input: 'textarea',\n inputPlaceholder: 'Текст сообщения',\n showCancelButton: true,\n confirmButtonText: 'Отправить',\n cancelButtonText: 'Отмена',\n customClass: {\n confirmButton: 'btn btn-primary',\n cancelButton: 'btn btn-outline-danger ml-1',\n input: 'mt-1',\n },\n buttonsStyling: false,\n showLoaderOnConfirm: true,\n preConfirm(message) {\n return axios.put(`${url}?xparam1=${message}&xparam2=1`)\n },\n }).then(result => {\n if (result.isConfirmed) {\n const { data, success } = result.value.data\n if (data) {\n if (!success) {\n // eslint-disable-next-line no-underscore-dangle\n return this._vm.$swal({\n icon: 'error',\n text: data.msg,\n customClass: {\n confirmButton: 'btn btn-primary',\n },\n }).then(() => false)\n } else {\n // eslint-disable-next-line no-underscore-dangle\n return this._vm.$swal({\n icon: 'success',\n text: data.msg,\n customClass: {\n confirmButton: 'btn btn-success',\n },\n }).then(() => true)\n }\n } else {\n // eslint-disable-next-line no-underscore-dangle\n this._vm.$swal({\n icon: 'error',\n text: 'Возникла непредвиденная ошибка. Попробуйте еще раз',\n customClass: {\n confirmButton: 'btn btn-primary',\n },\n }).then(() => false)\n }\n }\n })\n } else if (payload.name === 'Status') {\n const res = await axios.get('https://api.hoglabest.com/api/v1/json/cp/service/data/list/invStatusSet')\n // eslint-disable-next-line\n const { data, success } = res.data\n let options = ''\n if (success && data && data.length > 0) {\n data.forEach(item => {\n options += ``\n })\n }\n // eslint-disable-next-line no-underscore-dangle\n return this._vm.$swal({\n icon: 'question',\n html: ` ${payload.label.replace('{id}', payload.apiId)}? `\n + '',\n showCancelButton: true,\n confirmButtonText: 'Отправить',\n cancelButtonText: 'Отмена',\n customClass: {\n confirmButton: 'btn btn-primary',\n cancelButton: 'btn btn-outline-danger ml-1',\n },\n buttonsStyling: false,\n showLoaderOnConfirm: true,\n preConfirm() {\n const status = document.getElementById('select-status').value\n const msg = document.getElementById('select-msg').value\n return axios.put(`${url}?xparam1=${msg}&xparam2=${status}`)\n },\n }).then(result => {\n if (result.isConfirmed) {\n // eslint-disable-next-line\n const { data, success } = result.value.data\n if (data) {\n if (!success) {\n // eslint-disable-next-line no-underscore-dangle\n return this._vm.$swal({\n icon: 'error',\n text: data.msg,\n customClass: {\n confirmButton: 'btn btn-primary',\n },\n }).then(() => false)\n } else {\n // eslint-disable-next-line no-underscore-dangle\n return this._vm.$swal({\n icon: 'success',\n text: data.msg,\n customClass: {\n confirmButton: 'btn btn-success',\n },\n }).then(() => true)\n }\n } else {\n // eslint-disable-next-line no-underscore-dangle\n return this._vm.$swal({\n icon: 'error',\n text: 'Возникла непредвиденная ошибка. Попробуйте еще раз',\n customClass: {\n confirmButton: 'btn btn-primary',\n },\n }).then(() => false)\n }\n }\n\n return false\n })\n } else {\n return axios.get(url, {\n params: payload.params,\n })\n }\n },\n },\n}\n","import {\n ref, computed, watch, set,\n} from '@vue/composition-api'\nimport store from '@/store'\n\nexport default function useBasicTable(props) {\n const refBasicTable = ref(null)\n const gridData = ref(null)\n const loading = ref(false)\n const total = ref(0)\n const currentPage = ref(1)\n const perPage = ref(25)\n const perPageOptions = [10, 25, 50, 100]\n const searchQuery = ref('')\n const sortBy = ref('id')\n const isSortDirDesc = ref(true)\n\n const dataMeta = computed(() => {\n const localItemsCount = gridData.value ? gridData.value.length : 0\n return {\n from: perPage.value * (currentPage.value - 1) + (localItemsCount ? 1 : 0),\n to: perPage.value * (currentPage.value - 1) + localItemsCount,\n of: total.value,\n }\n })\n\n const fetchData = () => {\n loading.value = true\n // eslint-disable-next-line prefer-destructuring\n const xparam1 = props.xparam1\n // eslint-disable-next-line prefer-destructuring\n const xparam2 = props.xparam2\n // eslint-disable-next-line prefer-destructuring\n const xparam3 = props.xparam3\n // eslint-disable-next-line prefer-destructuring\n const xparam4 = props.xparam4\n // eslint-disable-next-line\n const id_buyer = props.id_buyer\n return store.dispatch('basic-table/fetchData', {\n api: props.api,\n apiId: props.apiId,\n params: {\n xparam1,\n xparam2,\n xparam3,\n xparam4,\n // eslint-disable-next-line\n id_buyer,\n sortby: sortBy.value,\n order: isSortDirDesc.value ? 'desc' : 'asc',\n zpage: currentPage.value,\n zstart: perPage.value * (currentPage.value - 1),\n zlimit: perPage.value,\n },\n })\n .then(response => {\n const { data } = response.data\n gridData.value = data.rows\n total.value = data.paging[0].total || 0\n loading.value = false\n perPage.value = data.paging[0].perPage || 25\n return response\n })\n .catch(err => {\n gridData.value = null\n total.value = 0\n loading.value = false\n return err\n })\n }\n\n const rowClicked = item => {\n // eslint-disable-next-line no-underscore-dangle\n if (!item._showDetails) {\n // eslint-disable-next-line no-underscore-dangle\n set(item, '_showDetails', !item._showDetails)\n } else {\n // eslint-disable-next-line no-underscore-dangle\n set(item, '_showDetails', !item._showDetails)\n }\n }\n\n const execAction = action => {\n store.dispatch('basic-table/execAction', {\n ...action,\n alert: action.alert === undefined || false,\n }).then(res => {\n if (res) {\n fetchData()\n }\n })\n }\n\n watch(() => props.apiId, () => {\n if (props.loadByTab === null || (props.currentTab === props.loadByTab)) {\n fetchData()\n }\n })\n\n watch(() => props.xparam1, () => {\n fetchData()\n })\n\n watch(() => props.xparam2, () => {\n fetchData()\n })\n\n watch(() => props.xparam3, () => {\n fetchData()\n })\n\n // eslint-disable-next-line\n watch(() => props.id_buyer, () => {\n if (props.loadByTab === null || (props.currentTab === props.loadByTab)) {\n fetchData()\n }\n })\n\n watch(() => props.currentTab, () => {\n if (props.currentTab === props.loadByTab) {\n fetchData()\n }\n })\n\n watch([currentPage, sortBy, isSortDirDesc], () => {\n fetchData()\n })\n\n watch(() => props.refresh, () => {\n if (props.refresh) {\n fetchData()\n }\n })\n\n return {\n refBasicTable,\n gridData,\n loading,\n total,\n currentPage,\n perPage,\n perPageOptions,\n searchQuery,\n sortBy,\n isSortDirDesc,\n dataMeta,\n\n fetchData,\n rowClicked,\n execAction,\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"responsive relative\"},[_c('b-overlay',{attrs:{\"show\":_vm.loading,\"no-wrap\":\"\",\"variant\":_vm.$store.state.appConfig.layout.skin === 'dark' ? 'black' : 'white'}}),_c('b-table',{ref:\"refBasicTable\",attrs:{\"items\":_vm.gridData || [],\"fields\":_vm.columns,\"show-empty\":\"\"},scopedSlots:_vm._u([{key:\"empty\",fn:function(){return [_c('div',{staticClass:\"text-center\"},[_vm._v(\" Нет данных \")])]},proxy:true},{key:\"cell(inv_Date)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.inv_Date)}})]}},{key:\"cell(h_date)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.h_date)}})]}},{key:\"cell(Payment)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.Payment)}})]}},{key:\"cell(inpt_name)\",fn:function(data){return [_c('span',{staticClass:\"d-inline-flex align-items-center\",domProps:{\"innerHTML\":_vm._s(data.item.inpt_name)}})]}},{key:\"cell(Status)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.Status)}})]}},{key:\"cell(bp_sType)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.bp_sType)}})]}},{key:\"cell(status)\",fn:function(data){return [_c('span',{domProps:{\"innerHTML\":_vm._s(data.item.status)}})]}},{key:\"cell(Descr)\",fn:function(data){return [_c('div',{domProps:{\"innerHTML\":_vm._s(data.item.Descr)}})]}},{key:\"cell(bp_Comment)\",fn:function(data){return [_c('div',{domProps:{\"innerHTML\":_vm._s(data.item.bp_Comment)}})]}},{key:\"cell(BB_Comment)\",fn:function(data){return [_c('div',{domProps:{\"innerHTML\":_vm._s(data.item.BB_Comment)}})]}},{key:\"cell(h_Descr)\",fn:function(data){return [_c('div',{domProps:{\"innerHTML\":_vm._s(data.item.h_Descr)}})]}},{key:\"cell(BB_icon)\",fn:function(data){return [_c('b-button',{directives:[{name:\"b-tooltip\",rawName:\"v-b-tooltip.hover.v-primary\",modifiers:{\"hover\":true,\"v-primary\":true}}],attrs:{\"title\":data.item.BB_hint,\"variant\":\"flat-info\"}},[_c('i',{class:data.item.BB_icon})])]}},{key:\"cell(bp_icon)\",fn:function(data){return [_c('b-button',{directives:[{name:\"b-tooltip\",rawName:\"v-b-tooltip.hover.v-primary\",modifiers:{\"hover\":true,\"v-primary\":true}}],attrs:{\"title\":data.item.bp_hint,\"variant\":\"flat-info\"}},[_c('i',{class:data.item.bp_icon})])]}},{key:\"cell(actions)\",fn:function(data){return [(data.field.actions && data.field.actions.length)?_c('b-dropdown',{attrs:{\"variant\":\"link\",\"no-caret\":\"\",\"right\":_vm.$store.state.appConfig.isRTL},scopedSlots:_vm._u([{key:\"button-content\",fn:function(){return [_c('feather-icon',{staticClass:\"align-middle text-body\",attrs:{\"icon\":\"MoreVerticalIcon\",\"size\":\"16\"}})]},proxy:true}],null,true)},_vm._l((data.field.actions),function(action,key){return _c('div',{key:key},[((!data.item.Actions || !action.name) || (data.item.Actions && data.item.Actions.indexOf(action.name) > -1))?_c('b-dropdown-item',{on:{\"click\":function($event){return _vm.execAction(Object.assign({}, action, {apiId: data.item.id}))}}},[_c('feather-icon',{attrs:{\"icon\":action.icon}}),_c('span',{staticClass:\"align-middle ml-50\"},[_vm._v(_vm._s(action.label.replace('{id}', data.item.id)))])],1):_vm._e()],1)}),0):_vm._e()]}}])})],1),(!_vm.hidePagination)?_c('b-row',{staticClass:\"mt-2\"},[_c('b-col',{staticClass:\"d-flex align-items-center justify-content-center justify-content-sm-start\",attrs:{\"cols\":\"12\",\"sm\":\"6\"}},[_c('span',{staticClass:\"text-muted\"},[_vm._v(_vm._s(_vm.dataMeta.from)+\" - \"+_vm._s(_vm.dataMeta.to)+\" \"+_vm._s(_vm.$t('of'))+\" \"+_vm._s(_vm.dataMeta.of))])]),_c('b-col',{staticClass:\"d-flex align-items-center justify-content-center justify-content-sm-end\",attrs:{\"cols\":\"12\",\"sm\":\"6\"}},[_c('b-pagination',{staticClass:\"mb-0 mt-1 mt-sm-0\",attrs:{\"total-rows\":_vm.total,\"per-page\":_vm.perPage,\"first-number\":\"\",\"last-number\":\"\",\"prev-class\":\"prev-item\",\"next-class\":\"next-item\"},scopedSlots:_vm._u([{key:\"prev-text\",fn:function(){return [_c('feather-icon',{attrs:{\"icon\":\"ChevronLeftIcon\",\"size\":\"18\"}})]},proxy:true},{key:\"next-text\",fn:function(){return [_c('feather-icon',{attrs:{\"icon\":\"ChevronRightIcon\",\"size\":\"18\"}})]},proxy:true}],null,false,1308952388),model:{value:(_vm.currentPage),callback:function ($$v) {_vm.currentPage=$$v},expression:\"currentPage\"}})],1)],1):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import {\n ref, computed, watch, set,\n} from '@vue/composition-api'\nimport store from '@/store'\n\nexport default function useBasicTable(props) {\n const refBasicTable = ref(null)\n const gridData = ref(null)\n const loading = ref(false)\n const total = ref(0)\n const currentPage = ref(1)\n const perPage = ref(25)\n const perPageOptions = [10, 25, 50, 100]\n const searchQuery = ref('')\n const sortBy = ref('id')\n const isSortDirDesc = ref(true)\n\n const dataMeta = computed(() => {\n const localItemsCount = gridData.value ? gridData.value.length : 0\n return {\n from: perPage.value * (currentPage.value - 1) + (localItemsCount ? 1 : 0),\n to: perPage.value * (currentPage.value - 1) + localItemsCount,\n of: total.value,\n }\n })\n\n const fetchData = () => {\n loading.value = true\n // eslint-disable-next-line prefer-destructuring\n const xparam1 = props.xparam1\n // eslint-disable-next-line prefer-destructuring\n const xparam2 = props.xparam2\n // eslint-disable-next-line prefer-destructuring\n const xparam3 = props.xparam3\n // eslint-disable-next-line prefer-destructuring\n const xparam4 = props.xparam4\n // eslint-disable-next-line\n const id_buyer = props.id_buyer\n return store.dispatch('basic-table/fetchData', {\n api: props.api,\n apiId: props.apiId,\n params: {\n xparam1,\n xparam2,\n xparam3,\n xparam4,\n // eslint-disable-next-line\n id_buyer,\n zpage: currentPage.value,\n zstart: perPage.value * (currentPage.value - 1),\n zlimit: perPage.value,\n },\n })\n .then(response => {\n const { data } = response.data\n gridData.value = data.rows\n total.value = data.paging[0].total || 0\n loading.value = false\n return response\n })\n .catch(err => {\n gridData.value = null\n total.value = 0\n loading.value = false\n return err\n })\n }\n\n const rowClicked = item => {\n // eslint-disable-next-line no-underscore-dangle\n if (!item._showDetails) {\n // eslint-disable-next-line no-underscore-dangle\n set(item, '_showDetails', !item._showDetails)\n } else {\n // eslint-disable-next-line no-underscore-dangle\n set(item, '_showDetails', !item._showDetails)\n }\n }\n\n const execAction = action => {\n store.dispatch('basic-table/execAction', {\n ...action,\n alert: action.alert === undefined || false,\n }).then(res => {\n if (res) {\n fetchData()\n }\n })\n }\n\n watch(() => props.apiId, () => {\n if (props.loadByTab === null || (props.currentTab === props.loadByTab)) {\n fetchData()\n }\n })\n\n watch(() => props.xparam1, () => {\n fetchData()\n })\n\n watch(() => props.xparam2, () => {\n fetchData()\n })\n\n watch(() => props.xparam3, () => {\n fetchData()\n })\n\n // eslint-disable-next-line\n watch(() => props.id_buyer, () => {\n if (props.loadByTab === null || (props.currentTab === props.loadByTab)) {\n fetchData()\n }\n })\n\n watch(() => props.currentTab, () => {\n if (props.currentTab === props.loadByTab) {\n fetchData()\n }\n })\n\n watch([currentPage], () => {\n fetchData()\n })\n\n watch(() => props.refresh, () => {\n if (props.refresh) {\n fetchData()\n }\n })\n\n return {\n refBasicTable,\n gridData,\n loading,\n total,\n currentPage,\n perPage,\n perPageOptions,\n searchQuery,\n sortBy,\n isSortDirDesc,\n dataMeta,\n\n fetchData,\n rowClicked,\n execAction,\n }\n}\n","\n \n \n \n \n \n \n Нет данных\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n -1)\"\n @click=\"execAction({ ...action, apiId: data.item.id })\"\n >\n \n {{ action.label.replace('{id}', data.item.id) }}\n \n \n \n \n \n \n \n\n \n {{ dataMeta.from }} - {{ dataMeta.to }} {{ $t('of') }} {{ dataMeta.of }}\n \n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n\n\n\n\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./InnerTable.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./InnerTable.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./InnerTable.vue?vue&type=template&id=11a2fa24&scoped=true&\"\nimport script from \"./InnerTable.vue?vue&type=script&lang=js&\"\nexport * from \"./InnerTable.vue?vue&type=script&lang=js&\"\nimport style0 from \"./InnerTable.vue?vue&type=style&index=0&id=11a2fa24&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"11a2fa24\",\n null\n \n)\n\nexport default component.exports","\n \n \n \n \n \n \n Нет данных\n \n \n \n \n \n \n \n \n \n {{ data.item.id }}\n \n \n \n \n {{ data.item.id }}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{ tab.title }}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n -1)\"\n @click=\"execAction({ ...action, apiId: data.item.id })\"\n >\n \n {{ action.label.replace('{id}', data.item.id) }}\n \n \n \n \n \n \n \n\n \n {{ dataMeta.from }} - {{ dataMeta.to }} {{ $t('of') }} {{ dataMeta.of }}\n \n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n\n\n\n\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./BasicTable.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./BasicTable.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./BasicTable.vue?vue&type=template&id=506d5b7f&scoped=true&\"\nimport script from \"./BasicTable.vue?vue&type=script&lang=js&\"\nexport * from \"./BasicTable.vue?vue&type=script&lang=js&\"\nimport style0 from \"./BasicTable.vue?vue&type=style&index=0&id=506d5b7f&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"506d5b7f\",\n null\n \n)\n\nexport default component.exports","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","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./InnerTable.vue?vue&type=style&index=0&id=11a2fa24&scoped=true&lang=css&\"","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.github.io/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","var anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.github.io/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isRegExp = require('../internals/is-regexp');\nvar getFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar setInternalState = require('../internals/internal-state').set;\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = global.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\n\nvar FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {\n re2[MATCH] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';\n})));\n\n// `RegExp` constructor\n// https://tc39.github.io/ecma262/#sec-regexp-constructor\nif (FORCED) {\n var RegExpWrapper = function RegExp(pattern, flags) {\n var thisIsRegExp = this instanceof RegExpWrapper;\n var patternIsRegExp = isRegExp(pattern);\n var flagsAreUndefined = flags === undefined;\n var sticky;\n\n if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {\n return pattern;\n }\n\n if (CORRECT_NEW) {\n if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;\n } else if (pattern instanceof RegExpWrapper) {\n if (flagsAreUndefined) flags = getFlags.call(pattern);\n pattern = pattern.source;\n }\n\n if (UNSUPPORTED_Y) {\n sticky = !!flags && flags.indexOf('y') > -1;\n if (sticky) flags = flags.replace(/y/g, '');\n }\n\n var result = inheritIfRequired(\n CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),\n thisIsRegExp ? this : RegExpPrototype,\n RegExpWrapper\n );\n\n if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky });\n\n return result;\n };\n var proxy = function (key) {\n key in RegExpWrapper || defineProperty(RegExpWrapper, key, {\n configurable: true,\n get: function () { return NativeRegExp[key]; },\n set: function (it) { NativeRegExp[key] = it; }\n });\n };\n var keys = getOwnPropertyNames(NativeRegExp);\n var index = 0;\n while (keys.length > index) proxy(keys[index++]);\n RegExpPrototype.constructor = RegExpWrapper;\n RegExpWrapper.prototype = RegExpPrototype;\n redefine(global, 'RegExp', RegExpWrapper);\n}\n\n// https://tc39.github.io/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\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_NAV } from '../../constants/components';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props'; // --- Helper methods ---\n\nvar computeJustifyContent = function computeJustifyContent(value) {\n value = value === 'left' ? 'start' : value === 'right' ? 'end' : value;\n return \"justify-content-\".concat(value);\n}; // --- Props ---\n\n\nexport var props = makePropsConfigurable({\n align: makeProp(PROP_TYPE_STRING),\n // Set to `true` if placing in a card header\n cardHeader: makeProp(PROP_TYPE_BOOLEAN, false),\n fill: makeProp(PROP_TYPE_BOOLEAN, false),\n justified: makeProp(PROP_TYPE_BOOLEAN, false),\n pills: makeProp(PROP_TYPE_BOOLEAN, false),\n small: makeProp(PROP_TYPE_BOOLEAN, false),\n tabs: makeProp(PROP_TYPE_BOOLEAN, false),\n tag: makeProp(PROP_TYPE_STRING, 'ul'),\n vertical: makeProp(PROP_TYPE_BOOLEAN, false)\n}, NAME_NAV); // --- Main component ---\n// @vue/component\n\nexport var BNav = /*#__PURE__*/Vue.extend({\n name: NAME_NAV,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var _class;\n\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n var tabs = props.tabs,\n pills = props.pills,\n vertical = props.vertical,\n align = props.align,\n cardHeader = props.cardHeader;\n return h(props.tag, mergeData(data, {\n staticClass: 'nav',\n class: (_class = {\n 'nav-tabs': tabs,\n 'nav-pills': pills && !tabs,\n 'card-header-tabs': !vertical && cardHeader && tabs,\n 'card-header-pills': !vertical && cardHeader && pills && !tabs,\n 'flex-column': vertical,\n 'nav-fill': !vertical && props.fill,\n 'nav-justified': !vertical && props.justified\n }, _defineProperty(_class, computeJustifyContent(align), !vertical && align), _defineProperty(_class, \"small\", props.small), _class)\n }), children);\n }\n});","var _objectSpread2, _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 { NAME_TAB } from '../../constants/components';\nimport { MODEL_EVENT_NAME_PREFIX } from '../../constants/events';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_OBJECT, PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_TITLE } from '../../constants/slots';\nimport { sortKeys } from '../../utils/object';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { idMixin, props as idProps } from '../../mixins/id';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { BVTransition } from '../transition/bv-transition'; // --- Constants ---\n\nvar MODEL_PROP_NAME_ACTIVE = 'active';\nvar MODEL_EVENT_NAME_ACTIVE = MODEL_EVENT_NAME_PREFIX + MODEL_PROP_NAME_ACTIVE; // --- Props ---\n\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread({}, idProps), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, MODEL_PROP_NAME_ACTIVE, makeProp(PROP_TYPE_BOOLEAN, false)), _defineProperty(_objectSpread2, \"buttonId\", makeProp(PROP_TYPE_STRING)), _defineProperty(_objectSpread2, \"disabled\", makeProp(PROP_TYPE_BOOLEAN, false)), _defineProperty(_objectSpread2, \"lazy\", makeProp(PROP_TYPE_BOOLEAN, false)), _defineProperty(_objectSpread2, \"noBody\", makeProp(PROP_TYPE_BOOLEAN, false)), _defineProperty(_objectSpread2, \"tag\", makeProp(PROP_TYPE_STRING, 'div')), _defineProperty(_objectSpread2, \"title\", makeProp(PROP_TYPE_STRING)), _defineProperty(_objectSpread2, \"titleItemClass\", makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)), _defineProperty(_objectSpread2, \"titleLinkAttributes\", makeProp(PROP_TYPE_OBJECT)), _defineProperty(_objectSpread2, \"titleLinkClass\", makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)), _objectSpread2))), NAME_TAB); // --- Main component ---\n// @vue/component\n\nexport var BTab = /*#__PURE__*/Vue.extend({\n name: NAME_TAB,\n mixins: [idMixin, normalizeSlotMixin],\n inject: {\n bvTabs: {\n default: function _default() {\n return {};\n }\n }\n },\n props: props,\n data: function data() {\n return {\n localActive: this[MODEL_PROP_NAME_ACTIVE] && !this.disabled\n };\n },\n computed: {\n // For parent sniffing of child\n _isTab: function _isTab() {\n return true;\n },\n tabClasses: function tabClasses() {\n var active = this.localActive,\n disabled = this.disabled;\n return [{\n active: active,\n disabled: disabled,\n 'card-body': this.bvTabs.card && !this.noBody\n }, // Apply `activeTabClass` styles when this tab is active\n active ? this.bvTabs.activeTabClass : null];\n },\n controlledBy: function controlledBy() {\n return this.buttonId || this.safeId('__BV_tab_button__');\n },\n computedNoFade: function computedNoFade() {\n return !(this.bvTabs.fade || false);\n },\n computedLazy: function computedLazy() {\n return this.bvTabs.lazy || this.lazy;\n }\n },\n watch: (_watch = {}, _defineProperty(_watch, MODEL_PROP_NAME_ACTIVE, function (newValue, oldValue) {\n if (newValue !== oldValue) {\n if (newValue) {\n // If activated post mount\n this.activate();\n } else {\n /* istanbul ignore next */\n if (!this.deactivate()) {\n // Tab couldn't be deactivated, so we reset the synced active prop\n // Deactivation will fail if no other tabs to activate\n this.$emit(MODEL_EVENT_NAME_ACTIVE, this.localActive);\n }\n }\n }\n }), _defineProperty(_watch, \"disabled\", function disabled(newValue, oldValue) {\n if (newValue !== oldValue) {\n var firstTab = this.bvTabs.firstTab;\n\n if (newValue && this.localActive && firstTab) {\n this.localActive = false;\n firstTab();\n }\n }\n }), _defineProperty(_watch, \"localActive\", function localActive(newValue) {\n // Make `active` prop work with `.sync` modifier\n this.$emit(MODEL_EVENT_NAME_ACTIVE, newValue);\n }), _watch),\n mounted: function mounted() {\n // Inform `` of our presence\n this.registerTab();\n },\n updated: function updated() {\n // Force the tab button content to update (since slots are not reactive)\n // Only done if we have a title slot, as the title prop is reactive\n var updateButton = this.bvTabs.updateButton;\n\n if (updateButton && this.hasNormalizedSlot(SLOT_NAME_TITLE)) {\n updateButton(this);\n }\n },\n beforeDestroy: function beforeDestroy() {\n // Inform `` of our departure\n this.unregisterTab();\n },\n methods: {\n // Private methods\n registerTab: function registerTab() {\n // Inform `` of our presence\n var registerTab = this.bvTabs.registerTab;\n\n if (registerTab) {\n registerTab(this);\n }\n },\n unregisterTab: function unregisterTab() {\n // Inform `` of our departure\n var unregisterTab = this.bvTabs.unregisterTab;\n\n if (unregisterTab) {\n unregisterTab(this);\n }\n },\n // Public methods\n activate: function activate() {\n // Not inside a `` component or tab is disabled\n var activateTab = this.bvTabs.activateTab;\n return activateTab && !this.disabled ? activateTab(this) : false;\n },\n deactivate: function deactivate() {\n // Not inside a `` component or not active to begin with\n var deactivateTab = this.bvTabs.deactivateTab;\n return deactivateTab && this.localActive ? deactivateTab(this) : false;\n }\n },\n render: function render(h) {\n var localActive = this.localActive;\n var $content = h(this.tag, {\n staticClass: 'tab-pane',\n class: this.tabClasses,\n directives: [{\n name: 'show',\n value: localActive\n }],\n attrs: {\n role: 'tabpanel',\n id: this.safeId(),\n 'aria-hidden': localActive ? 'false' : 'true',\n 'aria-labelledby': this.controlledBy || null\n },\n ref: 'panel'\n }, // Render content lazily if requested\n [localActive || !this.computedLazy ? this.normalizeSlot() : h()]);\n return h(BVTransition, {\n props: {\n mode: 'out-in',\n noFade: this.computedNoFade\n }\n }, [$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, 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});","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});","/*\n * Consistent and stable sort function across JavaScript platforms\n *\n * Inconsistent sorts can cause SSR problems between client and server\n * such as in if sortBy is applied to the data on server side render.\n * Chrome and V8 native sorts are inconsistent/unstable\n *\n * This function uses native sort with fallback to index compare when the a and b\n * compare returns 0\n *\n * Algorithm based on:\n * https://stackoverflow.com/questions/1427608/fast-stable-sorting-algorithm-implementation-in-javascript/45422645#45422645\n *\n * @param {array} array to sort\n * @param {function} sort compare function\n * @return {array}\n */\nexport var stableSort = function stableSort(array, compareFn) {\n // Using `.bind(compareFn)` on the wrapped anonymous function improves\n // performance by avoiding the function call setup. We don't use an arrow\n // function here as it binds `this` to the `stableSort` context rather than\n // the `compareFn` context, which wouldn't give us the performance increase.\n return array.map(function (a, index) {\n return [index, a];\n }).sort(function (a, b) {\n return this(a[1], b[1]) || a[0] - b[0];\n }.bind(compareFn)).map(function (e) {\n return e[1];\n });\n};","// Localization utilities\nimport { RX_STRIP_LOCALE_MODS } from '../constants/regex';\nimport { arrayIncludes } from './array';\nimport { toString } from './string'; // Languages that are RTL\n\nvar RTL_LANGS = ['ar', 'az', 'ckb', 'fa', 'he', 'ks', 'lrc', 'mzn', 'ps', 'sd', 'te', 'ug', 'ur', 'yi'].map(function (locale) {\n return locale.toLowerCase();\n}); // Returns true if the locale is RTL\n\nexport var isLocaleRTL = function isLocaleRTL(locale) {\n // Determines if the locale is RTL (only single locale supported)\n var parts = toString(locale).toLowerCase().replace(RX_STRIP_LOCALE_MODS, '').split('-');\n var locale1 = parts.slice(0, 2).join('-');\n var locale2 = parts[0];\n return arrayIncludes(RTL_LANGS, locale1) || arrayIncludes(RTL_LANGS, locale2);\n};","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./BasicTable.vue?vue&type=style&index=0&id=506d5b7f&scoped=true&lang=css&\"","// Base on-demand component for tooltip / popover templates\n//\n// Currently:\n// Responsible for positioning and transitioning the template\n// Templates are only instantiated when shown, and destroyed when hidden\n//\nimport Popper from 'popper.js';\nimport { Vue } from '../../../vue';\nimport { NAME_POPPER } from '../../../constants/components';\nimport { EVENT_NAME_HIDDEN, EVENT_NAME_HIDE, EVENT_NAME_SHOW, EVENT_NAME_SHOWN, HOOK_EVENT_NAME_DESTROYED } from '../../../constants/events';\nimport { PROP_TYPE_ARRAY_STRING, PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING } from '../../../constants/props';\nimport { HTMLElement, SVGElement } from '../../../constants/safe-types';\nimport { getCS, requestAF, select } from '../../../utils/dom';\nimport { toFloat } from '../../../utils/number';\nimport { makeProp } from '../../../utils/props';\nimport { BVTransition } from '../../transition/bv-transition'; // --- Constants ---\n\nvar AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: 'right',\n BOTTOM: 'bottom',\n LEFT: 'left',\n TOPLEFT: 'top',\n TOPRIGHT: 'top',\n RIGHTTOP: 'right',\n RIGHTBOTTOM: 'right',\n BOTTOMLEFT: 'bottom',\n BOTTOMRIGHT: 'bottom',\n LEFTTOP: 'left',\n LEFTBOTTOM: 'left'\n};\nvar OffsetMap = {\n AUTO: 0,\n TOPLEFT: -1,\n TOP: 0,\n TOPRIGHT: +1,\n RIGHTTOP: -1,\n RIGHT: 0,\n RIGHTBOTTOM: +1,\n BOTTOMLEFT: -1,\n BOTTOM: 0,\n BOTTOMRIGHT: +1,\n LEFTTOP: -1,\n LEFT: 0,\n LEFTBOTTOM: +1\n}; // --- Props ---\n\nexport var props = {\n // The minimum distance (in `px`) from the edge of the\n // tooltip/popover that the arrow can be positioned\n arrowPadding: makeProp(PROP_TYPE_NUMBER_STRING, 6),\n // 'scrollParent', 'viewport', 'window', or `Element`\n boundary: makeProp([HTMLElement, PROP_TYPE_STRING], 'scrollParent'),\n // Tooltip/popover will try and stay away from\n // boundary edge by this many pixels\n boundaryPadding: makeProp(PROP_TYPE_NUMBER_STRING, 5),\n fallbackPlacement: makeProp(PROP_TYPE_ARRAY_STRING, 'flip'),\n offset: makeProp(PROP_TYPE_NUMBER_STRING, 0),\n placement: makeProp(PROP_TYPE_STRING, 'top'),\n // Element that the tooltip/popover is positioned relative to\n target: makeProp([HTMLElement, SVGElement])\n}; // --- Main component ---\n// @vue/component\n\nexport var BVPopper = /*#__PURE__*/Vue.extend({\n name: NAME_POPPER,\n props: props,\n data: function data() {\n return {\n // reactive props set by parent\n noFade: false,\n // State related data\n localShow: true,\n attachment: this.getAttachment(this.placement)\n };\n },\n computed: {\n /* istanbul ignore next */\n templateType: function templateType() {\n // Overridden by template component\n return 'unknown';\n },\n popperConfig: function popperConfig() {\n var _this = this;\n\n var placement = this.placement;\n return {\n placement: this.getAttachment(placement),\n modifiers: {\n offset: {\n offset: this.getOffset(placement)\n },\n flip: {\n behavior: this.fallbackPlacement\n },\n // `arrow.element` can also be a reference to an HTML Element\n // maybe we should make this a `$ref` in the templates?\n arrow: {\n element: '.arrow'\n },\n preventOverflow: {\n padding: this.boundaryPadding,\n boundariesElement: this.boundary\n }\n },\n onCreate: function onCreate(data) {\n // Handle flipping arrow classes\n if (data.originalPlacement !== data.placement) {\n /* istanbul ignore next: can't test in JSDOM */\n _this.popperPlacementChange(data);\n }\n },\n onUpdate: function onUpdate(data) {\n // Handle flipping arrow classes\n _this.popperPlacementChange(data);\n }\n };\n }\n },\n created: function created() {\n var _this2 = this;\n\n // Note: We are created on-demand, and should be guaranteed that\n // DOM is rendered/ready by the time the created hook runs\n this.$_popper = null; // Ensure we show as we mount\n\n this.localShow = true; // Create popper instance before shown\n\n this.$on(EVENT_NAME_SHOW, function (el) {\n _this2.popperCreate(el);\n }); // Self destruct handler\n\n var handleDestroy = function handleDestroy() {\n _this2.$nextTick(function () {\n // In a `requestAF()` to release control back to application\n requestAF(function () {\n _this2.$destroy();\n });\n });\n }; // Self destruct if parent destroyed\n\n\n this.$parent.$once(HOOK_EVENT_NAME_DESTROYED, handleDestroy); // Self destruct after hidden\n\n this.$once(EVENT_NAME_HIDDEN, handleDestroy);\n },\n beforeMount: function beforeMount() {\n // Ensure that the attachment position is correct before mounting\n // as our propsData is added after `new Template({...})`\n this.attachment = this.getAttachment(this.placement);\n },\n updated: function updated() {\n // Update popper if needed\n // TODO: Should this be a watcher on `this.popperConfig` instead?\n this.updatePopper();\n },\n beforeDestroy: function beforeDestroy() {\n this.destroyPopper();\n },\n destroyed: function destroyed() {\n // Make sure template is removed from DOM\n var el = this.$el;\n el && el.parentNode && el.parentNode.removeChild(el);\n },\n methods: {\n // \"Public\" method to trigger hide template\n hide: function hide() {\n this.localShow = false;\n },\n // Private\n getAttachment: function getAttachment(placement) {\n return AttachmentMap[String(placement).toUpperCase()] || 'auto';\n },\n getOffset: function getOffset(placement) {\n if (!this.offset) {\n // Could set a ref for the arrow element\n var arrow = this.$refs.arrow || select('.arrow', this.$el);\n var arrowOffset = toFloat(getCS(arrow).width, 0) + toFloat(this.arrowPadding, 0);\n\n switch (OffsetMap[String(placement).toUpperCase()] || 0) {\n /* istanbul ignore next: can't test in JSDOM */\n case +1:\n /* istanbul ignore next: can't test in JSDOM */\n return \"+50%p - \".concat(arrowOffset, \"px\");\n\n /* istanbul ignore next: can't test in JSDOM */\n\n case -1:\n /* istanbul ignore next: can't test in JSDOM */\n return \"-50%p + \".concat(arrowOffset, \"px\");\n\n default:\n return 0;\n }\n }\n /* istanbul ignore next */\n\n\n return this.offset;\n },\n popperCreate: function popperCreate(el) {\n this.destroyPopper(); // We use `el` rather than `this.$el` just in case the original\n // mountpoint root element type was changed by the template\n\n this.$_popper = new Popper(this.target, el, this.popperConfig);\n },\n destroyPopper: function destroyPopper() {\n this.$_popper && this.$_popper.destroy();\n this.$_popper = null;\n },\n updatePopper: function updatePopper() {\n this.$_popper && this.$_popper.scheduleUpdate();\n },\n popperPlacementChange: function popperPlacementChange(data) {\n // Callback used by popper to adjust the arrow placement\n this.attachment = this.getAttachment(data.placement);\n },\n\n /* istanbul ignore next */\n renderTemplate: function renderTemplate(h) {\n // Will be overridden by templates\n return h('div');\n }\n },\n render: function render(h) {\n var _this3 = this;\n\n var noFade = this.noFade; // Note: 'show' and 'fade' classes are only appled during transition\n\n return h(BVTransition, {\n // Transitions as soon as mounted\n props: {\n appear: true,\n noFade: noFade\n },\n on: {\n // Events used by parent component/instance\n beforeEnter: function beforeEnter(el) {\n return _this3.$emit(EVENT_NAME_SHOW, el);\n },\n afterEnter: function afterEnter(el) {\n return _this3.$emit(EVENT_NAME_SHOWN, el);\n },\n beforeLeave: function beforeLeave(el) {\n return _this3.$emit(EVENT_NAME_HIDE, el);\n },\n afterLeave: function afterLeave(el) {\n return _this3.$emit(EVENT_NAME_HIDDEN, el);\n }\n }\n }, [this.localShow ? this.renderTemplate(h) : h()]);\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_TOOLTIP_TEMPLATE } from '../../../constants/components';\nimport { EVENT_NAME_FOCUSIN, EVENT_NAME_FOCUSOUT, EVENT_NAME_MOUSEENTER, EVENT_NAME_MOUSELEAVE } from '../../../constants/events';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';\nimport { isFunction } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { scopedStyleMixin } from '../../../mixins/scoped-style';\nimport { BVPopper } from './bv-popper'; // --- Props ---\n\nexport var props = {\n // Used only by the directive versions\n html: makeProp(PROP_TYPE_BOOLEAN, false),\n // Other non-reactive (while open) props are pulled in from BVPopper\n id: makeProp(PROP_TYPE_STRING)\n}; // --- Main component ---\n// @vue/component\n\nexport var BVTooltipTemplate = /*#__PURE__*/Vue.extend({\n name: NAME_TOOLTIP_TEMPLATE,\n extends: BVPopper,\n mixins: [scopedStyleMixin],\n props: props,\n data: function data() {\n // We use data, rather than props to ensure reactivity\n // Parent component will directly set this data\n return {\n title: '',\n content: '',\n variant: null,\n customClass: null,\n interactive: true\n };\n },\n computed: {\n templateType: function templateType() {\n return 'tooltip';\n },\n templateClasses: function templateClasses() {\n var _ref;\n\n var variant = this.variant,\n attachment = this.attachment,\n templateType = this.templateType;\n return [(_ref = {\n // Disables pointer events to hide the tooltip when the user\n // hovers over its content\n noninteractive: !this.interactive\n }, _defineProperty(_ref, \"b-\".concat(templateType, \"-\").concat(variant), variant), _defineProperty(_ref, \"bs-\".concat(templateType, \"-\").concat(attachment), attachment), _ref), this.customClass];\n },\n templateAttributes: function templateAttributes() {\n var id = this.id;\n return _objectSpread(_objectSpread({}, this.$parent.$parent.$attrs), {}, {\n id: id,\n role: 'tooltip',\n tabindex: '-1'\n }, this.scopedStyleAttrs);\n },\n templateListeners: function templateListeners() {\n var _this = this;\n\n // Used for hover/focus trigger listeners\n return {\n mouseenter:\n /* istanbul ignore next */\n function mouseenter(event) {\n _this.$emit(EVENT_NAME_MOUSEENTER, event);\n },\n mouseleave:\n /* istanbul ignore next */\n function mouseleave(event) {\n _this.$emit(EVENT_NAME_MOUSELEAVE, event);\n },\n focusin:\n /* istanbul ignore next */\n function focusin(event) {\n _this.$emit(EVENT_NAME_FOCUSIN, event);\n },\n focusout:\n /* istanbul ignore next */\n function focusout(event) {\n _this.$emit(EVENT_NAME_FOCUSOUT, event);\n }\n };\n }\n },\n methods: {\n renderTemplate: function renderTemplate(h) {\n var title = this.title; // Title can be a scoped slot function\n\n var $title = isFunction(title) ? title({}) : title; // Directive versions only\n\n var domProps = this.html && !isFunction(title) ? {\n innerHTML: title\n } : {};\n return h('div', {\n staticClass: 'tooltip b-tooltip',\n class: this.templateClasses,\n attrs: this.templateAttributes,\n on: this.templateListeners\n }, [h('div', {\n staticClass: 'arrow',\n ref: 'arrow'\n }), h('div', {\n staticClass: 'tooltip-inner',\n domProps: domProps\n }, [$title])]);\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\n// Tooltip \"Class\" (Built as a renderless Vue instance)\n//\n// Handles trigger events, etc.\n// Instantiates template on demand\nimport { COMPONENT_UID_KEY, Vue } from '../../../vue';\nimport { NAME_MODAL, NAME_TOOLTIP_HELPER } from '../../../constants/components';\nimport { EVENT_NAME_DISABLE, EVENT_NAME_DISABLED, EVENT_NAME_ENABLE, EVENT_NAME_ENABLED, EVENT_NAME_FOCUSIN, EVENT_NAME_FOCUSOUT, EVENT_NAME_HIDDEN, EVENT_NAME_HIDE, EVENT_NAME_MOUSEENTER, EVENT_NAME_MOUSELEAVE, EVENT_NAME_SHOW, EVENT_NAME_SHOWN, EVENT_OPTIONS_NO_CAPTURE, HOOK_EVENT_NAME_BEFORE_DESTROY, HOOK_EVENT_NAME_DESTROYED } from '../../../constants/events';\nimport { arrayIncludes, concat, from as arrayFrom } from '../../../utils/array';\nimport { attemptFocus, closest, contains, getAttr, getById, hasAttr, hasClass, isDisabled, isElement, isVisible, removeAttr, requestAF, select, setAttr } from '../../../utils/dom';\nimport { eventOff, eventOn, eventOnOff, getRootActionEventName, getRootEventName } from '../../../utils/events';\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 { mathMax } from '../../../utils/math';\nimport { noop } from '../../../utils/noop';\nimport { toInteger } from '../../../utils/number';\nimport { keys } from '../../../utils/object';\nimport { warn } from '../../../utils/warn';\nimport { BvEvent } from '../../../utils/bv-event.class';\nimport { listenOnRootMixin } from '../../../mixins/listen-on-root';\nimport { BVTooltipTemplate } from './bv-tooltip-template'; // --- Constants ---\n// Modal container selector for appending tooltip/popover\n\nvar MODAL_SELECTOR = '.modal-content'; // Modal `$root` hidden event\n\nvar ROOT_EVENT_NAME_MODAL_HIDDEN = getRootEventName(NAME_MODAL, EVENT_NAME_HIDDEN); // Sidebar container selector for appending tooltip/popover\n\nvar SIDEBAR_SELECTOR = '.b-sidebar'; // For finding the container to append to\n\nvar CONTAINER_SELECTOR = [MODAL_SELECTOR, SIDEBAR_SELECTOR].join(', '); // For dropdown sniffing\n\nvar DROPDOWN_CLASS = 'dropdown';\nvar DROPDOWN_OPEN_SELECTOR = '.dropdown-menu.show'; // Data attribute to temporary store the `title` attribute's value\n\nvar DATA_TITLE_ATTR = 'data-original-title'; // Data specific to popper and template\n// We don't use props, as we need reactivity (we can't pass reactive props)\n\nvar templateData = {\n // Text string or Scoped slot function\n title: '',\n // Text string or Scoped slot function\n content: '',\n // String\n variant: null,\n // String, Array, Object\n customClass: null,\n // String or array of Strings (overwritten by BVPopper)\n triggers: '',\n // String (overwritten by BVPopper)\n placement: 'auto',\n // String or array of strings\n fallbackPlacement: 'flip',\n // Element or Component reference (or function that returns element) of\n // the element that will have the trigger events bound, and is also\n // default element for positioning\n target: null,\n // HTML ID, Element or Component reference\n container: null,\n // 'body'\n // Boolean\n noFade: false,\n // 'scrollParent', 'viewport', 'window', Element, or Component reference\n boundary: 'scrollParent',\n // Tooltip/popover will try and stay away from\n // boundary edge by this many pixels (Number)\n boundaryPadding: 5,\n // Arrow offset (Number)\n offset: 0,\n // Hover/focus delay (Number or Object)\n delay: 0,\n // Arrow of Tooltip/popover will try and stay away from\n // the edge of tooltip/popover edge by this many pixels\n arrowPadding: 6,\n // Interactive state (Boolean)\n interactive: true,\n // Disabled state (Boolean)\n disabled: false,\n // ID to use for tooltip/popover\n id: null,\n // Flag used by directives only, for HTML content\n html: false\n}; // --- Main component ---\n// @vue/component\n\nexport var BVTooltip = /*#__PURE__*/Vue.extend({\n name: NAME_TOOLTIP_HELPER,\n mixins: [listenOnRootMixin],\n data: function data() {\n return _objectSpread(_objectSpread({}, templateData), {}, {\n // State management data\n activeTrigger: {\n // manual: false,\n hover: false,\n click: false,\n focus: false\n },\n localShow: false\n });\n },\n computed: {\n templateType: function templateType() {\n // Overwritten by BVPopover\n return 'tooltip';\n },\n computedId: function computedId() {\n return this.id || \"__bv_\".concat(this.templateType, \"_\").concat(this[COMPONENT_UID_KEY], \"__\");\n },\n computedDelay: function computedDelay() {\n // Normalizes delay into object form\n var delay = {\n show: 0,\n hide: 0\n };\n\n if (isPlainObject(this.delay)) {\n delay.show = mathMax(toInteger(this.delay.show, 0), 0);\n delay.hide = mathMax(toInteger(this.delay.hide, 0), 0);\n } else if (isNumber(this.delay) || isString(this.delay)) {\n delay.show = delay.hide = mathMax(toInteger(this.delay, 0), 0);\n }\n\n return delay;\n },\n computedTriggers: function computedTriggers() {\n // Returns the triggers in sorted array form\n // TODO: Switch this to object form for easier lookup\n return concat(this.triggers).filter(identity).join(' ').trim().toLowerCase().split(/\\s+/).sort();\n },\n isWithActiveTrigger: function isWithActiveTrigger() {\n for (var trigger in this.activeTrigger) {\n if (this.activeTrigger[trigger]) {\n return true;\n }\n }\n\n return false;\n },\n computedTemplateData: function computedTemplateData() {\n var title = this.title,\n content = this.content,\n variant = this.variant,\n customClass = this.customClass,\n noFade = this.noFade,\n interactive = this.interactive;\n return {\n title: title,\n content: content,\n variant: variant,\n customClass: customClass,\n noFade: noFade,\n interactive: interactive\n };\n }\n },\n watch: {\n computedTriggers: function computedTriggers(newTriggers, oldTriggers) {\n var _this = this;\n\n // Triggers have changed, so re-register them\n\n /* istanbul ignore next */\n if (!looseEqual(newTriggers, oldTriggers)) {\n this.$nextTick(function () {\n // Disable trigger listeners\n _this.unListen(); // Clear any active triggers that are no longer in the list of triggers\n\n\n oldTriggers.forEach(function (trigger) {\n if (!arrayIncludes(newTriggers, trigger)) {\n if (_this.activeTrigger[trigger]) {\n _this.activeTrigger[trigger] = false;\n }\n }\n }); // Re-enable the trigger listeners\n\n _this.listen();\n });\n }\n },\n computedTemplateData: function computedTemplateData() {\n // If any of the while open reactive \"props\" change,\n // ensure that the template updates accordingly\n this.handleTemplateUpdate();\n },\n title: function title(newValue, oldValue) {\n // Make sure to hide the tooltip when the title is set empty\n if (newValue !== oldValue && !newValue) {\n this.hide();\n }\n },\n disabled: function disabled(newValue) {\n if (newValue) {\n this.disable();\n } else {\n this.enable();\n }\n }\n },\n created: function created() {\n var _this2 = this;\n\n // Create non-reactive properties\n this.$_tip = null;\n this.$_hoverTimeout = null;\n this.$_hoverState = '';\n this.$_visibleInterval = null;\n this.$_enabled = !this.disabled;\n this.$_noop = noop.bind(this); // Destroy ourselves when the parent is destroyed\n\n if (this.$parent) {\n this.$parent.$once(HOOK_EVENT_NAME_BEFORE_DESTROY, function () {\n _this2.$nextTick(function () {\n // In a `requestAF()` to release control back to application\n requestAF(function () {\n _this2.$destroy();\n });\n });\n });\n }\n\n this.$nextTick(function () {\n var target = _this2.getTarget();\n\n if (target && contains(document.body, target)) {\n // Copy the parent's scoped style attribute\n _this2.scopeId = getScopeId(_this2.$parent); // Set up all trigger handlers and listeners\n\n _this2.listen();\n } else {\n /* istanbul ignore next */\n warn(isString(_this2.target) ? \"Unable to find target element by ID \\\"#\".concat(_this2.target, \"\\\" in document.\") : 'The provided target is no valid HTML element.', _this2.templateType);\n }\n });\n },\n\n /* istanbul ignore next */\n updated: function updated() {\n // Usually called when the slots/data changes\n this.$nextTick(this.handleTemplateUpdate);\n },\n\n /* istanbul ignore next */\n deactivated: function deactivated() {\n // In a keepalive that has been deactivated, so hide\n // the tooltip/popover if it is showing\n this.forceHide();\n },\n beforeDestroy: function beforeDestroy() {\n // Remove all handler/listeners\n this.unListen();\n this.setWhileOpenListeners(false); // Clear any timeouts/intervals\n\n this.clearHoverTimeout();\n this.clearVisibilityInterval(); // Destroy the template\n\n this.destroyTemplate(); // Remove any other private properties created during create\n\n this.$_noop = null;\n },\n methods: {\n // --- Methods for creating and destroying the template ---\n getTemplate: function getTemplate() {\n // Overridden by BVPopover\n return BVTooltipTemplate;\n },\n updateData: function updateData() {\n var _this3 = this;\n\n var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Method for updating popper/template data\n // We only update data if it exists, and has not changed\n var titleUpdated = false;\n keys(templateData).forEach(function (prop) {\n if (!isUndefined(data[prop]) && _this3[prop] !== data[prop]) {\n _this3[prop] = data[prop];\n\n if (prop === 'title') {\n titleUpdated = true;\n }\n }\n }); // If the title has updated, we may need to handle the `title`\n // attribute on the trigger target\n // We only do this while the template is open\n\n if (titleUpdated && this.localShow) {\n this.fixTitle();\n }\n },\n createTemplateAndShow: function createTemplateAndShow() {\n // Creates the template instance and show it\n var container = this.getContainer();\n var Template = this.getTemplate();\n var $tip = this.$_tip = new Template({\n parent: this,\n // The following is not reactive to changes in the props data\n propsData: {\n // These values cannot be changed while template is showing\n id: this.computedId,\n html: this.html,\n placement: this.placement,\n fallbackPlacement: this.fallbackPlacement,\n target: this.getPlacementTarget(),\n boundary: this.getBoundary(),\n // Ensure the following are integers\n offset: toInteger(this.offset, 0),\n arrowPadding: toInteger(this.arrowPadding, 0),\n boundaryPadding: toInteger(this.boundaryPadding, 0)\n }\n }); // We set the initial reactive data (values that can be changed while open)\n\n this.handleTemplateUpdate(); // Template transition phase events (handled once only)\n // When the template has mounted, but not visibly shown yet\n\n $tip.$once(EVENT_NAME_SHOW, this.onTemplateShow); // When the template has completed showing\n\n $tip.$once(EVENT_NAME_SHOWN, this.onTemplateShown); // When the template has started to hide\n\n $tip.$once(EVENT_NAME_HIDE, this.onTemplateHide); // When the template has completed hiding\n\n $tip.$once(EVENT_NAME_HIDDEN, this.onTemplateHidden); // When the template gets destroyed for any reason\n\n $tip.$once(HOOK_EVENT_NAME_DESTROYED, this.destroyTemplate); // Convenience events from template\n // To save us from manually adding/removing DOM\n // listeners to tip element when it is open\n\n $tip.$on(EVENT_NAME_FOCUSIN, this.handleEvent);\n $tip.$on(EVENT_NAME_FOCUSOUT, this.handleEvent);\n $tip.$on(EVENT_NAME_MOUSEENTER, this.handleEvent);\n $tip.$on(EVENT_NAME_MOUSELEAVE, this.handleEvent); // Mount (which triggers the `show`)\n\n $tip.$mount(container.appendChild(document.createElement('div'))); // Template will automatically remove its markup from DOM when hidden\n },\n hideTemplate: function hideTemplate() {\n // Trigger the template to start hiding\n // The template will emit the `hide` event after this and\n // then emit the `hidden` event once it is fully hidden\n // The `hook:destroyed` will also be called (safety measure)\n this.$_tip && this.$_tip.hide(); // Clear out any stragging active triggers\n\n this.clearActiveTriggers(); // Reset the hover state\n\n this.$_hoverState = '';\n },\n // Destroy the template instance and reset state\n destroyTemplate: function destroyTemplate() {\n this.setWhileOpenListeners(false);\n this.clearHoverTimeout();\n this.$_hoverState = '';\n this.clearActiveTriggers();\n this.localPlacementTarget = null;\n\n try {\n this.$_tip.$destroy();\n } catch (_unused) {}\n\n this.$_tip = null;\n this.removeAriaDescribedby();\n this.restoreTitle();\n this.localShow = false;\n },\n getTemplateElement: function getTemplateElement() {\n return this.$_tip ? this.$_tip.$el : null;\n },\n handleTemplateUpdate: function handleTemplateUpdate() {\n var _this4 = this;\n\n // Update our template title/content \"props\"\n // So that the template updates accordingly\n var $tip = this.$_tip;\n\n if ($tip) {\n var props = ['title', 'content', 'variant', 'customClass', 'noFade', 'interactive']; // Only update the values if they have changed\n\n props.forEach(function (prop) {\n if ($tip[prop] !== _this4[prop]) {\n $tip[prop] = _this4[prop];\n }\n });\n }\n },\n // --- Show/Hide handlers ---\n // Show the tooltip\n show: function show() {\n var target = this.getTarget();\n\n if (!target || !contains(document.body, target) || !isVisible(target) || this.dropdownOpen() || (isUndefinedOrNull(this.title) || this.title === '') && (isUndefinedOrNull(this.content) || this.content === '')) {\n // If trigger element isn't in the DOM or is not visible, or\n // is on an open dropdown toggle, or has no content, then\n // we exit without showing\n return;\n } // If tip already exists, exit early\n\n\n if (this.$_tip || this.localShow) {\n /* istanbul ignore next */\n return;\n } // In the process of showing\n\n\n this.localShow = true; // Create a cancelable BvEvent\n\n var showEvt = this.buildEvent(EVENT_NAME_SHOW, {\n cancelable: true\n });\n this.emitEvent(showEvt); // Don't show if event cancelled\n\n /* istanbul ignore if */\n\n if (showEvt.defaultPrevented) {\n // Destroy the template (if for some reason it was created)\n this.destroyTemplate();\n return;\n } // Fix the title attribute on target\n\n\n this.fixTitle(); // Set aria-describedby on target\n\n this.addAriaDescribedby(); // Create and show the tooltip\n\n this.createTemplateAndShow();\n },\n hide: function hide() {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n // Hide the tooltip\n var tip = this.getTemplateElement();\n /* istanbul ignore if */\n\n if (!tip || !this.localShow) {\n this.restoreTitle();\n return;\n } // Emit cancelable BvEvent 'hide'\n // We disable cancelling if `force` is true\n\n\n var hideEvt = this.buildEvent(EVENT_NAME_HIDE, {\n cancelable: !force\n });\n this.emitEvent(hideEvt);\n /* istanbul ignore if: ignore for now */\n\n if (hideEvt.defaultPrevented) {\n // Don't hide if event cancelled\n return;\n } // Tell the template to hide\n\n\n this.hideTemplate();\n },\n forceHide: function forceHide() {\n // Forcefully hides/destroys the template, regardless of any active triggers\n var tip = this.getTemplateElement();\n\n if (!tip || !this.localShow) {\n /* istanbul ignore next */\n return;\n } // Disable while open listeners/watchers\n // This is also done in the template `hide` event handler\n\n\n this.setWhileOpenListeners(false); // Clear any hover enter/leave event\n\n this.clearHoverTimeout();\n this.$_hoverState = '';\n this.clearActiveTriggers(); // Disable the fade animation on the template\n\n if (this.$_tip) {\n this.$_tip.noFade = true;\n } // Hide the tip (with force = true)\n\n\n this.hide(true);\n },\n enable: function enable() {\n this.$_enabled = true; // Create a non-cancelable BvEvent\n\n this.emitEvent(this.buildEvent(EVENT_NAME_ENABLED));\n },\n disable: function disable() {\n this.$_enabled = false; // Create a non-cancelable BvEvent\n\n this.emitEvent(this.buildEvent(EVENT_NAME_DISABLED));\n },\n // --- Handlers for template events ---\n // When template is inserted into DOM, but not yet shown\n onTemplateShow: function onTemplateShow() {\n // Enable while open listeners/watchers\n this.setWhileOpenListeners(true);\n },\n // When template show transition completes\n onTemplateShown: function onTemplateShown() {\n var prevHoverState = this.$_hoverState;\n this.$_hoverState = '';\n /* istanbul ignore next: occasional Node 10 coverage error */\n\n if (prevHoverState === 'out') {\n this.leave(null);\n } // Emit a non-cancelable BvEvent 'shown'\n\n\n this.emitEvent(this.buildEvent(EVENT_NAME_SHOWN));\n },\n // When template is starting to hide\n onTemplateHide: function onTemplateHide() {\n // Disable while open listeners/watchers\n this.setWhileOpenListeners(false);\n },\n // When template has completed closing (just before it self destructs)\n onTemplateHidden: function onTemplateHidden() {\n // Destroy the template\n this.destroyTemplate(); // Emit a non-cancelable BvEvent 'shown'\n\n this.emitEvent(this.buildEvent(EVENT_NAME_HIDDEN));\n },\n // --- Helper methods ---\n getTarget: function getTarget() {\n var target = this.target;\n\n if (isString(target)) {\n target = getById(target.replace(/^#/, ''));\n } else if (isFunction(target)) {\n target = target();\n } else if (target) {\n target = target.$el || target;\n }\n\n return isElement(target) ? target : null;\n },\n getPlacementTarget: function getPlacementTarget() {\n // This is the target that the tooltip will be placed on, which may not\n // necessarily be the same element that has the trigger event listeners\n // For now, this is the same as target\n // TODO:\n // Add in child selector support\n // Add in visibility checks for this element\n // Fallback to target if not found\n return this.getTarget();\n },\n getTargetId: function getTargetId() {\n // Returns the ID of the trigger element\n var target = this.getTarget();\n return target && target.id ? target.id : null;\n },\n getContainer: function getContainer() {\n // Handle case where container may be a component ref\n var container = this.container ? this.container.$el || this.container : false;\n var body = document.body;\n var target = this.getTarget(); // If we are in a modal, we append to the modal, If we\n // are in a sidebar, we append to the sidebar, else append\n // to body, unless a container is specified\n // TODO:\n // Template should periodically check to see if it is in dom\n // And if not, self destruct (if container got v-if'ed out of DOM)\n // Or this could possibly be part of the visibility check\n\n return container === false ? closest(CONTAINER_SELECTOR, target) || body :\n /*istanbul ignore next */\n isString(container) ?\n /*istanbul ignore next */\n getById(container.replace(/^#/, '')) || body :\n /*istanbul ignore next */\n body;\n },\n getBoundary: function getBoundary() {\n return this.boundary ? this.boundary.$el || this.boundary : 'scrollParent';\n },\n isInModal: function isInModal() {\n var target = this.getTarget();\n return target && closest(MODAL_SELECTOR, target);\n },\n isDropdown: function isDropdown() {\n // Returns true if trigger is a dropdown\n var target = this.getTarget();\n return target && hasClass(target, DROPDOWN_CLASS);\n },\n dropdownOpen: function dropdownOpen() {\n // Returns true if trigger is a dropdown and the dropdown menu is open\n var target = this.getTarget();\n return this.isDropdown() && target && select(DROPDOWN_OPEN_SELECTOR, target);\n },\n clearHoverTimeout: function clearHoverTimeout() {\n clearTimeout(this.$_hoverTimeout);\n this.$_hoverTimeout = null;\n },\n clearVisibilityInterval: function clearVisibilityInterval() {\n clearInterval(this.$_visibleInterval);\n this.$_visibleInterval = null;\n },\n clearActiveTriggers: function clearActiveTriggers() {\n for (var trigger in this.activeTrigger) {\n this.activeTrigger[trigger] = false;\n }\n },\n addAriaDescribedby: function addAriaDescribedby() {\n // Add aria-describedby on trigger element, without removing any other IDs\n var target = this.getTarget();\n var desc = getAttr(target, 'aria-describedby') || '';\n desc = desc.split(/\\s+/).concat(this.computedId).join(' ').trim(); // Update/add aria-described by\n\n setAttr(target, 'aria-describedby', desc);\n },\n removeAriaDescribedby: function removeAriaDescribedby() {\n var _this5 = this;\n\n // Remove aria-describedby on trigger element, without removing any other IDs\n var target = this.getTarget();\n var desc = getAttr(target, 'aria-describedby') || '';\n desc = desc.split(/\\s+/).filter(function (d) {\n return d !== _this5.computedId;\n }).join(' ').trim(); // Update or remove aria-describedby\n\n if (desc) {\n /* istanbul ignore next */\n setAttr(target, 'aria-describedby', desc);\n } else {\n removeAttr(target, 'aria-describedby');\n }\n },\n fixTitle: function fixTitle() {\n // If the target has a `title` attribute,\n // remove it and store it on a data attribute\n var target = this.getTarget();\n\n if (hasAttr(target, 'title')) {\n // Get `title` attribute value and remove it from target\n var title = getAttr(target, 'title');\n setAttr(target, 'title', ''); // Only set the data attribute when the value is truthy\n\n if (title) {\n setAttr(target, DATA_TITLE_ATTR, title);\n }\n }\n },\n restoreTitle: function restoreTitle() {\n // If the target had a `title` attribute,\n // restore it and remove the data attribute\n var target = this.getTarget();\n\n if (hasAttr(target, DATA_TITLE_ATTR)) {\n // Get data attribute value and remove it from target\n var title = getAttr(target, DATA_TITLE_ATTR);\n removeAttr(target, DATA_TITLE_ATTR); // Only restore the `title` attribute when the value is truthy\n\n if (title) {\n setAttr(target, 'title', title);\n }\n }\n },\n // --- BvEvent helpers ---\n buildEvent: function buildEvent(type) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // Defaults to a non-cancellable event\n return new BvEvent(type, _objectSpread({\n cancelable: false,\n target: this.getTarget(),\n relatedTarget: this.getTemplateElement() || null,\n componentId: this.computedId,\n vueTarget: this\n }, options));\n },\n emitEvent: function emitEvent(bvEvent) {\n var type = bvEvent.type;\n this.emitOnRoot(getRootEventName(this.templateType, type), bvEvent);\n this.$emit(type, bvEvent);\n },\n // --- Event handler setup methods ---\n listen: function listen() {\n var _this6 = this;\n\n // Enable trigger event handlers\n var el = this.getTarget();\n\n if (!el) {\n /* istanbul ignore next */\n return;\n } // Listen for global show/hide events\n\n\n this.setRootListener(true); // Set up our listeners on the target trigger element\n\n this.computedTriggers.forEach(function (trigger) {\n if (trigger === 'click') {\n eventOn(el, 'click', _this6.handleEvent, EVENT_OPTIONS_NO_CAPTURE);\n } else if (trigger === 'focus') {\n eventOn(el, 'focusin', _this6.handleEvent, EVENT_OPTIONS_NO_CAPTURE);\n eventOn(el, 'focusout', _this6.handleEvent, EVENT_OPTIONS_NO_CAPTURE);\n } else if (trigger === 'blur') {\n // Used to close $tip when element looses focus\n\n /* istanbul ignore next */\n eventOn(el, 'focusout', _this6.handleEvent, EVENT_OPTIONS_NO_CAPTURE);\n } else if (trigger === 'hover') {\n eventOn(el, 'mouseenter', _this6.handleEvent, EVENT_OPTIONS_NO_CAPTURE);\n eventOn(el, 'mouseleave', _this6.handleEvent, EVENT_OPTIONS_NO_CAPTURE);\n }\n }, this);\n },\n\n /* istanbul ignore next */\n unListen: function unListen() {\n var _this7 = this;\n\n // Remove trigger event handlers\n var events = ['click', 'focusin', 'focusout', 'mouseenter', 'mouseleave'];\n var target = this.getTarget(); // Stop listening for global show/hide/enable/disable events\n\n this.setRootListener(false); // Clear out any active target listeners\n\n events.forEach(function (event) {\n target && eventOff(target, event, _this7.handleEvent, EVENT_OPTIONS_NO_CAPTURE);\n }, this);\n },\n setRootListener: function setRootListener(on) {\n // Listen for global `bv::{hide|show}::{tooltip|popover}` hide request event\n var $root = this.$root;\n\n if ($root) {\n var method = on ? '$on' : '$off';\n var type = this.templateType;\n $root[method](getRootActionEventName(type, EVENT_NAME_HIDE), this.doHide);\n $root[method](getRootActionEventName(type, EVENT_NAME_SHOW), this.doShow);\n $root[method](getRootActionEventName(type, EVENT_NAME_DISABLE), this.doDisable);\n $root[method](getRootActionEventName(type, EVENT_NAME_ENABLE), this.doEnable);\n }\n },\n setWhileOpenListeners: function setWhileOpenListeners(on) {\n // Events that are only registered when the template is showing\n // Modal close events\n this.setModalListener(on); // Dropdown open events (if we are attached to a dropdown)\n\n this.setDropdownListener(on); // Periodic $element visibility check\n // For handling when tip target is in , tabs, carousel, etc\n\n this.visibleCheck(on); // On-touch start listeners\n\n this.setOnTouchStartListener(on);\n },\n // Handler for periodic visibility check\n visibleCheck: function visibleCheck(on) {\n var _this8 = this;\n\n this.clearVisibilityInterval();\n var target = this.getTarget();\n var tip = this.getTemplateElement();\n\n if (on) {\n this.$_visibleInterval = setInterval(function () {\n if (tip && _this8.localShow && (!target.parentNode || !isVisible(target))) {\n // Target element is no longer visible or not in DOM, so force-hide the tooltip\n _this8.forceHide();\n }\n }, 100);\n }\n },\n setModalListener: function setModalListener(on) {\n // Handle case where tooltip/target is in a modal\n if (this.isInModal()) {\n // We can listen for modal hidden events on `$root`\n this.$root[on ? '$on' : '$off'](ROOT_EVENT_NAME_MODAL_HIDDEN, this.forceHide);\n }\n },\n\n /* istanbul ignore next: JSDOM doesn't support `ontouchstart` */\n setOnTouchStartListener: function setOnTouchStartListener(on) {\n var _this9 = this;\n\n // If this is a touch-enabled device we add extra empty\n // `mouseover` listeners to the body's immediate children\n // Only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n arrayFrom(document.body.children).forEach(function (el) {\n eventOnOff(on, el, 'mouseover', _this9.$_noop);\n });\n }\n },\n setDropdownListener: function setDropdownListener(on) {\n var target = this.getTarget();\n\n if (!target || !this.$root || !this.isDropdown) {\n return;\n } // We can listen for dropdown shown events on its instance\n // TODO:\n // We could grab the ID from the dropdown, and listen for\n // $root events for that particular dropdown id\n // Dropdown shown and hidden events will need to emit\n // Note: Dropdown auto-ID happens in a `$nextTick()` after mount\n // So the ID lookup would need to be done in a `$nextTick()`\n\n\n if (target.__vue__) {\n target.__vue__[on ? '$on' : '$off'](EVENT_NAME_SHOWN, this.forceHide);\n }\n },\n // --- Event handlers ---\n handleEvent: function handleEvent(event) {\n // General trigger event handler\n // target is the trigger element\n var target = this.getTarget();\n\n if (!target || isDisabled(target) || !this.$_enabled || this.dropdownOpen()) {\n // If disabled or not enabled, or if a dropdown that is open, don't do anything\n // If tip is shown before element gets disabled, then tip will not\n // close until no longer disabled or forcefully closed\n return;\n }\n\n var type = event.type;\n var triggers = this.computedTriggers;\n\n if (type === 'click' && arrayIncludes(triggers, 'click')) {\n this.click(event);\n } else if (type === 'mouseenter' && arrayIncludes(triggers, 'hover')) {\n // `mouseenter` is a non-bubbling event\n this.enter(event);\n } else if (type === 'focusin' && arrayIncludes(triggers, 'focus')) {\n // `focusin` is a bubbling event\n // `event` includes `relatedTarget` (element losing focus)\n this.enter(event);\n } else if (type === 'focusout' && (arrayIncludes(triggers, 'focus') || arrayIncludes(triggers, 'blur')) || type === 'mouseleave' && arrayIncludes(triggers, 'hover')) {\n // `focusout` is a bubbling event\n // `mouseleave` is a non-bubbling event\n // `tip` is the template (will be null if not open)\n var tip = this.getTemplateElement(); // `eventTarget` is the element which is losing focus/hover and\n\n var eventTarget = event.target; // `relatedTarget` is the element gaining focus/hover\n\n var relatedTarget = event.relatedTarget;\n /* istanbul ignore next */\n\n if ( // From tip to target\n tip && contains(tip, eventTarget) && contains(target, relatedTarget) || // From target to tip\n tip && contains(target, eventTarget) && contains(tip, relatedTarget) || // Within tip\n tip && contains(tip, eventTarget) && contains(tip, relatedTarget) || // Within target\n contains(target, eventTarget) && contains(target, relatedTarget)) {\n // If focus/hover moves within `tip` and `target`, don't trigger a leave\n return;\n } // Otherwise trigger a leave\n\n\n this.leave(event);\n }\n },\n doHide: function doHide(id) {\n // Programmatically hide tooltip or popover\n if (!id || this.getTargetId() === id || this.computedId === id) {\n // Close all tooltips or popovers, or this specific tip (with ID)\n this.forceHide();\n }\n },\n doShow: function doShow(id) {\n // Programmatically show tooltip or popover\n if (!id || this.getTargetId() === id || this.computedId === id) {\n // Open all tooltips or popovers, or this specific tip (with ID)\n this.show();\n }\n },\n\n /*istanbul ignore next: ignore for now */\n doDisable: function doDisable(id)\n /*istanbul ignore next: ignore for now */\n {\n // Programmatically disable tooltip or popover\n if (!id || this.getTargetId() === id || this.computedId === id) {\n // Disable all tooltips or popovers (no ID), or this specific tip (with ID)\n this.disable();\n }\n },\n\n /*istanbul ignore next: ignore for now */\n doEnable: function doEnable(id)\n /*istanbul ignore next: ignore for now */\n {\n // Programmatically enable tooltip or popover\n if (!id || this.getTargetId() === id || this.computedId === id) {\n // Enable all tooltips or popovers (no ID), or this specific tip (with ID)\n this.enable();\n }\n },\n click: function click(event) {\n if (!this.$_enabled || this.dropdownOpen()) {\n /* istanbul ignore next */\n return;\n } // Get around a WebKit bug where `click` does not trigger focus events\n // On most browsers, `click` triggers a `focusin`/`focus` event first\n // Needed so that trigger 'click blur' works on iOS\n // https://github.com/bootstrap-vue/bootstrap-vue/issues/5099\n // We use `currentTarget` rather than `target` to trigger on the\n // element, not the inner content\n\n\n attemptFocus(event.currentTarget);\n this.activeTrigger.click = !this.activeTrigger.click;\n\n if (this.isWithActiveTrigger) {\n this.enter(null);\n } else {\n /* istanbul ignore next */\n this.leave(null);\n }\n },\n\n /* istanbul ignore next */\n toggle: function toggle() {\n // Manual toggle handler\n if (!this.$_enabled || this.dropdownOpen()) {\n /* istanbul ignore next */\n return;\n } // Should we register as an active trigger?\n // this.activeTrigger.manual = !this.activeTrigger.manual\n\n\n if (this.localShow) {\n this.leave(null);\n } else {\n this.enter(null);\n }\n },\n enter: function enter() {\n var _this10 = this;\n\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n // Opening trigger handler\n // Note: Click events are sent with event === null\n if (event) {\n this.activeTrigger[event.type === 'focusin' ? 'focus' : 'hover'] = true;\n }\n /* istanbul ignore next */\n\n\n if (this.localShow || this.$_hoverState === 'in') {\n this.$_hoverState = 'in';\n return;\n }\n\n this.clearHoverTimeout();\n this.$_hoverState = 'in';\n\n if (!this.computedDelay.show) {\n this.show();\n } else {\n // Hide any title attribute while enter delay is active\n this.fixTitle();\n this.$_hoverTimeout = setTimeout(function () {\n /* istanbul ignore else */\n if (_this10.$_hoverState === 'in') {\n _this10.show();\n } else if (!_this10.localShow) {\n _this10.restoreTitle();\n }\n }, this.computedDelay.show);\n }\n },\n leave: function leave() {\n var _this11 = this;\n\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n // Closing trigger handler\n // Note: Click events are sent with event === null\n if (event) {\n this.activeTrigger[event.type === 'focusout' ? 'focus' : 'hover'] = false;\n /* istanbul ignore next */\n\n if (event.type === 'focusout' && arrayIncludes(this.computedTriggers, 'blur')) {\n // Special case for `blur`: we clear out the other triggers\n this.activeTrigger.click = false;\n this.activeTrigger.hover = false;\n }\n }\n /* istanbul ignore next: ignore for now */\n\n\n if (this.isWithActiveTrigger) {\n return;\n }\n\n this.clearHoverTimeout();\n this.$_hoverState = 'out';\n\n if (!this.computedDelay.hide) {\n this.hide();\n } else {\n this.$_hoverTimeout = setTimeout(function () {\n if (_this11.$_hoverState === 'out') {\n _this11.hide();\n }\n }, this.computedDelay.hide);\n }\n }\n }\n});","export var PLACEMENT_TOP_START = 'top-start';\nexport var PLACEMENT_TOP_END = 'top-end';\nexport var PLACEMENT_BOTTOM_START = 'bottom-start';\nexport var PLACEMENT_BOTTOM_END = 'bottom-end';\nexport var PLACEMENT_RIGHT_START = 'right-start';\nexport var PLACEMENT_RIGHT_END = 'right-end';\nexport var PLACEMENT_LEFT_START = 'left-start';\nexport var PLACEMENT_LEFT_END = 'left-end';","import { Vue } from '../vue';\nimport { EVENT_OPTIONS_NO_CAPTURE } from '../constants/events';\nimport { contains } from '../utils/dom';\nimport { eventOn, eventOff } from '../utils/events'; // @vue/component\n\nexport var clickOutMixin = Vue.extend({\n data: function data() {\n return {\n listenForClickOut: false\n };\n },\n watch: {\n listenForClickOut: function listenForClickOut(newValue, oldValue) {\n if (newValue !== oldValue) {\n eventOff(this.clickOutElement, this.clickOutEventName, this._clickOutHandler, EVENT_OPTIONS_NO_CAPTURE);\n\n if (newValue) {\n eventOn(this.clickOutElement, this.clickOutEventName, this._clickOutHandler, EVENT_OPTIONS_NO_CAPTURE);\n }\n }\n }\n },\n beforeCreate: function beforeCreate() {\n // Declare non-reactive properties\n this.clickOutElement = null;\n this.clickOutEventName = null;\n },\n mounted: function mounted() {\n if (!this.clickOutElement) {\n this.clickOutElement = document;\n }\n\n if (!this.clickOutEventName) {\n this.clickOutEventName = 'click';\n }\n\n if (this.listenForClickOut) {\n eventOn(this.clickOutElement, this.clickOutEventName, this._clickOutHandler, EVENT_OPTIONS_NO_CAPTURE);\n }\n },\n beforeDestroy: function beforeDestroy() {\n eventOff(this.clickOutElement, this.clickOutEventName, this._clickOutHandler, EVENT_OPTIONS_NO_CAPTURE);\n },\n methods: {\n isClickOut: function isClickOut(event) {\n return !contains(this.$el, event.target);\n },\n _clickOutHandler: function _clickOutHandler(event) {\n if (this.clickOutHandler && this.isClickOut(event)) {\n this.clickOutHandler(event);\n }\n }\n }\n});","import { Vue } from '../vue';\nimport { EVENT_OPTIONS_NO_CAPTURE } from '../constants/events';\nimport { eventOn, eventOff } from '../utils/events'; // @vue/component\n\nexport var focusInMixin = Vue.extend({\n data: function data() {\n return {\n listenForFocusIn: false\n };\n },\n watch: {\n listenForFocusIn: function listenForFocusIn(newValue, oldValue) {\n if (newValue !== oldValue) {\n eventOff(this.focusInElement, 'focusin', this._focusInHandler, EVENT_OPTIONS_NO_CAPTURE);\n\n if (newValue) {\n eventOn(this.focusInElement, 'focusin', this._focusInHandler, EVENT_OPTIONS_NO_CAPTURE);\n }\n }\n }\n },\n beforeCreate: function beforeCreate() {\n // Declare non-reactive properties\n this.focusInElement = null;\n },\n mounted: function mounted() {\n if (!this.focusInElement) {\n this.focusInElement = document;\n }\n\n if (this.listenForFocusIn) {\n eventOn(this.focusInElement, 'focusin', this._focusInHandler, EVENT_OPTIONS_NO_CAPTURE);\n }\n },\n beforeDestroy: function beforeDestroy() {\n eventOff(this.focusInElement, 'focusin', this._focusInHandler, EVENT_OPTIONS_NO_CAPTURE);\n },\n methods: {\n _focusInHandler: function _focusInHandler(event) {\n if (this.focusInHandler) {\n this.focusInHandler(event);\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 Popper from 'popper.js';\nimport { Vue } from '../vue';\nimport { NAME_DROPDOWN } from '../constants/components';\nimport { EVENT_NAME_CLICK, EVENT_NAME_HIDDEN, EVENT_NAME_HIDE, EVENT_NAME_SHOW, EVENT_NAME_SHOWN, EVENT_NAME_TOGGLE } from '../constants/events';\nimport { CODE_DOWN, CODE_ENTER, CODE_ESC, CODE_SPACE, CODE_UP } from '../constants/key-codes';\nimport { PLACEMENT_TOP_START, PLACEMENT_TOP_END, PLACEMENT_BOTTOM_START, PLACEMENT_BOTTOM_END, PLACEMENT_RIGHT_START, PLACEMENT_LEFT_START } from '../constants/popper';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_NUMBER_STRING, PROP_TYPE_OBJECT, PROP_TYPE_STRING } from '../constants/props';\nimport { HTMLElement } from '../constants/safe-types';\nimport { BvEvent } from '../utils/bv-event.class';\nimport { attemptFocus, closest, contains, isVisible, requestAF, selectAll } from '../utils/dom';\nimport { getRootEventName, stopEvent } from '../utils/events';\nimport { isNull } from '../utils/inspect';\nimport { mergeDeep, sortKeys } from '../utils/object';\nimport { makeProp, makePropsConfigurable } from '../utils/props';\nimport { warn } from '../utils/warn';\nimport { clickOutMixin } from './click-out';\nimport { focusInMixin } from './focus-in';\nimport { idMixin, props as idProps } from './id';\nimport { listenOnRootMixin } from './listen-on-root'; // --- Constants ---\n\nvar ROOT_EVENT_NAME_SHOWN = getRootEventName(NAME_DROPDOWN, EVENT_NAME_SHOWN);\nvar ROOT_EVENT_NAME_HIDDEN = getRootEventName(NAME_DROPDOWN, EVENT_NAME_HIDDEN); // CSS selectors\n\nvar SELECTOR_FORM_CHILD = '.dropdown form';\nvar SELECTOR_ITEM = ['.dropdown-item', '.b-dropdown-form'].map(function (selector) {\n return \"\".concat(selector, \":not(.disabled):not([disabled])\");\n}).join(', '); // --- Helper methods ---\n// Return an array of visible items\n\nvar filterVisibles = function filterVisibles(els) {\n return (els || []).filter(isVisible);\n}; // --- Props ---\n\n\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread({}, idProps), {}, {\n // String: `scrollParent`, `window` or `viewport`\n // HTMLElement: HTML Element reference\n boundary: makeProp([HTMLElement, PROP_TYPE_STRING], 'scrollParent'),\n disabled: makeProp(PROP_TYPE_BOOLEAN, false),\n // Place left if possible\n dropleft: makeProp(PROP_TYPE_BOOLEAN, false),\n // Place right if possible\n dropright: makeProp(PROP_TYPE_BOOLEAN, false),\n // Place on top if possible\n dropup: makeProp(PROP_TYPE_BOOLEAN, false),\n // Disable auto-flipping of menu from bottom <=> top\n noFlip: makeProp(PROP_TYPE_BOOLEAN, false),\n // Number of pixels or a CSS unit value to offset menu\n // (i.e. `1px`, `1rem`, etc.)\n offset: makeProp(PROP_TYPE_NUMBER_STRING, 0),\n popperOpts: makeProp(PROP_TYPE_OBJECT, {}),\n // Right align menu (default is left align)\n right: makeProp(PROP_TYPE_BOOLEAN, false)\n})), NAME_DROPDOWN); // --- Mixin ---\n// @vue/component\n\nexport var dropdownMixin = Vue.extend({\n mixins: [idMixin, listenOnRootMixin, clickOutMixin, focusInMixin],\n provide: function provide() {\n return {\n bvDropdown: this\n };\n },\n inject: {\n bvNavbar: {\n default: null\n }\n },\n props: props,\n data: function data() {\n return {\n visible: false,\n visibleChangePrevented: false\n };\n },\n computed: {\n inNavbar: function inNavbar() {\n return !isNull(this.bvNavbar);\n },\n toggler: function toggler() {\n var toggle = this.$refs.toggle;\n return toggle ? toggle.$el || toggle : null;\n },\n directionClass: function directionClass() {\n if (this.dropup) {\n return 'dropup';\n } else if (this.dropright) {\n return 'dropright';\n } else if (this.dropleft) {\n return 'dropleft';\n }\n\n return '';\n },\n boundaryClass: function boundaryClass() {\n // Position `static` is needed to allow menu to \"breakout\" of the `scrollParent`\n // boundaries when boundary is anything other than `scrollParent`\n // See: https://github.com/twbs/bootstrap/issues/24251#issuecomment-341413786\n return this.boundary !== 'scrollParent' && !this.inNavbar ? 'position-static' : '';\n }\n },\n watch: {\n visible: function visible(newValue, oldValue) {\n if (this.visibleChangePrevented) {\n this.visibleChangePrevented = false;\n return;\n }\n\n if (newValue !== oldValue) {\n var eventName = newValue ? EVENT_NAME_SHOW : EVENT_NAME_HIDE;\n var bvEvent = new BvEvent(eventName, {\n cancelable: true,\n vueTarget: this,\n target: this.$refs.menu,\n relatedTarget: null,\n componentId: this.safeId ? this.safeId() : this.id || null\n });\n this.emitEvent(bvEvent);\n\n if (bvEvent.defaultPrevented) {\n // Reset value and exit if canceled\n this.visibleChangePrevented = true;\n this.visible = oldValue; // Just in case a child element triggered `this.hide(true)`\n\n this.$off(EVENT_NAME_HIDDEN, this.focusToggler);\n return;\n }\n\n if (newValue) {\n this.showMenu();\n } else {\n this.hideMenu();\n }\n }\n },\n disabled: function disabled(newValue, oldValue) {\n if (newValue !== oldValue && newValue && this.visible) {\n // Hide dropdown if disabled changes to true\n this.visible = false;\n }\n }\n },\n created: function created() {\n // Create private non-reactive props\n this.$_popper = null;\n this.$_hideTimeout = null;\n },\n\n /* istanbul ignore next */\n deactivated: function deactivated() {\n // In case we are inside a ``\n this.visible = false;\n this.whileOpenListen(false);\n this.destroyPopper();\n },\n beforeDestroy: function beforeDestroy() {\n this.visible = false;\n this.whileOpenListen(false);\n this.destroyPopper();\n this.clearHideTimeout();\n },\n methods: {\n // Event emitter\n emitEvent: function emitEvent(bvEvent) {\n var type = bvEvent.type;\n this.emitOnRoot(getRootEventName(NAME_DROPDOWN, type), bvEvent);\n this.$emit(type, bvEvent);\n },\n showMenu: function showMenu() {\n var _this = this;\n\n if (this.disabled) {\n /* istanbul ignore next */\n return;\n } // Only instantiate Popper.js when dropdown is not in ``\n\n\n if (!this.inNavbar) {\n if (typeof Popper === 'undefined') {\n /* istanbul ignore next */\n warn('Popper.js not found. Falling back to CSS positioning', NAME_DROPDOWN);\n } else {\n // For dropup with alignment we use the parent element as popper container\n var el = this.dropup && this.right || this.split ? this.$el : this.$refs.toggle; // Make sure we have a reference to an element, not a component!\n\n el = el.$el || el; // Instantiate Popper.js\n\n this.createPopper(el);\n }\n } // Ensure other menus are closed\n\n\n this.emitOnRoot(ROOT_EVENT_NAME_SHOWN, this); // Enable listeners\n\n this.whileOpenListen(true); // Wrap in `$nextTick()` to ensure menu is fully rendered/shown\n\n this.$nextTick(function () {\n // Focus on the menu container on show\n _this.focusMenu(); // Emit the shown event\n\n\n _this.$emit(EVENT_NAME_SHOWN);\n });\n },\n hideMenu: function hideMenu() {\n this.whileOpenListen(false);\n this.emitOnRoot(ROOT_EVENT_NAME_HIDDEN, this);\n this.$emit(EVENT_NAME_HIDDEN);\n this.destroyPopper();\n },\n createPopper: function createPopper(element) {\n this.destroyPopper();\n this.$_popper = new Popper(element, this.$refs.menu, this.getPopperConfig());\n },\n // Ensure popper event listeners are removed cleanly\n destroyPopper: function destroyPopper() {\n this.$_popper && this.$_popper.destroy();\n this.$_popper = null;\n },\n // Instructs popper to re-computes the dropdown position\n // useful if the content changes size\n updatePopper: function updatePopper() {\n try {\n this.$_popper.scheduleUpdate();\n } catch (_unused) {}\n },\n clearHideTimeout: function clearHideTimeout() {\n clearTimeout(this.$_hideTimeout);\n this.$_hideTimeout = null;\n },\n getPopperConfig: function getPopperConfig() {\n var placement = PLACEMENT_BOTTOM_START;\n\n if (this.dropup) {\n placement = this.right ? PLACEMENT_TOP_END : PLACEMENT_TOP_START;\n } else if (this.dropright) {\n placement = PLACEMENT_RIGHT_START;\n } else if (this.dropleft) {\n placement = PLACEMENT_LEFT_START;\n } else if (this.right) {\n placement = PLACEMENT_BOTTOM_END;\n }\n\n var popperConfig = {\n placement: placement,\n modifiers: {\n offset: {\n offset: this.offset || 0\n },\n flip: {\n enabled: !this.noFlip\n }\n }\n };\n var boundariesElement = this.boundary;\n\n if (boundariesElement) {\n popperConfig.modifiers.preventOverflow = {\n boundariesElement: boundariesElement\n };\n }\n\n return mergeDeep(popperConfig, this.popperOpts || {});\n },\n // Turn listeners on/off while open\n whileOpenListen: function whileOpenListen(isOpen) {\n // Hide the dropdown when clicked outside\n this.listenForClickOut = isOpen; // Hide the dropdown when it loses focus\n\n this.listenForFocusIn = isOpen; // Hide the dropdown when another dropdown is opened\n\n var method = isOpen ? '$on' : '$off';\n this.$root[method](ROOT_EVENT_NAME_SHOWN, this.rootCloseListener);\n },\n rootCloseListener: function rootCloseListener(vm) {\n if (vm !== this) {\n this.visible = false;\n }\n },\n // Public method to show dropdown\n show: function show() {\n var _this2 = this;\n\n if (this.disabled) {\n return;\n } // Wrap in a `requestAF()` to allow any previous\n // click handling to occur first\n\n\n requestAF(function () {\n _this2.visible = true;\n });\n },\n // Public method to hide dropdown\n hide: function hide() {\n var refocus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n /* istanbul ignore next */\n if (this.disabled) {\n return;\n }\n\n this.visible = false;\n\n if (refocus) {\n // Child element is closing the dropdown on click\n this.$once(EVENT_NAME_HIDDEN, this.focusToggler);\n }\n },\n // Called only by a button that toggles the menu\n toggle: function toggle(event) {\n event = event || {}; // Early exit when not a click event or ENTER, SPACE or DOWN were pressed\n\n var _event = event,\n type = _event.type,\n keyCode = _event.keyCode;\n\n if (type !== 'click' && !(type === 'keydown' && [CODE_ENTER, CODE_SPACE, CODE_DOWN].indexOf(keyCode) !== -1)) {\n /* istanbul ignore next */\n return;\n }\n /* istanbul ignore next */\n\n\n if (this.disabled) {\n this.visible = false;\n return;\n }\n\n this.$emit(EVENT_NAME_TOGGLE, event);\n stopEvent(event); // Toggle visibility\n\n if (this.visible) {\n this.hide(true);\n } else {\n this.show();\n }\n },\n // Mousedown handler for the toggle\n\n /* istanbul ignore next */\n onMousedown: function onMousedown(event) {\n // We prevent the 'mousedown' event for the toggle to stop the\n // 'focusin' event from being fired\n // The event would otherwise be picked up by the global 'focusin'\n // listener and there is no cross-browser solution to detect it\n // relates to the toggle click\n // The 'click' event will still be fired and we handle closing\n // other dropdowns there too\n // See https://github.com/bootstrap-vue/bootstrap-vue/issues/4328\n stopEvent(event, {\n propagation: false\n });\n },\n // Called from dropdown menu context\n onKeydown: function onKeydown(event) {\n var keyCode = event.keyCode;\n\n if (keyCode === CODE_ESC) {\n // Close on ESC\n this.onEsc(event);\n } else if (keyCode === CODE_DOWN) {\n // Down Arrow\n this.focusNext(event, false);\n } else if (keyCode === CODE_UP) {\n // Up Arrow\n this.focusNext(event, true);\n }\n },\n // If user presses ESC, close the menu\n onEsc: function onEsc(event) {\n if (this.visible) {\n this.visible = false;\n stopEvent(event); // Return focus to original trigger button\n\n this.$once(EVENT_NAME_HIDDEN, this.focusToggler);\n }\n },\n // Called only in split button mode, for the split button\n onSplitClick: function onSplitClick(event) {\n /* istanbul ignore next */\n if (this.disabled) {\n this.visible = false;\n return;\n }\n\n this.$emit(EVENT_NAME_CLICK, event);\n },\n // Shared hide handler between click-out and focus-in events\n hideHandler: function hideHandler(event) {\n var _this3 = this;\n\n var target = event.target;\n\n if (this.visible && !contains(this.$refs.menu, target) && !contains(this.toggler, target)) {\n this.clearHideTimeout();\n this.$_hideTimeout = setTimeout(function () {\n return _this3.hide();\n }, this.inNavbar ? 300 : 0);\n }\n },\n // Document click-out listener\n clickOutHandler: function clickOutHandler(event) {\n this.hideHandler(event);\n },\n // Document focus-in listener\n focusInHandler: function focusInHandler(event) {\n this.hideHandler(event);\n },\n // Keyboard nav\n focusNext: function focusNext(event, up) {\n var _this4 = this;\n\n // Ignore key up/down on form elements\n var target = event.target;\n\n if (!this.visible || event && closest(SELECTOR_FORM_CHILD, target)) {\n /* istanbul ignore next: should never happen */\n return;\n }\n\n stopEvent(event);\n this.$nextTick(function () {\n var items = _this4.getItems();\n\n if (items.length < 1) {\n /* istanbul ignore next: should never happen */\n return;\n }\n\n var index = items.indexOf(target);\n\n if (up && index > 0) {\n index--;\n } else if (!up && index < items.length - 1) {\n index++;\n }\n\n if (index < 0) {\n /* istanbul ignore next: should never happen */\n index = 0;\n }\n\n _this4.focusItem(index, items);\n });\n },\n focusItem: function focusItem(index, items) {\n var el = items.find(function (el, i) {\n return i === index;\n });\n attemptFocus(el);\n },\n getItems: function getItems() {\n // Get all items\n return filterVisibles(selectAll(SELECTOR_ITEM, this.$refs.menu));\n },\n focusMenu: function focusMenu() {\n attemptFocus(this.$refs.menu);\n },\n focusToggler: function focusToggler() {\n var _this5 = this;\n\n this.$nextTick(function () {\n attemptFocus(_this5.toggler);\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_OVERLAY } from '../../constants/components';\nimport { EVENT_NAME_CLICK, EVENT_NAME_HIDDEN, EVENT_NAME_SHOWN } from '../../constants/events';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_BOOLEAN_STRING, PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_OVERLAY } from '../../constants/slots';\nimport { toFloat } from '../../utils/number';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { BSpinner } from '../spinner/spinner';\nimport { BVTransition } from '../transition/bv-transition'; // --- Constants ---\n\nvar POSITION_COVER = {\n top: 0,\n left: 0,\n bottom: 0,\n right: 0\n}; // --- Props ---\n\nexport var props = makePropsConfigurable({\n // Alternative to variant, allowing a specific\n // CSS color to be applied to the overlay\n bgColor: makeProp(PROP_TYPE_STRING),\n blur: makeProp(PROP_TYPE_STRING, '2px'),\n fixed: makeProp(PROP_TYPE_BOOLEAN, false),\n noCenter: makeProp(PROP_TYPE_BOOLEAN, false),\n noFade: makeProp(PROP_TYPE_BOOLEAN, false),\n // If `true, does not render the default slot\n // and switches to absolute positioning\n noWrap: makeProp(PROP_TYPE_BOOLEAN, false),\n opacity: makeProp(PROP_TYPE_NUMBER_STRING, 0.85, function (value) {\n var number = toFloat(value, 0);\n return number >= 0 && number <= 1;\n }),\n overlayTag: makeProp(PROP_TYPE_STRING, 'div'),\n rounded: makeProp(PROP_TYPE_BOOLEAN_STRING, false),\n show: makeProp(PROP_TYPE_BOOLEAN, false),\n spinnerSmall: makeProp(PROP_TYPE_BOOLEAN, false),\n spinnerType: makeProp(PROP_TYPE_STRING, 'border'),\n spinnerVariant: makeProp(PROP_TYPE_STRING),\n variant: makeProp(PROP_TYPE_STRING, 'light'),\n wrapTag: makeProp(PROP_TYPE_STRING, 'div'),\n zIndex: makeProp(PROP_TYPE_NUMBER_STRING, 10)\n}, NAME_OVERLAY); // --- Main component ---\n// @vue/component\n\nexport var BOverlay = /*#__PURE__*/Vue.extend({\n name: NAME_OVERLAY,\n mixins: [normalizeSlotMixin],\n props: props,\n computed: {\n computedRounded: function computedRounded() {\n var rounded = this.rounded;\n return rounded === true || rounded === '' ? 'rounded' : !rounded ? '' : \"rounded-\".concat(rounded);\n },\n computedVariant: function computedVariant() {\n var variant = this.variant;\n return variant && !this.bgColor ? \"bg-\".concat(variant) : '';\n },\n slotScope: function slotScope() {\n return {\n spinnerType: this.spinnerType || null,\n spinnerVariant: this.spinnerVariant || null,\n spinnerSmall: this.spinnerSmall\n };\n }\n },\n methods: {\n defaultOverlayFn: function defaultOverlayFn(_ref) {\n var spinnerType = _ref.spinnerType,\n spinnerVariant = _ref.spinnerVariant,\n spinnerSmall = _ref.spinnerSmall;\n return this.$createElement(BSpinner, {\n props: {\n type: spinnerType,\n variant: spinnerVariant,\n small: spinnerSmall\n }\n });\n }\n },\n render: function render(h) {\n var _this = this;\n\n var show = this.show,\n fixed = this.fixed,\n noFade = this.noFade,\n noWrap = this.noWrap,\n slotScope = this.slotScope;\n var $overlay = h();\n\n if (show) {\n var $background = h('div', {\n staticClass: 'position-absolute',\n class: [this.computedVariant, this.computedRounded],\n style: _objectSpread(_objectSpread({}, POSITION_COVER), {}, {\n opacity: this.opacity,\n backgroundColor: this.bgColor || null,\n backdropFilter: this.blur ? \"blur(\".concat(this.blur, \")\") : null\n })\n });\n var $content = h('div', {\n staticClass: 'position-absolute',\n style: this.noCenter ?\n /* istanbul ignore next */\n _objectSpread({}, POSITION_COVER) : {\n top: '50%',\n left: '50%',\n transform: 'translateX(-50%) translateY(-50%)'\n }\n }, [this.normalizeSlot(SLOT_NAME_OVERLAY, slotScope) || this.defaultOverlayFn(slotScope)]);\n $overlay = h(this.overlayTag, {\n staticClass: 'b-overlay',\n class: {\n 'position-absolute': !noWrap || noWrap && !fixed,\n 'position-fixed': noWrap && fixed\n },\n style: _objectSpread(_objectSpread({}, POSITION_COVER), {}, {\n zIndex: this.zIndex || 10\n }),\n on: {\n click: function click(event) {\n return _this.$emit(EVENT_NAME_CLICK, event);\n }\n },\n key: 'overlay'\n }, [$background, $content]);\n } // Wrap in a fade transition\n\n\n $overlay = h(BVTransition, {\n props: {\n noFade: noFade,\n appear: true\n },\n on: {\n 'after-enter': function afterEnter() {\n return _this.$emit(EVENT_NAME_SHOWN);\n },\n 'after-leave': function afterLeave() {\n return _this.$emit(EVENT_NAME_HIDDEN);\n }\n }\n }, [$overlay]);\n\n if (noWrap) {\n return $overlay;\n }\n\n return h(this.wrapTag, {\n staticClass: 'b-overlay-wrap position-relative',\n attrs: {\n 'aria-busy': show ? 'true' : null\n }\n }, noWrap ? [$overlay] : [this.normalizeSlot(), $overlay]);\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_DROPDOWN_ITEM } from '../../constants/components';\nimport { EVENT_NAME_CLICK } from '../../constants/events';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../constants/props';\nimport { requestAF } from '../../utils/dom';\nimport { omit, sortKeys } from '../../utils/object';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { BLink, props as BLinkProps } from '../link/link'; // --- Props ---\n\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread({}, omit(BLinkProps, ['event', 'routerTag'])), {}, {\n linkClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n variant: makeProp(PROP_TYPE_STRING)\n})), NAME_DROPDOWN_ITEM); // --- Main component ---\n// @vue/component\n\nexport var BDropdownItem = /*#__PURE__*/Vue.extend({\n name: NAME_DROPDOWN_ITEM,\n mixins: [attrsMixin, normalizeSlotMixin],\n inject: {\n bvDropdown: {\n default: null\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n computedAttrs: function computedAttrs() {\n return _objectSpread(_objectSpread({}, this.bvAttrs), {}, {\n role: 'menuitem'\n });\n }\n },\n methods: {\n closeDropdown: function closeDropdown() {\n var _this = this;\n\n // Close on next animation frame to allow time to process\n requestAF(function () {\n if (_this.bvDropdown) {\n _this.bvDropdown.hide(true);\n }\n });\n },\n onClick: function onClick(event) {\n this.$emit(EVENT_NAME_CLICK, event);\n this.closeDropdown();\n }\n },\n render: function render(h) {\n var linkClass = this.linkClass,\n variant = this.variant,\n active = this.active,\n disabled = this.disabled,\n onClick = this.onClick,\n bvAttrs = this.bvAttrs;\n return h('li', {\n class: bvAttrs.class,\n style: bvAttrs.style,\n attrs: {\n role: 'presentation'\n }\n }, [h(BLink, {\n staticClass: 'dropdown-item',\n class: [linkClass, _defineProperty({}, \"text-\".concat(variant), variant && !(active || disabled))],\n props: this.$props,\n attrs: this.computedAttrs,\n on: {\n click: onClick\n },\n ref: 'item'\n }, this.normalizeSlot())]);\n }\n});","'use strict';\nvar $ = require('../internals/export');\nvar toInteger = require('../internals/to-integer');\nvar thisNumberValue = require('../internals/this-number-value');\nvar repeat = require('../internals/string-repeat');\nvar fails = require('../internals/fails');\n\nvar nativeToFixed = 1.0.toFixed;\nvar floor = Math.floor;\n\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\n\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\nvar FORCED = nativeToFixed && (\n 0.00008.toFixed(3) !== '0.000' ||\n 0.9.toFixed(0) !== '1' ||\n 1.255.toFixed(2) !== '1.25' ||\n 1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n) || !fails(function () {\n // V8 ~ Android 4.3-\n nativeToFixed.call({});\n});\n\n// `Number.prototype.toFixed` method\n// https://tc39.github.io/ecma262/#sec-number.prototype.tofixed\n$({ target: 'Number', proto: true, forced: FORCED }, {\n // eslint-disable-next-line max-statements\n toFixed: function toFixed(fractionDigits) {\n var number = thisNumberValue(this);\n var fractDigits = toInteger(fractionDigits);\n var data = [0, 0, 0, 0, 0, 0];\n var sign = '';\n var result = '0';\n var e, z, j, k;\n\n var multiply = function (n, c) {\n var index = -1;\n var c2 = c;\n while (++index < 6) {\n c2 += n * data[index];\n data[index] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n };\n\n var divide = function (n) {\n var index = 6;\n var c = 0;\n while (--index >= 0) {\n c += data[index];\n data[index] = floor(c / n);\n c = (c % n) * 1e7;\n }\n };\n\n var dataToString = function () {\n var index = 6;\n var s = '';\n while (--index >= 0) {\n if (s !== '' || index === 0 || data[index] !== 0) {\n var t = String(data[index]);\n s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t;\n }\n } return s;\n };\n\n if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');\n // eslint-disable-next-line no-self-compare\n if (number != number) return 'NaN';\n if (number <= -1e21 || number >= 1e21) return String(number);\n if (number < 0) {\n sign = '-';\n number = -number;\n }\n if (number > 1e-21) {\n e = log(number * pow(2, 69, 1)) - 69;\n z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(0, z);\n j = fractDigits;\n while (j >= 7) {\n multiply(1e7, 0);\n j -= 7;\n }\n multiply(pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(1 << 23);\n j -= 23;\n }\n divide(1 << j);\n multiply(1, 1);\n divide(2);\n result = dataToString();\n } else {\n multiply(0, z);\n multiply(1 << -e, 0);\n result = dataToString() + repeat.call('0', fractDigits);\n }\n }\n if (fractDigits > 0) {\n k = result.length;\n result = sign + (k <= fractDigits\n ? '0.' + repeat.call('0', fractDigits - k) + result\n : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));\n } else {\n result = sign + result;\n } return result;\n }\n});\n","export var CALENDAR_GREGORY = 'gregory';\nexport var CALENDAR_LONG = 'long';\nexport var CALENDAR_NARROW = 'narrow';\nexport var CALENDAR_SHORT = 'short';\nexport var DATE_FORMAT_2_DIGIT = '2-digit';\nexport var DATE_FORMAT_NUMERIC = 'numeric';","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure 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 _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 _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n// Date utility functions\nimport { CALENDAR_GREGORY } from '../constants/date';\nimport { RX_DATE, RX_DATE_SPLIT } from '../constants/regex';\nimport { concat } from './array';\nimport { identity } from './identity';\nimport { isDate, isString } from './inspect';\nimport { toInteger } from './number'; // --- Date utility methods ---\n// Create or clone a date (`new Date(...)` shortcut)\n\nexport var createDate = function createDate() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _construct(Date, args);\n}; // Parse a date sting, or Date object, into a Date object (with no time information)\n\nexport var parseYMD = function parseYMD(date) {\n if (isString(date) && RX_DATE.test(date.trim())) {\n var _date$split$map = date.split(RX_DATE_SPLIT).map(function (v) {\n return toInteger(v, 1);\n }),\n _date$split$map2 = _slicedToArray(_date$split$map, 3),\n year = _date$split$map2[0],\n month = _date$split$map2[1],\n day = _date$split$map2[2];\n\n return createDate(year, month - 1, day);\n } else if (isDate(date)) {\n return createDate(date.getFullYear(), date.getMonth(), date.getDate());\n }\n\n return null;\n}; // Format a date object as `YYYY-MM-DD` format\n\nexport var formatYMD = function formatYMD(date) {\n date = parseYMD(date);\n\n if (!date) {\n return null;\n }\n\n var year = date.getFullYear();\n var month = \"0\".concat(date.getMonth() + 1).slice(-2);\n var day = \"0\".concat(date.getDate()).slice(-2);\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day);\n}; // Given a locale (or locales), resolve the browser available locale\n\nexport var resolveLocale = function resolveLocale(locales)\n/* istanbul ignore next */\n{\n var calendar = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : CALENDAR_GREGORY;\n locales = concat(locales).filter(identity);\n var fmt = new Intl.DateTimeFormat(locales, {\n calendar: calendar\n });\n return fmt.resolvedOptions().locale;\n}; // Create a `Intl.DateTimeFormat` formatter function\n\nexport var createDateFormatter = function createDateFormatter(locale, options)\n/* istanbul ignore next */\n{\n var dtf = new Intl.DateTimeFormat(locale, options);\n return dtf.format;\n}; // Determine if two dates are the same date (ignoring time portion)\n\nexport var datesEqual = function datesEqual(date1, date2) {\n // Returns true of the date portion of two date objects are equal\n // We don't compare the time portion\n return formatYMD(date1) === formatYMD(date2);\n}; // --- Date \"math\" utility methods (for BCalendar component mainly) ---\n\nexport var firstDateOfMonth = function firstDateOfMonth(date) {\n date = createDate(date);\n date.setDate(1);\n return date;\n};\nexport var lastDateOfMonth = function lastDateOfMonth(date) {\n date = createDate(date);\n date.setMonth(date.getMonth() + 1);\n date.setDate(0);\n return date;\n};\nexport var addYears = function addYears(date, numberOfYears) {\n date = createDate(date);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear() + numberOfYears); // Handle Feb 29th for leap years\n\n if (date.getMonth() !== month) {\n date.setDate(0);\n }\n\n return date;\n};\nexport var oneMonthAgo = function oneMonthAgo(date) {\n date = createDate(date);\n var month = date.getMonth();\n date.setMonth(month - 1); // Handle when days in month are different\n\n if (date.getMonth() === month) {\n date.setDate(0);\n }\n\n return date;\n};\nexport var oneMonthAhead = function oneMonthAhead(date) {\n date = createDate(date);\n var month = date.getMonth();\n date.setMonth(month + 1); // Handle when days in month are different\n\n if (date.getMonth() === (month + 2) % 12) {\n date.setDate(0);\n }\n\n return date;\n};\nexport var oneYearAgo = function oneYearAgo(date) {\n return addYears(date, -1);\n};\nexport var oneYearAhead = function oneYearAhead(date) {\n return addYears(date, 1);\n};\nexport var oneDecadeAgo = function oneDecadeAgo(date) {\n return addYears(date, -10);\n};\nexport var oneDecadeAhead = function oneDecadeAhead(date) {\n return addYears(date, 10);\n}; // Helper function to constrain a date between two values\n// Always returns a `Date` object or `null` if no date passed\n\nexport var constrainDate = function constrainDate(date) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n // Ensure values are `Date` objects (or `null`)\n date = parseYMD(date);\n min = parseYMD(min) || date;\n max = parseYMD(max) || date; // Return a new `Date` object (or `null`)\n\n return date ? date < min ? min : date > max ? max : date : null;\n};","var _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 { NAME_CALENDAR } from '../../constants/components';\nimport { CALENDAR_GREGORY, CALENDAR_LONG, CALENDAR_NARROW, CALENDAR_SHORT, DATE_FORMAT_2_DIGIT, DATE_FORMAT_NUMERIC } from '../../constants/date';\nimport { EVENT_NAME_CONTEXT, EVENT_NAME_SELECTED } from '../../constants/events';\nimport { CODE_DOWN, CODE_END, CODE_ENTER, CODE_HOME, CODE_LEFT, CODE_PAGEDOWN, CODE_PAGEUP, CODE_RIGHT, CODE_SPACE, CODE_UP } from '../../constants/key-codes';\nimport { PROP_TYPE_ARRAY_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_DATE_STRING, PROP_TYPE_FUNCTION, PROP_TYPE_NUMBER_STRING, PROP_TYPE_OBJECT, PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_NAV_NEXT_DECADE, SLOT_NAME_NAV_NEXT_MONTH, SLOT_NAME_NAV_NEXT_YEAR, SLOT_NAME_NAV_PEV_DECADE, SLOT_NAME_NAV_PEV_MONTH, SLOT_NAME_NAV_PEV_YEAR, SLOT_NAME_NAV_THIS_MONTH } from '../../constants/slots';\nimport { arrayIncludes, concat } from '../../utils/array';\nimport { createDate, createDateFormatter, constrainDate as _constrainDate, datesEqual, firstDateOfMonth, formatYMD, lastDateOfMonth, oneMonthAgo, oneMonthAhead, oneYearAgo, oneYearAhead, oneDecadeAgo, oneDecadeAhead, parseYMD, resolveLocale } from '../../utils/date';\nimport { attemptBlur, attemptFocus, requestAF } from '../../utils/dom';\nimport { stopEvent } from '../../utils/events';\nimport { identity } from '../../utils/identity';\nimport { isArray, isPlainObject, isString } from '../../utils/inspect';\nimport { isLocaleRTL } from '../../utils/locale';\nimport { looseEqual } from '../../utils/loose-equal';\nimport { mathMax } from '../../utils/math';\nimport { makeModelMixin } from '../../utils/model';\nimport { toInteger } from '../../utils/number';\nimport { sortKeys } from '../../utils/object';\nimport { hasPropFunction, makeProp, makePropsConfigurable } from '../../utils/props';\nimport { toString } from '../../utils/string';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { idMixin, props as idProps } from '../../mixins/id';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { BIconChevronLeft, BIconChevronDoubleLeft, BIconChevronBarLeft, BIconCircleFill } from '../../icons/icons'; // --- Constants ---\n\nvar _makeModelMixin = makeModelMixin('value', {\n type: PROP_TYPE_DATE_STRING\n}),\n modelMixin = _makeModelMixin.mixin,\n modelProps = _makeModelMixin.props,\n MODEL_PROP_NAME = _makeModelMixin.prop,\n MODEL_EVENT_NAME = _makeModelMixin.event; // --- Props ---\n\n\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread(_objectSpread({}, idProps), modelProps), {}, {\n ariaControls: makeProp(PROP_TYPE_STRING),\n // Makes calendar the full width of its parent container\n block: makeProp(PROP_TYPE_BOOLEAN, false),\n dateDisabledFn: makeProp(PROP_TYPE_FUNCTION),\n // `Intl.DateTimeFormat` object\n dateFormatOptions: makeProp(PROP_TYPE_OBJECT, {\n year: DATE_FORMAT_NUMERIC,\n month: CALENDAR_LONG,\n day: DATE_FORMAT_NUMERIC,\n weekday: CALENDAR_LONG\n }),\n // Function to set a class of (classes) on the date cell\n // if passed a string or an array\n // TODO:\n // If the function returns an object, look for class prop for classes,\n // and other props for handling events/details/descriptions\n dateInfoFn: makeProp(PROP_TYPE_FUNCTION),\n // 'ltr', 'rtl', or `null` (for auto detect)\n direction: makeProp(PROP_TYPE_STRING),\n disabled: makeProp(PROP_TYPE_BOOLEAN, false),\n // When `true`, renders a comment node, but keeps the component instance active\n // Mainly for , so that we can get the component's value and locale\n // But we might just use separate date formatters, using the resolved locale\n // (adjusted for the gregorian calendar)\n hidden: makeProp(PROP_TYPE_BOOLEAN, false),\n // When `true` makes the selected date header `sr-only`\n hideHeader: makeProp(PROP_TYPE_BOOLEAN, false),\n // This specifies the calendar year/month/day that will be shown when\n // first opening the datepicker if no v-model value is provided\n // Default is the current date (or `min`/`max`)\n initialDate: makeProp(PROP_TYPE_DATE_STRING),\n // Labels for buttons and keyboard shortcuts\n labelCalendar: makeProp(PROP_TYPE_STRING, 'Calendar'),\n labelCurrentMonth: makeProp(PROP_TYPE_STRING, 'Current month'),\n labelHelp: makeProp(PROP_TYPE_STRING, 'Use cursor keys to navigate calendar dates'),\n labelNav: makeProp(PROP_TYPE_STRING, 'Calendar navigation'),\n labelNextDecade: makeProp(PROP_TYPE_STRING, 'Next decade'),\n labelNextMonth: makeProp(PROP_TYPE_STRING, 'Next month'),\n labelNextYear: makeProp(PROP_TYPE_STRING, 'Next year'),\n labelNoDateSelected: makeProp(PROP_TYPE_STRING, 'No date selected'),\n labelPrevDecade: makeProp(PROP_TYPE_STRING, 'Previous decade'),\n labelPrevMonth: makeProp(PROP_TYPE_STRING, 'Previous month'),\n labelPrevYear: makeProp(PROP_TYPE_STRING, 'Previous year'),\n labelSelected: makeProp(PROP_TYPE_STRING, 'Selected date'),\n labelToday: makeProp(PROP_TYPE_STRING, 'Today'),\n // Locale(s) to use\n // Default is to use page/browser default setting\n locale: makeProp(PROP_TYPE_ARRAY_STRING),\n max: makeProp(PROP_TYPE_DATE_STRING),\n min: makeProp(PROP_TYPE_DATE_STRING),\n // Variant color to use for the navigation buttons\n navButtonVariant: makeProp(PROP_TYPE_STRING, 'secondary'),\n // Disable highlighting today's date\n noHighlightToday: makeProp(PROP_TYPE_BOOLEAN, false),\n noKeyNav: makeProp(PROP_TYPE_BOOLEAN, false),\n readonly: makeProp(PROP_TYPE_BOOLEAN, false),\n roleDescription: makeProp(PROP_TYPE_STRING),\n // Variant color to use for the selected date\n selectedVariant: makeProp(PROP_TYPE_STRING, 'primary'),\n // When `true` enables the decade navigation buttons\n showDecadeNav: makeProp(PROP_TYPE_BOOLEAN, false),\n // Day of week to start calendar on\n // `0` (Sunday), `1` (Monday), ... `6` (Saturday)\n startWeekday: makeProp(PROP_TYPE_NUMBER_STRING, 0),\n // Variant color to use for today's date (defaults to `selectedVariant`)\n todayVariant: makeProp(PROP_TYPE_STRING),\n // Always return the `v-model` value as a date object\n valueAsDate: makeProp(PROP_TYPE_BOOLEAN, false),\n // Format of the weekday names at the top of the calendar\n // `short` is typically a 3 letter abbreviation,\n // `narrow` is typically a single letter\n // `long` is the full week day name\n // Although some locales may override this (i.e `ar`, etc.)\n weekdayHeaderFormat: makeProp(PROP_TYPE_STRING, CALENDAR_SHORT, function (value) {\n return arrayIncludes([CALENDAR_LONG, CALENDAR_SHORT, CALENDAR_NARROW], value);\n }),\n // Has no effect if prop `block` is set\n width: makeProp(PROP_TYPE_STRING, '270px')\n})), NAME_CALENDAR); // --- Main component ---\n// @vue/component\n\nexport var BCalendar = Vue.extend({\n name: NAME_CALENDAR,\n // Mixin order is important!\n mixins: [attrsMixin, idMixin, modelMixin, normalizeSlotMixin],\n props: props,\n data: function data() {\n var selected = formatYMD(this[MODEL_PROP_NAME]) || '';\n return {\n // Selected date\n selectedYMD: selected,\n // Date in calendar grid that has `tabindex` of `0`\n activeYMD: selected || formatYMD(_constrainDate(this.initialDate || this.getToday()), this.min, this.max),\n // Will be true if the calendar grid has/contains focus\n gridHasFocus: false,\n // Flag to enable the `aria-live` region(s) after mount\n // to prevent screen reader \"outbursts\" when mounting\n isLive: false\n };\n },\n computed: {\n valueId: function valueId() {\n return this.safeId();\n },\n widgetId: function widgetId() {\n return this.safeId('_calendar-wrapper_');\n },\n navId: function navId() {\n return this.safeId('_calendar-nav_');\n },\n gridId: function gridId() {\n return this.safeId('_calendar-grid_');\n },\n gridCaptionId: function gridCaptionId() {\n return this.safeId('_calendar-grid-caption_');\n },\n gridHelpId: function gridHelpId() {\n return this.safeId('_calendar-grid-help_');\n },\n activeId: function activeId() {\n return this.activeYMD ? this.safeId(\"_cell-\".concat(this.activeYMD, \"_\")) : null;\n },\n // TODO: Use computed props to convert `YYYY-MM-DD` to `Date` object\n selectedDate: function selectedDate() {\n // Selected as a `Date` object\n return parseYMD(this.selectedYMD);\n },\n activeDate: function activeDate() {\n // Active as a `Date` object\n return parseYMD(this.activeYMD);\n },\n computedMin: function computedMin() {\n return parseYMD(this.min);\n },\n computedMax: function computedMax() {\n return parseYMD(this.max);\n },\n computedWeekStarts: function computedWeekStarts() {\n // `startWeekday` is a prop (constrained to `0` through `6`)\n return mathMax(toInteger(this.startWeekday, 0), 0) % 7;\n },\n computedLocale: function computedLocale() {\n // Returns the resolved locale used by the calendar\n return resolveLocale(concat(this.locale).filter(identity), CALENDAR_GREGORY);\n },\n computedDateDisabledFn: function computedDateDisabledFn() {\n var dateDisabledFn = this.dateDisabledFn;\n return hasPropFunction(dateDisabledFn) ? dateDisabledFn : function () {\n return false;\n };\n },\n // TODO: Change `dateInfoFn` to handle events and notes as well as classes\n computedDateInfoFn: function computedDateInfoFn() {\n var dateInfoFn = this.dateInfoFn;\n return hasPropFunction(dateInfoFn) ? dateInfoFn : function () {\n return {};\n };\n },\n calendarLocale: function calendarLocale() {\n // This locale enforces the gregorian calendar (for use in formatter functions)\n // Needed because IE 11 resolves `ar-IR` as islamic-civil calendar\n // and IE 11 (and some other browsers) do not support the `calendar` option\n // And we currently only support the gregorian calendar\n var fmt = new Intl.DateTimeFormat(this.computedLocale, {\n calendar: CALENDAR_GREGORY\n });\n var calendar = fmt.resolvedOptions().calendar;\n var locale = fmt.resolvedOptions().locale;\n /* istanbul ignore if: mainly for IE 11 and a few other browsers, hard to test in JSDOM */\n\n if (calendar !== CALENDAR_GREGORY) {\n // Ensure the locale requests the gregorian calendar\n // Mainly for IE 11, and currently we can't handle non-gregorian calendars\n // TODO: Should we always return this value?\n locale = locale.replace(/-u-.+$/i, '').concat('-u-ca-gregory');\n }\n\n return locale;\n },\n calendarYear: function calendarYear() {\n return this.activeDate.getFullYear();\n },\n calendarMonth: function calendarMonth() {\n return this.activeDate.getMonth();\n },\n calendarFirstDay: function calendarFirstDay() {\n // We set the time for this date to 12pm to work around\n // date formatting issues in Firefox and Safari\n // See: https://github.com/bootstrap-vue/bootstrap-vue/issues/5818\n return createDate(this.calendarYear, this.calendarMonth, 1, 12);\n },\n calendarDaysInMonth: function calendarDaysInMonth() {\n // We create a new date as to not mutate the original\n var date = createDate(this.calendarFirstDay);\n date.setMonth(date.getMonth() + 1, 0);\n return date.getDate();\n },\n computedVariant: function computedVariant() {\n return \"btn-\".concat(this.selectedVariant || 'primary');\n },\n computedTodayVariant: function computedTodayVariant() {\n return \"btn-outline-\".concat(this.todayVariant || this.selectedVariant || 'primary');\n },\n computedNavButtonVariant: function computedNavButtonVariant() {\n return \"btn-outline-\".concat(this.navButtonVariant || 'primary');\n },\n isRTL: function isRTL() {\n // `true` if the language requested is RTL\n var dir = toString(this.direction).toLowerCase();\n\n if (dir === 'rtl') {\n /* istanbul ignore next */\n return true;\n } else if (dir === 'ltr') {\n /* istanbul ignore next */\n return false;\n }\n\n return isLocaleRTL(this.computedLocale);\n },\n context: function context() {\n var selectedYMD = this.selectedYMD,\n activeYMD = this.activeYMD;\n var selectedDate = parseYMD(selectedYMD);\n var activeDate = parseYMD(activeYMD);\n return {\n // The current value of the `v-model`\n selectedYMD: selectedYMD,\n selectedDate: selectedDate,\n selectedFormatted: selectedDate ? this.formatDateString(selectedDate) : this.labelNoDateSelected,\n // Which date cell is considered active due to navigation\n activeYMD: activeYMD,\n activeDate: activeDate,\n activeFormatted: activeDate ? this.formatDateString(activeDate) : '',\n // `true` if the date is disabled (when using keyboard navigation)\n disabled: this.dateDisabled(activeDate),\n // Locales used in formatting dates\n locale: this.computedLocale,\n calendarLocale: this.calendarLocale,\n rtl: this.isRTL\n };\n },\n // Computed props that return a function reference\n dateOutOfRange: function dateOutOfRange() {\n // Check whether a date is within the min/max range\n // Returns a new function ref if the pops change\n // We do this as we need to trigger the calendar computed prop\n // to update when these props update\n var min = this.computedMin,\n max = this.computedMax;\n return function (date) {\n // Handle both `YYYY-MM-DD` and `Date` objects\n date = parseYMD(date);\n return min && date < min || max && date > max;\n };\n },\n dateDisabled: function dateDisabled() {\n var _this = this;\n\n // Returns a function for validating if a date is within range\n // We grab this variables first to ensure a new function ref\n // is generated when the props value changes\n // We do this as we need to trigger the calendar computed prop\n // to update when these props update\n var rangeFn = this.dateOutOfRange; // Return the function ref\n\n return function (date) {\n // Handle both `YYYY-MM-DD` and `Date` objects\n date = parseYMD(date);\n var ymd = formatYMD(date);\n return !!(rangeFn(date) || _this.computedDateDisabledFn(ymd, date));\n };\n },\n // Computed props that return date formatter functions\n formatDateString: function formatDateString() {\n // Returns a date formatter function\n return createDateFormatter(this.calendarLocale, _objectSpread(_objectSpread({\n // Ensure we have year, month, day shown for screen readers/ARIA\n // If users really want to leave one of these out, they can\n // pass `undefined` for the property value\n year: DATE_FORMAT_NUMERIC,\n month: DATE_FORMAT_2_DIGIT,\n day: DATE_FORMAT_2_DIGIT\n }, this.dateFormatOptions), {}, {\n // Ensure hours/minutes/seconds are not shown\n // As we do not support the time portion (yet)\n hour: undefined,\n minute: undefined,\n second: undefined,\n // Ensure calendar is gregorian\n calendar: CALENDAR_GREGORY\n }));\n },\n formatYearMonth: function formatYearMonth() {\n // Returns a date formatter function\n return createDateFormatter(this.calendarLocale, {\n year: DATE_FORMAT_NUMERIC,\n month: CALENDAR_LONG,\n calendar: CALENDAR_GREGORY\n });\n },\n formatWeekdayName: function formatWeekdayName() {\n // Long weekday name for weekday header aria-label\n return createDateFormatter(this.calendarLocale, {\n weekday: CALENDAR_LONG,\n calendar: CALENDAR_GREGORY\n });\n },\n formatWeekdayNameShort: function formatWeekdayNameShort() {\n // Weekday header cell format\n // defaults to 'short' 3 letter days, where possible\n return createDateFormatter(this.calendarLocale, {\n weekday: this.weekdayHeaderFormat || CALENDAR_SHORT,\n calendar: CALENDAR_GREGORY\n });\n },\n formatDay: function formatDay() {\n // Calendar grid day number formatter\n // We don't use DateTimeFormatter here as it can place extra\n // character(s) after the number (i.e the `zh` locale)\n var nf = new Intl.NumberFormat([this.computedLocale], {\n style: 'decimal',\n minimumIntegerDigits: 1,\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n notation: 'standard'\n }); // Return a formatter function instance\n\n return function (date) {\n return nf.format(date.getDate());\n };\n },\n // Disabled states for the nav buttons\n prevDecadeDisabled: function prevDecadeDisabled() {\n var min = this.computedMin;\n return this.disabled || min && lastDateOfMonth(oneDecadeAgo(this.activeDate)) < min;\n },\n prevYearDisabled: function prevYearDisabled() {\n var min = this.computedMin;\n return this.disabled || min && lastDateOfMonth(oneYearAgo(this.activeDate)) < min;\n },\n prevMonthDisabled: function prevMonthDisabled() {\n var min = this.computedMin;\n return this.disabled || min && lastDateOfMonth(oneMonthAgo(this.activeDate)) < min;\n },\n thisMonthDisabled: function thisMonthDisabled() {\n // TODO: We could/should check if today is out of range\n return this.disabled;\n },\n nextMonthDisabled: function nextMonthDisabled() {\n var max = this.computedMax;\n return this.disabled || max && firstDateOfMonth(oneMonthAhead(this.activeDate)) > max;\n },\n nextYearDisabled: function nextYearDisabled() {\n var max = this.computedMax;\n return this.disabled || max && firstDateOfMonth(oneYearAhead(this.activeDate)) > max;\n },\n nextDecadeDisabled: function nextDecadeDisabled() {\n var max = this.computedMax;\n return this.disabled || max && firstDateOfMonth(oneDecadeAhead(this.activeDate)) > max;\n },\n // Calendar dates generation\n calendar: function calendar() {\n var matrix = [];\n var firstDay = this.calendarFirstDay;\n var calendarYear = firstDay.getFullYear();\n var calendarMonth = firstDay.getMonth();\n var daysInMonth = this.calendarDaysInMonth;\n var startIndex = firstDay.getDay(); // `0`..`6`\n\n var weekOffset = (this.computedWeekStarts > startIndex ? 7 : 0) - this.computedWeekStarts; // Build the calendar matrix\n\n var currentDay = 0 - weekOffset - startIndex;\n\n for (var week = 0; week < 6 && currentDay < daysInMonth; week++) {\n // For each week\n matrix[week] = []; // The following could be a map function\n\n for (var j = 0; j < 7; j++) {\n // For each day in week\n currentDay++;\n var date = createDate(calendarYear, calendarMonth, currentDay);\n var month = date.getMonth();\n var dayYMD = formatYMD(date);\n var dayDisabled = this.dateDisabled(date); // TODO: This could be a normalizer method\n\n var dateInfo = this.computedDateInfoFn(dayYMD, parseYMD(dayYMD));\n dateInfo = isString(dateInfo) || isArray(dateInfo) ?\n /* istanbul ignore next */\n {\n class: dateInfo\n } : isPlainObject(dateInfo) ? _objectSpread({\n class: ''\n }, dateInfo) :\n /* istanbul ignore next */\n {\n class: ''\n };\n matrix[week].push({\n ymd: dayYMD,\n // Cell content\n day: this.formatDay(date),\n label: this.formatDateString(date),\n // Flags for styling\n isThisMonth: month === calendarMonth,\n isDisabled: dayDisabled,\n // TODO: Handle other dateInfo properties such as notes/events\n info: dateInfo\n });\n }\n }\n\n return matrix;\n },\n calendarHeadings: function calendarHeadings() {\n var _this2 = this;\n\n return this.calendar[0].map(function (d) {\n return {\n text: _this2.formatWeekdayNameShort(parseYMD(d.ymd)),\n label: _this2.formatWeekdayName(parseYMD(d.ymd))\n };\n });\n }\n },\n watch: (_watch = {}, _defineProperty(_watch, MODEL_PROP_NAME, function (newValue, oldValue) {\n var selected = formatYMD(newValue) || '';\n var old = formatYMD(oldValue) || '';\n\n if (!datesEqual(selected, old)) {\n this.activeYMD = selected || this.activeYMD;\n this.selectedYMD = selected;\n }\n }), _defineProperty(_watch, \"selectedYMD\", function selectedYMD(newYMD, oldYMD) {\n // TODO:\n // Should we compare to `formatYMD(this.value)` and emit\n // only if they are different?\n if (newYMD !== oldYMD) {\n this.$emit(MODEL_EVENT_NAME, this.valueAsDate ? parseYMD(newYMD) || null : newYMD || '');\n }\n }), _defineProperty(_watch, \"context\", function context(newValue, oldValue) {\n if (!looseEqual(newValue, oldValue)) {\n this.$emit(EVENT_NAME_CONTEXT, newValue);\n }\n }), _defineProperty(_watch, \"hidden\", function hidden(newValue) {\n // Reset the active focused day when hidden\n this.activeYMD = this.selectedYMD || formatYMD(this[MODEL_PROP_NAME] || this.constrainDate(this.initialDate || this.getToday())); // Enable/disable the live regions\n\n this.setLive(!newValue);\n }), _watch),\n created: function created() {\n var _this3 = this;\n\n this.$nextTick(function () {\n _this3.$emit(EVENT_NAME_CONTEXT, _this3.context);\n });\n },\n mounted: function mounted() {\n this.setLive(true);\n },\n\n /* istanbul ignore next */\n activated: function activated() {\n this.setLive(true);\n },\n\n /* istanbul ignore next */\n deactivated: function deactivated() {\n this.setLive(false);\n },\n beforeDestroy: function beforeDestroy() {\n this.setLive(false);\n },\n methods: {\n // Public method(s)\n focus: function focus() {\n if (!this.disabled) {\n attemptFocus(this.$refs.grid);\n }\n },\n blur: function blur() {\n if (!this.disabled) {\n attemptBlur(this.$refs.grid);\n }\n },\n // Private methods\n setLive: function setLive(on) {\n var _this4 = this;\n\n if (on) {\n this.$nextTick(function () {\n requestAF(function () {\n _this4.isLive = true;\n });\n });\n } else {\n this.isLive = false;\n }\n },\n getToday: function getToday() {\n return parseYMD(createDate());\n },\n constrainDate: function constrainDate(date) {\n // Constrains a date between min and max\n // returns a new `Date` object instance\n return _constrainDate(date, this.computedMin, this.computedMax);\n },\n emitSelected: function emitSelected(date) {\n var _this5 = this;\n\n // Performed in a `$nextTick()` to (probably) ensure\n // the input event has emitted first\n this.$nextTick(function () {\n _this5.$emit(EVENT_NAME_SELECTED, formatYMD(date) || '', parseYMD(date) || null);\n });\n },\n // Event handlers\n setGridFocusFlag: function setGridFocusFlag(event) {\n // Sets the gridHasFocus flag to make date \"button\" look focused\n this.gridHasFocus = !this.disabled && event.type === 'focus';\n },\n onKeydownWrapper: function onKeydownWrapper(event) {\n // Calendar keyboard navigation\n // Handles PAGEUP/PAGEDOWN/END/HOME/LEFT/UP/RIGHT/DOWN\n // Focuses grid after updating\n if (this.noKeyNav) {\n /* istanbul ignore next */\n return;\n }\n\n var altKey = event.altKey,\n ctrlKey = event.ctrlKey,\n keyCode = event.keyCode;\n\n if (!arrayIncludes([CODE_PAGEUP, CODE_PAGEDOWN, CODE_END, CODE_HOME, CODE_LEFT, CODE_UP, CODE_RIGHT, CODE_DOWN], keyCode)) {\n /* istanbul ignore next */\n return;\n }\n\n stopEvent(event);\n var activeDate = createDate(this.activeDate);\n var checkDate = createDate(this.activeDate);\n var day = activeDate.getDate();\n var constrainedToday = this.constrainDate(this.getToday());\n var isRTL = this.isRTL;\n\n if (keyCode === CODE_PAGEUP) {\n // PAGEUP - Previous month/year\n activeDate = (altKey ? ctrlKey ? oneDecadeAgo : oneYearAgo : oneMonthAgo)(activeDate); // We check the first day of month to be in rage\n\n checkDate = createDate(activeDate);\n checkDate.setDate(1);\n } else if (keyCode === CODE_PAGEDOWN) {\n // PAGEDOWN - Next month/year\n activeDate = (altKey ? ctrlKey ? oneDecadeAhead : oneYearAhead : oneMonthAhead)(activeDate); // We check the last day of month to be in rage\n\n checkDate = createDate(activeDate);\n checkDate.setMonth(checkDate.getMonth() + 1);\n checkDate.setDate(0);\n } else if (keyCode === CODE_LEFT) {\n // LEFT - Previous day (or next day for RTL)\n activeDate.setDate(day + (isRTL ? 1 : -1));\n activeDate = this.constrainDate(activeDate);\n checkDate = activeDate;\n } else if (keyCode === CODE_RIGHT) {\n // RIGHT - Next day (or previous day for RTL)\n activeDate.setDate(day + (isRTL ? -1 : 1));\n activeDate = this.constrainDate(activeDate);\n checkDate = activeDate;\n } else if (keyCode === CODE_UP) {\n // UP - Previous week\n activeDate.setDate(day - 7);\n activeDate = this.constrainDate(activeDate);\n checkDate = activeDate;\n } else if (keyCode === CODE_DOWN) {\n // DOWN - Next week\n activeDate.setDate(day + 7);\n activeDate = this.constrainDate(activeDate);\n checkDate = activeDate;\n } else if (keyCode === CODE_HOME) {\n // HOME - Today\n activeDate = constrainedToday;\n checkDate = activeDate;\n } else if (keyCode === CODE_END) {\n // END - Selected date, or today if no selected date\n activeDate = parseYMD(this.selectedDate) || constrainedToday;\n checkDate = activeDate;\n }\n\n if (!this.dateOutOfRange(checkDate) && !datesEqual(activeDate, this.activeDate)) {\n // We only jump to date if within min/max\n // We don't check for individual disabled dates though (via user function)\n this.activeYMD = formatYMD(activeDate);\n } // Ensure grid is focused\n\n\n this.focus();\n },\n onKeydownGrid: function onKeydownGrid(event) {\n // Pressing enter/space on grid to select active date\n var keyCode = event.keyCode;\n var activeDate = this.activeDate;\n\n if (keyCode === CODE_ENTER || keyCode === CODE_SPACE) {\n stopEvent(event);\n\n if (!this.disabled && !this.readonly && !this.dateDisabled(activeDate)) {\n this.selectedYMD = formatYMD(activeDate);\n this.emitSelected(activeDate);\n } // Ensure grid is focused\n\n\n this.focus();\n }\n },\n onClickDay: function onClickDay(day) {\n // Clicking on a date \"button\" to select it\n var selectedDate = this.selectedDate,\n activeDate = this.activeDate;\n var clickedDate = parseYMD(day.ymd);\n\n if (!this.disabled && !day.isDisabled && !this.dateDisabled(clickedDate)) {\n if (!this.readonly) {\n // If readonly mode, we don't set the selected date, just the active date\n // If the clicked date is equal to the already selected date, we don't update the model\n this.selectedYMD = formatYMD(datesEqual(clickedDate, selectedDate) ? selectedDate : clickedDate);\n this.emitSelected(clickedDate);\n }\n\n this.activeYMD = formatYMD(datesEqual(clickedDate, activeDate) ? activeDate : createDate(clickedDate)); // Ensure grid is focused\n\n this.focus();\n }\n },\n gotoPrevDecade: function gotoPrevDecade() {\n this.activeYMD = formatYMD(this.constrainDate(oneDecadeAgo(this.activeDate)));\n },\n gotoPrevYear: function gotoPrevYear() {\n this.activeYMD = formatYMD(this.constrainDate(oneYearAgo(this.activeDate)));\n },\n gotoPrevMonth: function gotoPrevMonth() {\n this.activeYMD = formatYMD(this.constrainDate(oneMonthAgo(this.activeDate)));\n },\n gotoCurrentMonth: function gotoCurrentMonth() {\n // TODO: Maybe this goto date should be configurable?\n this.activeYMD = formatYMD(this.constrainDate(this.getToday()));\n },\n gotoNextMonth: function gotoNextMonth() {\n this.activeYMD = formatYMD(this.constrainDate(oneMonthAhead(this.activeDate)));\n },\n gotoNextYear: function gotoNextYear() {\n this.activeYMD = formatYMD(this.constrainDate(oneYearAhead(this.activeDate)));\n },\n gotoNextDecade: function gotoNextDecade() {\n this.activeYMD = formatYMD(this.constrainDate(oneDecadeAhead(this.activeDate)));\n },\n onHeaderClick: function onHeaderClick() {\n if (!this.disabled) {\n this.activeYMD = this.selectedYMD || formatYMD(this.getToday());\n this.focus();\n }\n }\n },\n render: function render(h) {\n var _this6 = this;\n\n // If `hidden` prop is set, render just a placeholder node\n if (this.hidden) {\n return h();\n }\n\n var valueId = this.valueId,\n widgetId = this.widgetId,\n navId = this.navId,\n gridId = this.gridId,\n gridCaptionId = this.gridCaptionId,\n gridHelpId = this.gridHelpId,\n activeId = this.activeId,\n disabled = this.disabled,\n noKeyNav = this.noKeyNav,\n isLive = this.isLive,\n isRTL = this.isRTL,\n activeYMD = this.activeYMD,\n selectedYMD = this.selectedYMD,\n safeId = this.safeId;\n var hideDecadeNav = !this.showDecadeNav;\n var todayYMD = formatYMD(this.getToday());\n var highlightToday = !this.noHighlightToday; // Header showing current selected date\n\n var $header = h('output', {\n staticClass: 'form-control form-control-sm text-center',\n class: {\n 'text-muted': disabled,\n readonly: this.readonly || disabled\n },\n attrs: {\n id: valueId,\n for: gridId,\n role: 'status',\n tabindex: disabled ? null : '-1',\n // Mainly for testing purposes, as we do not know\n // the exact format `Intl` will format the date string\n 'data-selected': toString(selectedYMD),\n // We wait until after mount to enable `aria-live`\n // to prevent initial announcement on page render\n 'aria-live': isLive ? 'polite' : 'off',\n 'aria-atomic': isLive ? 'true' : null\n },\n on: {\n // Transfer focus/click to focus grid\n // and focus active date (or today if no selection)\n click: this.onHeaderClick,\n focus: this.onHeaderClick\n }\n }, this.selectedDate ? [// We use `bdi` elements here in case the label doesn't match the locale\n // Although IE 11 does not deal with at all (equivalent to a span)\n h('bdi', {\n staticClass: 'sr-only'\n }, \" (\".concat(toString(this.labelSelected), \") \")), h('bdi', this.formatDateString(this.selectedDate))] : this.labelNoDateSelected || \"\\xA0\" // ' '\n );\n $header = h('header', {\n staticClass: 'b-calendar-header',\n class: {\n 'sr-only': this.hideHeader\n },\n attrs: {\n title: this.selectedDate ? this.labelSelectedDate || null : null\n }\n }, [$header]); // Content for the date navigation buttons\n\n var navScope = {\n isRTL: isRTL\n };\n var navProps = {\n shiftV: 0.5\n };\n\n var navPrevProps = _objectSpread(_objectSpread({}, navProps), {}, {\n flipH: isRTL\n });\n\n var navNextProps = _objectSpread(_objectSpread({}, navProps), {}, {\n flipH: !isRTL\n });\n\n var $prevDecadeIcon = this.normalizeSlot(SLOT_NAME_NAV_PEV_DECADE, navScope) || h(BIconChevronBarLeft, {\n props: navPrevProps\n });\n var $prevYearIcon = this.normalizeSlot(SLOT_NAME_NAV_PEV_YEAR, navScope) || h(BIconChevronDoubleLeft, {\n props: navPrevProps\n });\n var $prevMonthIcon = this.normalizeSlot(SLOT_NAME_NAV_PEV_MONTH, navScope) || h(BIconChevronLeft, {\n props: navPrevProps\n });\n var $thisMonthIcon = this.normalizeSlot(SLOT_NAME_NAV_THIS_MONTH, navScope) || h(BIconCircleFill, {\n props: navProps\n });\n var $nextMonthIcon = this.normalizeSlot(SLOT_NAME_NAV_NEXT_MONTH, navScope) || h(BIconChevronLeft, {\n props: navNextProps\n });\n var $nextYearIcon = this.normalizeSlot(SLOT_NAME_NAV_NEXT_YEAR, navScope) || h(BIconChevronDoubleLeft, {\n props: navNextProps\n });\n var $nextDecadeIcon = this.normalizeSlot(SLOT_NAME_NAV_NEXT_DECADE, navScope) || h(BIconChevronBarLeft, {\n props: navNextProps\n }); // Utility to create the date navigation buttons\n\n var makeNavBtn = function makeNavBtn(content, label, handler, btnDisabled, shortcut) {\n return h('button', {\n staticClass: 'btn btn-sm border-0 flex-fill',\n class: [_this6.computedNavButtonVariant, {\n disabled: btnDisabled\n }],\n attrs: {\n title: label || null,\n type: 'button',\n tabindex: noKeyNav ? '-1' : null,\n 'aria-label': label || null,\n 'aria-disabled': btnDisabled ? 'true' : null,\n 'aria-keyshortcuts': shortcut || null\n },\n on: btnDisabled ? {} : {\n click: handler\n }\n }, [h('div', {\n attrs: {\n 'aria-hidden': 'true'\n }\n }, [content])]);\n }; // Generate the date navigation buttons\n\n\n var $nav = h('div', {\n staticClass: 'b-calendar-nav d-flex',\n attrs: {\n id: navId,\n role: 'group',\n tabindex: noKeyNav ? '-1' : null,\n 'aria-hidden': disabled ? 'true' : null,\n 'aria-label': this.labelNav || null,\n 'aria-controls': gridId\n }\n }, [hideDecadeNav ? h() : makeNavBtn($prevDecadeIcon, this.labelPrevDecade, this.gotoPrevDecade, this.prevDecadeDisabled, 'Ctrl+Alt+PageDown'), makeNavBtn($prevYearIcon, this.labelPrevYear, this.gotoPrevYear, this.prevYearDisabled, 'Alt+PageDown'), makeNavBtn($prevMonthIcon, this.labelPrevMonth, this.gotoPrevMonth, this.prevMonthDisabled, 'PageDown'), makeNavBtn($thisMonthIcon, this.labelCurrentMonth, this.gotoCurrentMonth, this.thisMonthDisabled, 'Home'), makeNavBtn($nextMonthIcon, this.labelNextMonth, this.gotoNextMonth, this.nextMonthDisabled, 'PageUp'), makeNavBtn($nextYearIcon, this.labelNextYear, this.gotoNextYear, this.nextYearDisabled, 'Alt+PageUp'), hideDecadeNav ? h() : makeNavBtn($nextDecadeIcon, this.labelNextDecade, this.gotoNextDecade, this.nextDecadeDisabled, 'Ctrl+Alt+PageUp')]); // Caption for calendar grid\n\n var $gridCaption = h('header', {\n staticClass: 'b-calendar-grid-caption text-center font-weight-bold',\n class: {\n 'text-muted': disabled\n },\n attrs: {\n id: gridCaptionId,\n 'aria-live': isLive ? 'polite' : null,\n 'aria-atomic': isLive ? 'true' : null\n },\n key: 'grid-caption'\n }, this.formatYearMonth(this.calendarFirstDay)); // Calendar weekday headings\n\n var $gridWeekDays = h('div', {\n staticClass: 'b-calendar-grid-weekdays row no-gutters border-bottom',\n attrs: {\n 'aria-hidden': 'true'\n }\n }, this.calendarHeadings.map(function (d, idx) {\n return h('small', {\n staticClass: 'col text-truncate',\n class: {\n 'text-muted': disabled\n },\n attrs: {\n title: d.label === d.text ? null : d.label,\n 'aria-label': d.label\n },\n key: idx\n }, d.text);\n })); // Calendar day grid\n\n var $gridBody = this.calendar.map(function (week) {\n var $cells = week.map(function (day, dIndex) {\n var _class;\n\n var isSelected = day.ymd === selectedYMD;\n var isActive = day.ymd === activeYMD;\n var isToday = day.ymd === todayYMD;\n var idCell = safeId(\"_cell-\".concat(day.ymd, \"_\")); // \"fake\" button\n\n var $btn = h('span', {\n staticClass: 'btn border-0 rounded-circle text-nowrap',\n // Should we add some classes to signify if today/selected/etc?\n class: (_class = {\n // Give the fake button a focus ring\n focus: isActive && _this6.gridHasFocus,\n // Styling\n disabled: day.isDisabled || disabled,\n active: isSelected\n }, _defineProperty(_class, _this6.computedVariant, isSelected), _defineProperty(_class, _this6.computedTodayVariant, isToday && highlightToday && !isSelected && day.isThisMonth), _defineProperty(_class, 'btn-outline-light', !(isToday && highlightToday) && !isSelected && !isActive), _defineProperty(_class, 'btn-light', !(isToday && highlightToday) && !isSelected && isActive), _defineProperty(_class, 'text-muted', !day.isThisMonth && !isSelected), _defineProperty(_class, 'text-dark', !(isToday && highlightToday) && !isSelected && !isActive && day.isThisMonth), _defineProperty(_class, 'font-weight-bold', (isSelected || day.isThisMonth) && !day.isDisabled), _class),\n on: {\n click: function click() {\n return _this6.onClickDay(day);\n }\n }\n }, day.day);\n return h('div', // Cell with button\n {\n staticClass: 'col p-0',\n class: day.isDisabled ? 'bg-light' : day.info.class || '',\n attrs: {\n id: idCell,\n role: 'button',\n 'data-date': day.ymd,\n // Primarily for testing purposes\n // Only days in the month are presented as buttons to screen readers\n 'aria-hidden': day.isThisMonth ? null : 'true',\n 'aria-disabled': day.isDisabled || disabled ? 'true' : null,\n 'aria-label': [day.label, isSelected ? \"(\".concat(_this6.labelSelected, \")\") : null, isToday ? \"(\".concat(_this6.labelToday, \")\") : null].filter(identity).join(' '),\n // NVDA doesn't convey `aria-selected`, but does `aria-current`,\n // ChromeVox doesn't convey `aria-current`, but does `aria-selected`,\n // so we set both attributes for robustness\n 'aria-selected': isSelected ? 'true' : null,\n 'aria-current': isSelected ? 'date' : null\n },\n key: dIndex\n }, [$btn]);\n }); // Return the week \"row\"\n // We use the first day of the weeks YMD value as a\n // key for efficient DOM patching / element re-use\n\n return h('div', {\n staticClass: 'row no-gutters',\n key: week[0].ymd\n }, $cells);\n });\n $gridBody = h('div', {\n // A key is only required on the body if we add in transition support\n staticClass: 'b-calendar-grid-body',\n style: disabled ? {\n pointerEvents: 'none'\n } : {} // key: this.activeYMD.slice(0, -3)\n\n }, $gridBody);\n var $gridHelp = h('footer', {\n staticClass: 'b-calendar-grid-help border-top small text-muted text-center bg-light',\n attrs: {\n id: gridHelpId\n }\n }, [h('div', {\n staticClass: 'small'\n }, this.labelHelp)]);\n var $grid = h('div', {\n staticClass: 'b-calendar-grid form-control h-auto text-center',\n attrs: {\n id: gridId,\n role: 'application',\n tabindex: noKeyNav ? '-1' : disabled ? null : '0',\n 'data-month': activeYMD.slice(0, -3),\n // `YYYY-MM`, mainly for testing\n 'aria-roledescription': this.labelCalendar || null,\n 'aria-labelledby': gridCaptionId,\n 'aria-describedby': gridHelpId,\n // `aria-readonly` is not considered valid on `role=\"application\"`\n // https://www.w3.org/TR/wai-aria-1.1/#aria-readonly\n // 'aria-readonly': this.readonly && !disabled ? 'true' : null,\n 'aria-disabled': disabled ? 'true' : null,\n 'aria-activedescendant': activeId\n },\n on: {\n keydown: this.onKeydownGrid,\n focus: this.setGridFocusFlag,\n blur: this.setGridFocusFlag\n },\n ref: 'grid'\n }, [$gridCaption, $gridWeekDays, $gridBody, $gridHelp]); // Optional bottom slot\n\n var $slot = this.normalizeSlot();\n $slot = $slot ? h('footer', {\n staticClass: 'b-calendar-footer'\n }, $slot) : h();\n var $widget = h('div', {\n staticClass: 'b-calendar-inner',\n style: this.block ? {} : {\n width: this.width\n },\n attrs: {\n id: widgetId,\n dir: isRTL ? 'rtl' : 'ltr',\n lang: this.computedLocale || null,\n role: 'group',\n 'aria-disabled': disabled ? 'true' : null,\n // If datepicker controls an input, this will specify the ID of the input\n 'aria-controls': this.ariaControls || null,\n // This should be a prop (so it can be changed to Date picker, etc, localized\n 'aria-roledescription': this.roleDescription || null,\n 'aria-describedby': [// Should the attr (if present) go last?\n // Or should this attr be a prop?\n this.bvAttrs['aria-describedby'], valueId, gridHelpId].filter(identity).join(' ')\n },\n on: {\n keydown: this.onKeydownWrapper\n }\n }, [$header, $nav, $grid, $slot]); // Wrap in an outer div that can be styled\n\n return h('div', {\n staticClass: 'b-calendar',\n class: {\n 'd-block': this.block\n }\n }, [$widget]);\n }\n});","// v-b-hover directive\nimport { IS_BROWSER } from '../../constants/env';\nimport { EVENT_OPTIONS_NO_CAPTURE } from '../../constants/events';\nimport { eventOnOff } from '../../utils/events';\nimport { isFunction } from '../../utils/inspect'; // --- Constants ---\n\nvar PROP = '__BV_hover_handler__';\nvar MOUSEENTER = 'mouseenter';\nvar MOUSELEAVE = 'mouseleave'; // --- Helper methods ---\n\nvar createListener = function createListener(handler) {\n var listener = function listener(event) {\n handler(event.type === MOUSEENTER, event);\n };\n\n listener.fn = handler;\n return listener;\n};\n\nvar updateListeners = function updateListeners(on, el, listener) {\n eventOnOff(on, el, MOUSEENTER, listener, EVENT_OPTIONS_NO_CAPTURE);\n eventOnOff(on, el, MOUSELEAVE, listener, EVENT_OPTIONS_NO_CAPTURE);\n}; // --- Directive bind/unbind/update handler ---\n\n\nvar directive = function directive(el, _ref) {\n var _ref$value = _ref.value,\n handler = _ref$value === void 0 ? null : _ref$value;\n\n if (IS_BROWSER) {\n var listener = el[PROP];\n var hasListener = isFunction(listener);\n var handlerChanged = !(hasListener && listener.fn === handler);\n\n if (hasListener && handlerChanged) {\n updateListeners(false, el, listener);\n delete el[PROP];\n }\n\n if (isFunction(handler) && handlerChanged) {\n el[PROP] = createListener(handler);\n updateListeners(true, el, el[PROP]);\n }\n }\n}; // VBHover directive\n\n\nexport var VBHover = {\n bind: directive,\n componentUpdated: directive,\n unbind: function unbind(el) {\n directive(el, {\n value: null\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\n//\n// Private component used by `b-form-datepicker` and `b-form-timepicker`\n//\nimport { Vue } from '../../vue';\nimport { NAME_FORM_BUTTON_LABEL_CONTROL } from '../../constants/components';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_BUTTON_CONTENT, SLOT_NAME_DEFAULT } from '../../constants/slots';\nimport { attemptBlur, attemptFocus } from '../../utils/dom';\nimport { stopEvent } from '../../utils/events';\nimport { omit, sortKeys } from '../../utils/object';\nimport { makeProp } from '../../utils/props';\nimport { toString } from '../../utils/string';\nimport { dropdownMixin, props as dropdownProps } from '../../mixins/dropdown';\nimport { props as formControlProps } from '../../mixins/form-control';\nimport { formSizeMixin, props as formSizeProps } from '../../mixins/form-size';\nimport { formStateMixin, props as formStateProps } from '../../mixins/form-state';\nimport { idMixin, props as idProps } from '../../mixins/id';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { VBHover } from '../../directives/hover/hover';\nimport { BIconChevronDown } from '../../icons/icons'; // --- Props ---\n\nexport var props = sortKeys(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, idProps), formSizeProps), formStateProps), omit(dropdownProps, ['disabled'])), omit(formControlProps, ['autofocus'])), {}, {\n // When `true`, renders a `btn-group` wrapper and visually hides the label\n buttonOnly: makeProp(PROP_TYPE_BOOLEAN, false),\n // Applicable in button mode only\n buttonVariant: makeProp(PROP_TYPE_STRING, 'secondary'),\n // This is the value shown in the label\n // Defaults back to `value`\n formattedValue: makeProp(PROP_TYPE_STRING),\n // Value placed in `.sr-only` span inside label when value is present\n labelSelected: makeProp(PROP_TYPE_STRING),\n lang: makeProp(PROP_TYPE_STRING),\n // Extra classes to apply to the `dropdown-menu` div\n menuClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n // This is the value placed on the hidden input when no value selected\n placeholder: makeProp(PROP_TYPE_STRING),\n readonly: makeProp(PROP_TYPE_BOOLEAN, false),\n // Tri-state prop: `true`, `false` or `null`\n rtl: makeProp(PROP_TYPE_BOOLEAN, null),\n value: makeProp(PROP_TYPE_STRING, '')\n})); // --- Main component ---\n// @vue/component\n\nexport var BVFormBtnLabelControl = /*#__PURE__*/Vue.extend({\n name: NAME_FORM_BUTTON_LABEL_CONTROL,\n directives: {\n 'b-hover': VBHover\n },\n mixins: [idMixin, formSizeMixin, formStateMixin, dropdownMixin, normalizeSlotMixin],\n props: props,\n data: function data() {\n return {\n isHovered: false,\n hasFocus: false\n };\n },\n computed: {\n idButton: function idButton() {\n return this.safeId();\n },\n idLabel: function idLabel() {\n return this.safeId('_value_');\n },\n idMenu: function idMenu() {\n return this.safeId('_dialog_');\n },\n idWrapper: function idWrapper() {\n return this.safeId('_outer_');\n },\n computedDir: function computedDir() {\n return this.rtl === true ? 'rtl' : this.rtl === false ? 'ltr' : null;\n }\n },\n methods: {\n focus: function focus() {\n if (!this.disabled) {\n attemptFocus(this.$refs.toggle);\n }\n },\n blur: function blur() {\n if (!this.disabled) {\n attemptBlur(this.$refs.toggle);\n }\n },\n setFocus: function setFocus(event) {\n this.hasFocus = event.type === 'focus';\n },\n handleHover: function handleHover(hovered) {\n this.isHovered = hovered;\n }\n },\n render: function render(h) {\n var _class;\n\n var idButton = this.idButton,\n idLabel = this.idLabel,\n idMenu = this.idMenu,\n idWrapper = this.idWrapper,\n disabled = this.disabled,\n readonly = this.readonly,\n required = this.required,\n name = this.name,\n state = this.state,\n visible = this.visible,\n size = this.size,\n isHovered = this.isHovered,\n hasFocus = this.hasFocus,\n labelSelected = this.labelSelected,\n buttonVariant = this.buttonVariant,\n buttonOnly = this.buttonOnly;\n var value = toString(this.value) || '';\n var invalid = state === false || required && !value;\n var btnScope = {\n isHovered: isHovered,\n hasFocus: hasFocus,\n state: state,\n opened: visible\n };\n var $button = h('button', {\n staticClass: 'btn',\n class: (_class = {}, _defineProperty(_class, \"btn-\".concat(buttonVariant), buttonOnly), _defineProperty(_class, \"btn-\".concat(size), size), _defineProperty(_class, 'h-auto', !buttonOnly), _defineProperty(_class, 'dropdown-toggle', buttonOnly), _defineProperty(_class, 'dropdown-toggle-no-caret', buttonOnly), _class),\n attrs: {\n id: idButton,\n type: 'button',\n disabled: disabled,\n 'aria-haspopup': 'dialog',\n 'aria-expanded': visible ? 'true' : 'false',\n 'aria-invalid': invalid ? 'true' : null,\n 'aria-required': required ? 'true' : null\n },\n directives: [{\n name: 'b-hover',\n value: this.handleHover\n }],\n on: {\n mousedown: this.onMousedown,\n click: this.toggle,\n keydown: this.toggle,\n // Handle ENTER, SPACE and DOWN\n '!focus': this.setFocus,\n '!blur': this.setFocus\n },\n ref: 'toggle'\n }, [this.hasNormalizedSlot(SLOT_NAME_BUTTON_CONTENT) ? this.normalizeSlot(SLOT_NAME_BUTTON_CONTENT, btnScope) :\n /* istanbul ignore next */\n h(BIconChevronDown, {\n props: {\n scale: 1.25\n }\n })]); // Hidden input\n\n var $hidden = h();\n\n if (name && !disabled) {\n $hidden = h('input', {\n attrs: {\n type: 'hidden',\n name: name || null,\n form: this.form || null,\n value: value\n }\n });\n } // Dropdown content\n\n\n var $menu = h('div', {\n staticClass: 'dropdown-menu',\n class: [this.menuClass, {\n show: visible,\n 'dropdown-menu-right': this.right\n }],\n attrs: {\n id: idMenu,\n role: 'dialog',\n tabindex: '-1',\n 'aria-modal': 'false',\n 'aria-labelledby': idLabel\n },\n on: {\n keydown: this.onKeydown // Handle ESC\n\n },\n ref: 'menu'\n }, [this.normalizeSlot(SLOT_NAME_DEFAULT, {\n opened: visible\n })]); // Value label\n\n var $label = h('label', {\n class: buttonOnly ? 'sr-only' // Hidden in button only mode\n : ['form-control', 'text-break', 'text-wrap', 'bg-transparent', // Mute the text if showing the placeholder\n {\n 'text-muted': !value\n }, this.stateClass, this.sizeFormClass],\n attrs: {\n id: idLabel,\n for: idButton,\n 'aria-invalid': invalid ? 'true' : null,\n 'aria-required': required ? 'true' : null\n },\n directives: [{\n name: 'b-hover',\n value: this.handleHover\n }],\n on: {\n // Disable bubbling of the click event to\n // prevent menu from closing and re-opening\n '!click':\n /* istanbul ignore next */\n function click(event) {\n stopEvent(event, {\n preventDefault: false\n });\n }\n }\n }, [value ? this.formattedValue || value : this.placeholder || '', // Add the selected label for screen readers when a value is provided\n value && labelSelected ? h('bdi', {\n staticClass: 'sr-only'\n }, labelSelected) : '']); // Return the custom form control wrapper\n\n return h('div', {\n staticClass: 'b-form-btn-label-control dropdown',\n class: [this.directionClass, this.boundaryClass, [{\n 'btn-group': buttonOnly,\n 'form-control': !buttonOnly,\n 'd-flex': !buttonOnly,\n 'h-auto': !buttonOnly,\n 'align-items-stretch': !buttonOnly,\n focus: hasFocus && !buttonOnly,\n show: visible,\n 'is-valid': state === true,\n 'is-invalid': state === false\n }, buttonOnly ? null : this.sizeFormClass]],\n attrs: {\n id: idWrapper,\n role: buttonOnly ? null : 'group',\n lang: this.lang || null,\n dir: this.computedDir,\n 'aria-disabled': disabled,\n 'aria-readonly': readonly && !disabled,\n 'aria-labelledby': idLabel,\n 'aria-invalid': state === false || required && !value ? 'true' : null,\n 'aria-required': required ? 'true' : null\n }\n }, [$button, $hidden, $menu, $label]);\n }\n});","var _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 { NAME_FORM_DATEPICKER } from '../../constants/components';\nimport { EVENT_NAME_CONTEXT, EVENT_NAME_HIDDEN, EVENT_NAME_SHOWN } from '../../constants/events';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_DATE_STRING, PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_BUTTON_CONTENT } from '../../constants/slots';\nimport { createDate, constrainDate, formatYMD, parseYMD } from '../../utils/date';\nimport { attemptBlur, attemptFocus } from '../../utils/dom';\nimport { isUndefinedOrNull } from '../../utils/inspect';\nimport { makeModelMixin } from '../../utils/model';\nimport { omit, pick, sortKeys } from '../../utils/object';\nimport { makeProp, makePropsConfigurable, pluckProps } from '../../utils/props';\nimport { idMixin, props as idProps } from '../../mixins/id';\nimport { BIconCalendar, BIconCalendarFill } from '../../icons/icons';\nimport { BButton } from '../button/button';\nimport { BCalendar, props as BCalendarProps } from '../calendar/calendar';\nimport { BVFormBtnLabelControl, props as BVFormBtnLabelControlProps } from '../form-btn-label-control/bv-form-btn-label-control'; // --- Constants ---\n\nvar _makeModelMixin = makeModelMixin('value', {\n type: PROP_TYPE_DATE_STRING\n}),\n modelMixin = _makeModelMixin.mixin,\n modelProps = _makeModelMixin.props,\n MODEL_PROP_NAME = _makeModelMixin.prop,\n MODEL_EVENT_NAME = _makeModelMixin.event; // --- Props ---\n\n\nvar calendarProps = omit(BCalendarProps, ['block', 'hidden', 'id', 'noKeyNav', 'roleDescription', 'value', 'width']);\nvar formBtnLabelControlProps = omit(BVFormBtnLabelControlProps, ['formattedValue', 'id', 'lang', 'rtl', 'value']);\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, idProps), modelProps), calendarProps), formBtnLabelControlProps), {}, {\n // Width of the calendar dropdown\n calendarWidth: makeProp(PROP_TYPE_STRING, '270px'),\n closeButton: makeProp(PROP_TYPE_BOOLEAN, false),\n closeButtonVariant: makeProp(PROP_TYPE_STRING, 'outline-secondary'),\n // Dark mode\n dark: makeProp(PROP_TYPE_BOOLEAN, false),\n labelCloseButton: makeProp(PROP_TYPE_STRING, 'Close'),\n labelResetButton: makeProp(PROP_TYPE_STRING, 'Reset'),\n labelTodayButton: makeProp(PROP_TYPE_STRING, 'Select today'),\n noCloseOnSelect: makeProp(PROP_TYPE_BOOLEAN, false),\n resetButton: makeProp(PROP_TYPE_BOOLEAN, false),\n resetButtonVariant: makeProp(PROP_TYPE_STRING, 'outline-danger'),\n resetValue: makeProp(PROP_TYPE_DATE_STRING),\n todayButton: makeProp(PROP_TYPE_BOOLEAN, false),\n todayButtonVariant: makeProp(PROP_TYPE_STRING, 'outline-primary')\n})), NAME_FORM_DATEPICKER); // --- Main component ---\n// @vue/component\n\nexport var BFormDatepicker = /*#__PURE__*/Vue.extend({\n name: NAME_FORM_DATEPICKER,\n mixins: [idMixin, modelMixin],\n props: props,\n data: function data() {\n return {\n // We always use `YYYY-MM-DD` value internally\n localYMD: formatYMD(this[MODEL_PROP_NAME]) || '',\n // If the popup is open\n isVisible: false,\n // Context data from BCalendar\n localLocale: null,\n isRTL: false,\n formattedValue: '',\n activeYMD: ''\n };\n },\n computed: {\n calendarYM: function calendarYM() {\n // Returns the calendar year/month\n // Returns the `YYYY-MM` portion of the active calendar date\n return this.activeYMD.slice(0, -3);\n },\n computedLang: function computedLang() {\n return (this.localLocale || '').replace(/-u-.*$/i, '') || null;\n },\n computedResetValue: function computedResetValue() {\n return formatYMD(constrainDate(this.resetValue)) || '';\n }\n },\n watch: (_watch = {}, _defineProperty(_watch, MODEL_PROP_NAME, function (newValue) {\n this.localYMD = formatYMD(newValue) || '';\n }), _defineProperty(_watch, \"localYMD\", function localYMD(newValue) {\n // We only update the v-model when the datepicker is open\n if (this.isVisible) {\n this.$emit(MODEL_EVENT_NAME, this.valueAsDate ? parseYMD(newValue) || null : newValue || '');\n }\n }), _defineProperty(_watch, \"calendarYM\", function calendarYM(newValue, oldValue) {\n // Displayed calendar month has changed\n // So possibly the calendar height has changed...\n // We need to update popper computed position\n if (newValue !== oldValue && oldValue) {\n try {\n this.$refs.control.updatePopper();\n } catch (_unused) {}\n }\n }), _watch),\n methods: {\n // Public methods\n focus: function focus() {\n if (!this.disabled) {\n attemptFocus(this.$refs.control);\n }\n },\n blur: function blur() {\n if (!this.disabled) {\n attemptBlur(this.$refs.control);\n }\n },\n // Private methods\n setAndClose: function setAndClose(ymd) {\n var _this = this;\n\n this.localYMD = ymd; // Close calendar popup, unless `noCloseOnSelect`\n\n if (!this.noCloseOnSelect) {\n this.$nextTick(function () {\n _this.$refs.control.hide(true);\n });\n }\n },\n onSelected: function onSelected(ymd) {\n var _this2 = this;\n\n this.$nextTick(function () {\n _this2.setAndClose(ymd);\n });\n },\n onInput: function onInput(ymd) {\n if (this.localYMD !== ymd) {\n this.localYMD = ymd;\n }\n },\n onContext: function onContext(ctx) {\n var activeYMD = ctx.activeYMD,\n isRTL = ctx.isRTL,\n locale = ctx.locale,\n selectedYMD = ctx.selectedYMD,\n selectedFormatted = ctx.selectedFormatted;\n this.isRTL = isRTL;\n this.localLocale = locale;\n this.formattedValue = selectedFormatted;\n this.localYMD = selectedYMD;\n this.activeYMD = activeYMD; // Re-emit the context event\n\n this.$emit(EVENT_NAME_CONTEXT, ctx);\n },\n onTodayButton: function onTodayButton() {\n // Set to today (or min/max if today is out of range)\n this.setAndClose(formatYMD(constrainDate(createDate(), this.min, this.max)));\n },\n onResetButton: function onResetButton() {\n this.setAndClose(this.computedResetValue);\n },\n onCloseButton: function onCloseButton() {\n this.$refs.control.hide(true);\n },\n // Menu handlers\n onShow: function onShow() {\n this.isVisible = true;\n },\n onShown: function onShown() {\n var _this3 = this;\n\n this.$nextTick(function () {\n attemptFocus(_this3.$refs.calendar);\n\n _this3.$emit(EVENT_NAME_SHOWN);\n });\n },\n onHidden: function onHidden() {\n this.isVisible = false;\n this.$emit(EVENT_NAME_HIDDEN);\n },\n // Render helpers\n defaultButtonFn: function defaultButtonFn(_ref) {\n var isHovered = _ref.isHovered,\n hasFocus = _ref.hasFocus;\n return this.$createElement(isHovered || hasFocus ? BIconCalendarFill : BIconCalendar, {\n attrs: {\n 'aria-hidden': 'true'\n }\n });\n }\n },\n render: function render(h) {\n var localYMD = this.localYMD,\n disabled = this.disabled,\n readonly = this.readonly,\n dark = this.dark,\n $props = this.$props,\n $scopedSlots = this.$scopedSlots;\n var placeholder = isUndefinedOrNull(this.placeholder) ? this.labelNoDateSelected : this.placeholder; // Optional footer buttons\n\n var $footer = [];\n\n if (this.todayButton) {\n var label = this.labelTodayButton;\n $footer.push(h(BButton, {\n props: {\n disabled: disabled || readonly,\n size: 'sm',\n variant: this.todayButtonVariant\n },\n attrs: {\n 'aria-label': label || null\n },\n on: {\n click: this.onTodayButton\n }\n }, label));\n }\n\n if (this.resetButton) {\n var _label = this.labelResetButton;\n $footer.push(h(BButton, {\n props: {\n disabled: disabled || readonly,\n size: 'sm',\n variant: this.resetButtonVariant\n },\n attrs: {\n 'aria-label': _label || null\n },\n on: {\n click: this.onResetButton\n }\n }, _label));\n }\n\n if (this.closeButton) {\n var _label2 = this.labelCloseButton;\n $footer.push(h(BButton, {\n props: {\n disabled: disabled,\n size: 'sm',\n variant: this.closeButtonVariant\n },\n attrs: {\n 'aria-label': _label2 || null\n },\n on: {\n click: this.onCloseButton\n }\n }, _label2));\n }\n\n if ($footer.length > 0) {\n $footer = [h('div', {\n staticClass: 'b-form-date-controls d-flex flex-wrap',\n class: {\n 'justify-content-between': $footer.length > 1,\n 'justify-content-end': $footer.length < 2\n }\n }, $footer)];\n }\n\n var $calendar = h(BCalendar, {\n staticClass: 'b-form-date-calendar w-100',\n props: _objectSpread(_objectSpread({}, pluckProps(calendarProps, $props)), {}, {\n hidden: !this.isVisible,\n value: localYMD,\n valueAsDate: false,\n width: this.calendarWidth\n }),\n on: {\n selected: this.onSelected,\n input: this.onInput,\n context: this.onContext\n },\n scopedSlots: pick($scopedSlots, ['nav-prev-decade', 'nav-prev-year', 'nav-prev-month', 'nav-this-month', 'nav-next-month', 'nav-next-year', 'nav-next-decade']),\n key: 'calendar',\n ref: 'calendar'\n }, $footer);\n return h(BVFormBtnLabelControl, {\n staticClass: 'b-form-datepicker',\n props: _objectSpread(_objectSpread({}, pluckProps(formBtnLabelControlProps, $props)), {}, {\n formattedValue: localYMD ? this.formattedValue : '',\n id: this.safeId(),\n lang: this.computedLang,\n menuClass: [{\n 'bg-dark': dark,\n 'text-light': dark\n }, this.menuClass],\n placeholder: placeholder,\n rtl: this.isRTL,\n value: localYMD\n }),\n on: {\n show: this.onShow,\n shown: this.onShown,\n hidden: this.onHidden\n },\n scopedSlots: _defineProperty({}, SLOT_NAME_BUTTON_CONTENT, $scopedSlots[SLOT_NAME_BUTTON_CONTENT] || this.defaultButtonFn),\n ref: 'control'\n }, [$calendar]);\n }\n});","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","import {\n reactive, getCurrentInstance, watch, toRefs,\n} from '@vue/composition-api'\nimport router from '@/router'\n// eslint-disable-next-line object-curly-newline\n\nexport const isObject = obj => typeof obj === 'object' && obj !== null\n\nexport const isToday = date => {\n const today = new Date()\n return (\n /* eslint-disable operator-linebreak */\n date.getDate() === today.getDate() &&\n date.getMonth() === today.getMonth() &&\n date.getFullYear() === today.getFullYear()\n /* eslint-enable */\n )\n}\n\nconst getRandomFromArray = array => array[Math.floor(Math.random() * array.length)]\n\n// ? Light and Dark variant is not included\n// prettier-ignore\nexport const getRandomBsVariant = () => getRandomFromArray(['primary', 'secondary', 'success', 'warning', 'danger', 'info'])\n\nexport const isDynamicRouteActive = route => {\n const { route: resolvedRoute } = router.resolve(route)\n return resolvedRoute.path === router.currentRoute.path\n}\n\n// Thanks: https://medium.com/better-programming/reactive-vue-routes-with-the-composition-api-18c1abd878d1\nexport const useRouter = () => {\n const vm = getCurrentInstance().proxy\n const state = reactive({\n route: vm.$route,\n })\n\n watch(\n () => vm.$route,\n r => {\n state.route = r\n },\n )\n\n return { ...toRefs(state), router: vm.$router }\n}\n\n/**\n * This is just enhancement over Object.extend [Gives deep extend]\n * @param {target} a Object which contains values to be overridden\n * @param {source} b Object which contains values to override\n */\n// export const objectExtend = (a, b) => {\n// // Don't touch 'null' or 'undefined' objects.\n// if (a == null || b == null) {\n// return a\n// }\n\n// Object.keys(b).forEach(key => {\n// if (Object.prototype.toString.call(b[key]) === '[object Object]') {\n// if (Object.prototype.toString.call(a[key]) !== '[object Object]') {\n// // eslint-disable-next-line no-param-reassign\n// a[key] = b[key]\n// } else {\n// // eslint-disable-next-line no-param-reassign\n// a[key] = objectExtend(a[key], b[key])\n// }\n// } else {\n// // eslint-disable-next-line no-param-reassign\n// a[key] = b[key]\n// }\n// })\n\n// return a\n// }\n\nexport const setUrlParam = () => {\n let out = ''\n\n return param => {\n if (out) {\n out = `${out}&${param}`\n } else {\n out = param\n }\n\n return out\n }\n}\n\n/* eslint-disable */\nexport const getCookie = (name) => {\n let matches = document.cookie.match(new RegExp(\n '(?:^|; )' + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + '=([^;]*)',\n ))\n return matches ? decodeURIComponent(matches[1]) : undefined\n}\n\nexport const setCookie = (name, value, options = {}) => {\n\n options = {\n path: '/',\n // при необходимости добавьте другие значения по умолчанию\n ...options\n }\n\n if (options.expires instanceof Date) {\n options.expires = options.expires.toUTCString()\n }\n\n let updatedCookie = encodeURIComponent(name) + '=' + encodeURIComponent(value)\n\n for (let optionKey in options) {\n updatedCookie += '; ' + optionKey\n let optionValue = options[optionKey]\n if (optionValue !== true) {\n updatedCookie += '=' + optionValue\n }\n }\n\n document.cookie = updatedCookie\n}\n/* eslint-enable */\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n// FF49- issue\nvar USES_TO_LENGTH = arrayMethodUsesToLength('map');\n\n// `Array.prototype.map` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\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_DROPDOWN } from '../../constants/components';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_OBJECT_STRING, PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_BUTTON_CONTENT, SLOT_NAME_DEFAULT } from '../../constants/slots';\nimport { arrayIncludes } from '../../utils/array';\nimport { htmlOrText } from '../../utils/html';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { toString } from '../../utils/string';\nimport { dropdownMixin, props as dropdownProps } from '../../mixins/dropdown';\nimport { idMixin, props as idProps } from '../../mixins/id';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { BButton } from '../button/button';\nimport { sortKeys } from '../../utils/object'; // --- Props ---\n\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread(_objectSpread({}, idProps), dropdownProps), {}, {\n block: makeProp(PROP_TYPE_BOOLEAN, false),\n html: makeProp(PROP_TYPE_STRING),\n // If `true`, only render menu contents when open\n lazy: makeProp(PROP_TYPE_BOOLEAN, false),\n menuClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n noCaret: makeProp(PROP_TYPE_BOOLEAN, false),\n role: makeProp(PROP_TYPE_STRING, 'menu'),\n size: makeProp(PROP_TYPE_STRING),\n split: makeProp(PROP_TYPE_BOOLEAN, false),\n splitButtonType: makeProp(PROP_TYPE_STRING, 'button', function (value) {\n return arrayIncludes(['button', 'submit', 'reset'], value);\n }),\n splitClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n splitHref: makeProp(PROP_TYPE_STRING),\n splitTo: makeProp(PROP_TYPE_OBJECT_STRING),\n splitVariant: makeProp(PROP_TYPE_STRING),\n text: makeProp(PROP_TYPE_STRING),\n toggleClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n toggleTag: makeProp(PROP_TYPE_STRING, 'button'),\n // TODO: This really should be `toggleLabel`\n toggleText: makeProp(PROP_TYPE_STRING, 'Toggle dropdown'),\n variant: makeProp(PROP_TYPE_STRING, 'secondary')\n})), NAME_DROPDOWN); // --- Main component ---\n// @vue/component\n\nexport var BDropdown = /*#__PURE__*/Vue.extend({\n name: NAME_DROPDOWN,\n mixins: [idMixin, dropdownMixin, normalizeSlotMixin],\n props: props,\n computed: {\n dropdownClasses: function dropdownClasses() {\n var block = this.block,\n split = this.split;\n return [this.directionClass, this.boundaryClass, {\n show: this.visible,\n // The 'btn-group' class is required in `split` mode for button alignment\n // It needs also to be applied when `block` is disabled to allow multiple\n // dropdowns to be aligned one line\n 'btn-group': split || !block,\n // When `block` is enabled and we are in `split` mode the 'd-flex' class\n // needs to be applied to allow the buttons to stretch to full width\n 'd-flex': block && split\n }];\n },\n menuClasses: function menuClasses() {\n return [this.menuClass, {\n 'dropdown-menu-right': this.right,\n show: this.visible\n }];\n },\n toggleClasses: function toggleClasses() {\n var split = this.split;\n return [this.toggleClass, {\n 'dropdown-toggle-split': split,\n 'dropdown-toggle-no-caret': this.noCaret && !split\n }];\n }\n },\n render: function render(h) {\n var visible = this.visible,\n variant = this.variant,\n size = this.size,\n block = this.block,\n disabled = this.disabled,\n split = this.split,\n role = this.role,\n hide = this.hide,\n toggle = this.toggle;\n var commonProps = {\n variant: variant,\n size: size,\n block: block,\n disabled: disabled\n };\n var $buttonChildren = this.normalizeSlot(SLOT_NAME_BUTTON_CONTENT);\n var buttonContentDomProps = this.hasNormalizedSlot(SLOT_NAME_BUTTON_CONTENT) ? {} : htmlOrText(this.html, this.text);\n var $split = h();\n\n if (split) {\n var splitTo = this.splitTo,\n splitHref = this.splitHref,\n splitButtonType = this.splitButtonType;\n\n var btnProps = _objectSpread(_objectSpread({}, commonProps), {}, {\n variant: this.splitVariant || variant\n }); // We add these as needed due to issues with\n // defined property with `undefined`/`null` values\n\n\n if (splitTo) {\n btnProps.to = splitTo;\n } else if (splitHref) {\n btnProps.href = splitHref;\n } else if (splitButtonType) {\n btnProps.type = splitButtonType;\n }\n\n $split = h(BButton, {\n class: this.splitClass,\n attrs: {\n id: this.safeId('_BV_button_')\n },\n props: btnProps,\n domProps: buttonContentDomProps,\n on: {\n click: this.onSplitClick\n },\n ref: 'button'\n }, $buttonChildren); // Overwrite button content for the toggle when in `split` mode\n\n $buttonChildren = [h('span', {\n class: ['sr-only']\n }, [this.toggleText])];\n buttonContentDomProps = {};\n }\n\n var $toggle = h(BButton, {\n staticClass: 'dropdown-toggle',\n class: this.toggleClasses,\n attrs: {\n id: this.safeId('_BV_toggle_'),\n 'aria-haspopup': 'true',\n 'aria-expanded': toString(visible)\n },\n props: _objectSpread(_objectSpread({}, commonProps), {}, {\n tag: this.toggleTag,\n block: block && !split\n }),\n domProps: buttonContentDomProps,\n on: {\n mousedown: this.onMousedown,\n click: toggle,\n keydown: toggle // Handle ENTER, SPACE and DOWN\n\n },\n ref: 'toggle'\n }, $buttonChildren);\n var $menu = h('ul', {\n staticClass: 'dropdown-menu',\n class: this.menuClasses,\n attrs: {\n role: role,\n tabindex: '-1',\n 'aria-labelledby': this.safeId(split ? '_BV_button_' : '_BV_toggle_')\n },\n on: {\n keydown: this.onKeydown // Handle UP, DOWN and ESC\n\n },\n ref: 'menu'\n }, [!this.lazy || visible ? this.normalizeSlot(SLOT_NAME_DEFAULT, {\n hide: hide\n }) : h()]);\n return h('div', {\n staticClass: 'dropdown b-dropdown',\n class: this.dropdownClasses,\n attrs: {\n id: this.safeId()\n }\n }, [$split, $toggle, $menu]);\n }\n});","// `Symbol.prototype.description` getter\n// https://tc39.github.io/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar has = require('../internals/has');\nvar isObject = require('../internals/is-object');\nvar defineProperty = require('../internals/object-define-property').f;\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n)) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n $({ global: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('validation-provider',{attrs:{\"name\":_vm.label,\"rules\":_vm.rules},scopedSlots:_vm._u([{key:\"default\",fn:function(validationContext){return [_c('b-form-group',{class:_vm.classess,attrs:{\"label\":_vm.label,\"label-for\":_vm.id}},[_c('b-form-datepicker',{staticClass:\"text-left\",attrs:{\"id\":_vm.id,\"value\":_vm.v,\"state\":_vm.rules ? _vm.getValidationState(validationContext) : null,\"trim\":\"\",\"date-format-options\":{ year: 'numeric', month: 'numeric', day: 'numeric' },\"locale\":\"ru-RU\"},on:{\"input\":function (val) {\n _vm.$emit('update:value', val)\n }}}),_c('b-form-invalid-feedback',{attrs:{\"state\":_vm.rules ? _vm.getValidationState(validationContext) : null}},[_vm._v(\" \"+_vm._s(validationContext.errors[0])+\" \")])],1)]}}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n {\n $emit('update:value', val)\n }\"\n />\n \n {{ validationContext.errors[0] }}\n \n \n \n\n\n\n\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./DateInput.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./DateInput.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./DateInput.vue?vue&type=template&id=5b8cfd95&\"\nimport script from \"./DateInput.vue?vue&type=script&lang=js&\"\nexport * from \"./DateInput.vue?vue&type=script&lang=js&\"\nimport style0 from \"./DateInput.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/@vue/cli-service/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","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":_vm.id}},[_c('b-overlay',{attrs:{\"show\":_vm.loading,\"no-wrap\":\"\",\"variant\":_vm.$store.state.appConfig.layout.skin === 'dark' ? 'black' : 'white'}}),(!_vm.innerHTML)?_c('div',{domProps:{\"innerHTML\":_vm._s(_vm.html)}}):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import axios from '@axios'\n\nexport default {\n namespaced: true,\n state: {},\n getters: {},\n mutations: {},\n actions: {\n // eslint-disable-next-line\n async fetchData(context, payload) {\n const url = payload.apiId ? `${payload.api}/${payload.apiId}` : payload.api\n\n return axios.get(url, {\n params: payload.params,\n })\n },\n },\n}\n","\n \n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./HtmlContent.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/@vue/cli-service/node_modules/vue-loader/lib/index.js??vue-loader-options!./HtmlContent.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./HtmlContent.vue?vue&type=template&id=e31befc4&\"\nimport script from \"./HtmlContent.vue?vue&type=script&lang=js&\"\nexport * from \"./HtmlContent.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/@vue/cli-service/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","export var noop = function noop() {};","var _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 { COMPONENT_UID_KEY, Vue } from '../../vue';\nimport { NAME_TABS, NAME_TAB_BUTTON_HELPER } from '../../constants/components';\nimport { IS_BROWSER } from '../../constants/env';\nimport { EVENT_NAME_ACTIVATE_TAB, EVENT_NAME_CHANGED, EVENT_NAME_CLICK, EVENT_NAME_FIRST, EVENT_NAME_LAST, EVENT_NAME_NEXT, EVENT_NAME_PREV } from '../../constants/events';\nimport { CODE_DOWN, CODE_END, CODE_HOME, CODE_LEFT, CODE_RIGHT, CODE_SPACE, CODE_UP } from '../../constants/key-codes';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_NUMBER, PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_EMPTY, SLOT_NAME_TABS_END, SLOT_NAME_TABS_START, SLOT_NAME_TITLE } from '../../constants/slots';\nimport { arrayIncludes } from '../../utils/array';\nimport { BvEvent } from '../../utils/bv-event.class';\nimport { attemptFocus, selectAll, requestAF } from '../../utils/dom';\nimport { stopEvent } from '../../utils/events';\nimport { identity } from '../../utils/identity';\nimport { isEvent } 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 { omit, sortKeys } from '../../utils/object';\nimport { observeDom } from '../../utils/observe-dom';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { stableSort } from '../../utils/stable-sort';\nimport { idMixin, props as idProps } from '../../mixins/id';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { BLink } from '../link/link';\nimport { BNav, props as BNavProps } from '../nav/nav'; // --- Constants ---\n\nvar _makeModelMixin = makeModelMixin('value', {\n type: PROP_TYPE_NUMBER\n}),\n modelMixin = _makeModelMixin.mixin,\n modelProps = _makeModelMixin.props,\n MODEL_PROP_NAME = _makeModelMixin.prop,\n MODEL_EVENT_NAME = _makeModelMixin.event; // --- Helper methods ---\n// Filter function to filter out disabled tabs\n\n\nvar notDisabled = function notDisabled(tab) {\n return !tab.disabled;\n}; // --- Helper components ---\n// @vue/component\n\n\nvar BVTabButton = /*#__PURE__*/Vue.extend({\n name: NAME_TAB_BUTTON_HELPER,\n inject: {\n bvTabs: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n props: {\n controls: makeProp(PROP_TYPE_STRING),\n id: makeProp(PROP_TYPE_STRING),\n noKeyNav: makeProp(PROP_TYPE_BOOLEAN, false),\n posInSet: makeProp(PROP_TYPE_NUMBER),\n setSize: makeProp(PROP_TYPE_NUMBER),\n // Reference to the child instance\n tab: makeProp(),\n tabIndex: makeProp(PROP_TYPE_NUMBER)\n },\n methods: {\n focus: function focus() {\n attemptFocus(this.$refs.link);\n },\n handleEvt: function handleEvt(event) {\n /* istanbul ignore next */\n if (this.tab.disabled) {\n return;\n }\n\n var type = event.type,\n keyCode = event.keyCode,\n shiftKey = event.shiftKey;\n\n if (type === 'click') {\n stopEvent(event);\n this.$emit(EVENT_NAME_CLICK, event);\n } else if (type === 'keydown' && keyCode === CODE_SPACE) {\n // For ARIA tabs the SPACE key will also trigger a click/select\n // Even with keyboard navigation disabled, SPACE should \"click\" the button\n // See: https://github.com/bootstrap-vue/bootstrap-vue/issues/4323\n stopEvent(event);\n this.$emit(EVENT_NAME_CLICK, event);\n } else if (type === 'keydown' && !this.noKeyNav) {\n // For keyboard navigation\n if ([CODE_UP, CODE_LEFT, CODE_HOME].indexOf(keyCode) !== -1) {\n stopEvent(event);\n\n if (shiftKey || keyCode === CODE_HOME) {\n this.$emit(EVENT_NAME_FIRST, event);\n } else {\n this.$emit(EVENT_NAME_PREV, event);\n }\n } else if ([CODE_DOWN, CODE_RIGHT, CODE_END].indexOf(keyCode) !== -1) {\n stopEvent(event);\n\n if (shiftKey || keyCode === CODE_END) {\n this.$emit(EVENT_NAME_LAST, event);\n } else {\n this.$emit(EVENT_NAME_NEXT, event);\n }\n }\n }\n }\n },\n render: function render(h) {\n var id = this.id,\n tabIndex = this.tabIndex,\n setSize = this.setSize,\n posInSet = this.posInSet,\n controls = this.controls,\n handleEvt = this.handleEvt;\n var _this$tab = this.tab,\n title = _this$tab.title,\n localActive = _this$tab.localActive,\n disabled = _this$tab.disabled,\n titleItemClass = _this$tab.titleItemClass,\n titleLinkClass = _this$tab.titleLinkClass,\n titleLinkAttributes = _this$tab.titleLinkAttributes;\n var $link = h(BLink, {\n staticClass: 'nav-link',\n class: [{\n active: localActive && !disabled,\n disabled: disabled\n }, titleLinkClass, // Apply `activeNavItemClass` styles when the tab is active\n localActive ? this.bvTabs.activeNavItemClass : null],\n props: {\n disabled: disabled\n },\n attrs: _objectSpread(_objectSpread({}, titleLinkAttributes), {}, {\n id: id,\n role: 'tab',\n // Roving tab index when keynav enabled\n tabindex: tabIndex,\n 'aria-selected': localActive && !disabled ? 'true' : 'false',\n 'aria-setsize': setSize,\n 'aria-posinset': posInSet,\n 'aria-controls': controls\n }),\n on: {\n click: handleEvt,\n keydown: handleEvt\n },\n ref: 'link'\n }, [this.tab.normalizeSlot(SLOT_NAME_TITLE) || title]);\n return h('li', {\n staticClass: 'nav-item',\n class: [titleItemClass],\n attrs: {\n role: 'presentation'\n }\n }, [$link]);\n }\n}); // --- Props ---\n\nvar navProps = omit(BNavProps, ['tabs', 'isNavBar', 'cardHeader']);\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, idProps), modelProps), navProps), {}, {\n // Only applied to the currently active ``\n activeNavItemClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n // Only applied to the currently active ``\n // This prop is sniffed by the `` child\n activeTabClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n card: makeProp(PROP_TYPE_BOOLEAN, false),\n contentClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n // Synonym for 'bottom'\n end: makeProp(PROP_TYPE_BOOLEAN, false),\n // This prop is sniffed by the `` child\n lazy: makeProp(PROP_TYPE_BOOLEAN, false),\n navClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n navWrapperClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n noFade: makeProp(PROP_TYPE_BOOLEAN, false),\n noKeyNav: makeProp(PROP_TYPE_BOOLEAN, false),\n noNavStyle: makeProp(PROP_TYPE_BOOLEAN, false),\n tag: makeProp(PROP_TYPE_STRING, 'div')\n})), NAME_TABS); // --- Main component ---\n// @vue/component\n\nexport var BTabs = /*#__PURE__*/Vue.extend({\n name: NAME_TABS,\n mixins: [idMixin, modelMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTabs: this\n };\n },\n props: props,\n data: function data() {\n return {\n // Index of current tab\n currentTab: toInteger(this[MODEL_PROP_NAME], -1),\n // Array of direct child `` instances, in DOM order\n tabs: [],\n // Array of child instances registered (for triggering reactive updates)\n registeredTabs: []\n };\n },\n computed: {\n fade: function fade() {\n // This computed prop is sniffed by the tab child\n return !this.noFade;\n },\n localNavClass: function localNavClass() {\n var classes = [];\n\n if (this.card && this.vertical) {\n classes.push('card-header', 'h-100', 'border-bottom-0', 'rounded-0');\n }\n\n return [].concat(classes, [this.navClass]);\n }\n },\n watch: (_watch = {}, _defineProperty(_watch, MODEL_PROP_NAME, function (newValue, oldValue) {\n if (newValue !== oldValue) {\n newValue = toInteger(newValue, -1);\n oldValue = toInteger(oldValue, 0);\n var $tab = this.tabs[newValue];\n\n if ($tab && !$tab.disabled) {\n this.activateTab($tab);\n } else {\n // Try next or prev tabs\n if (newValue < oldValue) {\n this.previousTab();\n } else {\n this.nextTab();\n }\n }\n }\n }), _defineProperty(_watch, \"currentTab\", function currentTab(newValue) {\n var index = -1; // Ensure only one tab is active at most\n\n this.tabs.forEach(function ($tab, i) {\n if (i === newValue && !$tab.disabled) {\n $tab.localActive = true;\n index = i;\n } else {\n $tab.localActive = false;\n }\n }); // Update the v-model\n\n this.$emit(MODEL_EVENT_NAME, index);\n }), _defineProperty(_watch, \"tabs\", function tabs(newValue, oldValue) {\n var _this = this;\n\n // We use `_uid` instead of `safeId()`, as the later is changed in a `$nextTick()`\n // if no explicit ID is provided, causing duplicate emits\n if (!looseEqual(newValue.map(function ($tab) {\n return $tab[COMPONENT_UID_KEY];\n }), oldValue.map(function ($tab) {\n return $tab[COMPONENT_UID_KEY];\n }))) {\n // In a `$nextTick()` to ensure `currentTab` has been set first\n this.$nextTick(function () {\n // We emit shallow copies of the new and old arrays of tabs,\n // to prevent users from potentially mutating the internal arrays\n _this.$emit(EVENT_NAME_CHANGED, newValue.slice(), oldValue.slice());\n });\n }\n }), _defineProperty(_watch, \"registeredTabs\", function registeredTabs() {\n this.updateTabs();\n }), _watch),\n created: function created() {\n // Create private non-reactive props\n this.$_observer = null;\n },\n mounted: function mounted() {\n this.setObserver(true);\n },\n beforeDestroy: function beforeDestroy() {\n this.setObserver(false); // Ensure no references to child instances exist\n\n this.tabs = [];\n },\n methods: {\n registerTab: function registerTab($tab) {\n if (!arrayIncludes(this.registeredTabs, $tab)) {\n this.registeredTabs.push($tab);\n }\n },\n unregisterTab: function unregisterTab($tab) {\n this.registeredTabs = this.registeredTabs.slice().filter(function ($t) {\n return $t !== $tab;\n });\n },\n // DOM observer is needed to detect changes in order of tabs\n setObserver: function setObserver() {\n var _this2 = this;\n\n var on = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n this.$_observer && this.$_observer.disconnect();\n this.$_observer = null;\n\n if (on) {\n /* istanbul ignore next: difficult to test mutation observer in JSDOM */\n var handler = function handler() {\n _this2.$nextTick(function () {\n requestAF(function () {\n _this2.updateTabs();\n });\n });\n }; // Watch for changes to `` sub components\n\n\n this.$_observer = observeDom(this.$refs.content, handler, {\n childList: true,\n subtree: false,\n attributes: true,\n attributeFilter: ['id']\n });\n }\n },\n getTabs: function getTabs() {\n var $tabs = this.registeredTabs.filter(function ($tab) {\n return $tab.$children.filter(function ($t) {\n return $t._isTab;\n }).length === 0;\n }); // DOM Order of Tabs\n\n var order = [];\n /* istanbul ignore next: too difficult to test */\n\n if (IS_BROWSER && $tabs.length > 0) {\n // We rely on the DOM when mounted to get the \"true\" order of the `` children\n // `querySelectorAll()` always returns elements in document order, regardless of\n // order specified in the selector\n var selector = $tabs.map(function ($tab) {\n return \"#\".concat($tab.safeId());\n }).join(', ');\n order = selectAll(selector, this.$el).map(function ($el) {\n return $el.id;\n }).filter(identity);\n } // Stable sort keeps the original order if not found in the `order` array,\n // which will be an empty array before mount\n\n\n return stableSort($tabs, function (a, b) {\n return order.indexOf(a.safeId()) - order.indexOf(b.safeId());\n });\n },\n updateTabs: function updateTabs() {\n var $tabs = this.getTabs(); // Find last active non-disabled tab in current tabs\n // We trust tab state over `currentTab`, in case tabs were added/removed/re-ordered\n\n var tabIndex = $tabs.indexOf($tabs.slice().reverse().find(function ($tab) {\n return $tab.localActive && !$tab.disabled;\n })); // Else try setting to `currentTab`\n\n if (tabIndex < 0) {\n var currentTab = this.currentTab;\n\n if (currentTab >= $tabs.length) {\n // Handle last tab being removed, so find the last non-disabled tab\n tabIndex = $tabs.indexOf($tabs.slice().reverse().find(notDisabled));\n } else if ($tabs[currentTab] && !$tabs[currentTab].disabled) {\n // Current tab is not disabled\n tabIndex = currentTab;\n }\n } // Else find first non-disabled tab in current tabs\n\n\n if (tabIndex < 0) {\n tabIndex = $tabs.indexOf($tabs.find(notDisabled));\n } // Ensure only one tab is active at a time\n\n\n $tabs.forEach(function ($tab, index) {\n $tab.localActive = index === tabIndex;\n });\n this.tabs = $tabs;\n this.currentTab = tabIndex;\n },\n // Find a button that controls a tab, given the tab reference\n // Returns the button vm instance\n getButtonForTab: function getButtonForTab($tab) {\n return (this.$refs.buttons || []).find(function ($btn) {\n return $btn.tab === $tab;\n });\n },\n // Force a button to re-render its content, given a `` instance\n // Called by `` on `update()`\n updateButton: function updateButton($tab) {\n var $button = this.getButtonForTab($tab);\n\n if ($button && $button.$forceUpdate) {\n $button.$forceUpdate();\n }\n },\n // Activate a tab given a `` instance\n // Also accessed by ``\n activateTab: function activateTab($tab) {\n var currentTab = this.currentTab,\n $tabs = this.tabs;\n var result = false;\n\n if ($tab) {\n var index = $tabs.indexOf($tab);\n\n if (index !== currentTab && index > -1 && !$tab.disabled) {\n var tabEvent = new BvEvent(EVENT_NAME_ACTIVATE_TAB, {\n cancelable: true,\n vueTarget: this,\n componentId: this.safeId()\n });\n this.$emit(tabEvent.type, index, currentTab, tabEvent);\n\n if (!tabEvent.defaultPrevented) {\n this.currentTab = index;\n result = true;\n }\n }\n } // Couldn't set tab, so ensure v-model is up to date\n\n /* istanbul ignore next: should rarely happen */\n\n\n if (!result && this[MODEL_PROP_NAME] !== currentTab) {\n this.$emit(MODEL_EVENT_NAME, currentTab);\n }\n\n return result;\n },\n // Deactivate a tab given a `` instance\n // Accessed by ``\n deactivateTab: function deactivateTab($tab) {\n if ($tab) {\n // Find first non-disabled tab that isn't the one being deactivated\n // If no tabs are available, then don't deactivate current tab\n return this.activateTab(this.tabs.filter(function ($t) {\n return $t !== $tab;\n }).find(notDisabled));\n }\n /* istanbul ignore next: should never/rarely happen */\n\n\n return false;\n },\n // Focus a tab button given its `` instance\n focusButton: function focusButton($tab) {\n var _this3 = this;\n\n // Wrap in `$nextTick()` to ensure DOM has completed rendering\n this.$nextTick(function () {\n attemptFocus(_this3.getButtonForTab($tab));\n });\n },\n // Emit a click event on a specified `` component instance\n emitTabClick: function emitTabClick(tab, event) {\n if (isEvent(event) && tab && tab.$emit && !tab.disabled) {\n tab.$emit(EVENT_NAME_CLICK, event);\n }\n },\n // Click handler\n clickTab: function clickTab($tab, event) {\n this.activateTab($tab);\n this.emitTabClick($tab, event);\n },\n // Move to first non-disabled tab\n firstTab: function firstTab(focus) {\n var $tab = this.tabs.find(notDisabled);\n\n if (this.activateTab($tab) && focus) {\n this.focusButton($tab);\n this.emitTabClick($tab, focus);\n }\n },\n // Move to previous non-disabled tab\n previousTab: function previousTab(focus) {\n var currentIndex = mathMax(this.currentTab, 0);\n var $tab = this.tabs.slice(0, currentIndex).reverse().find(notDisabled);\n\n if (this.activateTab($tab) && focus) {\n this.focusButton($tab);\n this.emitTabClick($tab, focus);\n }\n },\n // Move to next non-disabled tab\n nextTab: function nextTab(focus) {\n var currentIndex = mathMax(this.currentTab, -1);\n var $tab = this.tabs.slice(currentIndex + 1).find(notDisabled);\n\n if (this.activateTab($tab) && focus) {\n this.focusButton($tab);\n this.emitTabClick($tab, focus);\n }\n },\n // Move to last non-disabled tab\n lastTab: function lastTab(focus) {\n var $tab = this.tabs.slice().reverse().find(notDisabled);\n\n if (this.activateTab($tab) && focus) {\n this.focusButton($tab);\n this.emitTabClick($tab, focus);\n }\n }\n },\n render: function render(h) {\n var _this4 = this;\n\n var align = this.align,\n card = this.card,\n end = this.end,\n fill = this.fill,\n firstTab = this.firstTab,\n justified = this.justified,\n lastTab = this.lastTab,\n nextTab = this.nextTab,\n noKeyNav = this.noKeyNav,\n noNavStyle = this.noNavStyle,\n pills = this.pills,\n previousTab = this.previousTab,\n small = this.small,\n $tabs = this.tabs,\n vertical = this.vertical; // Currently active tab\n\n var $activeTab = $tabs.find(function ($tab) {\n return $tab.localActive && !$tab.disabled;\n }); // Tab button to allow focusing when no active tab found (keynav only)\n\n var $fallbackTab = $tabs.find(function ($tab) {\n return !$tab.disabled;\n }); // For each `` found create the tab buttons\n\n var $buttons = $tabs.map(function ($tab, index) {\n var _on;\n\n var safeId = $tab.safeId; // Ensure at least one tab button is focusable when keynav enabled (if possible)\n\n var tabIndex = null;\n\n if (!noKeyNav) {\n // Buttons are not in tab index unless active, or a fallback tab\n tabIndex = -1;\n\n if ($tab === $activeTab || !$activeTab && $tab === $fallbackTab) {\n // Place tab button in tab sequence\n tabIndex = null;\n }\n }\n\n return h(BVTabButton, {\n props: {\n controls: safeId ? safeId() : null,\n id: $tab.controlledBy || (safeId ? safeId(\"_BV_tab_button_\") : null),\n noKeyNav: noKeyNav,\n posInSet: index + 1,\n setSize: $tabs.length,\n tab: $tab,\n tabIndex: tabIndex\n },\n on: (_on = {}, _defineProperty(_on, EVENT_NAME_CLICK, function (event) {\n _this4.clickTab($tab, event);\n }), _defineProperty(_on, EVENT_NAME_FIRST, firstTab), _defineProperty(_on, EVENT_NAME_PREV, previousTab), _defineProperty(_on, EVENT_NAME_NEXT, nextTab), _defineProperty(_on, EVENT_NAME_LAST, lastTab), _on),\n key: $tab[COMPONENT_UID_KEY] || index,\n ref: 'buttons',\n // Needed to make `this.$refs.buttons` an array\n refInFor: true\n });\n });\n var $nav = h(BNav, {\n class: this.localNavClass,\n attrs: {\n role: 'tablist',\n id: this.safeId('_BV_tab_controls_')\n },\n props: {\n fill: fill,\n justified: justified,\n align: align,\n tabs: !noNavStyle && !pills,\n pills: !noNavStyle && pills,\n vertical: vertical,\n small: small,\n cardHeader: card && !vertical\n },\n ref: 'nav'\n }, [this.normalizeSlot(SLOT_NAME_TABS_START) || h(), $buttons, this.normalizeSlot(SLOT_NAME_TABS_END) || h()]);\n $nav = h('div', {\n class: [{\n 'card-header': card && !vertical && !end,\n 'card-footer': card && !vertical && end,\n 'col-auto': vertical\n }, this.navWrapperClass],\n key: 'bv-tabs-nav'\n }, [$nav]);\n var $children = this.normalizeSlot() || [];\n var $empty = h();\n\n if ($children.length === 0) {\n $empty = h('div', {\n class: ['tab-pane', 'active', {\n 'card-body': card\n }],\n key: 'bv-empty-tab'\n }, this.normalizeSlot(SLOT_NAME_EMPTY));\n }\n\n var $content = h('div', {\n staticClass: 'tab-content',\n class: [{\n col: vertical\n }, this.contentClass],\n attrs: {\n id: this.safeId('_BV_tab_container_')\n },\n key: 'bv-content',\n ref: 'content'\n }, [$children, $empty]); // Render final output\n\n return h(this.tag, {\n staticClass: 'tabs',\n class: {\n row: vertical,\n 'no-gutters': vertical && card\n },\n attrs: {\n id: this.safeId()\n }\n }, [end ? $content : h(), $nav, end ? h() : $content]);\n }\n});"],"sourceRoot":""} |