@teipublisher/pb-components 2.11.1 → 2.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3753 @@
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
+ // istanbul ignore file
4
+ var AbortController;
5
+ var browserGlobal = typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : null; // self is the global in web workers
6
+ if (!browserGlobal) {
7
+ AbortController = require('abort-controller');
8
+ }
9
+ else if ('signal' in new Request('https://airtable.com')) {
10
+ AbortController = browserGlobal.AbortController;
11
+ }
12
+ else {
13
+ /* eslint-disable @typescript-eslint/no-var-requires */
14
+ var polyfill = require('abortcontroller-polyfill/dist/cjs-ponyfill');
15
+ /* eslint-enable @typescript-eslint/no-var-requires */
16
+ AbortController = polyfill.AbortController;
17
+ }
18
+ module.exports = AbortController;
19
+
20
+ },{"abort-controller":20,"abortcontroller-polyfill/dist/cjs-ponyfill":19}],2:[function(require,module,exports){
21
+ "use strict";
22
+ var AirtableError = /** @class */ (function () {
23
+ function AirtableError(error, message, statusCode) {
24
+ this.error = error;
25
+ this.message = message;
26
+ this.statusCode = statusCode;
27
+ }
28
+ AirtableError.prototype.toString = function () {
29
+ return [
30
+ this.message,
31
+ '(',
32
+ this.error,
33
+ ')',
34
+ this.statusCode ? "[Http code " + this.statusCode + "]" : '',
35
+ ].join('');
36
+ };
37
+ return AirtableError;
38
+ }());
39
+ module.exports = AirtableError;
40
+
41
+ },{}],3:[function(require,module,exports){
42
+ "use strict";
43
+ var __assign = (this && this.__assign) || function () {
44
+ __assign = Object.assign || function(t) {
45
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
46
+ s = arguments[i];
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
48
+ t[p] = s[p];
49
+ }
50
+ return t;
51
+ };
52
+ return __assign.apply(this, arguments);
53
+ };
54
+ var __importDefault = (this && this.__importDefault) || function (mod) {
55
+ return (mod && mod.__esModule) ? mod : { "default": mod };
56
+ };
57
+ var get_1 = __importDefault(require("lodash/get"));
58
+ var isPlainObject_1 = __importDefault(require("lodash/isPlainObject"));
59
+ var keys_1 = __importDefault(require("lodash/keys"));
60
+ var fetch_1 = __importDefault(require("./fetch"));
61
+ var abort_controller_1 = __importDefault(require("./abort-controller"));
62
+ var object_to_query_param_string_1 = __importDefault(require("./object_to_query_param_string"));
63
+ var airtable_error_1 = __importDefault(require("./airtable_error"));
64
+ var table_1 = __importDefault(require("./table"));
65
+ var http_headers_1 = __importDefault(require("./http_headers"));
66
+ var run_action_1 = __importDefault(require("./run_action"));
67
+ var package_version_1 = __importDefault(require("./package_version"));
68
+ var exponential_backoff_with_jitter_1 = __importDefault(require("./exponential_backoff_with_jitter"));
69
+ var userAgent = "Airtable.js/" + package_version_1.default;
70
+ var Base = /** @class */ (function () {
71
+ function Base(airtable, baseId) {
72
+ this._airtable = airtable;
73
+ this._id = baseId;
74
+ }
75
+ Base.prototype.table = function (tableName) {
76
+ return new table_1.default(this, null, tableName);
77
+ };
78
+ Base.prototype.makeRequest = function (options) {
79
+ var _this = this;
80
+ var _a;
81
+ if (options === void 0) { options = {}; }
82
+ var method = get_1.default(options, 'method', 'GET').toUpperCase();
83
+ var url = this._airtable._endpointUrl + "/v" + this._airtable._apiVersionMajor + "/" + this._id + get_1.default(options, 'path', '/') + "?" + object_to_query_param_string_1.default(get_1.default(options, 'qs', {}));
84
+ var controller = new abort_controller_1.default();
85
+ var headers = this._getRequestHeaders(Object.assign({}, this._airtable._customHeaders, (_a = options.headers) !== null && _a !== void 0 ? _a : {}));
86
+ var requestOptions = {
87
+ method: method,
88
+ headers: headers,
89
+ signal: controller.signal,
90
+ };
91
+ if ('body' in options && _canRequestMethodIncludeBody(method)) {
92
+ requestOptions.body = JSON.stringify(options.body);
93
+ }
94
+ var timeout = setTimeout(function () {
95
+ controller.abort();
96
+ }, this._airtable._requestTimeout);
97
+ return new Promise(function (resolve, reject) {
98
+ fetch_1.default(url, requestOptions)
99
+ .then(function (resp) {
100
+ clearTimeout(timeout);
101
+ if (resp.status === 429 && !_this._airtable._noRetryIfRateLimited) {
102
+ var numAttempts_1 = get_1.default(options, '_numAttempts', 0);
103
+ var backoffDelayMs = exponential_backoff_with_jitter_1.default(numAttempts_1);
104
+ setTimeout(function () {
105
+ var newOptions = __assign(__assign({}, options), { _numAttempts: numAttempts_1 + 1 });
106
+ _this.makeRequest(newOptions)
107
+ .then(resolve)
108
+ .catch(reject);
109
+ }, backoffDelayMs);
110
+ }
111
+ else {
112
+ resp.json()
113
+ .then(function (body) {
114
+ var err = _this._checkStatusForError(resp.status, body) ||
115
+ _getErrorForNonObjectBody(resp.status, body);
116
+ if (err) {
117
+ reject(err);
118
+ }
119
+ else {
120
+ resolve({
121
+ statusCode: resp.status,
122
+ headers: resp.headers,
123
+ body: body,
124
+ });
125
+ }
126
+ })
127
+ .catch(function () {
128
+ var err = _getErrorForNonObjectBody(resp.status);
129
+ reject(err);
130
+ });
131
+ }
132
+ })
133
+ .catch(function (err) {
134
+ clearTimeout(timeout);
135
+ err = new airtable_error_1.default('CONNECTION_ERROR', err.message, null);
136
+ reject(err);
137
+ });
138
+ });
139
+ };
140
+ /**
141
+ * @deprecated This method is deprecated.
142
+ */
143
+ Base.prototype.runAction = function (method, path, queryParams, bodyData, callback) {
144
+ run_action_1.default(this, method, path, queryParams, bodyData, callback, 0);
145
+ };
146
+ Base.prototype._getRequestHeaders = function (headers) {
147
+ var result = new http_headers_1.default();
148
+ result.set('Authorization', "Bearer " + this._airtable._apiKey);
149
+ result.set('User-Agent', userAgent);
150
+ result.set('Content-Type', 'application/json');
151
+ for (var _i = 0, _a = keys_1.default(headers); _i < _a.length; _i++) {
152
+ var headerKey = _a[_i];
153
+ result.set(headerKey, headers[headerKey]);
154
+ }
155
+ return result.toJSON();
156
+ };
157
+ Base.prototype._checkStatusForError = function (statusCode, body) {
158
+ var _a = (body !== null && body !== void 0 ? body : { error: {} }).error, error = _a === void 0 ? {} : _a;
159
+ var type = error.type, message = error.message;
160
+ if (statusCode === 401) {
161
+ return new airtable_error_1.default('AUTHENTICATION_REQUIRED', 'You should provide valid api key to perform this operation', statusCode);
162
+ }
163
+ else if (statusCode === 403) {
164
+ return new airtable_error_1.default('NOT_AUTHORIZED', 'You are not authorized to perform this operation', statusCode);
165
+ }
166
+ else if (statusCode === 404) {
167
+ return new airtable_error_1.default('NOT_FOUND', message !== null && message !== void 0 ? message : 'Could not find what you are looking for', statusCode);
168
+ }
169
+ else if (statusCode === 413) {
170
+ return new airtable_error_1.default('REQUEST_TOO_LARGE', 'Request body is too large', statusCode);
171
+ }
172
+ else if (statusCode === 422) {
173
+ return new airtable_error_1.default(type !== null && type !== void 0 ? type : 'UNPROCESSABLE_ENTITY', message !== null && message !== void 0 ? message : 'The operation cannot be processed', statusCode);
174
+ }
175
+ else if (statusCode === 429) {
176
+ return new airtable_error_1.default('TOO_MANY_REQUESTS', 'You have made too many requests in a short period of time. Please retry your request later', statusCode);
177
+ }
178
+ else if (statusCode === 500) {
179
+ return new airtable_error_1.default('SERVER_ERROR', 'Try again. If the problem persists, contact support.', statusCode);
180
+ }
181
+ else if (statusCode === 503) {
182
+ return new airtable_error_1.default('SERVICE_UNAVAILABLE', 'The service is temporarily unavailable. Please retry shortly.', statusCode);
183
+ }
184
+ else if (statusCode >= 400) {
185
+ return new airtable_error_1.default(type !== null && type !== void 0 ? type : 'UNEXPECTED_ERROR', message !== null && message !== void 0 ? message : 'An unexpected error occurred', statusCode);
186
+ }
187
+ else {
188
+ return null;
189
+ }
190
+ };
191
+ Base.prototype.doCall = function (tableName) {
192
+ return this.table(tableName);
193
+ };
194
+ Base.prototype.getId = function () {
195
+ return this._id;
196
+ };
197
+ Base.createFunctor = function (airtable, baseId) {
198
+ var base = new Base(airtable, baseId);
199
+ var baseFn = function (tableName) {
200
+ return base.doCall(tableName);
201
+ };
202
+ baseFn._base = base;
203
+ baseFn.table = base.table.bind(base);
204
+ baseFn.makeRequest = base.makeRequest.bind(base);
205
+ baseFn.runAction = base.runAction.bind(base);
206
+ baseFn.getId = base.getId.bind(base);
207
+ return baseFn;
208
+ };
209
+ return Base;
210
+ }());
211
+ function _canRequestMethodIncludeBody(method) {
212
+ return method !== 'GET' && method !== 'DELETE';
213
+ }
214
+ function _getErrorForNonObjectBody(statusCode, body) {
215
+ if (isPlainObject_1.default(body)) {
216
+ return null;
217
+ }
218
+ else {
219
+ return new airtable_error_1.default('UNEXPECTED_ERROR', 'The response from Airtable was invalid JSON. Please try again soon.', statusCode);
220
+ }
221
+ }
222
+ module.exports = Base;
223
+
224
+ },{"./abort-controller":1,"./airtable_error":2,"./exponential_backoff_with_jitter":6,"./fetch":7,"./http_headers":9,"./object_to_query_param_string":11,"./package_version":12,"./run_action":16,"./table":17,"lodash/get":77,"lodash/isPlainObject":89,"lodash/keys":93}],4:[function(require,module,exports){
225
+ "use strict";
226
+ /**
227
+ * Given a function fn that takes a callback as its last argument, returns
228
+ * a new version of the function that takes the callback optionally. If
229
+ * the function is not called with a callback for the last argument, the
230
+ * function will return a promise instead.
231
+ */
232
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
233
+ function callbackToPromise(fn, context, callbackArgIndex) {
234
+ if (callbackArgIndex === void 0) { callbackArgIndex = void 0; }
235
+ /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types */
236
+ return function () {
237
+ var callArgs = [];
238
+ for (var _i = 0; _i < arguments.length; _i++) {
239
+ callArgs[_i] = arguments[_i];
240
+ }
241
+ var thisCallbackArgIndex;
242
+ if (callbackArgIndex === void 0) {
243
+ // istanbul ignore next
244
+ thisCallbackArgIndex = callArgs.length > 0 ? callArgs.length - 1 : 0;
245
+ }
246
+ else {
247
+ thisCallbackArgIndex = callbackArgIndex;
248
+ }
249
+ var callbackArg = callArgs[thisCallbackArgIndex];
250
+ if (typeof callbackArg === 'function') {
251
+ fn.apply(context, callArgs);
252
+ return void 0;
253
+ }
254
+ else {
255
+ var args_1 = [];
256
+ // If an explicit callbackArgIndex is set, but the function is called
257
+ // with too few arguments, we want to push undefined onto args so that
258
+ // our constructed callback ends up at the right index.
259
+ var argLen = Math.max(callArgs.length, thisCallbackArgIndex);
260
+ for (var i = 0; i < argLen; i++) {
261
+ args_1.push(callArgs[i]);
262
+ }
263
+ return new Promise(function (resolve, reject) {
264
+ args_1.push(function (err, result) {
265
+ if (err) {
266
+ reject(err);
267
+ }
268
+ else {
269
+ resolve(result);
270
+ }
271
+ });
272
+ fn.apply(context, args_1);
273
+ });
274
+ }
275
+ };
276
+ }
277
+ module.exports = callbackToPromise;
278
+
279
+ },{}],5:[function(require,module,exports){
280
+ "use strict";
281
+ var didWarnForDeprecation = {};
282
+ /**
283
+ * Convenience function for marking a function as deprecated.
284
+ *
285
+ * Will emit a warning the first time that function is called.
286
+ *
287
+ * @param fn the function to mark as deprecated.
288
+ * @param key a unique key identifying the function.
289
+ * @param message the warning message.
290
+ *
291
+ * @return a wrapped function
292
+ */
293
+ function deprecate(fn, key, message) {
294
+ return function () {
295
+ var args = [];
296
+ for (var _i = 0; _i < arguments.length; _i++) {
297
+ args[_i] = arguments[_i];
298
+ }
299
+ if (!didWarnForDeprecation[key]) {
300
+ didWarnForDeprecation[key] = true;
301
+ console.warn(message);
302
+ }
303
+ fn.apply(this, args);
304
+ };
305
+ }
306
+ module.exports = deprecate;
307
+
308
+ },{}],6:[function(require,module,exports){
309
+ "use strict";
310
+ var __importDefault = (this && this.__importDefault) || function (mod) {
311
+ return (mod && mod.__esModule) ? mod : { "default": mod };
312
+ };
313
+ var internal_config_json_1 = __importDefault(require("./internal_config.json"));
314
+ // "Full Jitter" algorithm taken from https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
315
+ function exponentialBackoffWithJitter(numberOfRetries) {
316
+ var rawBackoffTimeMs = internal_config_json_1.default.INITIAL_RETRY_DELAY_IF_RATE_LIMITED * Math.pow(2, numberOfRetries);
317
+ var clippedBackoffTimeMs = Math.min(internal_config_json_1.default.MAX_RETRY_DELAY_IF_RATE_LIMITED, rawBackoffTimeMs);
318
+ var jitteredBackoffTimeMs = Math.random() * clippedBackoffTimeMs;
319
+ return jitteredBackoffTimeMs;
320
+ }
321
+ module.exports = exponentialBackoffWithJitter;
322
+
323
+ },{"./internal_config.json":10}],7:[function(require,module,exports){
324
+ "use strict";
325
+ var __importDefault = (this && this.__importDefault) || function (mod) {
326
+ return (mod && mod.__esModule) ? mod : { "default": mod };
327
+ };
328
+ // istanbul ignore file
329
+ var node_fetch_1 = __importDefault(require("node-fetch"));
330
+ var browserGlobal = typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : null; // self is the global in web workers
331
+ module.exports = !browserGlobal ? node_fetch_1.default : browserGlobal.fetch.bind(browserGlobal);
332
+
333
+ },{"node-fetch":20}],8:[function(require,module,exports){
334
+ "use strict";
335
+ /* eslint-enable @typescript-eslint/no-explicit-any */
336
+ function has(object, property) {
337
+ return Object.prototype.hasOwnProperty.call(object, property);
338
+ }
339
+ module.exports = has;
340
+
341
+ },{}],9:[function(require,module,exports){
342
+ "use strict";
343
+ var __importDefault = (this && this.__importDefault) || function (mod) {
344
+ return (mod && mod.__esModule) ? mod : { "default": mod };
345
+ };
346
+ var keys_1 = __importDefault(require("lodash/keys"));
347
+ var isBrowser = typeof window !== 'undefined';
348
+ var HttpHeaders = /** @class */ (function () {
349
+ function HttpHeaders() {
350
+ this._headersByLowercasedKey = {};
351
+ }
352
+ HttpHeaders.prototype.set = function (headerKey, headerValue) {
353
+ var lowercasedKey = headerKey.toLowerCase();
354
+ if (lowercasedKey === 'x-airtable-user-agent') {
355
+ lowercasedKey = 'user-agent';
356
+ headerKey = 'User-Agent';
357
+ }
358
+ this._headersByLowercasedKey[lowercasedKey] = {
359
+ headerKey: headerKey,
360
+ headerValue: headerValue,
361
+ };
362
+ };
363
+ HttpHeaders.prototype.toJSON = function () {
364
+ var result = {};
365
+ for (var _i = 0, _a = keys_1.default(this._headersByLowercasedKey); _i < _a.length; _i++) {
366
+ var lowercasedKey = _a[_i];
367
+ var headerDefinition = this._headersByLowercasedKey[lowercasedKey];
368
+ var headerKey = void 0;
369
+ /* istanbul ignore next */
370
+ if (isBrowser && lowercasedKey === 'user-agent') {
371
+ // Some browsers do not allow overriding the user agent.
372
+ // https://github.com/Airtable/airtable.js/issues/52
373
+ headerKey = 'X-Airtable-User-Agent';
374
+ }
375
+ else {
376
+ headerKey = headerDefinition.headerKey;
377
+ }
378
+ result[headerKey] = headerDefinition.headerValue;
379
+ }
380
+ return result;
381
+ };
382
+ return HttpHeaders;
383
+ }());
384
+ module.exports = HttpHeaders;
385
+
386
+ },{"lodash/keys":93}],10:[function(require,module,exports){
387
+ module.exports={
388
+ "INITIAL_RETRY_DELAY_IF_RATE_LIMITED": 5000,
389
+ "MAX_RETRY_DELAY_IF_RATE_LIMITED": 600000
390
+ }
391
+
392
+ },{}],11:[function(require,module,exports){
393
+ "use strict";
394
+ var __importDefault = (this && this.__importDefault) || function (mod) {
395
+ return (mod && mod.__esModule) ? mod : { "default": mod };
396
+ };
397
+ var isArray_1 = __importDefault(require("lodash/isArray"));
398
+ var isNil_1 = __importDefault(require("lodash/isNil"));
399
+ var keys_1 = __importDefault(require("lodash/keys"));
400
+ /* eslint-enable @typescript-eslint/no-explicit-any */
401
+ // Adapted from jQuery.param:
402
+ // https://github.com/jquery/jquery/blob/2.2-stable/src/serialize.js
403
+ function buildParams(prefix, obj, addFn) {
404
+ if (isArray_1.default(obj)) {
405
+ // Serialize array item.
406
+ for (var index = 0; index < obj.length; index++) {
407
+ var value = obj[index];
408
+ if (/\[\]$/.test(prefix)) {
409
+ // Treat each array item as a scalar.
410
+ addFn(prefix, value);
411
+ }
412
+ else {
413
+ // Item is non-scalar (array or object), encode its numeric index.
414
+ buildParams(prefix + "[" + (typeof value === 'object' && value !== null ? index : '') + "]", value, addFn);
415
+ }
416
+ }
417
+ }
418
+ else if (typeof obj === 'object') {
419
+ // Serialize object item.
420
+ for (var _i = 0, _a = keys_1.default(obj); _i < _a.length; _i++) {
421
+ var key = _a[_i];
422
+ var value = obj[key];
423
+ buildParams(prefix + "[" + key + "]", value, addFn);
424
+ }
425
+ }
426
+ else {
427
+ // Serialize scalar item.
428
+ addFn(prefix, obj);
429
+ }
430
+ }
431
+ function objectToQueryParamString(obj) {
432
+ var parts = [];
433
+ var addFn = function (key, value) {
434
+ value = isNil_1.default(value) ? '' : value;
435
+ parts.push(encodeURIComponent(key) + "=" + encodeURIComponent(value));
436
+ };
437
+ for (var _i = 0, _a = keys_1.default(obj); _i < _a.length; _i++) {
438
+ var key = _a[_i];
439
+ var value = obj[key];
440
+ buildParams(key, value, addFn);
441
+ }
442
+ return parts.join('&').replace(/%20/g, '+');
443
+ }
444
+ module.exports = objectToQueryParamString;
445
+
446
+ },{"lodash/isArray":79,"lodash/isNil":85,"lodash/keys":93}],12:[function(require,module,exports){
447
+ "use strict";
448
+ module.exports = "0.12.2";
449
+
450
+ },{}],13:[function(require,module,exports){
451
+ "use strict";
452
+ var __assign = (this && this.__assign) || function () {
453
+ __assign = Object.assign || function(t) {
454
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
455
+ s = arguments[i];
456
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
457
+ t[p] = s[p];
458
+ }
459
+ return t;
460
+ };
461
+ return __assign.apply(this, arguments);
462
+ };
463
+ var __importDefault = (this && this.__importDefault) || function (mod) {
464
+ return (mod && mod.__esModule) ? mod : { "default": mod };
465
+ };
466
+ var isFunction_1 = __importDefault(require("lodash/isFunction"));
467
+ var keys_1 = __importDefault(require("lodash/keys"));
468
+ var record_1 = __importDefault(require("./record"));
469
+ var callback_to_promise_1 = __importDefault(require("./callback_to_promise"));
470
+ var has_1 = __importDefault(require("./has"));
471
+ var query_params_1 = require("./query_params");
472
+ var object_to_query_param_string_1 = __importDefault(require("./object_to_query_param_string"));
473
+ /**
474
+ * Builds a query object. Won't fetch until `firstPage` or
475
+ * or `eachPage` is called.
476
+ *
477
+ * Params should be validated prior to being passed to Query
478
+ * with `Query.validateParams`.
479
+ */
480
+ var Query = /** @class */ (function () {
481
+ function Query(table, params) {
482
+ this._table = table;
483
+ this._params = params;
484
+ this.firstPage = callback_to_promise_1.default(firstPage, this);
485
+ this.eachPage = callback_to_promise_1.default(eachPage, this, 1);
486
+ this.all = callback_to_promise_1.default(all, this);
487
+ }
488
+ /**
489
+ * Validates the parameters for passing to the Query constructor.
490
+ *
491
+ * @params {object} params parameters to validate
492
+ *
493
+ * @return an object with two keys:
494
+ * validParams: the object that should be passed to the constructor.
495
+ * ignoredKeys: a list of keys that will be ignored.
496
+ * errors: a list of error messages.
497
+ */
498
+ Query.validateParams = function (params) {
499
+ var validParams = {};
500
+ var ignoredKeys = [];
501
+ var errors = [];
502
+ for (var _i = 0, _a = keys_1.default(params); _i < _a.length; _i++) {
503
+ var key = _a[_i];
504
+ var value = params[key];
505
+ if (has_1.default(Query.paramValidators, key)) {
506
+ var validator = Query.paramValidators[key];
507
+ var validationResult = validator(value);
508
+ if (validationResult.pass) {
509
+ validParams[key] = value;
510
+ }
511
+ else {
512
+ errors.push(validationResult.error);
513
+ }
514
+ }
515
+ else {
516
+ ignoredKeys.push(key);
517
+ }
518
+ }
519
+ return {
520
+ validParams: validParams,
521
+ ignoredKeys: ignoredKeys,
522
+ errors: errors,
523
+ };
524
+ };
525
+ Query.paramValidators = query_params_1.paramValidators;
526
+ return Query;
527
+ }());
528
+ /**
529
+ * Fetches the first page of results for the query asynchronously,
530
+ * then calls `done(error, records)`.
531
+ */
532
+ function firstPage(done) {
533
+ if (!isFunction_1.default(done)) {
534
+ throw new Error('The first parameter to `firstPage` must be a function');
535
+ }
536
+ this.eachPage(function (records) {
537
+ done(null, records);
538
+ }, function (error) {
539
+ done(error, null);
540
+ });
541
+ }
542
+ /**
543
+ * Fetches each page of results for the query asynchronously.
544
+ *
545
+ * Calls `pageCallback(records, fetchNextPage)` for each
546
+ * page. You must call `fetchNextPage()` to fetch the next page of
547
+ * results.
548
+ *
549
+ * After fetching all pages, or if there's an error, calls
550
+ * `done(error)`.
551
+ */
552
+ function eachPage(pageCallback, done) {
553
+ var _this = this;
554
+ if (!isFunction_1.default(pageCallback)) {
555
+ throw new Error('The first parameter to `eachPage` must be a function');
556
+ }
557
+ if (!isFunction_1.default(done) && done !== void 0) {
558
+ throw new Error('The second parameter to `eachPage` must be a function or undefined');
559
+ }
560
+ var params = __assign({}, this._params);
561
+ var pathAndParamsAsString = "/" + this._table._urlEncodedNameOrId() + "?" + object_to_query_param_string_1.default(params);
562
+ var queryParams = {};
563
+ var requestData = null;
564
+ var method;
565
+ var path;
566
+ if (params.method === 'post' || pathAndParamsAsString.length > query_params_1.URL_CHARACTER_LENGTH_LIMIT) {
567
+ // There is a 16kb limit on GET requests. Since the URL makes up nearly all of the request size, we check for any requests that
568
+ // that come close to this limit and send it as a POST instead. Additionally, we'll send the request as a post if it is specified
569
+ // with the request params
570
+ requestData = params;
571
+ method = 'post';
572
+ path = "/" + this._table._urlEncodedNameOrId() + "/listRecords";
573
+ var paramNames = Object.keys(params);
574
+ for (var _i = 0, paramNames_1 = paramNames; _i < paramNames_1.length; _i++) {
575
+ var paramName = paramNames_1[_i];
576
+ if (query_params_1.shouldListRecordsParamBePassedAsParameter(paramName)) {
577
+ // timeZone and userLocale is parsed from the GET request separately from the other params. This parsing
578
+ // does not occurring within the body parser we use for POST requests, so this will still need to be passed
579
+ // via query params
580
+ queryParams[paramName] = params[paramName];
581
+ }
582
+ else {
583
+ requestData[paramName] = params[paramName];
584
+ }
585
+ }
586
+ }
587
+ else {
588
+ method = 'get';
589
+ queryParams = params;
590
+ path = "/" + this._table._urlEncodedNameOrId();
591
+ }
592
+ var inner = function () {
593
+ _this._table._base.runAction(method, path, queryParams, requestData, function (err, response, result) {
594
+ if (err) {
595
+ done(err, null);
596
+ }
597
+ else {
598
+ var next = void 0;
599
+ if (result.offset) {
600
+ params.offset = result.offset;
601
+ next = inner;
602
+ }
603
+ else {
604
+ next = function () {
605
+ done(null);
606
+ };
607
+ }
608
+ var records = result.records.map(function (recordJson) {
609
+ return new record_1.default(_this._table, null, recordJson);
610
+ });
611
+ pageCallback(records, next);
612
+ }
613
+ });
614
+ };
615
+ inner();
616
+ }
617
+ /**
618
+ * Fetches all pages of results asynchronously. May take a long time.
619
+ */
620
+ function all(done) {
621
+ if (!isFunction_1.default(done)) {
622
+ throw new Error('The first parameter to `all` must be a function');
623
+ }
624
+ var allRecords = [];
625
+ this.eachPage(function (pageRecords, fetchNextPage) {
626
+ allRecords.push.apply(allRecords, pageRecords);
627
+ fetchNextPage();
628
+ }, function (err) {
629
+ if (err) {
630
+ done(err, null);
631
+ }
632
+ else {
633
+ done(null, allRecords);
634
+ }
635
+ });
636
+ }
637
+ module.exports = Query;
638
+
639
+ },{"./callback_to_promise":4,"./has":8,"./object_to_query_param_string":11,"./query_params":14,"./record":15,"lodash/isFunction":83,"lodash/keys":93}],14:[function(require,module,exports){
640
+ "use strict";
641
+ var __importDefault = (this && this.__importDefault) || function (mod) {
642
+ return (mod && mod.__esModule) ? mod : { "default": mod };
643
+ };
644
+ Object.defineProperty(exports, "__esModule", { value: true });
645
+ exports.shouldListRecordsParamBePassedAsParameter = exports.URL_CHARACTER_LENGTH_LIMIT = exports.paramValidators = void 0;
646
+ var typecheck_1 = __importDefault(require("./typecheck"));
647
+ var isString_1 = __importDefault(require("lodash/isString"));
648
+ var isNumber_1 = __importDefault(require("lodash/isNumber"));
649
+ var isPlainObject_1 = __importDefault(require("lodash/isPlainObject"));
650
+ var isBoolean_1 = __importDefault(require("lodash/isBoolean"));
651
+ exports.paramValidators = {
652
+ fields: typecheck_1.default(typecheck_1.default.isArrayOf(isString_1.default), 'the value for `fields` should be an array of strings'),
653
+ filterByFormula: typecheck_1.default(isString_1.default, 'the value for `filterByFormula` should be a string'),
654
+ maxRecords: typecheck_1.default(isNumber_1.default, 'the value for `maxRecords` should be a number'),
655
+ pageSize: typecheck_1.default(isNumber_1.default, 'the value for `pageSize` should be a number'),
656
+ offset: typecheck_1.default(isNumber_1.default, 'the value for `offset` should be a number'),
657
+ sort: typecheck_1.default(typecheck_1.default.isArrayOf(function (obj) {
658
+ return (isPlainObject_1.default(obj) &&
659
+ isString_1.default(obj.field) &&
660
+ (obj.direction === void 0 || ['asc', 'desc'].includes(obj.direction)));
661
+ }), 'the value for `sort` should be an array of sort objects. ' +
662
+ 'Each sort object must have a string `field` value, and an optional ' +
663
+ '`direction` value that is "asc" or "desc".'),
664
+ view: typecheck_1.default(isString_1.default, 'the value for `view` should be a string'),
665
+ cellFormat: typecheck_1.default(function (cellFormat) {
666
+ return isString_1.default(cellFormat) && ['json', 'string'].includes(cellFormat);
667
+ }, 'the value for `cellFormat` should be "json" or "string"'),
668
+ timeZone: typecheck_1.default(isString_1.default, 'the value for `timeZone` should be a string'),
669
+ userLocale: typecheck_1.default(isString_1.default, 'the value for `userLocale` should be a string'),
670
+ method: typecheck_1.default(function (method) {
671
+ return isString_1.default(method) && ['get', 'post'].includes(method);
672
+ }, 'the value for `method` should be "get" or "post"'),
673
+ returnFieldsByFieldId: typecheck_1.default(isBoolean_1.default, 'the value for `returnFieldsByFieldId` should be a boolean'),
674
+ recordMetadata: typecheck_1.default(typecheck_1.default.isArrayOf(isString_1.default), 'the value for `recordMetadata` should be an array of strings'),
675
+ };
676
+ exports.URL_CHARACTER_LENGTH_LIMIT = 15000;
677
+ exports.shouldListRecordsParamBePassedAsParameter = function (paramName) {
678
+ return paramName === 'timeZone' || paramName === 'userLocale';
679
+ };
680
+
681
+ },{"./typecheck":18,"lodash/isBoolean":81,"lodash/isNumber":86,"lodash/isPlainObject":89,"lodash/isString":90}],15:[function(require,module,exports){
682
+ "use strict";
683
+ var __assign = (this && this.__assign) || function () {
684
+ __assign = Object.assign || function(t) {
685
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
686
+ s = arguments[i];
687
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
688
+ t[p] = s[p];
689
+ }
690
+ return t;
691
+ };
692
+ return __assign.apply(this, arguments);
693
+ };
694
+ var __importDefault = (this && this.__importDefault) || function (mod) {
695
+ return (mod && mod.__esModule) ? mod : { "default": mod };
696
+ };
697
+ var callback_to_promise_1 = __importDefault(require("./callback_to_promise"));
698
+ var Record = /** @class */ (function () {
699
+ function Record(table, recordId, recordJson) {
700
+ this._table = table;
701
+ this.id = recordId || recordJson.id;
702
+ if (recordJson) {
703
+ this.commentCount = recordJson.commentCount;
704
+ }
705
+ this.setRawJson(recordJson);
706
+ this.save = callback_to_promise_1.default(save, this);
707
+ this.patchUpdate = callback_to_promise_1.default(patchUpdate, this);
708
+ this.putUpdate = callback_to_promise_1.default(putUpdate, this);
709
+ this.destroy = callback_to_promise_1.default(destroy, this);
710
+ this.fetch = callback_to_promise_1.default(fetch, this);
711
+ this.updateFields = this.patchUpdate;
712
+ this.replaceFields = this.putUpdate;
713
+ }
714
+ Record.prototype.getId = function () {
715
+ return this.id;
716
+ };
717
+ Record.prototype.get = function (columnName) {
718
+ return this.fields[columnName];
719
+ };
720
+ Record.prototype.set = function (columnName, columnValue) {
721
+ this.fields[columnName] = columnValue;
722
+ };
723
+ Record.prototype.setRawJson = function (rawJson) {
724
+ this._rawJson = rawJson;
725
+ this.fields = (this._rawJson && this._rawJson.fields) || {};
726
+ };
727
+ return Record;
728
+ }());
729
+ function save(done) {
730
+ this.putUpdate(this.fields, done);
731
+ }
732
+ function patchUpdate(cellValuesByName, opts, done) {
733
+ var _this = this;
734
+ if (!done) {
735
+ done = opts;
736
+ opts = {};
737
+ }
738
+ var updateBody = __assign({ fields: cellValuesByName }, opts);
739
+ this._table._base.runAction('patch', "/" + this._table._urlEncodedNameOrId() + "/" + this.id, {}, updateBody, function (err, response, results) {
740
+ if (err) {
741
+ done(err);
742
+ return;
743
+ }
744
+ _this.setRawJson(results);
745
+ done(null, _this);
746
+ });
747
+ }
748
+ function putUpdate(cellValuesByName, opts, done) {
749
+ var _this = this;
750
+ if (!done) {
751
+ done = opts;
752
+ opts = {};
753
+ }
754
+ var updateBody = __assign({ fields: cellValuesByName }, opts);
755
+ this._table._base.runAction('put', "/" + this._table._urlEncodedNameOrId() + "/" + this.id, {}, updateBody, function (err, response, results) {
756
+ if (err) {
757
+ done(err);
758
+ return;
759
+ }
760
+ _this.setRawJson(results);
761
+ done(null, _this);
762
+ });
763
+ }
764
+ function destroy(done) {
765
+ var _this = this;
766
+ this._table._base.runAction('delete', "/" + this._table._urlEncodedNameOrId() + "/" + this.id, {}, null, function (err) {
767
+ if (err) {
768
+ done(err);
769
+ return;
770
+ }
771
+ done(null, _this);
772
+ });
773
+ }
774
+ function fetch(done) {
775
+ var _this = this;
776
+ this._table._base.runAction('get', "/" + this._table._urlEncodedNameOrId() + "/" + this.id, {}, null, function (err, response, results) {
777
+ if (err) {
778
+ done(err);
779
+ return;
780
+ }
781
+ _this.setRawJson(results);
782
+ done(null, _this);
783
+ });
784
+ }
785
+ module.exports = Record;
786
+
787
+ },{"./callback_to_promise":4}],16:[function(require,module,exports){
788
+ "use strict";
789
+ var __importDefault = (this && this.__importDefault) || function (mod) {
790
+ return (mod && mod.__esModule) ? mod : { "default": mod };
791
+ };
792
+ var exponential_backoff_with_jitter_1 = __importDefault(require("./exponential_backoff_with_jitter"));
793
+ var object_to_query_param_string_1 = __importDefault(require("./object_to_query_param_string"));
794
+ var package_version_1 = __importDefault(require("./package_version"));
795
+ var fetch_1 = __importDefault(require("./fetch"));
796
+ var abort_controller_1 = __importDefault(require("./abort-controller"));
797
+ var userAgent = "Airtable.js/" + package_version_1.default;
798
+ function runAction(base, method, path, queryParams, bodyData, callback, numAttempts) {
799
+ var url = base._airtable._endpointUrl + "/v" + base._airtable._apiVersionMajor + "/" + base._id + path + "?" + object_to_query_param_string_1.default(queryParams);
800
+ var headers = {
801
+ authorization: "Bearer " + base._airtable._apiKey,
802
+ 'x-api-version': base._airtable._apiVersion,
803
+ 'x-airtable-application-id': base.getId(),
804
+ 'content-type': 'application/json',
805
+ };
806
+ var isBrowser = typeof window !== 'undefined';
807
+ // Some browsers do not allow overriding the user agent.
808
+ // https://github.com/Airtable/airtable.js/issues/52
809
+ if (isBrowser) {
810
+ headers['x-airtable-user-agent'] = userAgent;
811
+ }
812
+ else {
813
+ headers['User-Agent'] = userAgent;
814
+ }
815
+ var controller = new abort_controller_1.default();
816
+ var normalizedMethod = method.toUpperCase();
817
+ var options = {
818
+ method: normalizedMethod,
819
+ headers: headers,
820
+ signal: controller.signal,
821
+ };
822
+ if (bodyData !== null) {
823
+ if (normalizedMethod === 'GET' || normalizedMethod === 'HEAD') {
824
+ console.warn('body argument to runAction are ignored with GET or HEAD requests');
825
+ }
826
+ else {
827
+ options.body = JSON.stringify(bodyData);
828
+ }
829
+ }
830
+ var timeout = setTimeout(function () {
831
+ controller.abort();
832
+ }, base._airtable._requestTimeout);
833
+ fetch_1.default(url, options)
834
+ .then(function (resp) {
835
+ clearTimeout(timeout);
836
+ if (resp.status === 429 && !base._airtable._noRetryIfRateLimited) {
837
+ var backoffDelayMs = exponential_backoff_with_jitter_1.default(numAttempts);
838
+ setTimeout(function () {
839
+ runAction(base, method, path, queryParams, bodyData, callback, numAttempts + 1);
840
+ }, backoffDelayMs);
841
+ }
842
+ else {
843
+ resp.json()
844
+ .then(function (body) {
845
+ var error = base._checkStatusForError(resp.status, body);
846
+ // Ensure Response interface matches interface from
847
+ // `request` Response object
848
+ var r = {};
849
+ Object.keys(resp).forEach(function (property) {
850
+ r[property] = resp[property];
851
+ });
852
+ r.body = body;
853
+ r.statusCode = resp.status;
854
+ callback(error, r, body);
855
+ })
856
+ .catch(function () {
857
+ callback(base._checkStatusForError(resp.status));
858
+ });
859
+ }
860
+ })
861
+ .catch(function (error) {
862
+ clearTimeout(timeout);
863
+ callback(error);
864
+ });
865
+ }
866
+ module.exports = runAction;
867
+
868
+ },{"./abort-controller":1,"./exponential_backoff_with_jitter":6,"./fetch":7,"./object_to_query_param_string":11,"./package_version":12}],17:[function(require,module,exports){
869
+ "use strict";
870
+ var __assign = (this && this.__assign) || function () {
871
+ __assign = Object.assign || function(t) {
872
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
873
+ s = arguments[i];
874
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
875
+ t[p] = s[p];
876
+ }
877
+ return t;
878
+ };
879
+ return __assign.apply(this, arguments);
880
+ };
881
+ var __importDefault = (this && this.__importDefault) || function (mod) {
882
+ return (mod && mod.__esModule) ? mod : { "default": mod };
883
+ };
884
+ var isPlainObject_1 = __importDefault(require("lodash/isPlainObject"));
885
+ var deprecate_1 = __importDefault(require("./deprecate"));
886
+ var query_1 = __importDefault(require("./query"));
887
+ var query_params_1 = require("./query_params");
888
+ var object_to_query_param_string_1 = __importDefault(require("./object_to_query_param_string"));
889
+ var record_1 = __importDefault(require("./record"));
890
+ var callback_to_promise_1 = __importDefault(require("./callback_to_promise"));
891
+ var Table = /** @class */ (function () {
892
+ function Table(base, tableId, tableName) {
893
+ if (!tableId && !tableName) {
894
+ throw new Error('Table name or table ID is required');
895
+ }
896
+ this._base = base;
897
+ this.id = tableId;
898
+ this.name = tableName;
899
+ // Public API
900
+ this.find = callback_to_promise_1.default(this._findRecordById, this);
901
+ this.select = this._selectRecords.bind(this);
902
+ this.create = callback_to_promise_1.default(this._createRecords, this);
903
+ this.update = callback_to_promise_1.default(this._updateRecords.bind(this, false), this);
904
+ this.replace = callback_to_promise_1.default(this._updateRecords.bind(this, true), this);
905
+ this.destroy = callback_to_promise_1.default(this._destroyRecord, this);
906
+ // Deprecated API
907
+ this.list = deprecate_1.default(this._listRecords.bind(this), 'table.list', 'Airtable: `list()` is deprecated. Use `select()` instead.');
908
+ this.forEach = deprecate_1.default(this._forEachRecord.bind(this), 'table.forEach', 'Airtable: `forEach()` is deprecated. Use `select()` instead.');
909
+ }
910
+ Table.prototype._findRecordById = function (recordId, done) {
911
+ var record = new record_1.default(this, recordId);
912
+ record.fetch(done);
913
+ };
914
+ Table.prototype._selectRecords = function (params) {
915
+ if (params === void 0) {
916
+ params = {};
917
+ }
918
+ if (arguments.length > 1) {
919
+ console.warn("Airtable: `select` takes only one parameter, but it was given " + arguments.length + " parameters. Use `eachPage` or `firstPage` to fetch records.");
920
+ }
921
+ if (isPlainObject_1.default(params)) {
922
+ var validationResults = query_1.default.validateParams(params);
923
+ if (validationResults.errors.length) {
924
+ var formattedErrors = validationResults.errors.map(function (error) {
925
+ return " * " + error;
926
+ });
927
+ throw new Error("Airtable: invalid parameters for `select`:\n" + formattedErrors.join('\n'));
928
+ }
929
+ if (validationResults.ignoredKeys.length) {
930
+ console.warn("Airtable: the following parameters to `select` will be ignored: " + validationResults.ignoredKeys.join(', '));
931
+ }
932
+ return new query_1.default(this, validationResults.validParams);
933
+ }
934
+ else {
935
+ throw new Error('Airtable: the parameter for `select` should be a plain object or undefined.');
936
+ }
937
+ };
938
+ Table.prototype._urlEncodedNameOrId = function () {
939
+ return this.id || encodeURIComponent(this.name);
940
+ };
941
+ Table.prototype._createRecords = function (recordsData, optionalParameters, done) {
942
+ var _this = this;
943
+ var isCreatingMultipleRecords = Array.isArray(recordsData);
944
+ if (!done) {
945
+ done = optionalParameters;
946
+ optionalParameters = {};
947
+ }
948
+ var requestData;
949
+ if (isCreatingMultipleRecords) {
950
+ requestData = __assign({ records: recordsData }, optionalParameters);
951
+ }
952
+ else {
953
+ requestData = __assign({ fields: recordsData }, optionalParameters);
954
+ }
955
+ this._base.runAction('post', "/" + this._urlEncodedNameOrId() + "/", {}, requestData, function (err, resp, body) {
956
+ if (err) {
957
+ done(err);
958
+ return;
959
+ }
960
+ var result;
961
+ if (isCreatingMultipleRecords) {
962
+ result = body.records.map(function (record) {
963
+ return new record_1.default(_this, record.id, record);
964
+ });
965
+ }
966
+ else {
967
+ result = new record_1.default(_this, body.id, body);
968
+ }
969
+ done(null, result);
970
+ });
971
+ };
972
+ Table.prototype._updateRecords = function (isDestructiveUpdate, recordsDataOrRecordId, recordDataOrOptsOrDone, optsOrDone, done) {
973
+ var _this = this;
974
+ var opts;
975
+ if (Array.isArray(recordsDataOrRecordId)) {
976
+ var recordsData = recordsDataOrRecordId;
977
+ opts = isPlainObject_1.default(recordDataOrOptsOrDone) ? recordDataOrOptsOrDone : {};
978
+ done = (optsOrDone || recordDataOrOptsOrDone);
979
+ var method = isDestructiveUpdate ? 'put' : 'patch';
980
+ var requestData = __assign({ records: recordsData }, opts);
981
+ this._base.runAction(method, "/" + this._urlEncodedNameOrId() + "/", {}, requestData, function (err, resp, body) {
982
+ if (err) {
983
+ done(err);
984
+ return;
985
+ }
986
+ var result = body.records.map(function (record) {
987
+ return new record_1.default(_this, record.id, record);
988
+ });
989
+ done(null, result);
990
+ });
991
+ }
992
+ else {
993
+ var recordId = recordsDataOrRecordId;
994
+ var recordData = recordDataOrOptsOrDone;
995
+ opts = isPlainObject_1.default(optsOrDone) ? optsOrDone : {};
996
+ done = (done || optsOrDone);
997
+ var record = new record_1.default(this, recordId);
998
+ if (isDestructiveUpdate) {
999
+ record.putUpdate(recordData, opts, done);
1000
+ }
1001
+ else {
1002
+ record.patchUpdate(recordData, opts, done);
1003
+ }
1004
+ }
1005
+ };
1006
+ Table.prototype._destroyRecord = function (recordIdsOrId, done) {
1007
+ var _this = this;
1008
+ if (Array.isArray(recordIdsOrId)) {
1009
+ var queryParams = { records: recordIdsOrId };
1010
+ this._base.runAction('delete', "/" + this._urlEncodedNameOrId(), queryParams, null, function (err, response, results) {
1011
+ if (err) {
1012
+ done(err);
1013
+ return;
1014
+ }
1015
+ var records = results.records.map(function (_a) {
1016
+ var id = _a.id;
1017
+ return new record_1.default(_this, id, null);
1018
+ });
1019
+ done(null, records);
1020
+ });
1021
+ }
1022
+ else {
1023
+ var record = new record_1.default(this, recordIdsOrId);
1024
+ record.destroy(done);
1025
+ }
1026
+ };
1027
+ Table.prototype._listRecords = function (pageSize, offset, opts, done) {
1028
+ var _this = this;
1029
+ if (!done) {
1030
+ done = opts;
1031
+ opts = {};
1032
+ }
1033
+ var pathAndParamsAsString = "/" + this._urlEncodedNameOrId() + "?" + object_to_query_param_string_1.default(opts);
1034
+ var path;
1035
+ var listRecordsParameters = {};
1036
+ var listRecordsData = null;
1037
+ var method;
1038
+ if ((typeof opts !== 'function' && opts.method === 'post') ||
1039
+ pathAndParamsAsString.length > query_params_1.URL_CHARACTER_LENGTH_LIMIT) {
1040
+ // // There is a 16kb limit on GET requests. Since the URL makes up nearly all of the request size, we check for any requests that
1041
+ // that come close to this limit and send it as a POST instead. Additionally, we'll send the request as a post if it is specified
1042
+ // with the request params
1043
+ path = "/" + this._urlEncodedNameOrId() + "/listRecords";
1044
+ listRecordsData = __assign(__assign({}, (pageSize && { pageSize: pageSize })), (offset && { offset: offset }));
1045
+ method = 'post';
1046
+ var paramNames = Object.keys(opts);
1047
+ for (var _i = 0, paramNames_1 = paramNames; _i < paramNames_1.length; _i++) {
1048
+ var paramName = paramNames_1[_i];
1049
+ if (query_params_1.shouldListRecordsParamBePassedAsParameter(paramName)) {
1050
+ listRecordsParameters[paramName] = opts[paramName];
1051
+ }
1052
+ else {
1053
+ listRecordsData[paramName] = opts[paramName];
1054
+ }
1055
+ }
1056
+ }
1057
+ else {
1058
+ method = 'get';
1059
+ path = "/" + this._urlEncodedNameOrId() + "/";
1060
+ listRecordsParameters = __assign({ limit: pageSize, offset: offset }, opts);
1061
+ }
1062
+ this._base.runAction(method, path, listRecordsParameters, listRecordsData, function (err, response, results) {
1063
+ if (err) {
1064
+ done(err);
1065
+ return;
1066
+ }
1067
+ var records = results.records.map(function (recordJson) {
1068
+ return new record_1.default(_this, null, recordJson);
1069
+ });
1070
+ done(null, records, results.offset);
1071
+ });
1072
+ };
1073
+ Table.prototype._forEachRecord = function (opts, callback, done) {
1074
+ var _this = this;
1075
+ if (arguments.length === 2) {
1076
+ done = callback;
1077
+ callback = opts;
1078
+ opts = {};
1079
+ }
1080
+ var limit = Table.__recordsPerPageForIteration || 100;
1081
+ var offset = null;
1082
+ var nextPage = function () {
1083
+ _this._listRecords(limit, offset, opts, function (err, page, newOffset) {
1084
+ if (err) {
1085
+ done(err);
1086
+ return;
1087
+ }
1088
+ for (var index = 0; index < page.length; index++) {
1089
+ callback(page[index]);
1090
+ }
1091
+ if (newOffset) {
1092
+ offset = newOffset;
1093
+ nextPage();
1094
+ }
1095
+ else {
1096
+ done();
1097
+ }
1098
+ });
1099
+ };
1100
+ nextPage();
1101
+ };
1102
+ return Table;
1103
+ }());
1104
+ module.exports = Table;
1105
+
1106
+ },{"./callback_to_promise":4,"./deprecate":5,"./object_to_query_param_string":11,"./query":13,"./query_params":14,"./record":15,"lodash/isPlainObject":89}],18:[function(require,module,exports){
1107
+ "use strict";
1108
+ /* eslint-enable @typescript-eslint/no-explicit-any */
1109
+ function check(fn, error) {
1110
+ return function (value) {
1111
+ if (fn(value)) {
1112
+ return { pass: true };
1113
+ }
1114
+ else {
1115
+ return { pass: false, error: error };
1116
+ }
1117
+ };
1118
+ }
1119
+ check.isOneOf = function isOneOf(options) {
1120
+ return options.includes.bind(options);
1121
+ };
1122
+ check.isArrayOf = function (itemValidator) {
1123
+ return function (value) {
1124
+ return Array.isArray(value) && value.every(itemValidator);
1125
+ };
1126
+ };
1127
+ module.exports = check;
1128
+
1129
+ },{}],19:[function(require,module,exports){
1130
+ 'use strict';
1131
+
1132
+ Object.defineProperty(exports, '__esModule', { value: true });
1133
+
1134
+ function _classCallCheck(instance, Constructor) {
1135
+ if (!(instance instanceof Constructor)) {
1136
+ throw new TypeError("Cannot call a class as a function");
1137
+ }
1138
+ }
1139
+
1140
+ function _defineProperties(target, props) {
1141
+ for (var i = 0; i < props.length; i++) {
1142
+ var descriptor = props[i];
1143
+ descriptor.enumerable = descriptor.enumerable || false;
1144
+ descriptor.configurable = true;
1145
+ if ("value" in descriptor) descriptor.writable = true;
1146
+ Object.defineProperty(target, descriptor.key, descriptor);
1147
+ }
1148
+ }
1149
+
1150
+ function _createClass(Constructor, protoProps, staticProps) {
1151
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1152
+ if (staticProps) _defineProperties(Constructor, staticProps);
1153
+ return Constructor;
1154
+ }
1155
+
1156
+ function _inherits(subClass, superClass) {
1157
+ if (typeof superClass !== "function" && superClass !== null) {
1158
+ throw new TypeError("Super expression must either be null or a function");
1159
+ }
1160
+
1161
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
1162
+ constructor: {
1163
+ value: subClass,
1164
+ writable: true,
1165
+ configurable: true
1166
+ }
1167
+ });
1168
+ if (superClass) _setPrototypeOf(subClass, superClass);
1169
+ }
1170
+
1171
+ function _getPrototypeOf(o) {
1172
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
1173
+ return o.__proto__ || Object.getPrototypeOf(o);
1174
+ };
1175
+ return _getPrototypeOf(o);
1176
+ }
1177
+
1178
+ function _setPrototypeOf(o, p) {
1179
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
1180
+ o.__proto__ = p;
1181
+ return o;
1182
+ };
1183
+
1184
+ return _setPrototypeOf(o, p);
1185
+ }
1186
+
1187
+ function _assertThisInitialized(self) {
1188
+ if (self === void 0) {
1189
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1190
+ }
1191
+
1192
+ return self;
1193
+ }
1194
+
1195
+ function _possibleConstructorReturn(self, call) {
1196
+ if (call && (typeof call === "object" || typeof call === "function")) {
1197
+ return call;
1198
+ }
1199
+
1200
+ return _assertThisInitialized(self);
1201
+ }
1202
+
1203
+ function _superPropBase(object, property) {
1204
+ while (!Object.prototype.hasOwnProperty.call(object, property)) {
1205
+ object = _getPrototypeOf(object);
1206
+ if (object === null) break;
1207
+ }
1208
+
1209
+ return object;
1210
+ }
1211
+
1212
+ function _get(target, property, receiver) {
1213
+ if (typeof Reflect !== "undefined" && Reflect.get) {
1214
+ _get = Reflect.get;
1215
+ } else {
1216
+ _get = function _get(target, property, receiver) {
1217
+ var base = _superPropBase(target, property);
1218
+
1219
+ if (!base) return;
1220
+ var desc = Object.getOwnPropertyDescriptor(base, property);
1221
+
1222
+ if (desc.get) {
1223
+ return desc.get.call(receiver);
1224
+ }
1225
+
1226
+ return desc.value;
1227
+ };
1228
+ }
1229
+
1230
+ return _get(target, property, receiver || target);
1231
+ }
1232
+
1233
+ var Emitter =
1234
+ /*#__PURE__*/
1235
+ function () {
1236
+ function Emitter() {
1237
+ _classCallCheck(this, Emitter);
1238
+
1239
+ Object.defineProperty(this, 'listeners', {
1240
+ value: {},
1241
+ writable: true,
1242
+ configurable: true
1243
+ });
1244
+ }
1245
+
1246
+ _createClass(Emitter, [{
1247
+ key: "addEventListener",
1248
+ value: function addEventListener(type, callback) {
1249
+ if (!(type in this.listeners)) {
1250
+ this.listeners[type] = [];
1251
+ }
1252
+
1253
+ this.listeners[type].push(callback);
1254
+ }
1255
+ }, {
1256
+ key: "removeEventListener",
1257
+ value: function removeEventListener(type, callback) {
1258
+ if (!(type in this.listeners)) {
1259
+ return;
1260
+ }
1261
+
1262
+ var stack = this.listeners[type];
1263
+
1264
+ for (var i = 0, l = stack.length; i < l; i++) {
1265
+ if (stack[i] === callback) {
1266
+ stack.splice(i, 1);
1267
+ return;
1268
+ }
1269
+ }
1270
+ }
1271
+ }, {
1272
+ key: "dispatchEvent",
1273
+ value: function dispatchEvent(event) {
1274
+ var _this = this;
1275
+
1276
+ if (!(event.type in this.listeners)) {
1277
+ return;
1278
+ }
1279
+
1280
+ var debounce = function debounce(callback) {
1281
+ setTimeout(function () {
1282
+ return callback.call(_this, event);
1283
+ });
1284
+ };
1285
+
1286
+ var stack = this.listeners[event.type];
1287
+
1288
+ for (var i = 0, l = stack.length; i < l; i++) {
1289
+ debounce(stack[i]);
1290
+ }
1291
+
1292
+ return !event.defaultPrevented;
1293
+ }
1294
+ }]);
1295
+
1296
+ return Emitter;
1297
+ }();
1298
+
1299
+ var AbortSignal =
1300
+ /*#__PURE__*/
1301
+ function (_Emitter) {
1302
+ _inherits(AbortSignal, _Emitter);
1303
+
1304
+ function AbortSignal() {
1305
+ var _this2;
1306
+
1307
+ _classCallCheck(this, AbortSignal);
1308
+
1309
+ _this2 = _possibleConstructorReturn(this, _getPrototypeOf(AbortSignal).call(this)); // Some versions of babel does not transpile super() correctly for IE <= 10, if the parent
1310
+ // constructor has failed to run, then "this.listeners" will still be undefined and then we call
1311
+ // the parent constructor directly instead as a workaround. For general details, see babel bug:
1312
+ // https://github.com/babel/babel/issues/3041
1313
+ // This hack was added as a fix for the issue described here:
1314
+ // https://github.com/Financial-Times/polyfill-library/pull/59#issuecomment-477558042
1315
+
1316
+ if (!_this2.listeners) {
1317
+ Emitter.call(_assertThisInitialized(_this2));
1318
+ } // Compared to assignment, Object.defineProperty makes properties non-enumerable by default and
1319
+ // we want Object.keys(new AbortController().signal) to be [] for compat with the native impl
1320
+
1321
+
1322
+ Object.defineProperty(_assertThisInitialized(_this2), 'aborted', {
1323
+ value: false,
1324
+ writable: true,
1325
+ configurable: true
1326
+ });
1327
+ Object.defineProperty(_assertThisInitialized(_this2), 'onabort', {
1328
+ value: null,
1329
+ writable: true,
1330
+ configurable: true
1331
+ });
1332
+ return _this2;
1333
+ }
1334
+
1335
+ _createClass(AbortSignal, [{
1336
+ key: "toString",
1337
+ value: function toString() {
1338
+ return '[object AbortSignal]';
1339
+ }
1340
+ }, {
1341
+ key: "dispatchEvent",
1342
+ value: function dispatchEvent(event) {
1343
+ if (event.type === 'abort') {
1344
+ this.aborted = true;
1345
+
1346
+ if (typeof this.onabort === 'function') {
1347
+ this.onabort.call(this, event);
1348
+ }
1349
+ }
1350
+
1351
+ _get(_getPrototypeOf(AbortSignal.prototype), "dispatchEvent", this).call(this, event);
1352
+ }
1353
+ }]);
1354
+
1355
+ return AbortSignal;
1356
+ }(Emitter);
1357
+ var AbortController =
1358
+ /*#__PURE__*/
1359
+ function () {
1360
+ function AbortController() {
1361
+ _classCallCheck(this, AbortController);
1362
+
1363
+ // Compared to assignment, Object.defineProperty makes properties non-enumerable by default and
1364
+ // we want Object.keys(new AbortController()) to be [] for compat with the native impl
1365
+ Object.defineProperty(this, 'signal', {
1366
+ value: new AbortSignal(),
1367
+ writable: true,
1368
+ configurable: true
1369
+ });
1370
+ }
1371
+
1372
+ _createClass(AbortController, [{
1373
+ key: "abort",
1374
+ value: function abort() {
1375
+ var event;
1376
+
1377
+ try {
1378
+ event = new Event('abort');
1379
+ } catch (e) {
1380
+ if (typeof document !== 'undefined') {
1381
+ if (!document.createEvent) {
1382
+ // For Internet Explorer 8:
1383
+ event = document.createEventObject();
1384
+ event.type = 'abort';
1385
+ } else {
1386
+ // For Internet Explorer 11:
1387
+ event = document.createEvent('Event');
1388
+ event.initEvent('abort', false, false);
1389
+ }
1390
+ } else {
1391
+ // Fallback where document isn't available:
1392
+ event = {
1393
+ type: 'abort',
1394
+ bubbles: false,
1395
+ cancelable: false
1396
+ };
1397
+ }
1398
+ }
1399
+
1400
+ this.signal.dispatchEvent(event);
1401
+ }
1402
+ }, {
1403
+ key: "toString",
1404
+ value: function toString() {
1405
+ return '[object AbortController]';
1406
+ }
1407
+ }]);
1408
+
1409
+ return AbortController;
1410
+ }();
1411
+
1412
+ if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1413
+ // These are necessary to make sure that we get correct output for:
1414
+ // Object.prototype.toString.call(new AbortController())
1415
+ AbortController.prototype[Symbol.toStringTag] = 'AbortController';
1416
+ AbortSignal.prototype[Symbol.toStringTag] = 'AbortSignal';
1417
+ }
1418
+
1419
+ function polyfillNeeded(self) {
1420
+ if (self.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL) {
1421
+ console.log('__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill');
1422
+ return true;
1423
+ } // Note that the "unfetch" minimal fetch polyfill defines fetch() without
1424
+ // defining window.Request, and this polyfill need to work on top of unfetch
1425
+ // so the below feature detection needs the !self.AbortController part.
1426
+ // The Request.prototype check is also needed because Safari versions 11.1.2
1427
+ // up to and including 12.1.x has a window.AbortController present but still
1428
+ // does NOT correctly implement abortable fetch:
1429
+ // https://bugs.webkit.org/show_bug.cgi?id=174980#c2
1430
+
1431
+
1432
+ return typeof self.Request === 'function' && !self.Request.prototype.hasOwnProperty('signal') || !self.AbortController;
1433
+ }
1434
+
1435
+ /**
1436
+ * Note: the "fetch.Request" default value is available for fetch imported from
1437
+ * the "node-fetch" package and not in browsers. This is OK since browsers
1438
+ * will be importing umd-polyfill.js from that path "self" is passed the
1439
+ * decorator so the default value will not be used (because browsers that define
1440
+ * fetch also has Request). One quirky setup where self.fetch exists but
1441
+ * self.Request does not is when the "unfetch" minimal fetch polyfill is used
1442
+ * on top of IE11; for this case the browser will try to use the fetch.Request
1443
+ * default value which in turn will be undefined but then then "if (Request)"
1444
+ * will ensure that you get a patched fetch but still no Request (as expected).
1445
+ * @param {fetch, Request = fetch.Request}
1446
+ * @returns {fetch: abortableFetch, Request: AbortableRequest}
1447
+ */
1448
+
1449
+ function abortableFetchDecorator(patchTargets) {
1450
+ if ('function' === typeof patchTargets) {
1451
+ patchTargets = {
1452
+ fetch: patchTargets
1453
+ };
1454
+ }
1455
+
1456
+ var _patchTargets = patchTargets,
1457
+ fetch = _patchTargets.fetch,
1458
+ _patchTargets$Request = _patchTargets.Request,
1459
+ NativeRequest = _patchTargets$Request === void 0 ? fetch.Request : _patchTargets$Request,
1460
+ NativeAbortController = _patchTargets.AbortController,
1461
+ _patchTargets$__FORCE = _patchTargets.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,
1462
+ __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL = _patchTargets$__FORCE === void 0 ? false : _patchTargets$__FORCE;
1463
+
1464
+ if (!polyfillNeeded({
1465
+ fetch: fetch,
1466
+ Request: NativeRequest,
1467
+ AbortController: NativeAbortController,
1468
+ __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL: __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL
1469
+ })) {
1470
+ return {
1471
+ fetch: fetch,
1472
+ Request: Request
1473
+ };
1474
+ }
1475
+
1476
+ var Request = NativeRequest; // Note that the "unfetch" minimal fetch polyfill defines fetch() without
1477
+ // defining window.Request, and this polyfill need to work on top of unfetch
1478
+ // hence we only patch it if it's available. Also we don't patch it if signal
1479
+ // is already available on the Request prototype because in this case support
1480
+ // is present and the patching below can cause a crash since it assigns to
1481
+ // request.signal which is technically a read-only property. This latter error
1482
+ // happens when you run the main5.js node-fetch example in the repo
1483
+ // "abortcontroller-polyfill-examples". The exact error is:
1484
+ // request.signal = init.signal;
1485
+ // ^
1486
+ // TypeError: Cannot set property signal of #<Request> which has only a getter
1487
+
1488
+ if (Request && !Request.prototype.hasOwnProperty('signal') || __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL) {
1489
+ Request = function Request(input, init) {
1490
+ var signal;
1491
+
1492
+ if (init && init.signal) {
1493
+ signal = init.signal; // Never pass init.signal to the native Request implementation when the polyfill has
1494
+ // been installed because if we're running on top of a browser with a
1495
+ // working native AbortController (i.e. the polyfill was installed due to
1496
+ // __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL being set), then passing our
1497
+ // fake AbortSignal to the native fetch will trigger:
1498
+ // TypeError: Failed to construct 'Request': member signal is not of type AbortSignal.
1499
+
1500
+ delete init.signal;
1501
+ }
1502
+
1503
+ var request = new NativeRequest(input, init);
1504
+
1505
+ if (signal) {
1506
+ Object.defineProperty(request, 'signal', {
1507
+ writable: false,
1508
+ enumerable: false,
1509
+ configurable: true,
1510
+ value: signal
1511
+ });
1512
+ }
1513
+
1514
+ return request;
1515
+ };
1516
+
1517
+ Request.prototype = NativeRequest.prototype;
1518
+ }
1519
+
1520
+ var realFetch = fetch;
1521
+
1522
+ var abortableFetch = function abortableFetch(input, init) {
1523
+ var signal = Request && Request.prototype.isPrototypeOf(input) ? input.signal : init ? init.signal : undefined;
1524
+
1525
+ if (signal) {
1526
+ var abortError;
1527
+
1528
+ try {
1529
+ abortError = new DOMException('Aborted', 'AbortError');
1530
+ } catch (err) {
1531
+ // IE 11 does not support calling the DOMException constructor, use a
1532
+ // regular error object on it instead.
1533
+ abortError = new Error('Aborted');
1534
+ abortError.name = 'AbortError';
1535
+ } // Return early if already aborted, thus avoiding making an HTTP request
1536
+
1537
+
1538
+ if (signal.aborted) {
1539
+ return Promise.reject(abortError);
1540
+ } // Turn an event into a promise, reject it once `abort` is dispatched
1541
+
1542
+
1543
+ var cancellation = new Promise(function (_, reject) {
1544
+ signal.addEventListener('abort', function () {
1545
+ return reject(abortError);
1546
+ }, {
1547
+ once: true
1548
+ });
1549
+ });
1550
+
1551
+ if (init && init.signal) {
1552
+ // Never pass .signal to the native implementation when the polyfill has
1553
+ // been installed because if we're running on top of a browser with a
1554
+ // working native AbortController (i.e. the polyfill was installed due to
1555
+ // __FORCE_INSTALL_ABORTCONTROLLER_POLYFILL being set), then passing our
1556
+ // fake AbortSignal to the native fetch will trigger:
1557
+ // TypeError: Failed to execute 'fetch' on 'Window': member signal is not of type AbortSignal.
1558
+ delete init.signal;
1559
+ } // Return the fastest promise (don't need to wait for request to finish)
1560
+
1561
+
1562
+ return Promise.race([cancellation, realFetch(input, init)]);
1563
+ }
1564
+
1565
+ return realFetch(input, init);
1566
+ };
1567
+
1568
+ return {
1569
+ fetch: abortableFetch,
1570
+ Request: Request
1571
+ };
1572
+ }
1573
+
1574
+ exports.AbortController = AbortController;
1575
+ exports.AbortSignal = AbortSignal;
1576
+ exports.abortableFetch = abortableFetchDecorator;
1577
+
1578
+ },{}],20:[function(require,module,exports){
1579
+
1580
+ },{}],21:[function(require,module,exports){
1581
+ var hashClear = require('./_hashClear'),
1582
+ hashDelete = require('./_hashDelete'),
1583
+ hashGet = require('./_hashGet'),
1584
+ hashHas = require('./_hashHas'),
1585
+ hashSet = require('./_hashSet');
1586
+
1587
+ /**
1588
+ * Creates a hash object.
1589
+ *
1590
+ * @private
1591
+ * @constructor
1592
+ * @param {Array} [entries] The key-value pairs to cache.
1593
+ */
1594
+ function Hash(entries) {
1595
+ var index = -1,
1596
+ length = entries == null ? 0 : entries.length;
1597
+
1598
+ this.clear();
1599
+ while (++index < length) {
1600
+ var entry = entries[index];
1601
+ this.set(entry[0], entry[1]);
1602
+ }
1603
+ }
1604
+
1605
+ // Add methods to `Hash`.
1606
+ Hash.prototype.clear = hashClear;
1607
+ Hash.prototype['delete'] = hashDelete;
1608
+ Hash.prototype.get = hashGet;
1609
+ Hash.prototype.has = hashHas;
1610
+ Hash.prototype.set = hashSet;
1611
+
1612
+ module.exports = Hash;
1613
+
1614
+ },{"./_hashClear":46,"./_hashDelete":47,"./_hashGet":48,"./_hashHas":49,"./_hashSet":50}],22:[function(require,module,exports){
1615
+ var listCacheClear = require('./_listCacheClear'),
1616
+ listCacheDelete = require('./_listCacheDelete'),
1617
+ listCacheGet = require('./_listCacheGet'),
1618
+ listCacheHas = require('./_listCacheHas'),
1619
+ listCacheSet = require('./_listCacheSet');
1620
+
1621
+ /**
1622
+ * Creates an list cache object.
1623
+ *
1624
+ * @private
1625
+ * @constructor
1626
+ * @param {Array} [entries] The key-value pairs to cache.
1627
+ */
1628
+ function ListCache(entries) {
1629
+ var index = -1,
1630
+ length = entries == null ? 0 : entries.length;
1631
+
1632
+ this.clear();
1633
+ while (++index < length) {
1634
+ var entry = entries[index];
1635
+ this.set(entry[0], entry[1]);
1636
+ }
1637
+ }
1638
+
1639
+ // Add methods to `ListCache`.
1640
+ ListCache.prototype.clear = listCacheClear;
1641
+ ListCache.prototype['delete'] = listCacheDelete;
1642
+ ListCache.prototype.get = listCacheGet;
1643
+ ListCache.prototype.has = listCacheHas;
1644
+ ListCache.prototype.set = listCacheSet;
1645
+
1646
+ module.exports = ListCache;
1647
+
1648
+ },{"./_listCacheClear":56,"./_listCacheDelete":57,"./_listCacheGet":58,"./_listCacheHas":59,"./_listCacheSet":60}],23:[function(require,module,exports){
1649
+ var getNative = require('./_getNative'),
1650
+ root = require('./_root');
1651
+
1652
+ /* Built-in method references that are verified to be native. */
1653
+ var Map = getNative(root, 'Map');
1654
+
1655
+ module.exports = Map;
1656
+
1657
+ },{"./_getNative":42,"./_root":72}],24:[function(require,module,exports){
1658
+ var mapCacheClear = require('./_mapCacheClear'),
1659
+ mapCacheDelete = require('./_mapCacheDelete'),
1660
+ mapCacheGet = require('./_mapCacheGet'),
1661
+ mapCacheHas = require('./_mapCacheHas'),
1662
+ mapCacheSet = require('./_mapCacheSet');
1663
+
1664
+ /**
1665
+ * Creates a map cache object to store key-value pairs.
1666
+ *
1667
+ * @private
1668
+ * @constructor
1669
+ * @param {Array} [entries] The key-value pairs to cache.
1670
+ */
1671
+ function MapCache(entries) {
1672
+ var index = -1,
1673
+ length = entries == null ? 0 : entries.length;
1674
+
1675
+ this.clear();
1676
+ while (++index < length) {
1677
+ var entry = entries[index];
1678
+ this.set(entry[0], entry[1]);
1679
+ }
1680
+ }
1681
+
1682
+ // Add methods to `MapCache`.
1683
+ MapCache.prototype.clear = mapCacheClear;
1684
+ MapCache.prototype['delete'] = mapCacheDelete;
1685
+ MapCache.prototype.get = mapCacheGet;
1686
+ MapCache.prototype.has = mapCacheHas;
1687
+ MapCache.prototype.set = mapCacheSet;
1688
+
1689
+ module.exports = MapCache;
1690
+
1691
+ },{"./_mapCacheClear":61,"./_mapCacheDelete":62,"./_mapCacheGet":63,"./_mapCacheHas":64,"./_mapCacheSet":65}],25:[function(require,module,exports){
1692
+ var root = require('./_root');
1693
+
1694
+ /** Built-in value references. */
1695
+ var Symbol = root.Symbol;
1696
+
1697
+ module.exports = Symbol;
1698
+
1699
+ },{"./_root":72}],26:[function(require,module,exports){
1700
+ var baseTimes = require('./_baseTimes'),
1701
+ isArguments = require('./isArguments'),
1702
+ isArray = require('./isArray'),
1703
+ isBuffer = require('./isBuffer'),
1704
+ isIndex = require('./_isIndex'),
1705
+ isTypedArray = require('./isTypedArray');
1706
+
1707
+ /** Used for built-in method references. */
1708
+ var objectProto = Object.prototype;
1709
+
1710
+ /** Used to check objects for own properties. */
1711
+ var hasOwnProperty = objectProto.hasOwnProperty;
1712
+
1713
+ /**
1714
+ * Creates an array of the enumerable property names of the array-like `value`.
1715
+ *
1716
+ * @private
1717
+ * @param {*} value The value to query.
1718
+ * @param {boolean} inherited Specify returning inherited property names.
1719
+ * @returns {Array} Returns the array of property names.
1720
+ */
1721
+ function arrayLikeKeys(value, inherited) {
1722
+ var isArr = isArray(value),
1723
+ isArg = !isArr && isArguments(value),
1724
+ isBuff = !isArr && !isArg && isBuffer(value),
1725
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
1726
+ skipIndexes = isArr || isArg || isBuff || isType,
1727
+ result = skipIndexes ? baseTimes(value.length, String) : [],
1728
+ length = result.length;
1729
+
1730
+ for (var key in value) {
1731
+ if ((inherited || hasOwnProperty.call(value, key)) &&
1732
+ !(skipIndexes && (
1733
+ // Safari 9 has enumerable `arguments.length` in strict mode.
1734
+ key == 'length' ||
1735
+ // Node.js 0.10 has enumerable non-index properties on buffers.
1736
+ (isBuff && (key == 'offset' || key == 'parent')) ||
1737
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
1738
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1739
+ // Skip index properties.
1740
+ isIndex(key, length)
1741
+ ))) {
1742
+ result.push(key);
1743
+ }
1744
+ }
1745
+ return result;
1746
+ }
1747
+
1748
+ module.exports = arrayLikeKeys;
1749
+
1750
+ },{"./_baseTimes":35,"./_isIndex":51,"./isArguments":78,"./isArray":79,"./isBuffer":82,"./isTypedArray":92}],27:[function(require,module,exports){
1751
+ /**
1752
+ * A specialized version of `_.map` for arrays without support for iteratee
1753
+ * shorthands.
1754
+ *
1755
+ * @private
1756
+ * @param {Array} [array] The array to iterate over.
1757
+ * @param {Function} iteratee The function invoked per iteration.
1758
+ * @returns {Array} Returns the new mapped array.
1759
+ */
1760
+ function arrayMap(array, iteratee) {
1761
+ var index = -1,
1762
+ length = array == null ? 0 : array.length,
1763
+ result = Array(length);
1764
+
1765
+ while (++index < length) {
1766
+ result[index] = iteratee(array[index], index, array);
1767
+ }
1768
+ return result;
1769
+ }
1770
+
1771
+ module.exports = arrayMap;
1772
+
1773
+ },{}],28:[function(require,module,exports){
1774
+ var eq = require('./eq');
1775
+
1776
+ /**
1777
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1778
+ *
1779
+ * @private
1780
+ * @param {Array} array The array to inspect.
1781
+ * @param {*} key The key to search for.
1782
+ * @returns {number} Returns the index of the matched value, else `-1`.
1783
+ */
1784
+ function assocIndexOf(array, key) {
1785
+ var length = array.length;
1786
+ while (length--) {
1787
+ if (eq(array[length][0], key)) {
1788
+ return length;
1789
+ }
1790
+ }
1791
+ return -1;
1792
+ }
1793
+
1794
+ module.exports = assocIndexOf;
1795
+
1796
+ },{"./eq":76}],29:[function(require,module,exports){
1797
+ var castPath = require('./_castPath'),
1798
+ toKey = require('./_toKey');
1799
+
1800
+ /**
1801
+ * The base implementation of `_.get` without support for default values.
1802
+ *
1803
+ * @private
1804
+ * @param {Object} object The object to query.
1805
+ * @param {Array|string} path The path of the property to get.
1806
+ * @returns {*} Returns the resolved value.
1807
+ */
1808
+ function baseGet(object, path) {
1809
+ path = castPath(path, object);
1810
+
1811
+ var index = 0,
1812
+ length = path.length;
1813
+
1814
+ while (object != null && index < length) {
1815
+ object = object[toKey(path[index++])];
1816
+ }
1817
+ return (index && index == length) ? object : undefined;
1818
+ }
1819
+
1820
+ module.exports = baseGet;
1821
+
1822
+ },{"./_castPath":38,"./_toKey":74}],30:[function(require,module,exports){
1823
+ var Symbol = require('./_Symbol'),
1824
+ getRawTag = require('./_getRawTag'),
1825
+ objectToString = require('./_objectToString');
1826
+
1827
+ /** `Object#toString` result references. */
1828
+ var nullTag = '[object Null]',
1829
+ undefinedTag = '[object Undefined]';
1830
+
1831
+ /** Built-in value references. */
1832
+ var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
1833
+
1834
+ /**
1835
+ * The base implementation of `getTag` without fallbacks for buggy environments.
1836
+ *
1837
+ * @private
1838
+ * @param {*} value The value to query.
1839
+ * @returns {string} Returns the `toStringTag`.
1840
+ */
1841
+ function baseGetTag(value) {
1842
+ if (value == null) {
1843
+ return value === undefined ? undefinedTag : nullTag;
1844
+ }
1845
+ return (symToStringTag && symToStringTag in Object(value))
1846
+ ? getRawTag(value)
1847
+ : objectToString(value);
1848
+ }
1849
+
1850
+ module.exports = baseGetTag;
1851
+
1852
+ },{"./_Symbol":25,"./_getRawTag":44,"./_objectToString":70}],31:[function(require,module,exports){
1853
+ var baseGetTag = require('./_baseGetTag'),
1854
+ isObjectLike = require('./isObjectLike');
1855
+
1856
+ /** `Object#toString` result references. */
1857
+ var argsTag = '[object Arguments]';
1858
+
1859
+ /**
1860
+ * The base implementation of `_.isArguments`.
1861
+ *
1862
+ * @private
1863
+ * @param {*} value The value to check.
1864
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1865
+ */
1866
+ function baseIsArguments(value) {
1867
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
1868
+ }
1869
+
1870
+ module.exports = baseIsArguments;
1871
+
1872
+ },{"./_baseGetTag":30,"./isObjectLike":88}],32:[function(require,module,exports){
1873
+ var isFunction = require('./isFunction'),
1874
+ isMasked = require('./_isMasked'),
1875
+ isObject = require('./isObject'),
1876
+ toSource = require('./_toSource');
1877
+
1878
+ /**
1879
+ * Used to match `RegExp`
1880
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1881
+ */
1882
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
1883
+
1884
+ /** Used to detect host constructors (Safari). */
1885
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
1886
+
1887
+ /** Used for built-in method references. */
1888
+ var funcProto = Function.prototype,
1889
+ objectProto = Object.prototype;
1890
+
1891
+ /** Used to resolve the decompiled source of functions. */
1892
+ var funcToString = funcProto.toString;
1893
+
1894
+ /** Used to check objects for own properties. */
1895
+ var hasOwnProperty = objectProto.hasOwnProperty;
1896
+
1897
+ /** Used to detect if a method is native. */
1898
+ var reIsNative = RegExp('^' +
1899
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
1900
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1901
+ );
1902
+
1903
+ /**
1904
+ * The base implementation of `_.isNative` without bad shim checks.
1905
+ *
1906
+ * @private
1907
+ * @param {*} value The value to check.
1908
+ * @returns {boolean} Returns `true` if `value` is a native function,
1909
+ * else `false`.
1910
+ */
1911
+ function baseIsNative(value) {
1912
+ if (!isObject(value) || isMasked(value)) {
1913
+ return false;
1914
+ }
1915
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
1916
+ return pattern.test(toSource(value));
1917
+ }
1918
+
1919
+ module.exports = baseIsNative;
1920
+
1921
+ },{"./_isMasked":54,"./_toSource":75,"./isFunction":83,"./isObject":87}],33:[function(require,module,exports){
1922
+ var baseGetTag = require('./_baseGetTag'),
1923
+ isLength = require('./isLength'),
1924
+ isObjectLike = require('./isObjectLike');
1925
+
1926
+ /** `Object#toString` result references. */
1927
+ var argsTag = '[object Arguments]',
1928
+ arrayTag = '[object Array]',
1929
+ boolTag = '[object Boolean]',
1930
+ dateTag = '[object Date]',
1931
+ errorTag = '[object Error]',
1932
+ funcTag = '[object Function]',
1933
+ mapTag = '[object Map]',
1934
+ numberTag = '[object Number]',
1935
+ objectTag = '[object Object]',
1936
+ regexpTag = '[object RegExp]',
1937
+ setTag = '[object Set]',
1938
+ stringTag = '[object String]',
1939
+ weakMapTag = '[object WeakMap]';
1940
+
1941
+ var arrayBufferTag = '[object ArrayBuffer]',
1942
+ dataViewTag = '[object DataView]',
1943
+ float32Tag = '[object Float32Array]',
1944
+ float64Tag = '[object Float64Array]',
1945
+ int8Tag = '[object Int8Array]',
1946
+ int16Tag = '[object Int16Array]',
1947
+ int32Tag = '[object Int32Array]',
1948
+ uint8Tag = '[object Uint8Array]',
1949
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1950
+ uint16Tag = '[object Uint16Array]',
1951
+ uint32Tag = '[object Uint32Array]';
1952
+
1953
+ /** Used to identify `toStringTag` values of typed arrays. */
1954
+ var typedArrayTags = {};
1955
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1956
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1957
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1958
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1959
+ typedArrayTags[uint32Tag] = true;
1960
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
1961
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
1962
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
1963
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
1964
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
1965
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
1966
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
1967
+ typedArrayTags[weakMapTag] = false;
1968
+
1969
+ /**
1970
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
1971
+ *
1972
+ * @private
1973
+ * @param {*} value The value to check.
1974
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1975
+ */
1976
+ function baseIsTypedArray(value) {
1977
+ return isObjectLike(value) &&
1978
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
1979
+ }
1980
+
1981
+ module.exports = baseIsTypedArray;
1982
+
1983
+ },{"./_baseGetTag":30,"./isLength":84,"./isObjectLike":88}],34:[function(require,module,exports){
1984
+ var isPrototype = require('./_isPrototype'),
1985
+ nativeKeys = require('./_nativeKeys');
1986
+
1987
+ /** Used for built-in method references. */
1988
+ var objectProto = Object.prototype;
1989
+
1990
+ /** Used to check objects for own properties. */
1991
+ var hasOwnProperty = objectProto.hasOwnProperty;
1992
+
1993
+ /**
1994
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1995
+ *
1996
+ * @private
1997
+ * @param {Object} object The object to query.
1998
+ * @returns {Array} Returns the array of property names.
1999
+ */
2000
+ function baseKeys(object) {
2001
+ if (!isPrototype(object)) {
2002
+ return nativeKeys(object);
2003
+ }
2004
+ var result = [];
2005
+ for (var key in Object(object)) {
2006
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
2007
+ result.push(key);
2008
+ }
2009
+ }
2010
+ return result;
2011
+ }
2012
+
2013
+ module.exports = baseKeys;
2014
+
2015
+ },{"./_isPrototype":55,"./_nativeKeys":68}],35:[function(require,module,exports){
2016
+ /**
2017
+ * The base implementation of `_.times` without support for iteratee shorthands
2018
+ * or max array length checks.
2019
+ *
2020
+ * @private
2021
+ * @param {number} n The number of times to invoke `iteratee`.
2022
+ * @param {Function} iteratee The function invoked per iteration.
2023
+ * @returns {Array} Returns the array of results.
2024
+ */
2025
+ function baseTimes(n, iteratee) {
2026
+ var index = -1,
2027
+ result = Array(n);
2028
+
2029
+ while (++index < n) {
2030
+ result[index] = iteratee(index);
2031
+ }
2032
+ return result;
2033
+ }
2034
+
2035
+ module.exports = baseTimes;
2036
+
2037
+ },{}],36:[function(require,module,exports){
2038
+ var Symbol = require('./_Symbol'),
2039
+ arrayMap = require('./_arrayMap'),
2040
+ isArray = require('./isArray'),
2041
+ isSymbol = require('./isSymbol');
2042
+
2043
+ /** Used as references for various `Number` constants. */
2044
+ var INFINITY = 1 / 0;
2045
+
2046
+ /** Used to convert symbols to primitives and strings. */
2047
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
2048
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
2049
+
2050
+ /**
2051
+ * The base implementation of `_.toString` which doesn't convert nullish
2052
+ * values to empty strings.
2053
+ *
2054
+ * @private
2055
+ * @param {*} value The value to process.
2056
+ * @returns {string} Returns the string.
2057
+ */
2058
+ function baseToString(value) {
2059
+ // Exit early for strings to avoid a performance hit in some environments.
2060
+ if (typeof value == 'string') {
2061
+ return value;
2062
+ }
2063
+ if (isArray(value)) {
2064
+ // Recursively convert values (susceptible to call stack limits).
2065
+ return arrayMap(value, baseToString) + '';
2066
+ }
2067
+ if (isSymbol(value)) {
2068
+ return symbolToString ? symbolToString.call(value) : '';
2069
+ }
2070
+ var result = (value + '');
2071
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2072
+ }
2073
+
2074
+ module.exports = baseToString;
2075
+
2076
+ },{"./_Symbol":25,"./_arrayMap":27,"./isArray":79,"./isSymbol":91}],37:[function(require,module,exports){
2077
+ /**
2078
+ * The base implementation of `_.unary` without support for storing metadata.
2079
+ *
2080
+ * @private
2081
+ * @param {Function} func The function to cap arguments for.
2082
+ * @returns {Function} Returns the new capped function.
2083
+ */
2084
+ function baseUnary(func) {
2085
+ return function(value) {
2086
+ return func(value);
2087
+ };
2088
+ }
2089
+
2090
+ module.exports = baseUnary;
2091
+
2092
+ },{}],38:[function(require,module,exports){
2093
+ var isArray = require('./isArray'),
2094
+ isKey = require('./_isKey'),
2095
+ stringToPath = require('./_stringToPath'),
2096
+ toString = require('./toString');
2097
+
2098
+ /**
2099
+ * Casts `value` to a path array if it's not one.
2100
+ *
2101
+ * @private
2102
+ * @param {*} value The value to inspect.
2103
+ * @param {Object} [object] The object to query keys on.
2104
+ * @returns {Array} Returns the cast property path array.
2105
+ */
2106
+ function castPath(value, object) {
2107
+ if (isArray(value)) {
2108
+ return value;
2109
+ }
2110
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
2111
+ }
2112
+
2113
+ module.exports = castPath;
2114
+
2115
+ },{"./_isKey":52,"./_stringToPath":73,"./isArray":79,"./toString":96}],39:[function(require,module,exports){
2116
+ var root = require('./_root');
2117
+
2118
+ /** Used to detect overreaching core-js shims. */
2119
+ var coreJsData = root['__core-js_shared__'];
2120
+
2121
+ module.exports = coreJsData;
2122
+
2123
+ },{"./_root":72}],40:[function(require,module,exports){
2124
+ (function (global){
2125
+ /** Detect free variable `global` from Node.js. */
2126
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
2127
+
2128
+ module.exports = freeGlobal;
2129
+
2130
+ }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2131
+ },{}],41:[function(require,module,exports){
2132
+ var isKeyable = require('./_isKeyable');
2133
+
2134
+ /**
2135
+ * Gets the data for `map`.
2136
+ *
2137
+ * @private
2138
+ * @param {Object} map The map to query.
2139
+ * @param {string} key The reference key.
2140
+ * @returns {*} Returns the map data.
2141
+ */
2142
+ function getMapData(map, key) {
2143
+ var data = map.__data__;
2144
+ return isKeyable(key)
2145
+ ? data[typeof key == 'string' ? 'string' : 'hash']
2146
+ : data.map;
2147
+ }
2148
+
2149
+ module.exports = getMapData;
2150
+
2151
+ },{"./_isKeyable":53}],42:[function(require,module,exports){
2152
+ var baseIsNative = require('./_baseIsNative'),
2153
+ getValue = require('./_getValue');
2154
+
2155
+ /**
2156
+ * Gets the native function at `key` of `object`.
2157
+ *
2158
+ * @private
2159
+ * @param {Object} object The object to query.
2160
+ * @param {string} key The key of the method to get.
2161
+ * @returns {*} Returns the function if it's native, else `undefined`.
2162
+ */
2163
+ function getNative(object, key) {
2164
+ var value = getValue(object, key);
2165
+ return baseIsNative(value) ? value : undefined;
2166
+ }
2167
+
2168
+ module.exports = getNative;
2169
+
2170
+ },{"./_baseIsNative":32,"./_getValue":45}],43:[function(require,module,exports){
2171
+ var overArg = require('./_overArg');
2172
+
2173
+ /** Built-in value references. */
2174
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
2175
+
2176
+ module.exports = getPrototype;
2177
+
2178
+ },{"./_overArg":71}],44:[function(require,module,exports){
2179
+ var Symbol = require('./_Symbol');
2180
+
2181
+ /** Used for built-in method references. */
2182
+ var objectProto = Object.prototype;
2183
+
2184
+ /** Used to check objects for own properties. */
2185
+ var hasOwnProperty = objectProto.hasOwnProperty;
2186
+
2187
+ /**
2188
+ * Used to resolve the
2189
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2190
+ * of values.
2191
+ */
2192
+ var nativeObjectToString = objectProto.toString;
2193
+
2194
+ /** Built-in value references. */
2195
+ var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
2196
+
2197
+ /**
2198
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
2199
+ *
2200
+ * @private
2201
+ * @param {*} value The value to query.
2202
+ * @returns {string} Returns the raw `toStringTag`.
2203
+ */
2204
+ function getRawTag(value) {
2205
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
2206
+ tag = value[symToStringTag];
2207
+
2208
+ try {
2209
+ value[symToStringTag] = undefined;
2210
+ var unmasked = true;
2211
+ } catch (e) {}
2212
+
2213
+ var result = nativeObjectToString.call(value);
2214
+ if (unmasked) {
2215
+ if (isOwn) {
2216
+ value[symToStringTag] = tag;
2217
+ } else {
2218
+ delete value[symToStringTag];
2219
+ }
2220
+ }
2221
+ return result;
2222
+ }
2223
+
2224
+ module.exports = getRawTag;
2225
+
2226
+ },{"./_Symbol":25}],45:[function(require,module,exports){
2227
+ /**
2228
+ * Gets the value at `key` of `object`.
2229
+ *
2230
+ * @private
2231
+ * @param {Object} [object] The object to query.
2232
+ * @param {string} key The key of the property to get.
2233
+ * @returns {*} Returns the property value.
2234
+ */
2235
+ function getValue(object, key) {
2236
+ return object == null ? undefined : object[key];
2237
+ }
2238
+
2239
+ module.exports = getValue;
2240
+
2241
+ },{}],46:[function(require,module,exports){
2242
+ var nativeCreate = require('./_nativeCreate');
2243
+
2244
+ /**
2245
+ * Removes all key-value entries from the hash.
2246
+ *
2247
+ * @private
2248
+ * @name clear
2249
+ * @memberOf Hash
2250
+ */
2251
+ function hashClear() {
2252
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
2253
+ this.size = 0;
2254
+ }
2255
+
2256
+ module.exports = hashClear;
2257
+
2258
+ },{"./_nativeCreate":67}],47:[function(require,module,exports){
2259
+ /**
2260
+ * Removes `key` and its value from the hash.
2261
+ *
2262
+ * @private
2263
+ * @name delete
2264
+ * @memberOf Hash
2265
+ * @param {Object} hash The hash to modify.
2266
+ * @param {string} key The key of the value to remove.
2267
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2268
+ */
2269
+ function hashDelete(key) {
2270
+ var result = this.has(key) && delete this.__data__[key];
2271
+ this.size -= result ? 1 : 0;
2272
+ return result;
2273
+ }
2274
+
2275
+ module.exports = hashDelete;
2276
+
2277
+ },{}],48:[function(require,module,exports){
2278
+ var nativeCreate = require('./_nativeCreate');
2279
+
2280
+ /** Used to stand-in for `undefined` hash values. */
2281
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
2282
+
2283
+ /** Used for built-in method references. */
2284
+ var objectProto = Object.prototype;
2285
+
2286
+ /** Used to check objects for own properties. */
2287
+ var hasOwnProperty = objectProto.hasOwnProperty;
2288
+
2289
+ /**
2290
+ * Gets the hash value for `key`.
2291
+ *
2292
+ * @private
2293
+ * @name get
2294
+ * @memberOf Hash
2295
+ * @param {string} key The key of the value to get.
2296
+ * @returns {*} Returns the entry value.
2297
+ */
2298
+ function hashGet(key) {
2299
+ var data = this.__data__;
2300
+ if (nativeCreate) {
2301
+ var result = data[key];
2302
+ return result === HASH_UNDEFINED ? undefined : result;
2303
+ }
2304
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
2305
+ }
2306
+
2307
+ module.exports = hashGet;
2308
+
2309
+ },{"./_nativeCreate":67}],49:[function(require,module,exports){
2310
+ var nativeCreate = require('./_nativeCreate');
2311
+
2312
+ /** Used for built-in method references. */
2313
+ var objectProto = Object.prototype;
2314
+
2315
+ /** Used to check objects for own properties. */
2316
+ var hasOwnProperty = objectProto.hasOwnProperty;
2317
+
2318
+ /**
2319
+ * Checks if a hash value for `key` exists.
2320
+ *
2321
+ * @private
2322
+ * @name has
2323
+ * @memberOf Hash
2324
+ * @param {string} key The key of the entry to check.
2325
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2326
+ */
2327
+ function hashHas(key) {
2328
+ var data = this.__data__;
2329
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
2330
+ }
2331
+
2332
+ module.exports = hashHas;
2333
+
2334
+ },{"./_nativeCreate":67}],50:[function(require,module,exports){
2335
+ var nativeCreate = require('./_nativeCreate');
2336
+
2337
+ /** Used to stand-in for `undefined` hash values. */
2338
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
2339
+
2340
+ /**
2341
+ * Sets the hash `key` to `value`.
2342
+ *
2343
+ * @private
2344
+ * @name set
2345
+ * @memberOf Hash
2346
+ * @param {string} key The key of the value to set.
2347
+ * @param {*} value The value to set.
2348
+ * @returns {Object} Returns the hash instance.
2349
+ */
2350
+ function hashSet(key, value) {
2351
+ var data = this.__data__;
2352
+ this.size += this.has(key) ? 0 : 1;
2353
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
2354
+ return this;
2355
+ }
2356
+
2357
+ module.exports = hashSet;
2358
+
2359
+ },{"./_nativeCreate":67}],51:[function(require,module,exports){
2360
+ /** Used as references for various `Number` constants. */
2361
+ var MAX_SAFE_INTEGER = 9007199254740991;
2362
+
2363
+ /** Used to detect unsigned integer values. */
2364
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
2365
+
2366
+ /**
2367
+ * Checks if `value` is a valid array-like index.
2368
+ *
2369
+ * @private
2370
+ * @param {*} value The value to check.
2371
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
2372
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
2373
+ */
2374
+ function isIndex(value, length) {
2375
+ var type = typeof value;
2376
+ length = length == null ? MAX_SAFE_INTEGER : length;
2377
+
2378
+ return !!length &&
2379
+ (type == 'number' ||
2380
+ (type != 'symbol' && reIsUint.test(value))) &&
2381
+ (value > -1 && value % 1 == 0 && value < length);
2382
+ }
2383
+
2384
+ module.exports = isIndex;
2385
+
2386
+ },{}],52:[function(require,module,exports){
2387
+ var isArray = require('./isArray'),
2388
+ isSymbol = require('./isSymbol');
2389
+
2390
+ /** Used to match property names within property paths. */
2391
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
2392
+ reIsPlainProp = /^\w*$/;
2393
+
2394
+ /**
2395
+ * Checks if `value` is a property name and not a property path.
2396
+ *
2397
+ * @private
2398
+ * @param {*} value The value to check.
2399
+ * @param {Object} [object] The object to query keys on.
2400
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2401
+ */
2402
+ function isKey(value, object) {
2403
+ if (isArray(value)) {
2404
+ return false;
2405
+ }
2406
+ var type = typeof value;
2407
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2408
+ value == null || isSymbol(value)) {
2409
+ return true;
2410
+ }
2411
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2412
+ (object != null && value in Object(object));
2413
+ }
2414
+
2415
+ module.exports = isKey;
2416
+
2417
+ },{"./isArray":79,"./isSymbol":91}],53:[function(require,module,exports){
2418
+ /**
2419
+ * Checks if `value` is suitable for use as unique object key.
2420
+ *
2421
+ * @private
2422
+ * @param {*} value The value to check.
2423
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
2424
+ */
2425
+ function isKeyable(value) {
2426
+ var type = typeof value;
2427
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
2428
+ ? (value !== '__proto__')
2429
+ : (value === null);
2430
+ }
2431
+
2432
+ module.exports = isKeyable;
2433
+
2434
+ },{}],54:[function(require,module,exports){
2435
+ var coreJsData = require('./_coreJsData');
2436
+
2437
+ /** Used to detect methods masquerading as native. */
2438
+ var maskSrcKey = (function() {
2439
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
2440
+ return uid ? ('Symbol(src)_1.' + uid) : '';
2441
+ }());
2442
+
2443
+ /**
2444
+ * Checks if `func` has its source masked.
2445
+ *
2446
+ * @private
2447
+ * @param {Function} func The function to check.
2448
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
2449
+ */
2450
+ function isMasked(func) {
2451
+ return !!maskSrcKey && (maskSrcKey in func);
2452
+ }
2453
+
2454
+ module.exports = isMasked;
2455
+
2456
+ },{"./_coreJsData":39}],55:[function(require,module,exports){
2457
+ /** Used for built-in method references. */
2458
+ var objectProto = Object.prototype;
2459
+
2460
+ /**
2461
+ * Checks if `value` is likely a prototype object.
2462
+ *
2463
+ * @private
2464
+ * @param {*} value The value to check.
2465
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
2466
+ */
2467
+ function isPrototype(value) {
2468
+ var Ctor = value && value.constructor,
2469
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
2470
+
2471
+ return value === proto;
2472
+ }
2473
+
2474
+ module.exports = isPrototype;
2475
+
2476
+ },{}],56:[function(require,module,exports){
2477
+ /**
2478
+ * Removes all key-value entries from the list cache.
2479
+ *
2480
+ * @private
2481
+ * @name clear
2482
+ * @memberOf ListCache
2483
+ */
2484
+ function listCacheClear() {
2485
+ this.__data__ = [];
2486
+ this.size = 0;
2487
+ }
2488
+
2489
+ module.exports = listCacheClear;
2490
+
2491
+ },{}],57:[function(require,module,exports){
2492
+ var assocIndexOf = require('./_assocIndexOf');
2493
+
2494
+ /** Used for built-in method references. */
2495
+ var arrayProto = Array.prototype;
2496
+
2497
+ /** Built-in value references. */
2498
+ var splice = arrayProto.splice;
2499
+
2500
+ /**
2501
+ * Removes `key` and its value from the list cache.
2502
+ *
2503
+ * @private
2504
+ * @name delete
2505
+ * @memberOf ListCache
2506
+ * @param {string} key The key of the value to remove.
2507
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2508
+ */
2509
+ function listCacheDelete(key) {
2510
+ var data = this.__data__,
2511
+ index = assocIndexOf(data, key);
2512
+
2513
+ if (index < 0) {
2514
+ return false;
2515
+ }
2516
+ var lastIndex = data.length - 1;
2517
+ if (index == lastIndex) {
2518
+ data.pop();
2519
+ } else {
2520
+ splice.call(data, index, 1);
2521
+ }
2522
+ --this.size;
2523
+ return true;
2524
+ }
2525
+
2526
+ module.exports = listCacheDelete;
2527
+
2528
+ },{"./_assocIndexOf":28}],58:[function(require,module,exports){
2529
+ var assocIndexOf = require('./_assocIndexOf');
2530
+
2531
+ /**
2532
+ * Gets the list cache value for `key`.
2533
+ *
2534
+ * @private
2535
+ * @name get
2536
+ * @memberOf ListCache
2537
+ * @param {string} key The key of the value to get.
2538
+ * @returns {*} Returns the entry value.
2539
+ */
2540
+ function listCacheGet(key) {
2541
+ var data = this.__data__,
2542
+ index = assocIndexOf(data, key);
2543
+
2544
+ return index < 0 ? undefined : data[index][1];
2545
+ }
2546
+
2547
+ module.exports = listCacheGet;
2548
+
2549
+ },{"./_assocIndexOf":28}],59:[function(require,module,exports){
2550
+ var assocIndexOf = require('./_assocIndexOf');
2551
+
2552
+ /**
2553
+ * Checks if a list cache value for `key` exists.
2554
+ *
2555
+ * @private
2556
+ * @name has
2557
+ * @memberOf ListCache
2558
+ * @param {string} key The key of the entry to check.
2559
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2560
+ */
2561
+ function listCacheHas(key) {
2562
+ return assocIndexOf(this.__data__, key) > -1;
2563
+ }
2564
+
2565
+ module.exports = listCacheHas;
2566
+
2567
+ },{"./_assocIndexOf":28}],60:[function(require,module,exports){
2568
+ var assocIndexOf = require('./_assocIndexOf');
2569
+
2570
+ /**
2571
+ * Sets the list cache `key` to `value`.
2572
+ *
2573
+ * @private
2574
+ * @name set
2575
+ * @memberOf ListCache
2576
+ * @param {string} key The key of the value to set.
2577
+ * @param {*} value The value to set.
2578
+ * @returns {Object} Returns the list cache instance.
2579
+ */
2580
+ function listCacheSet(key, value) {
2581
+ var data = this.__data__,
2582
+ index = assocIndexOf(data, key);
2583
+
2584
+ if (index < 0) {
2585
+ ++this.size;
2586
+ data.push([key, value]);
2587
+ } else {
2588
+ data[index][1] = value;
2589
+ }
2590
+ return this;
2591
+ }
2592
+
2593
+ module.exports = listCacheSet;
2594
+
2595
+ },{"./_assocIndexOf":28}],61:[function(require,module,exports){
2596
+ var Hash = require('./_Hash'),
2597
+ ListCache = require('./_ListCache'),
2598
+ Map = require('./_Map');
2599
+
2600
+ /**
2601
+ * Removes all key-value entries from the map.
2602
+ *
2603
+ * @private
2604
+ * @name clear
2605
+ * @memberOf MapCache
2606
+ */
2607
+ function mapCacheClear() {
2608
+ this.size = 0;
2609
+ this.__data__ = {
2610
+ 'hash': new Hash,
2611
+ 'map': new (Map || ListCache),
2612
+ 'string': new Hash
2613
+ };
2614
+ }
2615
+
2616
+ module.exports = mapCacheClear;
2617
+
2618
+ },{"./_Hash":21,"./_ListCache":22,"./_Map":23}],62:[function(require,module,exports){
2619
+ var getMapData = require('./_getMapData');
2620
+
2621
+ /**
2622
+ * Removes `key` and its value from the map.
2623
+ *
2624
+ * @private
2625
+ * @name delete
2626
+ * @memberOf MapCache
2627
+ * @param {string} key The key of the value to remove.
2628
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2629
+ */
2630
+ function mapCacheDelete(key) {
2631
+ var result = getMapData(this, key)['delete'](key);
2632
+ this.size -= result ? 1 : 0;
2633
+ return result;
2634
+ }
2635
+
2636
+ module.exports = mapCacheDelete;
2637
+
2638
+ },{"./_getMapData":41}],63:[function(require,module,exports){
2639
+ var getMapData = require('./_getMapData');
2640
+
2641
+ /**
2642
+ * Gets the map value for `key`.
2643
+ *
2644
+ * @private
2645
+ * @name get
2646
+ * @memberOf MapCache
2647
+ * @param {string} key The key of the value to get.
2648
+ * @returns {*} Returns the entry value.
2649
+ */
2650
+ function mapCacheGet(key) {
2651
+ return getMapData(this, key).get(key);
2652
+ }
2653
+
2654
+ module.exports = mapCacheGet;
2655
+
2656
+ },{"./_getMapData":41}],64:[function(require,module,exports){
2657
+ var getMapData = require('./_getMapData');
2658
+
2659
+ /**
2660
+ * Checks if a map value for `key` exists.
2661
+ *
2662
+ * @private
2663
+ * @name has
2664
+ * @memberOf MapCache
2665
+ * @param {string} key The key of the entry to check.
2666
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2667
+ */
2668
+ function mapCacheHas(key) {
2669
+ return getMapData(this, key).has(key);
2670
+ }
2671
+
2672
+ module.exports = mapCacheHas;
2673
+
2674
+ },{"./_getMapData":41}],65:[function(require,module,exports){
2675
+ var getMapData = require('./_getMapData');
2676
+
2677
+ /**
2678
+ * Sets the map `key` to `value`.
2679
+ *
2680
+ * @private
2681
+ * @name set
2682
+ * @memberOf MapCache
2683
+ * @param {string} key The key of the value to set.
2684
+ * @param {*} value The value to set.
2685
+ * @returns {Object} Returns the map cache instance.
2686
+ */
2687
+ function mapCacheSet(key, value) {
2688
+ var data = getMapData(this, key),
2689
+ size = data.size;
2690
+
2691
+ data.set(key, value);
2692
+ this.size += data.size == size ? 0 : 1;
2693
+ return this;
2694
+ }
2695
+
2696
+ module.exports = mapCacheSet;
2697
+
2698
+ },{"./_getMapData":41}],66:[function(require,module,exports){
2699
+ var memoize = require('./memoize');
2700
+
2701
+ /** Used as the maximum memoize cache size. */
2702
+ var MAX_MEMOIZE_SIZE = 500;
2703
+
2704
+ /**
2705
+ * A specialized version of `_.memoize` which clears the memoized function's
2706
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
2707
+ *
2708
+ * @private
2709
+ * @param {Function} func The function to have its output memoized.
2710
+ * @returns {Function} Returns the new memoized function.
2711
+ */
2712
+ function memoizeCapped(func) {
2713
+ var result = memoize(func, function(key) {
2714
+ if (cache.size === MAX_MEMOIZE_SIZE) {
2715
+ cache.clear();
2716
+ }
2717
+ return key;
2718
+ });
2719
+
2720
+ var cache = result.cache;
2721
+ return result;
2722
+ }
2723
+
2724
+ module.exports = memoizeCapped;
2725
+
2726
+ },{"./memoize":94}],67:[function(require,module,exports){
2727
+ var getNative = require('./_getNative');
2728
+
2729
+ /* Built-in method references that are verified to be native. */
2730
+ var nativeCreate = getNative(Object, 'create');
2731
+
2732
+ module.exports = nativeCreate;
2733
+
2734
+ },{"./_getNative":42}],68:[function(require,module,exports){
2735
+ var overArg = require('./_overArg');
2736
+
2737
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2738
+ var nativeKeys = overArg(Object.keys, Object);
2739
+
2740
+ module.exports = nativeKeys;
2741
+
2742
+ },{"./_overArg":71}],69:[function(require,module,exports){
2743
+ var freeGlobal = require('./_freeGlobal');
2744
+
2745
+ /** Detect free variable `exports`. */
2746
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
2747
+
2748
+ /** Detect free variable `module`. */
2749
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
2750
+
2751
+ /** Detect the popular CommonJS extension `module.exports`. */
2752
+ var moduleExports = freeModule && freeModule.exports === freeExports;
2753
+
2754
+ /** Detect free variable `process` from Node.js. */
2755
+ var freeProcess = moduleExports && freeGlobal.process;
2756
+
2757
+ /** Used to access faster Node.js helpers. */
2758
+ var nodeUtil = (function() {
2759
+ try {
2760
+ // Use `util.types` for Node.js 10+.
2761
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
2762
+
2763
+ if (types) {
2764
+ return types;
2765
+ }
2766
+
2767
+ // Legacy `process.binding('util')` for Node.js < 10.
2768
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
2769
+ } catch (e) {}
2770
+ }());
2771
+
2772
+ module.exports = nodeUtil;
2773
+
2774
+ },{"./_freeGlobal":40}],70:[function(require,module,exports){
2775
+ /** Used for built-in method references. */
2776
+ var objectProto = Object.prototype;
2777
+
2778
+ /**
2779
+ * Used to resolve the
2780
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2781
+ * of values.
2782
+ */
2783
+ var nativeObjectToString = objectProto.toString;
2784
+
2785
+ /**
2786
+ * Converts `value` to a string using `Object.prototype.toString`.
2787
+ *
2788
+ * @private
2789
+ * @param {*} value The value to convert.
2790
+ * @returns {string} Returns the converted string.
2791
+ */
2792
+ function objectToString(value) {
2793
+ return nativeObjectToString.call(value);
2794
+ }
2795
+
2796
+ module.exports = objectToString;
2797
+
2798
+ },{}],71:[function(require,module,exports){
2799
+ /**
2800
+ * Creates a unary function that invokes `func` with its argument transformed.
2801
+ *
2802
+ * @private
2803
+ * @param {Function} func The function to wrap.
2804
+ * @param {Function} transform The argument transform.
2805
+ * @returns {Function} Returns the new function.
2806
+ */
2807
+ function overArg(func, transform) {
2808
+ return function(arg) {
2809
+ return func(transform(arg));
2810
+ };
2811
+ }
2812
+
2813
+ module.exports = overArg;
2814
+
2815
+ },{}],72:[function(require,module,exports){
2816
+ var freeGlobal = require('./_freeGlobal');
2817
+
2818
+ /** Detect free variable `self`. */
2819
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
2820
+
2821
+ /** Used as a reference to the global object. */
2822
+ var root = freeGlobal || freeSelf || Function('return this')();
2823
+
2824
+ module.exports = root;
2825
+
2826
+ },{"./_freeGlobal":40}],73:[function(require,module,exports){
2827
+ var memoizeCapped = require('./_memoizeCapped');
2828
+
2829
+ /** Used to match property names within property paths. */
2830
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
2831
+
2832
+ /** Used to match backslashes in property paths. */
2833
+ var reEscapeChar = /\\(\\)?/g;
2834
+
2835
+ /**
2836
+ * Converts `string` to a property path array.
2837
+ *
2838
+ * @private
2839
+ * @param {string} string The string to convert.
2840
+ * @returns {Array} Returns the property path array.
2841
+ */
2842
+ var stringToPath = memoizeCapped(function(string) {
2843
+ var result = [];
2844
+ if (string.charCodeAt(0) === 46 /* . */) {
2845
+ result.push('');
2846
+ }
2847
+ string.replace(rePropName, function(match, number, quote, subString) {
2848
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
2849
+ });
2850
+ return result;
2851
+ });
2852
+
2853
+ module.exports = stringToPath;
2854
+
2855
+ },{"./_memoizeCapped":66}],74:[function(require,module,exports){
2856
+ var isSymbol = require('./isSymbol');
2857
+
2858
+ /** Used as references for various `Number` constants. */
2859
+ var INFINITY = 1 / 0;
2860
+
2861
+ /**
2862
+ * Converts `value` to a string key if it's not a string or symbol.
2863
+ *
2864
+ * @private
2865
+ * @param {*} value The value to inspect.
2866
+ * @returns {string|symbol} Returns the key.
2867
+ */
2868
+ function toKey(value) {
2869
+ if (typeof value == 'string' || isSymbol(value)) {
2870
+ return value;
2871
+ }
2872
+ var result = (value + '');
2873
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2874
+ }
2875
+
2876
+ module.exports = toKey;
2877
+
2878
+ },{"./isSymbol":91}],75:[function(require,module,exports){
2879
+ /** Used for built-in method references. */
2880
+ var funcProto = Function.prototype;
2881
+
2882
+ /** Used to resolve the decompiled source of functions. */
2883
+ var funcToString = funcProto.toString;
2884
+
2885
+ /**
2886
+ * Converts `func` to its source code.
2887
+ *
2888
+ * @private
2889
+ * @param {Function} func The function to convert.
2890
+ * @returns {string} Returns the source code.
2891
+ */
2892
+ function toSource(func) {
2893
+ if (func != null) {
2894
+ try {
2895
+ return funcToString.call(func);
2896
+ } catch (e) {}
2897
+ try {
2898
+ return (func + '');
2899
+ } catch (e) {}
2900
+ }
2901
+ return '';
2902
+ }
2903
+
2904
+ module.exports = toSource;
2905
+
2906
+ },{}],76:[function(require,module,exports){
2907
+ /**
2908
+ * Performs a
2909
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
2910
+ * comparison between two values to determine if they are equivalent.
2911
+ *
2912
+ * @static
2913
+ * @memberOf _
2914
+ * @since 4.0.0
2915
+ * @category Lang
2916
+ * @param {*} value The value to compare.
2917
+ * @param {*} other The other value to compare.
2918
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2919
+ * @example
2920
+ *
2921
+ * var object = { 'a': 1 };
2922
+ * var other = { 'a': 1 };
2923
+ *
2924
+ * _.eq(object, object);
2925
+ * // => true
2926
+ *
2927
+ * _.eq(object, other);
2928
+ * // => false
2929
+ *
2930
+ * _.eq('a', 'a');
2931
+ * // => true
2932
+ *
2933
+ * _.eq('a', Object('a'));
2934
+ * // => false
2935
+ *
2936
+ * _.eq(NaN, NaN);
2937
+ * // => true
2938
+ */
2939
+ function eq(value, other) {
2940
+ return value === other || (value !== value && other !== other);
2941
+ }
2942
+
2943
+ module.exports = eq;
2944
+
2945
+ },{}],77:[function(require,module,exports){
2946
+ var baseGet = require('./_baseGet');
2947
+
2948
+ /**
2949
+ * Gets the value at `path` of `object`. If the resolved value is
2950
+ * `undefined`, the `defaultValue` is returned in its place.
2951
+ *
2952
+ * @static
2953
+ * @memberOf _
2954
+ * @since 3.7.0
2955
+ * @category Object
2956
+ * @param {Object} object The object to query.
2957
+ * @param {Array|string} path The path of the property to get.
2958
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
2959
+ * @returns {*} Returns the resolved value.
2960
+ * @example
2961
+ *
2962
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
2963
+ *
2964
+ * _.get(object, 'a[0].b.c');
2965
+ * // => 3
2966
+ *
2967
+ * _.get(object, ['a', '0', 'b', 'c']);
2968
+ * // => 3
2969
+ *
2970
+ * _.get(object, 'a.b.c', 'default');
2971
+ * // => 'default'
2972
+ */
2973
+ function get(object, path, defaultValue) {
2974
+ var result = object == null ? undefined : baseGet(object, path);
2975
+ return result === undefined ? defaultValue : result;
2976
+ }
2977
+
2978
+ module.exports = get;
2979
+
2980
+ },{"./_baseGet":29}],78:[function(require,module,exports){
2981
+ var baseIsArguments = require('./_baseIsArguments'),
2982
+ isObjectLike = require('./isObjectLike');
2983
+
2984
+ /** Used for built-in method references. */
2985
+ var objectProto = Object.prototype;
2986
+
2987
+ /** Used to check objects for own properties. */
2988
+ var hasOwnProperty = objectProto.hasOwnProperty;
2989
+
2990
+ /** Built-in value references. */
2991
+ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
2992
+
2993
+ /**
2994
+ * Checks if `value` is likely an `arguments` object.
2995
+ *
2996
+ * @static
2997
+ * @memberOf _
2998
+ * @since 0.1.0
2999
+ * @category Lang
3000
+ * @param {*} value The value to check.
3001
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
3002
+ * else `false`.
3003
+ * @example
3004
+ *
3005
+ * _.isArguments(function() { return arguments; }());
3006
+ * // => true
3007
+ *
3008
+ * _.isArguments([1, 2, 3]);
3009
+ * // => false
3010
+ */
3011
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
3012
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
3013
+ !propertyIsEnumerable.call(value, 'callee');
3014
+ };
3015
+
3016
+ module.exports = isArguments;
3017
+
3018
+ },{"./_baseIsArguments":31,"./isObjectLike":88}],79:[function(require,module,exports){
3019
+ /**
3020
+ * Checks if `value` is classified as an `Array` object.
3021
+ *
3022
+ * @static
3023
+ * @memberOf _
3024
+ * @since 0.1.0
3025
+ * @category Lang
3026
+ * @param {*} value The value to check.
3027
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
3028
+ * @example
3029
+ *
3030
+ * _.isArray([1, 2, 3]);
3031
+ * // => true
3032
+ *
3033
+ * _.isArray(document.body.children);
3034
+ * // => false
3035
+ *
3036
+ * _.isArray('abc');
3037
+ * // => false
3038
+ *
3039
+ * _.isArray(_.noop);
3040
+ * // => false
3041
+ */
3042
+ var isArray = Array.isArray;
3043
+
3044
+ module.exports = isArray;
3045
+
3046
+ },{}],80:[function(require,module,exports){
3047
+ var isFunction = require('./isFunction'),
3048
+ isLength = require('./isLength');
3049
+
3050
+ /**
3051
+ * Checks if `value` is array-like. A value is considered array-like if it's
3052
+ * not a function and has a `value.length` that's an integer greater than or
3053
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
3054
+ *
3055
+ * @static
3056
+ * @memberOf _
3057
+ * @since 4.0.0
3058
+ * @category Lang
3059
+ * @param {*} value The value to check.
3060
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
3061
+ * @example
3062
+ *
3063
+ * _.isArrayLike([1, 2, 3]);
3064
+ * // => true
3065
+ *
3066
+ * _.isArrayLike(document.body.children);
3067
+ * // => true
3068
+ *
3069
+ * _.isArrayLike('abc');
3070
+ * // => true
3071
+ *
3072
+ * _.isArrayLike(_.noop);
3073
+ * // => false
3074
+ */
3075
+ function isArrayLike(value) {
3076
+ return value != null && isLength(value.length) && !isFunction(value);
3077
+ }
3078
+
3079
+ module.exports = isArrayLike;
3080
+
3081
+ },{"./isFunction":83,"./isLength":84}],81:[function(require,module,exports){
3082
+ var baseGetTag = require('./_baseGetTag'),
3083
+ isObjectLike = require('./isObjectLike');
3084
+
3085
+ /** `Object#toString` result references. */
3086
+ var boolTag = '[object Boolean]';
3087
+
3088
+ /**
3089
+ * Checks if `value` is classified as a boolean primitive or object.
3090
+ *
3091
+ * @static
3092
+ * @memberOf _
3093
+ * @since 0.1.0
3094
+ * @category Lang
3095
+ * @param {*} value The value to check.
3096
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
3097
+ * @example
3098
+ *
3099
+ * _.isBoolean(false);
3100
+ * // => true
3101
+ *
3102
+ * _.isBoolean(null);
3103
+ * // => false
3104
+ */
3105
+ function isBoolean(value) {
3106
+ return value === true || value === false ||
3107
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
3108
+ }
3109
+
3110
+ module.exports = isBoolean;
3111
+
3112
+ },{"./_baseGetTag":30,"./isObjectLike":88}],82:[function(require,module,exports){
3113
+ var root = require('./_root'),
3114
+ stubFalse = require('./stubFalse');
3115
+
3116
+ /** Detect free variable `exports`. */
3117
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
3118
+
3119
+ /** Detect free variable `module`. */
3120
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
3121
+
3122
+ /** Detect the popular CommonJS extension `module.exports`. */
3123
+ var moduleExports = freeModule && freeModule.exports === freeExports;
3124
+
3125
+ /** Built-in value references. */
3126
+ var Buffer = moduleExports ? root.Buffer : undefined;
3127
+
3128
+ /* Built-in method references for those with the same name as other `lodash` methods. */
3129
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
3130
+
3131
+ /**
3132
+ * Checks if `value` is a buffer.
3133
+ *
3134
+ * @static
3135
+ * @memberOf _
3136
+ * @since 4.3.0
3137
+ * @category Lang
3138
+ * @param {*} value The value to check.
3139
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
3140
+ * @example
3141
+ *
3142
+ * _.isBuffer(new Buffer(2));
3143
+ * // => true
3144
+ *
3145
+ * _.isBuffer(new Uint8Array(2));
3146
+ * // => false
3147
+ */
3148
+ var isBuffer = nativeIsBuffer || stubFalse;
3149
+
3150
+ module.exports = isBuffer;
3151
+
3152
+ },{"./_root":72,"./stubFalse":95}],83:[function(require,module,exports){
3153
+ var baseGetTag = require('./_baseGetTag'),
3154
+ isObject = require('./isObject');
3155
+
3156
+ /** `Object#toString` result references. */
3157
+ var asyncTag = '[object AsyncFunction]',
3158
+ funcTag = '[object Function]',
3159
+ genTag = '[object GeneratorFunction]',
3160
+ proxyTag = '[object Proxy]';
3161
+
3162
+ /**
3163
+ * Checks if `value` is classified as a `Function` object.
3164
+ *
3165
+ * @static
3166
+ * @memberOf _
3167
+ * @since 0.1.0
3168
+ * @category Lang
3169
+ * @param {*} value The value to check.
3170
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
3171
+ * @example
3172
+ *
3173
+ * _.isFunction(_);
3174
+ * // => true
3175
+ *
3176
+ * _.isFunction(/abc/);
3177
+ * // => false
3178
+ */
3179
+ function isFunction(value) {
3180
+ if (!isObject(value)) {
3181
+ return false;
3182
+ }
3183
+ // The use of `Object#toString` avoids issues with the `typeof` operator
3184
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
3185
+ var tag = baseGetTag(value);
3186
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
3187
+ }
3188
+
3189
+ module.exports = isFunction;
3190
+
3191
+ },{"./_baseGetTag":30,"./isObject":87}],84:[function(require,module,exports){
3192
+ /** Used as references for various `Number` constants. */
3193
+ var MAX_SAFE_INTEGER = 9007199254740991;
3194
+
3195
+ /**
3196
+ * Checks if `value` is a valid array-like length.
3197
+ *
3198
+ * **Note:** This method is loosely based on
3199
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
3200
+ *
3201
+ * @static
3202
+ * @memberOf _
3203
+ * @since 4.0.0
3204
+ * @category Lang
3205
+ * @param {*} value The value to check.
3206
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
3207
+ * @example
3208
+ *
3209
+ * _.isLength(3);
3210
+ * // => true
3211
+ *
3212
+ * _.isLength(Number.MIN_VALUE);
3213
+ * // => false
3214
+ *
3215
+ * _.isLength(Infinity);
3216
+ * // => false
3217
+ *
3218
+ * _.isLength('3');
3219
+ * // => false
3220
+ */
3221
+ function isLength(value) {
3222
+ return typeof value == 'number' &&
3223
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
3224
+ }
3225
+
3226
+ module.exports = isLength;
3227
+
3228
+ },{}],85:[function(require,module,exports){
3229
+ /**
3230
+ * Checks if `value` is `null` or `undefined`.
3231
+ *
3232
+ * @static
3233
+ * @memberOf _
3234
+ * @since 4.0.0
3235
+ * @category Lang
3236
+ * @param {*} value The value to check.
3237
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
3238
+ * @example
3239
+ *
3240
+ * _.isNil(null);
3241
+ * // => true
3242
+ *
3243
+ * _.isNil(void 0);
3244
+ * // => true
3245
+ *
3246
+ * _.isNil(NaN);
3247
+ * // => false
3248
+ */
3249
+ function isNil(value) {
3250
+ return value == null;
3251
+ }
3252
+
3253
+ module.exports = isNil;
3254
+
3255
+ },{}],86:[function(require,module,exports){
3256
+ var baseGetTag = require('./_baseGetTag'),
3257
+ isObjectLike = require('./isObjectLike');
3258
+
3259
+ /** `Object#toString` result references. */
3260
+ var numberTag = '[object Number]';
3261
+
3262
+ /**
3263
+ * Checks if `value` is classified as a `Number` primitive or object.
3264
+ *
3265
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
3266
+ * classified as numbers, use the `_.isFinite` method.
3267
+ *
3268
+ * @static
3269
+ * @memberOf _
3270
+ * @since 0.1.0
3271
+ * @category Lang
3272
+ * @param {*} value The value to check.
3273
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
3274
+ * @example
3275
+ *
3276
+ * _.isNumber(3);
3277
+ * // => true
3278
+ *
3279
+ * _.isNumber(Number.MIN_VALUE);
3280
+ * // => true
3281
+ *
3282
+ * _.isNumber(Infinity);
3283
+ * // => true
3284
+ *
3285
+ * _.isNumber('3');
3286
+ * // => false
3287
+ */
3288
+ function isNumber(value) {
3289
+ return typeof value == 'number' ||
3290
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
3291
+ }
3292
+
3293
+ module.exports = isNumber;
3294
+
3295
+ },{"./_baseGetTag":30,"./isObjectLike":88}],87:[function(require,module,exports){
3296
+ /**
3297
+ * Checks if `value` is the
3298
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
3299
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
3300
+ *
3301
+ * @static
3302
+ * @memberOf _
3303
+ * @since 0.1.0
3304
+ * @category Lang
3305
+ * @param {*} value The value to check.
3306
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
3307
+ * @example
3308
+ *
3309
+ * _.isObject({});
3310
+ * // => true
3311
+ *
3312
+ * _.isObject([1, 2, 3]);
3313
+ * // => true
3314
+ *
3315
+ * _.isObject(_.noop);
3316
+ * // => true
3317
+ *
3318
+ * _.isObject(null);
3319
+ * // => false
3320
+ */
3321
+ function isObject(value) {
3322
+ var type = typeof value;
3323
+ return value != null && (type == 'object' || type == 'function');
3324
+ }
3325
+
3326
+ module.exports = isObject;
3327
+
3328
+ },{}],88:[function(require,module,exports){
3329
+ /**
3330
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
3331
+ * and has a `typeof` result of "object".
3332
+ *
3333
+ * @static
3334
+ * @memberOf _
3335
+ * @since 4.0.0
3336
+ * @category Lang
3337
+ * @param {*} value The value to check.
3338
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
3339
+ * @example
3340
+ *
3341
+ * _.isObjectLike({});
3342
+ * // => true
3343
+ *
3344
+ * _.isObjectLike([1, 2, 3]);
3345
+ * // => true
3346
+ *
3347
+ * _.isObjectLike(_.noop);
3348
+ * // => false
3349
+ *
3350
+ * _.isObjectLike(null);
3351
+ * // => false
3352
+ */
3353
+ function isObjectLike(value) {
3354
+ return value != null && typeof value == 'object';
3355
+ }
3356
+
3357
+ module.exports = isObjectLike;
3358
+
3359
+ },{}],89:[function(require,module,exports){
3360
+ var baseGetTag = require('./_baseGetTag'),
3361
+ getPrototype = require('./_getPrototype'),
3362
+ isObjectLike = require('./isObjectLike');
3363
+
3364
+ /** `Object#toString` result references. */
3365
+ var objectTag = '[object Object]';
3366
+
3367
+ /** Used for built-in method references. */
3368
+ var funcProto = Function.prototype,
3369
+ objectProto = Object.prototype;
3370
+
3371
+ /** Used to resolve the decompiled source of functions. */
3372
+ var funcToString = funcProto.toString;
3373
+
3374
+ /** Used to check objects for own properties. */
3375
+ var hasOwnProperty = objectProto.hasOwnProperty;
3376
+
3377
+ /** Used to infer the `Object` constructor. */
3378
+ var objectCtorString = funcToString.call(Object);
3379
+
3380
+ /**
3381
+ * Checks if `value` is a plain object, that is, an object created by the
3382
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
3383
+ *
3384
+ * @static
3385
+ * @memberOf _
3386
+ * @since 0.8.0
3387
+ * @category Lang
3388
+ * @param {*} value The value to check.
3389
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
3390
+ * @example
3391
+ *
3392
+ * function Foo() {
3393
+ * this.a = 1;
3394
+ * }
3395
+ *
3396
+ * _.isPlainObject(new Foo);
3397
+ * // => false
3398
+ *
3399
+ * _.isPlainObject([1, 2, 3]);
3400
+ * // => false
3401
+ *
3402
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
3403
+ * // => true
3404
+ *
3405
+ * _.isPlainObject(Object.create(null));
3406
+ * // => true
3407
+ */
3408
+ function isPlainObject(value) {
3409
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
3410
+ return false;
3411
+ }
3412
+ var proto = getPrototype(value);
3413
+ if (proto === null) {
3414
+ return true;
3415
+ }
3416
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
3417
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
3418
+ funcToString.call(Ctor) == objectCtorString;
3419
+ }
3420
+
3421
+ module.exports = isPlainObject;
3422
+
3423
+ },{"./_baseGetTag":30,"./_getPrototype":43,"./isObjectLike":88}],90:[function(require,module,exports){
3424
+ var baseGetTag = require('./_baseGetTag'),
3425
+ isArray = require('./isArray'),
3426
+ isObjectLike = require('./isObjectLike');
3427
+
3428
+ /** `Object#toString` result references. */
3429
+ var stringTag = '[object String]';
3430
+
3431
+ /**
3432
+ * Checks if `value` is classified as a `String` primitive or object.
3433
+ *
3434
+ * @static
3435
+ * @since 0.1.0
3436
+ * @memberOf _
3437
+ * @category Lang
3438
+ * @param {*} value The value to check.
3439
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
3440
+ * @example
3441
+ *
3442
+ * _.isString('abc');
3443
+ * // => true
3444
+ *
3445
+ * _.isString(1);
3446
+ * // => false
3447
+ */
3448
+ function isString(value) {
3449
+ return typeof value == 'string' ||
3450
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
3451
+ }
3452
+
3453
+ module.exports = isString;
3454
+
3455
+ },{"./_baseGetTag":30,"./isArray":79,"./isObjectLike":88}],91:[function(require,module,exports){
3456
+ var baseGetTag = require('./_baseGetTag'),
3457
+ isObjectLike = require('./isObjectLike');
3458
+
3459
+ /** `Object#toString` result references. */
3460
+ var symbolTag = '[object Symbol]';
3461
+
3462
+ /**
3463
+ * Checks if `value` is classified as a `Symbol` primitive or object.
3464
+ *
3465
+ * @static
3466
+ * @memberOf _
3467
+ * @since 4.0.0
3468
+ * @category Lang
3469
+ * @param {*} value The value to check.
3470
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
3471
+ * @example
3472
+ *
3473
+ * _.isSymbol(Symbol.iterator);
3474
+ * // => true
3475
+ *
3476
+ * _.isSymbol('abc');
3477
+ * // => false
3478
+ */
3479
+ function isSymbol(value) {
3480
+ return typeof value == 'symbol' ||
3481
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
3482
+ }
3483
+
3484
+ module.exports = isSymbol;
3485
+
3486
+ },{"./_baseGetTag":30,"./isObjectLike":88}],92:[function(require,module,exports){
3487
+ var baseIsTypedArray = require('./_baseIsTypedArray'),
3488
+ baseUnary = require('./_baseUnary'),
3489
+ nodeUtil = require('./_nodeUtil');
3490
+
3491
+ /* Node.js helper references. */
3492
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
3493
+
3494
+ /**
3495
+ * Checks if `value` is classified as a typed array.
3496
+ *
3497
+ * @static
3498
+ * @memberOf _
3499
+ * @since 3.0.0
3500
+ * @category Lang
3501
+ * @param {*} value The value to check.
3502
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
3503
+ * @example
3504
+ *
3505
+ * _.isTypedArray(new Uint8Array);
3506
+ * // => true
3507
+ *
3508
+ * _.isTypedArray([]);
3509
+ * // => false
3510
+ */
3511
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
3512
+
3513
+ module.exports = isTypedArray;
3514
+
3515
+ },{"./_baseIsTypedArray":33,"./_baseUnary":37,"./_nodeUtil":69}],93:[function(require,module,exports){
3516
+ var arrayLikeKeys = require('./_arrayLikeKeys'),
3517
+ baseKeys = require('./_baseKeys'),
3518
+ isArrayLike = require('./isArrayLike');
3519
+
3520
+ /**
3521
+ * Creates an array of the own enumerable property names of `object`.
3522
+ *
3523
+ * **Note:** Non-object values are coerced to objects. See the
3524
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
3525
+ * for more details.
3526
+ *
3527
+ * @static
3528
+ * @since 0.1.0
3529
+ * @memberOf _
3530
+ * @category Object
3531
+ * @param {Object} object The object to query.
3532
+ * @returns {Array} Returns the array of property names.
3533
+ * @example
3534
+ *
3535
+ * function Foo() {
3536
+ * this.a = 1;
3537
+ * this.b = 2;
3538
+ * }
3539
+ *
3540
+ * Foo.prototype.c = 3;
3541
+ *
3542
+ * _.keys(new Foo);
3543
+ * // => ['a', 'b'] (iteration order is not guaranteed)
3544
+ *
3545
+ * _.keys('hi');
3546
+ * // => ['0', '1']
3547
+ */
3548
+ function keys(object) {
3549
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
3550
+ }
3551
+
3552
+ module.exports = keys;
3553
+
3554
+ },{"./_arrayLikeKeys":26,"./_baseKeys":34,"./isArrayLike":80}],94:[function(require,module,exports){
3555
+ var MapCache = require('./_MapCache');
3556
+
3557
+ /** Error message constants. */
3558
+ var FUNC_ERROR_TEXT = 'Expected a function';
3559
+
3560
+ /**
3561
+ * Creates a function that memoizes the result of `func`. If `resolver` is
3562
+ * provided, it determines the cache key for storing the result based on the
3563
+ * arguments provided to the memoized function. By default, the first argument
3564
+ * provided to the memoized function is used as the map cache key. The `func`
3565
+ * is invoked with the `this` binding of the memoized function.
3566
+ *
3567
+ * **Note:** The cache is exposed as the `cache` property on the memoized
3568
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
3569
+ * constructor with one whose instances implement the
3570
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
3571
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
3572
+ *
3573
+ * @static
3574
+ * @memberOf _
3575
+ * @since 0.1.0
3576
+ * @category Function
3577
+ * @param {Function} func The function to have its output memoized.
3578
+ * @param {Function} [resolver] The function to resolve the cache key.
3579
+ * @returns {Function} Returns the new memoized function.
3580
+ * @example
3581
+ *
3582
+ * var object = { 'a': 1, 'b': 2 };
3583
+ * var other = { 'c': 3, 'd': 4 };
3584
+ *
3585
+ * var values = _.memoize(_.values);
3586
+ * values(object);
3587
+ * // => [1, 2]
3588
+ *
3589
+ * values(other);
3590
+ * // => [3, 4]
3591
+ *
3592
+ * object.a = 2;
3593
+ * values(object);
3594
+ * // => [1, 2]
3595
+ *
3596
+ * // Modify the result cache.
3597
+ * values.cache.set(object, ['a', 'b']);
3598
+ * values(object);
3599
+ * // => ['a', 'b']
3600
+ *
3601
+ * // Replace `_.memoize.Cache`.
3602
+ * _.memoize.Cache = WeakMap;
3603
+ */
3604
+ function memoize(func, resolver) {
3605
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
3606
+ throw new TypeError(FUNC_ERROR_TEXT);
3607
+ }
3608
+ var memoized = function() {
3609
+ var args = arguments,
3610
+ key = resolver ? resolver.apply(this, args) : args[0],
3611
+ cache = memoized.cache;
3612
+
3613
+ if (cache.has(key)) {
3614
+ return cache.get(key);
3615
+ }
3616
+ var result = func.apply(this, args);
3617
+ memoized.cache = cache.set(key, result) || cache;
3618
+ return result;
3619
+ };
3620
+ memoized.cache = new (memoize.Cache || MapCache);
3621
+ return memoized;
3622
+ }
3623
+
3624
+ // Expose `MapCache`.
3625
+ memoize.Cache = MapCache;
3626
+
3627
+ module.exports = memoize;
3628
+
3629
+ },{"./_MapCache":24}],95:[function(require,module,exports){
3630
+ /**
3631
+ * This method returns `false`.
3632
+ *
3633
+ * @static
3634
+ * @memberOf _
3635
+ * @since 4.13.0
3636
+ * @category Util
3637
+ * @returns {boolean} Returns `false`.
3638
+ * @example
3639
+ *
3640
+ * _.times(2, _.stubFalse);
3641
+ * // => [false, false]
3642
+ */
3643
+ function stubFalse() {
3644
+ return false;
3645
+ }
3646
+
3647
+ module.exports = stubFalse;
3648
+
3649
+ },{}],96:[function(require,module,exports){
3650
+ var baseToString = require('./_baseToString');
3651
+
3652
+ /**
3653
+ * Converts `value` to a string. An empty string is returned for `null`
3654
+ * and `undefined` values. The sign of `-0` is preserved.
3655
+ *
3656
+ * @static
3657
+ * @memberOf _
3658
+ * @since 4.0.0
3659
+ * @category Lang
3660
+ * @param {*} value The value to convert.
3661
+ * @returns {string} Returns the converted string.
3662
+ * @example
3663
+ *
3664
+ * _.toString(null);
3665
+ * // => ''
3666
+ *
3667
+ * _.toString(-0);
3668
+ * // => '-0'
3669
+ *
3670
+ * _.toString([1, 2, 3]);
3671
+ * // => '1,2,3'
3672
+ */
3673
+ function toString(value) {
3674
+ return value == null ? '' : baseToString(value);
3675
+ }
3676
+
3677
+ module.exports = toString;
3678
+
3679
+ },{"./_baseToString":36}],"airtable":[function(require,module,exports){
3680
+ "use strict";
3681
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3682
+ return (mod && mod.__esModule) ? mod : { "default": mod };
3683
+ };
3684
+ var base_1 = __importDefault(require("./base"));
3685
+ var record_1 = __importDefault(require("./record"));
3686
+ var table_1 = __importDefault(require("./table"));
3687
+ var airtable_error_1 = __importDefault(require("./airtable_error"));
3688
+ var Airtable = /** @class */ (function () {
3689
+ function Airtable(opts) {
3690
+ if (opts === void 0) { opts = {}; }
3691
+ var defaultConfig = Airtable.default_config();
3692
+ var apiVersion = opts.apiVersion || Airtable.apiVersion || defaultConfig.apiVersion;
3693
+ Object.defineProperties(this, {
3694
+ _apiKey: {
3695
+ value: opts.apiKey || Airtable.apiKey || defaultConfig.apiKey,
3696
+ },
3697
+ _apiVersion: {
3698
+ value: apiVersion,
3699
+ },
3700
+ _apiVersionMajor: {
3701
+ value: apiVersion.split('.')[0],
3702
+ },
3703
+ _customHeaders: {
3704
+ value: opts.customHeaders || {},
3705
+ },
3706
+ _endpointUrl: {
3707
+ value: opts.endpointUrl || Airtable.endpointUrl || defaultConfig.endpointUrl,
3708
+ },
3709
+ _noRetryIfRateLimited: {
3710
+ value: opts.noRetryIfRateLimited ||
3711
+ Airtable.noRetryIfRateLimited ||
3712
+ defaultConfig.noRetryIfRateLimited,
3713
+ },
3714
+ _requestTimeout: {
3715
+ value: opts.requestTimeout || Airtable.requestTimeout || defaultConfig.requestTimeout,
3716
+ },
3717
+ });
3718
+ if (!this._apiKey) {
3719
+ throw new Error('An API key is required to connect to Airtable');
3720
+ }
3721
+ }
3722
+ Airtable.prototype.base = function (baseId) {
3723
+ return base_1.default.createFunctor(this, baseId);
3724
+ };
3725
+ Airtable.default_config = function () {
3726
+ return {
3727
+ endpointUrl: "" || 'https://api.airtable.com',
3728
+ apiVersion: '0.1.0',
3729
+ apiKey: "",
3730
+ noRetryIfRateLimited: false,
3731
+ requestTimeout: 300 * 1000,
3732
+ };
3733
+ };
3734
+ Airtable.configure = function (_a) {
3735
+ var apiKey = _a.apiKey, endpointUrl = _a.endpointUrl, apiVersion = _a.apiVersion, noRetryIfRateLimited = _a.noRetryIfRateLimited, requestTimeout = _a.requestTimeout;
3736
+ Airtable.apiKey = apiKey;
3737
+ Airtable.endpointUrl = endpointUrl;
3738
+ Airtable.apiVersion = apiVersion;
3739
+ Airtable.noRetryIfRateLimited = noRetryIfRateLimited;
3740
+ Airtable.requestTimeout = requestTimeout;
3741
+ };
3742
+ Airtable.base = function (baseId) {
3743
+ return new Airtable().base(baseId);
3744
+ };
3745
+ Airtable.Base = base_1.default;
3746
+ Airtable.Record = record_1.default;
3747
+ Airtable.Table = table_1.default;
3748
+ Airtable.Error = airtable_error_1.default;
3749
+ return Airtable;
3750
+ }());
3751
+ module.exports = Airtable;
3752
+
3753
+ },{"./airtable_error":2,"./base":3,"./record":15,"./table":17}]},{},["airtable"]);