PageRenderTime 65ms CodeModel.GetById 9ms RepoModel.GetById 0ms app.codeStats 1ms

/files/clappr/0.1.9/clappr.js

https://gitlab.com/Mirros/jsdelivr
JavaScript | 1680 lines | 619 code | 144 blank | 917 comment | 216 complexity | 5ba4ebbedf7f337739ba780eccae5147 MD5 | raw file
  1. require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  2. // shim for using process in browser
  3. var process = module.exports = {};
  4. var queue = [];
  5. var draining = false;
  6. function drainQueue() {
  7. if (draining) {
  8. return;
  9. }
  10. draining = true;
  11. var currentQueue;
  12. var len = queue.length;
  13. while(len) {
  14. currentQueue = queue;
  15. queue = [];
  16. var i = -1;
  17. while (++i < len) {
  18. currentQueue[i]();
  19. }
  20. len = queue.length;
  21. }
  22. draining = false;
  23. }
  24. process.nextTick = function (fun) {
  25. queue.push(fun);
  26. if (!draining) {
  27. setTimeout(drainQueue, 0);
  28. }
  29. };
  30. process.title = 'browser';
  31. process.browser = true;
  32. process.env = {};
  33. process.argv = [];
  34. process.version = ''; // empty string to avoid regexp issues
  35. process.versions = {};
  36. function noop() {}
  37. process.on = noop;
  38. process.addListener = noop;
  39. process.once = noop;
  40. process.off = noop;
  41. process.removeListener = noop;
  42. process.removeAllListeners = noop;
  43. process.emit = noop;
  44. process.binding = function (name) {
  45. throw new Error('process.binding is not supported');
  46. };
  47. // TODO(shtylman)
  48. process.cwd = function () { return '/' };
  49. process.chdir = function (dir) {
  50. throw new Error('process.chdir is not supported');
  51. };
  52. process.umask = function() { return 0; };
  53. },{}],2:[function(require,module,exports){
  54. /**
  55. * lodash 3.0.0 (Custom Build) <https://lodash.com/>
  56. * Build: `lodash modern modularize exports="npm" -o ./`
  57. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  58. * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
  59. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  60. * Available under MIT license <https://lodash.com/license>
  61. */
  62. var baseAssign = require('lodash._baseassign'),
  63. createAssigner = require('lodash._createassigner');
  64. /**
  65. * Assigns own enumerable properties of source object(s) to the destination
  66. * object. Subsequent sources overwrite property assignments of previous sources.
  67. * If `customizer` is provided it is invoked to produce the assigned values.
  68. * The `customizer` is bound to `thisArg` and invoked with five arguments;
  69. * (objectValue, sourceValue, key, object, source).
  70. *
  71. * @static
  72. * @memberOf _
  73. * @alias extend
  74. * @category Object
  75. * @param {Object} object The destination object.
  76. * @param {...Object} [sources] The source objects.
  77. * @param {Function} [customizer] The function to customize assigning values.
  78. * @param {*} [thisArg] The `this` binding of `customizer`.
  79. * @returns {Object} Returns `object`.
  80. * @example
  81. *
  82. * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });
  83. * // => { 'user': 'fred', 'age': 40 }
  84. *
  85. * // using a customizer callback
  86. * var defaults = _.partialRight(_.assign, function(value, other) {
  87. * return typeof value == 'undefined' ? other : value;
  88. * });
  89. *
  90. * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
  91. * // => { 'user': 'barney', 'age': 36 }
  92. */
  93. var assign = createAssigner(baseAssign);
  94. module.exports = assign;
  95. },{"lodash._baseassign":3,"lodash._createassigner":9}],3:[function(require,module,exports){
  96. /**
  97. * lodash 3.2.0 (Custom Build) <https://lodash.com/>
  98. * Build: `lodash modern modularize exports="npm" -o ./`
  99. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  100. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  101. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  102. * Available under MIT license <https://lodash.com/license>
  103. */
  104. var baseCopy = require('lodash._basecopy'),
  105. keys = require('lodash.keys');
  106. /**
  107. * The base implementation of `_.assign` without support for argument juggling,
  108. * multiple sources, and `customizer` functions.
  109. *
  110. * @private
  111. * @param {Object} object The destination object.
  112. * @param {Object} source The source object.
  113. * @returns {Object} Returns `object`.
  114. */
  115. function baseAssign(object, source) {
  116. return source == null
  117. ? object
  118. : baseCopy(source, keys(source), object);
  119. }
  120. module.exports = baseAssign;
  121. },{"lodash._basecopy":4,"lodash.keys":5}],4:[function(require,module,exports){
  122. /**
  123. * lodash 3.0.1 (Custom Build) <https://lodash.com/>
  124. * Build: `lodash modern modularize exports="npm" -o ./`
  125. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  126. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  127. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  128. * Available under MIT license <https://lodash.com/license>
  129. */
  130. /**
  131. * Copies properties of `source` to `object`.
  132. *
  133. * @private
  134. * @param {Object} source The object to copy properties from.
  135. * @param {Array} props The property names to copy.
  136. * @param {Object} [object={}] The object to copy properties to.
  137. * @returns {Object} Returns `object`.
  138. */
  139. function baseCopy(source, props, object) {
  140. object || (object = {});
  141. var index = -1,
  142. length = props.length;
  143. while (++index < length) {
  144. var key = props[index];
  145. object[key] = source[key];
  146. }
  147. return object;
  148. }
  149. module.exports = baseCopy;
  150. },{}],5:[function(require,module,exports){
  151. /**
  152. * lodash 3.1.2 (Custom Build) <https://lodash.com/>
  153. * Build: `lodash modern modularize exports="npm" -o ./`
  154. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  155. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  156. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  157. * Available under MIT license <https://lodash.com/license>
  158. */
  159. var getNative = require('lodash._getnative'),
  160. isArguments = require('lodash.isarguments'),
  161. isArray = require('lodash.isarray');
  162. /** Used to detect unsigned integer values. */
  163. var reIsUint = /^\d+$/;
  164. /** Used for native method references. */
  165. var objectProto = Object.prototype;
  166. /** Used to check objects for own properties. */
  167. var hasOwnProperty = objectProto.hasOwnProperty;
  168. /* Native method references for those with the same name as other `lodash` methods. */
  169. var nativeKeys = getNative(Object, 'keys');
  170. /**
  171. * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
  172. * of an array-like value.
  173. */
  174. var MAX_SAFE_INTEGER = 9007199254740991;
  175. /**
  176. * The base implementation of `_.property` without support for deep paths.
  177. *
  178. * @private
  179. * @param {string} key The key of the property to get.
  180. * @returns {Function} Returns the new function.
  181. */
  182. function baseProperty(key) {
  183. return function(object) {
  184. return object == null ? undefined : object[key];
  185. };
  186. }
  187. /**
  188. * Gets the "length" property value of `object`.
  189. *
  190. * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
  191. * that affects Safari on at least iOS 8.1-8.3 ARM64.
  192. *
  193. * @private
  194. * @param {Object} object The object to query.
  195. * @returns {*} Returns the "length" value.
  196. */
  197. var getLength = baseProperty('length');
  198. /**
  199. * Checks if `value` is array-like.
  200. *
  201. * @private
  202. * @param {*} value The value to check.
  203. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  204. */
  205. function isArrayLike(value) {
  206. return value != null && isLength(getLength(value));
  207. }
  208. /**
  209. * Checks if `value` is a valid array-like index.
  210. *
  211. * @private
  212. * @param {*} value The value to check.
  213. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  214. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  215. */
  216. function isIndex(value, length) {
  217. value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
  218. length = length == null ? MAX_SAFE_INTEGER : length;
  219. return value > -1 && value % 1 == 0 && value < length;
  220. }
  221. /**
  222. * Checks if `value` is a valid array-like length.
  223. *
  224. * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
  225. *
  226. * @private
  227. * @param {*} value The value to check.
  228. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  229. */
  230. function isLength(value) {
  231. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  232. }
  233. /**
  234. * A fallback implementation of `Object.keys` which creates an array of the
  235. * own enumerable property names of `object`.
  236. *
  237. * @private
  238. * @param {Object} object The object to query.
  239. * @returns {Array} Returns the array of property names.
  240. */
  241. function shimKeys(object) {
  242. var props = keysIn(object),
  243. propsLength = props.length,
  244. length = propsLength && object.length;
  245. var allowIndexes = !!length && isLength(length) &&
  246. (isArray(object) || isArguments(object));
  247. var index = -1,
  248. result = [];
  249. while (++index < propsLength) {
  250. var key = props[index];
  251. if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
  252. result.push(key);
  253. }
  254. }
  255. return result;
  256. }
  257. /**
  258. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  259. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  260. *
  261. * @static
  262. * @memberOf _
  263. * @category Lang
  264. * @param {*} value The value to check.
  265. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  266. * @example
  267. *
  268. * _.isObject({});
  269. * // => true
  270. *
  271. * _.isObject([1, 2, 3]);
  272. * // => true
  273. *
  274. * _.isObject(1);
  275. * // => false
  276. */
  277. function isObject(value) {
  278. // Avoid a V8 JIT bug in Chrome 19-20.
  279. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  280. var type = typeof value;
  281. return !!value && (type == 'object' || type == 'function');
  282. }
  283. /**
  284. * Creates an array of the own enumerable property names of `object`.
  285. *
  286. * **Note:** Non-object values are coerced to objects. See the
  287. * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
  288. * for more details.
  289. *
  290. * @static
  291. * @memberOf _
  292. * @category Object
  293. * @param {Object} object The object to query.
  294. * @returns {Array} Returns the array of property names.
  295. * @example
  296. *
  297. * function Foo() {
  298. * this.a = 1;
  299. * this.b = 2;
  300. * }
  301. *
  302. * Foo.prototype.c = 3;
  303. *
  304. * _.keys(new Foo);
  305. * // => ['a', 'b'] (iteration order is not guaranteed)
  306. *
  307. * _.keys('hi');
  308. * // => ['0', '1']
  309. */
  310. var keys = !nativeKeys ? shimKeys : function(object) {
  311. var Ctor = object == null ? undefined : object.constructor;
  312. if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
  313. (typeof object != 'function' && isArrayLike(object))) {
  314. return shimKeys(object);
  315. }
  316. return isObject(object) ? nativeKeys(object) : [];
  317. };
  318. /**
  319. * Creates an array of the own and inherited enumerable property names of `object`.
  320. *
  321. * **Note:** Non-object values are coerced to objects.
  322. *
  323. * @static
  324. * @memberOf _
  325. * @category Object
  326. * @param {Object} object The object to query.
  327. * @returns {Array} Returns the array of property names.
  328. * @example
  329. *
  330. * function Foo() {
  331. * this.a = 1;
  332. * this.b = 2;
  333. * }
  334. *
  335. * Foo.prototype.c = 3;
  336. *
  337. * _.keysIn(new Foo);
  338. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  339. */
  340. function keysIn(object) {
  341. if (object == null) {
  342. return [];
  343. }
  344. if (!isObject(object)) {
  345. object = Object(object);
  346. }
  347. var length = object.length;
  348. length = (length && isLength(length) &&
  349. (isArray(object) || isArguments(object)) && length) || 0;
  350. var Ctor = object.constructor,
  351. index = -1,
  352. isProto = typeof Ctor == 'function' && Ctor.prototype === object,
  353. result = Array(length),
  354. skipIndexes = length > 0;
  355. while (++index < length) {
  356. result[index] = (index + '');
  357. }
  358. for (var key in object) {
  359. if (!(skipIndexes && isIndex(key, length)) &&
  360. !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  361. result.push(key);
  362. }
  363. }
  364. return result;
  365. }
  366. module.exports = keys;
  367. },{"lodash._getnative":6,"lodash.isarguments":7,"lodash.isarray":8}],6:[function(require,module,exports){
  368. /**
  369. * lodash 3.9.1 (Custom Build) <https://lodash.com/>
  370. * Build: `lodash modern modularize exports="npm" -o ./`
  371. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  372. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  373. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  374. * Available under MIT license <https://lodash.com/license>
  375. */
  376. /** `Object#toString` result references. */
  377. var funcTag = '[object Function]';
  378. /** Used to detect host constructors (Safari > 5). */
  379. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  380. /**
  381. * Checks if `value` is object-like.
  382. *
  383. * @private
  384. * @param {*} value The value to check.
  385. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  386. */
  387. function isObjectLike(value) {
  388. return !!value && typeof value == 'object';
  389. }
  390. /** Used for native method references. */
  391. var objectProto = Object.prototype;
  392. /** Used to resolve the decompiled source of functions. */
  393. var fnToString = Function.prototype.toString;
  394. /** Used to check objects for own properties. */
  395. var hasOwnProperty = objectProto.hasOwnProperty;
  396. /**
  397. * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
  398. * of values.
  399. */
  400. var objToString = objectProto.toString;
  401. /** Used to detect if a method is native. */
  402. var reIsNative = RegExp('^' +
  403. fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
  404. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  405. );
  406. /**
  407. * Gets the native function at `key` of `object`.
  408. *
  409. * @private
  410. * @param {Object} object The object to query.
  411. * @param {string} key The key of the method to get.
  412. * @returns {*} Returns the function if it's native, else `undefined`.
  413. */
  414. function getNative(object, key) {
  415. var value = object == null ? undefined : object[key];
  416. return isNative(value) ? value : undefined;
  417. }
  418. /**
  419. * Checks if `value` is classified as a `Function` object.
  420. *
  421. * @static
  422. * @memberOf _
  423. * @category Lang
  424. * @param {*} value The value to check.
  425. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  426. * @example
  427. *
  428. * _.isFunction(_);
  429. * // => true
  430. *
  431. * _.isFunction(/abc/);
  432. * // => false
  433. */
  434. function isFunction(value) {
  435. // The use of `Object#toString` avoids issues with the `typeof` operator
  436. // in older versions of Chrome and Safari which return 'function' for regexes
  437. // and Safari 8 equivalents which return 'object' for typed array constructors.
  438. return isObject(value) && objToString.call(value) == funcTag;
  439. }
  440. /**
  441. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  442. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  443. *
  444. * @static
  445. * @memberOf _
  446. * @category Lang
  447. * @param {*} value The value to check.
  448. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  449. * @example
  450. *
  451. * _.isObject({});
  452. * // => true
  453. *
  454. * _.isObject([1, 2, 3]);
  455. * // => true
  456. *
  457. * _.isObject(1);
  458. * // => false
  459. */
  460. function isObject(value) {
  461. // Avoid a V8 JIT bug in Chrome 19-20.
  462. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  463. var type = typeof value;
  464. return !!value && (type == 'object' || type == 'function');
  465. }
  466. /**
  467. * Checks if `value` is a native function.
  468. *
  469. * @static
  470. * @memberOf _
  471. * @category Lang
  472. * @param {*} value The value to check.
  473. * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
  474. * @example
  475. *
  476. * _.isNative(Array.prototype.push);
  477. * // => true
  478. *
  479. * _.isNative(_);
  480. * // => false
  481. */
  482. function isNative(value) {
  483. if (value == null) {
  484. return false;
  485. }
  486. if (isFunction(value)) {
  487. return reIsNative.test(fnToString.call(value));
  488. }
  489. return isObjectLike(value) && reIsHostCtor.test(value);
  490. }
  491. module.exports = getNative;
  492. },{}],7:[function(require,module,exports){
  493. /**
  494. * lodash 3.0.4 (Custom Build) <https://lodash.com/>
  495. * Build: `lodash modern modularize exports="npm" -o ./`
  496. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  497. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  498. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  499. * Available under MIT license <https://lodash.com/license>
  500. */
  501. /**
  502. * Checks if `value` is object-like.
  503. *
  504. * @private
  505. * @param {*} value The value to check.
  506. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  507. */
  508. function isObjectLike(value) {
  509. return !!value && typeof value == 'object';
  510. }
  511. /** Used for native method references. */
  512. var objectProto = Object.prototype;
  513. /** Used to check objects for own properties. */
  514. var hasOwnProperty = objectProto.hasOwnProperty;
  515. /** Native method references. */
  516. var propertyIsEnumerable = objectProto.propertyIsEnumerable;
  517. /**
  518. * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
  519. * of an array-like value.
  520. */
  521. var MAX_SAFE_INTEGER = 9007199254740991;
  522. /**
  523. * The base implementation of `_.property` without support for deep paths.
  524. *
  525. * @private
  526. * @param {string} key The key of the property to get.
  527. * @returns {Function} Returns the new function.
  528. */
  529. function baseProperty(key) {
  530. return function(object) {
  531. return object == null ? undefined : object[key];
  532. };
  533. }
  534. /**
  535. * Gets the "length" property value of `object`.
  536. *
  537. * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
  538. * that affects Safari on at least iOS 8.1-8.3 ARM64.
  539. *
  540. * @private
  541. * @param {Object} object The object to query.
  542. * @returns {*} Returns the "length" value.
  543. */
  544. var getLength = baseProperty('length');
  545. /**
  546. * Checks if `value` is array-like.
  547. *
  548. * @private
  549. * @param {*} value The value to check.
  550. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  551. */
  552. function isArrayLike(value) {
  553. return value != null && isLength(getLength(value));
  554. }
  555. /**
  556. * Checks if `value` is a valid array-like length.
  557. *
  558. * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
  559. *
  560. * @private
  561. * @param {*} value The value to check.
  562. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  563. */
  564. function isLength(value) {
  565. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  566. }
  567. /**
  568. * Checks if `value` is classified as an `arguments` object.
  569. *
  570. * @static
  571. * @memberOf _
  572. * @category Lang
  573. * @param {*} value The value to check.
  574. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  575. * @example
  576. *
  577. * _.isArguments(function() { return arguments; }());
  578. * // => true
  579. *
  580. * _.isArguments([1, 2, 3]);
  581. * // => false
  582. */
  583. function isArguments(value) {
  584. return isObjectLike(value) && isArrayLike(value) &&
  585. hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
  586. }
  587. module.exports = isArguments;
  588. },{}],8:[function(require,module,exports){
  589. /**
  590. * lodash 3.0.4 (Custom Build) <https://lodash.com/>
  591. * Build: `lodash modern modularize exports="npm" -o ./`
  592. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  593. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  594. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  595. * Available under MIT license <https://lodash.com/license>
  596. */
  597. /** `Object#toString` result references. */
  598. var arrayTag = '[object Array]',
  599. funcTag = '[object Function]';
  600. /** Used to detect host constructors (Safari > 5). */
  601. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  602. /**
  603. * Checks if `value` is object-like.
  604. *
  605. * @private
  606. * @param {*} value The value to check.
  607. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  608. */
  609. function isObjectLike(value) {
  610. return !!value && typeof value == 'object';
  611. }
  612. /** Used for native method references. */
  613. var objectProto = Object.prototype;
  614. /** Used to resolve the decompiled source of functions. */
  615. var fnToString = Function.prototype.toString;
  616. /** Used to check objects for own properties. */
  617. var hasOwnProperty = objectProto.hasOwnProperty;
  618. /**
  619. * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
  620. * of values.
  621. */
  622. var objToString = objectProto.toString;
  623. /** Used to detect if a method is native. */
  624. var reIsNative = RegExp('^' +
  625. fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
  626. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  627. );
  628. /* Native method references for those with the same name as other `lodash` methods. */
  629. var nativeIsArray = getNative(Array, 'isArray');
  630. /**
  631. * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
  632. * of an array-like value.
  633. */
  634. var MAX_SAFE_INTEGER = 9007199254740991;
  635. /**
  636. * Gets the native function at `key` of `object`.
  637. *
  638. * @private
  639. * @param {Object} object The object to query.
  640. * @param {string} key The key of the method to get.
  641. * @returns {*} Returns the function if it's native, else `undefined`.
  642. */
  643. function getNative(object, key) {
  644. var value = object == null ? undefined : object[key];
  645. return isNative(value) ? value : undefined;
  646. }
  647. /**
  648. * Checks if `value` is a valid array-like length.
  649. *
  650. * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
  651. *
  652. * @private
  653. * @param {*} value The value to check.
  654. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  655. */
  656. function isLength(value) {
  657. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  658. }
  659. /**
  660. * Checks if `value` is classified as an `Array` object.
  661. *
  662. * @static
  663. * @memberOf _
  664. * @category Lang
  665. * @param {*} value The value to check.
  666. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  667. * @example
  668. *
  669. * _.isArray([1, 2, 3]);
  670. * // => true
  671. *
  672. * _.isArray(function() { return arguments; }());
  673. * // => false
  674. */
  675. var isArray = nativeIsArray || function(value) {
  676. return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
  677. };
  678. /**
  679. * Checks if `value` is classified as a `Function` object.
  680. *
  681. * @static
  682. * @memberOf _
  683. * @category Lang
  684. * @param {*} value The value to check.
  685. * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
  686. * @example
  687. *
  688. * _.isFunction(_);
  689. * // => true
  690. *
  691. * _.isFunction(/abc/);
  692. * // => false
  693. */
  694. function isFunction(value) {
  695. // The use of `Object#toString` avoids issues with the `typeof` operator
  696. // in older versions of Chrome and Safari which return 'function' for regexes
  697. // and Safari 8 equivalents which return 'object' for typed array constructors.
  698. return isObject(value) && objToString.call(value) == funcTag;
  699. }
  700. /**
  701. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  702. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  703. *
  704. * @static
  705. * @memberOf _
  706. * @category Lang
  707. * @param {*} value The value to check.
  708. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  709. * @example
  710. *
  711. * _.isObject({});
  712. * // => true
  713. *
  714. * _.isObject([1, 2, 3]);
  715. * // => true
  716. *
  717. * _.isObject(1);
  718. * // => false
  719. */
  720. function isObject(value) {
  721. // Avoid a V8 JIT bug in Chrome 19-20.
  722. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  723. var type = typeof value;
  724. return !!value && (type == 'object' || type == 'function');
  725. }
  726. /**
  727. * Checks if `value` is a native function.
  728. *
  729. * @static
  730. * @memberOf _
  731. * @category Lang
  732. * @param {*} value The value to check.
  733. * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
  734. * @example
  735. *
  736. * _.isNative(Array.prototype.push);
  737. * // => true
  738. *
  739. * _.isNative(_);
  740. * // => false
  741. */
  742. function isNative(value) {
  743. if (value == null) {
  744. return false;
  745. }
  746. if (isFunction(value)) {
  747. return reIsNative.test(fnToString.call(value));
  748. }
  749. return isObjectLike(value) && reIsHostCtor.test(value);
  750. }
  751. module.exports = isArray;
  752. },{}],9:[function(require,module,exports){
  753. /**
  754. * lodash 3.1.1 (Custom Build) <https://lodash.com/>
  755. * Build: `lodash modern modularize exports="npm" -o ./`
  756. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  757. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  758. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  759. * Available under MIT license <https://lodash.com/license>
  760. */
  761. var bindCallback = require('lodash._bindcallback'),
  762. isIterateeCall = require('lodash._isiterateecall'),
  763. restParam = require('lodash.restparam');
  764. /**
  765. * Creates a function that assigns properties of source object(s) to a given
  766. * destination object.
  767. *
  768. * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`.
  769. *
  770. * @private
  771. * @param {Function} assigner The function to assign values.
  772. * @returns {Function} Returns the new assigner function.
  773. */
  774. function createAssigner(assigner) {
  775. return restParam(function(object, sources) {
  776. var index = -1,
  777. length = object == null ? 0 : sources.length,
  778. customizer = length > 2 ? sources[length - 2] : undefined,
  779. guard = length > 2 ? sources[2] : undefined,
  780. thisArg = length > 1 ? sources[length - 1] : undefined;
  781. if (typeof customizer == 'function') {
  782. customizer = bindCallback(customizer, thisArg, 5);
  783. length -= 2;
  784. } else {
  785. customizer = typeof thisArg == 'function' ? thisArg : undefined;
  786. length -= (customizer ? 1 : 0);
  787. }
  788. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  789. customizer = length < 3 ? undefined : customizer;
  790. length = 1;
  791. }
  792. while (++index < length) {
  793. var source = sources[index];
  794. if (source) {
  795. assigner(object, source, customizer);
  796. }
  797. }
  798. return object;
  799. });
  800. }
  801. module.exports = createAssigner;
  802. },{"lodash._bindcallback":10,"lodash._isiterateecall":11,"lodash.restparam":12}],10:[function(require,module,exports){
  803. /**
  804. * lodash 3.0.1 (Custom Build) <https://lodash.com/>
  805. * Build: `lodash modern modularize exports="npm" -o ./`
  806. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  807. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  808. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  809. * Available under MIT license <https://lodash.com/license>
  810. */
  811. /**
  812. * A specialized version of `baseCallback` which only supports `this` binding
  813. * and specifying the number of arguments to provide to `func`.
  814. *
  815. * @private
  816. * @param {Function} func The function to bind.
  817. * @param {*} thisArg The `this` binding of `func`.
  818. * @param {number} [argCount] The number of arguments to provide to `func`.
  819. * @returns {Function} Returns the callback.
  820. */
  821. function bindCallback(func, thisArg, argCount) {
  822. if (typeof func != 'function') {
  823. return identity;
  824. }
  825. if (thisArg === undefined) {
  826. return func;
  827. }
  828. switch (argCount) {
  829. case 1: return function(value) {
  830. return func.call(thisArg, value);
  831. };
  832. case 3: return function(value, index, collection) {
  833. return func.call(thisArg, value, index, collection);
  834. };
  835. case 4: return function(accumulator, value, index, collection) {
  836. return func.call(thisArg, accumulator, value, index, collection);
  837. };
  838. case 5: return function(value, other, key, object, source) {
  839. return func.call(thisArg, value, other, key, object, source);
  840. };
  841. }
  842. return function() {
  843. return func.apply(thisArg, arguments);
  844. };
  845. }
  846. /**
  847. * This method returns the first argument provided to it.
  848. *
  849. * @static
  850. * @memberOf _
  851. * @category Utility
  852. * @param {*} value Any value.
  853. * @returns {*} Returns `value`.
  854. * @example
  855. *
  856. * var object = { 'user': 'fred' };
  857. *
  858. * _.identity(object) === object;
  859. * // => true
  860. */
  861. function identity(value) {
  862. return value;
  863. }
  864. module.exports = bindCallback;
  865. },{}],11:[function(require,module,exports){
  866. /**
  867. * lodash 3.0.9 (Custom Build) <https://lodash.com/>
  868. * Build: `lodash modern modularize exports="npm" -o ./`
  869. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  870. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  871. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  872. * Available under MIT license <https://lodash.com/license>
  873. */
  874. /** Used to detect unsigned integer values. */
  875. var reIsUint = /^\d+$/;
  876. /**
  877. * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
  878. * of an array-like value.
  879. */
  880. var MAX_SAFE_INTEGER = 9007199254740991;
  881. /**
  882. * The base implementation of `_.property` without support for deep paths.
  883. *
  884. * @private
  885. * @param {string} key The key of the property to get.
  886. * @returns {Function} Returns the new function.
  887. */
  888. function baseProperty(key) {
  889. return function(object) {
  890. return object == null ? undefined : object[key];
  891. };
  892. }
  893. /**
  894. * Gets the "length" property value of `object`.
  895. *
  896. * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
  897. * that affects Safari on at least iOS 8.1-8.3 ARM64.
  898. *
  899. * @private
  900. * @param {Object} object The object to query.
  901. * @returns {*} Returns the "length" value.
  902. */
  903. var getLength = baseProperty('length');
  904. /**
  905. * Checks if `value` is array-like.
  906. *
  907. * @private
  908. * @param {*} value The value to check.
  909. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  910. */
  911. function isArrayLike(value) {
  912. return value != null && isLength(getLength(value));
  913. }
  914. /**
  915. * Checks if `value` is a valid array-like index.
  916. *
  917. * @private
  918. * @param {*} value The value to check.
  919. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  920. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  921. */
  922. function isIndex(value, length) {
  923. value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
  924. length = length == null ? MAX_SAFE_INTEGER : length;
  925. return value > -1 && value % 1 == 0 && value < length;
  926. }
  927. /**
  928. * Checks if the provided arguments are from an iteratee call.
  929. *
  930. * @private
  931. * @param {*} value The potential iteratee value argument.
  932. * @param {*} index The potential iteratee index or key argument.
  933. * @param {*} object The potential iteratee object argument.
  934. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
  935. */
  936. function isIterateeCall(value, index, object) {
  937. if (!isObject(object)) {
  938. return false;
  939. }
  940. var type = typeof index;
  941. if (type == 'number'
  942. ? (isArrayLike(object) && isIndex(index, object.length))
  943. : (type == 'string' && index in object)) {
  944. var other = object[index];
  945. return value === value ? (value === other) : (other !== other);
  946. }
  947. return false;
  948. }
  949. /**
  950. * Checks if `value` is a valid array-like length.
  951. *
  952. * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
  953. *
  954. * @private
  955. * @param {*} value The value to check.
  956. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  957. */
  958. function isLength(value) {
  959. return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  960. }
  961. /**
  962. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  963. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  964. *
  965. * @static
  966. * @memberOf _
  967. * @category Lang
  968. * @param {*} value The value to check.
  969. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  970. * @example
  971. *
  972. * _.isObject({});
  973. * // => true
  974. *
  975. * _.isObject([1, 2, 3]);
  976. * // => true
  977. *
  978. * _.isObject(1);
  979. * // => false
  980. */
  981. function isObject(value) {
  982. // Avoid a V8 JIT bug in Chrome 19-20.
  983. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  984. var type = typeof value;
  985. return !!value && (type == 'object' || type == 'function');
  986. }
  987. module.exports = isIterateeCall;
  988. },{}],12:[function(require,module,exports){
  989. /**
  990. * lodash 3.6.1 (Custom Build) <https://lodash.com/>
  991. * Build: `lodash modern modularize exports="npm" -o ./`
  992. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  993. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  994. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  995. * Available under MIT license <https://lodash.com/license>
  996. */
  997. /** Used as the `TypeError` message for "Functions" methods. */
  998. var FUNC_ERROR_TEXT = 'Expected a function';
  999. /* Native method references for those with the same name as other `lodash` methods. */
  1000. var nativeMax = Math.max;
  1001. /**
  1002. * Creates a function that invokes `func` with the `this` binding of the
  1003. * created function and arguments from `start` and beyond provided as an array.
  1004. *
  1005. * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
  1006. *
  1007. * @static
  1008. * @memberOf _
  1009. * @category Function
  1010. * @param {Function} func The function to apply a rest parameter to.
  1011. * @param {number} [start=func.length-1] The start position of the rest parameter.
  1012. * @returns {Function} Returns the new function.
  1013. * @example
  1014. *
  1015. * var say = _.restParam(function(what, names) {
  1016. * return what + ' ' + _.initial(names).join(', ') +
  1017. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  1018. * });
  1019. *
  1020. * say('hello', 'fred', 'barney', 'pebbles');
  1021. * // => 'hello fred, barney, & pebbles'
  1022. */
  1023. function restParam(func, start) {
  1024. if (typeof func != 'function') {
  1025. throw new TypeError(FUNC_ERROR_TEXT);
  1026. }
  1027. start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
  1028. return function() {
  1029. var args = arguments,
  1030. index = -1,
  1031. length = nativeMax(args.length - start, 0),
  1032. rest = Array(length);
  1033. while (++index < length) {
  1034. rest[index] = args[start + index];
  1035. }
  1036. switch (start) {
  1037. case 0: return func.call(this, rest);
  1038. case 1: return func.call(this, args[0], rest);
  1039. case 2: return func.call(this, args[0], args[1], rest);
  1040. }
  1041. var otherArgs = Array(start + 1);
  1042. index = -1;
  1043. while (++index < start) {
  1044. otherArgs[index] = args[index];
  1045. }
  1046. otherArgs[start] = rest;
  1047. return func.apply(this, otherArgs);
  1048. };
  1049. }
  1050. module.exports = restParam;
  1051. },{}],13:[function(require,module,exports){
  1052. /**
  1053. * lodash 3.0.0 (Custom Build) <https://lodash.com/>
  1054. * Build: `lodash modern modularize exports="npm" -o ./`
  1055. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1056. * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
  1057. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1058. * Available under MIT license <https://lodash.com/license>
  1059. */
  1060. var baseCallback = require('lodash._basecallback'),
  1061. baseEach = require('lodash._baseeach'),
  1062. baseFind = require('lodash._basefind'),
  1063. findIndex = require('lodash.findindex'),
  1064. isArray = require('lodash.isarray');
  1065. /**
  1066. * Iterates over elements of `collection`, returning the first element
  1067. * `predicate` returns truthy for. The predicate is bound to `thisArg` and
  1068. * invoked with three arguments; (value, index|key, collection).
  1069. *
  1070. * If a property name is provided for `predicate` the created "_.property"
  1071. * style callback returns the property value of the given element.
  1072. *
  1073. * If an object is provided for `predicate` the created "_.matches" style
  1074. * callback returns `true` for elements that have the properties of the given
  1075. * object, else `false`.
  1076. *
  1077. * @static
  1078. * @memberOf _
  1079. * @alias detect
  1080. * @category Collection
  1081. * @param {Array|Object|string} collection The collection to search.
  1082. * @param {Function|Object|string} [predicate=_.identity] The function invoked
  1083. * per iteration. If a property name or object is provided it is used to
  1084. * create a "_.property" or "_.matches" style callback respectively.
  1085. * @param {*} [thisArg] The `this` binding of `predicate`.
  1086. * @returns {*} Returns the matched element, else `undefined`.
  1087. * @example
  1088. *
  1089. * var users = [
  1090. * { 'user': 'barney', 'age': 36, 'active': false },
  1091. * { 'user': 'fred', 'age': 40, 'active': true },
  1092. * { 'user': 'pebbles', 'age': 1, 'active': false }
  1093. * ];
  1094. *
  1095. * _.result(_.find(users, function(chr) { return chr.age < 40; }), 'user');
  1096. * // => 'barney'
  1097. *
  1098. * // using the "_.matches" callback shorthand
  1099. * _.result(_.find(users, { 'age': 1 }), 'user');
  1100. * // => 'pebbles'
  1101. *
  1102. * // using the "_.property" callback shorthand
  1103. * _.result(_.find(users, 'active'), 'user');
  1104. * // => 'fred'
  1105. */
  1106. function find(collection, predicate, thisArg) {
  1107. if (isArray(collection)) {
  1108. var index = findIndex(collection, predicate, thisArg);
  1109. return index > -1 ? collection[index] : undefined;
  1110. }
  1111. predicate = baseCallback(predicate, thisArg, 3);
  1112. return baseFind(collection, predicate, baseEach);
  1113. }
  1114. module.exports = find;
  1115. },{"lodash._basecallback":14,"lodash._baseeach":25,"lodash._basefind":29,"lodash.findindex":30,"lodash.isarray":32}],14:[function(require,module,exports){
  1116. /**
  1117. * lodash 3.3.1 (Custom Build) <https://lodash.com/>
  1118. * Build: `lodash modern modularize exports="npm" -o ./`
  1119. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1120. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1121. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1122. * Available under MIT license <https://lodash.com/license>
  1123. */
  1124. var baseIsEqual = require('lodash._baseisequal'),
  1125. bindCallback = require('lodash._bindcallback'),
  1126. isArray = require('lodash.isarray'),
  1127. pairs = require('lodash.pairs');
  1128. /** Used to match property names within property paths. */
  1129. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
  1130. reIsPlainProp = /^\w*$/,
  1131. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
  1132. /** Used to match backslashes in property paths. */
  1133. var reEscapeChar = /\\(\\)?/g;
  1134. /**
  1135. * Converts `value` to a string if it's not one. An empty string is returned
  1136. * for `null` or `undefined` values.
  1137. *
  1138. * @private
  1139. * @param {*} value The value to process.
  1140. * @returns {string} Returns the string.
  1141. */
  1142. function baseToString(value) {
  1143. return value == null ? '' : (value + '');
  1144. }
  1145. /**
  1146. * The base implementation of `_.callback` which supports specifying the
  1147. * number of arguments to provide to `func`.
  1148. *
  1149. * @private
  1150. * @param {*} [func=_.identity] The value to convert to a callback.
  1151. * @param {*} [thisArg] The `this` binding of `func`.
  1152. * @param {number} [argCount] The number of arguments to provide to `func`.
  1153. * @returns {Function} Returns the callback.
  1154. */
  1155. function baseCallback(func, thisArg, argCount) {
  1156. var type = typeof func;
  1157. if (type == 'function') {
  1158. return thisArg === undefined
  1159. ? func
  1160. : bindCallback(func, thisArg, argCount);
  1161. }
  1162. if (func == null) {
  1163. return identity;
  1164. }
  1165. if (type == 'object') {
  1166. return baseMatches(func);
  1167. }
  1168. return thisArg === undefined
  1169. ? property(func)
  1170. : baseMatchesProperty(func, thisArg);
  1171. }
  1172. /**
  1173. * The base implementation of `get` without support for string paths
  1174. * and default values.
  1175. *
  1176. * @private
  1177. * @param {Object} object The object to query.
  1178. * @param {Array} path The path of the property to get.
  1179. * @param {string} [pathKey] The key representation of path.
  1180. * @returns {*} Returns the resolved value.
  1181. */
  1182. function baseGet(object, path, pathKey) {
  1183. if (object == null) {
  1184. return;
  1185. }
  1186. if (pathKey !== undefined && pathKey in toObject(object)) {
  1187. path = [pathKey];
  1188. }
  1189. var index = 0,
  1190. length = path.length;
  1191. while (object != null && index < length) {
  1192. object = object[path[index++]];
  1193. }
  1194. return (index && index == length) ? object : undefined;
  1195. }
  1196. /**
  1197. * The base implementation of `_.isMatch` without support for callback
  1198. * shorthands and `this` binding.
  1199. *
  1200. * @private
  1201. * @param {Object} object The object to inspect.
  1202. * @param {Array} matchData The propery names, values, and compare flags to match.
  1203. * @param {Function} [customizer] The function to customize comparing objects.
  1204. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  1205. */
  1206. function baseIsMatch(object, matchData, customizer) {
  1207. var index = matchData.length,
  1208. length = index,
  1209. noCustomizer = !customizer;
  1210. if (object == null) {
  1211. return !length;
  1212. }
  1213. object = toObject(object);
  1214. while (index--) {
  1215. var data = matchData[index];
  1216. if ((noCustomizer && data[2])
  1217. ? data[1] !== object[data[0]]
  1218. : !(data[0] in object)
  1219. ) {
  1220. return false;
  1221. }
  1222. }
  1223. while (++index < length) {
  1224. data = matchData[index];
  1225. var key = data[0],
  1226. objValue = object[key],
  1227. srcValue = data[1];
  1228. if (noCustomizer && data[2]) {
  1229. if (objValue === undefined && !(key in object)) {
  1230. return false;
  1231. }
  1232. } else {
  1233. var result = customizer ? customizer(objValue, srcValue, key) : undefined;
  1234. if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
  1235. return false;
  1236. }
  1237. }
  1238. }
  1239. return true;
  1240. }
  1241. /**
  1242. * The base implementation of `_.matches` which does not clone `source`.
  1243. *
  1244. * @private
  1245. * @param {Object} source The object of property values to match.
  1246. * @returns {Function} Returns the new function.
  1247. */
  1248. function baseMatches(source) {
  1249. var matchData = getMatchData(source);
  1250. if (matchData.length == 1 && matchData[0][2]) {
  1251. var key = matchData[0][0],
  1252. value = matchData[0][1];
  1253. return function(object) {
  1254. if (object == null) {
  1255. return false;
  1256. }
  1257. return object[key] === value && (value !== undefined || (key in toObject(object)));
  1258. };
  1259. }
  1260. return function(object) {
  1261. return baseIsMatch(object, matchData);
  1262. };
  1263. }
  1264. /**
  1265. * The base implementation of `_.matchesProperty` which does not clone `srcValue`.
  1266. *
  1267. * @private
  1268. * @param {string} path The path of the property to get.
  1269. * @param {*} srcValue The value to compare.
  1270. * @returns {Function} Returns the new function.
  1271. */
  1272. function baseMatchesProperty(path, srcValue) {
  1273. var isArr = isArray(path),
  1274. isCommon = isKey(path) && isStrictComparable(srcValue),
  1275. pathKey = (path + '');
  1276. path = toPath(path);
  1277. return function(object) {
  1278. if (object == null) {
  1279. return false;
  1280. }
  1281. var key = pathKey;
  1282. object = toObject(object);
  1283. if ((isArr || !isCommon) && !(key in object)) {
  1284. object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
  1285. if (object == null) {
  1286. return false;
  1287. }
  1288. key = last(path);
  1289. object = toObject(object);
  1290. }
  1291. return object[key] === srcValue
  1292. ? (srcValue !== undefined || (key in object))
  1293. : baseIsEqual(srcValue, object[key], undefined, true);
  1294. };
  1295. }
  1296. /**
  1297. * The base implementation of `_.property` without support for deep paths.
  1298. *
  1299. * @private
  1300. * @param {string} key The key of the property to get.
  1301. * @returns {Function} Returns the new function.
  1302. */
  1303. function baseProperty(key) {
  1304. return function(object) {
  1305. return object == null ? undefined : object[key];
  1306. };
  1307. }
  1308. /**
  1309. * A specialized version of `baseProperty` which supports deep paths.
  1310. *
  1311. * @private
  1312. * @param {Array|string} path The path of the property to get.
  1313. * @returns {Function} Returns the new function.
  1314. */
  1315. function basePropertyDeep(path) {
  1316. var pathKey = (path + '');
  1317. path = toPath(path);
  1318. return function(object) {
  1319. return baseGet(object, path, pathKey);
  1320. };
  1321. }
  1322. /**
  1323. * The base implementation of `_.slice` without an iteratee call guard.
  1324. *
  1325. * @private
  1326. * @param {Array} array The array to slice.
  1327. * @param {number} [start=0] The start position.
  1328. * @param {number} [end=array.length] The end position.
  1329. * @returns {Array} Returns the slice of `array`.
  1330. */
  1331. function baseSlice(array, start, end) {
  1332. var index = -1,
  1333. length = array.length;
  1334. start = start == null ? 0 : (+start || 0);
  1335. if (start < 0) {
  1336. start = -start > length ? 0 : (length + start);
  1337. }
  1338. end = (end === undefined || end > length) ? length : (+end || 0);
  1339. if (end < 0) {
  1340. end += length;
  1341. }
  1342. length = start > end ? 0 : ((end - start) >>> 0);
  1343. start >>>= 0;
  1344. var result = Array(length);
  1345. while (++index < length) {
  1346. result[index] = array[index + start];
  1347. }
  1348. return result;
  1349. }
  1350. /**
  1351. * Gets the propery names, values, and compare flags of `object`.
  1352. *
  1353. * @private
  1354. * @param {Object} object The object to query.
  1355. * @returns {Array} Returns the match data of `object`.
  1356. */
  1357. function getMatchData(object) {
  1358. var result = pairs(object),
  1359. length = result.length;
  1360. while (length--) {
  1361. result[length][2] = isStrictComparable(result[length][1]);
  1362. }
  1363. return result;
  1364. }
  1365. /**
  1366. * Checks if `value` is a property name and not a property path.
  1367. *
  1368. * @private
  1369. * @param {*} value The value to check.
  1370. * @param {Object} [object] The object to query keys on.
  1371. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  1372. */
  1373. function isKey(value, object) {
  1374. var type = typeof value;
  1375. if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
  1376. return true;
  1377. }
  1378. if (isArray(value)) {
  1379. return false;
  1380. }
  1381. var result = !reIsDeepProp.test(value);
  1382. return result || (object != null && value in toObject(object));
  1383. }
  1384. /**
  1385. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  1386. *
  1387. * @private
  1388. * @param {*} value The value to check.
  1389. * @returns {boolean} Returns `true` if `value` if suitable for strict
  1390. * equality comparisons, else `false`.
  1391. */
  1392. function isStrictComparable(value) {
  1393. return value === value && !isObject(value);
  1394. }
  1395. /**
  1396. * Converts `value` to an object if it's not one.
  1397. *
  1398. * @private
  1399. * @param {*} value The value to process.
  1400. * @returns {Object} Returns the object.
  1401. */
  1402. function toObject(value) {
  1403. return isObject(value) ? value : Object(value);
  1404. }
  1405. /**
  1406. * Converts `value` to property path array if it's not one.
  1407. *
  1408. * @private
  1409. * @param {*} value The value to process.
  1410. * @returns {Array} Returns the property path array.
  1411. */
  1412. function toPath(value) {
  1413. if (isArray(value)) {
  1414. return value;
  1415. }
  1416. var result = [];
  1417. baseToString(value).replace(rePropName, function(match, number, quote, string) {
  1418. result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
  1419. });
  1420. return result;
  1421. }
  1422. /**
  1423. * Gets the last element of `array`.
  1424. *
  1425. * @static
  1426. * @memberOf _
  1427. * @category Array
  1428. * @param {Array} array The array to query.
  1429. * @returns {*} Returns the last element of `array`.
  1430. * @example
  1431. *
  1432. * _.last([1, 2, 3]);
  1433. * // => 3
  1434. */
  1435. function last(array) {
  1436. var length = array ? array.length : 0;
  1437. return length ? array[length - 1] : undefined;
  1438. }
  1439. /**
  1440. * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
  1441. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  1442. *
  1443. * @static
  1444. * @memberOf _
  1445. * @category Lang
  1446. * @param {*} value The value to check.
  1447. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  1448. * @example
  1449. *
  1450. * _.isObject({});
  1451. * // => true
  1452. *
  1453. * _.isObject([1, 2, 3]);
  1454. * // => true
  1455. *
  1456. * _.isObject(1);
  1457. * // => false
  1458. */
  1459. function isObject(value) {
  1460. // Avoid a V8 JIT bug in Chrome 19-20.
  1461. // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
  1462. var type = typeof value;
  1463. return !!value && (type == 'object' || type == 'function');
  1464. }
  1465. /**
  1466. * This method returns the first argument provided to it.
  1467. *
  1468. * @static
  1469. * @memberOf _
  1470. * @category Utility
  1471. * @param {*} value Any value.
  1472. * @returns {*} Returns `value`.
  1473. * @example
  1474. *
  1475. * var object = { 'user': 'fred' };
  1476. *
  1477. * _.identity(object) === object;
  1478. * // => true
  1479. */
  1480. function identity(value) {
  1481. return value;
  1482. }
  1483. /**
  1484. * Creates a function that returns the property value at `path` on a
  1485. * given object.
  1486. *
  1487. * @static
  1488. * @memberOf _
  1489. * @category Utility
  1490. * @param {Array|string} path The path of the property to get.
  1491. * @returns {Function} Returns the new function.
  1492. * @example
  1493. *
  1494. * var objects = [
  1495. * { 'a': { 'b': { 'c': 2 } } },
  1496. * { 'a': { 'b': { 'c': 1 } } }
  1497. * ];
  1498. *
  1499. * _.map(objects, _.property('a.b.c'));
  1500. * // => [2, 1]
  1501. *
  1502. * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
  1503. * // => [1, 2]
  1504. */
  1505. function property(path) {
  1506. return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
  1507. }
  1508. module.exports = baseCallback;
  1509. },{"lodash._baseisequal":15,"lodash._bindcallback":20,"lodash.isarray":32,"lodash.pairs":21}],15:[function(require,module,exports){
  1510. /**
  1511. * lodash 3.0.7 (Custom Build) <https://lodash.com/>
  1512. * Build: `lodash modern modularize exports="npm" -o ./`
  1513. * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
  1514. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1515. * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1516. * Available under MIT license <https://lodash.com/license>
  1517. */
  1518. var isArray = require('lodash.isarray'),
  1519. isTypedArray = require('lodash.istypedarray'),
  1520. keys = require('lodash.keys');
  1521. /** `Object#toString` result references. */
  1522. var argsTag = '[object Arguments]',
  1523. arrayTag = '[object Array]',
  1524. boolTag = '[object Boolean]',
  1525. dateTag = '[object Date]',
  1526. errorTag = '[object Error]',
  1527. numberTag = '[object Number]',
  1528. objectTag = '[object Object]',
  1529. regexpTag = '[object RegExp]',
  1530. stringTag = '[object String]';
  1531. /**
  1532. * Checks if `value` is object-like.
  1533. *
  1534. * @private
  1535. * @param {*} value The value to check.
  1536. * @returns {boolean} Returns `true` if `value` is objec