CheckChangelogFromGithubRelease

Check ChangeLog from Github Relase page.

当前为 2014-06-19 提交的版本,查看 最新版本

  1. (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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.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. // ==UserScript==
  3. // @name CheckChangelogFromGithubRelease
  4. // @namespace http://efcl.info/
  5. // @description Check ChangeLog from Github Relase page.
  6. // @license MIT
  7. // @include https://github.com/*/*/releases/tag/*
  8. // @version 1
  9. // ==/UserScript==
  10. "use strict";
  11. var githubAPI = require("./lib/github_api");
  12. var githubDOM = require("./lib/github_dom");
  13. var searcher = require("./lib/seacher");
  14. var injector = require("./lib/injector");
  15. var treePromise = new Promise(function (resolve, reject) {
  16. githubAPI.getTree({
  17. "owner": githubDOM.getOwner(),
  18. "name": githubDOM.getRepoName(),
  19. "sha": githubDOM.getSha()
  20. }, function (error, res) {
  21. if (error) {
  22. reject(error);
  23. } else {
  24. resolve(res);
  25. }
  26. })
  27. });
  28.  
  29. treePromise.then(JSON.parse)
  30. .then(searcher.findChangeLogInTrees)
  31. .then(function (result) {
  32. if (!result) {
  33. return Promise.reject(new Error("Not found CHANGELOG in Repogitory."));
  34. }
  35. injector.injectChangelogLink(result.path);
  36. })
  37. .catch(function (error) {
  38. console.error(error);
  39. });
  40.  
  41.  
  42. },{"./lib/github_api":2,"./lib/github_dom":3,"./lib/injector":4,"./lib/seacher":5}],2:[function(require,module,exports){
  43. /**
  44. * Created by azu on 2014/06/18.
  45. * LICENSE : MIT
  46. */
  47. "use strict";
  48. // http://developer.github.com/v3/git/trees/
  49. // GET /repos/:owner/:repo/git/trees/:sha
  50. function getTree(repoObject, callback) {
  51. var owner = repoObject.owner,
  52. repoName = repoObject.name,
  53. sha = repoObject.sha;
  54. var treeAPI = "https://api.github.com/repos/" + owner + "/" + repoName + "/git/trees/" + sha;
  55. GM_xmlhttpRequest({
  56. method: "GET",
  57. url: treeAPI,
  58. onload: function (res) {
  59. callback(null, res.responseText);
  60. },
  61. onerror: function (res) {
  62. callback(res);
  63. }
  64. });
  65. }
  66.  
  67. function getFileRawContent(url, callback) {
  68. // http://swanson.github.com/blog/2011/07/09/digging-around-the-github-v3-api.html
  69. GM_xmlhttpRequest({
  70. method: "GET",
  71. url: url,
  72. headers: {"Accept": "application/vnd.github-blob.raw"},
  73. onload: function (res) {
  74. callback(null, res.responseText);
  75. },
  76. onerror: function (res) {
  77. callback(res);
  78. }
  79. });
  80. }
  81. module.exports = {
  82. getTree: getTree,
  83. getFileRawContent: getFileRawContent
  84. };
  85. },{}],3:[function(require,module,exports){
  86. /**
  87. * Created by azu on 2014/06/18.
  88. * LICENSE : MIT
  89. */
  90. "use strict";
  91. var commandBar = document.getElementById("js-command-bar-field");
  92. function getOwner() {
  93. var owner = commandBar.dataset.repo.split("/").shift();
  94. return owner
  95. }
  96. function getSha() {
  97. return commandBar.dataset.sha;
  98. }
  99. function getRepoName() {
  100. var repo = commandBar.dataset.repo.split("/").pop()
  101. return repo;
  102. }
  103. function getRepo() {
  104. return commandBar.dataset.repo;
  105. }
  106. function getBranch() {
  107. return commandBar.dataset.branch;
  108. }
  109. module.exports = {
  110. getRepoName: getRepoName,
  111. getSha: getSha,
  112. getOwner: getOwner,
  113. getRepo: getRepo,
  114. getBranch: getBranch
  115. };
  116. },{}],4:[function(require,module,exports){
  117. /**
  118. * Created by azu on 2014/06/18.
  119. * LICENSE : MIT
  120. */
  121. "use strict";
  122. var releaseMeta = document.querySelector(".release-meta");
  123. var githubDOM = require("./github_dom");
  124. const GITHUBDOMAIN = "https://github.com/";
  125. function injectChangelogLink(filePath) {
  126. var span = document.createElement("span");
  127. var a = document.createElement("a");
  128. a.href = GITHUBDOMAIN + githubDOM.getRepo() + "/blob/"+ githubDOM.getBranch() + "/" + filePath;
  129. a.textContent = "CHANGELOG FILE";
  130. span.appendChild(a);
  131. releaseMeta.appendChild(span);
  132. }
  133.  
  134. module.exports = {
  135. injectChangelogLink: injectChangelogLink
  136. }
  137. },{"./github_dom":3}],5:[function(require,module,exports){
  138. /**
  139. * Created by azu on 2014/06/18.
  140. * LICENSE : MIT
  141. */
  142. "use strict";
  143. var find = require("lodash.find");
  144. function findChangeLogInTrees(trees) {
  145. if (typeof trees !== "object") {
  146. throw new Error("trees is not object");
  147. }
  148. var tree = trees["tree"];
  149. var result = find(tree, function (object) {
  150. return /(^changelog|^history)/i.test(object.path);
  151. });
  152. return result;
  153. }
  154. module.exports = {
  155. findChangeLogInTrees: findChangeLogInTrees
  156. };
  157. },{"lodash.find":6}],6:[function(require,module,exports){
  158. /**
  159. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  160. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  161. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  162. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  163. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  164. * Available under MIT license <http://lodash.com/license>
  165. */
  166. var createCallback = require('lodash.createcallback'),
  167. forOwn = require('lodash.forown');
  168.  
  169. /**
  170. * Iterates over elements of a collection, returning the first element that
  171. * the callback returns truey for. The callback is bound to `thisArg` and
  172. * invoked with three arguments; (value, index|key, collection).
  173. *
  174. * If a property name is provided for `callback` the created "_.pluck" style
  175. * callback will return the property value of the given element.
  176. *
  177. * If an object is provided for `callback` the created "_.where" style callback
  178. * will return `true` for elements that have the properties of the given object,
  179. * else `false`.
  180. *
  181. * @static
  182. * @memberOf _
  183. * @alias detect, findWhere
  184. * @category Collections
  185. * @param {Array|Object|string} collection The collection to iterate over.
  186. * @param {Function|Object|string} [callback=identity] The function called
  187. * per iteration. If a property name or object is provided it will be used
  188. * to create a "_.pluck" or "_.where" style callback, respectively.
  189. * @param {*} [thisArg] The `this` binding of `callback`.
  190. * @returns {*} Returns the found element, else `undefined`.
  191. * @example
  192. *
  193. * var characters = [
  194. * { 'name': 'barney', 'age': 36, 'blocked': false },
  195. * { 'name': 'fred', 'age': 40, 'blocked': true },
  196. * { 'name': 'pebbles', 'age': 1, 'blocked': false }
  197. * ];
  198. *
  199. * _.find(characters, function(chr) {
  200. * return chr.age < 40;
  201. * });
  202. * // => { 'name': 'barney', 'age': 36, 'blocked': false }
  203. *
  204. * // using "_.where" callback shorthand
  205. * _.find(characters, { 'age': 1 });
  206. * // => { 'name': 'pebbles', 'age': 1, 'blocked': false }
  207. *
  208. * // using "_.pluck" callback shorthand
  209. * _.find(characters, 'blocked');
  210. * // => { 'name': 'fred', 'age': 40, 'blocked': true }
  211. */
  212. function find(collection, callback, thisArg) {
  213. callback = createCallback(callback, thisArg, 3);
  214.  
  215. var index = -1,
  216. length = collection ? collection.length : 0;
  217.  
  218. if (typeof length == 'number') {
  219. while (++index < length) {
  220. var value = collection[index];
  221. if (callback(value, index, collection)) {
  222. return value;
  223. }
  224. }
  225. } else {
  226. var result;
  227. forOwn(collection, function(value, index, collection) {
  228. if (callback(value, index, collection)) {
  229. result = value;
  230. return false;
  231. }
  232. });
  233. return result;
  234. }
  235. }
  236.  
  237. module.exports = find;
  238.  
  239. },{"lodash.createcallback":7,"lodash.forown":43}],7:[function(require,module,exports){
  240. /**
  241. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  242. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  243. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  244. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  245. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  246. * Available under MIT license <http://lodash.com/license>
  247. */
  248. var baseCreateCallback = require('lodash._basecreatecallback'),
  249. baseIsEqual = require('lodash._baseisequal'),
  250. isObject = require('lodash.isobject'),
  251. keys = require('lodash.keys'),
  252. property = require('lodash.property');
  253.  
  254. /**
  255. * Produces a callback bound to an optional `thisArg`. If `func` is a property
  256. * name the created callback will return the property value for a given element.
  257. * If `func` is an object the created callback will return `true` for elements
  258. * that contain the equivalent object properties, otherwise it will return `false`.
  259. *
  260. * @static
  261. * @memberOf _
  262. * @category Utilities
  263. * @param {*} [func=identity] The value to convert to a callback.
  264. * @param {*} [thisArg] The `this` binding of the created callback.
  265. * @param {number} [argCount] The number of arguments the callback accepts.
  266. * @returns {Function} Returns a callback function.
  267. * @example
  268. *
  269. * var characters = [
  270. * { 'name': 'barney', 'age': 36 },
  271. * { 'name': 'fred', 'age': 40 }
  272. * ];
  273. *
  274. * // wrap to create custom callback shorthands
  275. * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) {
  276. * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback);
  277. * return !match ? func(callback, thisArg) : function(object) {
  278. * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3];
  279. * };
  280. * });
  281. *
  282. * _.filter(characters, 'age__gt38');
  283. * // => [{ 'name': 'fred', 'age': 40 }]
  284. */
  285. function createCallback(func, thisArg, argCount) {
  286. var type = typeof func;
  287. if (func == null || type == 'function') {
  288. return baseCreateCallback(func, thisArg, argCount);
  289. }
  290. // handle "_.pluck" style callback shorthands
  291. if (type != 'object') {
  292. return property(func);
  293. }
  294. var props = keys(func),
  295. key = props[0],
  296. a = func[key];
  297.  
  298. // handle "_.where" style callback shorthands
  299. if (props.length == 1 && a === a && !isObject(a)) {
  300. // fast path the common case of providing an object with a single
  301. // property containing a primitive value
  302. return function(object) {
  303. var b = object[key];
  304. return a === b && (a !== 0 || (1 / a == 1 / b));
  305. };
  306. }
  307. return function(object) {
  308. var length = props.length,
  309. result = false;
  310.  
  311. while (length--) {
  312. if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) {
  313. break;
  314. }
  315. }
  316. return result;
  317. };
  318. }
  319.  
  320. module.exports = createCallback;
  321.  
  322. },{"lodash._basecreatecallback":8,"lodash._baseisequal":27,"lodash.isobject":36,"lodash.keys":38,"lodash.property":42}],8:[function(require,module,exports){
  323. /**
  324. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  325. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  326. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  327. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  328. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  329. * Available under MIT license <http://lodash.com/license>
  330. */
  331. var bind = require('lodash.bind'),
  332. identity = require('lodash.identity'),
  333. setBindData = require('lodash._setbinddata'),
  334. support = require('lodash.support');
  335.  
  336. /** Used to detected named functions */
  337. var reFuncName = /^\s*function[ \n\r\t]+\w/;
  338.  
  339. /** Used to detect functions containing a `this` reference */
  340. var reThis = /\bthis\b/;
  341.  
  342. /** Native method shortcuts */
  343. var fnToString = Function.prototype.toString;
  344.  
  345. /**
  346. * The base implementation of `_.createCallback` without support for creating
  347. * "_.pluck" or "_.where" style callbacks.
  348. *
  349. * @private
  350. * @param {*} [func=identity] The value to convert to a callback.
  351. * @param {*} [thisArg] The `this` binding of the created callback.
  352. * @param {number} [argCount] The number of arguments the callback accepts.
  353. * @returns {Function} Returns a callback function.
  354. */
  355. function baseCreateCallback(func, thisArg, argCount) {
  356. if (typeof func != 'function') {
  357. return identity;
  358. }
  359. // exit early for no `thisArg` or already bound by `Function#bind`
  360. if (typeof thisArg == 'undefined' || !('prototype' in func)) {
  361. return func;
  362. }
  363. var bindData = func.__bindData__;
  364. if (typeof bindData == 'undefined') {
  365. if (support.funcNames) {
  366. bindData = !func.name;
  367. }
  368. bindData = bindData || !support.funcDecomp;
  369. if (!bindData) {
  370. var source = fnToString.call(func);
  371. if (!support.funcNames) {
  372. bindData = !reFuncName.test(source);
  373. }
  374. if (!bindData) {
  375. // checks if `func` references the `this` keyword and stores the result
  376. bindData = reThis.test(source);
  377. setBindData(func, bindData);
  378. }
  379. }
  380. }
  381. // exit early if there are no `this` references or `func` is bound
  382. if (bindData === false || (bindData !== true && bindData[1] & 1)) {
  383. return func;
  384. }
  385. switch (argCount) {
  386. case 1: return function(value) {
  387. return func.call(thisArg, value);
  388. };
  389. case 2: return function(a, b) {
  390. return func.call(thisArg, a, b);
  391. };
  392. case 3: return function(value, index, collection) {
  393. return func.call(thisArg, value, index, collection);
  394. };
  395. case 4: return function(accumulator, value, index, collection) {
  396. return func.call(thisArg, accumulator, value, index, collection);
  397. };
  398. }
  399. return bind(func, thisArg);
  400. }
  401.  
  402. module.exports = baseCreateCallback;
  403.  
  404. },{"lodash._setbinddata":9,"lodash.bind":12,"lodash.identity":24,"lodash.support":25}],9:[function(require,module,exports){
  405. /**
  406. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  407. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  408. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  409. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  410. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  411. * Available under MIT license <http://lodash.com/license>
  412. */
  413. var isNative = require('lodash._isnative'),
  414. noop = require('lodash.noop');
  415.  
  416. /** Used as the property descriptor for `__bindData__` */
  417. var descriptor = {
  418. 'configurable': false,
  419. 'enumerable': false,
  420. 'value': null,
  421. 'writable': false
  422. };
  423.  
  424. /** Used to set meta data on functions */
  425. var defineProperty = (function() {
  426. // IE 8 only accepts DOM elements
  427. try {
  428. var o = {},
  429. func = isNative(func = Object.defineProperty) && func,
  430. result = func(o, o, o) && func;
  431. } catch(e) { }
  432. return result;
  433. }());
  434.  
  435. /**
  436. * Sets `this` binding data on a given function.
  437. *
  438. * @private
  439. * @param {Function} func The function to set data on.
  440. * @param {Array} value The data array to set.
  441. */
  442. var setBindData = !defineProperty ? noop : function(func, value) {
  443. descriptor.value = value;
  444. defineProperty(func, '__bindData__', descriptor);
  445. };
  446.  
  447. module.exports = setBindData;
  448.  
  449. },{"lodash._isnative":10,"lodash.noop":11}],10:[function(require,module,exports){
  450. /**
  451. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  452. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  453. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  454. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  455. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  456. * Available under MIT license <http://lodash.com/license>
  457. */
  458.  
  459. /** Used for native method references */
  460. var objectProto = Object.prototype;
  461.  
  462. /** Used to resolve the internal [[Class]] of values */
  463. var toString = objectProto.toString;
  464.  
  465. /** Used to detect if a method is native */
  466. var reNative = RegExp('^' +
  467. String(toString)
  468. .replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
  469. .replace(/toString| for [^\]]+/g, '.*?') + '$'
  470. );
  471.  
  472. /**
  473. * Checks if `value` is a native function.
  474. *
  475. * @private
  476. * @param {*} value The value to check.
  477. * @returns {boolean} Returns `true` if the `value` is a native function, else `false`.
  478. */
  479. function isNative(value) {
  480. return typeof value == 'function' && reNative.test(value);
  481. }
  482.  
  483. module.exports = isNative;
  484.  
  485. },{}],11:[function(require,module,exports){
  486. /**
  487. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  488. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  489. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  490. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  491. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  492. * Available under MIT license <http://lodash.com/license>
  493. */
  494.  
  495. /**
  496. * A no-operation function.
  497. *
  498. * @static
  499. * @memberOf _
  500. * @category Utilities
  501. * @example
  502. *
  503. * var object = { 'name': 'fred' };
  504. * _.noop(object) === undefined;
  505. * // => true
  506. */
  507. function noop() {
  508. // no operation performed
  509. }
  510.  
  511. module.exports = noop;
  512.  
  513. },{}],12:[function(require,module,exports){
  514. /**
  515. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  516. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  517. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  518. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  519. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  520. * Available under MIT license <http://lodash.com/license>
  521. */
  522. var createWrapper = require('lodash._createwrapper'),
  523. slice = require('lodash._slice');
  524.  
  525. /**
  526. * Creates a function that, when called, invokes `func` with the `this`
  527. * binding of `thisArg` and prepends any additional `bind` arguments to those
  528. * provided to the bound function.
  529. *
  530. * @static
  531. * @memberOf _
  532. * @category Functions
  533. * @param {Function} func The function to bind.
  534. * @param {*} [thisArg] The `this` binding of `func`.
  535. * @param {...*} [arg] Arguments to be partially applied.
  536. * @returns {Function} Returns the new bound function.
  537. * @example
  538. *
  539. * var func = function(greeting) {
  540. * return greeting + ' ' + this.name;
  541. * };
  542. *
  543. * func = _.bind(func, { 'name': 'fred' }, 'hi');
  544. * func();
  545. * // => 'hi fred'
  546. */
  547. function bind(func, thisArg) {
  548. return arguments.length > 2
  549. ? createWrapper(func, 17, slice(arguments, 2), null, thisArg)
  550. : createWrapper(func, 1, null, null, thisArg);
  551. }
  552.  
  553. module.exports = bind;
  554.  
  555. },{"lodash._createwrapper":13,"lodash._slice":23}],13:[function(require,module,exports){
  556. /**
  557. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  558. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  559. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  560. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  561. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  562. * Available under MIT license <http://lodash.com/license>
  563. */
  564. var baseBind = require('lodash._basebind'),
  565. baseCreateWrapper = require('lodash._basecreatewrapper'),
  566. isFunction = require('lodash.isfunction'),
  567. slice = require('lodash._slice');
  568.  
  569. /**
  570. * Used for `Array` method references.
  571. *
  572. * Normally `Array.prototype` would suffice, however, using an array literal
  573. * avoids issues in Narwhal.
  574. */
  575. var arrayRef = [];
  576.  
  577. /** Native method shortcuts */
  578. var push = arrayRef.push,
  579. unshift = arrayRef.unshift;
  580.  
  581. /**
  582. * Creates a function that, when called, either curries or invokes `func`
  583. * with an optional `this` binding and partially applied arguments.
  584. *
  585. * @private
  586. * @param {Function|string} func The function or method name to reference.
  587. * @param {number} bitmask The bitmask of method flags to compose.
  588. * The bitmask may be composed of the following flags:
  589. * 1 - `_.bind`
  590. * 2 - `_.bindKey`
  591. * 4 - `_.curry`
  592. * 8 - `_.curry` (bound)
  593. * 16 - `_.partial`
  594. * 32 - `_.partialRight`
  595. * @param {Array} [partialArgs] An array of arguments to prepend to those
  596. * provided to the new function.
  597. * @param {Array} [partialRightArgs] An array of arguments to append to those
  598. * provided to the new function.
  599. * @param {*} [thisArg] The `this` binding of `func`.
  600. * @param {number} [arity] The arity of `func`.
  601. * @returns {Function} Returns the new function.
  602. */
  603. function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, arity) {
  604. var isBind = bitmask & 1,
  605. isBindKey = bitmask & 2,
  606. isCurry = bitmask & 4,
  607. isCurryBound = bitmask & 8,
  608. isPartial = bitmask & 16,
  609. isPartialRight = bitmask & 32;
  610.  
  611. if (!isBindKey && !isFunction(func)) {
  612. throw new TypeError;
  613. }
  614. if (isPartial && !partialArgs.length) {
  615. bitmask &= ~16;
  616. isPartial = partialArgs = false;
  617. }
  618. if (isPartialRight && !partialRightArgs.length) {
  619. bitmask &= ~32;
  620. isPartialRight = partialRightArgs = false;
  621. }
  622. var bindData = func && func.__bindData__;
  623. if (bindData && bindData !== true) {
  624. // clone `bindData`
  625. bindData = slice(bindData);
  626. if (bindData[2]) {
  627. bindData[2] = slice(bindData[2]);
  628. }
  629. if (bindData[3]) {
  630. bindData[3] = slice(bindData[3]);
  631. }
  632. // set `thisBinding` is not previously bound
  633. if (isBind && !(bindData[1] & 1)) {
  634. bindData[4] = thisArg;
  635. }
  636. // set if previously bound but not currently (subsequent curried functions)
  637. if (!isBind && bindData[1] & 1) {
  638. bitmask |= 8;
  639. }
  640. // set curried arity if not yet set
  641. if (isCurry && !(bindData[1] & 4)) {
  642. bindData[5] = arity;
  643. }
  644. // append partial left arguments
  645. if (isPartial) {
  646. push.apply(bindData[2] || (bindData[2] = []), partialArgs);
  647. }
  648. // append partial right arguments
  649. if (isPartialRight) {
  650. unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
  651. }
  652. // merge flags
  653. bindData[1] |= bitmask;
  654. return createWrapper.apply(null, bindData);
  655. }
  656. // fast path for `_.bind`
  657. var creater = (bitmask == 1 || bitmask === 17) ? baseBind : baseCreateWrapper;
  658. return creater([func, bitmask, partialArgs, partialRightArgs, thisArg, arity]);
  659. }
  660.  
  661. module.exports = createWrapper;
  662.  
  663. },{"lodash._basebind":14,"lodash._basecreatewrapper":18,"lodash._slice":23,"lodash.isfunction":22}],14:[function(require,module,exports){
  664. /**
  665. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  666. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  667. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  668. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  669. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  670. * Available under MIT license <http://lodash.com/license>
  671. */
  672. var baseCreate = require('lodash._basecreate'),
  673. isObject = require('lodash.isobject'),
  674. setBindData = require('lodash._setbinddata'),
  675. slice = require('lodash._slice');
  676.  
  677. /**
  678. * Used for `Array` method references.
  679. *
  680. * Normally `Array.prototype` would suffice, however, using an array literal
  681. * avoids issues in Narwhal.
  682. */
  683. var arrayRef = [];
  684.  
  685. /** Native method shortcuts */
  686. var push = arrayRef.push;
  687.  
  688. /**
  689. * The base implementation of `_.bind` that creates the bound function and
  690. * sets its meta data.
  691. *
  692. * @private
  693. * @param {Array} bindData The bind data array.
  694. * @returns {Function} Returns the new bound function.
  695. */
  696. function baseBind(bindData) {
  697. var func = bindData[0],
  698. partialArgs = bindData[2],
  699. thisArg = bindData[4];
  700.  
  701. function bound() {
  702. // `Function#bind` spec
  703. // http://es5.github.io/#x15.3.4.5
  704. if (partialArgs) {
  705. // avoid `arguments` object deoptimizations by using `slice` instead
  706. // of `Array.prototype.slice.call` and not assigning `arguments` to a
  707. // variable as a ternary expression
  708. var args = slice(partialArgs);
  709. push.apply(args, arguments);
  710. }
  711. // mimic the constructor's `return` behavior
  712. // http://es5.github.io/#x13.2.2
  713. if (this instanceof bound) {
  714. // ensure `new bound` is an instance of `func`
  715. var thisBinding = baseCreate(func.prototype),
  716. result = func.apply(thisBinding, args || arguments);
  717. return isObject(result) ? result : thisBinding;
  718. }
  719. return func.apply(thisArg, args || arguments);
  720. }
  721. setBindData(bound, bindData);
  722. return bound;
  723. }
  724.  
  725. module.exports = baseBind;
  726.  
  727. },{"lodash._basecreate":15,"lodash._setbinddata":9,"lodash._slice":23,"lodash.isobject":36}],15:[function(require,module,exports){
  728. (function (global){
  729. /**
  730. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  731. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  732. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  733. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  734. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  735. * Available under MIT license <http://lodash.com/license>
  736. */
  737. var isNative = require('lodash._isnative'),
  738. isObject = require('lodash.isobject'),
  739. noop = require('lodash.noop');
  740.  
  741. /* Native method shortcuts for methods with the same name as other `lodash` methods */
  742. var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate;
  743.  
  744. /**
  745. * The base implementation of `_.create` without support for assigning
  746. * properties to the created object.
  747. *
  748. * @private
  749. * @param {Object} prototype The object to inherit from.
  750. * @returns {Object} Returns the new object.
  751. */
  752. function baseCreate(prototype, properties) {
  753. return isObject(prototype) ? nativeCreate(prototype) : {};
  754. }
  755. // fallback for browsers without `Object.create`
  756. if (!nativeCreate) {
  757. baseCreate = (function() {
  758. function Object() {}
  759. return function(prototype) {
  760. if (isObject(prototype)) {
  761. Object.prototype = prototype;
  762. var result = new Object;
  763. Object.prototype = null;
  764. }
  765. return result || global.Object();
  766. };
  767. }());
  768. }
  769.  
  770. module.exports = baseCreate;
  771.  
  772. }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  773. },{"lodash._isnative":16,"lodash.isobject":36,"lodash.noop":17}],16:[function(require,module,exports){
  774. module.exports=require(10)
  775. },{}],17:[function(require,module,exports){
  776. module.exports=require(11)
  777. },{}],18:[function(require,module,exports){
  778. /**
  779. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  780. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  781. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  782. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  783. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  784. * Available under MIT license <http://lodash.com/license>
  785. */
  786. var baseCreate = require('lodash._basecreate'),
  787. isObject = require('lodash.isobject'),
  788. setBindData = require('lodash._setbinddata'),
  789. slice = require('lodash._slice');
  790.  
  791. /**
  792. * Used for `Array` method references.
  793. *
  794. * Normally `Array.prototype` would suffice, however, using an array literal
  795. * avoids issues in Narwhal.
  796. */
  797. var arrayRef = [];
  798.  
  799. /** Native method shortcuts */
  800. var push = arrayRef.push;
  801.  
  802. /**
  803. * The base implementation of `createWrapper` that creates the wrapper and
  804. * sets its meta data.
  805. *
  806. * @private
  807. * @param {Array} bindData The bind data array.
  808. * @returns {Function} Returns the new function.
  809. */
  810. function baseCreateWrapper(bindData) {
  811. var func = bindData[0],
  812. bitmask = bindData[1],
  813. partialArgs = bindData[2],
  814. partialRightArgs = bindData[3],
  815. thisArg = bindData[4],
  816. arity = bindData[5];
  817.  
  818. var isBind = bitmask & 1,
  819. isBindKey = bitmask & 2,
  820. isCurry = bitmask & 4,
  821. isCurryBound = bitmask & 8,
  822. key = func;
  823.  
  824. function bound() {
  825. var thisBinding = isBind ? thisArg : this;
  826. if (partialArgs) {
  827. var args = slice(partialArgs);
  828. push.apply(args, arguments);
  829. }
  830. if (partialRightArgs || isCurry) {
  831. args || (args = slice(arguments));
  832. if (partialRightArgs) {
  833. push.apply(args, partialRightArgs);
  834. }
  835. if (isCurry && args.length < arity) {
  836. bitmask |= 16 & ~32;
  837. return baseCreateWrapper([func, (isCurryBound ? bitmask : bitmask & ~3), args, null, thisArg, arity]);
  838. }
  839. }
  840. args || (args = arguments);
  841. if (isBindKey) {
  842. func = thisBinding[key];
  843. }
  844. if (this instanceof bound) {
  845. thisBinding = baseCreate(func.prototype);
  846. var result = func.apply(thisBinding, args);
  847. return isObject(result) ? result : thisBinding;
  848. }
  849. return func.apply(thisBinding, args);
  850. }
  851. setBindData(bound, bindData);
  852. return bound;
  853. }
  854.  
  855. module.exports = baseCreateWrapper;
  856.  
  857. },{"lodash._basecreate":19,"lodash._setbinddata":9,"lodash._slice":23,"lodash.isobject":36}],19:[function(require,module,exports){
  858. module.exports=require(15)
  859. },{"lodash._isnative":20,"lodash.isobject":36,"lodash.noop":21}],20:[function(require,module,exports){
  860. module.exports=require(10)
  861. },{}],21:[function(require,module,exports){
  862. module.exports=require(11)
  863. },{}],22:[function(require,module,exports){
  864. /**
  865. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  866. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  867. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  868. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  869. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  870. * Available under MIT license <http://lodash.com/license>
  871. */
  872.  
  873. /**
  874. * Checks if `value` is a function.
  875. *
  876. * @static
  877. * @memberOf _
  878. * @category Objects
  879. * @param {*} value The value to check.
  880. * @returns {boolean} Returns `true` if the `value` is a function, else `false`.
  881. * @example
  882. *
  883. * _.isFunction(_);
  884. * // => true
  885. */
  886. function isFunction(value) {
  887. return typeof value == 'function';
  888. }
  889.  
  890. module.exports = isFunction;
  891.  
  892. },{}],23:[function(require,module,exports){
  893. /**
  894. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  895. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  896. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  897. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  898. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  899. * Available under MIT license <http://lodash.com/license>
  900. */
  901.  
  902. /**
  903. * Slices the `collection` from the `start` index up to, but not including,
  904. * the `end` index.
  905. *
  906. * Note: This function is used instead of `Array#slice` to support node lists
  907. * in IE < 9 and to ensure dense arrays are returned.
  908. *
  909. * @private
  910. * @param {Array|Object|string} collection The collection to slice.
  911. * @param {number} start The start index.
  912. * @param {number} end The end index.
  913. * @returns {Array} Returns the new array.
  914. */
  915. function slice(array, start, end) {
  916. start || (start = 0);
  917. if (typeof end == 'undefined') {
  918. end = array ? array.length : 0;
  919. }
  920. var index = -1,
  921. length = end - start || 0,
  922. result = Array(length < 0 ? 0 : length);
  923.  
  924. while (++index < length) {
  925. result[index] = array[start + index];
  926. }
  927. return result;
  928. }
  929.  
  930. module.exports = slice;
  931.  
  932. },{}],24:[function(require,module,exports){
  933. /**
  934. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  935. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  936. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  937. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  938. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  939. * Available under MIT license <http://lodash.com/license>
  940. */
  941.  
  942. /**
  943. * This method returns the first argument provided to it.
  944. *
  945. * @static
  946. * @memberOf _
  947. * @category Utilities
  948. * @param {*} value Any value.
  949. * @returns {*} Returns `value`.
  950. * @example
  951. *
  952. * var object = { 'name': 'fred' };
  953. * _.identity(object) === object;
  954. * // => true
  955. */
  956. function identity(value) {
  957. return value;
  958. }
  959.  
  960. module.exports = identity;
  961.  
  962. },{}],25:[function(require,module,exports){
  963. (function (global){
  964. /**
  965. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  966. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  967. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  968. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  969. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  970. * Available under MIT license <http://lodash.com/license>
  971. */
  972. var isNative = require('lodash._isnative');
  973.  
  974. /** Used to detect functions containing a `this` reference */
  975. var reThis = /\bthis\b/;
  976.  
  977. /**
  978. * An object used to flag environments features.
  979. *
  980. * @static
  981. * @memberOf _
  982. * @type Object
  983. */
  984. var support = {};
  985.  
  986. /**
  987. * Detect if functions can be decompiled by `Function#toString`
  988. * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps).
  989. *
  990. * @memberOf _.support
  991. * @type boolean
  992. */
  993. support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; });
  994.  
  995. /**
  996. * Detect if `Function#name` is supported (all but IE).
  997. *
  998. * @memberOf _.support
  999. * @type boolean
  1000. */
  1001. support.funcNames = typeof Function.name == 'string';
  1002.  
  1003. module.exports = support;
  1004.  
  1005. }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  1006. },{"lodash._isnative":26}],26:[function(require,module,exports){
  1007. module.exports=require(10)
  1008. },{}],27:[function(require,module,exports){
  1009. /**
  1010. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1011. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1012. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1013. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1014. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1015. * Available under MIT license <http://lodash.com/license>
  1016. */
  1017. var forIn = require('lodash.forin'),
  1018. getArray = require('lodash._getarray'),
  1019. isFunction = require('lodash.isfunction'),
  1020. objectTypes = require('lodash._objecttypes'),
  1021. releaseArray = require('lodash._releasearray');
  1022.  
  1023. /** `Object#toString` result shortcuts */
  1024. var argsClass = '[object Arguments]',
  1025. arrayClass = '[object Array]',
  1026. boolClass = '[object Boolean]',
  1027. dateClass = '[object Date]',
  1028. numberClass = '[object Number]',
  1029. objectClass = '[object Object]',
  1030. regexpClass = '[object RegExp]',
  1031. stringClass = '[object String]';
  1032.  
  1033. /** Used for native method references */
  1034. var objectProto = Object.prototype;
  1035.  
  1036. /** Used to resolve the internal [[Class]] of values */
  1037. var toString = objectProto.toString;
  1038.  
  1039. /** Native method shortcuts */
  1040. var hasOwnProperty = objectProto.hasOwnProperty;
  1041.  
  1042. /**
  1043. * The base implementation of `_.isEqual`, without support for `thisArg` binding,
  1044. * that allows partial "_.where" style comparisons.
  1045. *
  1046. * @private
  1047. * @param {*} a The value to compare.
  1048. * @param {*} b The other value to compare.
  1049. * @param {Function} [callback] The function to customize comparing values.
  1050. * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons.
  1051. * @param {Array} [stackA=[]] Tracks traversed `a` objects.
  1052. * @param {Array} [stackB=[]] Tracks traversed `b` objects.
  1053. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  1054. */
  1055. function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
  1056. // used to indicate that when comparing objects, `a` has at least the properties of `b`
  1057. if (callback) {
  1058. var result = callback(a, b);
  1059. if (typeof result != 'undefined') {
  1060. return !!result;
  1061. }
  1062. }
  1063. // exit early for identical values
  1064. if (a === b) {
  1065. // treat `+0` vs. `-0` as not equal
  1066. return a !== 0 || (1 / a == 1 / b);
  1067. }
  1068. var type = typeof a,
  1069. otherType = typeof b;
  1070.  
  1071. // exit early for unlike primitive values
  1072. if (a === a &&
  1073. !(a && objectTypes[type]) &&
  1074. !(b && objectTypes[otherType])) {
  1075. return false;
  1076. }
  1077. // exit early for `null` and `undefined` avoiding ES3's Function#call behavior
  1078. // http://es5.github.io/#x15.3.4.4
  1079. if (a == null || b == null) {
  1080. return a === b;
  1081. }
  1082. // compare [[Class]] names
  1083. var className = toString.call(a),
  1084. otherClass = toString.call(b);
  1085.  
  1086. if (className == argsClass) {
  1087. className = objectClass;
  1088. }
  1089. if (otherClass == argsClass) {
  1090. otherClass = objectClass;
  1091. }
  1092. if (className != otherClass) {
  1093. return false;
  1094. }
  1095. switch (className) {
  1096. case boolClass:
  1097. case dateClass:
  1098. // coerce dates and booleans to numbers, dates to milliseconds and booleans
  1099. // to `1` or `0` treating invalid dates coerced to `NaN` as not equal
  1100. return +a == +b;
  1101.  
  1102. case numberClass:
  1103. // treat `NaN` vs. `NaN` as equal
  1104. return (a != +a)
  1105. ? b != +b
  1106. // but treat `+0` vs. `-0` as not equal
  1107. : (a == 0 ? (1 / a == 1 / b) : a == +b);
  1108.  
  1109. case regexpClass:
  1110. case stringClass:
  1111. // coerce regexes to strings (http://es5.github.io/#x15.10.6.4)
  1112. // treat string primitives and their corresponding object instances as equal
  1113. return a == String(b);
  1114. }
  1115. var isArr = className == arrayClass;
  1116. if (!isArr) {
  1117. // unwrap any `lodash` wrapped values
  1118. var aWrapped = hasOwnProperty.call(a, '__wrapped__'),
  1119. bWrapped = hasOwnProperty.call(b, '__wrapped__');
  1120.  
  1121. if (aWrapped || bWrapped) {
  1122. return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB);
  1123. }
  1124. // exit for functions and DOM nodes
  1125. if (className != objectClass) {
  1126. return false;
  1127. }
  1128. // in older versions of Opera, `arguments` objects have `Array` constructors
  1129. var ctorA = a.constructor,
  1130. ctorB = b.constructor;
  1131.  
  1132. // non `Object` object instances with different constructors are not equal
  1133. if (ctorA != ctorB &&
  1134. !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) &&
  1135. ('constructor' in a && 'constructor' in b)
  1136. ) {
  1137. return false;
  1138. }
  1139. }
  1140. // assume cyclic structures are equal
  1141. // the algorithm for detecting cyclic structures is adapted from ES 5.1
  1142. // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3)
  1143. var initedStack = !stackA;
  1144. stackA || (stackA = getArray());
  1145. stackB || (stackB = getArray());
  1146.  
  1147. var length = stackA.length;
  1148. while (length--) {
  1149. if (stackA[length] == a) {
  1150. return stackB[length] == b;
  1151. }
  1152. }
  1153. var size = 0;
  1154. result = true;
  1155.  
  1156. // add `a` and `b` to the stack of traversed objects
  1157. stackA.push(a);
  1158. stackB.push(b);
  1159.  
  1160. // recursively compare objects and arrays (susceptible to call stack limits)
  1161. if (isArr) {
  1162. // compare lengths to determine if a deep comparison is necessary
  1163. length = a.length;
  1164. size = b.length;
  1165. result = size == length;
  1166.  
  1167. if (result || isWhere) {
  1168. // deep compare the contents, ignoring non-numeric properties
  1169. while (size--) {
  1170. var index = length,
  1171. value = b[size];
  1172.  
  1173. if (isWhere) {
  1174. while (index--) {
  1175. if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
  1176. break;
  1177. }
  1178. }
  1179. } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
  1180. break;
  1181. }
  1182. }
  1183. }
  1184. }
  1185. else {
  1186. // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
  1187. // which, in this case, is more costly
  1188. forIn(b, function(value, key, b) {
  1189. if (hasOwnProperty.call(b, key)) {
  1190. // count the number of properties.
  1191. size++;
  1192. // deep compare each property value.
  1193. return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
  1194. }
  1195. });
  1196.  
  1197. if (result && !isWhere) {
  1198. // ensure both objects have the same number of properties
  1199. forIn(a, function(value, key, a) {
  1200. if (hasOwnProperty.call(a, key)) {
  1201. // `size` will be `-1` if `a` has more properties than `b`
  1202. return (result = --size > -1);
  1203. }
  1204. });
  1205. }
  1206. }
  1207. stackA.pop();
  1208. stackB.pop();
  1209.  
  1210. if (initedStack) {
  1211. releaseArray(stackA);
  1212. releaseArray(stackB);
  1213. }
  1214. return result;
  1215. }
  1216.  
  1217. module.exports = baseIsEqual;
  1218.  
  1219. },{"lodash._getarray":28,"lodash._objecttypes":30,"lodash._releasearray":31,"lodash.forin":34,"lodash.isfunction":35}],28:[function(require,module,exports){
  1220. /**
  1221. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1222. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1223. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1224. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1225. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1226. * Available under MIT license <http://lodash.com/license>
  1227. */
  1228. var arrayPool = require('lodash._arraypool');
  1229.  
  1230. /**
  1231. * Gets an array from the array pool or creates a new one if the pool is empty.
  1232. *
  1233. * @private
  1234. * @returns {Array} The array from the pool.
  1235. */
  1236. function getArray() {
  1237. return arrayPool.pop() || [];
  1238. }
  1239.  
  1240. module.exports = getArray;
  1241.  
  1242. },{"lodash._arraypool":29}],29:[function(require,module,exports){
  1243. /**
  1244. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1245. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1246. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1247. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1248. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1249. * Available under MIT license <http://lodash.com/license>
  1250. */
  1251.  
  1252. /** Used to pool arrays and objects used internally */
  1253. var arrayPool = [];
  1254.  
  1255. module.exports = arrayPool;
  1256.  
  1257. },{}],30:[function(require,module,exports){
  1258. /**
  1259. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1260. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1261. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1262. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1263. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1264. * Available under MIT license <http://lodash.com/license>
  1265. */
  1266.  
  1267. /** Used to determine if values are of the language type Object */
  1268. var objectTypes = {
  1269. 'boolean': false,
  1270. 'function': true,
  1271. 'object': true,
  1272. 'number': false,
  1273. 'string': false,
  1274. 'undefined': false
  1275. };
  1276.  
  1277. module.exports = objectTypes;
  1278.  
  1279. },{}],31:[function(require,module,exports){
  1280. /**
  1281. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1282. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1283. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1284. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1285. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1286. * Available under MIT license <http://lodash.com/license>
  1287. */
  1288. var arrayPool = require('lodash._arraypool'),
  1289. maxPoolSize = require('lodash._maxpoolsize');
  1290.  
  1291. /**
  1292. * Releases the given array back to the array pool.
  1293. *
  1294. * @private
  1295. * @param {Array} [array] The array to release.
  1296. */
  1297. function releaseArray(array) {
  1298. array.length = 0;
  1299. if (arrayPool.length < maxPoolSize) {
  1300. arrayPool.push(array);
  1301. }
  1302. }
  1303.  
  1304. module.exports = releaseArray;
  1305.  
  1306. },{"lodash._arraypool":32,"lodash._maxpoolsize":33}],32:[function(require,module,exports){
  1307. module.exports=require(29)
  1308. },{}],33:[function(require,module,exports){
  1309. /**
  1310. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1311. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1312. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1313. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1314. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1315. * Available under MIT license <http://lodash.com/license>
  1316. */
  1317.  
  1318. /** Used as the max size of the `arrayPool` and `objectPool` */
  1319. var maxPoolSize = 40;
  1320.  
  1321. module.exports = maxPoolSize;
  1322.  
  1323. },{}],34:[function(require,module,exports){
  1324. /**
  1325. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1326. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1327. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1328. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1329. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1330. * Available under MIT license <http://lodash.com/license>
  1331. */
  1332. var baseCreateCallback = require('lodash._basecreatecallback'),
  1333. objectTypes = require('lodash._objecttypes');
  1334.  
  1335. /**
  1336. * Iterates over own and inherited enumerable properties of an object,
  1337. * executing the callback for each property. The callback is bound to `thisArg`
  1338. * and invoked with three arguments; (value, key, object). Callbacks may exit
  1339. * iteration early by explicitly returning `false`.
  1340. *
  1341. * @static
  1342. * @memberOf _
  1343. * @type Function
  1344. * @category Objects
  1345. * @param {Object} object The object to iterate over.
  1346. * @param {Function} [callback=identity] The function called per iteration.
  1347. * @param {*} [thisArg] The `this` binding of `callback`.
  1348. * @returns {Object} Returns `object`.
  1349. * @example
  1350. *
  1351. * function Shape() {
  1352. * this.x = 0;
  1353. * this.y = 0;
  1354. * }
  1355. *
  1356. * Shape.prototype.move = function(x, y) {
  1357. * this.x += x;
  1358. * this.y += y;
  1359. * };
  1360. *
  1361. * _.forIn(new Shape, function(value, key) {
  1362. * console.log(key);
  1363. * });
  1364. * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments)
  1365. */
  1366. var forIn = function(collection, callback, thisArg) {
  1367. var index, iterable = collection, result = iterable;
  1368. if (!iterable) return result;
  1369. if (!objectTypes[typeof iterable]) return result;
  1370. callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
  1371. for (index in iterable) {
  1372. if (callback(iterable[index], index, collection) === false) return result;
  1373. }
  1374. return result
  1375. };
  1376.  
  1377. module.exports = forIn;
  1378.  
  1379. },{"lodash._basecreatecallback":8,"lodash._objecttypes":30}],35:[function(require,module,exports){
  1380. module.exports=require(22)
  1381. },{}],36:[function(require,module,exports){
  1382. /**
  1383. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1384. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1385. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1386. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1387. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1388. * Available under MIT license <http://lodash.com/license>
  1389. */
  1390. var objectTypes = require('lodash._objecttypes');
  1391.  
  1392. /**
  1393. * Checks if `value` is the language type of Object.
  1394. * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  1395. *
  1396. * @static
  1397. * @memberOf _
  1398. * @category Objects
  1399. * @param {*} value The value to check.
  1400. * @returns {boolean} Returns `true` if the `value` is an object, else `false`.
  1401. * @example
  1402. *
  1403. * _.isObject({});
  1404. * // => true
  1405. *
  1406. * _.isObject([1, 2, 3]);
  1407. * // => true
  1408. *
  1409. * _.isObject(1);
  1410. * // => false
  1411. */
  1412. function isObject(value) {
  1413. // check if the value is the ECMAScript language type of Object
  1414. // http://es5.github.io/#x8
  1415. // and avoid a V8 bug
  1416. // http://code.google.com/p/v8/issues/detail?id=2291
  1417. return !!(value && objectTypes[typeof value]);
  1418. }
  1419.  
  1420. module.exports = isObject;
  1421.  
  1422. },{"lodash._objecttypes":37}],37:[function(require,module,exports){
  1423. module.exports=require(30)
  1424. },{}],38:[function(require,module,exports){
  1425. /**
  1426. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1427. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1428. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1429. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1430. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1431. * Available under MIT license <http://lodash.com/license>
  1432. */
  1433. var isNative = require('lodash._isnative'),
  1434. isObject = require('lodash.isobject'),
  1435. shimKeys = require('lodash._shimkeys');
  1436.  
  1437. /* Native method shortcuts for methods with the same name as other `lodash` methods */
  1438. var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
  1439.  
  1440. /**
  1441. * Creates an array composed of the own enumerable property names of an object.
  1442. *
  1443. * @static
  1444. * @memberOf _
  1445. * @category Objects
  1446. * @param {Object} object The object to inspect.
  1447. * @returns {Array} Returns an array of property names.
  1448. * @example
  1449. *
  1450. * _.keys({ 'one': 1, 'two': 2, 'three': 3 });
  1451. * // => ['one', 'two', 'three'] (property order is not guaranteed across environments)
  1452. */
  1453. var keys = !nativeKeys ? shimKeys : function(object) {
  1454. if (!isObject(object)) {
  1455. return [];
  1456. }
  1457. return nativeKeys(object);
  1458. };
  1459.  
  1460. module.exports = keys;
  1461.  
  1462. },{"lodash._isnative":39,"lodash._shimkeys":40,"lodash.isobject":36}],39:[function(require,module,exports){
  1463. module.exports=require(10)
  1464. },{}],40:[function(require,module,exports){
  1465. /**
  1466. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1467. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1468. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1469. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1470. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1471. * Available under MIT license <http://lodash.com/license>
  1472. */
  1473. var objectTypes = require('lodash._objecttypes');
  1474.  
  1475. /** Used for native method references */
  1476. var objectProto = Object.prototype;
  1477.  
  1478. /** Native method shortcuts */
  1479. var hasOwnProperty = objectProto.hasOwnProperty;
  1480.  
  1481. /**
  1482. * A fallback implementation of `Object.keys` which produces an array of the
  1483. * given object's own enumerable property names.
  1484. *
  1485. * @private
  1486. * @type Function
  1487. * @param {Object} object The object to inspect.
  1488. * @returns {Array} Returns an array of property names.
  1489. */
  1490. var shimKeys = function(object) {
  1491. var index, iterable = object, result = [];
  1492. if (!iterable) return result;
  1493. if (!(objectTypes[typeof object])) return result;
  1494. for (index in iterable) {
  1495. if (hasOwnProperty.call(iterable, index)) {
  1496. result.push(index);
  1497. }
  1498. }
  1499. return result
  1500. };
  1501.  
  1502. module.exports = shimKeys;
  1503.  
  1504. },{"lodash._objecttypes":41}],41:[function(require,module,exports){
  1505. module.exports=require(30)
  1506. },{}],42:[function(require,module,exports){
  1507. /**
  1508. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1509. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1510. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1511. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1512. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1513. * Available under MIT license <http://lodash.com/license>
  1514. */
  1515.  
  1516. /**
  1517. * Creates a "_.pluck" style function, which returns the `key` value of a
  1518. * given object.
  1519. *
  1520. * @static
  1521. * @memberOf _
  1522. * @category Utilities
  1523. * @param {string} key The name of the property to retrieve.
  1524. * @returns {Function} Returns the new function.
  1525. * @example
  1526. *
  1527. * var characters = [
  1528. * { 'name': 'fred', 'age': 40 },
  1529. * { 'name': 'barney', 'age': 36 }
  1530. * ];
  1531. *
  1532. * var getName = _.property('name');
  1533. *
  1534. * _.map(characters, getName);
  1535. * // => ['barney', 'fred']
  1536. *
  1537. * _.sortBy(characters, getName);
  1538. * // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }]
  1539. */
  1540. function property(key) {
  1541. return function(object) {
  1542. return object[key];
  1543. };
  1544. }
  1545.  
  1546. module.exports = property;
  1547.  
  1548. },{}],43:[function(require,module,exports){
  1549. /**
  1550. * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
  1551. * Build: `lodash modularize modern exports="npm" -o ./npm/`
  1552. * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
  1553. * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
  1554. * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1555. * Available under MIT license <http://lodash.com/license>
  1556. */
  1557. var baseCreateCallback = require('lodash._basecreatecallback'),
  1558. keys = require('lodash.keys'),
  1559. objectTypes = require('lodash._objecttypes');
  1560.  
  1561. /**
  1562. * Iterates over own enumerable properties of an object, executing the callback
  1563. * for each property. The callback is bound to `thisArg` and invoked with three
  1564. * arguments; (value, key, object). Callbacks may exit iteration early by
  1565. * explicitly returning `false`.
  1566. *
  1567. * @static
  1568. * @memberOf _
  1569. * @type Function
  1570. * @category Objects
  1571. * @param {Object} object The object to iterate over.
  1572. * @param {Function} [callback=identity] The function called per iteration.
  1573. * @param {*} [thisArg] The `this` binding of `callback`.
  1574. * @returns {Object} Returns `object`.
  1575. * @example
  1576. *
  1577. * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
  1578. * console.log(key);
  1579. * });
  1580. * // => logs '0', '1', and 'length' (property order is not guaranteed across environments)
  1581. */
  1582. var forOwn = function(collection, callback, thisArg) {
  1583. var index, iterable = collection, result = iterable;
  1584. if (!iterable) return result;
  1585. if (!objectTypes[typeof iterable]) return result;
  1586. callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
  1587. var ownIndex = -1,
  1588. ownProps = objectTypes[typeof iterable] && keys(iterable),
  1589. length = ownProps ? ownProps.length : 0;
  1590.  
  1591. while (++ownIndex < length) {
  1592. index = ownProps[ownIndex];
  1593. if (callback(iterable[index], index, collection) === false) return result;
  1594. }
  1595. return result
  1596. };
  1597.  
  1598. module.exports = forOwn;
  1599.  
  1600. },{"lodash._basecreatecallback":44,"lodash._objecttypes":65,"lodash.keys":66}],44:[function(require,module,exports){
  1601. module.exports=require(8)
  1602. },{"lodash._setbinddata":45,"lodash.bind":48,"lodash.identity":62,"lodash.support":63}],45:[function(require,module,exports){
  1603. module.exports=require(9)
  1604. },{"lodash._isnative":46,"lodash.noop":47}],46:[function(require,module,exports){
  1605. module.exports=require(10)
  1606. },{}],47:[function(require,module,exports){
  1607. module.exports=require(11)
  1608. },{}],48:[function(require,module,exports){
  1609. module.exports=require(12)
  1610. },{"lodash._createwrapper":49,"lodash._slice":61}],49:[function(require,module,exports){
  1611. module.exports=require(13)
  1612. },{"lodash._basebind":50,"lodash._basecreatewrapper":55,"lodash._slice":61,"lodash.isfunction":60}],50:[function(require,module,exports){
  1613. module.exports=require(14)
  1614. },{"lodash._basecreate":51,"lodash._setbinddata":45,"lodash._slice":61,"lodash.isobject":54}],51:[function(require,module,exports){
  1615. module.exports=require(15)
  1616. },{"lodash._isnative":52,"lodash.isobject":54,"lodash.noop":53}],52:[function(require,module,exports){
  1617. module.exports=require(10)
  1618. },{}],53:[function(require,module,exports){
  1619. module.exports=require(11)
  1620. },{}],54:[function(require,module,exports){
  1621. module.exports=require(36)
  1622. },{"lodash._objecttypes":65}],55:[function(require,module,exports){
  1623. module.exports=require(18)
  1624. },{"lodash._basecreate":56,"lodash._setbinddata":45,"lodash._slice":61,"lodash.isobject":59}],56:[function(require,module,exports){
  1625. module.exports=require(15)
  1626. },{"lodash._isnative":57,"lodash.isobject":59,"lodash.noop":58}],57:[function(require,module,exports){
  1627. module.exports=require(10)
  1628. },{}],58:[function(require,module,exports){
  1629. module.exports=require(11)
  1630. },{}],59:[function(require,module,exports){
  1631. module.exports=require(36)
  1632. },{"lodash._objecttypes":65}],60:[function(require,module,exports){
  1633. module.exports=require(22)
  1634. },{}],61:[function(require,module,exports){
  1635. module.exports=require(23)
  1636. },{}],62:[function(require,module,exports){
  1637. module.exports=require(24)
  1638. },{}],63:[function(require,module,exports){
  1639. module.exports=require(25)
  1640. },{"lodash._isnative":64}],64:[function(require,module,exports){
  1641. module.exports=require(10)
  1642. },{}],65:[function(require,module,exports){
  1643. module.exports=require(30)
  1644. },{}],66:[function(require,module,exports){
  1645. module.exports=require(38)
  1646. },{"lodash._isnative":67,"lodash._shimkeys":68,"lodash.isobject":69}],67:[function(require,module,exports){
  1647. module.exports=require(10)
  1648. },{}],68:[function(require,module,exports){
  1649. module.exports=require(40)
  1650. },{"lodash._objecttypes":65}],69:[function(require,module,exports){
  1651. module.exports=require(36)
  1652. },{"lodash._objecttypes":65}]},{},[1])