`\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});","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","'use strict';\n\nfunction fuzzysearch (needle, haystack) {\n var tlen = haystack.length;\n var qlen = needle.length;\n if (qlen > tlen) {\n return false;\n }\n if (qlen === tlen) {\n return needle === haystack;\n }\n outer: for (var i = 0, j = 0; i < qlen; i++) {\n var nch = needle.charCodeAt(i);\n while (j < tlen) {\n if (haystack.charCodeAt(j++) === nch) {\n continue outer;\n }\n }\n return false;\n }\n return true;\n}\n\nmodule.exports = fuzzysearch;\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ToastificationContent.vue?vue&type=style&index=0&id=55dd3057&prod&lang=scss&scoped=true\"","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});","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var classof = require('../internals/classof-raw');\n\n// `thisNumberValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-thisnumbervalue\nmodule.exports = function (value) {\n if (typeof value != 'number' && classof(value) != 'Number') {\n throw TypeError('Incorrect invocation');\n }\n return +value;\n};\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import { ref, nextTick } from '@vue/composition-api'\n\n// ===========================================================\n// ! This is coupled with \"veeValidate\" plugin\n// ===========================================================\n\nexport default function formValidation(resetFormData, clearFormData = () => {}) {\n // ------------------------------------------------\n // refFormObserver\n // ! This is for veeValidate Observer\n // * Used for veeValidate form observer\n // ------------------------------------------------\n const refFormObserver = ref(null)\n\n // ------------------------------------------------\n // resetObserver\n // ! This function is coupled with veeValidate\n // * It resets form observer\n // ------------------------------------------------\n const resetObserver = () => {\n refFormObserver.value.reset()\n }\n\n // ------------------------------------------------\n // getValidationState\n // ! This function is coupled with veeValidate\n // * It returns true/false based on validation\n // ------------------------------------------------\n // eslint-disable-next-line object-curly-newline\n const getValidationState = ({ dirty, validated, required: fieldRequired, changed, valid = null }) => {\n const result = dirty || validated ? valid : null\n return !fieldRequired && !changed ? null : result\n }\n\n // ------------------------------------------------\n // resetForm\n // ! This function is coupled with veeValidate\n // * This uses resetFormData arg to reset form data\n // ------------------------------------------------\n const resetForm = () => {\n resetFormData()\n nextTick(() => {\n resetObserver()\n })\n }\n\n // ------------------------------------------------\n // clearForm\n // ! This function is coupled with veeValidate\n // * This uses clearFormData arg to reset form data\n // ------------------------------------------------\n const clearForm = () => {\n clearFormData()\n nextTick(() => {\n resetObserver()\n })\n }\n\n return {\n refFormObserver,\n resetObserver,\n getValidationState,\n resetForm,\n clearForm,\n }\n}\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","export default [\n 'Afghanistan',\n 'Albania',\n 'Algeria',\n 'Andorra',\n 'Angola',\n 'Antigua and Barbuda',\n 'Argentina',\n 'Armenia',\n 'Australia',\n 'Austria',\n 'Azerbaijan',\n 'Bahamas',\n 'Bahrain',\n 'Bangladesh',\n 'Barbados',\n 'Belarus',\n 'Belgium',\n 'Belize',\n 'Benin',\n 'Bhutan',\n 'Bolivia',\n 'Bosnia and Herzegovina',\n 'Botswana',\n 'Brazil',\n 'Brunei',\n 'Bulgaria',\n 'Burkina Faso',\n 'Burundi',\n \"Côte d'Ivoire\",\n 'Cabo Verde',\n 'Cambodia',\n 'Cameroon',\n 'Canada',\n 'Central African Republic',\n 'Chad',\n 'Chile',\n 'China',\n 'Colombia',\n 'Comoros',\n 'Congo',\n 'Costa Rica',\n 'Croatia',\n 'Cuba',\n 'Cyprus',\n 'Czechia',\n 'Denmark',\n 'Djibouti',\n 'Dominica',\n 'Dominican Republic',\n 'Ecuador',\n 'Egypt',\n 'El Salvador',\n 'Equatorial Guinea',\n 'Eritrea',\n 'Estonia',\n 'Eswatini',\n 'Ethiopia',\n 'Fiji',\n 'Finland',\n 'France',\n 'Gabon',\n 'Gambia',\n 'Georgia',\n 'Germany',\n 'Ghana',\n 'Greece',\n 'Grenada',\n 'Guatemala',\n 'Guinea',\n 'Guinea-Bissau',\n 'Guyana',\n 'Haiti',\n 'Holy See',\n 'Honduras',\n 'Hungary',\n 'Iceland',\n 'India',\n 'Indonesia',\n 'Iran',\n 'Iraq',\n 'Ireland',\n 'Israel',\n 'Italy',\n 'Jamaica',\n 'Japan',\n 'Jordan',\n 'Kazakhstan',\n 'Kenya',\n 'Kiribati',\n 'Kuwait',\n 'Kyrgyzstan',\n 'Laos',\n 'Latvia',\n 'Lebanon',\n 'Lesotho',\n 'Liberia',\n 'Libya',\n 'Liechtenstein',\n 'Lithuania',\n 'Luxembourg',\n 'Madagascar',\n 'Malawi',\n 'Malaysia',\n 'Maldives',\n 'Mali',\n 'Malta',\n 'Marshall Islands',\n 'Mauritania',\n 'Mauritius',\n 'Mexico',\n 'Micronesia',\n 'Moldova',\n 'Monaco',\n 'Mongolia',\n 'Montenegro',\n 'Morocco',\n 'Mozambique',\n 'Myanmar',\n 'Namibia',\n 'Nauru',\n 'Nepal',\n 'Netherlands',\n 'New Zealand',\n 'Nicaragua',\n 'Niger',\n 'Nigeria',\n 'North Korea',\n 'North Macedonia',\n 'Norway',\n 'Oman',\n 'Pakistan',\n 'Palau',\n 'Palestine State',\n 'Panama',\n 'Papua New Guinea',\n 'Paraguay',\n 'Peru',\n 'Philippines',\n 'Poland',\n 'Portugal',\n 'Qatar',\n 'Romania',\n 'Russia',\n 'Rwanda',\n 'Saint Kitts and Nevis',\n 'Saint Lucia',\n 'Saint Vincent & the Grenadines',\n 'Samoa',\n 'San Marino',\n 'Sao Tome and Principe',\n 'Saudi Arabia',\n 'Senegal',\n 'Serbia',\n 'Seychelles',\n 'Sierra Leone',\n 'Singapore',\n 'Slovakia',\n 'Slovenia',\n 'Solomon Islands',\n 'Somalia',\n 'South Africa',\n 'South Korea',\n 'South Sudan',\n 'Spain',\n 'Sri Lanka',\n 'Sudan',\n 'Suriname',\n 'Sweden',\n 'Switzerland',\n 'Syria',\n 'Tajikistan',\n 'Tanzania',\n 'Thailand',\n 'Timor-Leste',\n 'Togo',\n 'Tonga',\n 'Trinidad and Tobago',\n 'Tunisia',\n 'Turkey',\n 'Turkmenistan',\n 'Tuvalu',\n 'Uganda',\n 'Ukraine',\n 'United Arab Emirates',\n 'United Kingdom',\n 'USA',\n 'Uruguay',\n 'Uzbekistan',\n 'Vanuatu',\n 'Venezuela',\n 'Vietnam',\n 'Yemen',\n 'Zambia',\n 'Zimbabwe',\n]\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefProductsList.vue?vue&type=style&index=0&id=78b3e3fd&prod&lang=scss&scoped=true\"","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {\n var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;\n var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];\n return replacer !== undefined\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n if (\n (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||\n (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)\n ) {\n var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);\n if (res.done) return res.value;\n }\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return nativeReplace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n});\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefProductListAddNew.vue?vue&type=style&index=0&id=0f4edf8c&prod&lang=scss\"","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue, mergeData } from '../../vue';\nimport { NAME_MEDIA_ASIDE } from '../../constants/components';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n right: makeProp(PROP_TYPE_BOOLEAN, false),\n tag: makeProp(PROP_TYPE_STRING, 'div'),\n verticalAlign: makeProp(PROP_TYPE_STRING, 'top')\n}, NAME_MEDIA_ASIDE); // --- Main component ---\n// @vue/component\n\nexport var BMediaAside = /*#__PURE__*/Vue.extend({\n name: NAME_MEDIA_ASIDE,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n var verticalAlign = props.verticalAlign;\n var align = verticalAlign === 'top' ? 'start' : verticalAlign === 'bottom' ? 'end' :\n /* istanbul ignore next */\n verticalAlign;\n return h(props.tag, mergeData(data, {\n staticClass: 'media-aside',\n class: _defineProperty({\n 'media-aside-right': props.right\n }, \"align-self-\".concat(align), align)\n }), children);\n }\n});","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});","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefProductsList.vue?vue&type=style&index=1&id=78b3e3fd&prod&lang=scss\"","/*\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};","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('ref-product-list-add-new',{attrs:{\"is-add-new-ref-product-sidebar-active\":_vm.isAddNewRefProductSidebarActive,\"role-options\":_vm.roleOptions,\"plan-options\":_vm.planOptions,\"product\":_vm.refProduct,\"clear-ref-product-data\":_vm.resetRefProductData,\"ref-product-options\":_vm.refProductOptions},on:{\"update:isAddNewRefProductSidebarActive\":function($event){_vm.isAddNewRefProductSidebarActive=$event},\"update:is-add-new-ref-product-sidebar-active\":function($event){_vm.isAddNewRefProductSidebarActive=$event},\"refetch-data\":_vm.refetchData,\"add-ref-product\":_vm.addRefProduct,\"update-ref-product\":_vm.updateRefProduct}}),_c('b-card',{staticClass:\"mb-0\",attrs:{\"no-body\":\"\"}},[_c('div',{staticClass:\"m-2\"},[_c('b-row',[_c('b-col',{staticClass:\"d-flex align-items-center justify-content-start mb-1 mb-md-0\",attrs:{\"cols\":\"12\",\"md\":\"6\"}},[_c('label',[_vm._v(\"Нэг хуудсанд\")]),_c('v-select',{staticClass:\"per-page-selector d-inline-block mx-50\",attrs:{\"dir\":_vm.$store.state.appConfig.isRTL ? 'rtl' : 'ltr',\"options\":_vm.perPageOptions,\"clearable\":false},model:{value:(_vm.perPage),callback:function ($$v) {_vm.perPage=$$v},expression:\"perPage\"}}),_c('label',[_vm._v(\" бичлэг харуулах\")])],1),_c('b-col',{attrs:{\"cols\":\"12\",\"md\":\"6\"}},[_c('div',{staticClass:\"d-flex align-items-center justify-content-end\"},[_c('b-form-input',{staticClass:\"d-inline-block mr-1\",attrs:{\"placeholder\":\"Хайх...\"},model:{value:(_vm.searchQuery),callback:function ($$v) {_vm.searchQuery=$$v},expression:\"searchQuery\"}}),_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":function($event){_vm.isAddNewRefProductSidebarActive = true}}},[_c('span',{staticClass:\"text-nowrap\"},[_vm._v(\"Бүтээгдэхүүн нэмэх\")])])],1)])],1)],1),_c('el-table',{staticStyle:{\"width\":\"100%\",\"margin-bottom\":\"20px\"},attrs:{\"data\":_vm.refProductOptions,\"row-key\":\"id\",\"border\":\"\",\"default-expand-all\":\"\"}},[_c('el-table-column',{attrs:{\"prop\":\"name\",\"label\":\"Бүтээгдэхүүний нэр\",\"sortable\":\"\"}}),_c('el-table-column',{attrs:{\"prop\":\"created_at\",\"label\":\"Үүсгэсэн огноо\",\"sortable\":\"\"}}),_c('el-table-column',{attrs:{\"prop\":\"created_by\",\"label\":\"Үүсгэсэн хэрэглэгч\",\"sortable\":\"\"}}),_c('el-table-column',{attrs:{\"prop\":\"is_active\",\"label\":\"Төлөв\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('b-badge',{attrs:{\"pill\":\"\",\"variant\":scope.row.is_active ? 'success': 'danger'}},[_vm._v(\" \"+_vm._s(scope.row.is_active ? 'идэвхтэй': 'идэвхгүй')+\" \")])]}}])}),_c('el-table-column',{attrs:{\"fixed\":\"right\",\"label\":\"Үйлдэл\",\"width\":\"120\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('b-button',{directives:[{name:\"ripple\",rawName:\"v-ripple.400\",value:('rgba(113, 102, 240, 0.15)'),expression:\"'rgba(113, 102, 240, 0.15)'\",modifiers:{\"400\":true}},{name:\"b-tooltip\",rawName:\"v-b-tooltip.hover.v-primary\",modifiers:{\"hover\":true,\"v-primary\":true}}],staticClass:\"btn-icon __table_action_button\",attrs:{\"variant\":\"outline-primary\",\"title\":\"Дэлгэрэнгүй\",\"size\":\"sm\"},on:{\"click\":function($event){return _vm.getProduct(scope.row)}}},[_c('feather-icon',{attrs:{\"icon\":\"FileTextIcon\"}})],1),_c('b-button',{directives:[{name:\"ripple\",rawName:\"v-ripple.400\",value:('rgba(113, 102, 240, 0.15)'),expression:\"'rgba(113, 102, 240, 0.15)'\",modifiers:{\"400\":true}},{name:\"b-tooltip\",rawName:\"v-b-tooltip.hover.v-primary\",modifiers:{\"hover\":true,\"v-primary\":true}}],staticClass:\"btn-icon __table_action_button\",attrs:{\"variant\":\"outline-primary\",\"title\":\"Засах\",\"size\":\"sm\"},on:{\"click\":function($event){return _vm.getProduct(scope.row)}}},[_c('feather-icon',{attrs:{\"icon\":\"EditIcon\"}})],1),_c('b-button',{directives:[{name:\"ripple\",rawName:\"v-ripple.400\",value:('rgba(113, 102, 240, 0.15)'),expression:\"'rgba(113, 102, 240, 0.15)'\",modifiers:{\"400\":true}},{name:\"b-tooltip\",rawName:\"v-b-tooltip.hover.v-primary\",modifiers:{\"hover\":true,\"v-primary\":true}}],staticClass:\"btn-icon __table_action_button\",attrs:{\"variant\":scope.row.is_active ? 'outline-primary' : 'primary',\"title\":'Устгах',\"size\":\"sm\"},on:{\"click\":function($event){return _vm.confirmDelete(scope.row)}}},[_c('feather-icon',{attrs:{\"icon\":'TrashIcon'}})],1)]}}])})],1),_c('b-modal',{attrs:{\"id\":\"delete-confirm-modal\",\"ok-title\":\"Тийм\",\"cancel-title\":\"Үгүй\"},on:{\"ok\":_vm.deleteRefProduct},scopedSlots:_vm._u([{key:\"modal-title\",fn:function(){return [_vm._v(\" Устгахдаа итгэлтэй байна уу? \")]},proxy:true}])},[_c('p',[_vm._v(\"Та энэ бүтээгдэхүүнийг устгахдаа итгэлтэй байна уу?\")])]),_c('div',{staticClass:\"mx-2 mb-2\"},[_c('b-row',[_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.of)+\"-н \"+_vm._s(_vm.dataMeta.from)+\" - \"+_vm._s(_vm.dataMeta.to)+\" бичлэгийг харуулж байна\")])]),_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.totalOrganizations,\"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}]),model:{value:(_vm.currentPage),callback:function ($$v) {_vm.currentPage=$$v},expression:\"currentPage\"}})],1)],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-card',{attrs:{\"no-body\":\"\"}},[_c('b-card-header',{staticClass:\"pb-50\"},[_c('h5',[_vm._v(\" Filters \")])]),_c('b-card-body',[_c('b-row',[_c('b-col',{staticClass:\"mb-md-0 mb-2\",attrs:{\"cols\":\"12\",\"md\":\"4\"}},[_c('label',[_vm._v(\"Ангилалын нэр\")]),_c('v-select',{staticClass:\"w-100\",attrs:{\"dir\":_vm.$store.state.appConfig.isRTL ? 'rtl' : 'ltr',\"value\":_vm.roleFilter,\"options\":_vm.roleOptions,\"reduce\":function (val) { return val.value; }},on:{\"input\":function (val) { return _vm.$emit('update:roleFilter', val); }}})],1),_c('b-col',{staticClass:\"mb-md-0 mb-2\",attrs:{\"cols\":\"12\",\"md\":\"4\"}},[_c('label',[_vm._v(\"Код\")]),_c('v-select',{staticClass:\"w-100\",attrs:{\"dir\":_vm.$store.state.appConfig.isRTL ? 'rtl' : 'ltr',\"value\":_vm.planFilter,\"options\":_vm.planOptions,\"reduce\":function (val) { return val.value; }},on:{\"input\":function (val) { return _vm.$emit('update:planFilter', val); }}})],1),_c('b-col',{staticClass:\"mb-md-0 mb-2\",attrs:{\"cols\":\"12\",\"md\":\"4\"}},[_c('label',[_vm._v(\"Төлөв\")]),_c('v-select',{staticClass:\"w-100\",attrs:{\"dir\":_vm.$store.state.appConfig.isRTL ? 'rtl' : 'ltr',\"value\":_vm.statusFilter,\"options\":_vm.statusOptions,\"reduce\":function (val) { return val.value; }},on:{\"input\":function (val) { return _vm.$emit('update:statusFilter', val); }}})],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n Filters\n \n \n \n \n \n \n \n val.value\"\n @input=\"(val) => $emit('update:roleFilter', val)\"\n />\n \n \n \n \n val.value\"\n @input=\"(val) => $emit('update:planFilter', val)\"\n />\n \n \n \n val.value\"\n @input=\"(val) => $emit('update:statusFilter', val)\"\n />\n \n \n \n \n\n\n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefProductsListFilters.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefProductsListFilters.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./RefProductsListFilters.vue?vue&type=template&id=0e35fd79\"\nimport script from \"./RefProductsListFilters.vue?vue&type=script&lang=js\"\nexport * from \"./RefProductsListFilters.vue?vue&type=script&lang=js\"\nimport style0 from \"./RefProductsListFilters.vue?vue&type=style&index=0&id=0e35fd79&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import { ref, watch, computed } from '@vue/composition-api'\nimport store from '@/store'\nimport { title } from '@core/utils/filter'\n\n// Notification\nimport { useToast } from 'vue-toastification/composition'\nimport ToastificationContent from '@core/components/toastification/ToastificationContent.vue'\n\nexport default function useOrganizationsList() {\n // Use toast\n const toast = useToast()\n\n const refRefProductListTable = ref(null)\n\n // Table Handlers\n const tableColumns = [\n { key: 'name', sortable: true, label: 'Бүтээгдэхүүний нэр' },\n { key: 'created_at', sortable: true, label: 'Үүсгэсэн огноо' },\n { key: 'created_by', sortable: true, label: 'Үүсгэсэн хэрэглэгч' },\n // { key: 'role', sortable: true, label: 'Эрх' },\n // {\n // key: 'currentPlan',\n // label: 'Групп',\n // formatter: title,\n // sortable: true,\n // },\n { key: 'is_active', sortable: true, label: 'Төлөв' },\n { key: 'actions', label: 'Үйлдэл' },\n ]\n const perPage = ref(10)\n const totalOrganizations = ref(0)\n const currentPage = ref(1)\n const perPageOptions = [10, 25, 50, 100]\n const searchQuery = ref('')\n const sortBy = ref('id')\n const isSortDirDesc = ref(true)\n const roleFilter = ref(null)\n const planFilter = ref(null)\n const statusFilter = ref(null)\n\n const dataMeta = computed(() => {\n const localItemsCount = refRefProductListTable.value ? refRefProductListTable.value.localItems.length : 0\n return {\n from: perPage.value * (currentPage.value - 1) + (localItemsCount ? 1 : 0),\n to: perPage.value * (currentPage.value - 1) + localItemsCount,\n of: totalOrganizations.value,\n }\n })\n\n const refetchData = () => {\n refRefProductListTable.value.refresh()\n }\n\n watch([currentPage, perPage, searchQuery, roleFilter, planFilter, statusFilter], () => {\n refetchData()\n })\n\n const fetchRefProducts = (ctx, callback) => {\n store\n .dispatch('app-ref-product/fetchRefProducts', {\n q: searchQuery.value,\n perPage: perPage.value,\n page: currentPage.value,\n sortBy: sortBy.value,\n sortDesc: isSortDirDesc.value,\n role: roleFilter.value,\n plan: planFilter.value,\n status: statusFilter.value,\n })\n .then(response => {\n // const { organizations, total } = response.data\n const organizations = response.data.response\n const total = 10\n // const organizationa = organizations.map(x => (x.status === 'active') ? x.statusText = 'Идэвхитэй' : (x.status === 'inactive') ? x.statusText = 'Идэвхигүй' : x.statusText = 'Хүлээгдэж буй')\n callback(organizations)\n totalOrganizations.value = total\n })\n .catch(() => {\n toast({\n component: ToastificationContent,\n props: {\n title: 'Error fetching organizations list',\n icon: 'AlertTriangleIcon',\n variant: 'danger',\n },\n })\n })\n }\n\n // *===============================================---*\n // *--------- UI ---------------------------------------*\n // *===============================================---*\n\n const resolveOrganizationRoleVariant = role => {\n if (role === 'subscriber') return 'primary'\n if (role === 'author') return 'warning'\n if (role === 'maintainer') return 'success'\n if (role === 'editor') return 'info'\n if (role === 'admin') return 'danger'\n return 'primary'\n }\n\n const resolveOrganizationRoleIcon = role => {\n if (role === 'subscriber') return 'OrganizationIcon'\n if (role === 'author') return 'SettingsIcon'\n if (role === 'maintainer') return 'DatabaseIcon'\n if (role === 'editor') return 'Edit2Icon'\n if (role === 'admin') return 'ServerIcon'\n return 'OrganizationIcon'\n }\n\n const resolveOrganizationStatusVariant = status => {\n if (status === 'pending') return 'warning'\n if (status === 'active') return 'success'\n if (status === 'inactive') return 'secondary'\n return 'primary'\n }\n\n return {\n fetchRefProducts,\n tableColumns,\n perPage,\n currentPage,\n totalOrganizations,\n dataMeta,\n perPageOptions,\n searchQuery,\n sortBy,\n isSortDirDesc,\n refRefProductListTable,\n\n resolveOrganizationRoleVariant,\n resolveOrganizationRoleIcon,\n resolveOrganizationStatusVariant,\n refetchData,\n\n // Extra Filters\n roleFilter,\n planFilter,\n statusFilter,\n }\n}\n","import axios from '@axios'\nimport baseConfig from '@/config/index'\nconst TICKET_API_SERVICE_PATH = baseConfig.TICKET_API_SERVICE_PATH\n\nexport default {\n namespaced: true,\n state: {},\n getters: {},\n mutations: {},\n actions: {\n fetchRefProducts(ctx, queryParams) {\n return new Promise((resolve, reject) => {\n axios\n .post(TICKET_API_SERVICE_PATH + '/refProduct/list', { params: queryParams })\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n fetchRefProductsWithChildren(ctx, queryParams) {\n return new Promise((resolve, reject) => {\n axios\n .post(TICKET_API_SERVICE_PATH + '/refProduct/listWithChildren', { params: queryParams })\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n fetchRefProduct(ctx, { id }) {\n return new Promise((resolve, reject) => {\n axios\n .post(TICKET_API_SERVICE_PATH + '/refProduct/detail', { refProductId: id})\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n editRefProduct(ctx, refProductData) {\n return new Promise((resolve, reject) => {\n axios\n .post(TICKET_API_SERVICE_PATH + '/refProduct/edit', refProductData)\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n deleteRefProduct(ctx, refProductData) {\n return new Promise((resolve, reject) => {\n axios\n .post(TICKET_API_SERVICE_PATH + '/refProduct/delete', refProductData)\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n addRefProduct(ctx, refProductData) {\n return new Promise((resolve, reject) => {\n axios\n .post(TICKET_API_SERVICE_PATH + '/refProduct/create', refProductData )\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n },\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-sidebar',{attrs:{\"id\":\"add-new-ref-category-sidebar\",\"visible\":_vm.isAddNewRefProductSidebarActive,\"bg-variant\":\"white\",\"sidebar-class\":\"sidebar-lg\",\"shadow\":\"\",\"backdrop\":\"\",\"no-header\":\"\",\"right\":\"\"},on:{\"hidden\":_vm.clearForm,\"change\":function (val) { return _vm.$emit('update:is-add-new-ref-product-sidebar-active', val); }},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar hide = ref.hide;\nreturn [_c('div',{staticClass:\"d-flex justify-content-between align-items-center content-sidebar-header px-2 py-1\"},[_c('h5',{staticClass:\"mb-0\"},[_vm._v(\" Ангилал нэмэх \")]),_c('feather-icon',{staticClass:\"ml-1 cursor-pointer\",attrs:{\"icon\":\"XIcon\",\"size\":\"16\"},on:{\"click\":hide}})],1),_c('validation-observer',{ref:\"refFormObserver\",scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar handleSubmit = ref.handleSubmit;\nreturn [_c('b-form',{staticClass:\"p-2\",on:{\"submit\":function($event){$event.preventDefault();return handleSubmit(_vm.onSubmit)},\"reset\":function($event){$event.preventDefault();return _vm.resetForm($event)}}},[_c('b-form-group',{attrs:{\"label\":\"Бүтээгдэхүүн\",\"label-for\":\"зжүбгёэы\"}},[_c('treeselect',{attrs:{\"options\":_vm.refProductOptions,\"label\":\"name\",\"placeholder\":\"Бүтээгдэхүүн\",\"closeOnSelect\":true},model:{value:(_vm.refProductLocal.parent),callback:function ($$v) {_vm.$set(_vm.refProductLocal, \"parent\", $$v)},expression:\"refProductLocal.parent\"}})],1),_c('validation-provider',{attrs:{\"name\":\"Бүтээгдэхүүний нэр\",\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(validationContext){return [_c('b-form-group',{attrs:{\"label\":\"Бүтээгдэхүүний нэр\",\"label-for\":\"ref-product-name\"}},[_c('b-form-input',{attrs:{\"id\":\"ref-product-name\",\"autofocus\":\"\",\"state\":_vm.getValidationState(validationContext),\"trim\":\"\",\"placeholder\":\"Бүтээгдэхүүний нэр\"},model:{value:(_vm.refProductLocal.name),callback:function ($$v) {_vm.$set(_vm.refProductLocal, \"name\", $$v)},expression:\"refProductLocal.name\"}}),_c('b-form-invalid-feedback',[_vm._v(\" \"+_vm._s(validationContext.errors[0])+\" \")])],1)]}}],null,true)}),_c('validation-provider',{attrs:{\"name\":\"Дараалал\",\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(validationContext){return [_c('b-form-group',{attrs:{\"label\":\"Дараалал\",\"label-for\":\"sort-order\",\"state\":_vm.getValidationState(validationContext)}},[_c('b-form-spinbutton',{attrs:{\"id\":\"sort-order\",\"min\":\"1\",\"max\":\"100\"},model:{value:(_vm.refProductLocal.sort_order),callback:function ($$v) {_vm.$set(_vm.refProductLocal, \"sort_order\", $$v)},expression:\"refProductLocal.sort_order\"}}),_c('b-form-invalid-feedback',{attrs:{\"state\":_vm.getValidationState(validationContext)}},[_vm._v(\" \"+_vm._s(validationContext.errors[0])+\" \")])],1)]}}],null,true)}),_c('div',{staticClass:\"d-flex mt-2\"},[_c('b-button',{directives:[{name:\"ripple\",rawName:\"v-ripple.400\",value:('rgba(255, 255, 255, 0.15)'),expression:\"'rgba(255, 255, 255, 0.15)'\",modifiers:{\"400\":true}}],staticClass:\"mr-2\",attrs:{\"variant\":\"primary\",\"type\":\"submit\"}},[_vm._v(\" Нэмэх \")]),_c('b-button',{directives:[{name:\"ripple\",rawName:\"v-ripple.400\",value:('rgba(186, 191, 199, 0.15)'),expression:\"'rgba(186, 191, 199, 0.15)'\",modifiers:{\"400\":true}}],attrs:{\"type\":\"button\",\"variant\":\"outline-secondary\"},on:{\"click\":hide}},[_vm._v(\" Цуцлах \")])],1)],1)]}}],null,true)})]}}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { ref, watch } from '@vue/composition-api'\n// import store from '@/store'\n\nexport default function useRefProductHandler(props, emit) {\n // ------------------------------------------------\n // taskLocal\n // ------------------------------------------------\n const refProductLocal = ref(JSON.parse(JSON.stringify(props.product.value)))\n const resetRefProductLocal = () => {\n refProductLocal.value = JSON.parse(JSON.stringify(props.product.value))\n }\n watch(props.product, () => {\n resetRefProductLocal()\n })\n \n // ------------------------------------------------\n // isEventHandlerSidebarActive\n // * Clear form if sidebar is closed\n // ! We can hide it using @hidden event\n // ------------------------------------------------\n // watch(props.isEventHandlerSidebarActive, val => {\n // // ? Don't reset event till transition is finished\n // if (!val) {\n // setTimeout(() => {\n // clearForm.value()\n // }, 350)\n // }\n // })\n \n const onSubmit = () => {\n const refProductData = JSON.parse(JSON.stringify(refProductLocal))\n \n // * If event has id => Edit Event\n // Emit event for add/update event\n if (props.product.value.id) emit('update-ref-product', refProductData.value)\n else emit('add-ref-product', refProductData.value)\n \n // Close sidebar\n emit('update:is-add-new-ref-product-sidebar-active', false)\n }\n \n \n return {\n // fetchCategories,\n // fetchProducts,\n // fetchTags,\n // fetchPriorities,\n // fetchTeams,\n // fetchUsers,\n refProductLocal,\n resetRefProductLocal,\n onSubmit,\n }\n }","\n \n\n\n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefProductListAddNew.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefProductListAddNew.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./RefProductListAddNew.vue?vue&type=template&id=0f4edf8c\"\nimport script from \"./RefProductListAddNew.vue?vue&type=script&lang=js\"\nexport * from \"./RefProductListAddNew.vue?vue&type=script&lang=js\"\nimport style0 from \"./RefProductListAddNew.vue?vue&type=style&index=0&id=0f4edf8c&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\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 {{ scope.row.is_active ? 'идэвхтэй': 'идэвхгүй' }}\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 Нийт {{ dataMeta.of }}-н {{ dataMeta.from }} - {{ dataMeta.to }} бичлэгийг харуулж байна\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","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefProductsList.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RefProductsList.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./RefProductsList.vue?vue&type=template&id=78b3e3fd&scoped=true\"\nimport script from \"./RefProductsList.vue?vue&type=script&lang=js\"\nexport * from \"./RefProductsList.vue?vue&type=script&lang=js\"\nimport style0 from \"./RefProductsList.vue?vue&type=style&index=0&id=78b3e3fd&prod&lang=scss&scoped=true\"\nimport style1 from \"./RefProductsList.vue?vue&type=style&index=1&id=78b3e3fd&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"78b3e3fd\",\n null\n \n)\n\nexport default component.exports","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","// 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});","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_SPINBUTTON } from '../../constants/components';\nimport { EVENT_NAME_CHANGE } from '../../constants/events';\nimport { PROP_TYPE_ARRAY_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_BOOLEAN_NUMBER, PROP_TYPE_FUNCTION, PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING } from '../../constants/props';\nimport { CODE_DOWN, CODE_END, CODE_HOME, CODE_PAGEUP, CODE_UP, CODE_PAGEDOWN } from '../../constants/key-codes';\nimport { SLOT_NAME_DECREMENT, SLOT_NAME_INCREMENT } from '../../constants/slots';\nimport { arrayIncludes, concat } from '../../utils/array';\nimport { attemptBlur, attemptFocus } from '../../utils/dom';\nimport { eventOnOff, stopEvent } from '../../utils/events';\nimport { identity } from '../../utils/identity';\nimport { isNull } from '../../utils/inspect';\nimport { isLocaleRTL } from '../../utils/locale';\nimport { mathFloor, mathMax, mathPow, mathRound } from '../../utils/math';\nimport { makeModelMixin } from '../../utils/model';\nimport { toFloat, toInteger } from '../../utils/number';\nimport { omit, sortKeys } from '../../utils/object';\nimport { hasPropFunction, makeProp, makePropsConfigurable } from '../../utils/props';\nimport { toString } from '../../utils/string';\nimport { attrsMixin } from '../../mixins/attrs';\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 { props as formControlProps } from '../../mixins/form-control';\nimport { BIconPlus, BIconDash } from '../../icons/icons'; // --- Constants ---\n\nvar _makeModelMixin = makeModelMixin('value', {\n // Should this really be String, to match native number inputs?\n type: PROP_TYPE_BOOLEAN_NUMBER\n}),\n modelMixin = _makeModelMixin.mixin,\n modelProps = _makeModelMixin.props,\n MODEL_PROP_NAME = _makeModelMixin.prop,\n MODEL_EVENT_NAME = _makeModelMixin.event; // Default for spin button range and step\n\n\nvar DEFAULT_MIN = 1;\nvar DEFAULT_MAX = 100;\nvar DEFAULT_STEP = 1; // Delay before auto-repeat in ms\n\nvar DEFAULT_REPEAT_DELAY = 500; // Repeat interval in ms\n\nvar DEFAULT_REPEAT_INTERVAL = 100; // Repeat rate increased after number of repeats\n\nvar DEFAULT_REPEAT_THRESHOLD = 10; // Repeat speed multiplier (step multiplier, must be an integer)\n\nvar DEFAULT_REPEAT_MULTIPLIER = 4;\nvar KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]; // --- Props ---\n\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, idProps), modelProps), omit(formControlProps, ['required', 'autofocus'])), formSizeProps), formStateProps), {}, {\n ariaControls: makeProp(PROP_TYPE_STRING),\n ariaLabel: makeProp(PROP_TYPE_STRING),\n formatterFn: makeProp(PROP_TYPE_FUNCTION),\n inline: makeProp(PROP_TYPE_BOOLEAN, false),\n labelDecrement: makeProp(PROP_TYPE_STRING, 'Decrement'),\n labelIncrement: makeProp(PROP_TYPE_STRING, 'Increment'),\n locale: makeProp(PROP_TYPE_ARRAY_STRING),\n max: makeProp(PROP_TYPE_NUMBER_STRING, DEFAULT_MAX),\n min: makeProp(PROP_TYPE_NUMBER_STRING, DEFAULT_MIN),\n placeholder: makeProp(PROP_TYPE_STRING),\n readonly: makeProp(PROP_TYPE_BOOLEAN, false),\n repeatDelay: makeProp(PROP_TYPE_NUMBER_STRING, DEFAULT_REPEAT_DELAY),\n repeatInterval: makeProp(PROP_TYPE_NUMBER_STRING, DEFAULT_REPEAT_INTERVAL),\n repeatStepMultiplier: makeProp(PROP_TYPE_NUMBER_STRING, DEFAULT_REPEAT_MULTIPLIER),\n repeatThreshold: makeProp(PROP_TYPE_NUMBER_STRING, DEFAULT_REPEAT_THRESHOLD),\n step: makeProp(PROP_TYPE_NUMBER_STRING, DEFAULT_STEP),\n vertical: makeProp(PROP_TYPE_BOOLEAN, false),\n wrap: makeProp(PROP_TYPE_BOOLEAN, false)\n})), NAME_FORM_SPINBUTTON); // --- Main Component ---\n// @vue/component\n\nexport var BFormSpinbutton = /*#__PURE__*/Vue.extend({\n name: NAME_FORM_SPINBUTTON,\n // Mixin order is important!\n mixins: [attrsMixin, idMixin, modelMixin, formSizeMixin, formStateMixin, normalizeSlotMixin],\n inheritAttrs: false,\n props: props,\n data: function data() {\n return {\n localValue: toFloat(this[MODEL_PROP_NAME], null),\n hasFocus: false\n };\n },\n computed: {\n spinId: function spinId() {\n return this.safeId();\n },\n computedInline: function computedInline() {\n return this.inline && !this.vertical;\n },\n computedReadonly: function computedReadonly() {\n return this.readonly && !this.disabled;\n },\n computedRequired: function computedRequired() {\n return this.required && !this.computedReadonly && !this.disabled;\n },\n computedStep: function computedStep() {\n return toFloat(this.step, DEFAULT_STEP);\n },\n computedMin: function computedMin() {\n return toFloat(this.min, DEFAULT_MIN);\n },\n computedMax: function computedMax() {\n // We round down to the nearest maximum step value\n var max = toFloat(this.max, DEFAULT_MAX);\n var step = this.computedStep;\n var min = this.computedMin;\n return mathFloor((max - min) / step) * step + min;\n },\n computedDelay: function computedDelay() {\n var delay = toInteger(this.repeatDelay, 0);\n return delay > 0 ? delay : DEFAULT_REPEAT_DELAY;\n },\n computedInterval: function computedInterval() {\n var interval = toInteger(this.repeatInterval, 0);\n return interval > 0 ? interval : DEFAULT_REPEAT_INTERVAL;\n },\n computedThreshold: function computedThreshold() {\n return mathMax(toInteger(this.repeatThreshold, DEFAULT_REPEAT_THRESHOLD), 1);\n },\n computedStepMultiplier: function computedStepMultiplier() {\n return mathMax(toInteger(this.repeatStepMultiplier, DEFAULT_REPEAT_MULTIPLIER), 1);\n },\n computedPrecision: function computedPrecision() {\n // Quick and dirty way to get the number of decimals\n var step = this.computedStep;\n return mathFloor(step) === step ? 0 : (step.toString().split('.')[1] || '').length;\n },\n computedMultiplier: function computedMultiplier() {\n return mathPow(10, this.computedPrecision || 0);\n },\n valueAsFixed: function valueAsFixed() {\n var value = this.localValue;\n return isNull(value) ? '' : value.toFixed(this.computedPrecision);\n },\n computedLocale: function computedLocale() {\n var locales = concat(this.locale).filter(identity);\n var nf = new Intl.NumberFormat(locales);\n return nf.resolvedOptions().locale;\n },\n computedRTL: function computedRTL() {\n return isLocaleRTL(this.computedLocale);\n },\n defaultFormatter: function defaultFormatter() {\n // Returns and `Intl.NumberFormat` formatter method reference\n var precision = this.computedPrecision;\n var nf = new Intl.NumberFormat(this.computedLocale, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: precision,\n maximumFractionDigits: precision,\n notation: 'standard'\n }); // Return the format method reference\n\n return nf.format;\n },\n computedFormatter: function computedFormatter() {\n var formatterFn = this.formatterFn;\n return hasPropFunction(formatterFn) ? formatterFn : this.defaultFormatter;\n },\n computedAttrs: function computedAttrs() {\n return _objectSpread(_objectSpread({}, this.bvAttrs), {}, {\n role: 'group',\n lang: this.computedLocale,\n tabindex: this.disabled ? null : '-1',\n title: this.ariaLabel\n });\n },\n computedSpinAttrs: function computedSpinAttrs() {\n var spinId = this.spinId,\n value = this.localValue,\n required = this.computedRequired,\n disabled = this.disabled,\n state = this.state,\n computedFormatter = this.computedFormatter;\n var hasValue = !isNull(value);\n return _objectSpread(_objectSpread({\n dir: this.computedRTL ? 'rtl' : 'ltr'\n }, this.bvAttrs), {}, {\n id: spinId,\n role: 'spinbutton',\n tabindex: disabled ? null : '0',\n 'aria-live': 'off',\n 'aria-label': this.ariaLabel || null,\n 'aria-controls': this.ariaControls || null,\n // TODO: May want to check if the value is in range\n 'aria-invalid': state === false || !hasValue && required ? 'true' : null,\n 'aria-required': required ? 'true' : null,\n // These attrs are required for role spinbutton\n 'aria-valuemin': toString(this.computedMin),\n 'aria-valuemax': toString(this.computedMax),\n // These should be `null` if the value is out of range\n // They must also be non-existent attrs if the value is out of range or `null`\n 'aria-valuenow': hasValue ? value : null,\n 'aria-valuetext': hasValue ? computedFormatter(value) : null\n });\n }\n },\n watch: (_watch = {}, _defineProperty(_watch, MODEL_PROP_NAME, function (value) {\n this.localValue = toFloat(value, null);\n }), _defineProperty(_watch, \"localValue\", function localValue(value) {\n this.$emit(MODEL_EVENT_NAME, value);\n }), _defineProperty(_watch, \"disabled\", function disabled(_disabled) {\n if (_disabled) {\n this.clearRepeat();\n }\n }), _defineProperty(_watch, \"readonly\", function readonly(_readonly) {\n if (_readonly) {\n this.clearRepeat();\n }\n }), _watch),\n created: function created() {\n // Create non reactive properties\n this.$_autoDelayTimer = null;\n this.$_autoRepeatTimer = null;\n this.$_keyIsDown = false;\n },\n beforeDestroy: function beforeDestroy() {\n this.clearRepeat();\n },\n\n /* istanbul ignore next */\n deactivated: function deactivated() {\n this.clearRepeat();\n },\n methods: {\n // --- Public methods ---\n focus: function focus() {\n if (!this.disabled) {\n attemptFocus(this.$refs.spinner);\n }\n },\n blur: function blur() {\n if (!this.disabled) {\n attemptBlur(this.$refs.spinner);\n }\n },\n // --- Private methods ---\n emitChange: function emitChange() {\n this.$emit(EVENT_NAME_CHANGE, this.localValue);\n },\n stepValue: function stepValue(direction) {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n var value = this.localValue;\n\n if (!this.disabled && !isNull(value)) {\n var step = this.computedStep * direction;\n var min = this.computedMin;\n var max = this.computedMax;\n var multiplier = this.computedMultiplier;\n var wrap = this.wrap; // We ensure that the value steps like a native input\n\n value = mathRound((value - min) / step) * step + min + step; // We ensure that precision is maintained (decimals)\n\n value = mathRound(value * multiplier) / multiplier; // Handle if wrapping is enabled\n\n this.localValue = value > max ? wrap ? min : max : value < min ? wrap ? max : min : value;\n }\n },\n onFocusBlur: function onFocusBlur(event) {\n if (!this.disabled) {\n this.hasFocus = event.type === 'focus';\n } else {\n this.hasFocus = false;\n }\n },\n stepUp: function stepUp() {\n var multiplier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n var value = this.localValue;\n\n if (isNull(value)) {\n this.localValue = this.computedMin;\n } else {\n this.stepValue(+1 * multiplier);\n }\n },\n stepDown: function stepDown() {\n var multiplier = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n var value = this.localValue;\n\n if (isNull(value)) {\n this.localValue = this.wrap ? this.computedMax : this.computedMin;\n } else {\n this.stepValue(-1 * multiplier);\n }\n },\n onKeydown: function onKeydown(event) {\n var keyCode = event.keyCode,\n altKey = event.altKey,\n ctrlKey = event.ctrlKey,\n metaKey = event.metaKey;\n /* istanbul ignore if */\n\n if (this.disabled || this.readonly || altKey || ctrlKey || metaKey) {\n return;\n }\n\n if (arrayIncludes(KEY_CODES, keyCode)) {\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event, {\n propagation: false\n });\n /* istanbul ignore if */\n\n if (this.$_keyIsDown) {\n // Keypress is already in progress\n return;\n }\n\n this.resetTimers();\n\n if (arrayIncludes([CODE_UP, CODE_DOWN], keyCode)) {\n // The following use the custom auto-repeat handling\n this.$_keyIsDown = true;\n\n if (keyCode === CODE_UP) {\n this.handleStepRepeat(event, this.stepUp);\n } else if (keyCode === CODE_DOWN) {\n this.handleStepRepeat(event, this.stepDown);\n }\n } else {\n // These use native OS key repeating\n if (keyCode === CODE_PAGEUP) {\n this.stepUp(this.computedStepMultiplier);\n } else if (keyCode === CODE_PAGEDOWN) {\n this.stepDown(this.computedStepMultiplier);\n } else if (keyCode === CODE_HOME) {\n this.localValue = this.computedMin;\n } else if (keyCode === CODE_END) {\n this.localValue = this.computedMax;\n }\n }\n }\n },\n onKeyup: function onKeyup(event) {\n // Emit a change event when the keyup happens\n var keyCode = event.keyCode,\n altKey = event.altKey,\n ctrlKey = event.ctrlKey,\n metaKey = event.metaKey;\n /* istanbul ignore if */\n\n if (this.disabled || this.readonly || altKey || ctrlKey || metaKey) {\n return;\n }\n\n if (arrayIncludes(KEY_CODES, keyCode)) {\n stopEvent(event, {\n propagation: false\n });\n this.resetTimers();\n this.$_keyIsDown = false;\n this.emitChange();\n }\n },\n handleStepRepeat: function handleStepRepeat(event, stepper) {\n var _this = this;\n\n var _ref = event || {},\n type = _ref.type,\n button = _ref.button;\n\n if (!this.disabled && !this.readonly) {\n /* istanbul ignore if */\n if (type === 'mousedown' && button) {\n // We only respond to left (main === 0) button clicks\n return;\n }\n\n this.resetTimers(); // Step the counter initially\n\n stepper(1);\n var threshold = this.computedThreshold;\n var multiplier = this.computedStepMultiplier;\n var delay = this.computedDelay;\n var interval = this.computedInterval; // Initiate the delay/repeat interval\n\n this.$_autoDelayTimer = setTimeout(function () {\n var count = 0;\n _this.$_autoRepeatTimer = setInterval(function () {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier);\n count++;\n }, interval);\n }, delay);\n }\n },\n onMouseup: function onMouseup(event) {\n // `` listener, only enabled when mousedown starts\n var _ref2 = event || {},\n type = _ref2.type,\n button = _ref2.button;\n /* istanbul ignore if */\n\n\n if (type === 'mouseup' && button) {\n // Ignore non left button (main === 0) mouse button click\n return;\n }\n\n stopEvent(event, {\n propagation: false\n });\n this.resetTimers();\n this.setMouseup(false); // Trigger the change event\n\n this.emitChange();\n },\n setMouseup: function setMouseup(on) {\n // Enable or disabled the body mouseup/touchend handlers\n // Use try/catch to handle case when called server side\n try {\n eventOnOff(on, document.body, 'mouseup', this.onMouseup, false);\n eventOnOff(on, document.body, 'touchend', this.onMouseup, false);\n } catch (_unused) {}\n },\n resetTimers: function resetTimers() {\n clearTimeout(this.$_autoDelayTimer);\n clearInterval(this.$_autoRepeatTimer);\n this.$_autoDelayTimer = null;\n this.$_autoRepeatTimer = null;\n },\n clearRepeat: function clearRepeat() {\n this.resetTimers();\n this.setMouseup(false);\n this.$_keyIsDown = false;\n }\n },\n render: function render(h) {\n var _this2 = this;\n\n var spinId = this.spinId,\n value = this.localValue,\n inline = this.computedInline,\n readonly = this.computedReadonly,\n vertical = this.vertical,\n disabled = this.disabled,\n computedFormatter = this.computedFormatter;\n var hasValue = !isNull(value);\n\n var makeButton = function makeButton(stepper, label, IconCmp, keyRef, shortcut, btnDisabled, slotName) {\n var $icon = h(IconCmp, {\n props: {\n scale: _this2.hasFocus ? 1.5 : 1.25\n },\n attrs: {\n 'aria-hidden': 'true'\n }\n });\n var scope = {\n hasFocus: _this2.hasFocus\n };\n\n var handler = function handler(event) {\n if (!disabled && !readonly) {\n stopEvent(event, {\n propagation: false\n });\n\n _this2.setMouseup(true); // Since we `preventDefault()`, we must manually focus the button\n\n\n attemptFocus(event.currentTarget);\n\n _this2.handleStepRepeat(event, stepper);\n }\n };\n\n return h('button', {\n staticClass: 'btn btn-sm border-0 rounded-0',\n class: {\n 'py-0': !vertical\n },\n attrs: {\n tabindex: '-1',\n type: 'button',\n disabled: disabled || readonly || btnDisabled,\n 'aria-disabled': disabled || readonly || btnDisabled ? 'true' : null,\n 'aria-controls': spinId,\n 'aria-label': label || null,\n 'aria-keyshortcuts': shortcut || null\n },\n on: {\n mousedown: handler,\n touchstart: handler\n },\n key: keyRef || null,\n ref: keyRef\n }, [_this2.normalizeSlot(slotName, scope) || $icon]);\n }; // TODO: Add button disabled state when `wrap` is `false` and at value max/min\n\n\n var $increment = makeButton(this.stepUp, this.labelIncrement, BIconPlus, 'inc', 'ArrowUp', false, SLOT_NAME_INCREMENT);\n var $decrement = makeButton(this.stepDown, this.labelDecrement, BIconDash, 'dec', 'ArrowDown', false, SLOT_NAME_DECREMENT);\n var $hidden = h();\n\n if (this.name && !disabled) {\n $hidden = h('input', {\n attrs: {\n type: 'hidden',\n name: this.name,\n form: this.form || null,\n // TODO: Should this be set to '' if value is out of range?\n value: this.valueAsFixed\n },\n key: 'hidden'\n });\n }\n\n var $spin = h( // We use 'output' element to make this accept a ` |