(window["webpackjsonp"] = window["webpackjsonp"] || []).push([[73],{ /***/ 108: /***/ (function(module, exports) { /** * creates a unary function that invokes `func` with its argument transformed. * * @private * @param {function} func the function to wrap. * @param {function} transform the argument transform. * @returns {function} returns the new function. */ function overarg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overarg; /***/ }), /***/ 119: /***/ (function(module, exports, __webpack_require__) { var baseclone = __webpack_require__(276); /** used to compose bitmasks for cloning. */ var clone_deep_flag = 1, clone_symbols_flag = 4; /** * this method is like `_.clone` except that it recursively clones `value`. * * @static * @memberof _ * @since 1.0.0 * @category lang * @param {*} value the value to recursively clone. * @returns {*} returns the deep cloned value. * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var deep = _.clonedeep(objects); * console.log(deep[0] === objects[0]); * // => false */ function clonedeep(value) { return baseclone(value, clone_deep_flag | clone_symbols_flag); } module.exports = clonedeep; /***/ }), /***/ 170: /***/ (function(module, exports) { /** * performs a * [`samevaluezero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberof _ * @since 4.0.0 * @category lang * @param {*} value the value to compare. * @param {*} other the other value to compare. * @returns {boolean} returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', object('a')); * // => false * * _.eq(nan, nan); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /***/ 171: /***/ (function(module, exports, __webpack_require__) { var baseassignvalue = __webpack_require__(172), eq = __webpack_require__(170); /** used for built-in method references. */ var objectproto = object.prototype; /** used to check objects for own properties. */ var hasownproperty = objectproto.hasownproperty; /** * assigns `value` to `key` of `object` if the existing value is not equivalent * using [`samevaluezero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {object} object the object to modify. * @param {string} key the key of the property to assign. * @param {*} value the value to assign. */ function assignvalue(object, key, value) { var objvalue = object[key]; if (!(hasownproperty.call(object, key) && eq(objvalue, value)) || (value === undefined && !(key in object))) { baseassignvalue(object, key, value); } } module.exports = assignvalue; /***/ }), /***/ 172: /***/ (function(module, exports, __webpack_require__) { var defineproperty = __webpack_require__(284); /** * the base implementation of `assignvalue` and `assignmergevalue` without * value checks. * * @private * @param {object} object the object to modify. * @param {string} key the key of the property to assign. * @param {*} value the value to assign. */ function baseassignvalue(object, key, value) { if (key == '__proto__' && defineproperty) { defineproperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseassignvalue; /***/ }), /***/ 173: /***/ (function(module, exports, __webpack_require__) { var overarg = __webpack_require__(108); /* built-in method references for those with the same name as other `lodash` methods. */ var nativekeys = overarg(object.keys, object); module.exports = nativekeys; /***/ }), /***/ 174: /***/ (function(module, exports) { /** * this function is like * [`object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {object} object the object to query. * @returns {array} returns the array of property names. */ function nativekeysin(object) { var result = []; if (object != null) { for (var key in object(object)) { result.push(key); } } return result; } module.exports = nativekeysin; /***/ }), /***/ 176: /***/ (function(module, exports) { /** * checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `object`. (e.g. arrays, functions, objects, regexes, `new number(0)`, and `new string('')`) * * @static * @memberof _ * @since 0.1.0 * @category lang * @param {*} value the value to check. * @returns {boolean} returns `true` if `value` is an object, else `false`. * @example * * _.isobject({}); * // => true * * _.isobject([1, 2, 3]); * // => true * * _.isobject(_.noop); * // => true * * _.isobject(null); * // => false */ function isobject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isobject; /***/ }), /***/ 276: /***/ (function(module, exports, __webpack_require__) { var stack = __webpack_require__(277), arrayeach = __webpack_require__(283), assignvalue = __webpack_require__(171), baseassign = __webpack_require__(286), baseassignin = __webpack_require__(287), clonebuffer = __webpack_require__(288), copyarray = __webpack_require__(291), copysymbols = __webpack_require__(292), copysymbolsin = __webpack_require__(294), getallkeys = __webpack_require__(296), getallkeysin = __webpack_require__(297), gettag = __webpack_require__(298), initclonearray = __webpack_require__(299), initclonebytag = __webpack_require__(300), initcloneobject = __webpack_require__(301), isarray = __webpack_require__(305), isbuffer = __webpack_require__(306), ismap = __webpack_require__(307), isobject = __webpack_require__(176), isset = __webpack_require__(308), keys = __webpack_require__(173), keysin = __webpack_require__(174); /** used to compose bitmasks for cloning. */ var clone_deep_flag = 1, clone_flat_flag = 2, clone_symbols_flag = 4; /** `object#tostring` result references. */ var argstag = '[object arguments]', arraytag = '[object array]', booltag = '[object boolean]', datetag = '[object date]', errortag = '[object error]', functag = '[object function]', gentag = '[object generatorfunction]', maptag = '[object map]', numbertag = '[object number]', objecttag = '[object object]', regexptag = '[object regexp]', settag = '[object set]', stringtag = '[object string]', symboltag = '[object symbol]', weakmaptag = '[object weakmap]'; var arraybuffertag = '[object arraybuffer]', dataviewtag = '[object dataview]', float32tag = '[object float32array]', float64tag = '[object float64array]', int8tag = '[object int8array]', int16tag = '[object int16array]', int32tag = '[object int32array]', uint8tag = '[object uint8array]', uint8clampedtag = '[object uint8clampedarray]', uint16tag = '[object uint16array]', uint32tag = '[object uint32array]'; /** used to identify `tostringtag` values supported by `_.clone`. */ var cloneabletags = {}; cloneabletags[argstag] = cloneabletags[arraytag] = cloneabletags[arraybuffertag] = cloneabletags[dataviewtag] = cloneabletags[booltag] = cloneabletags[datetag] = cloneabletags[float32tag] = cloneabletags[float64tag] = cloneabletags[int8tag] = cloneabletags[int16tag] = cloneabletags[int32tag] = cloneabletags[maptag] = cloneabletags[numbertag] = cloneabletags[objecttag] = cloneabletags[regexptag] = cloneabletags[settag] = cloneabletags[stringtag] = cloneabletags[symboltag] = cloneabletags[uint8tag] = cloneabletags[uint8clampedtag] = cloneabletags[uint16tag] = cloneabletags[uint32tag] = true; cloneabletags[errortag] = cloneabletags[functag] = cloneabletags[weakmaptag] = false; /** * the base implementation of `_.clone` and `_.clonedeep` which tracks * traversed objects. * * @private * @param {*} value the value to clone. * @param {boolean} bitmask the bitmask flags. * 1 - deep clone * 2 - flatten inherited properties * 4 - clone symbols * @param {function} [customizer] the function to customize cloning. * @param {string} [key] the key of `value`. * @param {object} [object] the parent object of `value`. * @param {object} [stack] tracks traversed objects and their clone counterparts. * @returns {*} returns the cloned value. */ function baseclone(value, bitmask, customizer, key, object, stack) { var result, isdeep = bitmask & clone_deep_flag, isflat = bitmask & clone_flat_flag, isfull = bitmask & clone_symbols_flag; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isobject(value)) { return value; } var isarr = isarray(value); if (isarr) { result = initclonearray(value); if (!isdeep) { return copyarray(value, result); } } else { var tag = gettag(value), isfunc = tag == functag || tag == gentag; if (isbuffer(value)) { return clonebuffer(value, isdeep); } if (tag == objecttag || tag == argstag || (isfunc && !object)) { result = (isflat || isfunc) ? {} : initcloneobject(value); if (!isdeep) { return isflat ? copysymbolsin(value, baseassignin(result, value)) : copysymbols(value, baseassign(result, value)); } } else { if (!cloneabletags[tag]) { return object ? value : {}; } result = initclonebytag(value, tag, isdeep); } } // check for circular references and return its corresponding clone. stack || (stack = new stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); if (isset(value)) { value.foreach(function(subvalue) { result.add(baseclone(subvalue, bitmask, customizer, subvalue, value, stack)); }); } else if (ismap(value)) { value.foreach(function(subvalue, key) { result.set(key, baseclone(subvalue, bitmask, customizer, key, value, stack)); }); } var keysfunc = isfull ? (isflat ? getallkeysin : getallkeys) : (isflat ? keysin : keys); var props = isarr ? undefined : keysfunc(value); arrayeach(props || value, function(subvalue, key) { if (props) { key = subvalue; subvalue = value[key]; } // recursively populate clone (susceptible to call stack limits). assignvalue(result, key, baseclone(subvalue, bitmask, customizer, key, value, stack)); }); return result; } module.exports = baseclone; /***/ }), /***/ 277: /***/ (function(module, exports, __webpack_require__) { var listcacheclear = __webpack_require__(278), listcachedelete = __webpack_require__(279), listcacheget = __webpack_require__(280), listcachehas = __webpack_require__(281), listcacheset = __webpack_require__(282); /** * creates an list cache object. * * @private * @constructor * @param {array} [entries] the key-value pairs to cache. */ function listcache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // add methods to `listcache`. listcache.prototype.clear = listcacheclear; listcache.prototype['delete'] = listcachedelete; listcache.prototype.get = listcacheget; listcache.prototype.has = listcachehas; listcache.prototype.set = listcacheset; module.exports = listcache; /***/ }), /***/ 278: /***/ (function(module, exports) { /** * removes all key-value entries from the list cache. * * @private * @name clear * @memberof listcache */ function listcacheclear() { this.__data__ = []; this.size = 0; } module.exports = listcacheclear; /***/ }), /***/ 279: /***/ (function(module, exports, __webpack_require__) { var associndexof = __webpack_require__(83); /** used for built-in method references. */ var arrayproto = array.prototype; /** built-in value references. */ var splice = arrayproto.splice; /** * removes `key` and its value from the list cache. * * @private * @name delete * @memberof listcache * @param {string} key the key of the value to remove. * @returns {boolean} returns `true` if the entry was removed, else `false`. */ function listcachedelete(key) { var data = this.__data__, index = associndexof(data, key); if (index < 0) { return false; } var lastindex = data.length - 1; if (index == lastindex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listcachedelete; /***/ }), /***/ 280: /***/ (function(module, exports, __webpack_require__) { var associndexof = __webpack_require__(83); /** * gets the list cache value for `key`. * * @private * @name get * @memberof listcache * @param {string} key the key of the value to get. * @returns {*} returns the entry value. */ function listcacheget(key) { var data = this.__data__, index = associndexof(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listcacheget; /***/ }), /***/ 281: /***/ (function(module, exports, __webpack_require__) { var associndexof = __webpack_require__(83); /** * checks if a list cache value for `key` exists. * * @private * @name has * @memberof listcache * @param {string} key the key of the entry to check. * @returns {boolean} returns `true` if an entry for `key` exists, else `false`. */ function listcachehas(key) { return associndexof(this.__data__, key) > -1; } module.exports = listcachehas; /***/ }), /***/ 282: /***/ (function(module, exports, __webpack_require__) { var associndexof = __webpack_require__(83); /** * sets the list cache `key` to `value`. * * @private * @name set * @memberof listcache * @param {string} key the key of the value to set. * @param {*} value the value to set. * @returns {object} returns the list cache instance. */ function listcacheset(key, value) { var data = this.__data__, index = associndexof(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listcacheset; /***/ }), /***/ 283: /***/ (function(module, exports) { /** * a specialized version of `_.foreach` for arrays without support for * iteratee shorthands. * * @private * @param {array} [array] the array to iterate over. * @param {function} iteratee the function invoked per iteration. * @returns {array} returns `array`. */ function arrayeach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayeach; /***/ }), /***/ 284: /***/ (function(module, exports, __webpack_require__) { var getnative = __webpack_require__(285); var defineproperty = (function() { try { var func = getnative(object, 'defineproperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineproperty; /***/ }), /***/ 285: /***/ (function(module, exports) { /** * gets the value at `key` of `object`. * * @private * @param {object} [object] the object to query. * @param {string} key the key of the property to get. * @returns {*} returns the property value. */ function getvalue(object, key) { return object == null ? undefined : object[key]; } module.exports = getvalue; /***/ }), /***/ 286: /***/ (function(module, exports, __webpack_require__) { var copyobject = __webpack_require__(84), keys = __webpack_require__(173); /** * the base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {object} object the destination object. * @param {object} source the source object. * @returns {object} returns `object`. */ function baseassign(object, source) { return object && copyobject(source, keys(source), object); } module.exports = baseassign; /***/ }), /***/ 287: /***/ (function(module, exports, __webpack_require__) { var copyobject = __webpack_require__(84), keysin = __webpack_require__(174); /** * the base implementation of `_.assignin` without support for multiple sources * or `customizer` functions. * * @private * @param {object} object the destination object. * @param {object} source the source object. * @returns {object} returns `object`. */ function baseassignin(object, source) { return object && copyobject(source, keysin(source), object); } module.exports = baseassignin; /***/ }), /***/ 288: /***/ (function(module, exports, __webpack_require__) { /* webpack var injection */(function(module) {var root = __webpack_require__(289); /** detect free variable `exports`. */ var freeexports = true && exports && !exports.nodetype && exports; /** detect free variable `module`. */ var freemodule = freeexports && typeof module == 'object' && module && !module.nodetype && module; /** detect the popular commonjs extension `module.exports`. */ var moduleexports = freemodule && freemodule.exports === freeexports; /** built-in value references. */ var buffer = moduleexports ? root.buffer : undefined, allocunsafe = buffer ? buffer.allocunsafe : undefined; /** * creates a clone of `buffer`. * * @private * @param {buffer} buffer the buffer to clone. * @param {boolean} [isdeep] specify a deep clone. * @returns {buffer} returns the cloned buffer. */ function clonebuffer(buffer, isdeep) { if (isdeep) { return buffer.slice(); } var length = buffer.length, result = allocunsafe ? allocunsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = clonebuffer; /* webpack var injection */}.call(this, __webpack_require__(175)(module))) /***/ }), /***/ 289: /***/ (function(module, exports, __webpack_require__) { var freeglobal = __webpack_require__(290); /** detect free variable `self`. */ var freeself = typeof self == 'object' && self && self.object === object && self; /** used as a reference to the global object. */ var root = freeglobal || freeself || function('return this')(); module.exports = root; /***/ }), /***/ 290: /***/ (function(module, exports, __webpack_require__) { /* webpack var injection */(function(global) {/** detect free variable `global` from node.js. */ var freeglobal = typeof global == 'object' && global && global.object === object && global; module.exports = freeglobal; /* webpack var injection */}.call(this, __webpack_require__(15))) /***/ }), /***/ 291: /***/ (function(module, exports) { /** * copies the values of `source` to `array`. * * @private * @param {array} source the array to copy values from. * @param {array} [array=[]] the array to copy values to. * @returns {array} returns `array`. */ function copyarray(source, array) { var index = -1, length = source.length; array || (array = array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyarray; /***/ }), /***/ 292: /***/ (function(module, exports, __webpack_require__) { var copyobject = __webpack_require__(84), getsymbols = __webpack_require__(293); /** * copies own symbols of `source` to `object`. * * @private * @param {object} source the object to copy symbols from. * @param {object} [object={}] the object to copy symbols to. * @returns {object} returns `object`. */ function copysymbols(source, object) { return copyobject(source, getsymbols(source), object); } module.exports = copysymbols; /***/ }), /***/ 293: /***/ (function(module, exports) { /** * this method returns a new empty array. * * @static * @memberof _ * @since 4.13.0 * @category util * @returns {array} returns the new empty array. * @example * * var arrays = _.times(2, _.stubarray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubarray() { return []; } module.exports = stubarray; /***/ }), /***/ 294: /***/ (function(module, exports, __webpack_require__) { var copyobject = __webpack_require__(84), getsymbolsin = __webpack_require__(295); /** * copies own and inherited symbols of `source` to `object`. * * @private * @param {object} source the object to copy symbols from. * @param {object} [object={}] the object to copy symbols to. * @returns {object} returns `object`. */ function copysymbolsin(source, object) { return copyobject(source, getsymbolsin(source), object); } module.exports = copysymbolsin; /***/ }), /***/ 295: /***/ (function(module, exports) { /** * this method returns a new empty array. * * @static * @memberof _ * @since 4.13.0 * @category util * @returns {array} returns the new empty array. * @example * * var arrays = _.times(2, _.stubarray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubarray() { return []; } module.exports = stubarray; /***/ }), /***/ 296: /***/ (function(module, exports, __webpack_require__) { var overarg = __webpack_require__(108); /* built-in method references for those with the same name as other `lodash` methods. */ var nativekeys = overarg(object.keys, object); module.exports = nativekeys; /***/ }), /***/ 297: /***/ (function(module, exports) { /** * this function is like * [`object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {object} object the object to query. * @returns {array} returns the array of property names. */ function nativekeysin(object) { var result = []; if (object != null) { for (var key in object(object)) { result.push(key); } } return result; } module.exports = nativekeysin; /***/ }), /***/ 298: /***/ (function(module, exports) { /** used for built-in method references. */ var objectproto = object.prototype; /** * used to resolve the * [`tostringtag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeobjecttostring = objectproto.tostring; /** * converts `value` to a string using `object.prototype.tostring`. * * @private * @param {*} value the value to convert. * @returns {string} returns the converted string. */ function objecttostring(value) { return nativeobjecttostring.call(value); } module.exports = objecttostring; /***/ }), /***/ 299: /***/ (function(module, exports) { /** used for built-in method references. */ var objectproto = object.prototype; /** used to check objects for own properties. */ var hasownproperty = objectproto.hasownproperty; /** * initializes an array clone. * * @private * @param {array} array the array to clone. * @returns {array} returns the initialized clone. */ function initclonearray(array) { var length = array.length, result = new array.constructor(length); // add properties assigned by `regexp#exec`. if (length && typeof array[0] == 'string' && hasownproperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } module.exports = initclonearray; /***/ }), /***/ 300: /***/ (function(module, exports) { /** * this method returns the first argument it receives. * * @static * @since 0.1.0 * @memberof _ * @category util * @param {*} value any value. * @returns {*} returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /***/ 301: /***/ (function(module, exports, __webpack_require__) { var basecreate = __webpack_require__(302), getprototype = __webpack_require__(303), isprototype = __webpack_require__(304); /** * initializes an object clone. * * @private * @param {object} object the object to clone. * @returns {object} returns the initialized clone. */ function initcloneobject(object) { return (typeof object.constructor == 'function' && !isprototype(object)) ? basecreate(getprototype(object)) : {}; } module.exports = initcloneobject; /***/ }), /***/ 302: /***/ (function(module, exports, __webpack_require__) { var isobject = __webpack_require__(176); /** built-in value references. */ var objectcreate = object.create; /** * the base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {object} proto the object to inherit from. * @returns {object} returns the new object. */ var basecreate = (function() { function object() {} return function(proto) { if (!isobject(proto)) { return {}; } if (objectcreate) { return objectcreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = basecreate; /***/ }), /***/ 303: /***/ (function(module, exports, __webpack_require__) { var overarg = __webpack_require__(108); /** built-in value references. */ var getprototype = overarg(object.getprototypeof, object); module.exports = getprototype; /***/ }), /***/ 304: /***/ (function(module, exports) { /** * this method returns `false`. * * @static * @memberof _ * @since 4.13.0 * @category util * @returns {boolean} returns `false`. * @example * * _.times(2, _.stubfalse); * // => [false, false] */ function stubfalse() { return false; } module.exports = stubfalse; /***/ }), /***/ 305: /***/ (function(module, exports) { /** * checks if `value` is classified as an `array` object. * * @static * @memberof _ * @since 0.1.0 * @category lang * @param {*} value the value to check. * @returns {boolean} returns `true` if `value` is an array, else `false`. * @example * * _.isarray([1, 2, 3]); * // => true * * _.isarray(document.body.children); * // => false * * _.isarray('abc'); * // => false * * _.isarray(_.noop); * // => false */ var isarray = array.isarray; module.exports = isarray; /***/ }), /***/ 306: /***/ (function(module, exports) { /** * this method returns `false`. * * @static * @memberof _ * @since 4.13.0 * @category util * @returns {boolean} returns `false`. * @example * * _.times(2, _.stubfalse); * // => [false, false] */ function stubfalse() { return false; } module.exports = stubfalse; /***/ }), /***/ 307: /***/ (function(module, exports) { /** * this method returns `false`. * * @static * @memberof _ * @since 4.13.0 * @category util * @returns {boolean} returns `false`. * @example * * _.times(2, _.stubfalse); * // => [false, false] */ function stubfalse() { return false; } module.exports = stubfalse; /***/ }), /***/ 308: /***/ (function(module, exports) { /** * this method returns `false`. * * @static * @memberof _ * @since 4.13.0 * @category util * @returns {boolean} returns `false`. * @example * * _.times(2, _.stubfalse); * // => [false, false] */ function stubfalse() { return false; } module.exports = stubfalse; /***/ }), /***/ 7: /***/ (function(module, exports) { // source: http://jsfiddle.net/vwx8v/ // http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes /** * conenience method returns corresponding value for given keyname or keycode. * * @param {mixed} keycode {number} or keyname {string} * @return {mixed} * @api public */ function keycode(searchinput) { // keyboard events if (searchinput && 'object' === typeof searchinput) { var haskeycode = searchinput.which || searchinput.keycode || searchinput.charcode if (haskeycode) searchinput = haskeycode } // numbers if ('number' === typeof searchinput) return names[searchinput] // everything else (cast to string) var search = string(searchinput) // check codes var foundnamedkey = codes[search.tolowercase()] if (foundnamedkey) return foundnamedkey // check aliases var foundnamedkey = aliases[search.tolowercase()] if (foundnamedkey) return foundnamedkey // weird character? if (search.length === 1) return search.charcodeat(0) return undefined } /** * compares a keyboard event with a given keycode or keyname. * * @param {event} event keyboard event that should be tested * @param {mixed} keycode {number} or keyname {string} * @return {boolean} * @api public */ keycode.iseventkey = function iseventkey(event, nameorcode) { if (event && 'object' === typeof event) { var keycode = event.which || event.keycode || event.charcode if (keycode === null || keycode === undefined) { return false; } if (typeof nameorcode === 'string') { // check codes var foundnamedkey = codes[nameorcode.tolowercase()] if (foundnamedkey) { return foundnamedkey === keycode; } // check aliases var foundnamedkey = aliases[nameorcode.tolowercase()] if (foundnamedkey) { return foundnamedkey === keycode; } } else if (typeof nameorcode === 'number') { return nameorcode === keycode; } return false; } } exports = module.exports = keycode; /** * get by name * * exports.code['enter'] // => 13 */ var codes = exports.code = exports.codes = { 'backspace': 8, 'tab': 9, 'enter': 13, 'shift': 16, 'ctrl': 17, 'alt': 18, 'pause/break': 19, 'caps lock': 20, 'esc': 27, 'space': 32, 'page up': 33, 'page down': 34, 'end': 35, 'home': 36, 'left': 37, 'up': 38, 'right': 39, 'down': 40, 'insert': 45, 'delete': 46, 'command': 91, 'left command': 91, 'right command': 93, 'numpad *': 106, 'numpad +': 107, 'numpad -': 109, 'numpad .': 110, 'numpad /': 111, 'num lock': 144, 'scroll lock': 145, 'my computer': 182, 'my calculator': 183, ';': 186, '=': 187, ',': 188, '-': 189, '.': 190, '/': 191, '`': 192, '[': 219, '\\': 220, ']': 221, "'": 222 } // helper aliases var aliases = exports.aliases = { 'windows': 91, '⇧': 16, '⌥': 18, '⌃': 17, '⌘': 91, 'ctl': 17, 'control': 17, 'option': 18, 'pause': 19, 'break': 19, 'caps': 20, 'return': 13, 'escape': 27, 'spc': 32, 'spacebar': 32, 'pgup': 33, 'pgdn': 34, 'ins': 45, 'del': 46, 'cmd': 91 } /*! * programatically add the following */ // lower case chars for (i = 97; i < 123; i++) codes[string.fromcharcode(i)] = i - 32 // numbers for (var i = 48; i < 58; i++) codes[i - 48] = i // function keys for (i = 1; i < 13; i++) codes['f'+i] = i + 111 // numpad keys for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96 /** * get by code * * exports.name[13] // => 'enter' */ var names = exports.names = exports.title = {} // title for backward compat // create reverse mapping for (i in codes) names[codes[i]] = i // add aliases for (var alias in aliases) { codes[alias] = aliases[alias] } /***/ }), /***/ 83: /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(170); /** * gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {array} array the array to inspect. * @param {*} key the key to search for. * @returns {number} returns the index of the matched value, else `-1`. */ function associndexof(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = associndexof; /***/ }), /***/ 84: /***/ (function(module, exports, __webpack_require__) { var assignvalue = __webpack_require__(171), baseassignvalue = __webpack_require__(172); /** * copies properties of `source` to `object`. * * @private * @param {object} source the object to copy properties from. * @param {array} props the property identifiers to copy. * @param {object} [object={}] the object to copy properties to. * @param {function} [customizer] the function to customize copied values. * @returns {object} returns `object`. */ function copyobject(source, props, object, customizer) { var isnew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newvalue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newvalue === undefined) { newvalue = source[key]; } if (isnew) { baseassignvalue(object, key, newvalue); } else { assignvalue(object, key, newvalue); } } return object; } module.exports = copyobject; /***/ }) }]);