@dcloudio/uni-debugger
Version:
uni-app debugger
1,683 lines (1,376 loc) • 357 kB
JavaScript
webpackJsonp([2],{
/***/ "./node_modules/base64-js/index.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.byteLength = byteLength
exports.toByteArray = toByteArray
exports.fromByteArray = fromByteArray
var lookup = []
var revLookup = []
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i]
revLookup[code.charCodeAt(i)] = i
}
// Support decoding URL-safe base64 strings, as Node.js does.
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
revLookup['-'.charCodeAt(0)] = 62
revLookup['_'.charCodeAt(0)] = 63
function getLens (b64) {
var len = b64.length
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
// Trim off extra bytes after placeholder bytes are found
// See: https://github.com/beatgammit/base64-js/issues/42
var validLen = b64.indexOf('=')
if (validLen === -1) validLen = len
var placeHoldersLen = validLen === len
? 0
: 4 - (validLen % 4)
return [validLen, placeHoldersLen]
}
// base64 is 4/3 + up to two characters of the original data
function byteLength (b64) {
var lens = getLens(b64)
var validLen = lens[0]
var placeHoldersLen = lens[1]
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
}
function _byteLength (b64, validLen, placeHoldersLen) {
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
}
function toByteArray (b64) {
var tmp
var lens = getLens(b64)
var validLen = lens[0]
var placeHoldersLen = lens[1]
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
var curByte = 0
// if there are placeholders, only get up to the last complete 4 chars
var len = placeHoldersLen > 0
? validLen - 4
: validLen
for (var i = 0; i < len; i += 4) {
tmp =
(revLookup[b64.charCodeAt(i)] << 18) |
(revLookup[b64.charCodeAt(i + 1)] << 12) |
(revLookup[b64.charCodeAt(i + 2)] << 6) |
revLookup[b64.charCodeAt(i + 3)]
arr[curByte++] = (tmp >> 16) & 0xFF
arr[curByte++] = (tmp >> 8) & 0xFF
arr[curByte++] = tmp & 0xFF
}
if (placeHoldersLen === 2) {
tmp =
(revLookup[b64.charCodeAt(i)] << 2) |
(revLookup[b64.charCodeAt(i + 1)] >> 4)
arr[curByte++] = tmp & 0xFF
}
if (placeHoldersLen === 1) {
tmp =
(revLookup[b64.charCodeAt(i)] << 10) |
(revLookup[b64.charCodeAt(i + 1)] << 4) |
(revLookup[b64.charCodeAt(i + 2)] >> 2)
arr[curByte++] = (tmp >> 8) & 0xFF
arr[curByte++] = tmp & 0xFF
}
return arr
}
function tripletToBase64 (num) {
return lookup[num >> 18 & 0x3F] +
lookup[num >> 12 & 0x3F] +
lookup[num >> 6 & 0x3F] +
lookup[num & 0x3F]
}
function encodeChunk (uint8, start, end) {
var tmp
var output = []
for (var i = start; i < end; i += 3) {
tmp =
((uint8[i] << 16) & 0xFF0000) +
((uint8[i + 1] << 8) & 0xFF00) +
(uint8[i + 2] & 0xFF)
output.push(tripletToBase64(tmp))
}
return output.join('')
}
function fromByteArray (uint8) {
var tmp
var len = uint8.length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
var parts = []
var maxChunkLength = 16383 // must be multiple of 3
// go through the array every three bytes, we'll deal with trailing stuff later
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
parts.push(encodeChunk(
uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
))
}
// pad the end with zeros, but make sure to not forget the extra bytes
if (extraBytes === 1) {
tmp = uint8[len - 1]
parts.push(
lookup[tmp >> 2] +
lookup[(tmp << 4) & 0x3F] +
'=='
)
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + uint8[len - 1]
parts.push(
lookup[tmp >> 10] +
lookup[(tmp >> 4) & 0x3F] +
lookup[(tmp << 2) & 0x3F] +
'='
)
}
return parts.join('')
}
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/components/layout/col.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = exports.BCol = void 0;
var _vueFunctionalDataMerge = __webpack_require__("./node_modules/vue-functional-data-merge/dist/lib.esm.js");
var _memoize = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/utils/memoize.js"));
var _suffixPropName = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/utils/suffix-prop-name.js"));
var _array = __webpack_require__("./node_modules/bootstrap-vue/es/utils/array.js");
var _inspect = __webpack_require__("./node_modules/bootstrap-vue/es/utils/inspect.js");
var _object = __webpack_require__("./node_modules/bootstrap-vue/es/utils/object.js");
var _config = __webpack_require__("./node_modules/bootstrap-vue/es/utils/config.js");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
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; }
/**
* Generates a prop object with a type of
* [Boolean, String, Number]
*/
function boolStrNum() {
return {
type: [Boolean, String, Number],
default: false
};
}
/**
* Generates a prop object with a type of
* [String, Number]
*/
function strNum() {
return {
type: [String, Number],
default: null
};
} // Memoized function for better performance on generating class names
var computeBkPtClass = (0, _memoize.default)(function computeBkPt(type, breakpoint, val) {
var className = type;
if ((0, _inspect.isUndefined)(val) || (0, _inspect.isNull)(val) || val === false) {
return undefined;
}
if (breakpoint) {
className += "-".concat(breakpoint);
} // Handling the boolean style prop when accepting [Boolean, String, Number]
// means Vue will not convert <b-col sm></b-col> to sm: true for us.
// Since the default is false, an empty string indicates the prop's presence.
if (type === 'col' && (val === '' || val === true)) {
// .col-md
return className.toLowerCase();
} // .order-md-6
className += "-".concat(val);
return className.toLowerCase();
}); // Cached copy of the breakpoint prop names
var breakpointPropMap = (0, _object.create)(null); // Lazy evaled props factory for BCol
var generateProps = function generateProps() {
// Grab the breakpoints from the cached config (exclude the '' (xs) breakpoint)
var breakpoints = (0, _config.getBreakpointsUpCached)().filter(Boolean); // Supports classes like: .col-sm, .col-md-6, .col-lg-auto
var breakpointCol = breakpoints.reduce(function (propMap, breakpoint) {
if (breakpoint) {
// We filter out the '' breakpoint (xs), as making a prop name ''
// would not work. The `cols` prop is used for `xs`
propMap[breakpoint] = boolStrNum();
}
return propMap;
}, (0, _object.create)(null)); // Supports classes like: .offset-md-1, .offset-lg-12
var breakpointOffset = breakpoints.reduce(function (propMap, breakpoint) {
propMap[(0, _suffixPropName.default)(breakpoint, 'offset')] = strNum();
return propMap;
}, (0, _object.create)(null)); // Supports classes like: .order-md-1, .order-lg-12
var breakpointOrder = breakpoints.reduce(function (propMap, breakpoint) {
propMap[(0, _suffixPropName.default)(breakpoint, 'order')] = strNum();
return propMap;
}, (0, _object.create)(null)); // For loop doesn't need to check hasOwnProperty
// when using an object created from null
breakpointPropMap = (0, _object.assign)((0, _object.create)(null), {
col: (0, _object.keys)(breakpointCol),
offset: (0, _object.keys)(breakpointOffset),
order: (0, _object.keys)(breakpointOrder)
}); // Return the generated props
return _objectSpread({
// Generic flexbox .col (xs)
col: {
type: Boolean,
default: false
},
// .col-[1-12]|auto (xs)
cols: strNum()
}, breakpointCol, {
offset: strNum()
}, breakpointOffset, {
order: strNum()
}, breakpointOrder, {
// Flex alignment
alignSelf: {
type: String,
default: null,
validator: function validator(str) {
return (0, _array.arrayIncludes)(['auto', 'start', 'end', 'center', 'baseline', 'stretch'], str);
}
},
tag: {
type: String,
default: 'div'
}
});
}; // We do not use Vue.extend here as that would evaluate the props
// immediately, which we do not want to happen
// @vue/component
var BCol = {
name: 'BCol',
functional: true,
get props() {
// Allow props to be lazy evaled on first access and
// then they become a non-getter afterwards.
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get#Smart_self-overwriting_lazy_getters
delete this.props; // eslint-disable-next-line no-return-assign
return this.props = generateProps();
},
render: function render(h, _ref) {
var _classList$push;
var props = _ref.props,
data = _ref.data,
children = _ref.children;
var classList = []; // Loop through `col`, `offset`, `order` breakpoint props
for (var type in breakpointPropMap) {
// Returns colSm, offset, offsetSm, orderMd, etc.
var _keys = breakpointPropMap[type];
for (var i = 0; i < _keys.length; i++) {
// computeBkPt(col, colSm => Sm, value=[String, Number, Boolean])
var c = computeBkPtClass(type, _keys[i].replace(type, ''), props[_keys[i]]); // If a class is returned, push it onto the array.
if (c) {
classList.push(c);
}
}
}
var hasColClasses = classList.some(function (className) {
return /^col-/.test(className);
});
classList.push((_classList$push = {
// Default to .col if no other col-{bp}-* classes generated nor `cols` specified.
col: props.col || !hasColClasses && !props.cols
}, _defineProperty(_classList$push, "col-".concat(props.cols), props.cols), _defineProperty(_classList$push, "offset-".concat(props.offset), props.offset), _defineProperty(_classList$push, "order-".concat(props.order), props.order), _defineProperty(_classList$push, "align-self-".concat(props.alignSelf), props.alignSelf), _classList$push));
return h(props.tag, (0, _vueFunctionalDataMerge.mergeData)(data, {
class: classList
}), children);
}
};
exports.BCol = BCol;
var _default = BCol;
exports.default = _default;
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/components/layout/container.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = exports.BContainer = exports.props = void 0;
var _vue = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/utils/vue.js"));
var _vueFunctionalDataMerge = __webpack_require__("./node_modules/vue-functional-data-merge/dist/lib.esm.js");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var props = {
tag: {
type: String,
default: 'div'
},
fluid: {
type: Boolean,
default: false
} // @vue/component
};
exports.props = props;
var BContainer =
/*#__PURE__*/
_vue.default.extend({
name: 'BContainer',
functional: true,
props: props,
render: function render(h, _ref) {
var props = _ref.props,
data = _ref.data,
children = _ref.children;
return h(props.tag, (0, _vueFunctionalDataMerge.mergeData)(data, {
class: {
container: !props.fluid,
'container-fluid': props.fluid
}
}), children);
}
});
exports.BContainer = BContainer;
var _default = BContainer;
exports.default = _default;
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/components/layout/row.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = exports.BRow = exports.props = void 0;
var _vue = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/utils/vue.js"));
var _vueFunctionalDataMerge = __webpack_require__("./node_modules/vue-functional-data-merge/dist/lib.esm.js");
var _array = __webpack_require__("./node_modules/bootstrap-vue/es/utils/array.js");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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; }
var COMMON_ALIGNMENT = ['start', 'end', 'center'];
var props = {
tag: {
type: String,
default: 'div'
},
noGutters: {
type: Boolean,
default: false
},
alignV: {
type: String,
default: null,
validator: function validator(str) {
return (0, _array.arrayIncludes)(COMMON_ALIGNMENT.concat(['baseline', 'stretch']), str);
}
},
alignH: {
type: String,
default: null,
validator: function validator(str) {
return (0, _array.arrayIncludes)(COMMON_ALIGNMENT.concat(['between', 'around']), str);
}
},
alignContent: {
type: String,
default: null,
validator: function validator(str) {
return (0, _array.arrayIncludes)(COMMON_ALIGNMENT.concat(['between', 'around', 'stretch']), str);
}
} // @vue/component
};
exports.props = props;
var BRow =
/*#__PURE__*/
_vue.default.extend({
name: 'BRow',
functional: true,
props: props,
render: function render(h, _ref) {
var _class;
var props = _ref.props,
data = _ref.data,
children = _ref.children;
return h(props.tag, (0, _vueFunctionalDataMerge.mergeData)(data, {
staticClass: 'row',
class: (_class = {
'no-gutters': props.noGutters
}, _defineProperty(_class, "align-items-".concat(props.alignV), props.alignV), _defineProperty(_class, "justify-content-".concat(props.alignH), props.alignH), _defineProperty(_class, "align-content-".concat(props.alignContent), props.alignContent), _class)
}), children);
}
});
exports.BRow = BRow;
var _default = BRow;
exports.default = _default;
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/components/popover/popover.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = exports.BPopover = exports.props = void 0;
var _vue = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/utils/vue.js"));
var _popover = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/utils/popover.class.js"));
var _warn = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/utils/warn.js"));
var _array = __webpack_require__("./node_modules/bootstrap-vue/es/utils/array.js");
var _config = __webpack_require__("./node_modules/bootstrap-vue/es/utils/config.js");
var _safeTypes = __webpack_require__("./node_modules/bootstrap-vue/es/utils/safe-types.js");
var _normalizeSlot = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/mixins/normalize-slot.js"));
var _toolpop = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/mixins/toolpop.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var NAME = 'BPopover';
var props = {
title: {
type: String,
default: ''
},
content: {
type: String,
default: ''
},
triggers: {
type: [String, Array],
default: 'click'
},
placement: {
type: String,
default: 'right'
},
fallbackPlacement: {
type: [String, Array],
default: 'flip',
validator: function validator(value) {
return (0, _array.isArray)(value) || (0, _array.arrayIncludes)(['flip', 'clockwise', 'counterclockwise'], value);
}
},
delay: {
type: [Number, Object, String],
default: function _default() {
return (0, _config.getComponentConfig)(NAME, 'delay');
}
},
boundary: {
// String: scrollParent, window, or viewport
// Element: element reference
type: [String, _safeTypes.HTMLElement],
default: function _default() {
return (0, _config.getComponentConfig)(NAME, 'boundary');
}
},
boundaryPadding: {
type: Number,
default: function _default() {
return (0, _config.getComponentConfig)(NAME, 'boundaryPadding');
}
} // @vue/component
};
exports.props = props;
var BPopover =
/*#__PURE__*/
_vue.default.extend({
name: NAME,
mixins: [_toolpop.default, _normalizeSlot.default],
props: props,
data: function data() {
return {};
},
methods: {
createToolpop: function createToolpop() {
// getTarget is in toolpop mixin
var target = this.getTarget();
/* istanbul ignore else */
if (target) {
this._toolpop = new _popover.default(target, this.getConfig(), this);
} else {
this._toolpop = null;
(0, _warn.default)("b-popover: 'target' element not found!");
}
return this._toolpop;
}
},
render: function render(h) {
return h('div', {
class: ['d-none'],
style: {
display: 'none'
},
attrs: {
'aria-hidden': true
}
}, [h('div', {
ref: 'title'
}, this.normalizeSlot('title')), h('div', {
ref: 'content'
}, this.normalizeSlot('default'))]);
}
});
exports.BPopover = BPopover;
var _default2 = BPopover;
exports.default = _default2;
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/mixins/normalize-slot.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = void 0;
var _normalizeSlot2 = __webpack_require__("./node_modules/bootstrap-vue/es/utils/normalize-slot.js");
var _array = __webpack_require__("./node_modules/bootstrap-vue/es/utils/array.js");
var _default = {
methods: {
hasNormalizedSlot: function hasNormalizedSlot(name) {
// Returns true if the either a $scopedSlot or $slot exists with the specified name
return (0, _normalizeSlot2.hasNormalizedSlot)(name, this.$scopedSlots, this.$slots);
},
normalizeSlot: function normalizeSlot(name) {
var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
// Returns an array of rendered vNodes if slot found.
// Returns undefined if not found.
var vNodes = (0, _normalizeSlot2.normalizeSlot)(name, scope, this.$scopedSlots, this.$slots);
return vNodes ? (0, _array.concat)(vNodes) : vNodes;
}
}
};
exports.default = _default;
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/mixins/toolpop.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = void 0;
var _observeDom = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/utils/observe-dom.js"));
var _dom = __webpack_require__("./node_modules/bootstrap-vue/es/utils/dom.js");
var _inspect = __webpack_require__("./node_modules/bootstrap-vue/es/utils/inspect.js");
var _safeTypes = __webpack_require__("./node_modules/bootstrap-vue/es/utils/safe-types.js");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
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; }
// --- Constants ---
var PLACEMENTS = {
top: 'top',
topleft: 'topleft',
topright: 'topright',
right: 'right',
righttop: 'righttop',
rightbottom: 'rightbottom',
bottom: 'bottom',
bottomleft: 'bottomleft',
bottomright: 'bottomright',
left: 'left',
lefttop: 'lefttop',
leftbottom: 'leftbottom',
auto: 'auto'
};
var OBSERVER_CONFIG = {
subtree: true,
childList: true,
characterData: true,
attributes: true,
attributeFilter: ['class', 'style'] // @vue/component
};
var _default = {
props: {
target: {
// String ID of element, or element/component reference
type: [String, Object, _safeTypes.HTMLElement, Function] // default: undefined
},
offset: {
type: [Number, String],
default: 0
},
noFade: {
type: Boolean,
default: false
},
container: {
// String ID of container, if null body is used (default)
type: String,
default: null
},
show: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
}
},
data: function data() {
return {
// semaphore for preventing multiple show events
localShow: false
};
},
computed: {
baseConfig: function baseConfig() {
var cont = this.container;
var delay = (0, _inspect.isObject)(this.delay) ? this.delay : parseInt(this.delay, 10) || 0;
return {
// Title prop
title: (this.title || '').trim() || '',
// Content prop (if popover)
content: (this.content || '').trim() || '',
// Tooltip/Popover placement
placement: PLACEMENTS[this.placement] || 'auto',
// Tooltip/popover fallback placemenet
fallbackPlacement: this.fallbackPlacement || 'flip',
// Container currently needs to be an ID with '#' prepended, if null then body is used
container: cont ? /^#/.test(cont) ? cont : "#".concat(cont) : false,
// boundariesElement passed to popper
boundary: this.boundary,
// boundariesElement padding passed to popper
boundaryPadding: this.boundaryPadding,
// Show/Hide delay
delay: delay || 0,
// Offset can be css distance. if no units, pixels are assumed
offset: this.offset || 0,
// Disable fade Animation?
animation: !this.noFade,
// Open/Close Trigger(s)
trigger: (0, _inspect.isArray)(this.triggers) ? this.triggers.join(' ') : this.triggers,
// Callbacks so we can trigger events on component
callbacks: {
show: this.onShow,
shown: this.onShown,
hide: this.onHide,
hidden: this.onHidden,
enabled: this.onEnabled,
disabled: this.onDisabled
}
};
}
},
watch: {
show: function show(_show, old) {
if (_show !== old) {
_show ? this.onOpen() : this.onClose();
}
},
disabled: function disabled(_disabled, old) {
if (_disabled !== old) {
_disabled ? this.onDisable() : this.onEnable();
}
},
localShow: function localShow(show, old) {
if (show !== this.show) {
this.$emit('update:show', show);
}
}
},
created: function created() {
// Create non-reactive property
this._toolpop = null;
this._obs_title = null;
this._obs_content = null;
},
mounted: function mounted() {
var _this = this;
// We do this in a next tick to ensure DOM has rendered first
this.$nextTick(function () {
// Instantiate ToolTip/PopOver on target
// The createToolpop method must exist in main component
if (_this.createToolpop()) {
if (_this.disabled) {
// Initially disabled
_this.onDisable();
} // Listen to open signals from others
_this.$on('open', _this.onOpen); // Listen to close signals from others
_this.$on('close', _this.onClose); // Listen to disable signals from others
_this.$on('disable', _this.onDisable); // Listen to enable signals from others
_this.$on('enable', _this.onEnable); // Observe content Child changes so we can notify popper of possible size change
_this.setObservers(true); // Set initially open state
if (_this.show) {
_this.onOpen();
}
}
});
},
updated: function updated() {
// If content/props changes, etc
if (this._toolpop) {
this._toolpop.updateConfig(this.getConfig());
}
},
activated: function activated()
/* istanbul ignore next: can't easily test in JSDOM */
{
// Called when component is inside a <keep-alive> and component brought offline
this.setObservers(true);
},
deactivated: function deactivated()
/* istanbul ignore next: can't easily test in JSDOM */
{
// Called when component is inside a <keep-alive> and component taken offline
if (this._toolpop) {
this.setObservers(false);
this._toolpop.hide();
}
},
beforeDestroy: function beforeDestroy() {
// Shutdown our local event listeners
this.$off('open', this.onOpen);
this.$off('close', this.onClose);
this.$off('disable', this.onDisable);
this.$off('enable', this.onEnable);
this.setObservers(false); // bring our content back if needed
this.bringItBack();
if (this._toolpop) {
this._toolpop.destroy();
this._toolpop = null;
}
},
methods: {
getConfig: function getConfig() {
var cfg = _objectSpread({}, this.baseConfig);
if (this.$refs.title && this.$refs.title.innerHTML.trim()) {
// If slot has content, it overrides 'title' prop
// We use the DOM node as content to allow components!
cfg.title = this.$refs.title;
cfg.html = true;
}
if (this.$refs.content && this.$refs.content.innerHTML.trim()) {
// If slot has content, it overrides 'content' prop
// We use the DOM node as content to allow components!
cfg.content = this.$refs.content;
cfg.html = true;
}
return cfg;
},
onOpen: function onOpen() {
if (this._toolpop && !this.localShow) {
this.localShow = true;
this._toolpop.show();
}
},
onClose: function onClose(callback) {
// What is callback for ? it is not documented
/* istanbul ignore else */
if (this._toolpop && this.localShow) {
this._toolpop.hide(callback);
} else if ((0, _inspect.isFunction)(callback)) {
// Is this even used?
callback();
}
},
onDisable: function onDisable() {
if (this._toolpop) {
this._toolpop.disable();
}
},
onEnable: function onEnable() {
if (this._toolpop) {
this._toolpop.enable();
}
},
updatePosition: function updatePosition() {
/* istanbul ignore next: can't test in JSDOM until mutation observer is implemented */
if (this._toolpop) {
// Instruct popper to reposition popover if necessary
this._toolpop.update();
}
},
getTarget: function getTarget() {
var target = this.target;
if ((0, _inspect.isFunction)(target)) {
/* istanbul ignore next */
target = target();
}
/* istanbul ignore else */
if ((0, _inspect.isString)(target)) {
// Assume ID of element
return (0, _dom.getById)(target);
} else if ((0, _inspect.isObject)(target) && (0, _dom.isElement)(target.$el)) {
// Component reference
/* istanbul ignore next */
return target.$el;
} else if ((0, _inspect.isObject)(target) && (0, _dom.isElement)(target)) {
// Element reference
/* istanbul ignore next */
return target;
}
/* istanbul ignore next */
return null;
},
// Callbacks called by Tooltip/Popover class instance
onShow: function onShow(evt) {
this.$emit('show', evt);
this.localShow = !(evt && evt.defaultPrevented);
},
onShown: function onShown(evt) {
this.setObservers(true);
this.$emit('shown', evt);
this.localShow = true;
},
onHide: function onHide(evt) {
this.$emit('hide', evt);
this.localShow = !!(evt && evt.defaultPrevented);
},
onHidden: function onHidden(evt) {
this.setObservers(false); // bring our content back if needed to keep Vue happy
// Tooltip class will move it back to tip when shown again
this.bringItBack();
this.$emit('hidden', evt);
this.localShow = false;
},
onEnabled: function onEnabled(evt) {
/* istanbul ignore next */
if (!evt || evt.type !== 'enabled') {
// Prevent possible endless loop if user mistakenly fires enabled instead of enable
return;
}
this.$emit('update:disabled', false);
this.$emit('disabled');
},
onDisabled: function onDisabled(evt) {
/* istanbul ignore next */
if (!evt || evt.type !== 'disabled') {
// Prevent possible endless loop if user mistakenly fires disabled instead of disable
return;
}
this.$emit('update:disabled', true);
this.$emit('enabled');
},
bringItBack: function bringItBack() {
// bring our content back if needed to keep Vue happy
if (this.$el && this.$refs.title) {
this.$el.appendChild(this.$refs.title);
}
if (this.$el && this.$refs.content) {
this.$el.appendChild(this.$refs.content);
}
},
setObservers: function setObservers(on) {
if (on) {
if (this.$refs.title) {
this._obs_title = (0, _observeDom.default)(this.$refs.title, this.updatePosition.bind(this), OBSERVER_CONFIG);
}
if (this.$refs.content) {
this._obs_content = (0, _observeDom.default)(this.$refs.content, this.updatePosition.bind(this), OBSERVER_CONFIG);
}
} else {
if (this._obs_title) {
this._obs_title.disconnect();
this._obs_title = null;
}
if (this._obs_content) {
this._obs_content.disconnect();
this._obs_content = null;
}
}
}
}
};
exports.default = _default;
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/utils/normalize-slot.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = exports.normalizeSlot = exports.hasNormalizedSlot = void 0;
var _inspect = __webpack_require__("./node_modules/bootstrap-vue/es/utils/inspect.js");
// Note for functional components:
// In functional components, `slots` is a function so it must be called
// first before passing to the below methods. `scopedSlots` is always an
// object and may be undefined (for Vue < 2.6.x)
/**
* Returns true if either scoped or unscoped named slot eists
*
* @param {String} name
* @param {Object} scopedSlots
* @param {Object} slots
* @returns {Array|undefined} vNodes
*/
var hasNormalizedSlot = function hasNormalizedSlot(name) {
var $scopedSlots = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var $slots = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
// Returns true if the either a $scopedSlot or $slot exists with the specified name
return Boolean($scopedSlots[name] || $slots[name]);
};
/**
* Returns vNodes for named slot either scoped or unscoped
*
* @param {String} name
* @param {String} scope
* @param {Object} scopedSlots
* @param {Object} slots
* @returns {Array|undefined} vNodes
*/
exports.hasNormalizedSlot = hasNormalizedSlot;
var normalizeSlot = function normalizeSlot(name) {
var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var $scopedSlots = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var $slots = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
// Note: in Vue 2.6.x, all names slots are also scoped slots
var slot = $scopedSlots[name] || $slots[name];
return (0, _inspect.isFunction)(slot) ? slot(scope) : slot;
}; // Named exports
exports.normalizeSlot = normalizeSlot;
// Default export (backwards compatability)
var _default = normalizeSlot;
exports.default = _default;
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/utils/observe-dom.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = void 0;
var _dom = __webpack_require__("./node_modules/bootstrap-vue/es/utils/dom.js");
var _warn = __webpack_require__("./node_modules/bootstrap-vue/es/utils/warn.js");
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
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; }
/**
* Observe a DOM element changes, falls back to eventListener mode
* @param {Element} el The DOM element to observe
* @param {Function} callback callback to be called on change
* @param {object} [opts={childList: true, subtree: true}] observe options
* @see http://stackoverflow.com/questions/3219758
*/
var observeDom = function observeDom(el, callback, opts)
/* istanbul ignore next: difficult to test in JSDOM */
{
// Handle cases where we might be passed a Vue instance
el = el ? el.$el || el : null; // Early exit when we have no element
/* istanbul ignore next: difficult to test in JSDOM */
if (!(0, _dom.isElement)(el)) {
return null;
} // Exit and throw a warning when `MutationObserver` isn't available
if ((0, _warn.warnNoMutationObserverSupport)('observeDom')) {
return null;
} // Define a new observer
var obs = new _dom.MutationObs(function (mutations) {
var changed = false; // A mutation can contain several change records, so we loop
// through them to see what has changed
// We break out of the loop early if any "significant" change
// has been detected
for (var i = 0; i < mutations.length && !changed; i++) {
// The mutation record
var mutation = mutations[i]; // Mutation type
var type = mutation.type; // DOM node (could be any DOM node type - HTMLElement, Text, comment, etc.)
var target = mutation.target; // Detect whether a change happened based on type and target
if (type === 'characterData' && target.nodeType === Node.TEXT_NODE) {
// We ignore nodes that are not TEXT (i.e. comments, etc)
// as they don't change layout
changed = true;
} else if (type === 'attributes') {
changed = true;
} else if (type === 'childList' && (mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0)) {
// This includes HTMLElement and text nodes being
// added/removed/re-arranged
changed = true;
}
} // We only call the callback if a change that could affect
// layout/size truely happened
if (changed) {
callback();
}
}); // Have the observer observe foo for changes in children, etc
obs.observe(el, _objectSpread({
childList: true,
subtree: true
}, opts)); // We return a reference to the observer so that `obs.disconnect()`
// can be called if necessary
// To reduce overhead when the root element is hidden
return obs;
};
var _default = observeDom;
exports.default = _default;
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/utils/safe-types.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.HTMLElement = void 0;
var _env = __webpack_require__("./node_modules/bootstrap-vue/es/utils/env.js");
/**
* SSR safe types
*/
var w = _env.hasWindowSupport ? window : {};
var HTMLElement = w.HTMLElement || Object;
exports.HTMLElement = HTMLElement;
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/utils/suffix-prop-name.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = void 0;
var _upperFirst = _interopRequireDefault(__webpack_require__("./node_modules/bootstrap-vue/es/utils/upper-first.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Suffix can be a falsey value so nothing is appended to string.
* (helps when looping over props & some shouldn't change)
* Use data last parameters to allow for currying.
* @param {string} suffix
* @param {string} str
*/
var suffixPropName = function suffixPropName(suffix, str) {
return str + (suffix ? (0, _upperFirst.default)(suffix) : '');
};
var _default = suffixPropName;
exports.default = _default;
/***/ }),
/***/ "./node_modules/bootstrap-vue/es/utils/upper-first.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = void 0;
var _inspect = __webpack_require__("./node_modules/bootstrap-vue/es/utils/inspect.js");
/**
* Transform the first character to uppercase
* @param {string} str
*/
var upperFirst = function upperFirst(str) {
if (!(0, _inspect.isString)(str)) {
str = String(str);
}
str = str.trim();
return str.charAt(0).toUpperCase() + str.slice(1);
};
var _default = upperFirst;
exports.default = _default;
/***/ }),
/***/ "./node_modules/buffer/index.js":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
/* eslint-disable no-proto */
var base64 = __webpack_require__("./node_modules/base64-js/index.js")
var ieee754 = __webpack_require__("./node_modules/ieee754/index.js")
var isArray = __webpack_require__("./node_modules/isarray/index.js")
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
exports.INSPECT_MAX_BYTES = 50
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Due to various browser bugs, sometimes the Object implementation will be used even
* when the browser supports typed arrays.
*
* Note:
*
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
* incorrect length in some situations.
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
* get the Object implementation, which is slower but behaves correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
? global.TYPED_ARRAY_SUPPORT
: typedArraySupport()
/*
* Export kMaxLength after typed array support is determined.
*/
exports.kMaxLength = kMaxLength()
function typedArraySupport () {
try {
var arr = new Uint8Array(1)
arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
return arr.foo() === 42 && // typed array instances can be augmented
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
} catch (e) {
return false
}
}
function kMaxLength () {
return Buffer.TYPED_ARRAY_SUPPORT
? 0x7fffffff
: 0x3fffffff
}
function createBuffer (that, length) {
if (kMaxLength() < length) {
throw new RangeError('Invalid typed array length')
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = new Uint8Array(length)
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
if (that === null) {
that = new Buffer(length)
}
that.length = length
}
return that
}
/**
* The Buffer constructor returns instances of `Uint8Array` that have their
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
* returns a single octet.
*
* The `Uint8Array` prototype remains unmodified.
*/
function Buffer (arg, encodingOrOffset, length) {
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
return new Buffer(arg, encodingOrOffset, length)
}
// Common case.
if (typeof arg === 'number') {
if (typeof encodingOrOffset === 'string') {
throw new Error(
'If encoding is specified then the first argument must be a string'
)
}
return allocUnsafe(this, arg)
}
return from(this, arg, encodingOrOffset, length)
}
Buffer.poolSize = 8192 // not used by this implementation
// TODO: Legacy, not needed anymore. Remove in next major version.
Buffer._augment = function (arr) {
arr.__proto__ = Buffer.prototype
return arr
}
function from (that, value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('"value" argument must not be a number')
}
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
return fromArrayBuffer(that, value, encodingOrOffset, length)
}
if (typeof value === 'string') {
return fromString(that, value, encodingOrOffset)
}
return fromObject(that, value)
}
/**
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
* if value is a number.
* Buffer.from(str[, encoding])
* Buffer.from(array)
* Buffer.from(buffer)
* Buffer.from(arrayBuffer[, byteOffset[, length]])
**/
Buffer.from = function (value, encodingOrOffset, length) {
return from(null, value, encodingOrOffset, length)
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
Buffer.prototype.__proto__ = Uint8Array.prototype
Buffer.__proto__ = Uint8Array
if (typeof Symbol !== 'undefined' && Symbol.species &&
Buffer[Symbol.species] === Buffer) {
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
Object.defineProperty(Buffer, Symbol.species, {
value: null,
configurable: true
})
}
}
function assertSize (size) {
if (typeof size !== 'number') {
throw new TypeError('"size" argument must be a number')
} else if (size < 0) {
throw new RangeError('"size" argument must not be negative')
}
}
function alloc (that, size, fill, encoding) {
assertSize(size)
if (size <= 0) {
return createBuffer(that, size)
}
if (fill !== undefined) {
// Only pay attention to encoding if it's a string. This
// prevents accidentally sending in a number that would
// be interpretted as a start offset.
return typeof encoding === 'string'
? createBuffer(that, size).fill(fill, encoding)
: createBuffer(that, size).fill(fill)
}
return createBuffer(that, size)
}
/**
* Creates a new filled Buffer instance.
* alloc(size[, fill[, encoding]])
**/
Buffer.alloc = function (size, fill, encoding) {
return alloc(null, size, fill, encoding)
}
function allocUnsafe (that, size) {
assertSize(size)
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < size; ++i) {
that[i] = 0
}
}
return that
}
/**
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
* */
Buffer.allocUnsafe = function (size) {
return allocUnsafe(null, size)
}
/**
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
*/
Buffer.allocUnsafeSlow = function (size) {
return allocUnsafe(null, size)
}
function fromString (that, string, encoding) {
if (typeof encoding !== 'string' || encoding === '') {
encoding = 'utf8'
}
if (!Buffer.isEncoding(encoding)) {
throw new TypeError('"encoding" must be a valid string encoding')
}
var length = byteLength(string, encoding) | 0
that = createBuffer(that, length)
var actual = that.write(string, encoding)
if (actual !== length) {
// Writing a hex string, for example, that contains invalid characters will
// cause everything after the first invalid character to be ignored. (e.g.
// 'abxxcd' will be treated as 'ab')
that = that.slice(0, actual)
}
return that
}
function fromArrayLike (that, array) {
var length = array.length < 0 ? 0 : checked(array.length) | 0
that = createBuffer(that, length)
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255
}
return that
}
function fromArrayBuffer (that, array, byteOffset, length) {
array.byteLength // this throws if `array` is not a valid ArrayBuffer
if (byteOffset < 0 || array.byteLength < byteOffset) {
throw new RangeError('\'offset\' is out of bounds')
}
if (array.byteLength < byteOffset + (length || 0)) {
throw new RangeError('\'length\' is out of bounds')
}
if (byteOffset === undefined && length === undefined) {
array = new Uint8Array(array)
} else if (length === undefined) {
array = new Uint8Array(array, byteOffset)
} else {
array = new Uint8Array(array, byteOffset, length)
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = array
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
that = fromArrayLike(that, array)
}
return that
}
function fromObject (that, obj) {
if (Buffer.isBuffer(obj)) {
var len = checked(obj.length) | 0
that = createBuffer(that, len)
if (that.length === 0) {
return that
}
obj.copy(that, 0, 0, len)
return that
}
if (obj) {
if ((typeof ArrayBuffer !== 'undefined' &&
obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
if (typeof obj.length !== 'number' || isnan(obj.length)) {
return createBuffer(that, 0)
}
return fromArrayLike(that, obj)
}
if (obj.type === 'Buffer' && isArray(obj.data)) {
return fromArrayLike(that, obj.data)
}
}
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
}
function checked (length) {
// Note: cannot use `length < kMaxLength()` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + kMaxLength().toString(16) + ' bytes')
}
return length | 0
}
function SlowBuffer (length) {
if (+length != length) { // eslint-disable-line eqeqeq
length = 0
}
return Buffer.alloc(+length)
}
Buffer.isBuffer = function isBuffer (b) {
return !!(b != null && b._isBuffer)
}
Buffer.compare = function compare (a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
throw new TypeError('Arguments must be Buffers')
}
if (a === b) return 0
var x = a.length
var y = b.length
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
if (a[i] !== b[i]) {
x = a[i]
y = b[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
Buffer.isEncoding = function isEncoding (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'latin1':
case 'binary':
case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
}
Buffer.concat = function concat (list, length) {
if (!isArray(list)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
if (list.length === 0) {
return Buffer.alloc(0)
}
var i
if (length === undefined) {
length = 0
for (i = 0; i < list.length; ++i) {
length += list[i].length
}
}
var buffer = Buffer.allocUnsafe(length)
var pos = 0
for (i = 0; i < list.length; ++i) {
var buf = list[i]
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
buf.copy(buffer, pos)
pos += buf.length
}
return buffer
}
function byteLength (string, encoding) {
if (Buffer.isBuffer(string)) {
return string.length
}
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
return string.byteLength
}
if (typeof string !== 'string') {
string = '' + string
}
var len = string.length
if (len === 0) return 0
// Use a for loop to avoid recursion
var