Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

underscore-esm.js 60KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931
  1. // Underscore.js 1.11.0
  2. // https://underscorejs.org
  3. // (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  4. // Underscore may be freely distributed under the MIT license.
  5. // Current version.
  6. var VERSION = '1.11.0';
  7. // Establish the root object, `window` (`self`) in the browser, `global`
  8. // on the server, or `this` in some virtual machines. We use `self`
  9. // instead of `window` for `WebWorker` support.
  10. var root = typeof self == 'object' && self.self === self && self ||
  11. typeof global == 'object' && global.global === global && global ||
  12. Function('return this')() ||
  13. {};
  14. // Save bytes in the minified (but not gzipped) version:
  15. var ArrayProto = Array.prototype, ObjProto = Object.prototype;
  16. var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
  17. // Create quick reference variables for speed access to core prototypes.
  18. var push = ArrayProto.push,
  19. slice = ArrayProto.slice,
  20. toString = ObjProto.toString,
  21. hasOwnProperty = ObjProto.hasOwnProperty;
  22. // Modern feature detection.
  23. var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined';
  24. // All **ECMAScript 5+** native function implementations that we hope to use
  25. // are declared here.
  26. var nativeIsArray = Array.isArray,
  27. nativeKeys = Object.keys,
  28. nativeCreate = Object.create,
  29. nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
  30. // Create references to these builtin functions because we override them.
  31. var _isNaN = isNaN,
  32. _isFinite = isFinite;
  33. // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
  34. var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
  35. var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
  36. 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
  37. // The largest integer that can be represented exactly.
  38. var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
  39. // Some functions take a variable number of arguments, or a few expected
  40. // arguments at the beginning and then a variable number of values to operate
  41. // on. This helper accumulates all remaining arguments past the function’s
  42. // argument length (or an explicit `startIndex`), into an array that becomes
  43. // the last argument. Similar to ES6’s "rest parameter".
  44. function restArguments(func, startIndex) {
  45. startIndex = startIndex == null ? func.length - 1 : +startIndex;
  46. return function() {
  47. var length = Math.max(arguments.length - startIndex, 0),
  48. rest = Array(length),
  49. index = 0;
  50. for (; index < length; index++) {
  51. rest[index] = arguments[index + startIndex];
  52. }
  53. switch (startIndex) {
  54. case 0: return func.call(this, rest);
  55. case 1: return func.call(this, arguments[0], rest);
  56. case 2: return func.call(this, arguments[0], arguments[1], rest);
  57. }
  58. var args = Array(startIndex + 1);
  59. for (index = 0; index < startIndex; index++) {
  60. args[index] = arguments[index];
  61. }
  62. args[startIndex] = rest;
  63. return func.apply(this, args);
  64. };
  65. }
  66. // Is a given variable an object?
  67. function isObject(obj) {
  68. var type = typeof obj;
  69. return type === 'function' || type === 'object' && !!obj;
  70. }
  71. // Is a given value equal to null?
  72. function isNull(obj) {
  73. return obj === null;
  74. }
  75. // Is a given variable undefined?
  76. function isUndefined(obj) {
  77. return obj === void 0;
  78. }
  79. // Is a given value a boolean?
  80. function isBoolean(obj) {
  81. return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
  82. }
  83. // Is a given value a DOM element?
  84. function isElement(obj) {
  85. return !!(obj && obj.nodeType === 1);
  86. }
  87. // Internal function for creating a `toString`-based type tester.
  88. function tagTester(name) {
  89. return function(obj) {
  90. return toString.call(obj) === '[object ' + name + ']';
  91. };
  92. }
  93. var isString = tagTester('String');
  94. var isNumber = tagTester('Number');
  95. var isDate = tagTester('Date');
  96. var isRegExp = tagTester('RegExp');
  97. var isError = tagTester('Error');
  98. var isSymbol = tagTester('Symbol');
  99. var isMap = tagTester('Map');
  100. var isWeakMap = tagTester('WeakMap');
  101. var isSet = tagTester('Set');
  102. var isWeakSet = tagTester('WeakSet');
  103. var isArrayBuffer = tagTester('ArrayBuffer');
  104. var isDataView = tagTester('DataView');
  105. // Is a given value an array?
  106. // Delegates to ECMA5's native `Array.isArray`.
  107. var isArray = nativeIsArray || tagTester('Array');
  108. var isFunction = tagTester('Function');
  109. // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
  110. // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
  111. var nodelist = root.document && root.document.childNodes;
  112. if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
  113. isFunction = function(obj) {
  114. return typeof obj == 'function' || false;
  115. };
  116. }
  117. var isFunction$1 = isFunction;
  118. // Internal function to check whether `key` is an own property name of `obj`.
  119. function has(obj, key) {
  120. return obj != null && hasOwnProperty.call(obj, key);
  121. }
  122. var isArguments = tagTester('Arguments');
  123. // Define a fallback version of the method in browsers (ahem, IE < 9), where
  124. // there isn't any inspectable "Arguments" type.
  125. (function() {
  126. if (!isArguments(arguments)) {
  127. isArguments = function(obj) {
  128. return has(obj, 'callee');
  129. };
  130. }
  131. }());
  132. var isArguments$1 = isArguments;
  133. // Is a given object a finite number?
  134. function isFinite$1(obj) {
  135. return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
  136. }
  137. // Is the given value `NaN`?
  138. function isNaN$1(obj) {
  139. return isNumber(obj) && _isNaN(obj);
  140. }
  141. // Predicate-generating function. Often useful outside of Underscore.
  142. function constant(value) {
  143. return function() {
  144. return value;
  145. };
  146. }
  147. // Common internal logic for `isArrayLike` and `isBufferLike`.
  148. function createSizePropertyCheck(getSizeProperty) {
  149. return function(collection) {
  150. var sizeProperty = getSizeProperty(collection);
  151. return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
  152. }
  153. }
  154. // Internal helper to generate a function to obtain property `key` from `obj`.
  155. function shallowProperty(key) {
  156. return function(obj) {
  157. return obj == null ? void 0 : obj[key];
  158. };
  159. }
  160. // Internal helper to obtain the `byteLength` property of an object.
  161. var getByteLength = shallowProperty('byteLength');
  162. // Internal helper to determine whether we should spend extensive checks against
  163. // `ArrayBuffer` et al.
  164. var isBufferLike = createSizePropertyCheck(getByteLength);
  165. // Is a given value a typed array?
  166. var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
  167. function isTypedArray(obj) {
  168. // `ArrayBuffer.isView` is the most future-proof, so use it when available.
  169. // Otherwise, fall back on the above regular expression.
  170. return nativeIsView ? (nativeIsView(obj) && !isDataView(obj)) :
  171. isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
  172. }
  173. var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);
  174. // Internal helper to obtain the `length` property of an object.
  175. var getLength = shallowProperty('length');
  176. // Internal helper for collection methods to determine whether a collection
  177. // should be iterated as an array or as an object.
  178. // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
  179. // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
  180. var isArrayLike = createSizePropertyCheck(getLength);
  181. // Internal helper to create a simple lookup structure.
  182. // `collectNonEnumProps` used to depend on `_.contains`, but this led to
  183. // circular imports. `emulatedSet` is a one-off solution that only works for
  184. // arrays of strings.
  185. function emulatedSet(keys) {
  186. var hash = {};
  187. for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
  188. return {
  189. contains: function(key) { return hash[key]; },
  190. push: function(key) {
  191. hash[key] = true;
  192. return keys.push(key);
  193. }
  194. };
  195. }
  196. // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
  197. // be iterated by `for key in ...` and thus missed. Extends `keys` in place if
  198. // needed.
  199. function collectNonEnumProps(obj, keys) {
  200. keys = emulatedSet(keys);
  201. var nonEnumIdx = nonEnumerableProps.length;
  202. var constructor = obj.constructor;
  203. var proto = isFunction$1(constructor) && constructor.prototype || ObjProto;
  204. // Constructor is a special case.
  205. var prop = 'constructor';
  206. if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);
  207. while (nonEnumIdx--) {
  208. prop = nonEnumerableProps[nonEnumIdx];
  209. if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
  210. keys.push(prop);
  211. }
  212. }
  213. }
  214. // Retrieve the names of an object's own properties.
  215. // Delegates to **ECMAScript 5**'s native `Object.keys`.
  216. function keys(obj) {
  217. if (!isObject(obj)) return [];
  218. if (nativeKeys) return nativeKeys(obj);
  219. var keys = [];
  220. for (var key in obj) if (has(obj, key)) keys.push(key);
  221. // Ahem, IE < 9.
  222. if (hasEnumBug) collectNonEnumProps(obj, keys);
  223. return keys;
  224. }
  225. // Is a given array, string, or object empty?
  226. // An "empty" object has no enumerable own-properties.
  227. function isEmpty(obj) {
  228. if (obj == null) return true;
  229. // Skip the more expensive `toString`-based type checks if `obj` has no
  230. // `.length`.
  231. if (isArrayLike(obj) && (isArray(obj) || isString(obj) || isArguments$1(obj))) return obj.length === 0;
  232. return keys(obj).length === 0;
  233. }
  234. // Returns whether an object has a given set of `key:value` pairs.
  235. function isMatch(object, attrs) {
  236. var _keys = keys(attrs), length = _keys.length;
  237. if (object == null) return !length;
  238. var obj = Object(object);
  239. for (var i = 0; i < length; i++) {
  240. var key = _keys[i];
  241. if (attrs[key] !== obj[key] || !(key in obj)) return false;
  242. }
  243. return true;
  244. }
  245. // If Underscore is called as a function, it returns a wrapped object that can
  246. // be used OO-style. This wrapper holds altered versions of all functions added
  247. // through `_.mixin`. Wrapped objects may be chained.
  248. function _(obj) {
  249. if (obj instanceof _) return obj;
  250. if (!(this instanceof _)) return new _(obj);
  251. this._wrapped = obj;
  252. }
  253. _.VERSION = VERSION;
  254. // Extracts the result from a wrapped and chained object.
  255. _.prototype.value = function() {
  256. return this._wrapped;
  257. };
  258. // Provide unwrapping proxies for some methods used in engine operations
  259. // such as arithmetic and JSON stringification.
  260. _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
  261. _.prototype.toString = function() {
  262. return String(this._wrapped);
  263. };
  264. // Internal recursive comparison function for `_.isEqual`.
  265. function eq(a, b, aStack, bStack) {
  266. // Identical objects are equal. `0 === -0`, but they aren't identical.
  267. // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
  268. if (a === b) return a !== 0 || 1 / a === 1 / b;
  269. // `null` or `undefined` only equal to itself (strict comparison).
  270. if (a == null || b == null) return false;
  271. // `NaN`s are equivalent, but non-reflexive.
  272. if (a !== a) return b !== b;
  273. // Exhaust primitive checks
  274. var type = typeof a;
  275. if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
  276. return deepEq(a, b, aStack, bStack);
  277. }
  278. // Internal recursive comparison function for `_.isEqual`.
  279. function deepEq(a, b, aStack, bStack) {
  280. // Unwrap any wrapped objects.
  281. if (a instanceof _) a = a._wrapped;
  282. if (b instanceof _) b = b._wrapped;
  283. // Compare `[[Class]]` names.
  284. var className = toString.call(a);
  285. if (className !== toString.call(b)) return false;
  286. switch (className) {
  287. // These types are compared by value.
  288. case '[object RegExp]':
  289. // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
  290. case '[object String]':
  291. // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
  292. // equivalent to `new String("5")`.
  293. return '' + a === '' + b;
  294. case '[object Number]':
  295. // `NaN`s are equivalent, but non-reflexive.
  296. // Object(NaN) is equivalent to NaN.
  297. if (+a !== +a) return +b !== +b;
  298. // An `egal` comparison is performed for other numeric values.
  299. return +a === 0 ? 1 / +a === 1 / b : +a === +b;
  300. case '[object Date]':
  301. case '[object Boolean]':
  302. // Coerce dates and booleans to numeric primitive values. Dates are compared by their
  303. // millisecond representations. Note that invalid dates with millisecond representations
  304. // of `NaN` are not equivalent.
  305. return +a === +b;
  306. case '[object Symbol]':
  307. return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
  308. case '[object ArrayBuffer]':
  309. // Coerce to `DataView` so we can fall through to the next case.
  310. return deepEq(new DataView(a), new DataView(b), aStack, bStack);
  311. case '[object DataView]':
  312. var byteLength = getByteLength(a);
  313. if (byteLength !== getByteLength(b)) {
  314. return false;
  315. }
  316. while (byteLength--) {
  317. if (a.getUint8(byteLength) !== b.getUint8(byteLength)) {
  318. return false;
  319. }
  320. }
  321. return true;
  322. }
  323. if (isTypedArray$1(a)) {
  324. // Coerce typed arrays to `DataView`.
  325. return deepEq(new DataView(a.buffer), new DataView(b.buffer), aStack, bStack);
  326. }
  327. var areArrays = className === '[object Array]';
  328. if (!areArrays) {
  329. if (typeof a != 'object' || typeof b != 'object') return false;
  330. // Objects with different constructors are not equivalent, but `Object`s or `Array`s
  331. // from different frames are.
  332. var aCtor = a.constructor, bCtor = b.constructor;
  333. if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
  334. isFunction$1(bCtor) && bCtor instanceof bCtor)
  335. && ('constructor' in a && 'constructor' in b)) {
  336. return false;
  337. }
  338. }
  339. // Assume equality for cyclic structures. The algorithm for detecting cyclic
  340. // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
  341. // Initializing stack of traversed objects.
  342. // It's done here since we only need them for objects and arrays comparison.
  343. aStack = aStack || [];
  344. bStack = bStack || [];
  345. var length = aStack.length;
  346. while (length--) {
  347. // Linear search. Performance is inversely proportional to the number of
  348. // unique nested structures.
  349. if (aStack[length] === a) return bStack[length] === b;
  350. }
  351. // Add the first object to the stack of traversed objects.
  352. aStack.push(a);
  353. bStack.push(b);
  354. // Recursively compare objects and arrays.
  355. if (areArrays) {
  356. // Compare array lengths to determine if a deep comparison is necessary.
  357. length = a.length;
  358. if (length !== b.length) return false;
  359. // Deep compare the contents, ignoring non-numeric properties.
  360. while (length--) {
  361. if (!eq(a[length], b[length], aStack, bStack)) return false;
  362. }
  363. } else {
  364. // Deep compare objects.
  365. var _keys = keys(a), key;
  366. length = _keys.length;
  367. // Ensure that both objects contain the same number of properties before comparing deep equality.
  368. if (keys(b).length !== length) return false;
  369. while (length--) {
  370. // Deep compare each member
  371. key = _keys[length];
  372. if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
  373. }
  374. }
  375. // Remove the first object from the stack of traversed objects.
  376. aStack.pop();
  377. bStack.pop();
  378. return true;
  379. }
  380. // Perform a deep comparison to check if two objects are equal.
  381. function isEqual(a, b) {
  382. return eq(a, b);
  383. }
  384. // Retrieve all the enumerable property names of an object.
  385. function allKeys(obj) {
  386. if (!isObject(obj)) return [];
  387. var keys = [];
  388. for (var key in obj) keys.push(key);
  389. // Ahem, IE < 9.
  390. if (hasEnumBug) collectNonEnumProps(obj, keys);
  391. return keys;
  392. }
  393. // Retrieve the values of an object's properties.
  394. function values(obj) {
  395. var _keys = keys(obj);
  396. var length = _keys.length;
  397. var values = Array(length);
  398. for (var i = 0; i < length; i++) {
  399. values[i] = obj[_keys[i]];
  400. }
  401. return values;
  402. }
  403. // Convert an object into a list of `[key, value]` pairs.
  404. // The opposite of `_.object` with one argument.
  405. function pairs(obj) {
  406. var _keys = keys(obj);
  407. var length = _keys.length;
  408. var pairs = Array(length);
  409. for (var i = 0; i < length; i++) {
  410. pairs[i] = [_keys[i], obj[_keys[i]]];
  411. }
  412. return pairs;
  413. }
  414. // Invert the keys and values of an object. The values must be serializable.
  415. function invert(obj) {
  416. var result = {};
  417. var _keys = keys(obj);
  418. for (var i = 0, length = _keys.length; i < length; i++) {
  419. result[obj[_keys[i]]] = _keys[i];
  420. }
  421. return result;
  422. }
  423. // Return a sorted list of the function names available on the object.
  424. function functions(obj) {
  425. var names = [];
  426. for (var key in obj) {
  427. if (isFunction$1(obj[key])) names.push(key);
  428. }
  429. return names.sort();
  430. }
  431. // An internal function for creating assigner functions.
  432. function createAssigner(keysFunc, defaults) {
  433. return function(obj) {
  434. var length = arguments.length;
  435. if (defaults) obj = Object(obj);
  436. if (length < 2 || obj == null) return obj;
  437. for (var index = 1; index < length; index++) {
  438. var source = arguments[index],
  439. keys = keysFunc(source),
  440. l = keys.length;
  441. for (var i = 0; i < l; i++) {
  442. var key = keys[i];
  443. if (!defaults || obj[key] === void 0) obj[key] = source[key];
  444. }
  445. }
  446. return obj;
  447. };
  448. }
  449. // Extend a given object with all the properties in passed-in object(s).
  450. var extend = createAssigner(allKeys);
  451. // Assigns a given object with all the own properties in the passed-in
  452. // object(s).
  453. // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
  454. var extendOwn = createAssigner(keys);
  455. // Fill in a given object with default properties.
  456. var defaults = createAssigner(allKeys, true);
  457. // Create a naked function reference for surrogate-prototype-swapping.
  458. function ctor() {
  459. return function(){};
  460. }
  461. // An internal function for creating a new object that inherits from another.
  462. function baseCreate(prototype) {
  463. if (!isObject(prototype)) return {};
  464. if (nativeCreate) return nativeCreate(prototype);
  465. var Ctor = ctor();
  466. Ctor.prototype = prototype;
  467. var result = new Ctor;
  468. Ctor.prototype = null;
  469. return result;
  470. }
  471. // Creates an object that inherits from the given prototype object.
  472. // If additional properties are provided then they will be added to the
  473. // created object.
  474. function create(prototype, props) {
  475. var result = baseCreate(prototype);
  476. if (props) extendOwn(result, props);
  477. return result;
  478. }
  479. // Create a (shallow-cloned) duplicate of an object.
  480. function clone(obj) {
  481. if (!isObject(obj)) return obj;
  482. return isArray(obj) ? obj.slice() : extend({}, obj);
  483. }
  484. // Invokes `interceptor` with the `obj` and then returns `obj`.
  485. // The primary purpose of this method is to "tap into" a method chain, in
  486. // order to perform operations on intermediate results within the chain.
  487. function tap(obj, interceptor) {
  488. interceptor(obj);
  489. return obj;
  490. }
  491. // Shortcut function for checking if an object has a given property directly on
  492. // itself (in other words, not on a prototype). Unlike the internal `has`
  493. // function, this public version can also traverse nested properties.
  494. function has$1(obj, path) {
  495. if (!isArray(path)) {
  496. return has(obj, path);
  497. }
  498. var length = path.length;
  499. for (var i = 0; i < length; i++) {
  500. var key = path[i];
  501. if (obj == null || !hasOwnProperty.call(obj, key)) {
  502. return false;
  503. }
  504. obj = obj[key];
  505. }
  506. return !!length;
  507. }
  508. // Keep the identity function around for default iteratees.
  509. function identity(value) {
  510. return value;
  511. }
  512. // Returns a predicate for checking whether an object has a given set of
  513. // `key:value` pairs.
  514. function matcher(attrs) {
  515. attrs = extendOwn({}, attrs);
  516. return function(obj) {
  517. return isMatch(obj, attrs);
  518. };
  519. }
  520. // Internal function to obtain a nested property in `obj` along `path`.
  521. function deepGet(obj, path) {
  522. var length = path.length;
  523. for (var i = 0; i < length; i++) {
  524. if (obj == null) return void 0;
  525. obj = obj[path[i]];
  526. }
  527. return length ? obj : void 0;
  528. }
  529. // Creates a function that, when passed an object, will traverse that object’s
  530. // properties down the given `path`, specified as an array of keys or indices.
  531. function property(path) {
  532. if (!isArray(path)) {
  533. return shallowProperty(path);
  534. }
  535. return function(obj) {
  536. return deepGet(obj, path);
  537. };
  538. }
  539. // Internal function that returns an efficient (for current engines) version
  540. // of the passed-in callback, to be repeatedly applied in other Underscore
  541. // functions.
  542. function optimizeCb(func, context, argCount) {
  543. if (context === void 0) return func;
  544. switch (argCount == null ? 3 : argCount) {
  545. case 1: return function(value) {
  546. return func.call(context, value);
  547. };
  548. // The 2-argument case is omitted because we’re not using it.
  549. case 3: return function(value, index, collection) {
  550. return func.call(context, value, index, collection);
  551. };
  552. case 4: return function(accumulator, value, index, collection) {
  553. return func.call(context, accumulator, value, index, collection);
  554. };
  555. }
  556. return function() {
  557. return func.apply(context, arguments);
  558. };
  559. }
  560. // An internal function to generate callbacks that can be applied to each
  561. // element in a collection, returning the desired result — either `_.identity`,
  562. // an arbitrary callback, a property matcher, or a property accessor.
  563. function baseIteratee(value, context, argCount) {
  564. if (value == null) return identity;
  565. if (isFunction$1(value)) return optimizeCb(value, context, argCount);
  566. if (isObject(value) && !isArray(value)) return matcher(value);
  567. return property(value);
  568. }
  569. // External wrapper for our callback generator. Users may customize
  570. // `_.iteratee` if they want additional predicate/iteratee shorthand styles.
  571. // This abstraction hides the internal-only `argCount` argument.
  572. function iteratee(value, context) {
  573. return baseIteratee(value, context, Infinity);
  574. }
  575. _.iteratee = iteratee;
  576. // The function we call internally to generate a callback. It invokes
  577. // `_.iteratee` if overridden, otherwise `baseIteratee`.
  578. function cb(value, context, argCount) {
  579. if (_.iteratee !== iteratee) return _.iteratee(value, context);
  580. return baseIteratee(value, context, argCount);
  581. }
  582. // Returns the results of applying the `iteratee` to each element of `obj`.
  583. // In contrast to `_.map` it returns an object.
  584. function mapObject(obj, iteratee, context) {
  585. iteratee = cb(iteratee, context);
  586. var _keys = keys(obj),
  587. length = _keys.length,
  588. results = {};
  589. for (var index = 0; index < length; index++) {
  590. var currentKey = _keys[index];
  591. results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
  592. }
  593. return results;
  594. }
  595. // Predicate-generating function. Often useful outside of Underscore.
  596. function noop(){}
  597. // Generates a function for a given object that returns a given property.
  598. function propertyOf(obj) {
  599. if (obj == null) {
  600. return function(){};
  601. }
  602. return function(path) {
  603. return !isArray(path) ? obj[path] : deepGet(obj, path);
  604. };
  605. }
  606. // Run a function **n** times.
  607. function times(n, iteratee, context) {
  608. var accum = Array(Math.max(0, n));
  609. iteratee = optimizeCb(iteratee, context, 1);
  610. for (var i = 0; i < n; i++) accum[i] = iteratee(i);
  611. return accum;
  612. }
  613. // Return a random integer between `min` and `max` (inclusive).
  614. function random(min, max) {
  615. if (max == null) {
  616. max = min;
  617. min = 0;
  618. }
  619. return min + Math.floor(Math.random() * (max - min + 1));
  620. }
  621. // A (possibly faster) way to get the current timestamp as an integer.
  622. var now = Date.now || function() {
  623. return new Date().getTime();
  624. };
  625. // Internal helper to generate functions for escaping and unescaping strings
  626. // to/from HTML interpolation.
  627. function createEscaper(map) {
  628. var escaper = function(match) {
  629. return map[match];
  630. };
  631. // Regexes for identifying a key that needs to be escaped.
  632. var source = '(?:' + keys(map).join('|') + ')';
  633. var testRegexp = RegExp(source);
  634. var replaceRegexp = RegExp(source, 'g');
  635. return function(string) {
  636. string = string == null ? '' : '' + string;
  637. return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
  638. };
  639. }
  640. // Internal list of HTML entities for escaping.
  641. var escapeMap = {
  642. '&': '&amp;',
  643. '<': '&lt;',
  644. '>': '&gt;',
  645. '"': '&quot;',
  646. "'": '&#x27;',
  647. '`': '&#x60;'
  648. };
  649. // Function for escaping strings to HTML interpolation.
  650. var _escape = createEscaper(escapeMap);
  651. // Internal list of HTML entities for unescaping.
  652. var unescapeMap = invert(escapeMap);
  653. // Function for unescaping strings from HTML interpolation.
  654. var _unescape = createEscaper(unescapeMap);
  655. // By default, Underscore uses ERB-style template delimiters. Change the
  656. // following template settings to use alternative delimiters.
  657. var templateSettings = _.templateSettings = {
  658. evaluate: /<%([\s\S]+?)%>/g,
  659. interpolate: /<%=([\s\S]+?)%>/g,
  660. escape: /<%-([\s\S]+?)%>/g
  661. };
  662. // When customizing `_.templateSettings`, if you don't want to define an
  663. // interpolation, evaluation or escaping regex, we need one that is
  664. // guaranteed not to match.
  665. var noMatch = /(.)^/;
  666. // Certain characters need to be escaped so that they can be put into a
  667. // string literal.
  668. var escapes = {
  669. "'": "'",
  670. '\\': '\\',
  671. '\r': 'r',
  672. '\n': 'n',
  673. '\u2028': 'u2028',
  674. '\u2029': 'u2029'
  675. };
  676. var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
  677. function escapeChar(match) {
  678. return '\\' + escapes[match];
  679. }
  680. // JavaScript micro-templating, similar to John Resig's implementation.
  681. // Underscore templating handles arbitrary delimiters, preserves whitespace,
  682. // and correctly escapes quotes within interpolated code.
  683. // NB: `oldSettings` only exists for backwards compatibility.
  684. function template(text, settings, oldSettings) {
  685. if (!settings && oldSettings) settings = oldSettings;
  686. settings = defaults({}, settings, _.templateSettings);
  687. // Combine delimiters into one regular expression via alternation.
  688. var matcher = RegExp([
  689. (settings.escape || noMatch).source,
  690. (settings.interpolate || noMatch).source,
  691. (settings.evaluate || noMatch).source
  692. ].join('|') + '|$', 'g');
  693. // Compile the template source, escaping string literals appropriately.
  694. var index = 0;
  695. var source = "__p+='";
  696. text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
  697. source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
  698. index = offset + match.length;
  699. if (escape) {
  700. source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
  701. } else if (interpolate) {
  702. source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
  703. } else if (evaluate) {
  704. source += "';\n" + evaluate + "\n__p+='";
  705. }
  706. // Adobe VMs need the match returned to produce the correct offset.
  707. return match;
  708. });
  709. source += "';\n";
  710. // If a variable is not specified, place data values in local scope.
  711. if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
  712. source = "var __t,__p='',__j=Array.prototype.join," +
  713. "print=function(){__p+=__j.call(arguments,'');};\n" +
  714. source + 'return __p;\n';
  715. var render;
  716. try {
  717. render = new Function(settings.variable || 'obj', '_', source);
  718. } catch (e) {
  719. e.source = source;
  720. throw e;
  721. }
  722. var template = function(data) {
  723. return render.call(this, data, _);
  724. };
  725. // Provide the compiled source as a convenience for precompilation.
  726. var argument = settings.variable || 'obj';
  727. template.source = 'function(' + argument + '){\n' + source + '}';
  728. return template;
  729. }
  730. // Traverses the children of `obj` along `path`. If a child is a function, it
  731. // is invoked with its parent as context. Returns the value of the final
  732. // child, or `fallback` if any child is undefined.
  733. function result(obj, path, fallback) {
  734. if (!isArray(path)) path = [path];
  735. var length = path.length;
  736. if (!length) {
  737. return isFunction$1(fallback) ? fallback.call(obj) : fallback;
  738. }
  739. for (var i = 0; i < length; i++) {
  740. var prop = obj == null ? void 0 : obj[path[i]];
  741. if (prop === void 0) {
  742. prop = fallback;
  743. i = length; // Ensure we don't continue iterating.
  744. }
  745. obj = isFunction$1(prop) ? prop.call(obj) : prop;
  746. }
  747. return obj;
  748. }
  749. // Generate a unique integer id (unique within the entire client session).
  750. // Useful for temporary DOM ids.
  751. var idCounter = 0;
  752. function uniqueId(prefix) {
  753. var id = ++idCounter + '';
  754. return prefix ? prefix + id : id;
  755. }
  756. // Start chaining a wrapped Underscore object.
  757. function chain(obj) {
  758. var instance = _(obj);
  759. instance._chain = true;
  760. return instance;
  761. }
  762. // Internal function to execute `sourceFunc` bound to `context` with optional
  763. // `args`. Determines whether to execute a function as a constructor or as a
  764. // normal function.
  765. function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
  766. if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
  767. var self = baseCreate(sourceFunc.prototype);
  768. var result = sourceFunc.apply(self, args);
  769. if (isObject(result)) return result;
  770. return self;
  771. }
  772. // Partially apply a function by creating a version that has had some of its
  773. // arguments pre-filled, without changing its dynamic `this` context. `_` acts
  774. // as a placeholder by default, allowing any combination of arguments to be
  775. // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
  776. var partial = restArguments(function(func, boundArgs) {
  777. var placeholder = partial.placeholder;
  778. var bound = function() {
  779. var position = 0, length = boundArgs.length;
  780. var args = Array(length);
  781. for (var i = 0; i < length; i++) {
  782. args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
  783. }
  784. while (position < arguments.length) args.push(arguments[position++]);
  785. return executeBound(func, bound, this, this, args);
  786. };
  787. return bound;
  788. });
  789. partial.placeholder = _;
  790. // Create a function bound to a given object (assigning `this`, and arguments,
  791. // optionally).
  792. var bind = restArguments(function(func, context, args) {
  793. if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
  794. var bound = restArguments(function(callArgs) {
  795. return executeBound(func, bound, context, this, args.concat(callArgs));
  796. });
  797. return bound;
  798. });
  799. // Internal implementation of a recursive `flatten` function.
  800. function flatten(input, depth, strict, output) {
  801. output = output || [];
  802. if (!depth && depth !== 0) {
  803. depth = Infinity;
  804. } else if (depth <= 0) {
  805. return output.concat(input);
  806. }
  807. var idx = output.length;
  808. for (var i = 0, length = getLength(input); i < length; i++) {
  809. var value = input[i];
  810. if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
  811. // Flatten current level of array or arguments object.
  812. if (depth > 1) {
  813. flatten(value, depth - 1, strict, output);
  814. idx = output.length;
  815. } else {
  816. var j = 0, len = value.length;
  817. while (j < len) output[idx++] = value[j++];
  818. }
  819. } else if (!strict) {
  820. output[idx++] = value;
  821. }
  822. }
  823. return output;
  824. }
  825. // Bind a number of an object's methods to that object. Remaining arguments
  826. // are the method names to be bound. Useful for ensuring that all callbacks
  827. // defined on an object belong to it.
  828. var bindAll = restArguments(function(obj, keys) {
  829. keys = flatten(keys, false, false);
  830. var index = keys.length;
  831. if (index < 1) throw new Error('bindAll must be passed function names');
  832. while (index--) {
  833. var key = keys[index];
  834. obj[key] = bind(obj[key], obj);
  835. }
  836. return obj;
  837. });
  838. // Memoize an expensive function by storing its results.
  839. function memoize(func, hasher) {
  840. var memoize = function(key) {
  841. var cache = memoize.cache;
  842. var address = '' + (hasher ? hasher.apply(this, arguments) : key);
  843. if (!has(cache, address)) cache[address] = func.apply(this, arguments);
  844. return cache[address];
  845. };
  846. memoize.cache = {};
  847. return memoize;
  848. }
  849. // Delays a function for the given number of milliseconds, and then calls
  850. // it with the arguments supplied.
  851. var delay = restArguments(function(func, wait, args) {
  852. return setTimeout(function() {
  853. return func.apply(null, args);
  854. }, wait);
  855. });
  856. // Defers a function, scheduling it to run after the current call stack has
  857. // cleared.
  858. var defer = partial(delay, _, 1);
  859. // Returns a function, that, when invoked, will only be triggered at most once
  860. // during a given window of time. Normally, the throttled function will run
  861. // as much as it can, without ever going more than once per `wait` duration;
  862. // but if you'd like to disable the execution on the leading edge, pass
  863. // `{leading: false}`. To disable execution on the trailing edge, ditto.
  864. function throttle(func, wait, options) {
  865. var timeout, context, args, result;
  866. var previous = 0;
  867. if (!options) options = {};
  868. var later = function() {
  869. previous = options.leading === false ? 0 : now();
  870. timeout = null;
  871. result = func.apply(context, args);
  872. if (!timeout) context = args = null;
  873. };
  874. var throttled = function() {
  875. var _now = now();
  876. if (!previous && options.leading === false) previous = _now;
  877. var remaining = wait - (_now - previous);
  878. context = this;
  879. args = arguments;
  880. if (remaining <= 0 || remaining > wait) {
  881. if (timeout) {
  882. clearTimeout(timeout);
  883. timeout = null;
  884. }
  885. previous = _now;
  886. result = func.apply(context, args);
  887. if (!timeout) context = args = null;
  888. } else if (!timeout && options.trailing !== false) {
  889. timeout = setTimeout(later, remaining);
  890. }
  891. return result;
  892. };
  893. throttled.cancel = function() {
  894. clearTimeout(timeout);
  895. previous = 0;
  896. timeout = context = args = null;
  897. };
  898. return throttled;
  899. }
  900. // When a sequence of calls of the returned function ends, the argument
  901. // function is triggered. The end of a sequence is defined by the `wait`
  902. // parameter. If `immediate` is passed, the argument function will be
  903. // triggered at the beginning of the sequence instead of at the end.
  904. function debounce(func, wait, immediate) {
  905. var timeout, result;
  906. var later = function(context, args) {
  907. timeout = null;
  908. if (args) result = func.apply(context, args);
  909. };
  910. var debounced = restArguments(function(args) {
  911. if (timeout) clearTimeout(timeout);
  912. if (immediate) {
  913. var callNow = !timeout;
  914. timeout = setTimeout(later, wait);
  915. if (callNow) result = func.apply(this, args);
  916. } else {
  917. timeout = delay(later, wait, this, args);
  918. }
  919. return result;
  920. });
  921. debounced.cancel = function() {
  922. clearTimeout(timeout);
  923. timeout = null;
  924. };
  925. return debounced;
  926. }
  927. // Returns the first function passed as an argument to the second,
  928. // allowing you to adjust arguments, run code before and after, and
  929. // conditionally execute the original function.
  930. function wrap(func, wrapper) {
  931. return partial(wrapper, func);
  932. }
  933. // Returns a negated version of the passed-in predicate.
  934. function negate(predicate) {
  935. return function() {
  936. return !predicate.apply(this, arguments);
  937. };
  938. }
  939. // Returns a function that is the composition of a list of functions, each
  940. // consuming the return value of the function that follows.
  941. function compose() {
  942. var args = arguments;
  943. var start = args.length - 1;
  944. return function() {
  945. var i = start;
  946. var result = args[start].apply(this, arguments);
  947. while (i--) result = args[i].call(this, result);
  948. return result;
  949. };
  950. }
  951. // Returns a function that will only be executed on and after the Nth call.
  952. function after(times, func) {
  953. return function() {
  954. if (--times < 1) {
  955. return func.apply(this, arguments);
  956. }
  957. };
  958. }
  959. // Returns a function that will only be executed up to (but not including) the
  960. // Nth call.
  961. function before(times, func) {
  962. var memo;
  963. return function() {
  964. if (--times > 0) {
  965. memo = func.apply(this, arguments);
  966. }
  967. if (times <= 1) func = null;
  968. return memo;
  969. };
  970. }
  971. // Returns a function that will be executed at most one time, no matter how
  972. // often you call it. Useful for lazy initialization.
  973. var once = partial(before, 2);
  974. // Returns the first key on an object that passes a truth test.
  975. function findKey(obj, predicate, context) {
  976. predicate = cb(predicate, context);
  977. var _keys = keys(obj), key;
  978. for (var i = 0, length = _keys.length; i < length; i++) {
  979. key = _keys[i];
  980. if (predicate(obj[key], key, obj)) return key;
  981. }
  982. }
  983. // Internal function to generate `_.findIndex` and `_.findLastIndex`.
  984. function createPredicateIndexFinder(dir) {
  985. return function(array, predicate, context) {
  986. predicate = cb(predicate, context);
  987. var length = getLength(array);
  988. var index = dir > 0 ? 0 : length - 1;
  989. for (; index >= 0 && index < length; index += dir) {
  990. if (predicate(array[index], index, array)) return index;
  991. }
  992. return -1;
  993. };
  994. }
  995. // Returns the first index on an array-like that passes a truth test.
  996. var findIndex = createPredicateIndexFinder(1);
  997. // Returns the last index on an array-like that passes a truth test.
  998. var findLastIndex = createPredicateIndexFinder(-1);
  999. // Use a comparator function to figure out the smallest index at which
  1000. // an object should be inserted so as to maintain order. Uses binary search.
  1001. function sortedIndex(array, obj, iteratee, context) {
  1002. iteratee = cb(iteratee, context, 1);
  1003. var value = iteratee(obj);
  1004. var low = 0, high = getLength(array);
  1005. while (low < high) {
  1006. var mid = Math.floor((low + high) / 2);
  1007. if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
  1008. }
  1009. return low;
  1010. }
  1011. // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
  1012. function createIndexFinder(dir, predicateFind, sortedIndex) {
  1013. return function(array, item, idx) {
  1014. var i = 0, length = getLength(array);
  1015. if (typeof idx == 'number') {
  1016. if (dir > 0) {
  1017. i = idx >= 0 ? idx : Math.max(idx + length, i);
  1018. } else {
  1019. length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
  1020. }
  1021. } else if (sortedIndex && idx && length) {
  1022. idx = sortedIndex(array, item);
  1023. return array[idx] === item ? idx : -1;
  1024. }
  1025. if (item !== item) {
  1026. idx = predicateFind(slice.call(array, i, length), isNaN$1);
  1027. return idx >= 0 ? idx + i : -1;
  1028. }
  1029. for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
  1030. if (array[idx] === item) return idx;
  1031. }
  1032. return -1;
  1033. };
  1034. }
  1035. // Return the position of the first occurrence of an item in an array,
  1036. // or -1 if the item is not included in the array.
  1037. // If the array is large and already in sort order, pass `true`
  1038. // for **isSorted** to use binary search.
  1039. var indexOf = createIndexFinder(1, findIndex, sortedIndex);
  1040. // Return the position of the last occurrence of an item in an array,
  1041. // or -1 if the item is not included in the array.
  1042. var lastIndexOf = createIndexFinder(-1, findLastIndex);
  1043. // Return the first value which passes a truth test.
  1044. function find(obj, predicate, context) {
  1045. var keyFinder = isArrayLike(obj) ? findIndex : findKey;
  1046. var key = keyFinder(obj, predicate, context);
  1047. if (key !== void 0 && key !== -1) return obj[key];
  1048. }
  1049. // Convenience version of a common use case of `_.find`: getting the first
  1050. // object containing specific `key:value` pairs.
  1051. function findWhere(obj, attrs) {
  1052. return find(obj, matcher(attrs));
  1053. }
  1054. // The cornerstone for collection functions, an `each`
  1055. // implementation, aka `forEach`.
  1056. // Handles raw objects in addition to array-likes. Treats all
  1057. // sparse array-likes as if they were dense.
  1058. function each(obj, iteratee, context) {
  1059. iteratee = optimizeCb(iteratee, context);
  1060. var i, length;
  1061. if (isArrayLike(obj)) {
  1062. for (i = 0, length = obj.length; i < length; i++) {
  1063. iteratee(obj[i], i, obj);
  1064. }
  1065. } else {
  1066. var _keys = keys(obj);
  1067. for (i = 0, length = _keys.length; i < length; i++) {
  1068. iteratee(obj[_keys[i]], _keys[i], obj);
  1069. }
  1070. }
  1071. return obj;
  1072. }
  1073. // Return the results of applying the iteratee to each element.
  1074. function map(obj, iteratee, context) {
  1075. iteratee = cb(iteratee, context);
  1076. var _keys = !isArrayLike(obj) && keys(obj),
  1077. length = (_keys || obj).length,
  1078. results = Array(length);
  1079. for (var index = 0; index < length; index++) {
  1080. var currentKey = _keys ? _keys[index] : index;
  1081. results[index] = iteratee(obj[currentKey], currentKey, obj);
  1082. }
  1083. return results;
  1084. }
  1085. // Internal helper to create a reducing function, iterating left or right.
  1086. function createReduce(dir) {
  1087. // Wrap code that reassigns argument variables in a separate function than
  1088. // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
  1089. var reducer = function(obj, iteratee, memo, initial) {
  1090. var _keys = !isArrayLike(obj) && keys(obj),
  1091. length = (_keys || obj).length,
  1092. index = dir > 0 ? 0 : length - 1;
  1093. if (!initial) {
  1094. memo = obj[_keys ? _keys[index] : index];
  1095. index += dir;
  1096. }
  1097. for (; index >= 0 && index < length; index += dir) {
  1098. var currentKey = _keys ? _keys[index] : index;
  1099. memo = iteratee(memo, obj[currentKey], currentKey, obj);
  1100. }
  1101. return memo;
  1102. };
  1103. return function(obj, iteratee, memo, context) {
  1104. var initial = arguments.length >= 3;
  1105. return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
  1106. };
  1107. }
  1108. // **Reduce** builds up a single result from a list of values, aka `inject`,
  1109. // or `foldl`.
  1110. var reduce = createReduce(1);
  1111. // The right-associative version of reduce, also known as `foldr`.
  1112. var reduceRight = createReduce(-1);
  1113. // Return all the elements that pass a truth test.
  1114. function filter(obj, predicate, context) {
  1115. var results = [];
  1116. predicate = cb(predicate, context);
  1117. each(obj, function(value, index, list) {
  1118. if (predicate(value, index, list)) results.push(value);
  1119. });
  1120. return results;
  1121. }
  1122. // Return all the elements for which a truth test fails.
  1123. function reject(obj, predicate, context) {
  1124. return filter(obj, negate(cb(predicate)), context);
  1125. }
  1126. // Determine whether all of the elements pass a truth test.
  1127. function every(obj, predicate, context) {
  1128. predicate = cb(predicate, context);
  1129. var _keys = !isArrayLike(obj) && keys(obj),
  1130. length = (_keys || obj).length;
  1131. for (var index = 0; index < length; index++) {
  1132. var currentKey = _keys ? _keys[index] : index;
  1133. if (!predicate(obj[currentKey], currentKey, obj)) return false;
  1134. }
  1135. return true;
  1136. }
  1137. // Determine if at least one element in the object passes a truth test.
  1138. function some(obj, predicate, context) {
  1139. predicate = cb(predicate, context);
  1140. var _keys = !isArrayLike(obj) && keys(obj),
  1141. length = (_keys || obj).length;
  1142. for (var index = 0; index < length; index++) {
  1143. var currentKey = _keys ? _keys[index] : index;
  1144. if (predicate(obj[currentKey], currentKey, obj)) return true;
  1145. }
  1146. return false;
  1147. }
  1148. // Determine if the array or object contains a given item (using `===`).
  1149. function contains(obj, item, fromIndex, guard) {
  1150. if (!isArrayLike(obj)) obj = values(obj);
  1151. if (typeof fromIndex != 'number' || guard) fromIndex = 0;
  1152. return indexOf(obj, item, fromIndex) >= 0;
  1153. }
  1154. // Invoke a method (with arguments) on every item in a collection.
  1155. var invoke = restArguments(function(obj, path, args) {
  1156. var contextPath, func;
  1157. if (isFunction$1(path)) {
  1158. func = path;
  1159. } else if (isArray(path)) {
  1160. contextPath = path.slice(0, -1);
  1161. path = path[path.length - 1];
  1162. }
  1163. return map(obj, function(context) {
  1164. var method = func;
  1165. if (!method) {
  1166. if (contextPath && contextPath.length) {
  1167. context = deepGet(context, contextPath);
  1168. }
  1169. if (context == null) return void 0;
  1170. method = context[path];
  1171. }
  1172. return method == null ? method : method.apply(context, args);
  1173. });
  1174. });
  1175. // Convenience version of a common use case of `_.map`: fetching a property.
  1176. function pluck(obj, key) {
  1177. return map(obj, property(key));
  1178. }
  1179. // Convenience version of a common use case of `_.filter`: selecting only
  1180. // objects containing specific `key:value` pairs.
  1181. function where(obj, attrs) {
  1182. return filter(obj, matcher(attrs));
  1183. }
  1184. // Return the maximum element (or element-based computation).
  1185. function max(obj, iteratee, context) {
  1186. var result = -Infinity, lastComputed = -Infinity,
  1187. value, computed;
  1188. if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
  1189. obj = isArrayLike(obj) ? obj : values(obj);
  1190. for (var i = 0, length = obj.length; i < length; i++) {
  1191. value = obj[i];
  1192. if (value != null && value > result) {
  1193. result = value;
  1194. }
  1195. }
  1196. } else {
  1197. iteratee = cb(iteratee, context);
  1198. each(obj, function(v, index, list) {
  1199. computed = iteratee(v, index, list);
  1200. if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
  1201. result = v;
  1202. lastComputed = computed;
  1203. }
  1204. });
  1205. }
  1206. return result;
  1207. }
  1208. // Return the minimum element (or element-based computation).
  1209. function min(obj, iteratee, context) {
  1210. var result = Infinity, lastComputed = Infinity,
  1211. value, computed;
  1212. if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
  1213. obj = isArrayLike(obj) ? obj : values(obj);
  1214. for (var i = 0, length = obj.length; i < length; i++) {
  1215. value = obj[i];
  1216. if (value != null && value < result) {
  1217. result = value;
  1218. }
  1219. }
  1220. } else {
  1221. iteratee = cb(iteratee, context);
  1222. each(obj, function(v, index, list) {
  1223. computed = iteratee(v, index, list);
  1224. if (computed < lastComputed || computed === Infinity && result === Infinity) {
  1225. result = v;
  1226. lastComputed = computed;
  1227. }
  1228. });
  1229. }
  1230. return result;
  1231. }
  1232. // Sample **n** random values from a collection using the modern version of the
  1233. // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
  1234. // If **n** is not specified, returns a single random element.
  1235. // The internal `guard` argument allows it to work with `_.map`.
  1236. function sample(obj, n, guard) {
  1237. if (n == null || guard) {
  1238. if (!isArrayLike(obj)) obj = values(obj);
  1239. return obj[random(obj.length - 1)];
  1240. }
  1241. var sample = isArrayLike(obj) ? clone(obj) : values(obj);
  1242. var length = getLength(sample);
  1243. n = Math.max(Math.min(n, length), 0);
  1244. var last = length - 1;
  1245. for (var index = 0; index < n; index++) {
  1246. var rand = random(index, last);
  1247. var temp = sample[index];
  1248. sample[index] = sample[rand];
  1249. sample[rand] = temp;
  1250. }
  1251. return sample.slice(0, n);
  1252. }
  1253. // Shuffle a collection.
  1254. function shuffle(obj) {
  1255. return sample(obj, Infinity);
  1256. }
  1257. // Sort the object's values by a criterion produced by an iteratee.
  1258. function sortBy(obj, iteratee, context) {
  1259. var index = 0;
  1260. iteratee = cb(iteratee, context);
  1261. return pluck(map(obj, function(value, key, list) {
  1262. return {
  1263. value: value,
  1264. index: index++,
  1265. criteria: iteratee(value, key, list)
  1266. };
  1267. }).sort(function(left, right) {
  1268. var a = left.criteria;
  1269. var b = right.criteria;
  1270. if (a !== b) {
  1271. if (a > b || a === void 0) return 1;
  1272. if (a < b || b === void 0) return -1;
  1273. }
  1274. return left.index - right.index;
  1275. }), 'value');
  1276. }
  1277. // An internal function used for aggregate "group by" operations.
  1278. function group(behavior, partition) {
  1279. return function(obj, iteratee, context) {
  1280. var result = partition ? [[], []] : {};
  1281. iteratee = cb(iteratee, context);
  1282. each(obj, function(value, index) {
  1283. var key = iteratee(value, index, obj);
  1284. behavior(result, value, key);
  1285. });
  1286. return result;
  1287. };
  1288. }
  1289. // Groups the object's values by a criterion. Pass either a string attribute
  1290. // to group by, or a function that returns the criterion.
  1291. var groupBy = group(function(result, value, key) {
  1292. if (has(result, key)) result[key].push(value); else result[key] = [value];
  1293. });
  1294. // Indexes the object's values by a criterion, similar to `_.groupBy`, but for
  1295. // when you know that your index values will be unique.
  1296. var indexBy = group(function(result, value, key) {
  1297. result[key] = value;
  1298. });
  1299. // Counts instances of an object that group by a certain criterion. Pass
  1300. // either a string attribute to count by, or a function that returns the
  1301. // criterion.
  1302. var countBy = group(function(result, value, key) {
  1303. if (has(result, key)) result[key]++; else result[key] = 1;
  1304. });
  1305. // Split a collection into two arrays: one whose elements all pass the given
  1306. // truth test, and one whose elements all do not pass the truth test.
  1307. var partition = group(function(result, value, pass) {
  1308. result[pass ? 0 : 1].push(value);
  1309. }, true);
  1310. // Safely create a real, live array from anything iterable.
  1311. var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
  1312. function toArray(obj) {
  1313. if (!obj) return [];
  1314. if (isArray(obj)) return slice.call(obj);
  1315. if (isString(obj)) {
  1316. // Keep surrogate pair characters together.
  1317. return obj.match(reStrSymbol);
  1318. }
  1319. if (isArrayLike(obj)) return map(obj, identity);
  1320. return values(obj);
  1321. }
  1322. // Return the number of elements in a collection.
  1323. function size(obj) {
  1324. if (obj == null) return 0;
  1325. return isArrayLike(obj) ? obj.length : keys(obj).length;
  1326. }
  1327. // Internal `_.pick` helper function to determine whether `key` is an enumerable
  1328. // property name of `obj`.
  1329. function keyInObj(value, key, obj) {
  1330. return key in obj;
  1331. }
  1332. // Return a copy of the object only containing the allowed properties.
  1333. var pick = restArguments(function(obj, keys) {
  1334. var result = {}, iteratee = keys[0];
  1335. if (obj == null) return result;
  1336. if (isFunction$1(iteratee)) {
  1337. if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
  1338. keys = allKeys(obj);
  1339. } else {
  1340. iteratee = keyInObj;
  1341. keys = flatten(keys, false, false);
  1342. obj = Object(obj);
  1343. }
  1344. for (var i = 0, length = keys.length; i < length; i++) {
  1345. var key = keys[i];
  1346. var value = obj[key];
  1347. if (iteratee(value, key, obj)) result[key] = value;
  1348. }
  1349. return result;
  1350. });
  1351. // Return a copy of the object without the disallowed properties.
  1352. var omit = restArguments(function(obj, keys) {
  1353. var iteratee = keys[0], context;
  1354. if (isFunction$1(iteratee)) {
  1355. iteratee = negate(iteratee);
  1356. if (keys.length > 1) context = keys[1];
  1357. } else {
  1358. keys = map(flatten(keys, false, false), String);
  1359. iteratee = function(value, key) {
  1360. return !contains(keys, key);
  1361. };
  1362. }
  1363. return pick(obj, iteratee, context);
  1364. });
  1365. // Returns everything but the last entry of the array. Especially useful on
  1366. // the arguments object. Passing **n** will return all the values in
  1367. // the array, excluding the last N.
  1368. function initial(array, n, guard) {
  1369. return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
  1370. }
  1371. // Get the first element of an array. Passing **n** will return the first N
  1372. // values in the array. The **guard** check allows it to work with `_.map`.
  1373. function first(array, n, guard) {
  1374. if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
  1375. if (n == null || guard) return array[0];
  1376. return initial(array, array.length - n);
  1377. }
  1378. // Returns everything but the first entry of the `array`. Especially useful on
  1379. // the `arguments` object. Passing an **n** will return the rest N values in the
  1380. // `array`.
  1381. function rest(array, n, guard) {
  1382. return slice.call(array, n == null || guard ? 1 : n);
  1383. }
  1384. // Get the last element of an array. Passing **n** will return the last N
  1385. // values in the array.
  1386. function last(array, n, guard) {
  1387. if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
  1388. if (n == null || guard) return array[array.length - 1];
  1389. return rest(array, Math.max(0, array.length - n));
  1390. }
  1391. // Trim out all falsy values from an array.
  1392. function compact(array) {
  1393. return filter(array, Boolean);
  1394. }
  1395. // Flatten out an array, either recursively (by default), or up to `depth`.
  1396. // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
  1397. function flatten$1(array, depth) {
  1398. return flatten(array, depth, false);
  1399. }
  1400. // Take the difference between one array and a number of other arrays.
  1401. // Only the elements present in just the first array will remain.
  1402. var difference = restArguments(function(array, rest) {
  1403. rest = flatten(rest, true, true);
  1404. return filter(array, function(value){
  1405. return !contains(rest, value);
  1406. });
  1407. });
  1408. // Return a version of the array that does not contain the specified value(s).
  1409. var without = restArguments(function(array, otherArrays) {
  1410. return difference(array, otherArrays);
  1411. });
  1412. // Produce a duplicate-free version of the array. If the array has already
  1413. // been sorted, you have the option of using a faster algorithm.
  1414. // The faster algorithm will not work with an iteratee if the iteratee
  1415. // is not a one-to-one function, so providing an iteratee will disable
  1416. // the faster algorithm.
  1417. function uniq(array, isSorted, iteratee, context) {
  1418. if (!isBoolean(isSorted)) {
  1419. context = iteratee;
  1420. iteratee = isSorted;
  1421. isSorted = false;
  1422. }
  1423. if (iteratee != null) iteratee = cb(iteratee, context);
  1424. var result = [];
  1425. var seen = [];
  1426. for (var i = 0, length = getLength(array); i < length; i++) {
  1427. var value = array[i],
  1428. computed = iteratee ? iteratee(value, i, array) : value;
  1429. if (isSorted && !iteratee) {
  1430. if (!i || seen !== computed) result.push(value);
  1431. seen = computed;
  1432. } else if (iteratee) {
  1433. if (!contains(seen, computed)) {
  1434. seen.push(computed);
  1435. result.push(value);
  1436. }
  1437. } else if (!contains(result, value)) {
  1438. result.push(value);
  1439. }
  1440. }
  1441. return result;
  1442. }
  1443. // Produce an array that contains the union: each distinct element from all of
  1444. // the passed-in arrays.
  1445. var union = restArguments(function(arrays) {
  1446. return uniq(flatten(arrays, true, true));
  1447. });
  1448. // Produce an array that contains every item shared between all the
  1449. // passed-in arrays.
  1450. function intersection(array) {
  1451. var result = [];
  1452. var argsLength = arguments.length;
  1453. for (var i = 0, length = getLength(array); i < length; i++) {
  1454. var item = array[i];
  1455. if (contains(result, item)) continue;
  1456. var j;
  1457. for (j = 1; j < argsLength; j++) {
  1458. if (!contains(arguments[j], item)) break;
  1459. }
  1460. if (j === argsLength) result.push(item);
  1461. }
  1462. return result;
  1463. }
  1464. // Complement of zip. Unzip accepts an array of arrays and groups
  1465. // each array's elements on shared indices.
  1466. function unzip(array) {
  1467. var length = array && max(array, getLength).length || 0;
  1468. var result = Array(length);
  1469. for (var index = 0; index < length; index++) {
  1470. result[index] = pluck(array, index);
  1471. }
  1472. return result;
  1473. }
  1474. // Zip together multiple lists into a single array -- elements that share
  1475. // an index go together.
  1476. var zip = restArguments(unzip);
  1477. // Converts lists into objects. Pass either a single array of `[key, value]`
  1478. // pairs, or two parallel arrays of the same length -- one of keys, and one of
  1479. // the corresponding values. Passing by pairs is the reverse of `_.pairs`.
  1480. function object(list, values) {
  1481. var result = {};
  1482. for (var i = 0, length = getLength(list); i < length; i++) {
  1483. if (values) {
  1484. result[list[i]] = values[i];
  1485. } else {
  1486. result[list[i][0]] = list[i][1];
  1487. }
  1488. }
  1489. return result;
  1490. }
  1491. // Generate an integer Array containing an arithmetic progression. A port of
  1492. // the native Python `range()` function. See
  1493. // [the Python documentation](https://docs.python.org/library/functions.html#range).
  1494. function range(start, stop, step) {
  1495. if (stop == null) {
  1496. stop = start || 0;
  1497. start = 0;
  1498. }
  1499. if (!step) {
  1500. step = stop < start ? -1 : 1;
  1501. }
  1502. var length = Math.max(Math.ceil((stop - start) / step), 0);
  1503. var range = Array(length);
  1504. for (var idx = 0; idx < length; idx++, start += step) {
  1505. range[idx] = start;
  1506. }
  1507. return range;
  1508. }
  1509. // Chunk a single array into multiple arrays, each containing `count` or fewer
  1510. // items.
  1511. function chunk(array, count) {
  1512. if (count == null || count < 1) return [];
  1513. var result = [];
  1514. var i = 0, length = array.length;
  1515. while (i < length) {
  1516. result.push(slice.call(array, i, i += count));
  1517. }
  1518. return result;
  1519. }
  1520. // Helper function to continue chaining intermediate results.
  1521. function chainResult(instance, obj) {
  1522. return instance._chain ? _(obj).chain() : obj;
  1523. }
  1524. // Add your own custom functions to the Underscore object.
  1525. function mixin(obj) {
  1526. each(functions(obj), function(name) {
  1527. var func = _[name] = obj[name];
  1528. _.prototype[name] = function() {
  1529. var args = [this._wrapped];
  1530. push.apply(args, arguments);
  1531. return chainResult(this, func.apply(_, args));
  1532. };
  1533. });
  1534. return _;
  1535. }
  1536. // Add all mutator `Array` functions to the wrapper.
  1537. each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
  1538. var method = ArrayProto[name];
  1539. _.prototype[name] = function() {
  1540. var obj = this._wrapped;
  1541. if (obj != null) {
  1542. method.apply(obj, arguments);
  1543. if ((name === 'shift' || name === 'splice') && obj.length === 0) {
  1544. delete obj[0];
  1545. }
  1546. }
  1547. return chainResult(this, obj);
  1548. };
  1549. });
  1550. // Add all accessor `Array` functions to the wrapper.
  1551. each(['concat', 'join', 'slice'], function(name) {
  1552. var method = ArrayProto[name];
  1553. _.prototype[name] = function() {
  1554. var obj = this._wrapped;
  1555. if (obj != null) obj = method.apply(obj, arguments);
  1556. return chainResult(this, obj);
  1557. };
  1558. });
  1559. // Named Exports
  1560. var allExports = {
  1561. __proto__: null,
  1562. VERSION: VERSION,
  1563. restArguments: restArguments,
  1564. isObject: isObject,
  1565. isNull: isNull,
  1566. isUndefined: isUndefined,
  1567. isBoolean: isBoolean,
  1568. isElement: isElement,
  1569. isString: isString,
  1570. isNumber: isNumber,
  1571. isDate: isDate,
  1572. isRegExp: isRegExp,
  1573. isError: isError,
  1574. isSymbol: isSymbol,
  1575. isMap: isMap,
  1576. isWeakMap: isWeakMap,
  1577. isSet: isSet,
  1578. isWeakSet: isWeakSet,
  1579. isArrayBuffer: isArrayBuffer,
  1580. isDataView: isDataView,
  1581. isArray: isArray,
  1582. isFunction: isFunction$1,
  1583. isArguments: isArguments$1,
  1584. isFinite: isFinite$1,
  1585. isNaN: isNaN$1,
  1586. isTypedArray: isTypedArray$1,
  1587. isEmpty: isEmpty,
  1588. isMatch: isMatch,
  1589. isEqual: isEqual,
  1590. keys: keys,
  1591. allKeys: allKeys,
  1592. values: values,
  1593. pairs: pairs,
  1594. invert: invert,
  1595. functions: functions,
  1596. methods: functions,
  1597. extend: extend,
  1598. extendOwn: extendOwn,
  1599. assign: extendOwn,
  1600. defaults: defaults,
  1601. create: create,
  1602. clone: clone,
  1603. tap: tap,
  1604. has: has$1,
  1605. mapObject: mapObject,
  1606. identity: identity,
  1607. constant: constant,
  1608. noop: noop,
  1609. property: property,
  1610. propertyOf: propertyOf,
  1611. matcher: matcher,
  1612. matches: matcher,
  1613. times: times,
  1614. random: random,
  1615. now: now,
  1616. escape: _escape,
  1617. unescape: _unescape,
  1618. templateSettings: templateSettings,
  1619. template: template,
  1620. result: result,
  1621. uniqueId: uniqueId,
  1622. chain: chain,
  1623. iteratee: iteratee,
  1624. partial: partial,
  1625. bind: bind,
  1626. bindAll: bindAll,
  1627. memoize: memoize,
  1628. delay: delay,
  1629. defer: defer,
  1630. throttle: throttle,
  1631. debounce: debounce,
  1632. wrap: wrap,
  1633. negate: negate,
  1634. compose: compose,
  1635. after: after,
  1636. before: before,
  1637. once: once,
  1638. findKey: findKey,
  1639. findIndex: findIndex,
  1640. findLastIndex: findLastIndex,
  1641. sortedIndex: sortedIndex,
  1642. indexOf: indexOf,
  1643. lastIndexOf: lastIndexOf,
  1644. find: find,
  1645. detect: find,
  1646. findWhere: findWhere,
  1647. each: each,
  1648. forEach: each,
  1649. map: map,
  1650. collect: map,
  1651. reduce: reduce,
  1652. foldl: reduce,
  1653. inject: reduce,
  1654. reduceRight: reduceRight,
  1655. foldr: reduceRight,
  1656. filter: filter,
  1657. select: filter,
  1658. reject: reject,
  1659. every: every,
  1660. all: every,
  1661. some: some,
  1662. any: some,
  1663. contains: contains,
  1664. includes: contains,
  1665. include: contains,
  1666. invoke: invoke,
  1667. pluck: pluck,
  1668. where: where,
  1669. max: max,
  1670. min: min,
  1671. shuffle: shuffle,
  1672. sample: sample,
  1673. sortBy: sortBy,
  1674. groupBy: groupBy,
  1675. indexBy: indexBy,
  1676. countBy: countBy,
  1677. partition: partition,
  1678. toArray: toArray,
  1679. size: size,
  1680. pick: pick,
  1681. omit: omit,
  1682. first: first,
  1683. head: first,
  1684. take: first,
  1685. initial: initial,
  1686. last: last,
  1687. rest: rest,
  1688. tail: rest,
  1689. drop: rest,
  1690. compact: compact,
  1691. flatten: flatten$1,
  1692. without: without,
  1693. uniq: uniq,
  1694. unique: uniq,
  1695. union: union,
  1696. intersection: intersection,
  1697. difference: difference,
  1698. unzip: unzip,
  1699. transpose: unzip,
  1700. zip: zip,
  1701. object: object,
  1702. range: range,
  1703. chunk: chunk,
  1704. mixin: mixin,
  1705. 'default': _
  1706. };
  1707. // Default Export
  1708. // Add all of the Underscore functions to the wrapper object.
  1709. var _$1 = mixin(allExports);
  1710. // Legacy Node.js API.
  1711. _$1._ = _$1;
  1712. // ESM Exports
  1713. export default _$1;
  1714. export { VERSION, after, every as all, allKeys, some as any, extendOwn as assign, before, bind, bindAll, chain, chunk, clone, map as collect, compact, compose, constant, contains, countBy, create, debounce, defaults, defer, delay, find as detect, difference, rest as drop, each, _escape as escape, every, extend, extendOwn, filter, find, findIndex, findKey, findLastIndex, findWhere, first, flatten$1 as flatten, reduce as foldl, reduceRight as foldr, each as forEach, functions, groupBy, has$1 as has, first as head, identity, contains as include, contains as includes, indexBy, indexOf, initial, reduce as inject, intersection, invert, invoke, isArguments$1 as isArguments, isArray, isArrayBuffer, isBoolean, isDataView, isDate, isElement, isEmpty, isEqual, isError, isFinite$1 as isFinite, isFunction$1 as isFunction, isMap, isMatch, isNaN$1 as isNaN, isNull, isNumber, isObject, isRegExp, isSet, isString, isSymbol, isTypedArray$1 as isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, keys, last, lastIndexOf, map, mapObject, matcher, matcher as matches, max, memoize, functions as methods, min, mixin, negate, noop, now, object, omit, once, pairs, partial, partition, pick, pluck, property, propertyOf, random, range, reduce, reduceRight, reject, rest, restArguments, result, sample, filter as select, shuffle, size, some, sortBy, sortedIndex, rest as tail, first as take, tap, template, templateSettings, throttle, times, toArray, unzip as transpose, _unescape as unescape, union, uniq, uniq as unique, uniqueId, unzip, values, where, without, wrap, zip };
  1715. //# sourceMappingURL=underscore-esm.js.map