diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 0000000..5debbed
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+lts/carbon
diff --git a/README.md b/README.md
index c3e4182..2aa0ef8 100644
--- a/README.md
+++ b/README.md
@@ -132,7 +132,7 @@ var tableRows = {
var menu = new BootstrapMenu('.demoTableRow', {
/* $rowElem is the jQuery element where the menu was opened. The
* returned value is the `row` argument passed to each function. */
- fetchElementData: function($rowElem) {
+ fetchElementData: function($rowElem, originalEvent) {
var rowId = $rowElem.data('rowId');
return tableRows[rowId];
},
diff --git a/dist/BootstrapMenu.js b/dist/BootstrapMenu.js
index baa3a0c..1eb891f 100644
--- a/dist/BootstrapMenu.js
+++ b/dist/BootstrapMenu.js
@@ -42,15 +42,15 @@
/************************************************************************/
/******/ ([
/* 0 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
/* webpack entry file to build a standalone browser script. */
window.BootstrapMenu = __webpack_require__(1);
-/***/ },
+/***/ }),
/* 1 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -254,7 +254,7 @@
}
var actionId = $action.data('action');
- var targetData = _this.options.fetchElementData(_this.$openTarget);
+ var targetData = _this.options.fetchElementData(_this.$openTarget, evt);
/* call the user click handler. It receives the optional user-defined data,
* or undefined. */
@@ -404,7 +404,7 @@
this.openEvent = event;
- var targetData = _this.options.fetchElementData(_this.$openTarget);
+ var targetData = _this.options.fetchElementData(_this.$openTarget, event);
var $actions = this.$menu.find('[data-action]'),
$noActionsMsg = this.$menu.find('.noActionsMessage');
@@ -485,9 +485,9 @@
module.exports = BootstrapMenu;
-/***/ },
+/***/ }),
/* 2 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
Copyright (c) 2016 Jed Watson.
@@ -539,18 +539,18 @@
}());
-/***/ },
+/***/ }),
/* 3 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
module.exports = jQuery;
-/***/ },
+/***/ }),
/* 4 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
- * jQuery UI Position 1.12.0
+ * jQuery UI Position 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@@ -578,10 +578,9 @@
}
}( function( $ ) {
( function() {
- var cachedScrollbarWidth, supportsOffsetFractions,
+ var cachedScrollbarWidth,
max = Math.max,
abs = Math.abs,
- round = Math.round,
rhorizontal = /left|center|right/,
rvertical = /top|center|bottom/,
roffset = /[\+\-]\d+(\.[\d]+)?%?/,
@@ -589,26 +588,6 @@
rpercent = /%$/,
_position = $.fn.position;
- // Support: IE <=9 only
- supportsOffsetFractions = function() {
- var element = $( "
" )
- .css( "position", "absolute" )
- .appendTo( "body" )
- .offset( {
- top: 1.5,
- left: 1.5
- } ),
- support = element.offset().top === 1.5;
-
- element.remove();
-
- supportsOffsetFractions = function() {
- return support;
- };
-
- return support;
- };
-
function getOffsets( offsets, width, height ) {
return [
parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
@@ -817,12 +796,6 @@
position.left += myOffset[ 0 ];
position.top += myOffset[ 1 ];
- // If the browser doesn't support fractions, then round for consistent results
- if ( !supportsOffsetFractions() ) {
- position.left = round( position.left );
- position.top = round( position.top );
- }
-
collisionPosition = {
marginLeft: marginLeft,
marginTop: marginTop
@@ -1076,9 +1049,9 @@
} ) );
-/***/ },
+/***/ }),
/* 5 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;( function( factory ) {
if ( true ) {
@@ -1094,14 +1067,14 @@
$.ui = $.ui || {};
- return $.ui.version = "1.12.0";
+ return $.ui.version = "1.12.1";
} ) );
-/***/ },
+/***/ }),
/* 6 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* A no-operation function that returns `undefined` regardless of the
@@ -1124,16 +1097,16 @@
module.exports = noop;
-/***/ },
+/***/ }),
/* 7 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(8);
-/***/ },
+/***/ }),
/* 8 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var arrayEach = __webpack_require__(9),
baseEach = __webpack_require__(10),
@@ -1174,9 +1147,9 @@
module.exports = forEach;
-/***/ },
+/***/ }),
/* 9 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* A specialized version of `_.forEach` for arrays without support for callback
@@ -1202,9 +1175,9 @@
module.exports = arrayEach;
-/***/ },
+/***/ }),
/* 10 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var baseForOwn = __webpack_require__(11),
createBaseEach = __webpack_require__(30);
@@ -1223,9 +1196,9 @@
module.exports = baseEach;
-/***/ },
+/***/ }),
/* 11 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var baseFor = __webpack_require__(12),
keys = __webpack_require__(16);
@@ -1246,9 +1219,9 @@
module.exports = baseForOwn;
-/***/ },
+/***/ }),
/* 12 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var createBaseFor = __webpack_require__(13);
@@ -1269,9 +1242,9 @@
module.exports = baseFor;
-/***/ },
+/***/ }),
/* 13 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var toObject = __webpack_require__(14);
@@ -1302,9 +1275,9 @@
module.exports = createBaseFor;
-/***/ },
+/***/ }),
/* 14 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(15);
@@ -1322,9 +1295,9 @@
module.exports = toObject;
-/***/ },
+/***/ }),
/* 15 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
@@ -1356,9 +1329,9 @@
module.exports = isObject;
-/***/ },
+/***/ }),
/* 16 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(17),
isArrayLike = __webpack_require__(21),
@@ -1407,9 +1380,9 @@
module.exports = keys;
-/***/ },
+/***/ }),
/* 17 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var isNative = __webpack_require__(18);
@@ -1429,9 +1402,9 @@
module.exports = getNative;
-/***/ },
+/***/ }),
/* 18 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(19),
isObjectLike = __webpack_require__(20);
@@ -1483,9 +1456,9 @@
module.exports = isNative;
-/***/ },
+/***/ }),
/* 19 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(15);
@@ -1527,9 +1500,9 @@
module.exports = isFunction;
-/***/ },
+/***/ }),
/* 20 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* Checks if `value` is object-like.
@@ -1545,9 +1518,9 @@
module.exports = isObjectLike;
-/***/ },
+/***/ }),
/* 21 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var getLength = __webpack_require__(22),
isLength = __webpack_require__(24);
@@ -1566,9 +1539,9 @@
module.exports = isArrayLike;
-/***/ },
+/***/ }),
/* 22 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var baseProperty = __webpack_require__(23);
@@ -1587,9 +1560,9 @@
module.exports = getLength;
-/***/ },
+/***/ }),
/* 23 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* The base implementation of `_.property` without support for deep paths.
@@ -1607,9 +1580,9 @@
module.exports = baseProperty;
-/***/ },
+/***/ }),
/* 24 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
@@ -1633,9 +1606,9 @@
module.exports = isLength;
-/***/ },
+/***/ }),
/* 25 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var isArguments = __webpack_require__(26),
isArray = __webpack_require__(27),
@@ -1680,9 +1653,9 @@
module.exports = shimKeys;
-/***/ },
+/***/ }),
/* 26 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var isArrayLike = __webpack_require__(21),
isObjectLike = __webpack_require__(20);
@@ -1720,9 +1693,9 @@
module.exports = isArguments;
-/***/ },
+/***/ }),
/* 27 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(17),
isLength = __webpack_require__(24),
@@ -1766,9 +1739,9 @@
module.exports = isArray;
-/***/ },
+/***/ }),
/* 28 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/** Used to detect unsigned integer values. */
var reIsUint = /^\d+$/;
@@ -1796,9 +1769,9 @@
module.exports = isIndex;
-/***/ },
+/***/ }),
/* 29 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var isArguments = __webpack_require__(26),
isArray = __webpack_require__(27),
@@ -1866,9 +1839,9 @@
module.exports = keysIn;
-/***/ },
+/***/ }),
/* 30 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var getLength = __webpack_require__(22),
isLength = __webpack_require__(24),
@@ -1903,9 +1876,9 @@
module.exports = createBaseEach;
-/***/ },
+/***/ }),
/* 31 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var bindCallback = __webpack_require__(32),
isArray = __webpack_require__(27);
@@ -1929,9 +1902,9 @@
module.exports = createForEach;
-/***/ },
+/***/ }),
/* 32 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var identity = __webpack_require__(33);
@@ -1974,9 +1947,9 @@
module.exports = bindCallback;
-/***/ },
+/***/ }),
/* 33 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* This method returns the first argument provided to it.
@@ -2000,16 +1973,16 @@
module.exports = identity;
-/***/ },
+/***/ }),
/* 34 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(35);
-/***/ },
+/***/ }),
/* 35 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var baseIndexOf = __webpack_require__(36),
getLength = __webpack_require__(22),
@@ -2070,9 +2043,9 @@
module.exports = includes;
-/***/ },
+/***/ }),
/* 36 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var indexOfNaN = __webpack_require__(37);
@@ -2103,9 +2076,9 @@
module.exports = baseIndexOf;
-/***/ },
+/***/ }),
/* 37 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* Gets the index at which the first occurrence of `NaN` is found in `array`.
@@ -2132,9 +2105,9 @@
module.exports = indexOfNaN;
-/***/ },
+/***/ }),
/* 38 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var isArrayLike = __webpack_require__(21),
isIndex = __webpack_require__(28),
@@ -2166,9 +2139,9 @@
module.exports = isIterateeCall;
-/***/ },
+/***/ }),
/* 39 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var isObjectLike = __webpack_require__(20);
@@ -2207,9 +2180,9 @@
module.exports = isString;
-/***/ },
+/***/ }),
/* 40 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var baseValues = __webpack_require__(41),
keys = __webpack_require__(16);
@@ -2246,9 +2219,9 @@
module.exports = values;
-/***/ },
+/***/ }),
/* 41 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* The base implementation of `_.values` and `_.valuesIn` which creates an
@@ -2274,16 +2247,16 @@
module.exports = baseValues;
-/***/ },
+/***/ }),
/* 42 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(43);
-/***/ },
+/***/ }),
/* 43 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var assignWith = __webpack_require__(44),
baseAssign = __webpack_require__(45),
@@ -2330,9 +2303,9 @@
module.exports = assign;
-/***/ },
+/***/ }),
/* 44 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var keys = __webpack_require__(16);
@@ -2368,9 +2341,9 @@
module.exports = assignWith;
-/***/ },
+/***/ }),
/* 45 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var baseCopy = __webpack_require__(46),
keys = __webpack_require__(16);
@@ -2393,9 +2366,9 @@
module.exports = baseAssign;
-/***/ },
+/***/ }),
/* 46 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* Copies properties of `source` to `object`.
@@ -2422,9 +2395,9 @@
module.exports = baseCopy;
-/***/ },
+/***/ }),
/* 47 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var bindCallback = __webpack_require__(32),
isIterateeCall = __webpack_require__(38),
@@ -2469,9 +2442,9 @@
module.exports = createAssigner;
-/***/ },
+/***/ }),
/* 48 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
@@ -2533,9 +2506,9 @@
module.exports = restParam;
-/***/ },
+/***/ }),
/* 49 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
var baseToString = __webpack_require__(50);
@@ -2566,9 +2539,9 @@
module.exports = uniqueId;
-/***/ },
+/***/ }),
/* 50 */
-/***/ function(module, exports) {
+/***/ (function(module, exports) {
/**
* Converts `value` to a string if it's not one. An empty string is returned
@@ -2585,5 +2558,5 @@
module.exports = baseToString;
-/***/ }
+/***/ })
/******/ ]);
\ No newline at end of file
diff --git a/dist/BootstrapMenu.min.js b/dist/BootstrapMenu.min.js
index 4934a19..e9cf2a7 100644
--- a/dist/BootstrapMenu.min.js
+++ b/dist/BootstrapMenu.min.js
@@ -1,10 +1,10 @@
-!function(t){function n(e){if(o[e])return o[e].exports;var i=o[e]={exports:{},id:e,loaded:!1};return t[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var o={};return n.m=t,n.c=o,n.p="",n(0)}([function(t,n,o){window.BootstrapMenu=o(1)},function(t,n,o){"use strict";function e(t){var n=f(''),o=f(''),e=[];e[0]=[],p.each(t.options.actionsGroups,function(t,n){e[n+1]=[]});var i=!1;p.each(t.options.actions,function(n,o){var r=!1;p.each(t.options.actionsGroups,function(t,n){p.contains(t,o)&&(e[n+1].push(o),r=!0)}),r===!1&&e[0].push(o),"undefined"!=typeof n.iconClass&&(i=!0)});var r=!0;return p.each(e,function(n){0!=n.length&&(r===!1&&o.append('
'),r=!1,p.each(n,function(n){var e=t.options.actions[n];i===!0?o.append('
'):o.append('
')}),o.append('
'+t.options.noActionsMessage+""))}),n.append(o)}function i(t){var n=null;switch(t.options.menuEvent){case"click":n="click";break;case"right-click":n="contextmenu";break;case"hover":n="mouseenter";break;default:throw new Error("Unknown BootstrapMenu 'menuEvent' option")}t.$container.on(n+t.namespace,t.selector,function(n){var o=f(this);return t.open(o,n),!1})}function r(t){t.$container.off(t.namespace)}function s(t){var n=t.options._actionSelectEvent+t.namespace;t.$menu.on(n,function(n){n.preventDefault(),n.stopPropagation();var o=f(n.target),e=o.closest("[data-action]");if(e&&e.length&&!e.is(".disabled")){var i=e.data("action"),r=t.options.fetchElementData(t.$openTarget);t.options.actions[i].onClick(r),t.close()}})}function c(t){t.$menu.off(t.namespace)}function a(t){switch(t.options.menuEvent){case"click":break;case"right-click":break;case"hover":var n=t.$openTarget.add(t.$menu);n.on("mouseleave"+t.closeNamespace,function(o){var e=o.toElement||o.relatedTarget;t.$openTarget.is(e)||t.$menu.is(e)||(n.off(t.closeNamespace),t.close())});break;default:throw new Error("Unknown BootstrapMenu 'menuEvent' option")}t.$container.on("click"+t.closeNamespace,function(){t.close()})}function u(t){t.$container.off(t.closeNamespace)}var l=o(2),f=o(3);o(4);var p=function(){throw new Error("Custom lodash build for BootstrapMenu. lodash chaining is not included")};p.noop=o(6),p.each=o(7),p.contains=o(34),p.extend=o(42),p.uniqueId=o(49),p.isFunction=o(19);var h={container:"body",fetchElementData:p.noop,menuSource:"mouse",menuPosition:"belowLeft",menuEvent:"right-click",actionsGroups:[],noActionsMessage:"No available actions",_actionSelectEvent:"click"},d=function(t,n){this.selector=t,this.options=p.extend({},h,n),this.namespace=p.uniqueId(".BootstrapMenu_"),this.closeNamespace=p.uniqueId(".BootstrapMenuClose_"),this.init()},v=[];d.prototype.init=function(){this.$container=f(this.options.container),this.$menu=e(this),this.$menuList=this.$menu.children(),this.$menu.hide().appendTo(this.$container),this.$openTarget=null,this.openEvent=null,i(this),s(this),v.push(this)},d.prototype.updatePosition=function(){var t=null,n=null,o=null;switch(this.options.menuSource){case"element":n=this.$openTarget;break;case"mouse":n=this.openEvent;break;default:throw new Error("Unknown BootstrapMenu 'menuSource' option")}switch(this.options.menuPosition){case"belowRight":t="right top",o="right bottom";break;case"belowLeft":t="left top",o="left bottom";break;case"aboveRight":t="right bottom",o="right top";break;case"aboveLeft":t="left bottom",o="left top";break;default:throw new Error("Unknown BootstrapMenu 'menuPosition' option")}this.$menu.css({display:"block"}),this.$menu.css({height:this.$menuList.height(),width:this.$menuList.width()}),this.$menu.position({my:t,at:o,of:n})},d.prototype.open=function(t,n){var o=this;d.closeAll(),this.$openTarget=t,this.openEvent=n;var e=o.options.fetchElementData(o.$openTarget),i=this.$menu.find("[data-action]"),r=this.$menu.find(".noActionsMessage");i.show(),r.hide();var s=0;i.each(function(){var t=f(this),n=t.data("action"),i=o.options.actions[n],r=i.classNames||null;return r&&p.isFunction(r)&&(r=r(e)),t.attr("class",l(r||"")),i.isShown&&i.isShown(e)===!1?void t.hide():(s++,t.find(".actionName").html(p.isFunction(i.name)&&i.name(e)||i.name),void(i.isEnabled&&i.isEnabled(e)===!1&&t.addClass("disabled")))}),0===s&&r.show(),this.updatePosition(),this.$menu.show(),a(this)},d.prototype.close=function(){this.$menu.hide(),u(this)},d.prototype.destroy=function(){this.close(),r(this),c(this)},d.closeAll=function(){p.each(v,function(t){t.close()})},t.exports=d},function(t,n,o){var e,i;/*!
+!function(t){function n(e){if(o[e])return o[e].exports;var i=o[e]={exports:{},id:e,loaded:!1};return t[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var o={};return n.m=t,n.c=o,n.p="",n(0)}([function(t,n,o){window.BootstrapMenu=o(1)},function(t,n,o){"use strict";function e(t){var n=f(''),o=f(''),e=[];e[0]=[],p.each(t.options.actionsGroups,function(t,n){e[n+1]=[]});var i=!1;p.each(t.options.actions,function(n,o){var r=!1;p.each(t.options.actionsGroups,function(t,n){p.contains(t,o)&&(e[n+1].push(o),r=!0)}),r===!1&&e[0].push(o),"undefined"!=typeof n.iconClass&&(i=!0)});var r=!0;return p.each(e,function(n){0!=n.length&&(r===!1&&o.append('
'),r=!1,p.each(n,function(n){var e=t.options.actions[n];i===!0?o.append('
'):o.append('
')}),o.append('
'+t.options.noActionsMessage+""))}),n.append(o)}function i(t){var n=null;switch(t.options.menuEvent){case"click":n="click";break;case"right-click":n="contextmenu";break;case"hover":n="mouseenter";break;default:throw new Error("Unknown BootstrapMenu 'menuEvent' option")}t.$container.on(n+t.namespace,t.selector,function(n){var o=f(this);return t.open(o,n),!1})}function r(t){t.$container.off(t.namespace)}function s(t){var n=t.options._actionSelectEvent+t.namespace;t.$menu.on(n,function(n){n.preventDefault(),n.stopPropagation();var o=f(n.target),e=o.closest("[data-action]");if(e&&e.length&&!e.is(".disabled")){var i=e.data("action"),r=t.options.fetchElementData(t.$openTarget,n);t.options.actions[i].onClick(r),t.close()}})}function c(t){t.$menu.off(t.namespace)}function a(t){switch(t.options.menuEvent){case"click":break;case"right-click":break;case"hover":var n=t.$openTarget.add(t.$menu);n.on("mouseleave"+t.closeNamespace,function(o){var e=o.toElement||o.relatedTarget;t.$openTarget.is(e)||t.$menu.is(e)||(n.off(t.closeNamespace),t.close())});break;default:throw new Error("Unknown BootstrapMenu 'menuEvent' option")}t.$container.on("click"+t.closeNamespace,function(){t.close()})}function l(t){t.$container.off(t.closeNamespace)}var u=o(2),f=o(3);o(4);var p=function(){throw new Error("Custom lodash build for BootstrapMenu. lodash chaining is not included")};p.noop=o(6),p.each=o(7),p.contains=o(34),p.extend=o(42),p.uniqueId=o(49),p.isFunction=o(19);var h={container:"body",fetchElementData:p.noop,menuSource:"mouse",menuPosition:"belowLeft",menuEvent:"right-click",actionsGroups:[],noActionsMessage:"No available actions",_actionSelectEvent:"click"},d=function(t,n){this.selector=t,this.options=p.extend({},h,n),this.namespace=p.uniqueId(".BootstrapMenu_"),this.closeNamespace=p.uniqueId(".BootstrapMenuClose_"),this.init()},v=[];d.prototype.init=function(){this.$container=f(this.options.container),this.$menu=e(this),this.$menuList=this.$menu.children(),this.$menu.hide().appendTo(this.$container),this.$openTarget=null,this.openEvent=null,i(this),s(this),v.push(this)},d.prototype.updatePosition=function(){var t=null,n=null,o=null;switch(this.options.menuSource){case"element":n=this.$openTarget;break;case"mouse":n=this.openEvent;break;default:throw new Error("Unknown BootstrapMenu 'menuSource' option")}switch(this.options.menuPosition){case"belowRight":t="right top",o="right bottom";break;case"belowLeft":t="left top",o="left bottom";break;case"aboveRight":t="right bottom",o="right top";break;case"aboveLeft":t="left bottom",o="left top";break;default:throw new Error("Unknown BootstrapMenu 'menuPosition' option")}this.$menu.css({display:"block"}),this.$menu.css({height:this.$menuList.height(),width:this.$menuList.width()}),this.$menu.position({my:t,at:o,of:n})},d.prototype.open=function(t,n){var o=this;d.closeAll(),this.$openTarget=t,this.openEvent=n;var e=o.options.fetchElementData(o.$openTarget,n),i=this.$menu.find("[data-action]"),r=this.$menu.find(".noActionsMessage");i.show(),r.hide();var s=0;i.each(function(){var t=f(this),n=t.data("action"),i=o.options.actions[n],r=i.classNames||null;return r&&p.isFunction(r)&&(r=r(e)),t.attr("class",u(r||"")),i.isShown&&i.isShown(e)===!1?void t.hide():(s++,t.find(".actionName").html(p.isFunction(i.name)&&i.name(e)||i.name),void(i.isEnabled&&i.isEnabled(e)===!1&&t.addClass("disabled")))}),0===s&&r.show(),this.updatePosition(),this.$menu.show(),a(this)},d.prototype.close=function(){this.$menu.hide(),l(this)},d.prototype.destroy=function(){this.close(),r(this),c(this)},d.closeAll=function(){p.each(v,function(t){t.close()})},t.exports=d},function(t,n,o){var e,i;/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";function o(){for(var t=[],n=0;n
").css("position","absolute").appendTo("body").offset({top:1.5,left:1.5}),o=1.5===n.offset().top;return n.remove(),r=function(){return o},o},t.position={scrollbarWidth:function(){if(void 0!==i)return i;var n,o,e=t(""),r=e.children()[0];return t("body").append(e),n=r.offsetWidth,e.css("overflow","scroll"),o=r.offsetWidth,n===o&&(o=e[0].clientWidth),e.remove(),i=n-o},getScrollInfo:function(n){var o=n.isWindow||n.isDocument?"":n.element.css("overflow-x"),e=n.isWindow||n.isDocument?"":n.element.css("overflow-y"),i="scroll"===o||"auto"===o&&n.width0?"right":"center",vertical:r<0?"top":e>0?"bottom":"middle"};vs(c(e),c(r))?a.important="horizontal":a.important="vertical",i.using.call(this,t,a)}),l.offset(t.extend(j,{using:u}))})},t.ui.position={fit:{left:function(t,n){var o,e=n.within,i=e.isWindow?e.scrollLeft:e.offset.left,r=e.width,c=t.left-n.collisionPosition.marginLeft,a=i-c,u=c+n.collisionWidth-r-i;n.collisionWidth>r?a>0&&u<=0?(o=t.left+a+n.collisionWidth-r-i,t.left+=a-o):u>0&&a<=0?t.left=i:a>u?t.left=i+r-n.collisionWidth:t.left=i:a>0?t.left+=a:u>0?t.left-=u:t.left=s(t.left-c,t.left)},top:function(t,n){var o,e=n.within,i=e.isWindow?e.scrollTop:e.offset.top,r=n.within.height,c=t.top-n.collisionPosition.marginTop,a=i-c,u=c+n.collisionHeight-r-i;n.collisionHeight>r?a>0&&u<=0?(o=t.top+a+n.collisionHeight-r-i,t.top+=a-o):u>0&&a<=0?t.top=i:a>u?t.top=i+r-n.collisionHeight:t.top=i:a>0?t.top+=a:u>0?t.top-=u:t.top=s(t.top-c,t.top)}},flip:{left:function(t,n){var o,e,i=n.within,r=i.offset.left+i.scrollLeft,s=i.width,a=i.isWindow?i.scrollLeft:i.offset.left,u=t.left-n.collisionPosition.marginLeft,l=u-a,f=u+n.collisionWidth-s-a,p="left"===n.my[0]?-n.elemWidth:"right"===n.my[0]?n.elemWidth:0,h="left"===n.at[0]?n.targetWidth:"right"===n.at[0]?-n.targetWidth:0,d=-2*n.offset[0];l<0?(o=t.left+p+h+d+n.collisionWidth-s-r,(o<0||o0&&(e=t.left-n.collisionPosition.marginLeft+p+h+d-a,(e>0||c(e)0&&(o=t.top-n.collisionPosition.marginTop+h+d+v-a,(o>0||c(o)-1&&t%1==0&&t<=e}var e=9007199254740991;t.exports=o},function(t,n,o){function e(t){for(var n=a(t),o=n.length,e=o&&t.length,u=!!e&&c(e)&&(r(t)||i(t)),f=-1,p=[];++f-1&&t%1==0&&t0;++e-1:!!p&&i(t,n,o)>-1}var i=o(36),r=o(22),s=o(27),c=o(38),a=o(24),u=o(39),l=o(40),f=Math.max;t.exports=e},function(t,n,o){function e(t,n,o){if(n!==n)return i(t,o);for(var e=o-1,r=t.length;++e2?o[s-2]:void 0,a=s>2?o[2]:void 0,u=s>1?o[s-1]:void 0;for("function"==typeof c?(c=i(c,u,5),s-=2):(c="function"==typeof u?u:void 0,s-=c?1:0),a&&r(o[0],o[1],a)&&(c=s<3?void 0:c,s=1);++e "),r=e.children()[0];return t("body").append(e),n=r.offsetWidth,e.css("overflow","scroll"),o=r.offsetWidth,n===o&&(o=e[0].clientWidth),e.remove(),i=n-o},getScrollInfo:function(n){var o=n.isWindow||n.isDocument?"":n.element.css("overflow-x"),e=n.isWindow||n.isDocument?"":n.element.css("overflow-y"),i="scroll"===o||"auto"===o&&n.width