@inboxsdk/core 2.2.9 → 2.2.10
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.
- package/inboxsdk.js +48 -29
- package/inboxsdk.js.map +1 -1
- package/package.json +1 -1
- package/pageWorld.js +243 -22
- package/pageWorld.js.map +1 -1
- package/src/inboxsdk.d.ts +5 -0
- package/src/injected-js/gmail/setup-gmail-interceptor.d.ts.map +1 -1
- package/src/injected-js/message-metadata-holder.d.ts +1 -0
- package/src/injected-js/message-metadata-holder.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-response-processor.d.ts +2 -4
- package/src/platform-implementation-js/dom-driver/gmail/gmail-response-processor.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-sync-response-processor.d.ts +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-sync-response-processor.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-address-changes-stream.d.ts +4 -4
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-address-changes-stream.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-address-information-extractor.d.ts +2 -2
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-address-information-extractor.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-recipients.d.ts +2 -2
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view/get-recipients.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.d.ts +6 -6
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-compose-view.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view/get-updated-contact.d.ts +2 -2
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view/get-updated-contact.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view.d.ts +3 -3
- package/src/platform-implementation-js/dom-driver/gmail/views/gmail-message-view.d.ts.map +1 -1
- package/src/platform-implementation-js/driver-interfaces/compose-view-driver.d.ts +2 -2
- package/src/platform-implementation-js/driver-interfaces/compose-view-driver.d.ts.map +1 -1
- package/src/platform-implementation-js/lib/extract-contact-from-email-contact-string.d.ts +2 -2
- package/src/platform-implementation-js/lib/extract-contact-from-email-contact-string.d.ts.map +1 -1
- package/src/platform-implementation-js/views/compose-view.d.ts +4 -4
- package/src/platform-implementation-js/views/compose-view.d.ts.map +1 -1
- package/src/platform-implementation-js/views/conversations/message-view.d.ts +3 -3
- package/src/platform-implementation-js/views/conversations/message-view.d.ts.map +1 -1
package/package.json
CHANGED
package/pageWorld.js
CHANGED
|
@@ -1610,6 +1610,9 @@ function getMessage(threadId, messageIndex) {
|
|
|
1610
1610
|
}
|
|
1611
1611
|
function add(groupedMessages) {
|
|
1612
1612
|
groupedMessages.forEach(group => {
|
|
1613
|
+
if (group.syncThreadID != null) {
|
|
1614
|
+
threadIdToMessages.set(group.syncThreadID, group.messages);
|
|
1615
|
+
}
|
|
1613
1616
|
threadIdToMessages.set(group.threadID, group.messages);
|
|
1614
1617
|
});
|
|
1615
1618
|
}
|
|
@@ -1629,7 +1632,8 @@ function addDataForThread(threadId, ikValue, btaiHeader, xsrfToken) {
|
|
|
1629
1632
|
const syncThread = await getThreadFromSyncThreadIdUsingHeaders(threadId, btaiHeader, xsrfToken);
|
|
1630
1633
|
if (syncThread) {
|
|
1631
1634
|
add([{
|
|
1632
|
-
|
|
1635
|
+
syncThreadID: syncThread.syncThreadID,
|
|
1636
|
+
threadID: syncThread.oldGmailThreadID,
|
|
1633
1637
|
messages: syncThread.extraMetaData.syncMessageData.map(syncMessage => ({
|
|
1634
1638
|
date: syncMessage.date,
|
|
1635
1639
|
recipients: syncMessage.recipients
|
|
@@ -2604,7 +2608,8 @@ function setupGmailInterceptorOnFrames(mainFrame, jsFrame) {
|
|
|
2604
2608
|
if (connection.status === 200) {
|
|
2605
2609
|
const threads = extractThreadsFromSearchResponse(connection.originalResponseText);
|
|
2606
2610
|
add(threads.map(syncThread => ({
|
|
2607
|
-
|
|
2611
|
+
syncThreadID: syncThread.syncThreadID,
|
|
2612
|
+
threadID: syncThread.oldGmailThreadID,
|
|
2608
2613
|
messages: syncThread.extraMetaData.syncMessageData.map(syncMessage => ({
|
|
2609
2614
|
date: syncMessage.date,
|
|
2610
2615
|
recipients: syncMessage.recipients
|
|
@@ -2622,7 +2627,8 @@ function setupGmailInterceptorOnFrames(mainFrame, jsFrame) {
|
|
|
2622
2627
|
if (connection.status === 200) {
|
|
2623
2628
|
const threads = extractThreadsFromThreadResponse(connection.originalResponseText);
|
|
2624
2629
|
add(threads.map(syncThread => ({
|
|
2625
|
-
|
|
2630
|
+
syncThreadID: syncThread.syncThreadID,
|
|
2631
|
+
threadID: syncThread.oldGmailThreadID,
|
|
2626
2632
|
messages: syncThread.extraMetaData.syncMessageData.map(syncMessage => ({
|
|
2627
2633
|
date: syncMessage.date,
|
|
2628
2634
|
recipients: syncMessage.recipients
|
|
@@ -3704,10 +3710,15 @@ function xhrHelper() {
|
|
|
3704
3710
|
/* harmony import */ var lodash_flatten__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_flatten__WEBPACK_IMPORTED_MODULE_0__);
|
|
3705
3711
|
/* harmony import */ var lodash_last__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6456);
|
|
3706
3712
|
/* harmony import */ var lodash_last__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_last__WEBPACK_IMPORTED_MODULE_1__);
|
|
3707
|
-
/* harmony import */ var
|
|
3708
|
-
/* harmony import */ var
|
|
3709
|
-
/* harmony import */ var
|
|
3710
|
-
/* harmony import */ var
|
|
3713
|
+
/* harmony import */ var lodash_uniqBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8496);
|
|
3714
|
+
/* harmony import */ var lodash_uniqBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqBy__WEBPACK_IMPORTED_MODULE_2__);
|
|
3715
|
+
/* harmony import */ var transducers_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6046);
|
|
3716
|
+
/* harmony import */ var transducers_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(transducers_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
3717
|
+
/* harmony import */ var _common_html_to_text__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6305);
|
|
3718
|
+
/* harmony import */ var _common_assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1602);
|
|
3719
|
+
/* harmony import */ var _lib_extract_contact_from_email_contact_string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3324);
|
|
3720
|
+
|
|
3721
|
+
|
|
3711
3722
|
|
|
3712
3723
|
|
|
3713
3724
|
|
|
@@ -3885,7 +3896,7 @@ function deserializeArray(value) {
|
|
|
3885
3896
|
}
|
|
3886
3897
|
function serialize(value, options) {
|
|
3887
3898
|
if (options.suggestionMode) {
|
|
3888
|
-
(0,
|
|
3899
|
+
(0,_common_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .v)(options.includeLengths);
|
|
3889
3900
|
return suggestionSerialize(value, options.includeExplicitNulls);
|
|
3890
3901
|
}
|
|
3891
3902
|
return threadListSerialize(value, options);
|
|
@@ -4084,9 +4095,9 @@ function extractThreadsFromDeserialized(value) {
|
|
|
4084
4095
|
value = [value[0][0]];
|
|
4085
4096
|
}
|
|
4086
4097
|
return _extractThreadArraysFromResponseArray(value).map(thread => Object.freeze(Object.defineProperty({
|
|
4087
|
-
subject: (0,
|
|
4088
|
-
shortDate: (0,
|
|
4089
|
-
timeString: (0,
|
|
4098
|
+
subject: (0,_common_html_to_text__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(thread[9]),
|
|
4099
|
+
shortDate: (0,_common_html_to_text__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(thread[14]),
|
|
4100
|
+
timeString: (0,_common_html_to_text__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(thread[15]),
|
|
4090
4101
|
peopleHtml: cleanupPeopleLine(thread[7]),
|
|
4091
4102
|
timestamp: thread[16] / 1000,
|
|
4092
4103
|
isUnread: thread[9].indexOf('<b>') > -1,
|
|
@@ -4098,7 +4109,7 @@ function extractThreadsFromDeserialized(value) {
|
|
|
4098
4109
|
value: thread
|
|
4099
4110
|
})));
|
|
4100
4111
|
}
|
|
4101
|
-
const _extractMessageIdsFromThreadBatchRequestXf =
|
|
4112
|
+
const _extractMessageIdsFromThreadBatchRequestXf = transducers_js__WEBPACK_IMPORTED_MODULE_3___default().compose((transducers_js__WEBPACK_IMPORTED_MODULE_3___default().cat), (transducers_js__WEBPACK_IMPORTED_MODULE_3___default().cat), transducers_js__WEBPACK_IMPORTED_MODULE_3___default().filter(item => item[0] === 'cs'), transducers_js__WEBPACK_IMPORTED_MODULE_3___default().map(item => [item[1], item[2]]));
|
|
4102
4113
|
function extractMessageIdsFromThreadBatchRequest(response) {
|
|
4103
4114
|
const {
|
|
4104
4115
|
value
|
|
@@ -4110,18 +4121,30 @@ function cleanupPeopleLine(peopleHtml) {
|
|
|
4110
4121
|
// removes a class that's specific to the current preview pane setting.
|
|
4111
4122
|
return peopleHtml.replace(/^[^<]*/, '').replace(/(<span[^>]*) class="[^"]*"/g, '$1');
|
|
4112
4123
|
}
|
|
4113
|
-
const _extractThreadArraysFromResponseArrayXf =
|
|
4124
|
+
const _extractThreadArraysFromResponseArrayXf = transducers_js__WEBPACK_IMPORTED_MODULE_3___default().compose((transducers_js__WEBPACK_IMPORTED_MODULE_3___default().cat), transducers_js__WEBPACK_IMPORTED_MODULE_3___default().filter(item => item[0] === 'tb'), transducers_js__WEBPACK_IMPORTED_MODULE_3___default().map(item => item[2]), (transducers_js__WEBPACK_IMPORTED_MODULE_3___default().cat));
|
|
4114
4125
|
function _extractThreadArraysFromResponseArray(threadResponseArray) {
|
|
4115
|
-
return
|
|
4126
|
+
return transducers_js__WEBPACK_IMPORTED_MODULE_3___default().toArray(threadResponseArray, _extractThreadArraysFromResponseArrayXf);
|
|
4116
4127
|
}
|
|
4117
|
-
const _extractThreadsFromConversationViewResponseArrayXf =
|
|
4128
|
+
const _extractThreadsFromConversationViewResponseArrayXf = transducers_js__WEBPACK_IMPORTED_MODULE_3___default().compose((transducers_js__WEBPACK_IMPORTED_MODULE_3___default().cat), transducers_js__WEBPACK_IMPORTED_MODULE_3___default().filter(item => item[0] === 'cs'), transducers_js__WEBPACK_IMPORTED_MODULE_3___default().map(item => ({
|
|
4118
4129
|
threadID: item[1],
|
|
4119
4130
|
messageIDs: item[8]
|
|
4120
4131
|
})));
|
|
4121
|
-
const _extractMessagesFromResponseArrayXf =
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4132
|
+
const _extractMessagesFromResponseArrayXf = transducers_js__WEBPACK_IMPORTED_MODULE_3___default().compose((transducers_js__WEBPACK_IMPORTED_MODULE_3___default().cat), transducers_js__WEBPACK_IMPORTED_MODULE_3___default().filter(item => item[0] === 'ms'), transducers_js__WEBPACK_IMPORTED_MODULE_3___default().map(item => {
|
|
4133
|
+
const m = {
|
|
4134
|
+
messageID: item[1],
|
|
4135
|
+
date: item[7],
|
|
4136
|
+
recipients: undefined
|
|
4137
|
+
};
|
|
4138
|
+
if (Array.isArray(item[13])) {
|
|
4139
|
+
m.recipients = item[13].slice(1, 4).filter(b => b != null).flat().map(_lib_extract_contact_from_email_contact_string__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A);
|
|
4140
|
+
} else if (Array.isArray(item[37])) {
|
|
4141
|
+
m.recipients = lodash_uniqBy__WEBPACK_IMPORTED_MODULE_2___default()(item[37].slice(0, 5).filter(b => Array.isArray(b)).flat(), b => b[1]).map(b => ({
|
|
4142
|
+
emailAddress: b[1],
|
|
4143
|
+
name: b[0] ?? undefined
|
|
4144
|
+
}));
|
|
4145
|
+
}
|
|
4146
|
+
return m;
|
|
4147
|
+
}));
|
|
4125
4148
|
function extractMessages(response) {
|
|
4126
4149
|
// regular view=cv requests have a top level array length of 1
|
|
4127
4150
|
// whereas view=cv requests when you refresh Gmail while looking at a thread
|
|
@@ -4130,11 +4153,13 @@ function extractMessages(response) {
|
|
|
4130
4153
|
value
|
|
4131
4154
|
} = deserialize(response);
|
|
4132
4155
|
if (value.length === 1) value = value[0];
|
|
4133
|
-
const threads =
|
|
4134
|
-
const messages =
|
|
4156
|
+
const threads = transducers_js__WEBPACK_IMPORTED_MODULE_3___default().toArray(value, _extractThreadsFromConversationViewResponseArrayXf);
|
|
4157
|
+
const messages = transducers_js__WEBPACK_IMPORTED_MODULE_3___default().toArray(value, _extractMessagesFromResponseArrayXf);
|
|
4135
4158
|
const messageMap = {};
|
|
4136
4159
|
messages.forEach(message => {
|
|
4137
|
-
|
|
4160
|
+
if (message.messageID != null) {
|
|
4161
|
+
messageMap[message.messageID] = message;
|
|
4162
|
+
}
|
|
4138
4163
|
});
|
|
4139
4164
|
return threads.map(_ref2 => {
|
|
4140
4165
|
let {
|
|
@@ -4416,6 +4441,59 @@ async function requestGmailThread(ikValue, threadId) {
|
|
|
4416
4441
|
|
|
4417
4442
|
/***/ }),
|
|
4418
4443
|
|
|
4444
|
+
/***/ 3324:
|
|
4445
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4446
|
+
|
|
4447
|
+
"use strict";
|
|
4448
|
+
|
|
4449
|
+
// EXPORTS
|
|
4450
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
4451
|
+
A: () => (/* binding */ extractContactFromEmailContactString)
|
|
4452
|
+
});
|
|
4453
|
+
|
|
4454
|
+
;// CONCATENATED MODULE: ./src/platform-implementation-js/lib/is-valid-email.ts
|
|
4455
|
+
const re = /^([^<>()[\]\\,;:\s"]+|".+")@[^\s<>]+$/;
|
|
4456
|
+
|
|
4457
|
+
// This function is supposed to be pretty forgiving because emails can have
|
|
4458
|
+
// almost anything in their From header. This function exists as a sanity check
|
|
4459
|
+
// to make sure that we didn't try to read from the wrong DOM element. It
|
|
4460
|
+
// passes anything with at least one @ sign that doesn't contain certain
|
|
4461
|
+
// symbols. We might want to make it even less strict and allow more symbols if
|
|
4462
|
+
// it turns out people are legitimately receiving emails with these in the From
|
|
4463
|
+
// or other recipient headers.
|
|
4464
|
+
function isValidEmail(candidate) {
|
|
4465
|
+
if (candidate == null) {
|
|
4466
|
+
return false;
|
|
4467
|
+
}
|
|
4468
|
+
return re.test(candidate);
|
|
4469
|
+
}
|
|
4470
|
+
;// CONCATENATED MODULE: ./src/platform-implementation-js/lib/extract-contact-from-email-contact-string.ts
|
|
4471
|
+
|
|
4472
|
+
function extractContactFromEmailContactString(contactInfoString) {
|
|
4473
|
+
let name;
|
|
4474
|
+
let emailAddress = null;
|
|
4475
|
+
const contactInfoParts = contactInfoString.split('<');
|
|
4476
|
+
const firstPartTrimmed = contactInfoParts[0].replace(/\u202c/g, '').trim();
|
|
4477
|
+
if (contactInfoParts.length > 1) {
|
|
4478
|
+
name = firstPartTrimmed;
|
|
4479
|
+
emailAddress = contactInfoParts[1].split('>')[0].replace(/\u202c/g, '').trim();
|
|
4480
|
+
} else {
|
|
4481
|
+
if (isValidEmail(firstPartTrimmed)) {
|
|
4482
|
+
emailAddress = firstPartTrimmed;
|
|
4483
|
+
} else {
|
|
4484
|
+
throw Object.assign(new Error('Invalid email address'), {
|
|
4485
|
+
firstPartTrimmed
|
|
4486
|
+
});
|
|
4487
|
+
}
|
|
4488
|
+
}
|
|
4489
|
+
return {
|
|
4490
|
+
name,
|
|
4491
|
+
emailAddress
|
|
4492
|
+
};
|
|
4493
|
+
}
|
|
4494
|
+
|
|
4495
|
+
/***/ }),
|
|
4496
|
+
|
|
4419
4497
|
/***/ 9060:
|
|
4420
4498
|
/***/ ((module) => {
|
|
4421
4499
|
|
|
@@ -14003,6 +14081,85 @@ function baseUnary(func) {
|
|
|
14003
14081
|
module.exports = baseUnary;
|
|
14004
14082
|
|
|
14005
14083
|
|
|
14084
|
+
/***/ }),
|
|
14085
|
+
|
|
14086
|
+
/***/ 7971:
|
|
14087
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14088
|
+
|
|
14089
|
+
var SetCache = __webpack_require__(1641),
|
|
14090
|
+
arrayIncludes = __webpack_require__(3271),
|
|
14091
|
+
arrayIncludesWith = __webpack_require__(7599),
|
|
14092
|
+
cacheHas = __webpack_require__(7585),
|
|
14093
|
+
createSet = __webpack_require__(7455),
|
|
14094
|
+
setToArray = __webpack_require__(5841);
|
|
14095
|
+
|
|
14096
|
+
/** Used as the size to enable large array optimizations. */
|
|
14097
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
14098
|
+
|
|
14099
|
+
/**
|
|
14100
|
+
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
|
|
14101
|
+
*
|
|
14102
|
+
* @private
|
|
14103
|
+
* @param {Array} array The array to inspect.
|
|
14104
|
+
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
14105
|
+
* @param {Function} [comparator] The comparator invoked per element.
|
|
14106
|
+
* @returns {Array} Returns the new duplicate free array.
|
|
14107
|
+
*/
|
|
14108
|
+
function baseUniq(array, iteratee, comparator) {
|
|
14109
|
+
var index = -1,
|
|
14110
|
+
includes = arrayIncludes,
|
|
14111
|
+
length = array.length,
|
|
14112
|
+
isCommon = true,
|
|
14113
|
+
result = [],
|
|
14114
|
+
seen = result;
|
|
14115
|
+
|
|
14116
|
+
if (comparator) {
|
|
14117
|
+
isCommon = false;
|
|
14118
|
+
includes = arrayIncludesWith;
|
|
14119
|
+
}
|
|
14120
|
+
else if (length >= LARGE_ARRAY_SIZE) {
|
|
14121
|
+
var set = iteratee ? null : createSet(array);
|
|
14122
|
+
if (set) {
|
|
14123
|
+
return setToArray(set);
|
|
14124
|
+
}
|
|
14125
|
+
isCommon = false;
|
|
14126
|
+
includes = cacheHas;
|
|
14127
|
+
seen = new SetCache;
|
|
14128
|
+
}
|
|
14129
|
+
else {
|
|
14130
|
+
seen = iteratee ? [] : result;
|
|
14131
|
+
}
|
|
14132
|
+
outer:
|
|
14133
|
+
while (++index < length) {
|
|
14134
|
+
var value = array[index],
|
|
14135
|
+
computed = iteratee ? iteratee(value) : value;
|
|
14136
|
+
|
|
14137
|
+
value = (comparator || value !== 0) ? value : 0;
|
|
14138
|
+
if (isCommon && computed === computed) {
|
|
14139
|
+
var seenIndex = seen.length;
|
|
14140
|
+
while (seenIndex--) {
|
|
14141
|
+
if (seen[seenIndex] === computed) {
|
|
14142
|
+
continue outer;
|
|
14143
|
+
}
|
|
14144
|
+
}
|
|
14145
|
+
if (iteratee) {
|
|
14146
|
+
seen.push(computed);
|
|
14147
|
+
}
|
|
14148
|
+
result.push(value);
|
|
14149
|
+
}
|
|
14150
|
+
else if (!includes(seen, computed, comparator)) {
|
|
14151
|
+
if (seen !== result) {
|
|
14152
|
+
seen.push(computed);
|
|
14153
|
+
}
|
|
14154
|
+
result.push(value);
|
|
14155
|
+
}
|
|
14156
|
+
}
|
|
14157
|
+
return result;
|
|
14158
|
+
}
|
|
14159
|
+
|
|
14160
|
+
module.exports = baseUniq;
|
|
14161
|
+
|
|
14162
|
+
|
|
14006
14163
|
/***/ }),
|
|
14007
14164
|
|
|
14008
14165
|
/***/ 4956:
|
|
@@ -14615,6 +14772,32 @@ function createFind(findIndexFunc) {
|
|
|
14615
14772
|
module.exports = createFind;
|
|
14616
14773
|
|
|
14617
14774
|
|
|
14775
|
+
/***/ }),
|
|
14776
|
+
|
|
14777
|
+
/***/ 7455:
|
|
14778
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14779
|
+
|
|
14780
|
+
var Set = __webpack_require__(5963),
|
|
14781
|
+
noop = __webpack_require__(1700),
|
|
14782
|
+
setToArray = __webpack_require__(5841);
|
|
14783
|
+
|
|
14784
|
+
/** Used as references for various `Number` constants. */
|
|
14785
|
+
var INFINITY = 1 / 0;
|
|
14786
|
+
|
|
14787
|
+
/**
|
|
14788
|
+
* Creates a set object of `values`.
|
|
14789
|
+
*
|
|
14790
|
+
* @private
|
|
14791
|
+
* @param {Array} values The values to add to the set.
|
|
14792
|
+
* @returns {Object} Returns the new set.
|
|
14793
|
+
*/
|
|
14794
|
+
var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
|
|
14795
|
+
return new Set(values);
|
|
14796
|
+
};
|
|
14797
|
+
|
|
14798
|
+
module.exports = createSet;
|
|
14799
|
+
|
|
14800
|
+
|
|
14618
14801
|
/***/ }),
|
|
14619
14802
|
|
|
14620
14803
|
/***/ 3009:
|
|
@@ -18757,6 +18940,44 @@ function toString(value) {
|
|
|
18757
18940
|
module.exports = toString;
|
|
18758
18941
|
|
|
18759
18942
|
|
|
18943
|
+
/***/ }),
|
|
18944
|
+
|
|
18945
|
+
/***/ 8496:
|
|
18946
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
18947
|
+
|
|
18948
|
+
var baseIteratee = __webpack_require__(7675),
|
|
18949
|
+
baseUniq = __webpack_require__(7971);
|
|
18950
|
+
|
|
18951
|
+
/**
|
|
18952
|
+
* This method is like `_.uniq` except that it accepts `iteratee` which is
|
|
18953
|
+
* invoked for each element in `array` to generate the criterion by which
|
|
18954
|
+
* uniqueness is computed. The order of result values is determined by the
|
|
18955
|
+
* order they occur in the array. The iteratee is invoked with one argument:
|
|
18956
|
+
* (value).
|
|
18957
|
+
*
|
|
18958
|
+
* @static
|
|
18959
|
+
* @memberOf _
|
|
18960
|
+
* @since 4.0.0
|
|
18961
|
+
* @category Array
|
|
18962
|
+
* @param {Array} array The array to inspect.
|
|
18963
|
+
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
18964
|
+
* @returns {Array} Returns the new duplicate free array.
|
|
18965
|
+
* @example
|
|
18966
|
+
*
|
|
18967
|
+
* _.uniqBy([2.1, 1.2, 2.3], Math.floor);
|
|
18968
|
+
* // => [2.1, 1.2]
|
|
18969
|
+
*
|
|
18970
|
+
* // The `_.property` iteratee shorthand.
|
|
18971
|
+
* _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
|
18972
|
+
* // => [{ 'x': 1 }, { 'x': 2 }]
|
|
18973
|
+
*/
|
|
18974
|
+
function uniqBy(array, iteratee) {
|
|
18975
|
+
return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
|
|
18976
|
+
}
|
|
18977
|
+
|
|
18978
|
+
module.exports = uniqBy;
|
|
18979
|
+
|
|
18980
|
+
|
|
18760
18981
|
/***/ }),
|
|
18761
18982
|
|
|
18762
18983
|
/***/ 2:
|