1 | require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
2 | 'use strict';
|
3 | var isPlainObject = require('lodash/isPlainObject');
|
4 | var isFunction = require('lodash/isFunction');
|
5 | var _find = require('lodash/find');
|
6 | var _extend = require('lodash/extend');
|
7 | var _transform = require('lodash/transform');
|
8 | var _merge = require('lodash/merge');
|
9 | var _get = require('lodash/get');
|
10 | var _set = require('lodash/set');
|
11 | var Inflector = require('./inflector');
|
12 |
|
13 | module.exports = function (jsonapi, data, opts) {
|
14 | var alreadyIncluded = {};
|
15 |
|
16 | function isComplexType(obj) {
|
17 | return Array.isArray(obj) || isPlainObject(obj);
|
18 | }
|
19 |
|
20 | function getValueForRelationship(relationshipData, included) {
|
21 | if (opts && relationshipData && opts[relationshipData.type]) {
|
22 | var valueForRelationshipFct = opts[relationshipData.type]
|
23 | .valueForRelationship;
|
24 |
|
25 | return valueForRelationshipFct(relationshipData, included);
|
26 | } else {
|
27 | return included;
|
28 | }
|
29 | }
|
30 |
|
31 | function findIncluded(relationshipData, relationshipName, from) {
|
32 | return new Promise(function (resolve) {
|
33 | if (!jsonapi.included || !relationshipData) { return resolve(null); }
|
34 |
|
35 | var included = _find(jsonapi.included, {
|
36 | id: relationshipData.id,
|
37 | type: relationshipData.type
|
38 | });
|
39 |
|
40 | var path = [
|
41 | from.type,
|
42 | from.id,
|
43 | relationshipName,
|
44 | relationshipData.type,
|
45 | relationshipData.id,
|
46 | ]
|
47 |
|
48 |
|
49 |
|
50 | if (_get(alreadyIncluded, path, false)) {
|
51 | return resolve(null);
|
52 | } else {
|
53 | _merge(alreadyIncluded, _set({}, path, true));
|
54 | }
|
55 |
|
56 | if (included) {
|
57 | return Promise
|
58 | .all([extractAttributes(included), extractRelationships(included)])
|
59 | .then(function (results) {
|
60 | var attributes = results[0];
|
61 | var relationships = results[1];
|
62 | resolve(_extend(attributes, relationships));
|
63 | });
|
64 | } else {
|
65 | return resolve(null);
|
66 | }
|
67 | });
|
68 | }
|
69 |
|
70 | function keyForAttribute(attribute) {
|
71 | if (isPlainObject(attribute)) {
|
72 | return _transform(attribute, function (result, value, key) {
|
73 | if (isComplexType(value)) {
|
74 | result[keyForAttribute(key)] = keyForAttribute(value);
|
75 | } else {
|
76 | result[keyForAttribute(key)] = value;
|
77 | }
|
78 | });
|
79 | } else if (Array.isArray(attribute)) {
|
80 | return attribute.map(function (attr) {
|
81 | if (isComplexType(attr)) {
|
82 | return keyForAttribute(attr);
|
83 | } else {
|
84 | return attr;
|
85 | }
|
86 | });
|
87 | } else {
|
88 | if (isFunction(opts.keyForAttribute)) {
|
89 | return opts.keyForAttribute(attribute);
|
90 | } else {
|
91 | return Inflector.caserize(attribute, opts);
|
92 | }
|
93 | }
|
94 | }
|
95 |
|
96 | function extractAttributes(from) {
|
97 | var dest = keyForAttribute(from.attributes || {});
|
98 | if ('id' in from) { dest[opts.id || 'id'] = from.id; }
|
99 |
|
100 | if (opts.typeAsAttribute) {
|
101 | if ('type' in from) { dest.type = from.type; }
|
102 | }
|
103 | if ('meta' in from) { dest.meta = keyForAttribute(from.meta || {}) }
|
104 |
|
105 | return dest;
|
106 | }
|
107 |
|
108 | function extractRelationships(from) {
|
109 | if (!from.relationships) { return; }
|
110 |
|
111 | var dest = {};
|
112 |
|
113 | return Promise
|
114 | .all(Object.keys(from.relationships).map(function (key) {
|
115 | var relationship = from.relationships[key];
|
116 |
|
117 | if (relationship.data === null) {
|
118 | dest[keyForAttribute(key)] = null;
|
119 | } else if (Array.isArray(relationship.data)) {
|
120 | return Promise
|
121 | .all(relationship.data.map(function (relationshipData) {
|
122 | return extractIncludes(relationshipData, key, from);
|
123 | }))
|
124 | .then(function (includes) {
|
125 | if (includes) { dest[keyForAttribute(key)] = includes; }
|
126 | });
|
127 | } else {
|
128 | return extractIncludes(relationship.data, key, from)
|
129 | .then(function (include) {
|
130 | if (include) { dest[keyForAttribute(key)] = include; }
|
131 | });
|
132 | }
|
133 | }))
|
134 | .then(function() {
|
135 | return dest;
|
136 | });
|
137 | }
|
138 |
|
139 | function extractIncludes(relationshipData, relationshipName, from) {
|
140 | return findIncluded(relationshipData, relationshipName, from)
|
141 | .then(function (included) {
|
142 | var valueForRelationship = getValueForRelationship(relationshipData,
|
143 | included);
|
144 |
|
145 | if (valueForRelationship && isFunction(valueForRelationship.then)) {
|
146 | return valueForRelationship.then(function (value) {
|
147 | return value;
|
148 | });
|
149 | } else {
|
150 | return valueForRelationship;
|
151 | }
|
152 | });
|
153 | }
|
154 |
|
155 | this.perform = function () {
|
156 | return Promise
|
157 | .all([extractAttributes(data), extractRelationships(data)])
|
158 | .then(function (results) {
|
159 | var attributes = results[0];
|
160 | var relationships = results[1];
|
161 | var record = _extend(attributes, relationships);
|
162 |
|
163 |
|
164 | if (jsonapi.links) {
|
165 | record.links = jsonapi.links;
|
166 | }
|
167 |
|
168 |
|
169 |
|
170 | if (opts && opts.transform) {
|
171 | record = opts.transform(record);
|
172 | }
|
173 |
|
174 | return record;
|
175 | });
|
176 | };
|
177 | };
|
178 |
|
179 | },{"./inflector":5,"lodash/extend":158,"lodash/find":159,"lodash/get":163,"lodash/isFunction":171,"lodash/isPlainObject":176,"lodash/merge":184,"lodash/set":188,"lodash/transform":196}],2:[function(require,module,exports){
|
180 | 'use strict';
|
181 | var isFunction = require('lodash/isFunction');
|
182 | var DeserializerUtils = require('./deserializer-utils');
|
183 |
|
184 | module.exports = function (opts) {
|
185 | if (!opts) { opts = {}; }
|
186 |
|
187 | this.deserialize = function (jsonapi, callback) {
|
188 | function collection() {
|
189 | return Promise
|
190 | .all(jsonapi.data.map(function (d) {
|
191 | return new DeserializerUtils(jsonapi, d, opts).perform();
|
192 | }))
|
193 | .then(function (result) {
|
194 | if (isFunction(callback)) {
|
195 | callback(null, result);
|
196 | }
|
197 |
|
198 | return result
|
199 | });
|
200 | }
|
201 |
|
202 | function resource() {
|
203 | return new DeserializerUtils(jsonapi, jsonapi.data, opts)
|
204 | .perform()
|
205 | .then(function (result) {
|
206 | if (isFunction(callback)) {
|
207 | callback(null, result);
|
208 | }
|
209 |
|
210 | return result
|
211 | });
|
212 | }
|
213 |
|
214 | if (Array.isArray(jsonapi.data)) {
|
215 | return collection();
|
216 | } else {
|
217 | return resource();
|
218 | }
|
219 | };
|
220 | };
|
221 |
|
222 | },{"./deserializer-utils":1,"lodash/isFunction":171}],3:[function(require,module,exports){
|
223 | 'use strict';
|
224 |
|
225 | module.exports = function (errors) {
|
226 | var jsonapi = {
|
227 | errors: []
|
228 | };
|
229 |
|
230 | errors.forEach(function (error) {
|
231 | var opts = {};
|
232 |
|
233 | if (error.id) { opts.id = error.id; }
|
234 | if (error.status) { opts.status = error.status; }
|
235 | if (error.code) { opts.code = error.code; }
|
236 | if (error.title) { opts.title = error.title; }
|
237 | if (error.detail) { opts.detail = error.detail; }
|
238 |
|
239 | if (error.source) {
|
240 | opts.source = {};
|
241 |
|
242 | if (error.source.pointer) {
|
243 | opts.source.pointer = error.source.pointer;
|
244 | }
|
245 |
|
246 | if (error.source.parameter) {
|
247 | opts.source.parameter = error.source.parameter;
|
248 | }
|
249 | }
|
250 |
|
251 | if (error.links) {
|
252 | opts.links = { about: error.links.about };
|
253 | }
|
254 |
|
255 | if (error.meta) {
|
256 | opts.meta = error.meta;
|
257 | }
|
258 |
|
259 | jsonapi.errors.push(opts);
|
260 | });
|
261 |
|
262 | return jsonapi;
|
263 | };
|
264 |
|
265 | },{}],4:[function(require,module,exports){
|
266 | 'use strict';
|
267 | var ErrorUtils = require('./error-utils');
|
268 |
|
269 | module.exports = function (opts) {
|
270 | if (!opts) { opts = []; }
|
271 |
|
272 | if (Array.isArray(opts)) {
|
273 | return new ErrorUtils(opts);
|
274 | } else {
|
275 | return new ErrorUtils([opts]);
|
276 | }
|
277 | };
|
278 |
|
279 |
|
280 | },{"./error-utils":3}],5:[function(require,module,exports){
|
281 | 'use strict';
|
282 | var Inflector = require('inflected');
|
283 |
|
284 | module.exports = {
|
285 | caserize: function (attribute, opts) {
|
286 | attribute = Inflector.underscore(attribute);
|
287 |
|
288 | switch (opts.keyForAttribute) {
|
289 | case 'dash-case':
|
290 | case 'lisp-case':
|
291 | case 'spinal-case':
|
292 | case 'kebab-case':
|
293 | return Inflector.dasherize(attribute);
|
294 | case 'underscore_case':
|
295 | case 'snake_case':
|
296 | return attribute;
|
297 | case 'CamelCase':
|
298 | return Inflector.camelize(attribute);
|
299 | case 'camelCase':
|
300 | return Inflector.camelize(attribute, false);
|
301 | default:
|
302 | return Inflector.dasherize(attribute);
|
303 | }
|
304 | },
|
305 | pluralize: function (type) {
|
306 | return Inflector.pluralize(type);
|
307 | }
|
308 | };
|
309 |
|
310 | },{"inflected":8}],6:[function(require,module,exports){
|
311 | 'use strict';
|
312 | var isPlainObject = require('lodash/isPlainObject');
|
313 | var isFunction = require('lodash/isFunction');
|
314 | var _find = require('lodash/find');
|
315 | var _merge = require('lodash/merge');
|
316 | var _identity = require('lodash/identity');
|
317 | var _transform = require('lodash/transform');
|
318 | var _mapValues = require('lodash/mapValues');
|
319 | var _mapKeys = require('lodash/mapKeys');
|
320 | var _pick = require('lodash/pick');
|
321 | var _pickBy = require('lodash/pickBy');
|
322 | var _keys = require('lodash/keys');
|
323 | var _each = require('lodash/each');
|
324 | var _isNil = require('lodash/isNil');
|
325 | var Inflector = require('./inflector');
|
326 |
|
327 | module.exports = function (collectionName, record, payload, opts) {
|
328 | function isComplexType(obj) {
|
329 | return Array.isArray(obj) || isPlainObject(obj);
|
330 | }
|
331 |
|
332 | function keyForAttribute(attribute) {
|
333 | if (isPlainObject(attribute)) {
|
334 | return _transform(attribute, function (result, value, key) {
|
335 | if (isComplexType(value)) {
|
336 | result[keyForAttribute(key)] = keyForAttribute(value);
|
337 | } else {
|
338 | result[keyForAttribute(key)] = value;
|
339 | }
|
340 | });
|
341 | } else if (Array.isArray(attribute)) {
|
342 | return attribute.map(function (attr) {
|
343 | if (isComplexType(attr)) {
|
344 | return keyForAttribute(attr);
|
345 | } else {
|
346 | return attr;
|
347 | }
|
348 | });
|
349 | } else {
|
350 | if (isFunction(opts.keyForAttribute)) {
|
351 | return opts.keyForAttribute(attribute);
|
352 | } else {
|
353 | return Inflector.caserize(attribute, opts);
|
354 | }
|
355 | }
|
356 | }
|
357 |
|
358 | function getId() {
|
359 | return opts.id || 'id';
|
360 | }
|
361 |
|
362 | function getRef(current, item, opts) {
|
363 | if (isFunction(opts.ref)) {
|
364 | return opts.ref(current, item);
|
365 | } else if (opts.ref === true) {
|
366 | if (Array.isArray(item)) {
|
367 | return item.map(function (val) {
|
368 | return String(val);
|
369 | });
|
370 | } else if (item) {
|
371 | return String(item);
|
372 | }
|
373 | } else if (item && item[opts.ref]){
|
374 | return String(item[opts.ref]);
|
375 | }
|
376 | }
|
377 |
|
378 | function getType(str, attrVal) {
|
379 | var type;
|
380 | attrVal = attrVal || {};
|
381 |
|
382 | if (isFunction(opts.typeForAttribute)) {
|
383 | type = opts.typeForAttribute(str, attrVal);
|
384 | }
|
385 |
|
386 |
|
387 | if ((opts.pluralizeType === undefined || opts.pluralizeType) && type === undefined) {
|
388 | type = Inflector.pluralize(str);
|
389 | }
|
390 |
|
391 | if (type === undefined) {
|
392 | type = str;
|
393 | }
|
394 |
|
395 | return type;
|
396 | }
|
397 |
|
398 | function getLinks(current, links, dest) {
|
399 | return _mapValues(links, function (value) {
|
400 | if (isFunction(value)) {
|
401 | return value(record, current, dest);
|
402 | } else {
|
403 | return value;
|
404 | }
|
405 | });
|
406 | }
|
407 |
|
408 | function getMeta(current, meta) {
|
409 | if (isFunction(meta)) {
|
410 | return meta(record);
|
411 | } else {
|
412 | return _mapValues(meta, function (value) {
|
413 | if (isFunction(value)) {
|
414 | return value(record, current);
|
415 | } else {
|
416 | return value;
|
417 | }
|
418 | });
|
419 | }
|
420 | }
|
421 |
|
422 | function pick(obj, attributes) {
|
423 | return _mapKeys(_pick(obj, attributes), function (value, key) {
|
424 | return keyForAttribute(key);
|
425 | });
|
426 | }
|
427 |
|
428 | function isCompoundDocumentIncluded(included, item) {
|
429 | return _find(payload.included, { id: item.id, type: item.type });
|
430 | }
|
431 |
|
432 | function pushToIncluded(dest, include) {
|
433 | var included = isCompoundDocumentIncluded(dest, include);
|
434 | if (included) {
|
435 |
|
436 | included.relationships = _merge(included.relationships,
|
437 | _pickBy(include.relationships, _identity));
|
438 |
|
439 |
|
440 | included.attributes = _merge(included.attributes,
|
441 | _pickBy(include.attributes, _identity));
|
442 | } else {
|
443 | if (!dest.included) { dest.included = []; }
|
444 | dest.included.push(include);
|
445 | }
|
446 | }
|
447 |
|
448 | this.serialize = function (dest, current, attribute, opts) {
|
449 | var that = this;
|
450 | var data = null;
|
451 |
|
452 | if (opts && opts.ref) {
|
453 | if (!dest.relationships) { dest.relationships = {}; }
|
454 |
|
455 | if (Array.isArray(current[attribute])) {
|
456 | data = current[attribute].map(function (item) {
|
457 | return that.serializeRef(item, current, attribute, opts);
|
458 | });
|
459 | } else {
|
460 | data = that.serializeRef(current[attribute], current, attribute,
|
461 | opts);
|
462 | }
|
463 |
|
464 | dest.relationships[keyForAttribute(attribute)] = {};
|
465 | if (!opts.ignoreRelationshipData) {
|
466 | dest.relationships[keyForAttribute(attribute)].data = data;
|
467 | }
|
468 |
|
469 | if (opts.relationshipLinks) {
|
470 | var links = getLinks(current[attribute], opts.relationshipLinks, dest);
|
471 | if (links.related) {
|
472 | dest.relationships[keyForAttribute(attribute)].links = links;
|
473 | }
|
474 | }
|
475 |
|
476 | if (opts.relationshipMeta) {
|
477 | dest.relationships[keyForAttribute(attribute)].meta =
|
478 | getMeta(current[attribute], opts.relationshipMeta);
|
479 | }
|
480 | } else {
|
481 | if (Array.isArray(current[attribute])) {
|
482 | if (current[attribute].length && isPlainObject(current[attribute][0])) {
|
483 | data = current[attribute].map(function (item) {
|
484 | return that.serializeNested(item, current, attribute, opts);
|
485 | });
|
486 | } else {
|
487 | data = current[attribute];
|
488 | }
|
489 |
|
490 | dest.attributes[keyForAttribute(attribute)] = data;
|
491 | } else if (isPlainObject(current[attribute])) {
|
492 | data = that.serializeNested(current[attribute], current, attribute, opts);
|
493 | dest.attributes[keyForAttribute(attribute)] = data;
|
494 | } else {
|
495 | dest.attributes[keyForAttribute(attribute)] = current[attribute];
|
496 | }
|
497 | }
|
498 | };
|
499 |
|
500 | this.serializeRef = function (dest, current, attribute, opts) {
|
501 | var that = this;
|
502 | var id = getRef(current, dest, opts);
|
503 | var type = getType(attribute, dest);
|
504 |
|
505 | var relationships = [];
|
506 | var includedAttrs = [];
|
507 |
|
508 | if (opts.attributes) {
|
509 | if (dest) {
|
510 | opts.attributes.forEach(function (attr) {
|
511 | if (opts[attr] && !dest[attr] && opts[attr].nullIfMissing) {
|
512 | dest[attr] = null;
|
513 | }
|
514 | });
|
515 | }
|
516 | relationships = opts.attributes.filter(function (attr) {
|
517 | return opts[attr];
|
518 | });
|
519 |
|
520 | includedAttrs = opts.attributes.filter(function (attr) {
|
521 | return !opts[attr];
|
522 | });
|
523 | }
|
524 |
|
525 | var included = { type: type, id: id };
|
526 | if (includedAttrs) { included.attributes = pick(dest, includedAttrs); }
|
527 |
|
528 | relationships.forEach(function (relationship) {
|
529 | if (dest && (isComplexType(dest[relationship]) || dest[relationship] === null)) {
|
530 | that.serialize(included, dest, relationship, opts[relationship]);
|
531 | }
|
532 | });
|
533 |
|
534 | if (includedAttrs.length &&
|
535 | (opts.included === undefined || opts.included)) {
|
536 | if (opts.includedLinks) {
|
537 | included.links = getLinks(dest, opts.includedLinks);
|
538 | }
|
539 |
|
540 | if (typeof id !== 'undefined') { pushToIncluded(payload, included); }
|
541 | }
|
542 |
|
543 | return typeof id !== 'undefined' ? { type: type, id: id } : null;
|
544 | };
|
545 |
|
546 | this.serializeNested = function (dest, current, attribute, opts) {
|
547 | var that = this;
|
548 |
|
549 | var embeds = [];
|
550 | var attributes = [];
|
551 |
|
552 | if (opts && opts.attributes) {
|
553 | embeds = opts.attributes.filter(function (attr) {
|
554 | return opts[attr];
|
555 | });
|
556 |
|
557 | attributes = opts.attributes.filter(function (attr) {
|
558 | return !opts[attr];
|
559 | });
|
560 | } else {
|
561 | attributes = _keys(dest);
|
562 | }
|
563 |
|
564 | var ret = {};
|
565 | if (attributes) { ret.attributes = pick(dest, attributes); }
|
566 |
|
567 | embeds.forEach(function (embed) {
|
568 | if (isComplexType(dest[embed])) {
|
569 | that.serialize(ret, dest, embed, opts[embed]);
|
570 | }
|
571 | });
|
572 |
|
573 | return ret.attributes;
|
574 | };
|
575 |
|
576 | this.perform = function () {
|
577 | var that = this;
|
578 |
|
579 | if( record === null ){
|
580 | return null;
|
581 | }
|
582 |
|
583 |
|
584 | if (opts && opts.transform) {
|
585 | record = opts.transform(record);
|
586 | }
|
587 |
|
588 |
|
589 | var data = { type: getType(collectionName, record) };
|
590 | if (!_isNil(record[getId()])) { data.id = String(record[getId()]); }
|
591 |
|
592 |
|
593 | if (opts.dataLinks) {
|
594 | data.links = getLinks(record, opts.dataLinks);
|
595 | }
|
596 |
|
597 |
|
598 | if (opts.dataMeta) {
|
599 | data.meta = getMeta(record, opts.dataMeta);
|
600 | }
|
601 |
|
602 | _each(opts.attributes, function (attribute) {
|
603 | var splittedAttributes = attribute.split(':');
|
604 |
|
605 | if (opts[attribute] && !record[attribute] && opts[attribute].nullIfMissing) {
|
606 | record[attribute] = null;
|
607 | }
|
608 |
|
609 | if (splittedAttributes[0] in record) {
|
610 | if (!data.attributes) { data.attributes = {}; }
|
611 |
|
612 | var attributeMap = attribute;
|
613 | if (splittedAttributes.length > 1) {
|
614 | attribute = splittedAttributes[0];
|
615 | attributeMap = splittedAttributes[1];
|
616 | }
|
617 |
|
618 | that.serialize(data, record, attribute, opts[attributeMap]);
|
619 | }
|
620 | });
|
621 |
|
622 | return data;
|
623 | };
|
624 | };
|
625 |
|
626 | },{"./inflector":5,"lodash/each":156,"lodash/find":159,"lodash/identity":165,"lodash/isFunction":171,"lodash/isNil":173,"lodash/isPlainObject":176,"lodash/keys":179,"lodash/mapKeys":181,"lodash/mapValues":182,"lodash/merge":184,"lodash/pick":185,"lodash/pickBy":186,"lodash/transform":196}],7:[function(require,module,exports){
|
627 | 'use strict';
|
628 | var isFunction = require('lodash/isFunction');
|
629 | var _mapValues = require('lodash/mapValues');
|
630 | var SerializerUtils = require('./serializer-utils');
|
631 |
|
632 | module.exports = function (collectionName, records, opts) {
|
633 | this.serialize = function (records) {
|
634 | var that = this;
|
635 | var payload = {};
|
636 |
|
637 | function getLinks(links) {
|
638 | return _mapValues(links, function (value) {
|
639 | if (isFunction(value)) {
|
640 | return value(records);
|
641 | } else {
|
642 | return value;
|
643 | }
|
644 | });
|
645 | }
|
646 |
|
647 | function collection() {
|
648 | payload.data = [];
|
649 |
|
650 | records.forEach(function (record) {
|
651 | var serializerUtils = new SerializerUtils(that.collectionName, record,
|
652 | payload, that.opts);
|
653 | payload.data.push(serializerUtils.perform());
|
654 | });
|
655 |
|
656 | return payload;
|
657 | }
|
658 |
|
659 | function resource() {
|
660 | payload.data = new SerializerUtils(that.collectionName, records, payload,
|
661 | that.opts).perform(records);
|
662 |
|
663 | return payload;
|
664 | }
|
665 |
|
666 | if (that.opts.topLevelLinks) {
|
667 | payload.links = getLinks(that.opts.topLevelLinks);
|
668 | }
|
669 |
|
670 | if (that.opts.meta) {
|
671 | payload.meta = _mapValues(that.opts.meta, function (value) {
|
672 | if (isFunction(value)) {
|
673 | return value(records);
|
674 | } else {
|
675 | return value;
|
676 | }
|
677 | });
|
678 | }
|
679 |
|
680 | if (Array.isArray(records)) {
|
681 | return collection(records);
|
682 | } else {
|
683 | return resource(records);
|
684 | }
|
685 | };
|
686 |
|
687 | if (arguments.length === 3) {
|
688 |
|
689 | this.collectionName = collectionName;
|
690 | this.opts = opts;
|
691 | return this.serialize(records);
|
692 | } else {
|
693 |
|
694 | this.collectionName = collectionName;
|
695 | this.opts = records;
|
696 | }
|
697 | };
|
698 |
|
699 | },{"./serializer-utils":6,"lodash/isFunction":171,"lodash/mapValues":182}],8:[function(require,module,exports){
|
700 | "use strict";
|
701 |
|
702 | module.exports = require('./lib/Inflector');
|
703 |
|
704 | },{"./lib/Inflector":10}],9:[function(require,module,exports){
|
705 | (function (process,global){
|
706 | 'use strict';
|
707 |
|
708 | var hasProp = require('./hasProp');
|
709 | var remove = require('./remove');
|
710 | var icPart = require('./icPart');
|
711 |
|
712 | function Inflections() {
|
713 | this.plurals = [];
|
714 | this.singulars = [];
|
715 | this.uncountables = [];
|
716 | this.humans = [];
|
717 | this.acronyms = {};
|
718 | this.acronymRegex = /(?=a)b/;
|
719 | }
|
720 |
|
721 | Inflections.getInstance = function(locale) {
|
722 | var storage = typeof process !== 'undefined' ? process : global;
|
723 | storage.__Inflector_Inflections = storage.__Inflector_Inflections || {};
|
724 | storage.__Inflector_Inflections[locale] = storage.__Inflector_Inflections[locale] || new Inflections();
|
725 |
|
726 | return storage.__Inflector_Inflections[locale];
|
727 | };
|
728 |
|
729 | Inflections.prototype.acronym = function(word) {
|
730 | this.acronyms[word.toLowerCase()] = word;
|
731 |
|
732 | var values = [];
|
733 |
|
734 | for (var key in this.acronyms) {
|
735 | if (hasProp(this.acronyms, key)) {
|
736 | values.push(this.acronyms[key]);
|
737 | }
|
738 | }
|
739 |
|
740 | this.acronymRegex = new RegExp(values.join('|'));
|
741 | };
|
742 |
|
743 | Inflections.prototype.plural = function(rule, replacement) {
|
744 | if (typeof rule === 'string') {
|
745 | remove(this.uncountables, rule);
|
746 | }
|
747 |
|
748 | remove(this.uncountables, replacement);
|
749 | this.plurals.unshift([rule, replacement]);
|
750 | };
|
751 |
|
752 | Inflections.prototype.singular = function(rule, replacement) {
|
753 | if (typeof rule === 'string') {
|
754 | remove(this.uncountables, rule);
|
755 | }
|
756 |
|
757 | remove(this.uncountables, replacement);
|
758 | this.singulars.unshift([rule, replacement]);
|
759 | };
|
760 |
|
761 | Inflections.prototype.irregular = function(singular, plural) {
|
762 | remove(this.uncountables, singular);
|
763 | remove(this.uncountables, plural);
|
764 |
|
765 | var s0 = singular[0];
|
766 | var sRest = singular.substr(1);
|
767 |
|
768 | var p0 = plural[0];
|
769 | var pRest = plural.substr(1);
|
770 |
|
771 | if (s0.toUpperCase() === p0.toUpperCase()) {
|
772 | this.plural(new RegExp('(' + s0 + ')' + sRest + '$', 'i'), '$1' + pRest);
|
773 | this.plural(new RegExp('(' + p0 + ')' + pRest + '$', 'i'), '$1' + pRest);
|
774 |
|
775 | this.singular(new RegExp('(' + s0 + ')' + sRest + '$', 'i'), '$1' + sRest);
|
776 | this.singular(new RegExp('(' + p0 + ')' + pRest + '$', 'i'), '$1' + sRest);
|
777 | } else {
|
778 | var sRestIC = icPart(sRest);
|
779 | var pRestIC = icPart(pRest);
|
780 |
|
781 | this.plural(new RegExp(s0.toUpperCase() + sRestIC + '$'), p0.toUpperCase() + pRest);
|
782 | this.plural(new RegExp(s0.toLowerCase() + sRestIC + '$'), p0.toLowerCase() + pRest);
|
783 | this.plural(new RegExp(p0.toUpperCase() + pRestIC + '$'), p0.toUpperCase() + pRest);
|
784 | this.plural(new RegExp(p0.toLowerCase() + pRestIC + '$'), p0.toLowerCase() + pRest);
|
785 |
|
786 | this.singular(new RegExp(s0.toUpperCase() + sRestIC + '$'), s0.toUpperCase() + sRest);
|
787 | this.singular(new RegExp(s0.toLowerCase() + sRestIC + '$'), s0.toLowerCase() + sRest);
|
788 | this.singular(new RegExp(p0.toUpperCase() + pRestIC + '$'), s0.toUpperCase() + sRest);
|
789 | this.singular(new RegExp(p0.toLowerCase() + pRestIC + '$'), s0.toLowerCase() + sRest);
|
790 | }
|
791 | };
|
792 |
|
793 | Inflections.prototype.uncountable = function() {
|
794 | var words = Array.prototype.slice.call(arguments, 0);
|
795 | this.uncountables = this.uncountables.concat(words);
|
796 | };
|
797 |
|
798 | Inflections.prototype.human = function(rule, replacement) {
|
799 | this.humans.unshift([rule, replacement]);
|
800 | };
|
801 |
|
802 | Inflections.prototype.clear = function(scope) {
|
803 | scope = scope || 'all';
|
804 |
|
805 | if (scope === 'all') {
|
806 | this.plurals = [];
|
807 | this.singulars = [];
|
808 | this.uncountables = [];
|
809 | this.humans = [];
|
810 | } else {
|
811 | this[scope] = [];
|
812 | }
|
813 | };
|
814 |
|
815 | module.exports = Inflections;
|
816 |
|
817 | }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
818 | },{"./hasProp":14,"./icPart":15,"./remove":17,"_process":197}],10:[function(require,module,exports){
|
819 | 'use strict';
|
820 |
|
821 | var Inflections = require('./Inflections');
|
822 | var Transliterator = require('./Transliterator');
|
823 | var Methods = require('./Methods');
|
824 | var defaults = require('./defaults');
|
825 | var isFunc = require('./isFunc');
|
826 |
|
827 | var Inflector = Methods;
|
828 |
|
829 | Inflector.inflections = function(locale, fn) {
|
830 | if (isFunc(locale)) {
|
831 | fn = locale;
|
832 | locale = null;
|
833 | }
|
834 |
|
835 | locale = locale || 'en';
|
836 |
|
837 | if (fn) {
|
838 | fn(Inflections.getInstance(locale));
|
839 | } else {
|
840 | return Inflections.getInstance(locale);
|
841 | }
|
842 | };
|
843 |
|
844 | Inflector.transliterations = function(locale, fn) {
|
845 | if (isFunc(locale)) {
|
846 | fn = locale;
|
847 | locale = null;
|
848 | }
|
849 |
|
850 | locale = locale || 'en';
|
851 |
|
852 | if (fn) {
|
853 | fn(Transliterator.getInstance(locale));
|
854 | } else {
|
855 | return Transliterator.getInstance(locale);
|
856 | }
|
857 | }
|
858 |
|
859 | for (var locale in defaults) {
|
860 | Inflector.inflections(locale, defaults[locale]);
|
861 | }
|
862 |
|
863 | module.exports = Inflector;
|
864 |
|
865 | },{"./Inflections":9,"./Methods":11,"./Transliterator":12,"./defaults":13,"./isFunc":16}],11:[function(require,module,exports){
|
866 | 'use strict';
|
867 |
|
868 | var Methods = {
|
869 | pluralize: function(word, locale) {
|
870 | locale = locale || 'en';
|
871 |
|
872 | return this._applyInflections(word, this.inflections(locale).plurals);
|
873 | },
|
874 |
|
875 | singularize: function(word, locale) {
|
876 | locale = locale || 'en';
|
877 |
|
878 | return this._applyInflections(word, this.inflections(locale).singulars);
|
879 | },
|
880 |
|
881 | camelize: function(term, uppercaseFirstLetter) {
|
882 | if (uppercaseFirstLetter === null || uppercaseFirstLetter === undefined) {
|
883 | uppercaseFirstLetter = true;
|
884 | }
|
885 |
|
886 | var result = '' + term, self = this;
|
887 |
|
888 | if (uppercaseFirstLetter) {
|
889 | result = result.replace(/^[a-z\d]*/, function(a) {
|
890 | return self.inflections().acronyms[a] || self.capitalize(a);
|
891 | });
|
892 | } else {
|
893 | result = result.replace(new RegExp('^(?:' + this.inflections().acronymRegex.source + '(?=\\b|[A-Z_])|\\w)'), function(a) {
|
894 | return a.toLowerCase();
|
895 | });
|
896 | }
|
897 |
|
898 | result = result.replace(/(?:_|(\/))([a-z\d]*)/gi, function(match, a, b, idx, string) {
|
899 | a || (a = '');
|
900 | return '' + a + (self.inflections().acronyms[b] || self.capitalize(b));
|
901 | });
|
902 |
|
903 | return result;
|
904 | },
|
905 |
|
906 | underscore: function(camelCasedWord) {
|
907 | var result = '' + camelCasedWord;
|
908 |
|
909 | result = result.replace(new RegExp('(?:([A-Za-z\\d])|^)(' + this.inflections().acronymRegex.source + ')(?=\\b|[^a-z])', 'g'), function(match, $1, $2) {
|
910 | return '' + ($1 || '') + ($1 ? '_' : '') + $2.toLowerCase();
|
911 | });
|
912 |
|
913 | result = result.replace(/([A-Z\d]+)([A-Z][a-z])/g, '$1_$2');
|
914 | result = result.replace(/([a-z\d])([A-Z])/g, '$1_$2');
|
915 | result = result.replace(/-/g, '_');
|
916 |
|
917 | return result.toLowerCase();
|
918 | },
|
919 |
|
920 | humanize: function(lowerCaseAndUnderscoredWord, options) {
|
921 | var result = '' + lowerCaseAndUnderscoredWord;
|
922 | var humans = this.inflections().humans;
|
923 | var human, rule, replacement;
|
924 | var self = this;
|
925 |
|
926 | options = options || {};
|
927 |
|
928 | if (options.capitalize === null || options.capitalize === undefined) {
|
929 | options.capitalize = true;
|
930 | }
|
931 |
|
932 | for (var i = 0, ii = humans.length; i < ii; i++) {
|
933 | human = humans[i];
|
934 | rule = human[0];
|
935 | replacement = human[1];
|
936 |
|
937 | if (rule.test && rule.test(result) || result.indexOf(rule) > -1) {
|
938 | result = result.replace(rule, replacement);
|
939 | break;
|
940 | }
|
941 | }
|
942 |
|
943 | result = result.replace(/_id$/, '');
|
944 | result = result.replace(/_/g, ' ');
|
945 |
|
946 | result = result.replace(/([a-z\d]*)/gi, function(match) {
|
947 | return self.inflections().acronyms[match] || match.toLowerCase();
|
948 | });
|
949 |
|
950 | if (options.capitalize) {
|
951 | result = result.replace(/^\w/, function(match) {
|
952 | return match.toUpperCase();
|
953 | });
|
954 | }
|
955 |
|
956 | return result;
|
957 | },
|
958 |
|
959 | capitalize: function(str) {
|
960 | var result = str === null || str === undefined ? '' : String(str);
|
961 | return result.charAt(0).toUpperCase() + result.slice(1);
|
962 | },
|
963 |
|
964 | titleize: function(word) {
|
965 | return this.humanize(this.underscore(word)).replace(/(^|[\s¿\/]+)([a-z])/g, function(match, boundary, letter, idx, string) {
|
966 | return match.replace(letter, letter.toUpperCase());
|
967 | });
|
968 | },
|
969 |
|
970 | tableize: function(className) {
|
971 | return this.pluralize(this.underscore(className));
|
972 | },
|
973 |
|
974 | classify: function(tableName) {
|
975 | return this.camelize(this.singularize(tableName.replace(/.*\./g, '')));
|
976 | },
|
977 |
|
978 | dasherize: function(underscoredWord) {
|
979 | return underscoredWord.replace(/_/g, '-');
|
980 | },
|
981 |
|
982 | foreignKey: function(className, separateWithUnderscore) {
|
983 | if (separateWithUnderscore === null || separateWithUnderscore === undefined) {
|
984 | separateWithUnderscore = true;
|
985 | }
|
986 |
|
987 | return this.underscore(className) + (separateWithUnderscore ? '_id' : 'id');
|
988 | },
|
989 |
|
990 | ordinal: function(number) {
|
991 | var absNumber = Math.abs(Number(number));
|
992 | var mod100 = absNumber % 100;
|
993 |
|
994 | if (mod100 === 11 || mod100 === 12 || mod100 === 13) {
|
995 | return 'th';
|
996 | } else {
|
997 | switch (absNumber % 10) {
|
998 | case 1: return 'st';
|
999 | case 2: return 'nd';
|
1000 | case 3: return 'rd';
|
1001 | default: return 'th';
|
1002 | }
|
1003 | }
|
1004 | },
|
1005 |
|
1006 | ordinalize: function(number) {
|
1007 | return '' + number + this.ordinal(number);
|
1008 | },
|
1009 |
|
1010 | transliterate: function(string, options) {
|
1011 | options = options || {};
|
1012 |
|
1013 | var locale = options.locale || 'en';
|
1014 | var replacement = options.replacement || '?';
|
1015 |
|
1016 | return this.transliterations(locale).transliterate(string, replacement);
|
1017 | },
|
1018 |
|
1019 | parameterize: function(string, options) {
|
1020 | options = options || {};
|
1021 |
|
1022 | if (options.separator === undefined) {
|
1023 | options.separator = '-';
|
1024 | }
|
1025 |
|
1026 | if (options.separator === null) {
|
1027 | options.separator = '';
|
1028 | }
|
1029 |
|
1030 |
|
1031 | var result = this.transliterate(string, options);
|
1032 |
|
1033 | result = result.replace(/[^a-z0-9\-_]+/ig, options.separator);
|
1034 |
|
1035 | if (options.separator.length) {
|
1036 | var separatorRegex = new RegExp(options.separator);
|
1037 |
|
1038 |
|
1039 | result = result.replace(new RegExp(separatorRegex.source + '{2,}'), options.separator);
|
1040 |
|
1041 |
|
1042 | result = result.replace(new RegExp('^' + separatorRegex.source + '|' + separatorRegex.source + '$', 'i'), '');
|
1043 | }
|
1044 |
|
1045 | return result.toLowerCase();
|
1046 | },
|
1047 |
|
1048 | _applyInflections: function(word, rules) {
|
1049 | var result = '' + word, rule, regex, replacement;
|
1050 |
|
1051 | if (result.length === 0) {
|
1052 | return result;
|
1053 | } else {
|
1054 | var match = result.toLowerCase().match(/\b\w+$/);
|
1055 |
|
1056 | if (match && this.inflections().uncountables.indexOf(match[0]) > -1) {
|
1057 | return result;
|
1058 | } else {
|
1059 | for (var i = 0, ii = rules.length; i < ii; i++) {
|
1060 | rule = rules[i];
|
1061 |
|
1062 | regex = rule[0];
|
1063 | replacement = rule[1];
|
1064 |
|
1065 | if (result.match(regex)) {
|
1066 | result = result.replace(regex, replacement);
|
1067 | break;
|
1068 | }
|
1069 | }
|
1070 |
|
1071 | return result;
|
1072 | }
|
1073 | }
|
1074 | }
|
1075 | };
|
1076 |
|
1077 | module.exports = Methods;
|
1078 |
|
1079 | },{}],12:[function(require,module,exports){
|
1080 | (function (process,global){
|
1081 | 'use strict';
|
1082 |
|
1083 | var DEFAULT_APPROXIMATIONS = {
|
1084 | 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE',
|
1085 | 'Ç': 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I',
|
1086 | 'Î': 'I', 'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O',
|
1087 | 'Õ': 'O', 'Ö': 'O', '×': 'x', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U',
|
1088 | 'Ü': 'U', 'Ý': 'Y', 'Þ': 'Th', 'ß': 'ss', 'à': 'a', 'á': 'a', 'â': 'a',
|
1089 | 'ã': 'a', 'ä': 'a', 'å': 'a', 'æ': 'ae', 'ç': 'c', 'è': 'e', 'é': 'e',
|
1090 | 'ê': 'e', 'ë': 'e', 'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i', 'ð': 'd',
|
1091 | 'ñ': 'n', 'ò': 'o', 'ó': 'o', 'ô': 'o', 'õ': 'o', 'ö': 'o', 'ø': 'o',
|
1092 | 'ù': 'u', 'ú': 'u', 'û': 'u', 'ü': 'u', 'ý': 'y', 'þ': 'th', 'ÿ': 'y',
|
1093 | 'Ā': 'A', 'ā': 'a', 'Ă': 'A', 'ă': 'a', 'Ą': 'A', 'ą': 'a', 'Ć': 'C',
|
1094 | 'ć': 'c', 'Ĉ': 'C', 'ĉ': 'c', 'Ċ': 'C', 'ċ': 'c', 'Č': 'C', 'č': 'c',
|
1095 | 'Ď': 'D', 'ď': 'd', 'Đ': 'D', 'đ': 'd', 'Ē': 'E', 'ē': 'e', 'Ĕ': 'E',
|
1096 | 'ĕ': 'e', 'Ė': 'E', 'ė': 'e', 'Ę': 'E', 'ę': 'e', 'Ě': 'E', 'ě': 'e',
|
1097 | 'Ĝ': 'G', 'ĝ': 'g', 'Ğ': 'G', 'ğ': 'g', 'Ġ': 'G', 'ġ': 'g', 'Ģ': 'G',
|
1098 | 'ģ': 'g', 'Ĥ': 'H', 'ĥ': 'h', 'Ħ': 'H', 'ħ': 'h', 'Ĩ': 'I', 'ĩ': 'i',
|
1099 | 'Ī': 'I', 'ī': 'i', 'Ĭ': 'I', 'ĭ': 'i', 'Į': 'I', 'į': 'i', 'İ': 'I',
|
1100 | 'ı': 'i', 'IJ': 'IJ', 'ij': 'ij', 'Ĵ': 'J', 'ĵ': 'j', 'Ķ': 'K', 'ķ': 'k',
|
1101 | 'ĸ': 'k', 'Ĺ': 'L', 'ĺ': 'l', 'Ļ': 'L', 'ļ': 'l', 'Ľ': 'L', 'ľ': 'l',
|
1102 | 'Ŀ': 'L', 'ŀ': 'l', 'Ł': 'L', 'ł': 'l', 'Ń': 'N', 'ń': 'n', 'Ņ': 'N',
|
1103 | 'ņ': 'n', 'Ň': 'N', 'ň': 'n', 'ʼn': '\'n', 'Ŋ': 'NG', 'ŋ': 'ng',
|
1104 | 'Ō': 'O', 'ō': 'o', 'Ŏ': 'O', 'ŏ': 'o', 'Ő': 'O', 'ő': 'o', 'Œ': 'OE',
|
1105 | 'œ': 'oe', 'Ŕ': 'R', 'ŕ': 'r', 'Ŗ': 'R', 'ŗ': 'r', 'Ř': 'R', 'ř': 'r',
|
1106 | 'Ś': 'S', 'ś': 's', 'Ŝ': 'S', 'ŝ': 's', 'Ş': 'S', 'ş': 's', 'Š': 'S',
|
1107 | 'š': 's', 'Ţ': 'T', 'ţ': 't', 'Ť': 'T', 'ť': 't', 'Ŧ': 'T', 'ŧ': 't',
|
1108 | 'Ũ': 'U', 'ũ': 'u', 'Ū': 'U', 'ū': 'u', 'Ŭ': 'U', 'ŭ': 'u', 'Ů': 'U',
|
1109 | 'ů': 'u', 'Ű': 'U', 'ű': 'u', 'Ų': 'U', 'ų': 'u', 'Ŵ': 'W', 'ŵ': 'w',
|
1110 | 'Ŷ': 'Y', 'ŷ': 'y', 'Ÿ': 'Y', 'Ź': 'Z', 'ź': 'z', 'Ż': 'Z', 'ż': 'z',
|
1111 | 'Ž': 'Z', 'ž': 'z'
|
1112 | };
|
1113 |
|
1114 | var DEFAULT_REPLACEMENT_CHAR = '?';
|
1115 |
|
1116 | function Transliterator() {
|
1117 | this.approximations = {};
|
1118 |
|
1119 | for (var c in DEFAULT_APPROXIMATIONS) {
|
1120 | this.approximate(c, DEFAULT_APPROXIMATIONS[c]);
|
1121 | }
|
1122 | }
|
1123 |
|
1124 | Transliterator.getInstance = function(locale) {
|
1125 | var storage = typeof process !== 'undefined' ? process : global;
|
1126 | storage.__Inflector_Transliterator = storage.__Inflector_Transliterator || {};
|
1127 | storage.__Inflector_Transliterator[locale] = storage.__Inflector_Transliterator[locale] || new Transliterator();
|
1128 |
|
1129 | return storage.__Inflector_Transliterator[locale];
|
1130 | };
|
1131 |
|
1132 | Transliterator.prototype.approximate = function(string, replacement) {
|
1133 | this.approximations[string] = replacement;
|
1134 | };
|
1135 |
|
1136 | Transliterator.prototype.transliterate = function(string, replacement) {
|
1137 | var self = this;
|
1138 |
|
1139 | return string.replace(/[^\u0000-\u007f]/g, function(c) {
|
1140 | return self.approximations[c] || replacement || DEFAULT_REPLACEMENT_CHAR;
|
1141 | });
|
1142 | };
|
1143 |
|
1144 | module.exports = Transliterator;
|
1145 |
|
1146 | }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
1147 | },{"_process":197}],13:[function(require,module,exports){
|
1148 | 'use strict';
|
1149 |
|
1150 | function enDefaults(inflect) {
|
1151 | inflect.plural(/$/, 's');
|
1152 | inflect.plural(/s$/i, 's');
|
1153 | inflect.plural(/^(ax|test)is$/i, '$1es');
|
1154 | inflect.plural(/(octop|vir)us$/i, '$1i');
|
1155 | inflect.plural(/(octop|vir)i$/i, '$1i');
|
1156 | inflect.plural(/(alias|status)$/i, '$1es');
|
1157 | inflect.plural(/(bu)s$/i, '$1ses');
|
1158 | inflect.plural(/(buffal|tomat)o$/i, '$1oes');
|
1159 | inflect.plural(/([ti])um$/i, '$1a');
|
1160 | inflect.plural(/([ti])a$/i, '$1a');
|
1161 | inflect.plural(/sis$/i, 'ses');
|
1162 | inflect.plural(/(?:([^f])fe|([lr])f)$/i, '$1$2ves');
|
1163 | inflect.plural(/(hive)$/i, '$1s');
|
1164 | inflect.plural(/([^aeiouy]|qu)y$/i, '$1ies');
|
1165 | inflect.plural(/(x|ch|ss|sh)$/i, '$1es');
|
1166 | inflect.plural(/(matr|vert|ind)(?:ix|ex)$/i, '$1ices');
|
1167 | inflect.plural(/^(m|l)ouse$/i, '$1ice');
|
1168 | inflect.plural(/^(m|l)ice$/i, '$1ice');
|
1169 | inflect.plural(/^(ox)$/i, '$1en');
|
1170 | inflect.plural(/^(oxen)$/i, '$1');
|
1171 | inflect.plural(/(quiz)$/i, '$1zes');
|
1172 |
|
1173 | inflect.singular(/s$/i, '');
|
1174 | inflect.singular(/(ss)$/i, '$1');
|
1175 | inflect.singular(/(n)ews$/i, '$1ews');
|
1176 | inflect.singular(/([ti])a$/i, '$1um');
|
1177 | inflect.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i, '$1sis');
|
1178 | inflect.singular(/(^analy)(sis|ses)$/i, '$1sis');
|
1179 | inflect.singular(/([^f])ves$/i, '$1fe');
|
1180 | inflect.singular(/(hive)s$/i, '$1');
|
1181 | inflect.singular(/(tive)s$/i, '$1');
|
1182 | inflect.singular(/([lr])ves$/i, '$1f');
|
1183 | inflect.singular(/([^aeiouy]|qu)ies$/i, '$1y');
|
1184 | inflect.singular(/(s)eries$/i, '$1eries');
|
1185 | inflect.singular(/(m)ovies$/i, '$1ovie');
|
1186 | inflect.singular(/(x|ch|ss|sh)es$/i, '$1');
|
1187 | inflect.singular(/^(m|l)ice$/i, '$1ouse');
|
1188 | inflect.singular(/(bus)(es)?$/i, '$1');
|
1189 | inflect.singular(/(o)es$/i, '$1');
|
1190 | inflect.singular(/(shoe)s$/i, '$1');
|
1191 | inflect.singular(/(cris|test)(is|es)$/i, '$1is');
|
1192 | inflect.singular(/^(a)x[ie]s$/i, '$1xis');
|
1193 | inflect.singular(/(octop|vir)(us|i)$/i, '$1us');
|
1194 | inflect.singular(/(alias|status)(es)?$/i, '$1');
|
1195 | inflect.singular(/^(ox)en/i, '$1');
|
1196 | inflect.singular(/(vert|ind)ices$/i, '$1ex');
|
1197 | inflect.singular(/(matr)ices$/i, '$1ix');
|
1198 | inflect.singular(/(quiz)zes$/i, '$1');
|
1199 | inflect.singular(/(database)s$/i, '$1');
|
1200 |
|
1201 | inflect.irregular('person', 'people');
|
1202 | inflect.irregular('man', 'men');
|
1203 | inflect.irregular('child', 'children');
|
1204 | inflect.irregular('sex', 'sexes');
|
1205 | inflect.irregular('move', 'moves');
|
1206 | inflect.irregular('zombie', 'zombies');
|
1207 |
|
1208 | inflect.uncountable('equipment', 'information', 'rice', 'money', 'species', 'series', 'fish', 'sheep', 'jeans', 'police');
|
1209 | }
|
1210 |
|
1211 | module.exports = {
|
1212 | en: enDefaults
|
1213 | };
|
1214 |
|
1215 | },{}],14:[function(require,module,exports){
|
1216 | 'use strict';
|
1217 |
|
1218 | var hasOwnProp = Object.prototype.hasOwnProperty;
|
1219 |
|
1220 | function hasProp(obj, key) {
|
1221 | return hasOwnProp.call(obj, key);
|
1222 | }
|
1223 |
|
1224 | module.exports = hasProp;
|
1225 |
|
1226 | },{}],15:[function(require,module,exports){
|
1227 | 'use strict';
|
1228 |
|
1229 | function icPart(str) {
|
1230 | return str.split('').map(function(c) { return '(?:' + [c.toUpperCase(), c.toLowerCase()].join('|') + ')'; }).join('')
|
1231 | }
|
1232 |
|
1233 | module.exports = icPart;
|
1234 |
|
1235 | },{}],16:[function(require,module,exports){
|
1236 | 'use strict';
|
1237 |
|
1238 | var toString = Object.prototype.toString;
|
1239 |
|
1240 | function isFunc(obj) {
|
1241 | return toString.call(obj) === '[object Function]';
|
1242 | }
|
1243 |
|
1244 | module.exports = isFunc;
|
1245 |
|
1246 | },{}],17:[function(require,module,exports){
|
1247 | 'use strict';
|
1248 |
|
1249 | var splice = Array.prototype.splice;
|
1250 |
|
1251 | function remove(arr, elem) {
|
1252 | for (var i = arr.length - 1; i >= 0; i--) {
|
1253 | if (arr[i] === elem) {
|
1254 | splice.call(arr, i, 1);
|
1255 | }
|
1256 | }
|
1257 | }
|
1258 |
|
1259 | module.exports = remove;
|
1260 |
|
1261 | },{}],18:[function(require,module,exports){
|
1262 | var getNative = require('./_getNative'),
|
1263 | root = require('./_root');
|
1264 |
|
1265 |
|
1266 | var DataView = getNative(root, 'DataView');
|
1267 |
|
1268 | module.exports = DataView;
|
1269 |
|
1270 | },{"./_getNative":97,"./_root":139}],19:[function(require,module,exports){
|
1271 | var hashClear = require('./_hashClear'),
|
1272 | hashDelete = require('./_hashDelete'),
|
1273 | hashGet = require('./_hashGet'),
|
1274 | hashHas = require('./_hashHas'),
|
1275 | hashSet = require('./_hashSet');
|
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 |
|
1282 |
|
1283 |
|
1284 | function Hash(entries) {
|
1285 | var index = -1,
|
1286 | length = entries == null ? 0 : entries.length;
|
1287 |
|
1288 | this.clear();
|
1289 | while (++index < length) {
|
1290 | var entry = entries[index];
|
1291 | this.set(entry[0], entry[1]);
|
1292 | }
|
1293 | }
|
1294 |
|
1295 |
|
1296 | Hash.prototype.clear = hashClear;
|
1297 | Hash.prototype['delete'] = hashDelete;
|
1298 | Hash.prototype.get = hashGet;
|
1299 | Hash.prototype.has = hashHas;
|
1300 | Hash.prototype.set = hashSet;
|
1301 |
|
1302 | module.exports = Hash;
|
1303 |
|
1304 | },{"./_hashClear":105,"./_hashDelete":106,"./_hashGet":107,"./_hashHas":108,"./_hashSet":109}],20:[function(require,module,exports){
|
1305 | var listCacheClear = require('./_listCacheClear'),
|
1306 | listCacheDelete = require('./_listCacheDelete'),
|
1307 | listCacheGet = require('./_listCacheGet'),
|
1308 | listCacheHas = require('./_listCacheHas'),
|
1309 | listCacheSet = require('./_listCacheSet');
|
1310 |
|
1311 |
|
1312 |
|
1313 |
|
1314 |
|
1315 |
|
1316 |
|
1317 |
|
1318 | function ListCache(entries) {
|
1319 | var index = -1,
|
1320 | length = entries == null ? 0 : entries.length;
|
1321 |
|
1322 | this.clear();
|
1323 | while (++index < length) {
|
1324 | var entry = entries[index];
|
1325 | this.set(entry[0], entry[1]);
|
1326 | }
|
1327 | }
|
1328 |
|
1329 |
|
1330 | ListCache.prototype.clear = listCacheClear;
|
1331 | ListCache.prototype['delete'] = listCacheDelete;
|
1332 | ListCache.prototype.get = listCacheGet;
|
1333 | ListCache.prototype.has = listCacheHas;
|
1334 | ListCache.prototype.set = listCacheSet;
|
1335 |
|
1336 | module.exports = ListCache;
|
1337 |
|
1338 | },{"./_listCacheClear":119,"./_listCacheDelete":120,"./_listCacheGet":121,"./_listCacheHas":122,"./_listCacheSet":123}],21:[function(require,module,exports){
|
1339 | var getNative = require('./_getNative'),
|
1340 | root = require('./_root');
|
1341 |
|
1342 |
|
1343 | var Map = getNative(root, 'Map');
|
1344 |
|
1345 | module.exports = Map;
|
1346 |
|
1347 | },{"./_getNative":97,"./_root":139}],22:[function(require,module,exports){
|
1348 | var mapCacheClear = require('./_mapCacheClear'),
|
1349 | mapCacheDelete = require('./_mapCacheDelete'),
|
1350 | mapCacheGet = require('./_mapCacheGet'),
|
1351 | mapCacheHas = require('./_mapCacheHas'),
|
1352 | mapCacheSet = require('./_mapCacheSet');
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 |
|
1359 |
|
1360 |
|
1361 | function MapCache(entries) {
|
1362 | var index = -1,
|
1363 | length = entries == null ? 0 : entries.length;
|
1364 |
|
1365 | this.clear();
|
1366 | while (++index < length) {
|
1367 | var entry = entries[index];
|
1368 | this.set(entry[0], entry[1]);
|
1369 | }
|
1370 | }
|
1371 |
|
1372 |
|
1373 | MapCache.prototype.clear = mapCacheClear;
|
1374 | MapCache.prototype['delete'] = mapCacheDelete;
|
1375 | MapCache.prototype.get = mapCacheGet;
|
1376 | MapCache.prototype.has = mapCacheHas;
|
1377 | MapCache.prototype.set = mapCacheSet;
|
1378 |
|
1379 | module.exports = MapCache;
|
1380 |
|
1381 | },{"./_mapCacheClear":124,"./_mapCacheDelete":125,"./_mapCacheGet":126,"./_mapCacheHas":127,"./_mapCacheSet":128}],23:[function(require,module,exports){
|
1382 | var getNative = require('./_getNative'),
|
1383 | root = require('./_root');
|
1384 |
|
1385 |
|
1386 | var Promise = getNative(root, 'Promise');
|
1387 |
|
1388 | module.exports = Promise;
|
1389 |
|
1390 | },{"./_getNative":97,"./_root":139}],24:[function(require,module,exports){
|
1391 | var getNative = require('./_getNative'),
|
1392 | root = require('./_root');
|
1393 |
|
1394 |
|
1395 | var Set = getNative(root, 'Set');
|
1396 |
|
1397 | module.exports = Set;
|
1398 |
|
1399 | },{"./_getNative":97,"./_root":139}],25:[function(require,module,exports){
|
1400 | var MapCache = require('./_MapCache'),
|
1401 | setCacheAdd = require('./_setCacheAdd'),
|
1402 | setCacheHas = require('./_setCacheHas');
|
1403 |
|
1404 |
|
1405 |
|
1406 |
|
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 |
|
1412 | function SetCache(values) {
|
1413 | var index = -1,
|
1414 | length = values == null ? 0 : values.length;
|
1415 |
|
1416 | this.__data__ = new MapCache;
|
1417 | while (++index < length) {
|
1418 | this.add(values[index]);
|
1419 | }
|
1420 | }
|
1421 |
|
1422 |
|
1423 | SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
1424 | SetCache.prototype.has = setCacheHas;
|
1425 |
|
1426 | module.exports = SetCache;
|
1427 |
|
1428 | },{"./_MapCache":22,"./_setCacheAdd":141,"./_setCacheHas":142}],26:[function(require,module,exports){
|
1429 | var ListCache = require('./_ListCache'),
|
1430 | stackClear = require('./_stackClear'),
|
1431 | stackDelete = require('./_stackDelete'),
|
1432 | stackGet = require('./_stackGet'),
|
1433 | stackHas = require('./_stackHas'),
|
1434 | stackSet = require('./_stackSet');
|
1435 |
|
1436 |
|
1437 |
|
1438 |
|
1439 |
|
1440 |
|
1441 |
|
1442 |
|
1443 | function Stack(entries) {
|
1444 | var data = this.__data__ = new ListCache(entries);
|
1445 | this.size = data.size;
|
1446 | }
|
1447 |
|
1448 |
|
1449 | Stack.prototype.clear = stackClear;
|
1450 | Stack.prototype['delete'] = stackDelete;
|
1451 | Stack.prototype.get = stackGet;
|
1452 | Stack.prototype.has = stackHas;
|
1453 | Stack.prototype.set = stackSet;
|
1454 |
|
1455 | module.exports = Stack;
|
1456 |
|
1457 | },{"./_ListCache":20,"./_stackClear":146,"./_stackDelete":147,"./_stackGet":148,"./_stackHas":149,"./_stackSet":150}],27:[function(require,module,exports){
|
1458 | var root = require('./_root');
|
1459 |
|
1460 |
|
1461 | var Symbol = root.Symbol;
|
1462 |
|
1463 | module.exports = Symbol;
|
1464 |
|
1465 | },{"./_root":139}],28:[function(require,module,exports){
|
1466 | var root = require('./_root');
|
1467 |
|
1468 |
|
1469 | var Uint8Array = root.Uint8Array;
|
1470 |
|
1471 | module.exports = Uint8Array;
|
1472 |
|
1473 | },{"./_root":139}],29:[function(require,module,exports){
|
1474 | var getNative = require('./_getNative'),
|
1475 | root = require('./_root');
|
1476 |
|
1477 |
|
1478 | var WeakMap = getNative(root, 'WeakMap');
|
1479 |
|
1480 | module.exports = WeakMap;
|
1481 |
|
1482 | },{"./_getNative":97,"./_root":139}],30:[function(require,module,exports){
|
1483 |
|
1484 |
|
1485 |
|
1486 |
|
1487 |
|
1488 |
|
1489 |
|
1490 |
|
1491 |
|
1492 |
|
1493 | function apply(func, thisArg, args) {
|
1494 | switch (args.length) {
|
1495 | case 0: return func.call(thisArg);
|
1496 | case 1: return func.call(thisArg, args[0]);
|
1497 | case 2: return func.call(thisArg, args[0], args[1]);
|
1498 | case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
1499 | }
|
1500 | return func.apply(thisArg, args);
|
1501 | }
|
1502 |
|
1503 | module.exports = apply;
|
1504 |
|
1505 | },{}],31:[function(require,module,exports){
|
1506 |
|
1507 |
|
1508 |
|
1509 |
|
1510 |
|
1511 |
|
1512 |
|
1513 |
|
1514 |
|
1515 | function arrayEach(array, iteratee) {
|
1516 | var index = -1,
|
1517 | length = array == null ? 0 : array.length;
|
1518 |
|
1519 | while (++index < length) {
|
1520 | if (iteratee(array[index], index, array) === false) {
|
1521 | break;
|
1522 | }
|
1523 | }
|
1524 | return array;
|
1525 | }
|
1526 |
|
1527 | module.exports = arrayEach;
|
1528 |
|
1529 | },{}],32:[function(require,module,exports){
|
1530 |
|
1531 |
|
1532 |
|
1533 |
|
1534 |
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 | function arrayFilter(array, predicate) {
|
1540 | var index = -1,
|
1541 | length = array == null ? 0 : array.length,
|
1542 | resIndex = 0,
|
1543 | result = [];
|
1544 |
|
1545 | while (++index < length) {
|
1546 | var value = array[index];
|
1547 | if (predicate(value, index, array)) {
|
1548 | result[resIndex++] = value;
|
1549 | }
|
1550 | }
|
1551 | return result;
|
1552 | }
|
1553 |
|
1554 | module.exports = arrayFilter;
|
1555 |
|
1556 | },{}],33:[function(require,module,exports){
|
1557 | var baseTimes = require('./_baseTimes'),
|
1558 | isArguments = require('./isArguments'),
|
1559 | isArray = require('./isArray'),
|
1560 | isBuffer = require('./isBuffer'),
|
1561 | isIndex = require('./_isIndex'),
|
1562 | isTypedArray = require('./isTypedArray');
|
1563 |
|
1564 |
|
1565 | var objectProto = Object.prototype;
|
1566 |
|
1567 |
|
1568 | var hasOwnProperty = objectProto.hasOwnProperty;
|
1569 |
|
1570 |
|
1571 |
|
1572 |
|
1573 |
|
1574 |
|
1575 |
|
1576 |
|
1577 |
|
1578 | function arrayLikeKeys(value, inherited) {
|
1579 | var isArr = isArray(value),
|
1580 | isArg = !isArr && isArguments(value),
|
1581 | isBuff = !isArr && !isArg && isBuffer(value),
|
1582 | isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
1583 | skipIndexes = isArr || isArg || isBuff || isType,
|
1584 | result = skipIndexes ? baseTimes(value.length, String) : [],
|
1585 | length = result.length;
|
1586 |
|
1587 | for (var key in value) {
|
1588 | if ((inherited || hasOwnProperty.call(value, key)) &&
|
1589 | !(skipIndexes && (
|
1590 |
|
1591 | key == 'length' ||
|
1592 |
|
1593 | (isBuff && (key == 'offset' || key == 'parent')) ||
|
1594 |
|
1595 | (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
1596 |
|
1597 | isIndex(key, length)
|
1598 | ))) {
|
1599 | result.push(key);
|
1600 | }
|
1601 | }
|
1602 | return result;
|
1603 | }
|
1604 |
|
1605 | module.exports = arrayLikeKeys;
|
1606 |
|
1607 | },{"./_baseTimes":71,"./_isIndex":112,"./isArguments":166,"./isArray":167,"./isBuffer":170,"./isTypedArray":178}],34:[function(require,module,exports){
|
1608 |
|
1609 |
|
1610 |
|
1611 |
|
1612 |
|
1613 |
|
1614 |
|
1615 |
|
1616 |
|
1617 | function arrayMap(array, iteratee) {
|
1618 | var index = -1,
|
1619 | length = array == null ? 0 : array.length,
|
1620 | result = Array(length);
|
1621 |
|
1622 | while (++index < length) {
|
1623 | result[index] = iteratee(array[index], index, array);
|
1624 | }
|
1625 | return result;
|
1626 | }
|
1627 |
|
1628 | module.exports = arrayMap;
|
1629 |
|
1630 | },{}],35:[function(require,module,exports){
|
1631 |
|
1632 |
|
1633 |
|
1634 |
|
1635 |
|
1636 |
|
1637 |
|
1638 |
|
1639 | function arrayPush(array, values) {
|
1640 | var index = -1,
|
1641 | length = values.length,
|
1642 | offset = array.length;
|
1643 |
|
1644 | while (++index < length) {
|
1645 | array[offset + index] = values[index];
|
1646 | }
|
1647 | return array;
|
1648 | }
|
1649 |
|
1650 | module.exports = arrayPush;
|
1651 |
|
1652 | },{}],36:[function(require,module,exports){
|
1653 |
|
1654 |
|
1655 |
|
1656 |
|
1657 |
|
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 |
|
1663 | function arraySome(array, predicate) {
|
1664 | var index = -1,
|
1665 | length = array == null ? 0 : array.length;
|
1666 |
|
1667 | while (++index < length) {
|
1668 | if (predicate(array[index], index, array)) {
|
1669 | return true;
|
1670 | }
|
1671 | }
|
1672 | return false;
|
1673 | }
|
1674 |
|
1675 | module.exports = arraySome;
|
1676 |
|
1677 | },{}],37:[function(require,module,exports){
|
1678 | var baseAssignValue = require('./_baseAssignValue'),
|
1679 | eq = require('./eq');
|
1680 |
|
1681 |
|
1682 |
|
1683 |
|
1684 |
|
1685 |
|
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 | function assignMergeValue(object, key, value) {
|
1691 | if ((value !== undefined && !eq(object[key], value)) ||
|
1692 | (value === undefined && !(key in object))) {
|
1693 | baseAssignValue(object, key, value);
|
1694 | }
|
1695 | }
|
1696 |
|
1697 | module.exports = assignMergeValue;
|
1698 |
|
1699 | },{"./_baseAssignValue":40,"./eq":157}],38:[function(require,module,exports){
|
1700 | var baseAssignValue = require('./_baseAssignValue'),
|
1701 | eq = require('./eq');
|
1702 |
|
1703 |
|
1704 | var objectProto = Object.prototype;
|
1705 |
|
1706 |
|
1707 | var hasOwnProperty = objectProto.hasOwnProperty;
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 |
|
1718 |
|
1719 | function assignValue(object, key, value) {
|
1720 | var objValue = object[key];
|
1721 | if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
1722 | (value === undefined && !(key in object))) {
|
1723 | baseAssignValue(object, key, value);
|
1724 | }
|
1725 | }
|
1726 |
|
1727 | module.exports = assignValue;
|
1728 |
|
1729 | },{"./_baseAssignValue":40,"./eq":157}],39:[function(require,module,exports){
|
1730 | var eq = require('./eq');
|
1731 |
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 | function assocIndexOf(array, key) {
|
1741 | var length = array.length;
|
1742 | while (length--) {
|
1743 | if (eq(array[length][0], key)) {
|
1744 | return length;
|
1745 | }
|
1746 | }
|
1747 | return -1;
|
1748 | }
|
1749 |
|
1750 | module.exports = assocIndexOf;
|
1751 |
|
1752 | },{"./eq":157}],40:[function(require,module,exports){
|
1753 | var defineProperty = require('./_defineProperty');
|
1754 |
|
1755 |
|
1756 |
|
1757 |
|
1758 |
|
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 | function baseAssignValue(object, key, value) {
|
1765 | if (key == '__proto__' && defineProperty) {
|
1766 | defineProperty(object, key, {
|
1767 | 'configurable': true,
|
1768 | 'enumerable': true,
|
1769 | 'value': value,
|
1770 | 'writable': true
|
1771 | });
|
1772 | } else {
|
1773 | object[key] = value;
|
1774 | }
|
1775 | }
|
1776 |
|
1777 | module.exports = baseAssignValue;
|
1778 |
|
1779 | },{"./_defineProperty":87}],41:[function(require,module,exports){
|
1780 | var isObject = require('./isObject');
|
1781 |
|
1782 |
|
1783 | var objectCreate = Object.create;
|
1784 |
|
1785 |
|
1786 |
|
1787 |
|
1788 |
|
1789 |
|
1790 |
|
1791 |
|
1792 |
|
1793 | var baseCreate = (function() {
|
1794 | function object() {}
|
1795 | return function(proto) {
|
1796 | if (!isObject(proto)) {
|
1797 | return {};
|
1798 | }
|
1799 | if (objectCreate) {
|
1800 | return objectCreate(proto);
|
1801 | }
|
1802 | object.prototype = proto;
|
1803 | var result = new object;
|
1804 | object.prototype = undefined;
|
1805 | return result;
|
1806 | };
|
1807 | }());
|
1808 |
|
1809 | module.exports = baseCreate;
|
1810 |
|
1811 | },{"./isObject":174}],42:[function(require,module,exports){
|
1812 | var baseForOwn = require('./_baseForOwn'),
|
1813 | createBaseEach = require('./_createBaseEach');
|
1814 |
|
1815 |
|
1816 |
|
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 | var baseEach = createBaseEach(baseForOwn);
|
1824 |
|
1825 | module.exports = baseEach;
|
1826 |
|
1827 | },{"./_baseForOwn":46,"./_createBaseEach":84}],43:[function(require,module,exports){
|
1828 |
|
1829 |
|
1830 |
|
1831 |
|
1832 |
|
1833 |
|
1834 |
|
1835 |
|
1836 |
|
1837 |
|
1838 |
|
1839 | function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
1840 | var length = array.length,
|
1841 | index = fromIndex + (fromRight ? 1 : -1);
|
1842 |
|
1843 | while ((fromRight ? index-- : ++index < length)) {
|
1844 | if (predicate(array[index], index, array)) {
|
1845 | return index;
|
1846 | }
|
1847 | }
|
1848 | return -1;
|
1849 | }
|
1850 |
|
1851 | module.exports = baseFindIndex;
|
1852 |
|
1853 | },{}],44:[function(require,module,exports){
|
1854 | var arrayPush = require('./_arrayPush'),
|
1855 | isFlattenable = require('./_isFlattenable');
|
1856 |
|
1857 |
|
1858 |
|
1859 |
|
1860 |
|
1861 |
|
1862 |
|
1863 |
|
1864 |
|
1865 |
|
1866 |
|
1867 |
|
1868 | function baseFlatten(array, depth, predicate, isStrict, result) {
|
1869 | var index = -1,
|
1870 | length = array.length;
|
1871 |
|
1872 | predicate || (predicate = isFlattenable);
|
1873 | result || (result = []);
|
1874 |
|
1875 | while (++index < length) {
|
1876 | var value = array[index];
|
1877 | if (depth > 0 && predicate(value)) {
|
1878 | if (depth > 1) {
|
1879 |
|
1880 | baseFlatten(value, depth - 1, predicate, isStrict, result);
|
1881 | } else {
|
1882 | arrayPush(result, value);
|
1883 | }
|
1884 | } else if (!isStrict) {
|
1885 | result[result.length] = value;
|
1886 | }
|
1887 | }
|
1888 | return result;
|
1889 | }
|
1890 |
|
1891 | module.exports = baseFlatten;
|
1892 |
|
1893 | },{"./_arrayPush":35,"./_isFlattenable":111}],45:[function(require,module,exports){
|
1894 | var createBaseFor = require('./_createBaseFor');
|
1895 |
|
1896 |
|
1897 |
|
1898 |
|
1899 |
|
1900 |
|
1901 |
|
1902 |
|
1903 |
|
1904 |
|
1905 |
|
1906 |
|
1907 | var baseFor = createBaseFor();
|
1908 |
|
1909 | module.exports = baseFor;
|
1910 |
|
1911 | },{"./_createBaseFor":85}],46:[function(require,module,exports){
|
1912 | var baseFor = require('./_baseFor'),
|
1913 | keys = require('./keys');
|
1914 |
|
1915 |
|
1916 |
|
1917 |
|
1918 |
|
1919 |
|
1920 |
|
1921 |
|
1922 |
|
1923 | function baseForOwn(object, iteratee) {
|
1924 | return object && baseFor(object, iteratee, keys);
|
1925 | }
|
1926 |
|
1927 | module.exports = baseForOwn;
|
1928 |
|
1929 | },{"./_baseFor":45,"./keys":179}],47:[function(require,module,exports){
|
1930 | var castPath = require('./_castPath'),
|
1931 | toKey = require('./_toKey');
|
1932 |
|
1933 |
|
1934 |
|
1935 |
|
1936 |
|
1937 |
|
1938 |
|
1939 |
|
1940 |
|
1941 | function baseGet(object, path) {
|
1942 | path = castPath(path, object);
|
1943 |
|
1944 | var index = 0,
|
1945 | length = path.length;
|
1946 |
|
1947 | while (object != null && index < length) {
|
1948 | object = object[toKey(path[index++])];
|
1949 | }
|
1950 | return (index && index == length) ? object : undefined;
|
1951 | }
|
1952 |
|
1953 | module.exports = baseGet;
|
1954 |
|
1955 | },{"./_castPath":76,"./_toKey":152}],48:[function(require,module,exports){
|
1956 | var arrayPush = require('./_arrayPush'),
|
1957 | isArray = require('./isArray');
|
1958 |
|
1959 |
|
1960 |
|
1961 |
|
1962 |
|
1963 |
|
1964 |
|
1965 |
|
1966 |
|
1967 |
|
1968 |
|
1969 |
|
1970 | function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
1971 | var result = keysFunc(object);
|
1972 | return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
1973 | }
|
1974 |
|
1975 | module.exports = baseGetAllKeys;
|
1976 |
|
1977 | },{"./_arrayPush":35,"./isArray":167}],49:[function(require,module,exports){
|
1978 | var Symbol = require('./_Symbol'),
|
1979 | getRawTag = require('./_getRawTag'),
|
1980 | objectToString = require('./_objectToString');
|
1981 |
|
1982 |
|
1983 | var nullTag = '[object Null]',
|
1984 | undefinedTag = '[object Undefined]';
|
1985 |
|
1986 |
|
1987 | var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
1988 |
|
1989 |
|
1990 |
|
1991 |
|
1992 |
|
1993 |
|
1994 |
|
1995 |
|
1996 | function baseGetTag(value) {
|
1997 | if (value == null) {
|
1998 | return value === undefined ? undefinedTag : nullTag;
|
1999 | }
|
2000 | return (symToStringTag && symToStringTag in Object(value))
|
2001 | ? getRawTag(value)
|
2002 | : objectToString(value);
|
2003 | }
|
2004 |
|
2005 | module.exports = baseGetTag;
|
2006 |
|
2007 | },{"./_Symbol":27,"./_getRawTag":99,"./_objectToString":136}],50:[function(require,module,exports){
|
2008 |
|
2009 |
|
2010 |
|
2011 |
|
2012 |
|
2013 |
|
2014 |
|
2015 |
|
2016 | function baseHasIn(object, key) {
|
2017 | return object != null && key in Object(object);
|
2018 | }
|
2019 |
|
2020 | module.exports = baseHasIn;
|
2021 |
|
2022 | },{}],51:[function(require,module,exports){
|
2023 | var baseGetTag = require('./_baseGetTag'),
|
2024 | isObjectLike = require('./isObjectLike');
|
2025 |
|
2026 |
|
2027 | var argsTag = '[object Arguments]';
|
2028 |
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 |
|
2035 |
|
2036 | function baseIsArguments(value) {
|
2037 | return isObjectLike(value) && baseGetTag(value) == argsTag;
|
2038 | }
|
2039 |
|
2040 | module.exports = baseIsArguments;
|
2041 |
|
2042 | },{"./_baseGetTag":49,"./isObjectLike":175}],52:[function(require,module,exports){
|
2043 | var baseIsEqualDeep = require('./_baseIsEqualDeep'),
|
2044 | isObjectLike = require('./isObjectLike');
|
2045 |
|
2046 |
|
2047 |
|
2048 |
|
2049 |
|
2050 |
|
2051 |
|
2052 |
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 |
|
2058 |
|
2059 |
|
2060 | function baseIsEqual(value, other, bitmask, customizer, stack) {
|
2061 | if (value === other) {
|
2062 | return true;
|
2063 | }
|
2064 | if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
|
2065 | return value !== value && other !== other;
|
2066 | }
|
2067 | return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
2068 | }
|
2069 |
|
2070 | module.exports = baseIsEqual;
|
2071 |
|
2072 | },{"./_baseIsEqualDeep":53,"./isObjectLike":175}],53:[function(require,module,exports){
|
2073 | var Stack = require('./_Stack'),
|
2074 | equalArrays = require('./_equalArrays'),
|
2075 | equalByTag = require('./_equalByTag'),
|
2076 | equalObjects = require('./_equalObjects'),
|
2077 | getTag = require('./_getTag'),
|
2078 | isArray = require('./isArray'),
|
2079 | isBuffer = require('./isBuffer'),
|
2080 | isTypedArray = require('./isTypedArray');
|
2081 |
|
2082 |
|
2083 | var COMPARE_PARTIAL_FLAG = 1;
|
2084 |
|
2085 |
|
2086 | var argsTag = '[object Arguments]',
|
2087 | arrayTag = '[object Array]',
|
2088 | objectTag = '[object Object]';
|
2089 |
|
2090 |
|
2091 | var objectProto = Object.prototype;
|
2092 |
|
2093 |
|
2094 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2095 |
|
2096 |
|
2097 |
|
2098 |
|
2099 |
|
2100 |
|
2101 |
|
2102 |
|
2103 |
|
2104 |
|
2105 |
|
2106 |
|
2107 |
|
2108 |
|
2109 |
|
2110 | function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
2111 | var objIsArr = isArray(object),
|
2112 | othIsArr = isArray(other),
|
2113 | objTag = objIsArr ? arrayTag : getTag(object),
|
2114 | othTag = othIsArr ? arrayTag : getTag(other);
|
2115 |
|
2116 | objTag = objTag == argsTag ? objectTag : objTag;
|
2117 | othTag = othTag == argsTag ? objectTag : othTag;
|
2118 |
|
2119 | var objIsObj = objTag == objectTag,
|
2120 | othIsObj = othTag == objectTag,
|
2121 | isSameTag = objTag == othTag;
|
2122 |
|
2123 | if (isSameTag && isBuffer(object)) {
|
2124 | if (!isBuffer(other)) {
|
2125 | return false;
|
2126 | }
|
2127 | objIsArr = true;
|
2128 | objIsObj = false;
|
2129 | }
|
2130 | if (isSameTag && !objIsObj) {
|
2131 | stack || (stack = new Stack);
|
2132 | return (objIsArr || isTypedArray(object))
|
2133 | ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
2134 | : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
2135 | }
|
2136 | if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
2137 | var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
2138 | othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
2139 |
|
2140 | if (objIsWrapped || othIsWrapped) {
|
2141 | var objUnwrapped = objIsWrapped ? object.value() : object,
|
2142 | othUnwrapped = othIsWrapped ? other.value() : other;
|
2143 |
|
2144 | stack || (stack = new Stack);
|
2145 | return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
2146 | }
|
2147 | }
|
2148 | if (!isSameTag) {
|
2149 | return false;
|
2150 | }
|
2151 | stack || (stack = new Stack);
|
2152 | return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
2153 | }
|
2154 |
|
2155 | module.exports = baseIsEqualDeep;
|
2156 |
|
2157 | },{"./_Stack":26,"./_equalArrays":88,"./_equalByTag":89,"./_equalObjects":90,"./_getTag":102,"./isArray":167,"./isBuffer":170,"./isTypedArray":178}],54:[function(require,module,exports){
|
2158 | var Stack = require('./_Stack'),
|
2159 | baseIsEqual = require('./_baseIsEqual');
|
2160 |
|
2161 |
|
2162 | var COMPARE_PARTIAL_FLAG = 1,
|
2163 | COMPARE_UNORDERED_FLAG = 2;
|
2164 |
|
2165 |
|
2166 |
|
2167 |
|
2168 |
|
2169 |
|
2170 |
|
2171 |
|
2172 |
|
2173 |
|
2174 |
|
2175 | function baseIsMatch(object, source, matchData, customizer) {
|
2176 | var index = matchData.length,
|
2177 | length = index,
|
2178 | noCustomizer = !customizer;
|
2179 |
|
2180 | if (object == null) {
|
2181 | return !length;
|
2182 | }
|
2183 | object = Object(object);
|
2184 | while (index--) {
|
2185 | var data = matchData[index];
|
2186 | if ((noCustomizer && data[2])
|
2187 | ? data[1] !== object[data[0]]
|
2188 | : !(data[0] in object)
|
2189 | ) {
|
2190 | return false;
|
2191 | }
|
2192 | }
|
2193 | while (++index < length) {
|
2194 | data = matchData[index];
|
2195 | var key = data[0],
|
2196 | objValue = object[key],
|
2197 | srcValue = data[1];
|
2198 |
|
2199 | if (noCustomizer && data[2]) {
|
2200 | if (objValue === undefined && !(key in object)) {
|
2201 | return false;
|
2202 | }
|
2203 | } else {
|
2204 | var stack = new Stack;
|
2205 | if (customizer) {
|
2206 | var result = customizer(objValue, srcValue, key, object, source, stack);
|
2207 | }
|
2208 | if (!(result === undefined
|
2209 | ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
2210 | : result
|
2211 | )) {
|
2212 | return false;
|
2213 | }
|
2214 | }
|
2215 | }
|
2216 | return true;
|
2217 | }
|
2218 |
|
2219 | module.exports = baseIsMatch;
|
2220 |
|
2221 | },{"./_Stack":26,"./_baseIsEqual":52}],55:[function(require,module,exports){
|
2222 | var isFunction = require('./isFunction'),
|
2223 | isMasked = require('./_isMasked'),
|
2224 | isObject = require('./isObject'),
|
2225 | toSource = require('./_toSource');
|
2226 |
|
2227 |
|
2228 |
|
2229 |
|
2230 |
|
2231 | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
2232 |
|
2233 |
|
2234 | var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
2235 |
|
2236 |
|
2237 | var funcProto = Function.prototype,
|
2238 | objectProto = Object.prototype;
|
2239 |
|
2240 |
|
2241 | var funcToString = funcProto.toString;
|
2242 |
|
2243 |
|
2244 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2245 |
|
2246 |
|
2247 | var reIsNative = RegExp('^' +
|
2248 | funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
2249 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
2250 | );
|
2251 |
|
2252 |
|
2253 |
|
2254 |
|
2255 |
|
2256 |
|
2257 |
|
2258 |
|
2259 |
|
2260 | function baseIsNative(value) {
|
2261 | if (!isObject(value) || isMasked(value)) {
|
2262 | return false;
|
2263 | }
|
2264 | var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
2265 | return pattern.test(toSource(value));
|
2266 | }
|
2267 |
|
2268 | module.exports = baseIsNative;
|
2269 |
|
2270 | },{"./_isMasked":116,"./_toSource":153,"./isFunction":171,"./isObject":174}],56:[function(require,module,exports){
|
2271 | var baseGetTag = require('./_baseGetTag'),
|
2272 | isLength = require('./isLength'),
|
2273 | isObjectLike = require('./isObjectLike');
|
2274 |
|
2275 |
|
2276 | var argsTag = '[object Arguments]',
|
2277 | arrayTag = '[object Array]',
|
2278 | boolTag = '[object Boolean]',
|
2279 | dateTag = '[object Date]',
|
2280 | errorTag = '[object Error]',
|
2281 | funcTag = '[object Function]',
|
2282 | mapTag = '[object Map]',
|
2283 | numberTag = '[object Number]',
|
2284 | objectTag = '[object Object]',
|
2285 | regexpTag = '[object RegExp]',
|
2286 | setTag = '[object Set]',
|
2287 | stringTag = '[object String]',
|
2288 | weakMapTag = '[object WeakMap]';
|
2289 |
|
2290 | var arrayBufferTag = '[object ArrayBuffer]',
|
2291 | dataViewTag = '[object DataView]',
|
2292 | float32Tag = '[object Float32Array]',
|
2293 | float64Tag = '[object Float64Array]',
|
2294 | int8Tag = '[object Int8Array]',
|
2295 | int16Tag = '[object Int16Array]',
|
2296 | int32Tag = '[object Int32Array]',
|
2297 | uint8Tag = '[object Uint8Array]',
|
2298 | uint8ClampedTag = '[object Uint8ClampedArray]',
|
2299 | uint16Tag = '[object Uint16Array]',
|
2300 | uint32Tag = '[object Uint32Array]';
|
2301 |
|
2302 |
|
2303 | var typedArrayTags = {};
|
2304 | typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
2305 | typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
2306 | typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
2307 | typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
2308 | typedArrayTags[uint32Tag] = true;
|
2309 | typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
2310 | typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
2311 | typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
2312 | typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
2313 | typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
2314 | typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
2315 | typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
2316 | typedArrayTags[weakMapTag] = false;
|
2317 |
|
2318 |
|
2319 |
|
2320 |
|
2321 |
|
2322 |
|
2323 |
|
2324 |
|
2325 | function baseIsTypedArray(value) {
|
2326 | return isObjectLike(value) &&
|
2327 | isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
2328 | }
|
2329 |
|
2330 | module.exports = baseIsTypedArray;
|
2331 |
|
2332 | },{"./_baseGetTag":49,"./isLength":172,"./isObjectLike":175}],57:[function(require,module,exports){
|
2333 | var baseMatches = require('./_baseMatches'),
|
2334 | baseMatchesProperty = require('./_baseMatchesProperty'),
|
2335 | identity = require('./identity'),
|
2336 | isArray = require('./isArray'),
|
2337 | property = require('./property');
|
2338 |
|
2339 |
|
2340 |
|
2341 |
|
2342 |
|
2343 |
|
2344 |
|
2345 |
|
2346 | function baseIteratee(value) {
|
2347 |
|
2348 |
|
2349 | if (typeof value == 'function') {
|
2350 | return value;
|
2351 | }
|
2352 | if (value == null) {
|
2353 | return identity;
|
2354 | }
|
2355 | if (typeof value == 'object') {
|
2356 | return isArray(value)
|
2357 | ? baseMatchesProperty(value[0], value[1])
|
2358 | : baseMatches(value);
|
2359 | }
|
2360 | return property(value);
|
2361 | }
|
2362 |
|
2363 | module.exports = baseIteratee;
|
2364 |
|
2365 | },{"./_baseMatches":60,"./_baseMatchesProperty":61,"./identity":165,"./isArray":167,"./property":187}],58:[function(require,module,exports){
|
2366 | var isPrototype = require('./_isPrototype'),
|
2367 | nativeKeys = require('./_nativeKeys');
|
2368 |
|
2369 |
|
2370 | var objectProto = Object.prototype;
|
2371 |
|
2372 |
|
2373 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2374 |
|
2375 |
|
2376 |
|
2377 |
|
2378 |
|
2379 |
|
2380 |
|
2381 |
|
2382 | function baseKeys(object) {
|
2383 | if (!isPrototype(object)) {
|
2384 | return nativeKeys(object);
|
2385 | }
|
2386 | var result = [];
|
2387 | for (var key in Object(object)) {
|
2388 | if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
2389 | result.push(key);
|
2390 | }
|
2391 | }
|
2392 | return result;
|
2393 | }
|
2394 |
|
2395 | module.exports = baseKeys;
|
2396 |
|
2397 | },{"./_isPrototype":117,"./_nativeKeys":133}],59:[function(require,module,exports){
|
2398 | var isObject = require('./isObject'),
|
2399 | isPrototype = require('./_isPrototype'),
|
2400 | nativeKeysIn = require('./_nativeKeysIn');
|
2401 |
|
2402 |
|
2403 | var objectProto = Object.prototype;
|
2404 |
|
2405 |
|
2406 | var hasOwnProperty = objectProto.hasOwnProperty;
|
2407 |
|
2408 |
|
2409 |
|
2410 |
|
2411 |
|
2412 |
|
2413 |
|
2414 |
|
2415 | function baseKeysIn(object) {
|
2416 | if (!isObject(object)) {
|
2417 | return nativeKeysIn(object);
|
2418 | }
|
2419 | var isProto = isPrototype(object),
|
2420 | result = [];
|
2421 |
|
2422 | for (var key in object) {
|
2423 | if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
2424 | result.push(key);
|
2425 | }
|
2426 | }
|
2427 | return result;
|
2428 | }
|
2429 |
|
2430 | module.exports = baseKeysIn;
|
2431 |
|
2432 | },{"./_isPrototype":117,"./_nativeKeysIn":134,"./isObject":174}],60:[function(require,module,exports){
|
2433 | var baseIsMatch = require('./_baseIsMatch'),
|
2434 | getMatchData = require('./_getMatchData'),
|
2435 | matchesStrictComparable = require('./_matchesStrictComparable');
|
2436 |
|
2437 |
|
2438 |
|
2439 |
|
2440 |
|
2441 |
|
2442 |
|
2443 |
|
2444 | function baseMatches(source) {
|
2445 | var matchData = getMatchData(source);
|
2446 | if (matchData.length == 1 && matchData[0][2]) {
|
2447 | return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
2448 | }
|
2449 | return function(object) {
|
2450 | return object === source || baseIsMatch(object, source, matchData);
|
2451 | };
|
2452 | }
|
2453 |
|
2454 | module.exports = baseMatches;
|
2455 |
|
2456 | },{"./_baseIsMatch":54,"./_getMatchData":96,"./_matchesStrictComparable":130}],61:[function(require,module,exports){
|
2457 | var baseIsEqual = require('./_baseIsEqual'),
|
2458 | get = require('./get'),
|
2459 | hasIn = require('./hasIn'),
|
2460 | isKey = require('./_isKey'),
|
2461 | isStrictComparable = require('./_isStrictComparable'),
|
2462 | matchesStrictComparable = require('./_matchesStrictComparable'),
|
2463 | toKey = require('./_toKey');
|
2464 |
|
2465 | /** Used to compose bitmasks for value comparisons. */
|
2466 | var COMPARE_PARTIAL_FLAG = 1,
|
2467 | COMPARE_UNORDERED_FLAG = 2;
|
2468 |
|
2469 | /**
|
2470 | * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
2471 | *
|
2472 | * @private
|
2473 | * @param {string} path The path of the property to get.
|
2474 | * @param {*} srcValue The value to match.
|
2475 | * @returns {Function} Returns the new spec function.
|
2476 | */
|
2477 | function baseMatchesProperty(path, srcValue) {
|
2478 | if (isKey(path) && isStrictComparable(srcValue)) {
|
2479 | return matchesStrictComparable(toKey(path), srcValue);
|
2480 | }
|
2481 | return function(object) {
|
2482 | var objValue = get(object, path);
|
2483 | return (objValue === undefined && objValue === srcValue)
|
2484 | ? hasIn(object, path)
|
2485 | : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
2486 | };
|
2487 | }
|
2488 |
|
2489 | module.exports = baseMatchesProperty;
|
2490 |
|
2491 | },{"./_baseIsEqual":52,"./_isKey":114,"./_isStrictComparable":118,"./_matchesStrictComparable":130,"./_toKey":152,"./get":163,"./hasIn":164}],62:[function(require,module,exports){
|
2492 | var Stack = require('./_Stack'),
|
2493 | assignMergeValue = require('./_assignMergeValue'),
|
2494 | baseFor = require('./_baseFor'),
|
2495 | baseMergeDeep = require('./_baseMergeDeep'),
|
2496 | isObject = require('./isObject'),
|
2497 | keysIn = require('./keysIn'),
|
2498 | safeGet = require('./_safeGet');
|
2499 |
|
2500 |
|
2501 |
|
2502 |
|
2503 |
|
2504 |
|
2505 |
|
2506 |
|
2507 |
|
2508 |
|
2509 |
|
2510 |
|
2511 | function baseMerge(object, source, srcIndex, customizer, stack) {
|
2512 | if (object === source) {
|
2513 | return;
|
2514 | }
|
2515 | baseFor(source, function(srcValue, key) {
|
2516 | if (isObject(srcValue)) {
|
2517 | stack || (stack = new Stack);
|
2518 | baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
2519 | }
|
2520 | else {
|
2521 | var newValue = customizer
|
2522 | ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
|
2523 | : undefined;
|
2524 |
|
2525 | if (newValue === undefined) {
|
2526 | newValue = srcValue;
|
2527 | }
|
2528 | assignMergeValue(object, key, newValue);
|
2529 | }
|
2530 | }, keysIn);
|
2531 | }
|
2532 |
|
2533 | module.exports = baseMerge;
|
2534 |
|
2535 | },{"./_Stack":26,"./_assignMergeValue":37,"./_baseFor":45,"./_baseMergeDeep":63,"./_safeGet":140,"./isObject":174,"./keysIn":180}],63:[function(require,module,exports){
|
2536 | var assignMergeValue = require('./_assignMergeValue'),
|
2537 | cloneBuffer = require('./_cloneBuffer'),
|
2538 | cloneTypedArray = require('./_cloneTypedArray'),
|
2539 | copyArray = require('./_copyArray'),
|
2540 | initCloneObject = require('./_initCloneObject'),
|
2541 | isArguments = require('./isArguments'),
|
2542 | isArray = require('./isArray'),
|
2543 | isArrayLikeObject = require('./isArrayLikeObject'),
|
2544 | isBuffer = require('./isBuffer'),
|
2545 | isFunction = require('./isFunction'),
|
2546 | isObject = require('./isObject'),
|
2547 | isPlainObject = require('./isPlainObject'),
|
2548 | isTypedArray = require('./isTypedArray'),
|
2549 | safeGet = require('./_safeGet'),
|
2550 | toPlainObject = require('./toPlainObject');
|
2551 |
|
2552 |
|
2553 |
|
2554 |
|
2555 |
|
2556 |
|
2557 |
|
2558 |
|
2559 |
|
2560 |
|
2561 |
|
2562 |
|
2563 |
|
2564 |
|
2565 |
|
2566 |
|
2567 | function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
2568 | var objValue = safeGet(object, key),
|
2569 | srcValue = safeGet(source, key),
|
2570 | stacked = stack.get(srcValue);
|
2571 |
|
2572 | if (stacked) {
|
2573 | assignMergeValue(object, key, stacked);
|
2574 | return;
|
2575 | }
|
2576 | var newValue = customizer
|
2577 | ? customizer(objValue, srcValue, (key + ''), object, source, stack)
|
2578 | : undefined;
|
2579 |
|
2580 | var isCommon = newValue === undefined;
|
2581 |
|
2582 | if (isCommon) {
|
2583 | var isArr = isArray(srcValue),
|
2584 | isBuff = !isArr && isBuffer(srcValue),
|
2585 | isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
2586 |
|
2587 | newValue = srcValue;
|
2588 | if (isArr || isBuff || isTyped) {
|
2589 | if (isArray(objValue)) {
|
2590 | newValue = objValue;
|
2591 | }
|
2592 | else if (isArrayLikeObject(objValue)) {
|
2593 | newValue = copyArray(objValue);
|
2594 | }
|
2595 | else if (isBuff) {
|
2596 | isCommon = false;
|
2597 | newValue = cloneBuffer(srcValue, true);
|
2598 | }
|
2599 | else if (isTyped) {
|
2600 | isCommon = false;
|
2601 | newValue = cloneTypedArray(srcValue, true);
|
2602 | }
|
2603 | else {
|
2604 | newValue = [];
|
2605 | }
|
2606 | }
|
2607 | else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
2608 | newValue = objValue;
|
2609 | if (isArguments(objValue)) {
|
2610 | newValue = toPlainObject(objValue);
|
2611 | }
|
2612 | else if (!isObject(objValue) || isFunction(objValue)) {
|
2613 | newValue = initCloneObject(srcValue);
|
2614 | }
|
2615 | }
|
2616 | else {
|
2617 | isCommon = false;
|
2618 | }
|
2619 | }
|
2620 | if (isCommon) {
|
2621 |
|
2622 | stack.set(srcValue, newValue);
|
2623 | mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
2624 | stack['delete'](srcValue);
|
2625 | }
|
2626 | assignMergeValue(object, key, newValue);
|
2627 | }
|
2628 |
|
2629 | module.exports = baseMergeDeep;
|
2630 |
|
2631 | },{"./_assignMergeValue":37,"./_cloneBuffer":78,"./_cloneTypedArray":79,"./_copyArray":80,"./_initCloneObject":110,"./_safeGet":140,"./isArguments":166,"./isArray":167,"./isArrayLikeObject":169,"./isBuffer":170,"./isFunction":171,"./isObject":174,"./isPlainObject":176,"./isTypedArray":178,"./toPlainObject":194}],64:[function(require,module,exports){
|
2632 | var basePickBy = require('./_basePickBy'),
|
2633 | hasIn = require('./hasIn');
|
2634 |
|
2635 |
|
2636 |
|
2637 |
|
2638 |
|
2639 |
|
2640 |
|
2641 |
|
2642 |
|
2643 |
|
2644 | function basePick(object, paths) {
|
2645 | return basePickBy(object, paths, function(value, path) {
|
2646 | return hasIn(object, path);
|
2647 | });
|
2648 | }
|
2649 |
|
2650 | module.exports = basePick;
|
2651 |
|
2652 | },{"./_basePickBy":65,"./hasIn":164}],65:[function(require,module,exports){
|
2653 | var baseGet = require('./_baseGet'),
|
2654 | baseSet = require('./_baseSet'),
|
2655 | castPath = require('./_castPath');
|
2656 |
|
2657 |
|
2658 |
|
2659 |
|
2660 |
|
2661 |
|
2662 |
|
2663 |
|
2664 |
|
2665 |
|
2666 | function basePickBy(object, paths, predicate) {
|
2667 | var index = -1,
|
2668 | length = paths.length,
|
2669 | result = {};
|
2670 |
|
2671 | while (++index < length) {
|
2672 | var path = paths[index],
|
2673 | value = baseGet(object, path);
|
2674 |
|
2675 | if (predicate(value, path)) {
|
2676 | baseSet(result, castPath(path, object), value);
|
2677 | }
|
2678 | }
|
2679 | return result;
|
2680 | }
|
2681 |
|
2682 | module.exports = basePickBy;
|
2683 |
|
2684 | },{"./_baseGet":47,"./_baseSet":69,"./_castPath":76}],66:[function(require,module,exports){
|
2685 |
|
2686 |
|
2687 |
|
2688 |
|
2689 |
|
2690 |
|
2691 |
|
2692 | function baseProperty(key) {
|
2693 | return function(object) {
|
2694 | return object == null ? undefined : object[key];
|
2695 | };
|
2696 | }
|
2697 |
|
2698 | module.exports = baseProperty;
|
2699 |
|
2700 | },{}],67:[function(require,module,exports){
|
2701 | var baseGet = require('./_baseGet');
|
2702 |
|
2703 |
|
2704 |
|
2705 |
|
2706 |
|
2707 |
|
2708 |
|
2709 |
|
2710 | function basePropertyDeep(path) {
|
2711 | return function(object) {
|
2712 | return baseGet(object, path);
|
2713 | };
|
2714 | }
|
2715 |
|
2716 | module.exports = basePropertyDeep;
|
2717 |
|
2718 | },{"./_baseGet":47}],68:[function(require,module,exports){
|
2719 | var identity = require('./identity'),
|
2720 | overRest = require('./_overRest'),
|
2721 | setToString = require('./_setToString');
|
2722 |
|
2723 |
|
2724 |
|
2725 |
|
2726 |
|
2727 |
|
2728 |
|
2729 |
|
2730 |
|
2731 | function baseRest(func, start) {
|
2732 | return setToString(overRest(func, start, identity), func + '');
|
2733 | }
|
2734 |
|
2735 | module.exports = baseRest;
|
2736 |
|
2737 | },{"./_overRest":138,"./_setToString":144,"./identity":165}],69:[function(require,module,exports){
|
2738 | var assignValue = require('./_assignValue'),
|
2739 | castPath = require('./_castPath'),
|
2740 | isIndex = require('./_isIndex'),
|
2741 | isObject = require('./isObject'),
|
2742 | toKey = require('./_toKey');
|
2743 |
|
2744 |
|
2745 |
|
2746 |
|
2747 |
|
2748 |
|
2749 |
|
2750 |
|
2751 |
|
2752 |
|
2753 |
|
2754 | function baseSet(object, path, value, customizer) {
|
2755 | if (!isObject(object)) {
|
2756 | return object;
|
2757 | }
|
2758 | path = castPath(path, object);
|
2759 |
|
2760 | var index = -1,
|
2761 | length = path.length,
|
2762 | lastIndex = length - 1,
|
2763 | nested = object;
|
2764 |
|
2765 | while (nested != null && ++index < length) {
|
2766 | var key = toKey(path[index]),
|
2767 | newValue = value;
|
2768 |
|
2769 | if (index != lastIndex) {
|
2770 | var objValue = nested[key];
|
2771 | newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
2772 | if (newValue === undefined) {
|
2773 | newValue = isObject(objValue)
|
2774 | ? objValue
|
2775 | : (isIndex(path[index + 1]) ? [] : {});
|
2776 | }
|
2777 | }
|
2778 | assignValue(nested, key, newValue);
|
2779 | nested = nested[key];
|
2780 | }
|
2781 | return object;
|
2782 | }
|
2783 |
|
2784 | module.exports = baseSet;
|
2785 |
|
2786 | },{"./_assignValue":38,"./_castPath":76,"./_isIndex":112,"./_toKey":152,"./isObject":174}],70:[function(require,module,exports){
|
2787 | var constant = require('./constant'),
|
2788 | defineProperty = require('./_defineProperty'),
|
2789 | identity = require('./identity');
|
2790 |
|
2791 |
|
2792 |
|
2793 |
|
2794 |
|
2795 |
|
2796 |
|
2797 |
|
2798 |
|
2799 | var baseSetToString = !defineProperty ? identity : function(func, string) {
|
2800 | return defineProperty(func, 'toString', {
|
2801 | 'configurable': true,
|
2802 | 'enumerable': false,
|
2803 | 'value': constant(string),
|
2804 | 'writable': true
|
2805 | });
|
2806 | };
|
2807 |
|
2808 | module.exports = baseSetToString;
|
2809 |
|
2810 | },{"./_defineProperty":87,"./constant":155,"./identity":165}],71:[function(require,module,exports){
|
2811 |
|
2812 |
|
2813 |
|
2814 |
|
2815 |
|
2816 |
|
2817 |
|
2818 |
|
2819 |
|
2820 | function baseTimes(n, iteratee) {
|
2821 | var index = -1,
|
2822 | result = Array(n);
|
2823 |
|
2824 | while (++index < n) {
|
2825 | result[index] = iteratee(index);
|
2826 | }
|
2827 | return result;
|
2828 | }
|
2829 |
|
2830 | module.exports = baseTimes;
|
2831 |
|
2832 | },{}],72:[function(require,module,exports){
|
2833 | var Symbol = require('./_Symbol'),
|
2834 | arrayMap = require('./_arrayMap'),
|
2835 | isArray = require('./isArray'),
|
2836 | isSymbol = require('./isSymbol');
|
2837 |
|
2838 |
|
2839 | var INFINITY = 1 / 0;
|
2840 |
|
2841 |
|
2842 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
2843 | symbolToString = symbolProto ? symbolProto.toString : undefined;
|
2844 |
|
2845 |
|
2846 |
|
2847 |
|
2848 |
|
2849 |
|
2850 |
|
2851 |
|
2852 |
|
2853 | function baseToString(value) {
|
2854 |
|
2855 | if (typeof value == 'string') {
|
2856 | return value;
|
2857 | }
|
2858 | if (isArray(value)) {
|
2859 |
|
2860 | return arrayMap(value, baseToString) + '';
|
2861 | }
|
2862 | if (isSymbol(value)) {
|
2863 | return symbolToString ? symbolToString.call(value) : '';
|
2864 | }
|
2865 | var result = (value + '');
|
2866 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
2867 | }
|
2868 |
|
2869 | module.exports = baseToString;
|
2870 |
|
2871 | },{"./_Symbol":27,"./_arrayMap":34,"./isArray":167,"./isSymbol":177}],73:[function(require,module,exports){
|
2872 |
|
2873 |
|
2874 |
|
2875 |
|
2876 |
|
2877 |
|
2878 |
|
2879 | function baseUnary(func) {
|
2880 | return function(value) {
|
2881 | return func(value);
|
2882 | };
|
2883 | }
|
2884 |
|
2885 | module.exports = baseUnary;
|
2886 |
|
2887 | },{}],74:[function(require,module,exports){
|
2888 |
|
2889 |
|
2890 |
|
2891 |
|
2892 |
|
2893 |
|
2894 |
|
2895 |
|
2896 | function cacheHas(cache, key) {
|
2897 | return cache.has(key);
|
2898 | }
|
2899 |
|
2900 | module.exports = cacheHas;
|
2901 |
|
2902 | },{}],75:[function(require,module,exports){
|
2903 | var identity = require('./identity');
|
2904 |
|
2905 |
|
2906 |
|
2907 |
|
2908 |
|
2909 |
|
2910 |
|
2911 |
|
2912 | function castFunction(value) {
|
2913 | return typeof value == 'function' ? value : identity;
|
2914 | }
|
2915 |
|
2916 | module.exports = castFunction;
|
2917 |
|
2918 | },{"./identity":165}],76:[function(require,module,exports){
|
2919 | var isArray = require('./isArray'),
|
2920 | isKey = require('./_isKey'),
|
2921 | stringToPath = require('./_stringToPath'),
|
2922 | toString = require('./toString');
|
2923 |
|
2924 |
|
2925 |
|
2926 |
|
2927 |
|
2928 |
|
2929 |
|
2930 |
|
2931 |
|
2932 | function castPath(value, object) {
|
2933 | if (isArray(value)) {
|
2934 | return value;
|
2935 | }
|
2936 | return isKey(value, object) ? [value] : stringToPath(toString(value));
|
2937 | }
|
2938 |
|
2939 | module.exports = castPath;
|
2940 |
|
2941 | },{"./_isKey":114,"./_stringToPath":151,"./isArray":167,"./toString":195}],77:[function(require,module,exports){
|
2942 | var Uint8Array = require('./_Uint8Array');
|
2943 |
|
2944 |
|
2945 |
|
2946 |
|
2947 |
|
2948 |
|
2949 |
|
2950 |
|
2951 | function cloneArrayBuffer(arrayBuffer) {
|
2952 | var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
2953 | new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
2954 | return result;
|
2955 | }
|
2956 |
|
2957 | module.exports = cloneArrayBuffer;
|
2958 |
|
2959 | },{"./_Uint8Array":28}],78:[function(require,module,exports){
|
2960 | var root = require('./_root');
|
2961 |
|
2962 |
|
2963 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
2964 |
|
2965 |
|
2966 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
2967 |
|
2968 |
|
2969 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
2970 |
|
2971 |
|
2972 | var Buffer = moduleExports ? root.Buffer : undefined,
|
2973 | allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
2974 |
|
2975 |
|
2976 |
|
2977 |
|
2978 |
|
2979 |
|
2980 |
|
2981 |
|
2982 |
|
2983 | function cloneBuffer(buffer, isDeep) {
|
2984 | if (isDeep) {
|
2985 | return buffer.slice();
|
2986 | }
|
2987 | var length = buffer.length,
|
2988 | result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
2989 |
|
2990 | buffer.copy(result);
|
2991 | return result;
|
2992 | }
|
2993 |
|
2994 | module.exports = cloneBuffer;
|
2995 |
|
2996 | },{"./_root":139}],79:[function(require,module,exports){
|
2997 | var cloneArrayBuffer = require('./_cloneArrayBuffer');
|
2998 |
|
2999 |
|
3000 |
|
3001 |
|
3002 |
|
3003 |
|
3004 |
|
3005 |
|
3006 |
|
3007 | function cloneTypedArray(typedArray, isDeep) {
|
3008 | var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
3009 | return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
3010 | }
|
3011 |
|
3012 | module.exports = cloneTypedArray;
|
3013 |
|
3014 | },{"./_cloneArrayBuffer":77}],80:[function(require,module,exports){
|
3015 |
|
3016 |
|
3017 |
|
3018 |
|
3019 |
|
3020 |
|
3021 |
|
3022 |
|
3023 | function copyArray(source, array) {
|
3024 | var index = -1,
|
3025 | length = source.length;
|
3026 |
|
3027 | array || (array = Array(length));
|
3028 | while (++index < length) {
|
3029 | array[index] = source[index];
|
3030 | }
|
3031 | return array;
|
3032 | }
|
3033 |
|
3034 | module.exports = copyArray;
|
3035 |
|
3036 | },{}],81:[function(require,module,exports){
|
3037 | var assignValue = require('./_assignValue'),
|
3038 | baseAssignValue = require('./_baseAssignValue');
|
3039 |
|
3040 |
|
3041 |
|
3042 |
|
3043 |
|
3044 |
|
3045 |
|
3046 |
|
3047 |
|
3048 |
|
3049 |
|
3050 | function copyObject(source, props, object, customizer) {
|
3051 | var isNew = !object;
|
3052 | object || (object = {});
|
3053 |
|
3054 | var index = -1,
|
3055 | length = props.length;
|
3056 |
|
3057 | while (++index < length) {
|
3058 | var key = props[index];
|
3059 |
|
3060 | var newValue = customizer
|
3061 | ? customizer(object[key], source[key], key, object, source)
|
3062 | : undefined;
|
3063 |
|
3064 | if (newValue === undefined) {
|
3065 | newValue = source[key];
|
3066 | }
|
3067 | if (isNew) {
|
3068 | baseAssignValue(object, key, newValue);
|
3069 | } else {
|
3070 | assignValue(object, key, newValue);
|
3071 | }
|
3072 | }
|
3073 | return object;
|
3074 | }
|
3075 |
|
3076 | module.exports = copyObject;
|
3077 |
|
3078 | },{"./_assignValue":38,"./_baseAssignValue":40}],82:[function(require,module,exports){
|
3079 | var root = require('./_root');
|
3080 |
|
3081 |
|
3082 | var coreJsData = root['__core-js_shared__'];
|
3083 |
|
3084 | module.exports = coreJsData;
|
3085 |
|
3086 | },{"./_root":139}],83:[function(require,module,exports){
|
3087 | var baseRest = require('./_baseRest'),
|
3088 | isIterateeCall = require('./_isIterateeCall');
|
3089 |
|
3090 |
|
3091 |
|
3092 |
|
3093 |
|
3094 |
|
3095 |
|
3096 |
|
3097 | function createAssigner(assigner) {
|
3098 | return baseRest(function(object, sources) {
|
3099 | var index = -1,
|
3100 | length = sources.length,
|
3101 | customizer = length > 1 ? sources[length - 1] : undefined,
|
3102 | guard = length > 2 ? sources[2] : undefined;
|
3103 |
|
3104 | customizer = (assigner.length > 3 && typeof customizer == 'function')
|
3105 | ? (length--, customizer)
|
3106 | : undefined;
|
3107 |
|
3108 | if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
3109 | customizer = length < 3 ? undefined : customizer;
|
3110 | length = 1;
|
3111 | }
|
3112 | object = Object(object);
|
3113 | while (++index < length) {
|
3114 | var source = sources[index];
|
3115 | if (source) {
|
3116 | assigner(object, source, index, customizer);
|
3117 | }
|
3118 | }
|
3119 | return object;
|
3120 | });
|
3121 | }
|
3122 |
|
3123 | module.exports = createAssigner;
|
3124 |
|
3125 | },{"./_baseRest":68,"./_isIterateeCall":113}],84:[function(require,module,exports){
|
3126 | var isArrayLike = require('./isArrayLike');
|
3127 |
|
3128 |
|
3129 |
|
3130 |
|
3131 |
|
3132 |
|
3133 |
|
3134 |
|
3135 |
|
3136 | function createBaseEach(eachFunc, fromRight) {
|
3137 | return function(collection, iteratee) {
|
3138 | if (collection == null) {
|
3139 | return collection;
|
3140 | }
|
3141 | if (!isArrayLike(collection)) {
|
3142 | return eachFunc(collection, iteratee);
|
3143 | }
|
3144 | var length = collection.length,
|
3145 | index = fromRight ? length : -1,
|
3146 | iterable = Object(collection);
|
3147 |
|
3148 | while ((fromRight ? index-- : ++index < length)) {
|
3149 | if (iteratee(iterable[index], index, iterable) === false) {
|
3150 | break;
|
3151 | }
|
3152 | }
|
3153 | return collection;
|
3154 | };
|
3155 | }
|
3156 |
|
3157 | module.exports = createBaseEach;
|
3158 |
|
3159 | },{"./isArrayLike":168}],85:[function(require,module,exports){
|
3160 |
|
3161 |
|
3162 |
|
3163 |
|
3164 |
|
3165 |
|
3166 |
|
3167 | function createBaseFor(fromRight) {
|
3168 | return function(object, iteratee, keysFunc) {
|
3169 | var index = -1,
|
3170 | iterable = Object(object),
|
3171 | props = keysFunc(object),
|
3172 | length = props.length;
|
3173 |
|
3174 | while (length--) {
|
3175 | var key = props[fromRight ? length : ++index];
|
3176 | if (iteratee(iterable[key], key, iterable) === false) {
|
3177 | break;
|
3178 | }
|
3179 | }
|
3180 | return object;
|
3181 | };
|
3182 | }
|
3183 |
|
3184 | module.exports = createBaseFor;
|
3185 |
|
3186 | },{}],86:[function(require,module,exports){
|
3187 | var baseIteratee = require('./_baseIteratee'),
|
3188 | isArrayLike = require('./isArrayLike'),
|
3189 | keys = require('./keys');
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 |
|
3195 |
|
3196 |
|
3197 |
|
3198 | function createFind(findIndexFunc) {
|
3199 | return function(collection, predicate, fromIndex) {
|
3200 | var iterable = Object(collection);
|
3201 | if (!isArrayLike(collection)) {
|
3202 | var iteratee = baseIteratee(predicate, 3);
|
3203 | collection = keys(collection);
|
3204 | predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
3205 | }
|
3206 | var index = findIndexFunc(collection, predicate, fromIndex);
|
3207 | return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
|
3208 | };
|
3209 | }
|
3210 |
|
3211 | module.exports = createFind;
|
3212 |
|
3213 | },{"./_baseIteratee":57,"./isArrayLike":168,"./keys":179}],87:[function(require,module,exports){
|
3214 | var getNative = require('./_getNative');
|
3215 |
|
3216 | var defineProperty = (function() {
|
3217 | try {
|
3218 | var func = getNative(Object, 'defineProperty');
|
3219 | func({}, '', {});
|
3220 | return func;
|
3221 | } catch (e) {}
|
3222 | }());
|
3223 |
|
3224 | module.exports = defineProperty;
|
3225 |
|
3226 | },{"./_getNative":97}],88:[function(require,module,exports){
|
3227 | var SetCache = require('./_SetCache'),
|
3228 | arraySome = require('./_arraySome'),
|
3229 | cacheHas = require('./_cacheHas');
|
3230 |
|
3231 |
|
3232 | var COMPARE_PARTIAL_FLAG = 1,
|
3233 | COMPARE_UNORDERED_FLAG = 2;
|
3234 |
|
3235 |
|
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 |
|
3241 |
|
3242 |
|
3243 |
|
3244 |
|
3245 |
|
3246 |
|
3247 |
|
3248 | function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
3249 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
3250 | arrLength = array.length,
|
3251 | othLength = other.length;
|
3252 |
|
3253 | if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
3254 | return false;
|
3255 | }
|
3256 |
|
3257 | var stacked = stack.get(array);
|
3258 | if (stacked && stack.get(other)) {
|
3259 | return stacked == other;
|
3260 | }
|
3261 | var index = -1,
|
3262 | result = true,
|
3263 | seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
|
3264 |
|
3265 | stack.set(array, other);
|
3266 | stack.set(other, array);
|
3267 |
|
3268 |
|
3269 | while (++index < arrLength) {
|
3270 | var arrValue = array[index],
|
3271 | othValue = other[index];
|
3272 |
|
3273 | if (customizer) {
|
3274 | var compared = isPartial
|
3275 | ? customizer(othValue, arrValue, index, other, array, stack)
|
3276 | : customizer(arrValue, othValue, index, array, other, stack);
|
3277 | }
|
3278 | if (compared !== undefined) {
|
3279 | if (compared) {
|
3280 | continue;
|
3281 | }
|
3282 | result = false;
|
3283 | break;
|
3284 | }
|
3285 |
|
3286 | if (seen) {
|
3287 | if (!arraySome(other, function(othValue, othIndex) {
|
3288 | if (!cacheHas(seen, othIndex) &&
|
3289 | (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
3290 | return seen.push(othIndex);
|
3291 | }
|
3292 | })) {
|
3293 | result = false;
|
3294 | break;
|
3295 | }
|
3296 | } else if (!(
|
3297 | arrValue === othValue ||
|
3298 | equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
3299 | )) {
|
3300 | result = false;
|
3301 | break;
|
3302 | }
|
3303 | }
|
3304 | stack['delete'](array);
|
3305 | stack['delete'](other);
|
3306 | return result;
|
3307 | }
|
3308 |
|
3309 | module.exports = equalArrays;
|
3310 |
|
3311 | },{"./_SetCache":25,"./_arraySome":36,"./_cacheHas":74}],89:[function(require,module,exports){
|
3312 | var Symbol = require('./_Symbol'),
|
3313 | Uint8Array = require('./_Uint8Array'),
|
3314 | eq = require('./eq'),
|
3315 | equalArrays = require('./_equalArrays'),
|
3316 | mapToArray = require('./_mapToArray'),
|
3317 | setToArray = require('./_setToArray');
|
3318 |
|
3319 |
|
3320 | var COMPARE_PARTIAL_FLAG = 1,
|
3321 | COMPARE_UNORDERED_FLAG = 2;
|
3322 |
|
3323 |
|
3324 | var boolTag = '[object Boolean]',
|
3325 | dateTag = '[object Date]',
|
3326 | errorTag = '[object Error]',
|
3327 | mapTag = '[object Map]',
|
3328 | numberTag = '[object Number]',
|
3329 | regexpTag = '[object RegExp]',
|
3330 | setTag = '[object Set]',
|
3331 | stringTag = '[object String]',
|
3332 | symbolTag = '[object Symbol]';
|
3333 |
|
3334 | var arrayBufferTag = '[object ArrayBuffer]',
|
3335 | dataViewTag = '[object DataView]';
|
3336 |
|
3337 |
|
3338 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
3339 | symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
3340 |
|
3341 |
|
3342 |
|
3343 |
|
3344 |
|
3345 |
|
3346 |
|
3347 |
|
3348 |
|
3349 |
|
3350 |
|
3351 |
|
3352 |
|
3353 |
|
3354 |
|
3355 |
|
3356 |
|
3357 |
|
3358 | function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
3359 | switch (tag) {
|
3360 | case dataViewTag:
|
3361 | if ((object.byteLength != other.byteLength) ||
|
3362 | (object.byteOffset != other.byteOffset)) {
|
3363 | return false;
|
3364 | }
|
3365 | object = object.buffer;
|
3366 | other = other.buffer;
|
3367 |
|
3368 | case arrayBufferTag:
|
3369 | if ((object.byteLength != other.byteLength) ||
|
3370 | !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
3371 | return false;
|
3372 | }
|
3373 | return true;
|
3374 |
|
3375 | case boolTag:
|
3376 | case dateTag:
|
3377 | case numberTag:
|
3378 |
|
3379 |
|
3380 | return eq(+object, +other);
|
3381 |
|
3382 | case errorTag:
|
3383 | return object.name == other.name && object.message == other.message;
|
3384 |
|
3385 | case regexpTag:
|
3386 | case stringTag:
|
3387 |
|
3388 |
|
3389 |
|
3390 | return object == (other + '');
|
3391 |
|
3392 | case mapTag:
|
3393 | var convert = mapToArray;
|
3394 |
|
3395 | case setTag:
|
3396 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
3397 | convert || (convert = setToArray);
|
3398 |
|
3399 | if (object.size != other.size && !isPartial) {
|
3400 | return false;
|
3401 | }
|
3402 |
|
3403 | var stacked = stack.get(object);
|
3404 | if (stacked) {
|
3405 | return stacked == other;
|
3406 | }
|
3407 | bitmask |= COMPARE_UNORDERED_FLAG;
|
3408 |
|
3409 |
|
3410 | stack.set(object, other);
|
3411 | var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
3412 | stack['delete'](object);
|
3413 | return result;
|
3414 |
|
3415 | case symbolTag:
|
3416 | if (symbolValueOf) {
|
3417 | return symbolValueOf.call(object) == symbolValueOf.call(other);
|
3418 | }
|
3419 | }
|
3420 | return false;
|
3421 | }
|
3422 |
|
3423 | module.exports = equalByTag;
|
3424 |
|
3425 | },{"./_Symbol":27,"./_Uint8Array":28,"./_equalArrays":88,"./_mapToArray":129,"./_setToArray":143,"./eq":157}],90:[function(require,module,exports){
|
3426 | var getAllKeys = require('./_getAllKeys');
|
3427 |
|
3428 |
|
3429 | var COMPARE_PARTIAL_FLAG = 1;
|
3430 |
|
3431 |
|
3432 | var objectProto = Object.prototype;
|
3433 |
|
3434 |
|
3435 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3436 |
|
3437 |
|
3438 |
|
3439 |
|
3440 |
|
3441 |
|
3442 |
|
3443 |
|
3444 |
|
3445 |
|
3446 |
|
3447 |
|
3448 |
|
3449 |
|
3450 | function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
3451 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
3452 | objProps = getAllKeys(object),
|
3453 | objLength = objProps.length,
|
3454 | othProps = getAllKeys(other),
|
3455 | othLength = othProps.length;
|
3456 |
|
3457 | if (objLength != othLength && !isPartial) {
|
3458 | return false;
|
3459 | }
|
3460 | var index = objLength;
|
3461 | while (index--) {
|
3462 | var key = objProps[index];
|
3463 | if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
3464 | return false;
|
3465 | }
|
3466 | }
|
3467 |
|
3468 | var stacked = stack.get(object);
|
3469 | if (stacked && stack.get(other)) {
|
3470 | return stacked == other;
|
3471 | }
|
3472 | var result = true;
|
3473 | stack.set(object, other);
|
3474 | stack.set(other, object);
|
3475 |
|
3476 | var skipCtor = isPartial;
|
3477 | while (++index < objLength) {
|
3478 | key = objProps[index];
|
3479 | var objValue = object[key],
|
3480 | othValue = other[key];
|
3481 |
|
3482 | if (customizer) {
|
3483 | var compared = isPartial
|
3484 | ? customizer(othValue, objValue, key, other, object, stack)
|
3485 | : customizer(objValue, othValue, key, object, other, stack);
|
3486 | }
|
3487 |
|
3488 | if (!(compared === undefined
|
3489 | ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
3490 | : compared
|
3491 | )) {
|
3492 | result = false;
|
3493 | break;
|
3494 | }
|
3495 | skipCtor || (skipCtor = key == 'constructor');
|
3496 | }
|
3497 | if (result && !skipCtor) {
|
3498 | var objCtor = object.constructor,
|
3499 | othCtor = other.constructor;
|
3500 |
|
3501 |
|
3502 | if (objCtor != othCtor &&
|
3503 | ('constructor' in object && 'constructor' in other) &&
|
3504 | !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
|
3505 | typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
3506 | result = false;
|
3507 | }
|
3508 | }
|
3509 | stack['delete'](object);
|
3510 | stack['delete'](other);
|
3511 | return result;
|
3512 | }
|
3513 |
|
3514 | module.exports = equalObjects;
|
3515 |
|
3516 | },{"./_getAllKeys":93}],91:[function(require,module,exports){
|
3517 | var flatten = require('./flatten'),
|
3518 | overRest = require('./_overRest'),
|
3519 | setToString = require('./_setToString');
|
3520 |
|
3521 |
|
3522 |
|
3523 |
|
3524 |
|
3525 |
|
3526 |
|
3527 |
|
3528 | function flatRest(func) {
|
3529 | return setToString(overRest(func, undefined, flatten), func + '');
|
3530 | }
|
3531 |
|
3532 | module.exports = flatRest;
|
3533 |
|
3534 | },{"./_overRest":138,"./_setToString":144,"./flatten":161}],92:[function(require,module,exports){
|
3535 | (function (global){
|
3536 |
|
3537 | var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
3538 |
|
3539 | module.exports = freeGlobal;
|
3540 |
|
3541 | }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
3542 | },{}],93:[function(require,module,exports){
|
3543 | var baseGetAllKeys = require('./_baseGetAllKeys'),
|
3544 | getSymbols = require('./_getSymbols'),
|
3545 | keys = require('./keys');
|
3546 |
|
3547 |
|
3548 |
|
3549 |
|
3550 |
|
3551 |
|
3552 |
|
3553 |
|
3554 | function getAllKeys(object) {
|
3555 | return baseGetAllKeys(object, keys, getSymbols);
|
3556 | }
|
3557 |
|
3558 | module.exports = getAllKeys;
|
3559 |
|
3560 | },{"./_baseGetAllKeys":48,"./_getSymbols":100,"./keys":179}],94:[function(require,module,exports){
|
3561 | var baseGetAllKeys = require('./_baseGetAllKeys'),
|
3562 | getSymbolsIn = require('./_getSymbolsIn'),
|
3563 | keysIn = require('./keysIn');
|
3564 |
|
3565 |
|
3566 |
|
3567 |
|
3568 |
|
3569 |
|
3570 |
|
3571 |
|
3572 |
|
3573 | function getAllKeysIn(object) {
|
3574 | return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
3575 | }
|
3576 |
|
3577 | module.exports = getAllKeysIn;
|
3578 |
|
3579 | },{"./_baseGetAllKeys":48,"./_getSymbolsIn":101,"./keysIn":180}],95:[function(require,module,exports){
|
3580 | var isKeyable = require('./_isKeyable');
|
3581 |
|
3582 |
|
3583 |
|
3584 |
|
3585 |
|
3586 |
|
3587 |
|
3588 |
|
3589 |
|
3590 | function getMapData(map, key) {
|
3591 | var data = map.__data__;
|
3592 | return isKeyable(key)
|
3593 | ? data[typeof key == 'string' ? 'string' : 'hash']
|
3594 | : data.map;
|
3595 | }
|
3596 |
|
3597 | module.exports = getMapData;
|
3598 |
|
3599 | },{"./_isKeyable":115}],96:[function(require,module,exports){
|
3600 | var isStrictComparable = require('./_isStrictComparable'),
|
3601 | keys = require('./keys');
|
3602 |
|
3603 |
|
3604 |
|
3605 |
|
3606 |
|
3607 |
|
3608 |
|
3609 |
|
3610 | function getMatchData(object) {
|
3611 | var result = keys(object),
|
3612 | length = result.length;
|
3613 |
|
3614 | while (length--) {
|
3615 | var key = result[length],
|
3616 | value = object[key];
|
3617 |
|
3618 | result[length] = [key, value, isStrictComparable(value)];
|
3619 | }
|
3620 | return result;
|
3621 | }
|
3622 |
|
3623 | module.exports = getMatchData;
|
3624 |
|
3625 | },{"./_isStrictComparable":118,"./keys":179}],97:[function(require,module,exports){
|
3626 | var baseIsNative = require('./_baseIsNative'),
|
3627 | getValue = require('./_getValue');
|
3628 |
|
3629 |
|
3630 |
|
3631 |
|
3632 |
|
3633 |
|
3634 |
|
3635 |
|
3636 |
|
3637 | function getNative(object, key) {
|
3638 | var value = getValue(object, key);
|
3639 | return baseIsNative(value) ? value : undefined;
|
3640 | }
|
3641 |
|
3642 | module.exports = getNative;
|
3643 |
|
3644 | },{"./_baseIsNative":55,"./_getValue":103}],98:[function(require,module,exports){
|
3645 | var overArg = require('./_overArg');
|
3646 |
|
3647 |
|
3648 | var getPrototype = overArg(Object.getPrototypeOf, Object);
|
3649 |
|
3650 | module.exports = getPrototype;
|
3651 |
|
3652 | },{"./_overArg":137}],99:[function(require,module,exports){
|
3653 | var Symbol = require('./_Symbol');
|
3654 |
|
3655 |
|
3656 | var objectProto = Object.prototype;
|
3657 |
|
3658 |
|
3659 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3660 |
|
3661 |
|
3662 |
|
3663 |
|
3664 |
|
3665 |
|
3666 | var nativeObjectToString = objectProto.toString;
|
3667 |
|
3668 |
|
3669 | var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
3670 |
|
3671 |
|
3672 |
|
3673 |
|
3674 |
|
3675 |
|
3676 |
|
3677 |
|
3678 | function getRawTag(value) {
|
3679 | var isOwn = hasOwnProperty.call(value, symToStringTag),
|
3680 | tag = value[symToStringTag];
|
3681 |
|
3682 | try {
|
3683 | value[symToStringTag] = undefined;
|
3684 | var unmasked = true;
|
3685 | } catch (e) {}
|
3686 |
|
3687 | var result = nativeObjectToString.call(value);
|
3688 | if (unmasked) {
|
3689 | if (isOwn) {
|
3690 | value[symToStringTag] = tag;
|
3691 | } else {
|
3692 | delete value[symToStringTag];
|
3693 | }
|
3694 | }
|
3695 | return result;
|
3696 | }
|
3697 |
|
3698 | module.exports = getRawTag;
|
3699 |
|
3700 | },{"./_Symbol":27}],100:[function(require,module,exports){
|
3701 | var arrayFilter = require('./_arrayFilter'),
|
3702 | stubArray = require('./stubArray');
|
3703 |
|
3704 |
|
3705 | var objectProto = Object.prototype;
|
3706 |
|
3707 |
|
3708 | var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
3709 |
|
3710 |
|
3711 | var nativeGetSymbols = Object.getOwnPropertySymbols;
|
3712 |
|
3713 |
|
3714 |
|
3715 |
|
3716 |
|
3717 |
|
3718 |
|
3719 |
|
3720 | var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
3721 | if (object == null) {
|
3722 | return [];
|
3723 | }
|
3724 | object = Object(object);
|
3725 | return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
3726 | return propertyIsEnumerable.call(object, symbol);
|
3727 | });
|
3728 | };
|
3729 |
|
3730 | module.exports = getSymbols;
|
3731 |
|
3732 | },{"./_arrayFilter":32,"./stubArray":189}],101:[function(require,module,exports){
|
3733 | var arrayPush = require('./_arrayPush'),
|
3734 | getPrototype = require('./_getPrototype'),
|
3735 | getSymbols = require('./_getSymbols'),
|
3736 | stubArray = require('./stubArray');
|
3737 |
|
3738 |
|
3739 | var nativeGetSymbols = Object.getOwnPropertySymbols;
|
3740 |
|
3741 |
|
3742 |
|
3743 |
|
3744 |
|
3745 |
|
3746 |
|
3747 |
|
3748 | var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
3749 | var result = [];
|
3750 | while (object) {
|
3751 | arrayPush(result, getSymbols(object));
|
3752 | object = getPrototype(object);
|
3753 | }
|
3754 | return result;
|
3755 | };
|
3756 |
|
3757 | module.exports = getSymbolsIn;
|
3758 |
|
3759 | },{"./_arrayPush":35,"./_getPrototype":98,"./_getSymbols":100,"./stubArray":189}],102:[function(require,module,exports){
|
3760 | var DataView = require('./_DataView'),
|
3761 | Map = require('./_Map'),
|
3762 | Promise = require('./_Promise'),
|
3763 | Set = require('./_Set'),
|
3764 | WeakMap = require('./_WeakMap'),
|
3765 | baseGetTag = require('./_baseGetTag'),
|
3766 | toSource = require('./_toSource');
|
3767 |
|
3768 |
|
3769 | var mapTag = '[object Map]',
|
3770 | objectTag = '[object Object]',
|
3771 | promiseTag = '[object Promise]',
|
3772 | setTag = '[object Set]',
|
3773 | weakMapTag = '[object WeakMap]';
|
3774 |
|
3775 | var dataViewTag = '[object DataView]';
|
3776 |
|
3777 |
|
3778 | var dataViewCtorString = toSource(DataView),
|
3779 | mapCtorString = toSource(Map),
|
3780 | promiseCtorString = toSource(Promise),
|
3781 | setCtorString = toSource(Set),
|
3782 | weakMapCtorString = toSource(WeakMap);
|
3783 |
|
3784 |
|
3785 |
|
3786 |
|
3787 |
|
3788 |
|
3789 |
|
3790 |
|
3791 | var getTag = baseGetTag;
|
3792 |
|
3793 |
|
3794 | if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
3795 | (Map && getTag(new Map) != mapTag) ||
|
3796 | (Promise && getTag(Promise.resolve()) != promiseTag) ||
|
3797 | (Set && getTag(new Set) != setTag) ||
|
3798 | (WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
3799 | getTag = function(value) {
|
3800 | var result = baseGetTag(value),
|
3801 | Ctor = result == objectTag ? value.constructor : undefined,
|
3802 | ctorString = Ctor ? toSource(Ctor) : '';
|
3803 |
|
3804 | if (ctorString) {
|
3805 | switch (ctorString) {
|
3806 | case dataViewCtorString: return dataViewTag;
|
3807 | case mapCtorString: return mapTag;
|
3808 | case promiseCtorString: return promiseTag;
|
3809 | case setCtorString: return setTag;
|
3810 | case weakMapCtorString: return weakMapTag;
|
3811 | }
|
3812 | }
|
3813 | return result;
|
3814 | };
|
3815 | }
|
3816 |
|
3817 | module.exports = getTag;
|
3818 |
|
3819 | },{"./_DataView":18,"./_Map":21,"./_Promise":23,"./_Set":24,"./_WeakMap":29,"./_baseGetTag":49,"./_toSource":153}],103:[function(require,module,exports){
|
3820 |
|
3821 |
|
3822 |
|
3823 |
|
3824 |
|
3825 |
|
3826 |
|
3827 |
|
3828 | function getValue(object, key) {
|
3829 | return object == null ? undefined : object[key];
|
3830 | }
|
3831 |
|
3832 | module.exports = getValue;
|
3833 |
|
3834 | },{}],104:[function(require,module,exports){
|
3835 | var castPath = require('./_castPath'),
|
3836 | isArguments = require('./isArguments'),
|
3837 | isArray = require('./isArray'),
|
3838 | isIndex = require('./_isIndex'),
|
3839 | isLength = require('./isLength'),
|
3840 | toKey = require('./_toKey');
|
3841 |
|
3842 |
|
3843 |
|
3844 |
|
3845 |
|
3846 |
|
3847 |
|
3848 |
|
3849 |
|
3850 |
|
3851 | function hasPath(object, path, hasFunc) {
|
3852 | path = castPath(path, object);
|
3853 |
|
3854 | var index = -1,
|
3855 | length = path.length,
|
3856 | result = false;
|
3857 |
|
3858 | while (++index < length) {
|
3859 | var key = toKey(path[index]);
|
3860 | if (!(result = object != null && hasFunc(object, key))) {
|
3861 | break;
|
3862 | }
|
3863 | object = object[key];
|
3864 | }
|
3865 | if (result || ++index != length) {
|
3866 | return result;
|
3867 | }
|
3868 | length = object == null ? 0 : object.length;
|
3869 | return !!length && isLength(length) && isIndex(key, length) &&
|
3870 | (isArray(object) || isArguments(object));
|
3871 | }
|
3872 |
|
3873 | module.exports = hasPath;
|
3874 |
|
3875 | },{"./_castPath":76,"./_isIndex":112,"./_toKey":152,"./isArguments":166,"./isArray":167,"./isLength":172}],105:[function(require,module,exports){
|
3876 | var nativeCreate = require('./_nativeCreate');
|
3877 |
|
3878 |
|
3879 |
|
3880 |
|
3881 |
|
3882 |
|
3883 |
|
3884 |
|
3885 | function hashClear() {
|
3886 | this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
3887 | this.size = 0;
|
3888 | }
|
3889 |
|
3890 | module.exports = hashClear;
|
3891 |
|
3892 | },{"./_nativeCreate":132}],106:[function(require,module,exports){
|
3893 |
|
3894 |
|
3895 |
|
3896 |
|
3897 |
|
3898 |
|
3899 |
|
3900 |
|
3901 |
|
3902 |
|
3903 | function hashDelete(key) {
|
3904 | var result = this.has(key) && delete this.__data__[key];
|
3905 | this.size -= result ? 1 : 0;
|
3906 | return result;
|
3907 | }
|
3908 |
|
3909 | module.exports = hashDelete;
|
3910 |
|
3911 | },{}],107:[function(require,module,exports){
|
3912 | var nativeCreate = require('./_nativeCreate');
|
3913 |
|
3914 |
|
3915 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
3916 |
|
3917 |
|
3918 | var objectProto = Object.prototype;
|
3919 |
|
3920 |
|
3921 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 |
|
3927 |
|
3928 |
|
3929 |
|
3930 |
|
3931 |
|
3932 | function hashGet(key) {
|
3933 | var data = this.__data__;
|
3934 | if (nativeCreate) {
|
3935 | var result = data[key];
|
3936 | return result === HASH_UNDEFINED ? undefined : result;
|
3937 | }
|
3938 | return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
3939 | }
|
3940 |
|
3941 | module.exports = hashGet;
|
3942 |
|
3943 | },{"./_nativeCreate":132}],108:[function(require,module,exports){
|
3944 | var nativeCreate = require('./_nativeCreate');
|
3945 |
|
3946 |
|
3947 | var objectProto = Object.prototype;
|
3948 |
|
3949 |
|
3950 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3951 |
|
3952 |
|
3953 |
|
3954 |
|
3955 |
|
3956 |
|
3957 |
|
3958 |
|
3959 |
|
3960 |
|
3961 | function hashHas(key) {
|
3962 | var data = this.__data__;
|
3963 | return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
3964 | }
|
3965 |
|
3966 | module.exports = hashHas;
|
3967 |
|
3968 | },{"./_nativeCreate":132}],109:[function(require,module,exports){
|
3969 | var nativeCreate = require('./_nativeCreate');
|
3970 |
|
3971 |
|
3972 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
3973 |
|
3974 |
|
3975 |
|
3976 |
|
3977 |
|
3978 |
|
3979 |
|
3980 |
|
3981 |
|
3982 |
|
3983 |
|
3984 | function hashSet(key, value) {
|
3985 | var data = this.__data__;
|
3986 | this.size += this.has(key) ? 0 : 1;
|
3987 | data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
3988 | return this;
|
3989 | }
|
3990 |
|
3991 | module.exports = hashSet;
|
3992 |
|
3993 | },{"./_nativeCreate":132}],110:[function(require,module,exports){
|
3994 | var baseCreate = require('./_baseCreate'),
|
3995 | getPrototype = require('./_getPrototype'),
|
3996 | isPrototype = require('./_isPrototype');
|
3997 |
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 |
|
4004 |
|
4005 | function initCloneObject(object) {
|
4006 | return (typeof object.constructor == 'function' && !isPrototype(object))
|
4007 | ? baseCreate(getPrototype(object))
|
4008 | : {};
|
4009 | }
|
4010 |
|
4011 | module.exports = initCloneObject;
|
4012 |
|
4013 | },{"./_baseCreate":41,"./_getPrototype":98,"./_isPrototype":117}],111:[function(require,module,exports){
|
4014 | var Symbol = require('./_Symbol'),
|
4015 | isArguments = require('./isArguments'),
|
4016 | isArray = require('./isArray');
|
4017 |
|
4018 |
|
4019 | var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
4020 |
|
4021 |
|
4022 |
|
4023 |
|
4024 |
|
4025 |
|
4026 |
|
4027 |
|
4028 | function isFlattenable(value) {
|
4029 | return isArray(value) || isArguments(value) ||
|
4030 | !!(spreadableSymbol && value && value[spreadableSymbol]);
|
4031 | }
|
4032 |
|
4033 | module.exports = isFlattenable;
|
4034 |
|
4035 | },{"./_Symbol":27,"./isArguments":166,"./isArray":167}],112:[function(require,module,exports){
|
4036 |
|
4037 | var MAX_SAFE_INTEGER = 9007199254740991;
|
4038 |
|
4039 |
|
4040 | var reIsUint = /^(?:0|[1-9]\d*)$/;
|
4041 |
|
4042 |
|
4043 |
|
4044 |
|
4045 |
|
4046 |
|
4047 |
|
4048 |
|
4049 |
|
4050 | function isIndex(value, length) {
|
4051 | var type = typeof value;
|
4052 | length = length == null ? MAX_SAFE_INTEGER : length;
|
4053 |
|
4054 | return !!length &&
|
4055 | (type == 'number' ||
|
4056 | (type != 'symbol' && reIsUint.test(value))) &&
|
4057 | (value > -1 && value % 1 == 0 && value < length);
|
4058 | }
|
4059 |
|
4060 | module.exports = isIndex;
|
4061 |
|
4062 | },{}],113:[function(require,module,exports){
|
4063 | var eq = require('./eq'),
|
4064 | isArrayLike = require('./isArrayLike'),
|
4065 | isIndex = require('./_isIndex'),
|
4066 | isObject = require('./isObject');
|
4067 |
|
4068 |
|
4069 |
|
4070 |
|
4071 |
|
4072 |
|
4073 |
|
4074 |
|
4075 |
|
4076 |
|
4077 |
|
4078 | function isIterateeCall(value, index, object) {
|
4079 | if (!isObject(object)) {
|
4080 | return false;
|
4081 | }
|
4082 | var type = typeof index;
|
4083 | if (type == 'number'
|
4084 | ? (isArrayLike(object) && isIndex(index, object.length))
|
4085 | : (type == 'string' && index in object)
|
4086 | ) {
|
4087 | return eq(object[index], value);
|
4088 | }
|
4089 | return false;
|
4090 | }
|
4091 |
|
4092 | module.exports = isIterateeCall;
|
4093 |
|
4094 | },{"./_isIndex":112,"./eq":157,"./isArrayLike":168,"./isObject":174}],114:[function(require,module,exports){
|
4095 | var isArray = require('./isArray'),
|
4096 | isSymbol = require('./isSymbol');
|
4097 |
|
4098 |
|
4099 | var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
4100 | reIsPlainProp = /^\w*$/;
|
4101 |
|
4102 |
|
4103 |
|
4104 |
|
4105 |
|
4106 |
|
4107 |
|
4108 |
|
4109 |
|
4110 | function isKey(value, object) {
|
4111 | if (isArray(value)) {
|
4112 | return false;
|
4113 | }
|
4114 | var type = typeof value;
|
4115 | if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
4116 | value == null || isSymbol(value)) {
|
4117 | return true;
|
4118 | }
|
4119 | return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
4120 | (object != null && value in Object(object));
|
4121 | }
|
4122 |
|
4123 | module.exports = isKey;
|
4124 |
|
4125 | },{"./isArray":167,"./isSymbol":177}],115:[function(require,module,exports){
|
4126 |
|
4127 |
|
4128 |
|
4129 |
|
4130 |
|
4131 |
|
4132 |
|
4133 | function isKeyable(value) {
|
4134 | var type = typeof value;
|
4135 | return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
4136 | ? (value !== '__proto__')
|
4137 | : (value === null);
|
4138 | }
|
4139 |
|
4140 | module.exports = isKeyable;
|
4141 |
|
4142 | },{}],116:[function(require,module,exports){
|
4143 | var coreJsData = require('./_coreJsData');
|
4144 |
|
4145 |
|
4146 | var maskSrcKey = (function() {
|
4147 | var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
4148 | return uid ? ('Symbol(src)_1.' + uid) : '';
|
4149 | }());
|
4150 |
|
4151 |
|
4152 |
|
4153 |
|
4154 |
|
4155 |
|
4156 |
|
4157 |
|
4158 | function isMasked(func) {
|
4159 | return !!maskSrcKey && (maskSrcKey in func);
|
4160 | }
|
4161 |
|
4162 | module.exports = isMasked;
|
4163 |
|
4164 | },{"./_coreJsData":82}],117:[function(require,module,exports){
|
4165 |
|
4166 | var objectProto = Object.prototype;
|
4167 |
|
4168 |
|
4169 |
|
4170 |
|
4171 |
|
4172 |
|
4173 |
|
4174 |
|
4175 | function isPrototype(value) {
|
4176 | var Ctor = value && value.constructor,
|
4177 | proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
4178 |
|
4179 | return value === proto;
|
4180 | }
|
4181 |
|
4182 | module.exports = isPrototype;
|
4183 |
|
4184 | },{}],118:[function(require,module,exports){
|
4185 | var isObject = require('./isObject');
|
4186 |
|
4187 |
|
4188 |
|
4189 |
|
4190 |
|
4191 |
|
4192 |
|
4193 |
|
4194 |
|
4195 | function isStrictComparable(value) {
|
4196 | return value === value && !isObject(value);
|
4197 | }
|
4198 |
|
4199 | module.exports = isStrictComparable;
|
4200 |
|
4201 | },{"./isObject":174}],119:[function(require,module,exports){
|
4202 |
|
4203 |
|
4204 |
|
4205 |
|
4206 |
|
4207 |
|
4208 |
|
4209 | function listCacheClear() {
|
4210 | this.__data__ = [];
|
4211 | this.size = 0;
|
4212 | }
|
4213 |
|
4214 | module.exports = listCacheClear;
|
4215 |
|
4216 | },{}],120:[function(require,module,exports){
|
4217 | var assocIndexOf = require('./_assocIndexOf');
|
4218 |
|
4219 |
|
4220 | var arrayProto = Array.prototype;
|
4221 |
|
4222 |
|
4223 | var splice = arrayProto.splice;
|
4224 |
|
4225 |
|
4226 |
|
4227 |
|
4228 |
|
4229 |
|
4230 |
|
4231 |
|
4232 |
|
4233 |
|
4234 | function listCacheDelete(key) {
|
4235 | var data = this.__data__,
|
4236 | index = assocIndexOf(data, key);
|
4237 |
|
4238 | if (index < 0) {
|
4239 | return false;
|
4240 | }
|
4241 | var lastIndex = data.length - 1;
|
4242 | if (index == lastIndex) {
|
4243 | data.pop();
|
4244 | } else {
|
4245 | splice.call(data, index, 1);
|
4246 | }
|
4247 | --this.size;
|
4248 | return true;
|
4249 | }
|
4250 |
|
4251 | module.exports = listCacheDelete;
|
4252 |
|
4253 | },{"./_assocIndexOf":39}],121:[function(require,module,exports){
|
4254 | var assocIndexOf = require('./_assocIndexOf');
|
4255 |
|
4256 |
|
4257 |
|
4258 |
|
4259 |
|
4260 |
|
4261 |
|
4262 |
|
4263 |
|
4264 |
|
4265 | function listCacheGet(key) {
|
4266 | var data = this.__data__,
|
4267 | index = assocIndexOf(data, key);
|
4268 |
|
4269 | return index < 0 ? undefined : data[index][1];
|
4270 | }
|
4271 |
|
4272 | module.exports = listCacheGet;
|
4273 |
|
4274 | },{"./_assocIndexOf":39}],122:[function(require,module,exports){
|
4275 | var assocIndexOf = require('./_assocIndexOf');
|
4276 |
|
4277 |
|
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 |
|
4285 |
|
4286 | function listCacheHas(key) {
|
4287 | return assocIndexOf(this.__data__, key) > -1;
|
4288 | }
|
4289 |
|
4290 | module.exports = listCacheHas;
|
4291 |
|
4292 | },{"./_assocIndexOf":39}],123:[function(require,module,exports){
|
4293 | var assocIndexOf = require('./_assocIndexOf');
|
4294 |
|
4295 |
|
4296 |
|
4297 |
|
4298 |
|
4299 |
|
4300 |
|
4301 |
|
4302 |
|
4303 |
|
4304 |
|
4305 | function listCacheSet(key, value) {
|
4306 | var data = this.__data__,
|
4307 | index = assocIndexOf(data, key);
|
4308 |
|
4309 | if (index < 0) {
|
4310 | ++this.size;
|
4311 | data.push([key, value]);
|
4312 | } else {
|
4313 | data[index][1] = value;
|
4314 | }
|
4315 | return this;
|
4316 | }
|
4317 |
|
4318 | module.exports = listCacheSet;
|
4319 |
|
4320 | },{"./_assocIndexOf":39}],124:[function(require,module,exports){
|
4321 | var Hash = require('./_Hash'),
|
4322 | ListCache = require('./_ListCache'),
|
4323 | Map = require('./_Map');
|
4324 |
|
4325 |
|
4326 |
|
4327 |
|
4328 |
|
4329 |
|
4330 |
|
4331 |
|
4332 | function mapCacheClear() {
|
4333 | this.size = 0;
|
4334 | this.__data__ = {
|
4335 | 'hash': new Hash,
|
4336 | 'map': new (Map || ListCache),
|
4337 | 'string': new Hash
|
4338 | };
|
4339 | }
|
4340 |
|
4341 | module.exports = mapCacheClear;
|
4342 |
|
4343 | },{"./_Hash":19,"./_ListCache":20,"./_Map":21}],125:[function(require,module,exports){
|
4344 | var getMapData = require('./_getMapData');
|
4345 |
|
4346 |
|
4347 |
|
4348 |
|
4349 |
|
4350 |
|
4351 |
|
4352 |
|
4353 |
|
4354 |
|
4355 | function mapCacheDelete(key) {
|
4356 | var result = getMapData(this, key)['delete'](key);
|
4357 | this.size -= result ? 1 : 0;
|
4358 | return result;
|
4359 | }
|
4360 |
|
4361 | module.exports = mapCacheDelete;
|
4362 |
|
4363 | },{"./_getMapData":95}],126:[function(require,module,exports){
|
4364 | var getMapData = require('./_getMapData');
|
4365 |
|
4366 |
|
4367 |
|
4368 |
|
4369 |
|
4370 |
|
4371 |
|
4372 |
|
4373 |
|
4374 |
|
4375 | function mapCacheGet(key) {
|
4376 | return getMapData(this, key).get(key);
|
4377 | }
|
4378 |
|
4379 | module.exports = mapCacheGet;
|
4380 |
|
4381 | },{"./_getMapData":95}],127:[function(require,module,exports){
|
4382 | var getMapData = require('./_getMapData');
|
4383 |
|
4384 |
|
4385 |
|
4386 |
|
4387 |
|
4388 |
|
4389 |
|
4390 |
|
4391 |
|
4392 |
|
4393 | function mapCacheHas(key) {
|
4394 | return getMapData(this, key).has(key);
|
4395 | }
|
4396 |
|
4397 | module.exports = mapCacheHas;
|
4398 |
|
4399 | },{"./_getMapData":95}],128:[function(require,module,exports){
|
4400 | var getMapData = require('./_getMapData');
|
4401 |
|
4402 |
|
4403 |
|
4404 |
|
4405 |
|
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 | function mapCacheSet(key, value) {
|
4413 | var data = getMapData(this, key),
|
4414 | size = data.size;
|
4415 |
|
4416 | data.set(key, value);
|
4417 | this.size += data.size == size ? 0 : 1;
|
4418 | return this;
|
4419 | }
|
4420 |
|
4421 | module.exports = mapCacheSet;
|
4422 |
|
4423 | },{"./_getMapData":95}],129:[function(require,module,exports){
|
4424 |
|
4425 |
|
4426 |
|
4427 |
|
4428 |
|
4429 |
|
4430 |
|
4431 | function mapToArray(map) {
|
4432 | var index = -1,
|
4433 | result = Array(map.size);
|
4434 |
|
4435 | map.forEach(function(value, key) {
|
4436 | result[++index] = [key, value];
|
4437 | });
|
4438 | return result;
|
4439 | }
|
4440 |
|
4441 | module.exports = mapToArray;
|
4442 |
|
4443 | },{}],130:[function(require,module,exports){
|
4444 |
|
4445 |
|
4446 |
|
4447 |
|
4448 |
|
4449 |
|
4450 |
|
4451 |
|
4452 |
|
4453 | function matchesStrictComparable(key, srcValue) {
|
4454 | return function(object) {
|
4455 | if (object == null) {
|
4456 | return false;
|
4457 | }
|
4458 | return object[key] === srcValue &&
|
4459 | (srcValue !== undefined || (key in Object(object)));
|
4460 | };
|
4461 | }
|
4462 |
|
4463 | module.exports = matchesStrictComparable;
|
4464 |
|
4465 | },{}],131:[function(require,module,exports){
|
4466 | var memoize = require('./memoize');
|
4467 |
|
4468 |
|
4469 | var MAX_MEMOIZE_SIZE = 500;
|
4470 |
|
4471 |
|
4472 |
|
4473 |
|
4474 |
|
4475 |
|
4476 |
|
4477 |
|
4478 |
|
4479 | function memoizeCapped(func) {
|
4480 | var result = memoize(func, function(key) {
|
4481 | if (cache.size === MAX_MEMOIZE_SIZE) {
|
4482 | cache.clear();
|
4483 | }
|
4484 | return key;
|
4485 | });
|
4486 |
|
4487 | var cache = result.cache;
|
4488 | return result;
|
4489 | }
|
4490 |
|
4491 | module.exports = memoizeCapped;
|
4492 |
|
4493 | },{"./memoize":183}],132:[function(require,module,exports){
|
4494 | var getNative = require('./_getNative');
|
4495 |
|
4496 |
|
4497 | var nativeCreate = getNative(Object, 'create');
|
4498 |
|
4499 | module.exports = nativeCreate;
|
4500 |
|
4501 | },{"./_getNative":97}],133:[function(require,module,exports){
|
4502 | var overArg = require('./_overArg');
|
4503 |
|
4504 |
|
4505 | var nativeKeys = overArg(Object.keys, Object);
|
4506 |
|
4507 | module.exports = nativeKeys;
|
4508 |
|
4509 | },{"./_overArg":137}],134:[function(require,module,exports){
|
4510 |
|
4511 |
|
4512 |
|
4513 |
|
4514 |
|
4515 |
|
4516 |
|
4517 |
|
4518 |
|
4519 | function nativeKeysIn(object) {
|
4520 | var result = [];
|
4521 | if (object != null) {
|
4522 | for (var key in Object(object)) {
|
4523 | result.push(key);
|
4524 | }
|
4525 | }
|
4526 | return result;
|
4527 | }
|
4528 |
|
4529 | module.exports = nativeKeysIn;
|
4530 |
|
4531 | },{}],135:[function(require,module,exports){
|
4532 | var freeGlobal = require('./_freeGlobal');
|
4533 |
|
4534 |
|
4535 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
4536 |
|
4537 |
|
4538 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
4539 |
|
4540 |
|
4541 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
4542 |
|
4543 |
|
4544 | var freeProcess = moduleExports && freeGlobal.process;
|
4545 |
|
4546 |
|
4547 | var nodeUtil = (function() {
|
4548 | try {
|
4549 |
|
4550 | var types = freeModule && freeModule.require && freeModule.require('util').types;
|
4551 |
|
4552 | if (types) {
|
4553 | return types;
|
4554 | }
|
4555 |
|
4556 |
|
4557 | return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
4558 | } catch (e) {}
|
4559 | }());
|
4560 |
|
4561 | module.exports = nodeUtil;
|
4562 |
|
4563 | },{"./_freeGlobal":92}],136:[function(require,module,exports){
|
4564 |
|
4565 | var objectProto = Object.prototype;
|
4566 |
|
4567 |
|
4568 |
|
4569 |
|
4570 |
|
4571 |
|
4572 | var nativeObjectToString = objectProto.toString;
|
4573 |
|
4574 |
|
4575 |
|
4576 |
|
4577 |
|
4578 |
|
4579 |
|
4580 |
|
4581 | function objectToString(value) {
|
4582 | return nativeObjectToString.call(value);
|
4583 | }
|
4584 |
|
4585 | module.exports = objectToString;
|
4586 |
|
4587 | },{}],137:[function(require,module,exports){
|
4588 |
|
4589 |
|
4590 |
|
4591 |
|
4592 |
|
4593 |
|
4594 |
|
4595 |
|
4596 | function overArg(func, transform) {
|
4597 | return function(arg) {
|
4598 | return func(transform(arg));
|
4599 | };
|
4600 | }
|
4601 |
|
4602 | module.exports = overArg;
|
4603 |
|
4604 | },{}],138:[function(require,module,exports){
|
4605 | var apply = require('./_apply');
|
4606 |
|
4607 |
|
4608 | var nativeMax = Math.max;
|
4609 |
|
4610 |
|
4611 |
|
4612 |
|
4613 |
|
4614 |
|
4615 |
|
4616 |
|
4617 |
|
4618 |
|
4619 | function overRest(func, start, transform) {
|
4620 | start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
4621 | return function() {
|
4622 | var args = arguments,
|
4623 | index = -1,
|
4624 | length = nativeMax(args.length - start, 0),
|
4625 | array = Array(length);
|
4626 |
|
4627 | while (++index < length) {
|
4628 | array[index] = args[start + index];
|
4629 | }
|
4630 | index = -1;
|
4631 | var otherArgs = Array(start + 1);
|
4632 | while (++index < start) {
|
4633 | otherArgs[index] = args[index];
|
4634 | }
|
4635 | otherArgs[start] = transform(array);
|
4636 | return apply(func, this, otherArgs);
|
4637 | };
|
4638 | }
|
4639 |
|
4640 | module.exports = overRest;
|
4641 |
|
4642 | },{"./_apply":30}],139:[function(require,module,exports){
|
4643 | var freeGlobal = require('./_freeGlobal');
|
4644 |
|
4645 |
|
4646 | var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
4647 |
|
4648 |
|
4649 | var root = freeGlobal || freeSelf || Function('return this')();
|
4650 |
|
4651 | module.exports = root;
|
4652 |
|
4653 | },{"./_freeGlobal":92}],140:[function(require,module,exports){
|
4654 |
|
4655 |
|
4656 |
|
4657 |
|
4658 |
|
4659 |
|
4660 |
|
4661 |
|
4662 | function safeGet(object, key) {
|
4663 | if (key == '__proto__') {
|
4664 | return;
|
4665 | }
|
4666 |
|
4667 | return object[key];
|
4668 | }
|
4669 |
|
4670 | module.exports = safeGet;
|
4671 |
|
4672 | },{}],141:[function(require,module,exports){
|
4673 |
|
4674 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
4675 |
|
4676 |
|
4677 |
|
4678 |
|
4679 |
|
4680 |
|
4681 |
|
4682 |
|
4683 |
|
4684 |
|
4685 |
|
4686 | function setCacheAdd(value) {
|
4687 | this.__data__.set(value, HASH_UNDEFINED);
|
4688 | return this;
|
4689 | }
|
4690 |
|
4691 | module.exports = setCacheAdd;
|
4692 |
|
4693 | },{}],142:[function(require,module,exports){
|
4694 |
|
4695 |
|
4696 |
|
4697 |
|
4698 |
|
4699 |
|
4700 |
|
4701 |
|
4702 |
|
4703 | function setCacheHas(value) {
|
4704 | return this.__data__.has(value);
|
4705 | }
|
4706 |
|
4707 | module.exports = setCacheHas;
|
4708 |
|
4709 | },{}],143:[function(require,module,exports){
|
4710 |
|
4711 |
|
4712 |
|
4713 |
|
4714 |
|
4715 |
|
4716 |
|
4717 | function setToArray(set) {
|
4718 | var index = -1,
|
4719 | result = Array(set.size);
|
4720 |
|
4721 | set.forEach(function(value) {
|
4722 | result[++index] = value;
|
4723 | });
|
4724 | return result;
|
4725 | }
|
4726 |
|
4727 | module.exports = setToArray;
|
4728 |
|
4729 | },{}],144:[function(require,module,exports){
|
4730 | var baseSetToString = require('./_baseSetToString'),
|
4731 | shortOut = require('./_shortOut');
|
4732 |
|
4733 |
|
4734 |
|
4735 |
|
4736 |
|
4737 |
|
4738 |
|
4739 |
|
4740 |
|
4741 | var setToString = shortOut(baseSetToString);
|
4742 |
|
4743 | module.exports = setToString;
|
4744 |
|
4745 | },{"./_baseSetToString":70,"./_shortOut":145}],145:[function(require,module,exports){
|
4746 |
|
4747 | var HOT_COUNT = 800,
|
4748 | HOT_SPAN = 16;
|
4749 |
|
4750 |
|
4751 | var nativeNow = Date.now;
|
4752 |
|
4753 |
|
4754 |
|
4755 |
|
4756 |
|
4757 |
|
4758 |
|
4759 |
|
4760 |
|
4761 |
|
4762 | function shortOut(func) {
|
4763 | var count = 0,
|
4764 | lastCalled = 0;
|
4765 |
|
4766 | return function() {
|
4767 | var stamp = nativeNow(),
|
4768 | remaining = HOT_SPAN - (stamp - lastCalled);
|
4769 |
|
4770 | lastCalled = stamp;
|
4771 | if (remaining > 0) {
|
4772 | if (++count >= HOT_COUNT) {
|
4773 | return arguments[0];
|
4774 | }
|
4775 | } else {
|
4776 | count = 0;
|
4777 | }
|
4778 | return func.apply(undefined, arguments);
|
4779 | };
|
4780 | }
|
4781 |
|
4782 | module.exports = shortOut;
|
4783 |
|
4784 | },{}],146:[function(require,module,exports){
|
4785 | var ListCache = require('./_ListCache');
|
4786 |
|
4787 |
|
4788 |
|
4789 |
|
4790 |
|
4791 |
|
4792 |
|
4793 |
|
4794 | function stackClear() {
|
4795 | this.__data__ = new ListCache;
|
4796 | this.size = 0;
|
4797 | }
|
4798 |
|
4799 | module.exports = stackClear;
|
4800 |
|
4801 | },{"./_ListCache":20}],147:[function(require,module,exports){
|
4802 |
|
4803 |
|
4804 |
|
4805 |
|
4806 |
|
4807 |
|
4808 |
|
4809 |
|
4810 |
|
4811 | function stackDelete(key) {
|
4812 | var data = this.__data__,
|
4813 | result = data['delete'](key);
|
4814 |
|
4815 | this.size = data.size;
|
4816 | return result;
|
4817 | }
|
4818 |
|
4819 | module.exports = stackDelete;
|
4820 |
|
4821 | },{}],148:[function(require,module,exports){
|
4822 |
|
4823 |
|
4824 |
|
4825 |
|
4826 |
|
4827 |
|
4828 |
|
4829 |
|
4830 |
|
4831 | function stackGet(key) {
|
4832 | return this.__data__.get(key);
|
4833 | }
|
4834 |
|
4835 | module.exports = stackGet;
|
4836 |
|
4837 | },{}],149:[function(require,module,exports){
|
4838 |
|
4839 |
|
4840 |
|
4841 |
|
4842 |
|
4843 |
|
4844 |
|
4845 |
|
4846 |
|
4847 | function stackHas(key) {
|
4848 | return this.__data__.has(key);
|
4849 | }
|
4850 |
|
4851 | module.exports = stackHas;
|
4852 |
|
4853 | },{}],150:[function(require,module,exports){
|
4854 | var ListCache = require('./_ListCache'),
|
4855 | Map = require('./_Map'),
|
4856 | MapCache = require('./_MapCache');
|
4857 |
|
4858 |
|
4859 | var LARGE_ARRAY_SIZE = 200;
|
4860 |
|
4861 |
|
4862 |
|
4863 |
|
4864 |
|
4865 |
|
4866 |
|
4867 |
|
4868 |
|
4869 |
|
4870 |
|
4871 | function stackSet(key, value) {
|
4872 | var data = this.__data__;
|
4873 | if (data instanceof ListCache) {
|
4874 | var pairs = data.__data__;
|
4875 | if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
4876 | pairs.push([key, value]);
|
4877 | this.size = ++data.size;
|
4878 | return this;
|
4879 | }
|
4880 | data = this.__data__ = new MapCache(pairs);
|
4881 | }
|
4882 | data.set(key, value);
|
4883 | this.size = data.size;
|
4884 | return this;
|
4885 | }
|
4886 |
|
4887 | module.exports = stackSet;
|
4888 |
|
4889 | },{"./_ListCache":20,"./_Map":21,"./_MapCache":22}],151:[function(require,module,exports){
|
4890 | var memoizeCapped = require('./_memoizeCapped');
|
4891 |
|
4892 |
|
4893 | var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
4894 |
|
4895 |
|
4896 | var reEscapeChar = /\\(\\)?/g;
|
4897 |
|
4898 |
|
4899 |
|
4900 |
|
4901 |
|
4902 |
|
4903 |
|
4904 |
|
4905 | var stringToPath = memoizeCapped(function(string) {
|
4906 | var result = [];
|
4907 | if (string.charCodeAt(0) === 46 ) {
|
4908 | result.push('');
|
4909 | }
|
4910 | string.replace(rePropName, function(match, number, quote, subString) {
|
4911 | result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
4912 | });
|
4913 | return result;
|
4914 | });
|
4915 |
|
4916 | module.exports = stringToPath;
|
4917 |
|
4918 | },{"./_memoizeCapped":131}],152:[function(require,module,exports){
|
4919 | var isSymbol = require('./isSymbol');
|
4920 |
|
4921 |
|
4922 | var INFINITY = 1 / 0;
|
4923 |
|
4924 |
|
4925 |
|
4926 |
|
4927 |
|
4928 |
|
4929 |
|
4930 |
|
4931 | function toKey(value) {
|
4932 | if (typeof value == 'string' || isSymbol(value)) {
|
4933 | return value;
|
4934 | }
|
4935 | var result = (value + '');
|
4936 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
4937 | }
|
4938 |
|
4939 | module.exports = toKey;
|
4940 |
|
4941 | },{"./isSymbol":177}],153:[function(require,module,exports){
|
4942 |
|
4943 | var funcProto = Function.prototype;
|
4944 |
|
4945 |
|
4946 | var funcToString = funcProto.toString;
|
4947 |
|
4948 |
|
4949 |
|
4950 |
|
4951 |
|
4952 |
|
4953 |
|
4954 |
|
4955 | function toSource(func) {
|
4956 | if (func != null) {
|
4957 | try {
|
4958 | return funcToString.call(func);
|
4959 | } catch (e) {}
|
4960 | try {
|
4961 | return (func + '');
|
4962 | } catch (e) {}
|
4963 | }
|
4964 | return '';
|
4965 | }
|
4966 |
|
4967 | module.exports = toSource;
|
4968 |
|
4969 | },{}],154:[function(require,module,exports){
|
4970 | var copyObject = require('./_copyObject'),
|
4971 | createAssigner = require('./_createAssigner'),
|
4972 | keysIn = require('./keysIn');
|
4973 |
|
4974 |
|
4975 |
|
4976 |
|
4977 |
|
4978 |
|
4979 |
|
4980 |
|
4981 |
|
4982 |
|
4983 |
|
4984 |
|
4985 |
|
4986 |
|
4987 |
|
4988 |
|
4989 |
|
4990 |
|
4991 |
|
4992 |
|
4993 |
|
4994 |
|
4995 |
|
4996 |
|
4997 |
|
4998 |
|
4999 |
|
5000 |
|
5001 |
|
5002 |
|
5003 |
|
5004 |
|
5005 | var assignIn = createAssigner(function(object, source) {
|
5006 | copyObject(source, keysIn(source), object);
|
5007 | });
|
5008 |
|
5009 | module.exports = assignIn;
|
5010 |
|
5011 | },{"./_copyObject":81,"./_createAssigner":83,"./keysIn":180}],155:[function(require,module,exports){
|
5012 |
|
5013 |
|
5014 |
|
5015 |
|
5016 |
|
5017 |
|
5018 |
|
5019 |
|
5020 |
|
5021 |
|
5022 |
|
5023 |
|
5024 |
|
5025 |
|
5026 |
|
5027 |
|
5028 |
|
5029 |
|
5030 |
|
5031 | function constant(value) {
|
5032 | return function() {
|
5033 | return value;
|
5034 | };
|
5035 | }
|
5036 |
|
5037 | module.exports = constant;
|
5038 |
|
5039 | },{}],156:[function(require,module,exports){
|
5040 | module.exports = require('./forEach');
|
5041 |
|
5042 | },{"./forEach":162}],157:[function(require,module,exports){
|
5043 |
|
5044 |
|
5045 |
|
5046 |
|
5047 |
|
5048 |
|
5049 |
|
5050 |
|
5051 |
|
5052 |
|
5053 |
|
5054 |
|
5055 |
|
5056 |
|
5057 |
|
5058 |
|
5059 |
|
5060 |
|
5061 |
|
5062 |
|
5063 |
|
5064 |
|
5065 |
|
5066 |
|
5067 |
|
5068 |
|
5069 |
|
5070 |
|
5071 |
|
5072 |
|
5073 |
|
5074 |
|
5075 | function eq(value, other) {
|
5076 | return value === other || (value !== value && other !== other);
|
5077 | }
|
5078 |
|
5079 | module.exports = eq;
|
5080 |
|
5081 | },{}],158:[function(require,module,exports){
|
5082 | module.exports = require('./assignIn');
|
5083 |
|
5084 | },{"./assignIn":154}],159:[function(require,module,exports){
|
5085 | var createFind = require('./_createFind'),
|
5086 | findIndex = require('./findIndex');
|
5087 |
|
5088 |
|
5089 |
|
5090 |
|
5091 |
|
5092 |
|
5093 |
|
5094 |
|
5095 |
|
5096 |
|
5097 |
|
5098 |
|
5099 |
|
5100 |
|
5101 |
|
5102 |
|
5103 |
|
5104 |
|
5105 |
|
5106 |
|
5107 |
|
5108 |
|
5109 |
|
5110 |
|
5111 |
|
5112 |
|
5113 |
|
5114 |
|
5115 |
|
5116 |
|
5117 |
|
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 |
|
5123 |
|
5124 | var find = createFind(findIndex);
|
5125 |
|
5126 | module.exports = find;
|
5127 |
|
5128 | },{"./_createFind":86,"./findIndex":160}],160:[function(require,module,exports){
|
5129 | var baseFindIndex = require('./_baseFindIndex'),
|
5130 | baseIteratee = require('./_baseIteratee'),
|
5131 | toInteger = require('./toInteger');
|
5132 |
|
5133 |
|
5134 | var nativeMax = Math.max;
|
5135 |
|
5136 |
|
5137 |
|
5138 |
|
5139 |
|
5140 |
|
5141 |
|
5142 |
|
5143 |
|
5144 |
|
5145 |
|
5146 |
|
5147 |
|
5148 |
|
5149 |
|
5150 |
|
5151 |
|
5152 |
|
5153 |
|
5154 |
|
5155 |
|
5156 |
|
5157 |
|
5158 |
|
5159 |
|
5160 |
|
5161 |
|
5162 |
|
5163 |
|
5164 |
|
5165 |
|
5166 |
|
5167 |
|
5168 |
|
5169 |
|
5170 |
|
5171 | function findIndex(array, predicate, fromIndex) {
|
5172 | var length = array == null ? 0 : array.length;
|
5173 | if (!length) {
|
5174 | return -1;
|
5175 | }
|
5176 | var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
5177 | if (index < 0) {
|
5178 | index = nativeMax(length + index, 0);
|
5179 | }
|
5180 | return baseFindIndex(array, baseIteratee(predicate, 3), index);
|
5181 | }
|
5182 |
|
5183 | module.exports = findIndex;
|
5184 |
|
5185 | },{"./_baseFindIndex":43,"./_baseIteratee":57,"./toInteger":192}],161:[function(require,module,exports){
|
5186 | var baseFlatten = require('./_baseFlatten');
|
5187 |
|
5188 |
|
5189 |
|
5190 |
|
5191 |
|
5192 |
|
5193 |
|
5194 |
|
5195 |
|
5196 |
|
5197 |
|
5198 |
|
5199 |
|
5200 |
|
5201 |
|
5202 | function flatten(array) {
|
5203 | var length = array == null ? 0 : array.length;
|
5204 | return length ? baseFlatten(array, 1) : [];
|
5205 | }
|
5206 |
|
5207 | module.exports = flatten;
|
5208 |
|
5209 | },{"./_baseFlatten":44}],162:[function(require,module,exports){
|
5210 | var arrayEach = require('./_arrayEach'),
|
5211 | baseEach = require('./_baseEach'),
|
5212 | castFunction = require('./_castFunction'),
|
5213 | isArray = require('./isArray');
|
5214 |
|
5215 |
|
5216 |
|
5217 |
|
5218 |
|
5219 |
|
5220 |
|
5221 |
|
5222 |
|
5223 |
|
5224 |
|
5225 |
|
5226 |
|
5227 |
|
5228 |
|
5229 |
|
5230 |
|
5231 |
|
5232 |
|
5233 |
|
5234 |
|
5235 |
|
5236 |
|
5237 |
|
5238 |
|
5239 |
|
5240 |
|
5241 |
|
5242 |
|
5243 |
|
5244 |
|
5245 | function forEach(collection, iteratee) {
|
5246 | var func = isArray(collection) ? arrayEach : baseEach;
|
5247 | return func(collection, castFunction(iteratee));
|
5248 | }
|
5249 |
|
5250 | module.exports = forEach;
|
5251 |
|
5252 | },{"./_arrayEach":31,"./_baseEach":42,"./_castFunction":75,"./isArray":167}],163:[function(require,module,exports){
|
5253 | var baseGet = require('./_baseGet');
|
5254 |
|
5255 |
|
5256 |
|
5257 |
|
5258 |
|
5259 |
|
5260 |
|
5261 |
|
5262 |
|
5263 |
|
5264 |
|
5265 |
|
5266 |
|
5267 |
|
5268 |
|
5269 |
|
5270 |
|
5271 |
|
5272 |
|
5273 |
|
5274 |
|
5275 |
|
5276 |
|
5277 |
|
5278 |
|
5279 |
|
5280 | function get(object, path, defaultValue) {
|
5281 | var result = object == null ? undefined : baseGet(object, path);
|
5282 | return result === undefined ? defaultValue : result;
|
5283 | }
|
5284 |
|
5285 | module.exports = get;
|
5286 |
|
5287 | },{"./_baseGet":47}],164:[function(require,module,exports){
|
5288 | var baseHasIn = require('./_baseHasIn'),
|
5289 | hasPath = require('./_hasPath');
|
5290 |
|
5291 |
|
5292 |
|
5293 |
|
5294 |
|
5295 |
|
5296 |
|
5297 |
|
5298 |
|
5299 |
|
5300 |
|
5301 |
|
5302 |
|
5303 |
|
5304 |
|
5305 |
|
5306 |
|
5307 |
|
5308 |
|
5309 |
|
5310 |
|
5311 |
|
5312 |
|
5313 |
|
5314 |
|
5315 |
|
5316 |
|
5317 | function hasIn(object, path) {
|
5318 | return object != null && hasPath(object, path, baseHasIn);
|
5319 | }
|
5320 |
|
5321 | module.exports = hasIn;
|
5322 |
|
5323 | },{"./_baseHasIn":50,"./_hasPath":104}],165:[function(require,module,exports){
|
5324 |
|
5325 |
|
5326 |
|
5327 |
|
5328 |
|
5329 |
|
5330 |
|
5331 |
|
5332 |
|
5333 |
|
5334 |
|
5335 |
|
5336 |
|
5337 |
|
5338 |
|
5339 |
|
5340 | function identity(value) {
|
5341 | return value;
|
5342 | }
|
5343 |
|
5344 | module.exports = identity;
|
5345 |
|
5346 | },{}],166:[function(require,module,exports){
|
5347 | var baseIsArguments = require('./_baseIsArguments'),
|
5348 | isObjectLike = require('./isObjectLike');
|
5349 |
|
5350 |
|
5351 | var objectProto = Object.prototype;
|
5352 |
|
5353 |
|
5354 | var hasOwnProperty = objectProto.hasOwnProperty;
|
5355 |
|
5356 |
|
5357 | var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
5358 |
|
5359 |
|
5360 |
|
5361 |
|
5362 |
|
5363 |
|
5364 |
|
5365 |
|
5366 |
|
5367 |
|
5368 |
|
5369 |
|
5370 |
|
5371 |
|
5372 |
|
5373 |
|
5374 |
|
5375 |
|
5376 |
|
5377 | var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
5378 | return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
5379 | !propertyIsEnumerable.call(value, 'callee');
|
5380 | };
|
5381 |
|
5382 | module.exports = isArguments;
|
5383 |
|
5384 | },{"./_baseIsArguments":51,"./isObjectLike":175}],167:[function(require,module,exports){
|
5385 |
|
5386 |
|
5387 |
|
5388 |
|
5389 |
|
5390 |
|
5391 |
|
5392 |
|
5393 |
|
5394 |
|
5395 |
|
5396 |
|
5397 |
|
5398 |
|
5399 |
|
5400 |
|
5401 |
|
5402 |
|
5403 |
|
5404 |
|
5405 |
|
5406 |
|
5407 |
|
5408 | var isArray = Array.isArray;
|
5409 |
|
5410 | module.exports = isArray;
|
5411 |
|
5412 | },{}],168:[function(require,module,exports){
|
5413 | var isFunction = require('./isFunction'),
|
5414 | isLength = require('./isLength');
|
5415 |
|
5416 |
|
5417 |
|
5418 |
|
5419 |
|
5420 |
|
5421 |
|
5422 |
|
5423 |
|
5424 |
|
5425 |
|
5426 |
|
5427 |
|
5428 |
|
5429 |
|
5430 |
|
5431 |
|
5432 |
|
5433 |
|
5434 |
|
5435 |
|
5436 |
|
5437 |
|
5438 |
|
5439 |
|
5440 |
|
5441 | function isArrayLike(value) {
|
5442 | return value != null && isLength(value.length) && !isFunction(value);
|
5443 | }
|
5444 |
|
5445 | module.exports = isArrayLike;
|
5446 |
|
5447 | },{"./isFunction":171,"./isLength":172}],169:[function(require,module,exports){
|
5448 | var isArrayLike = require('./isArrayLike'),
|
5449 | isObjectLike = require('./isObjectLike');
|
5450 |
|
5451 |
|
5452 |
|
5453 |
|
5454 |
|
5455 |
|
5456 |
|
5457 |
|
5458 |
|
5459 |
|
5460 |
|
5461 |
|
5462 |
|
5463 |
|
5464 |
|
5465 |
|
5466 |
|
5467 |
|
5468 |
|
5469 |
|
5470 |
|
5471 |
|
5472 |
|
5473 |
|
5474 |
|
5475 |
|
5476 | function isArrayLikeObject(value) {
|
5477 | return isObjectLike(value) && isArrayLike(value);
|
5478 | }
|
5479 |
|
5480 | module.exports = isArrayLikeObject;
|
5481 |
|
5482 | },{"./isArrayLike":168,"./isObjectLike":175}],170:[function(require,module,exports){
|
5483 | var root = require('./_root'),
|
5484 | stubFalse = require('./stubFalse');
|
5485 |
|
5486 |
|
5487 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
5488 |
|
5489 |
|
5490 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
5491 |
|
5492 |
|
5493 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
5494 |
|
5495 |
|
5496 | var Buffer = moduleExports ? root.Buffer : undefined;
|
5497 |
|
5498 |
|
5499 | var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
5500 |
|
5501 |
|
5502 |
|
5503 |
|
5504 |
|
5505 |
|
5506 |
|
5507 |
|
5508 |
|
5509 |
|
5510 |
|
5511 |
|
5512 |
|
5513 |
|
5514 |
|
5515 |
|
5516 |
|
5517 |
|
5518 | var isBuffer = nativeIsBuffer || stubFalse;
|
5519 |
|
5520 | module.exports = isBuffer;
|
5521 |
|
5522 | },{"./_root":139,"./stubFalse":190}],171:[function(require,module,exports){
|
5523 | var baseGetTag = require('./_baseGetTag'),
|
5524 | isObject = require('./isObject');
|
5525 |
|
5526 |
|
5527 | var asyncTag = '[object AsyncFunction]',
|
5528 | funcTag = '[object Function]',
|
5529 | genTag = '[object GeneratorFunction]',
|
5530 | proxyTag = '[object Proxy]';
|
5531 |
|
5532 |
|
5533 |
|
5534 |
|
5535 |
|
5536 |
|
5537 |
|
5538 |
|
5539 |
|
5540 |
|
5541 |
|
5542 |
|
5543 |
|
5544 |
|
5545 |
|
5546 |
|
5547 |
|
5548 |
|
5549 | function isFunction(value) {
|
5550 | if (!isObject(value)) {
|
5551 | return false;
|
5552 | }
|
5553 |
|
5554 |
|
5555 | var tag = baseGetTag(value);
|
5556 | return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
5557 | }
|
5558 |
|
5559 | module.exports = isFunction;
|
5560 |
|
5561 | },{"./_baseGetTag":49,"./isObject":174}],172:[function(require,module,exports){
|
5562 |
|
5563 | var MAX_SAFE_INTEGER = 9007199254740991;
|
5564 |
|
5565 |
|
5566 |
|
5567 |
|
5568 |
|
5569 |
|
5570 |
|
5571 |
|
5572 |
|
5573 |
|
5574 |
|
5575 |
|
5576 |
|
5577 |
|
5578 |
|
5579 |
|
5580 |
|
5581 |
|
5582 |
|
5583 |
|
5584 |
|
5585 |
|
5586 |
|
5587 |
|
5588 |
|
5589 |
|
5590 |
|
5591 | function isLength(value) {
|
5592 | return typeof value == 'number' &&
|
5593 | value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
5594 | }
|
5595 |
|
5596 | module.exports = isLength;
|
5597 |
|
5598 | },{}],173:[function(require,module,exports){
|
5599 |
|
5600 |
|
5601 |
|
5602 |
|
5603 |
|
5604 |
|
5605 |
|
5606 |
|
5607 |
|
5608 |
|
5609 |
|
5610 |
|
5611 |
|
5612 |
|
5613 |
|
5614 |
|
5615 |
|
5616 |
|
5617 |
|
5618 |
|
5619 | function isNil(value) {
|
5620 | return value == null;
|
5621 | }
|
5622 |
|
5623 | module.exports = isNil;
|
5624 |
|
5625 | },{}],174:[function(require,module,exports){
|
5626 |
|
5627 |
|
5628 |
|
5629 |
|
5630 |
|
5631 |
|
5632 |
|
5633 |
|
5634 |
|
5635 |
|
5636 |
|
5637 |
|
5638 |
|
5639 |
|
5640 |
|
5641 |
|
5642 |
|
5643 |
|
5644 |
|
5645 |
|
5646 |
|
5647 |
|
5648 |
|
5649 |
|
5650 |
|
5651 | function isObject(value) {
|
5652 | var type = typeof value;
|
5653 | return value != null && (type == 'object' || type == 'function');
|
5654 | }
|
5655 |
|
5656 | module.exports = isObject;
|
5657 |
|
5658 | },{}],175:[function(require,module,exports){
|
5659 |
|
5660 |
|
5661 |
|
5662 |
|
5663 |
|
5664 |
|
5665 |
|
5666 |
|
5667 |
|
5668 |
|
5669 |
|
5670 |
|
5671 |
|
5672 |
|
5673 |
|
5674 |
|
5675 |
|
5676 |
|
5677 |
|
5678 |
|
5679 |
|
5680 |
|
5681 |
|
5682 |
|
5683 | function isObjectLike(value) {
|
5684 | return value != null && typeof value == 'object';
|
5685 | }
|
5686 |
|
5687 | module.exports = isObjectLike;
|
5688 |
|
5689 | },{}],176:[function(require,module,exports){
|
5690 | var baseGetTag = require('./_baseGetTag'),
|
5691 | getPrototype = require('./_getPrototype'),
|
5692 | isObjectLike = require('./isObjectLike');
|
5693 |
|
5694 |
|
5695 | var objectTag = '[object Object]';
|
5696 |
|
5697 |
|
5698 | var funcProto = Function.prototype,
|
5699 | objectProto = Object.prototype;
|
5700 |
|
5701 |
|
5702 | var funcToString = funcProto.toString;
|
5703 |
|
5704 |
|
5705 | var hasOwnProperty = objectProto.hasOwnProperty;
|
5706 |
|
5707 |
|
5708 | var objectCtorString = funcToString.call(Object);
|
5709 |
|
5710 |
|
5711 |
|
5712 |
|
5713 |
|
5714 |
|
5715 |
|
5716 |
|
5717 |
|
5718 |
|
5719 |
|
5720 |
|
5721 |
|
5722 |
|
5723 |
|
5724 |
|
5725 |
|
5726 |
|
5727 |
|
5728 |
|
5729 |
|
5730 |
|
5731 |
|
5732 |
|
5733 |
|
5734 |
|
5735 |
|
5736 |
|
5737 |
|
5738 | function isPlainObject(value) {
|
5739 | if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
5740 | return false;
|
5741 | }
|
5742 | var proto = getPrototype(value);
|
5743 | if (proto === null) {
|
5744 | return true;
|
5745 | }
|
5746 | var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
5747 | return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
5748 | funcToString.call(Ctor) == objectCtorString;
|
5749 | }
|
5750 |
|
5751 | module.exports = isPlainObject;
|
5752 |
|
5753 | },{"./_baseGetTag":49,"./_getPrototype":98,"./isObjectLike":175}],177:[function(require,module,exports){
|
5754 | var baseGetTag = require('./_baseGetTag'),
|
5755 | isObjectLike = require('./isObjectLike');
|
5756 |
|
5757 |
|
5758 | var symbolTag = '[object Symbol]';
|
5759 |
|
5760 |
|
5761 |
|
5762 |
|
5763 |
|
5764 |
|
5765 |
|
5766 |
|
5767 |
|
5768 |
|
5769 |
|
5770 |
|
5771 |
|
5772 |
|
5773 |
|
5774 |
|
5775 |
|
5776 |
|
5777 | function isSymbol(value) {
|
5778 | return typeof value == 'symbol' ||
|
5779 | (isObjectLike(value) && baseGetTag(value) == symbolTag);
|
5780 | }
|
5781 |
|
5782 | module.exports = isSymbol;
|
5783 |
|
5784 | },{"./_baseGetTag":49,"./isObjectLike":175}],178:[function(require,module,exports){
|
5785 | var baseIsTypedArray = require('./_baseIsTypedArray'),
|
5786 | baseUnary = require('./_baseUnary'),
|
5787 | nodeUtil = require('./_nodeUtil');
|
5788 |
|
5789 |
|
5790 | var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
5791 |
|
5792 |
|
5793 |
|
5794 |
|
5795 |
|
5796 |
|
5797 |
|
5798 |
|
5799 |
|
5800 |
|
5801 |
|
5802 |
|
5803 |
|
5804 |
|
5805 |
|
5806 |
|
5807 |
|
5808 |
|
5809 | var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
5810 |
|
5811 | module.exports = isTypedArray;
|
5812 |
|
5813 | },{"./_baseIsTypedArray":56,"./_baseUnary":73,"./_nodeUtil":135}],179:[function(require,module,exports){
|
5814 | var arrayLikeKeys = require('./_arrayLikeKeys'),
|
5815 | baseKeys = require('./_baseKeys'),
|
5816 | isArrayLike = require('./isArrayLike');
|
5817 |
|
5818 |
|
5819 |
|
5820 |
|
5821 |
|
5822 |
|
5823 |
|
5824 |
|
5825 |
|
5826 |
|
5827 |
|
5828 |
|
5829 |
|
5830 |
|
5831 |
|
5832 |
|
5833 |
|
5834 |
|
5835 |
|
5836 |
|
5837 |
|
5838 |
|
5839 |
|
5840 |
|
5841 |
|
5842 |
|
5843 |
|
5844 |
|
5845 |
|
5846 | function keys(object) {
|
5847 | return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
5848 | }
|
5849 |
|
5850 | module.exports = keys;
|
5851 |
|
5852 | },{"./_arrayLikeKeys":33,"./_baseKeys":58,"./isArrayLike":168}],180:[function(require,module,exports){
|
5853 | var arrayLikeKeys = require('./_arrayLikeKeys'),
|
5854 | baseKeysIn = require('./_baseKeysIn'),
|
5855 | isArrayLike = require('./isArrayLike');
|
5856 |
|
5857 |
|
5858 |
|
5859 |
|
5860 |
|
5861 |
|
5862 |
|
5863 |
|
5864 |
|
5865 |
|
5866 |
|
5867 |
|
5868 |
|
5869 |
|
5870 |
|
5871 |
|
5872 |
|
5873 |
|
5874 |
|
5875 |
|
5876 |
|
5877 |
|
5878 |
|
5879 |
|
5880 | function keysIn(object) {
|
5881 | return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
5882 | }
|
5883 |
|
5884 | module.exports = keysIn;
|
5885 |
|
5886 | },{"./_arrayLikeKeys":33,"./_baseKeysIn":59,"./isArrayLike":168}],181:[function(require,module,exports){
|
5887 | var baseAssignValue = require('./_baseAssignValue'),
|
5888 | baseForOwn = require('./_baseForOwn'),
|
5889 | baseIteratee = require('./_baseIteratee');
|
5890 |
|
5891 |
|
5892 |
|
5893 |
|
5894 |
|
5895 |
|
5896 |
|
5897 |
|
5898 |
|
5899 |
|
5900 |
|
5901 |
|
5902 |
|
5903 |
|
5904 |
|
5905 |
|
5906 |
|
5907 |
|
5908 |
|
5909 |
|
5910 |
|
5911 |
|
5912 | function mapKeys(object, iteratee) {
|
5913 | var result = {};
|
5914 | iteratee = baseIteratee(iteratee, 3);
|
5915 |
|
5916 | baseForOwn(object, function(value, key, object) {
|
5917 | baseAssignValue(result, iteratee(value, key, object), value);
|
5918 | });
|
5919 | return result;
|
5920 | }
|
5921 |
|
5922 | module.exports = mapKeys;
|
5923 |
|
5924 | },{"./_baseAssignValue":40,"./_baseForOwn":46,"./_baseIteratee":57}],182:[function(require,module,exports){
|
5925 | var baseAssignValue = require('./_baseAssignValue'),
|
5926 | baseForOwn = require('./_baseForOwn'),
|
5927 | baseIteratee = require('./_baseIteratee');
|
5928 |
|
5929 |
|
5930 |
|
5931 |
|
5932 |
|
5933 |
|
5934 |
|
5935 |
|
5936 |
|
5937 |
|
5938 |
|
5939 |
|
5940 |
|
5941 |
|
5942 |
|
5943 |
|
5944 |
|
5945 |
|
5946 |
|
5947 |
|
5948 |
|
5949 |
|
5950 |
|
5951 |
|
5952 |
|
5953 |
|
5954 |
|
5955 |
|
5956 |
|
5957 | function mapValues(object, iteratee) {
|
5958 | var result = {};
|
5959 | iteratee = baseIteratee(iteratee, 3);
|
5960 |
|
5961 | baseForOwn(object, function(value, key, object) {
|
5962 | baseAssignValue(result, key, iteratee(value, key, object));
|
5963 | });
|
5964 | return result;
|
5965 | }
|
5966 |
|
5967 | module.exports = mapValues;
|
5968 |
|
5969 | },{"./_baseAssignValue":40,"./_baseForOwn":46,"./_baseIteratee":57}],183:[function(require,module,exports){
|
5970 | var MapCache = require('./_MapCache');
|
5971 |
|
5972 |
|
5973 | var FUNC_ERROR_TEXT = 'Expected a function';
|
5974 |
|
5975 |
|
5976 |
|
5977 |
|
5978 |
|
5979 |
|
5980 |
|
5981 |
|
5982 |
|
5983 |
|
5984 |
|
5985 |
|
5986 |
|
5987 |
|
5988 |
|
5989 |
|
5990 |
|
5991 |
|
5992 |
|
5993 |
|
5994 |
|
5995 |
|
5996 |
|
5997 |
|
5998 |
|
5999 |
|
6000 |
|
6001 |
|
6002 |
|
6003 |
|
6004 |
|
6005 |
|
6006 |
|
6007 |
|
6008 |
|
6009 |
|
6010 |
|
6011 |
|
6012 |
|
6013 |
|
6014 |
|
6015 |
|
6016 |
|
6017 |
|
6018 |
|
6019 | function memoize(func, resolver) {
|
6020 | if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
6021 | throw new TypeError(FUNC_ERROR_TEXT);
|
6022 | }
|
6023 | var memoized = function() {
|
6024 | var args = arguments,
|
6025 | key = resolver ? resolver.apply(this, args) : args[0],
|
6026 | cache = memoized.cache;
|
6027 |
|
6028 | if (cache.has(key)) {
|
6029 | return cache.get(key);
|
6030 | }
|
6031 | var result = func.apply(this, args);
|
6032 | memoized.cache = cache.set(key, result) || cache;
|
6033 | return result;
|
6034 | };
|
6035 | memoized.cache = new (memoize.Cache || MapCache);
|
6036 | return memoized;
|
6037 | }
|
6038 |
|
6039 |
|
6040 | memoize.Cache = MapCache;
|
6041 |
|
6042 | module.exports = memoize;
|
6043 |
|
6044 | },{"./_MapCache":22}],184:[function(require,module,exports){
|
6045 | var baseMerge = require('./_baseMerge'),
|
6046 | createAssigner = require('./_createAssigner');
|
6047 |
|
6048 |
|
6049 |
|
6050 |
|
6051 |
|
6052 |
|
6053 |
|
6054 |
|
6055 |
|
6056 |
|
6057 |
|
6058 |
|
6059 |
|
6060 |
|
6061 |
|
6062 |
|
6063 |
|
6064 |
|
6065 |
|
6066 |
|
6067 |
|
6068 |
|
6069 |
|
6070 |
|
6071 |
|
6072 |
|
6073 |
|
6074 |
|
6075 |
|
6076 |
|
6077 |
|
6078 |
|
6079 | var merge = createAssigner(function(object, source, srcIndex) {
|
6080 | baseMerge(object, source, srcIndex);
|
6081 | });
|
6082 |
|
6083 | module.exports = merge;
|
6084 |
|
6085 | },{"./_baseMerge":62,"./_createAssigner":83}],185:[function(require,module,exports){
|
6086 | var basePick = require('./_basePick'),
|
6087 | flatRest = require('./_flatRest');
|
6088 |
|
6089 |
|
6090 |
|
6091 |
|
6092 |
|
6093 |
|
6094 |
|
6095 |
|
6096 |
|
6097 |
|
6098 |
|
6099 |
|
6100 |
|
6101 |
|
6102 |
|
6103 |
|
6104 |
|
6105 |
|
6106 | var pick = flatRest(function(object, paths) {
|
6107 | return object == null ? {} : basePick(object, paths);
|
6108 | });
|
6109 |
|
6110 | module.exports = pick;
|
6111 |
|
6112 | },{"./_basePick":64,"./_flatRest":91}],186:[function(require,module,exports){
|
6113 | var arrayMap = require('./_arrayMap'),
|
6114 | baseIteratee = require('./_baseIteratee'),
|
6115 | basePickBy = require('./_basePickBy'),
|
6116 | getAllKeysIn = require('./_getAllKeysIn');
|
6117 |
|
6118 |
|
6119 |
|
6120 |
|
6121 |
|
6122 |
|
6123 |
|
6124 |
|
6125 |
|
6126 |
|
6127 |
|
6128 |
|
6129 |
|
6130 |
|
6131 |
|
6132 |
|
6133 |
|
6134 |
|
6135 |
|
6136 | function pickBy(object, predicate) {
|
6137 | if (object == null) {
|
6138 | return {};
|
6139 | }
|
6140 | var props = arrayMap(getAllKeysIn(object), function(prop) {
|
6141 | return [prop];
|
6142 | });
|
6143 | predicate = baseIteratee(predicate);
|
6144 | return basePickBy(object, props, function(value, path) {
|
6145 | return predicate(value, path[0]);
|
6146 | });
|
6147 | }
|
6148 |
|
6149 | module.exports = pickBy;
|
6150 |
|
6151 | },{"./_arrayMap":34,"./_baseIteratee":57,"./_basePickBy":65,"./_getAllKeysIn":94}],187:[function(require,module,exports){
|
6152 | var baseProperty = require('./_baseProperty'),
|
6153 | basePropertyDeep = require('./_basePropertyDeep'),
|
6154 | isKey = require('./_isKey'),
|
6155 | toKey = require('./_toKey');
|
6156 |
|
6157 |
|
6158 |
|
6159 |
|
6160 |
|
6161 |
|
6162 |
|
6163 |
|
6164 |
|
6165 |
|
6166 |
|
6167 |
|
6168 |
|
6169 |
|
6170 |
|
6171 |
|
6172 |
|
6173 |
|
6174 |
|
6175 |
|
6176 |
|
6177 |
|
6178 |
|
6179 | function property(path) {
|
6180 | return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
6181 | }
|
6182 |
|
6183 | module.exports = property;
|
6184 |
|
6185 | },{"./_baseProperty":66,"./_basePropertyDeep":67,"./_isKey":114,"./_toKey":152}],188:[function(require,module,exports){
|
6186 | var baseSet = require('./_baseSet');
|
6187 |
|
6188 |
|
6189 |
|
6190 |
|
6191 |
|
6192 |
|
6193 |
|
6194 |
|
6195 |
|
6196 |
|
6197 |
|
6198 |
|
6199 |
|
6200 |
|
6201 |
|
6202 |
|
6203 |
|
6204 |
|
6205 |
|
6206 |
|
6207 |
|
6208 |
|
6209 |
|
6210 |
|
6211 |
|
6212 |
|
6213 |
|
6214 |
|
6215 |
|
6216 | function set(object, path, value) {
|
6217 | return object == null ? object : baseSet(object, path, value);
|
6218 | }
|
6219 |
|
6220 | module.exports = set;
|
6221 |
|
6222 | },{"./_baseSet":69}],189:[function(require,module,exports){
|
6223 |
|
6224 |
|
6225 |
|
6226 |
|
6227 |
|
6228 |
|
6229 |
|
6230 |
|
6231 |
|
6232 |
|
6233 |
|
6234 |
|
6235 |
|
6236 |
|
6237 |
|
6238 |
|
6239 |
|
6240 |
|
6241 | function stubArray() {
|
6242 | return [];
|
6243 | }
|
6244 |
|
6245 | module.exports = stubArray;
|
6246 |
|
6247 | },{}],190:[function(require,module,exports){
|
6248 |
|
6249 |
|
6250 |
|
6251 |
|
6252 |
|
6253 |
|
6254 |
|
6255 |
|
6256 |
|
6257 |
|
6258 |
|
6259 |
|
6260 |
|
6261 | function stubFalse() {
|
6262 | return false;
|
6263 | }
|
6264 |
|
6265 | module.exports = stubFalse;
|
6266 |
|
6267 | },{}],191:[function(require,module,exports){
|
6268 | var toNumber = require('./toNumber');
|
6269 |
|
6270 |
|
6271 | var INFINITY = 1 / 0,
|
6272 | MAX_INTEGER = 1.7976931348623157e+308;
|
6273 |
|
6274 |
|
6275 |
|
6276 |
|
6277 |
|
6278 |
|
6279 |
|
6280 |
|
6281 |
|
6282 |
|
6283 |
|
6284 |
|
6285 |
|
6286 |
|
6287 |
|
6288 |
|
6289 |
|
6290 |
|
6291 |
|
6292 |
|
6293 |
|
6294 |
|
6295 |
|
6296 |
|
6297 | function toFinite(value) {
|
6298 | if (!value) {
|
6299 | return value === 0 ? value : 0;
|
6300 | }
|
6301 | value = toNumber(value);
|
6302 | if (value === INFINITY || value === -INFINITY) {
|
6303 | var sign = (value < 0 ? -1 : 1);
|
6304 | return sign * MAX_INTEGER;
|
6305 | }
|
6306 | return value === value ? value : 0;
|
6307 | }
|
6308 |
|
6309 | module.exports = toFinite;
|
6310 |
|
6311 | },{"./toNumber":193}],192:[function(require,module,exports){
|
6312 | var toFinite = require('./toFinite');
|
6313 |
|
6314 |
|
6315 |
|
6316 |
|
6317 |
|
6318 |
|
6319 |
|
6320 |
|
6321 |
|
6322 |
|
6323 |
|
6324 |
|
6325 |
|
6326 |
|
6327 |
|
6328 |
|
6329 |
|
6330 |
|
6331 |
|
6332 |
|
6333 |
|
6334 |
|
6335 |
|
6336 |
|
6337 |
|
6338 |
|
6339 |
|
6340 | function toInteger(value) {
|
6341 | var result = toFinite(value),
|
6342 | remainder = result % 1;
|
6343 |
|
6344 | return result === result ? (remainder ? result - remainder : result) : 0;
|
6345 | }
|
6346 |
|
6347 | module.exports = toInteger;
|
6348 |
|
6349 | },{"./toFinite":191}],193:[function(require,module,exports){
|
6350 | var isObject = require('./isObject'),
|
6351 | isSymbol = require('./isSymbol');
|
6352 |
|
6353 |
|
6354 | var NAN = 0 / 0;
|
6355 |
|
6356 |
|
6357 | var reTrim = /^\s+|\s+$/g;
|
6358 |
|
6359 |
|
6360 | var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
6361 |
|
6362 |
|
6363 | var reIsBinary = /^0b[01]+$/i;
|
6364 |
|
6365 |
|
6366 | var reIsOctal = /^0o[0-7]+$/i;
|
6367 |
|
6368 |
|
6369 | var freeParseInt = parseInt;
|
6370 |
|
6371 |
|
6372 |
|
6373 |
|
6374 |
|
6375 |
|
6376 |
|
6377 |
|
6378 |
|
6379 |
|
6380 |
|
6381 |
|
6382 |
|
6383 |
|
6384 |
|
6385 |
|
6386 |
|
6387 |
|
6388 |
|
6389 |
|
6390 |
|
6391 |
|
6392 |
|
6393 |
|
6394 | function toNumber(value) {
|
6395 | if (typeof value == 'number') {
|
6396 | return value;
|
6397 | }
|
6398 | if (isSymbol(value)) {
|
6399 | return NAN;
|
6400 | }
|
6401 | if (isObject(value)) {
|
6402 | var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
6403 | value = isObject(other) ? (other + '') : other;
|
6404 | }
|
6405 | if (typeof value != 'string') {
|
6406 | return value === 0 ? value : +value;
|
6407 | }
|
6408 | value = value.replace(reTrim, '');
|
6409 | var isBinary = reIsBinary.test(value);
|
6410 | return (isBinary || reIsOctal.test(value))
|
6411 | ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
6412 | : (reIsBadHex.test(value) ? NAN : +value);
|
6413 | }
|
6414 |
|
6415 | module.exports = toNumber;
|
6416 |
|
6417 | },{"./isObject":174,"./isSymbol":177}],194:[function(require,module,exports){
|
6418 | var copyObject = require('./_copyObject'),
|
6419 | keysIn = require('./keysIn');
|
6420 |
|
6421 |
|
6422 |
|
6423 |
|
6424 |
|
6425 |
|
6426 |
|
6427 |
|
6428 |
|
6429 |
|
6430 |
|
6431 |
|
6432 |
|
6433 |
|
6434 |
|
6435 |
|
6436 |
|
6437 |
|
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 |
|
6443 |
|
6444 |
|
6445 | function toPlainObject(value) {
|
6446 | return copyObject(value, keysIn(value));
|
6447 | }
|
6448 |
|
6449 | module.exports = toPlainObject;
|
6450 |
|
6451 | },{"./_copyObject":81,"./keysIn":180}],195:[function(require,module,exports){
|
6452 | var baseToString = require('./_baseToString');
|
6453 |
|
6454 |
|
6455 |
|
6456 |
|
6457 |
|
6458 |
|
6459 |
|
6460 |
|
6461 |
|
6462 |
|
6463 |
|
6464 |
|
6465 |
|
6466 |
|
6467 |
|
6468 |
|
6469 |
|
6470 |
|
6471 |
|
6472 |
|
6473 |
|
6474 |
|
6475 | function toString(value) {
|
6476 | return value == null ? '' : baseToString(value);
|
6477 | }
|
6478 |
|
6479 | module.exports = toString;
|
6480 |
|
6481 | },{"./_baseToString":72}],196:[function(require,module,exports){
|
6482 | var arrayEach = require('./_arrayEach'),
|
6483 | baseCreate = require('./_baseCreate'),
|
6484 | baseForOwn = require('./_baseForOwn'),
|
6485 | baseIteratee = require('./_baseIteratee'),
|
6486 | getPrototype = require('./_getPrototype'),
|
6487 | isArray = require('./isArray'),
|
6488 | isBuffer = require('./isBuffer'),
|
6489 | isFunction = require('./isFunction'),
|
6490 | isObject = require('./isObject'),
|
6491 | isTypedArray = require('./isTypedArray');
|
6492 |
|
6493 |
|
6494 |
|
6495 |
|
6496 |
|
6497 |
|
6498 |
|
6499 |
|
6500 |
|
6501 |
|
6502 |
|
6503 |
|
6504 |
|
6505 |
|
6506 |
|
6507 |
|
6508 |
|
6509 |
|
6510 |
|
6511 |
|
6512 |
|
6513 |
|
6514 |
|
6515 |
|
6516 |
|
6517 |
|
6518 |
|
6519 |
|
6520 |
|
6521 |
|
6522 |
|
6523 | function transform(object, iteratee, accumulator) {
|
6524 | var isArr = isArray(object),
|
6525 | isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
6526 |
|
6527 | iteratee = baseIteratee(iteratee, 4);
|
6528 | if (accumulator == null) {
|
6529 | var Ctor = object && object.constructor;
|
6530 | if (isArrLike) {
|
6531 | accumulator = isArr ? new Ctor : [];
|
6532 | }
|
6533 | else if (isObject(object)) {
|
6534 | accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
6535 | }
|
6536 | else {
|
6537 | accumulator = {};
|
6538 | }
|
6539 | }
|
6540 | (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
|
6541 | return iteratee(accumulator, value, index, object);
|
6542 | });
|
6543 | return accumulator;
|
6544 | }
|
6545 |
|
6546 | module.exports = transform;
|
6547 |
|
6548 | },{"./_arrayEach":31,"./_baseCreate":41,"./_baseForOwn":46,"./_baseIteratee":57,"./_getPrototype":98,"./isArray":167,"./isBuffer":170,"./isFunction":171,"./isObject":174,"./isTypedArray":178}],197:[function(require,module,exports){
|
6549 |
|
6550 | var process = module.exports = {};
|
6551 |
|
6552 |
|
6553 |
|
6554 |
|
6555 |
|
6556 |
|
6557 | var cachedSetTimeout;
|
6558 | var cachedClearTimeout;
|
6559 |
|
6560 | function defaultSetTimout() {
|
6561 | throw new Error('setTimeout has not been defined');
|
6562 | }
|
6563 | function defaultClearTimeout () {
|
6564 | throw new Error('clearTimeout has not been defined');
|
6565 | }
|
6566 | (function () {
|
6567 | try {
|
6568 | if (typeof setTimeout === 'function') {
|
6569 | cachedSetTimeout = setTimeout;
|
6570 | } else {
|
6571 | cachedSetTimeout = defaultSetTimout;
|
6572 | }
|
6573 | } catch (e) {
|
6574 | cachedSetTimeout = defaultSetTimout;
|
6575 | }
|
6576 | try {
|
6577 | if (typeof clearTimeout === 'function') {
|
6578 | cachedClearTimeout = clearTimeout;
|
6579 | } else {
|
6580 | cachedClearTimeout = defaultClearTimeout;
|
6581 | }
|
6582 | } catch (e) {
|
6583 | cachedClearTimeout = defaultClearTimeout;
|
6584 | }
|
6585 | } ())
|
6586 | function runTimeout(fun) {
|
6587 | if (cachedSetTimeout === setTimeout) {
|
6588 |
|
6589 | return setTimeout(fun, 0);
|
6590 | }
|
6591 |
|
6592 | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
6593 | cachedSetTimeout = setTimeout;
|
6594 | return setTimeout(fun, 0);
|
6595 | }
|
6596 | try {
|
6597 |
|
6598 | return cachedSetTimeout(fun, 0);
|
6599 | } catch(e){
|
6600 | try {
|
6601 |
|
6602 | return cachedSetTimeout.call(null, fun, 0);
|
6603 | } catch(e){
|
6604 |
|
6605 | return cachedSetTimeout.call(this, fun, 0);
|
6606 | }
|
6607 | }
|
6608 |
|
6609 |
|
6610 | }
|
6611 | function runClearTimeout(marker) {
|
6612 | if (cachedClearTimeout === clearTimeout) {
|
6613 |
|
6614 | return clearTimeout(marker);
|
6615 | }
|
6616 |
|
6617 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
6618 | cachedClearTimeout = clearTimeout;
|
6619 | return clearTimeout(marker);
|
6620 | }
|
6621 | try {
|
6622 |
|
6623 | return cachedClearTimeout(marker);
|
6624 | } catch (e){
|
6625 | try {
|
6626 |
|
6627 | return cachedClearTimeout.call(null, marker);
|
6628 | } catch (e){
|
6629 |
|
6630 |
|
6631 | return cachedClearTimeout.call(this, marker);
|
6632 | }
|
6633 | }
|
6634 |
|
6635 |
|
6636 |
|
6637 | }
|
6638 | var queue = [];
|
6639 | var draining = false;
|
6640 | var currentQueue;
|
6641 | var queueIndex = -1;
|
6642 |
|
6643 | function cleanUpNextTick() {
|
6644 | if (!draining || !currentQueue) {
|
6645 | return;
|
6646 | }
|
6647 | draining = false;
|
6648 | if (currentQueue.length) {
|
6649 | queue = currentQueue.concat(queue);
|
6650 | } else {
|
6651 | queueIndex = -1;
|
6652 | }
|
6653 | if (queue.length) {
|
6654 | drainQueue();
|
6655 | }
|
6656 | }
|
6657 |
|
6658 | function drainQueue() {
|
6659 | if (draining) {
|
6660 | return;
|
6661 | }
|
6662 | var timeout = runTimeout(cleanUpNextTick);
|
6663 | draining = true;
|
6664 |
|
6665 | var len = queue.length;
|
6666 | while(len) {
|
6667 | currentQueue = queue;
|
6668 | queue = [];
|
6669 | while (++queueIndex < len) {
|
6670 | if (currentQueue) {
|
6671 | currentQueue[queueIndex].run();
|
6672 | }
|
6673 | }
|
6674 | queueIndex = -1;
|
6675 | len = queue.length;
|
6676 | }
|
6677 | currentQueue = null;
|
6678 | draining = false;
|
6679 | runClearTimeout(timeout);
|
6680 | }
|
6681 |
|
6682 | process.nextTick = function (fun) {
|
6683 | var args = new Array(arguments.length - 1);
|
6684 | if (arguments.length > 1) {
|
6685 | for (var i = 1; i < arguments.length; i++) {
|
6686 | args[i - 1] = arguments[i];
|
6687 | }
|
6688 | }
|
6689 | queue.push(new Item(fun, args));
|
6690 | if (queue.length === 1 && !draining) {
|
6691 | runTimeout(drainQueue);
|
6692 | }
|
6693 | };
|
6694 |
|
6695 |
|
6696 | function Item(fun, array) {
|
6697 | this.fun = fun;
|
6698 | this.array = array;
|
6699 | }
|
6700 | Item.prototype.run = function () {
|
6701 | this.fun.apply(null, this.array);
|
6702 | };
|
6703 | process.title = 'browser';
|
6704 | process.browser = true;
|
6705 | process.env = {};
|
6706 | process.argv = [];
|
6707 | process.version = '';
|
6708 | process.versions = {};
|
6709 |
|
6710 | function noop() {}
|
6711 |
|
6712 | process.on = noop;
|
6713 | process.addListener = noop;
|
6714 | process.once = noop;
|
6715 | process.off = noop;
|
6716 | process.removeListener = noop;
|
6717 | process.removeAllListeners = noop;
|
6718 | process.emit = noop;
|
6719 | process.prependListener = noop;
|
6720 | process.prependOnceListener = noop;
|
6721 |
|
6722 | process.listeners = function (name) { return [] }
|
6723 |
|
6724 | process.binding = function (name) {
|
6725 | throw new Error('process.binding is not supported');
|
6726 | };
|
6727 |
|
6728 | process.cwd = function () { return '/' };
|
6729 | process.chdir = function (dir) {
|
6730 | throw new Error('process.chdir is not supported');
|
6731 | };
|
6732 | process.umask = function() { return 0; };
|
6733 |
|
6734 | },{}],"jsonapi-serializer":[function(require,module,exports){
|
6735 | module.exports = {
|
6736 | Serializer: require('./lib/serializer'),
|
6737 | Deserializer: require('./lib/deserializer'),
|
6738 | Error: require('./lib/error'),
|
6739 | };
|
6740 |
|
6741 | },{"./lib/deserializer":2,"./lib/error":4,"./lib/serializer":7}]},{},["jsonapi-serializer"]);
|