Integrate SFJS model management
This commit is contained in:
@@ -64,7 +64,7 @@ angular.module('app')
|
||||
return;
|
||||
}
|
||||
|
||||
if(!ModelManager.isMappingSourceRetrieved(source)) {
|
||||
if(!SFModelManager.isMappingSourceRetrieved(source)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -554,7 +554,7 @@ angular.module('app')
|
||||
|
||||
// Currently extensions are not notified of association until a full server sync completes.
|
||||
// We need a better system for this, but for now, we'll manually notify observers
|
||||
modelManager.notifySyncObserversOfModels([this.note], ModelManager.MappingSourceLocalSaved);
|
||||
modelManager.notifySyncObserversOfModels([this.note], SFModelManager.MappingSourceLocalSaved);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ angular.module('app')
|
||||
|
||||
// Currently extensions are not notified of association until a full server sync completes.
|
||||
// We need a better system for this, but for now, we'll manually notify observers
|
||||
modelManager.notifySyncObserversOfModels([this.note], ModelManager.MappingSourceLocalSaved);
|
||||
modelManager.notifySyncObserversOfModels([this.note], SFModelManager.MappingSourceLocalSaved);
|
||||
}
|
||||
|
||||
else if(action === "save-items" || action === "save-success" || action == "save-error") {
|
||||
|
||||
@@ -87,7 +87,8 @@ angular.module('app')
|
||||
}
|
||||
|
||||
function loadAllTag() {
|
||||
var allTag = new Tag({all: true, title: "All"});
|
||||
var allTag = new Tag({content: {title: "All"}});
|
||||
allTag.all = true;
|
||||
allTag.needsLoad = true;
|
||||
$scope.allTag = allTag;
|
||||
$scope.tags = modelManager.tags;
|
||||
@@ -95,7 +96,8 @@ angular.module('app')
|
||||
}
|
||||
|
||||
function loadArchivedTag() {
|
||||
var archiveTag = new Tag({archiveTag: true, title: "Archived"});
|
||||
var archiveTag = new Tag({content: {title: "Archived"}});
|
||||
archiveTag.archiveTag = true;
|
||||
$scope.archiveTag = archiveTag;
|
||||
$scope.archiveTag.notes = modelManager.notes;
|
||||
}
|
||||
@@ -115,8 +117,6 @@ angular.module('app')
|
||||
|
||||
for(var tagToRemove of toRemove) {
|
||||
note.removeItemAsRelationship(tagToRemove);
|
||||
tagToRemove.removeItemAsRelationship(note);
|
||||
tagToRemove.setDirty(true);
|
||||
}
|
||||
|
||||
var tags = [];
|
||||
@@ -128,7 +128,7 @@ angular.module('app')
|
||||
}
|
||||
|
||||
for(var tag of tags) {
|
||||
modelManager.createRelationshipBetweenItems(note, tag);
|
||||
note.addItemAsRelationship(tag);
|
||||
}
|
||||
|
||||
note.setDirty(true);
|
||||
@@ -190,7 +190,8 @@ angular.module('app')
|
||||
modelManager.addItem(note);
|
||||
|
||||
if(!$scope.selectedTag.all && !$scope.selectedTag.archiveTag) {
|
||||
modelManager.createRelationshipBetweenItems($scope.selectedTag, note);
|
||||
note.addItemAsRelationship($scope.selectedTag);
|
||||
note.setDirty(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -217,8 +217,9 @@ angular.module('app')
|
||||
|
||||
this.createNewNote = function() {
|
||||
var title = "New Note" + (this.tag.notes ? (" " + (this.tag.notes.length + 1)) : "");
|
||||
this.newNote = modelManager.createItem({content_type: "Note", dummy: true, text: ""});
|
||||
this.newNote.title = title;
|
||||
let newNote = modelManager.createItem({content_type: "Note", content: {text: "", title: title}});
|
||||
newNote.dummy = true;
|
||||
this.newNote = newNote;
|
||||
this.selectNote(this.newNote);
|
||||
this.addNew()(this.newNote);
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ class AccountMenu {
|
||||
|
||||
$scope.importJSONData = function(data, password, callback) {
|
||||
var onDataReady = function(errorCount) {
|
||||
var items = modelManager.mapResponseItemsToLocalModels(data.items, ModelManager.MappingSourceFileImport);
|
||||
var items = modelManager.mapResponseItemsToLocalModels(data.items, SFModelManager.MappingSourceFileImport);
|
||||
items.forEach(function(item){
|
||||
item.setDirty(true, true);
|
||||
item.deleted = false;
|
||||
|
||||
@@ -1,314 +0,0 @@
|
||||
let AppDomain = "org.standardnotes.sn";
|
||||
var dateFormatter;
|
||||
|
||||
class Item {
|
||||
|
||||
constructor(json_obj = {}) {
|
||||
this.appData = {};
|
||||
this.updateFromJSON(json_obj);
|
||||
this.observers = [];
|
||||
|
||||
if(!this.uuid) {
|
||||
this.uuid = SFJS.crypto.generateUUIDSync();
|
||||
}
|
||||
}
|
||||
|
||||
static sortItemsByDate(items) {
|
||||
items.sort(function(a,b){
|
||||
return new Date(b.created_at) - new Date(a.created_at);
|
||||
});
|
||||
}
|
||||
|
||||
get contentObject() {
|
||||
if(!this.content) {
|
||||
return {};
|
||||
}
|
||||
|
||||
if(this.content !== null && typeof this.content === 'object') {
|
||||
// this is the case when mapping localStorage content, in which case the content is already parsed
|
||||
return this.content;
|
||||
}
|
||||
|
||||
try {
|
||||
// console.log("Parsing json", this.content);
|
||||
this.content = JSON.parse(this.content);
|
||||
return this.content;
|
||||
} catch (e) {
|
||||
console.log("Error parsing json", e, this);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
updateFromJSON(json) {
|
||||
_.merge(this, json);
|
||||
|
||||
if(this.created_at) {
|
||||
this.created_at = new Date(this.created_at);
|
||||
this.updated_at = new Date(this.updated_at);
|
||||
} else {
|
||||
this.created_at = new Date();
|
||||
this.updated_at = new Date();
|
||||
}
|
||||
|
||||
// Allows the getter to be re-invoked
|
||||
this._client_updated_at = null;
|
||||
|
||||
if(json.content) {
|
||||
this.mapContentToLocalProperties(this.contentObject);
|
||||
} else if(json.deleted == true) {
|
||||
this.handleDeletedContent();
|
||||
}
|
||||
}
|
||||
|
||||
mapContentToLocalProperties(contentObj) {
|
||||
if(contentObj.appData) {
|
||||
this.appData = contentObj.appData;
|
||||
}
|
||||
if(!this.appData) { this.appData = {}; }
|
||||
}
|
||||
|
||||
createContentJSONFromProperties() {
|
||||
return this.structureParams();
|
||||
}
|
||||
|
||||
referenceParams() {
|
||||
// subclasses can override
|
||||
return this.contentObject.references || [];
|
||||
}
|
||||
|
||||
structureParams() {
|
||||
var params = this.contentObject;
|
||||
params.appData = this.appData;
|
||||
params.references = this.referenceParams();
|
||||
return params;
|
||||
}
|
||||
|
||||
refreshContentObject() {
|
||||
// Before an item can be duplicated or cloned, we must update this.content (if it is an object) with the object's
|
||||
// current physical properties, because updateFromJSON, which is what all new items must go through,
|
||||
// will call this.mapContentToLocalProperties(this.contentObject), which may have stale values if not explicitly updated.
|
||||
|
||||
this.content = this.structureParams();
|
||||
}
|
||||
|
||||
/* Allows the item to handle the case where the item is deleted and the content is null */
|
||||
handleDeletedContent() {
|
||||
// Subclasses can override
|
||||
}
|
||||
|
||||
setDirty(dirty, dontUpdateClientDate) {
|
||||
this.dirty = dirty;
|
||||
|
||||
// Allows the syncManager to check if an item has been marked dirty after a sync has been started
|
||||
// This prevents it from clearing it as a dirty item after sync completion, if someone else has marked it dirty
|
||||
// again after an ongoing sync.
|
||||
if(!this.dirtyCount) { this.dirtyCount = 0; }
|
||||
if(dirty) {
|
||||
this.dirtyCount++;
|
||||
} else {
|
||||
this.dirtyCount = 0;
|
||||
}
|
||||
|
||||
if(dirty && !dontUpdateClientDate) {
|
||||
// Set the client modified date to now if marking the item as dirty
|
||||
this.client_updated_at = new Date();
|
||||
} else if(!this.hasRawClientUpdatedAtValue()) {
|
||||
// copy updated_at
|
||||
this.client_updated_at = new Date(this.updated_at);
|
||||
}
|
||||
|
||||
if(dirty) {
|
||||
this.notifyObserversOfChange();
|
||||
}
|
||||
}
|
||||
|
||||
addObserver(observer, callback) {
|
||||
if(!_.find(this.observers, observer)) {
|
||||
this.observers.push({observer: observer, callback: callback});
|
||||
}
|
||||
}
|
||||
|
||||
removeObserver(observer) {
|
||||
_.remove(this.observers, {observer: observer})
|
||||
}
|
||||
|
||||
notifyObserversOfChange() {
|
||||
for(var observer of this.observers) {
|
||||
observer.callback(this);
|
||||
}
|
||||
}
|
||||
|
||||
addItemAsRelationship(item) {
|
||||
// must override
|
||||
}
|
||||
|
||||
removeItemAsRelationship(item) {
|
||||
// must override
|
||||
}
|
||||
|
||||
isBeingRemovedLocally() {
|
||||
|
||||
}
|
||||
|
||||
removeAndDirtyAllRelationships() {
|
||||
// must override
|
||||
this.setDirty(true);
|
||||
}
|
||||
|
||||
removeReferencesNotPresentIn(references) {
|
||||
|
||||
}
|
||||
|
||||
mergeMetadataFromItem(item) {
|
||||
_.merge(this, _.omit(item, ["content"]));
|
||||
}
|
||||
|
||||
informReferencesOfUUIDChange(oldUUID, newUUID) {
|
||||
// optional override
|
||||
}
|
||||
|
||||
potentialItemOfInterestHasChangedItsUUID(newItem, oldUUID, newUUID) {
|
||||
// optional override
|
||||
for(var reference of this.content.references) {
|
||||
if(reference.uuid == oldUUID) {
|
||||
reference.uuid = newUUID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
doNotEncrypt() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
App Data
|
||||
*/
|
||||
|
||||
setDomainDataItem(key, value, domain) {
|
||||
var data = this.appData[domain];
|
||||
if(!data) {
|
||||
data = {}
|
||||
}
|
||||
data[key] = value;
|
||||
this.appData[domain] = data;
|
||||
}
|
||||
|
||||
getDomainDataItem(key, domain) {
|
||||
var data = this.appData[domain];
|
||||
if(data) {
|
||||
return data[key];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
setAppDataItem(key, value) {
|
||||
this.setDomainDataItem(key, value, AppDomain);
|
||||
}
|
||||
|
||||
getAppDataItem(key) {
|
||||
return this.getDomainDataItem(key, AppDomain);
|
||||
}
|
||||
|
||||
get pinned() {
|
||||
return this.getAppDataItem("pinned");
|
||||
}
|
||||
|
||||
get archived() {
|
||||
return this.getAppDataItem("archived");
|
||||
}
|
||||
|
||||
get locked() {
|
||||
return this.getAppDataItem("locked");
|
||||
}
|
||||
|
||||
hasRawClientUpdatedAtValue() {
|
||||
return this.getAppDataItem("client_updated_at") != null;
|
||||
}
|
||||
|
||||
get client_updated_at() {
|
||||
if(!this._client_updated_at) {
|
||||
var saved = this.getAppDataItem("client_updated_at");
|
||||
if(saved) {
|
||||
this._client_updated_at = new Date(saved);
|
||||
} else {
|
||||
this._client_updated_at = new Date(this.updated_at);
|
||||
}
|
||||
}
|
||||
return this._client_updated_at;
|
||||
}
|
||||
|
||||
set client_updated_at(date) {
|
||||
this._client_updated_at = date;
|
||||
|
||||
this.setAppDataItem("client_updated_at", date);
|
||||
}
|
||||
|
||||
/*
|
||||
During sync conflicts, when determing whether to create a duplicate for an item, we can omit keys that have no
|
||||
meaningful weight and can be ignored. For example, if one component has active = true and another component has active = false,
|
||||
it would be silly to duplicate them, so instead we ignore this.
|
||||
*/
|
||||
keysToIgnoreWhenCheckingContentEquality() {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Same as above, but keys inside appData[AppDomain]
|
||||
appDataKeysToIgnoreWhenCheckingContentEquality() {
|
||||
return ["client_updated_at"];
|
||||
}
|
||||
|
||||
isItemContentEqualWith(otherItem) {
|
||||
let omit = (obj, keys) => {
|
||||
for(var key of keys) {
|
||||
delete obj[key];
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
var left = this.structureParams();
|
||||
left.appData[AppDomain] = omit(left.appData[AppDomain], this.appDataKeysToIgnoreWhenCheckingContentEquality());
|
||||
left = omit(left, this.keysToIgnoreWhenCheckingContentEquality());
|
||||
|
||||
var right = otherItem.structureParams();
|
||||
right.appData[AppDomain] = omit(right.appData[AppDomain], otherItem.appDataKeysToIgnoreWhenCheckingContentEquality());
|
||||
right = omit(right, otherItem.keysToIgnoreWhenCheckingContentEquality());
|
||||
|
||||
return JSON.stringify(left) === JSON.stringify(right)
|
||||
}
|
||||
|
||||
/*
|
||||
Dates
|
||||
*/
|
||||
|
||||
createdAtString() {
|
||||
return this.dateToLocalizedString(this.created_at);
|
||||
}
|
||||
|
||||
updatedAtString() {
|
||||
return this.dateToLocalizedString(this.client_updated_at);
|
||||
}
|
||||
|
||||
dateToLocalizedString(date) {
|
||||
if (typeof Intl !== 'undefined' && Intl.DateTimeFormat) {
|
||||
if (!dateFormatter) {
|
||||
var locale = (navigator.languages && navigator.languages.length) ? navigator.languages[0] : navigator.language;
|
||||
dateFormatter = new Intl.DateTimeFormat(locale, {
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: '2-digit',
|
||||
weekday: 'long',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
});
|
||||
}
|
||||
return dateFormatter.format(date);
|
||||
} else {
|
||||
// IE < 11, Safari <= 9.0.
|
||||
// In English, this generates the string most similar to
|
||||
// the toLocaleDateString() result above.
|
||||
return date.toDateString() + ' ' + date.toLocaleTimeString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
class Mfa extends Item {
|
||||
class Mfa extends SFItem {
|
||||
|
||||
constructor(json_obj) {
|
||||
super(json_obj);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ServerExtension extends Item {
|
||||
class ServerExtension extends SFItem {
|
||||
|
||||
constructor(json_obj) {
|
||||
super(json_obj);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Component extends Item {
|
||||
class Component extends SFItem {
|
||||
|
||||
constructor(json_obj) {
|
||||
// If making a copy of an existing component (usually during sign in if you have a component active in the session),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Editor extends Item {
|
||||
class Editor extends SFItem {
|
||||
|
||||
constructor(json_obj) {
|
||||
super(json_obj);
|
||||
@@ -68,18 +68,18 @@ class Editor extends Item {
|
||||
var uuids = references.map(function(ref){return ref.uuid});
|
||||
this.notes.forEach(function(note){
|
||||
if(!uuids.includes(note.uuid)) {
|
||||
_.pull(this.notes, note);
|
||||
_.remove(this.notes, {uuid: note.uuid});
|
||||
}
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
potentialItemOfInterestHasChangedItsUUID(newItem, oldUUID, newUUID) {
|
||||
if(newItem.content_type === "Note" && _.find(this.notes, {uuid: oldUUID})) {
|
||||
_.pull(this.notes, {uuid: oldUUID});
|
||||
_.remove(this.notes, {uuid: oldUUID});
|
||||
this.notes.push(newItem);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
toJSON() {
|
||||
return {uuid: this.uuid}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Note extends Item {
|
||||
export class Note extends SFItem {
|
||||
|
||||
constructor(json_obj) {
|
||||
super(json_obj);
|
||||
@@ -21,14 +21,6 @@ class Note extends Item {
|
||||
this.text = content.text;
|
||||
}
|
||||
|
||||
referenceParams() {
|
||||
var references = _.map(this.tags, function(tag){
|
||||
return {uuid: tag.uuid, content_type: tag.content_type};
|
||||
})
|
||||
|
||||
return references;
|
||||
}
|
||||
|
||||
structureParams() {
|
||||
var params = {
|
||||
title: this.title,
|
||||
@@ -44,8 +36,9 @@ class Note extends Item {
|
||||
this.savedTagsString = null;
|
||||
|
||||
if(item.content_type == "Tag") {
|
||||
if(!_.find(this.tags, item)) {
|
||||
if(!_.find(this.tags, {uuid: item.uuid})) {
|
||||
this.tags.push(item);
|
||||
item.notes.push(this);
|
||||
}
|
||||
}
|
||||
super.addItemAsRelationship(item);
|
||||
@@ -55,38 +48,29 @@ class Note extends Item {
|
||||
this.savedTagsString = null;
|
||||
|
||||
if(item.content_type == "Tag") {
|
||||
_.pull(this.tags, item);
|
||||
_.remove(this.tags, {uuid: item.uuid});
|
||||
_.remove(item.notes, {uuid: this.uuid});
|
||||
}
|
||||
super.removeItemAsRelationship(item);
|
||||
}
|
||||
|
||||
removeAndDirtyAllRelationships() {
|
||||
updateLocalRelationships() {
|
||||
this.savedTagsString = null;
|
||||
|
||||
this.tags.forEach(function(tag){
|
||||
_.pull(tag.notes, this);
|
||||
tag.setDirty(true);
|
||||
}.bind(this))
|
||||
this.tags = [];
|
||||
}
|
||||
|
||||
removeReferencesNotPresentIn(references) {
|
||||
this.savedTagsString = null;
|
||||
|
||||
super.removeReferencesNotPresentIn(references);
|
||||
var references = this.content.references;
|
||||
|
||||
var uuids = references.map(function(ref){return ref.uuid});
|
||||
this.tags.slice().forEach(function(tag){
|
||||
if(!uuids.includes(tag.uuid)) {
|
||||
_.pull(tag.notes, this);
|
||||
_.pull(this.tags, tag);
|
||||
_.remove(tag.notes, {uuid: this.uuid});
|
||||
_.remove(this.tags, {uuid: tag.uuid});
|
||||
}
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
isBeingRemovedLocally() {
|
||||
this.tags.forEach(function(tag){
|
||||
_.pull(tag.notes, this);
|
||||
_.remove(tag.notes, {uuid: this.uuid});
|
||||
}.bind(this))
|
||||
super.isBeingRemovedLocally();
|
||||
}
|
||||
@@ -99,7 +83,7 @@ class Note extends Item {
|
||||
informReferencesOfUUIDChange(oldUUID, newUUID) {
|
||||
super.informReferencesOfUUIDChange();
|
||||
for(var tag of this.tags) {
|
||||
_.pull(tag.notes, {uuid: oldUUID});
|
||||
_.remove(tag.notes, {uuid: oldUUID});
|
||||
tag.notes.push(this);
|
||||
}
|
||||
}
|
||||
@@ -116,10 +100,6 @@ class Note extends Item {
|
||||
return {uuid: this.uuid}
|
||||
}
|
||||
|
||||
get content_type() {
|
||||
return "Note";
|
||||
}
|
||||
|
||||
tagsString() {
|
||||
this.savedTagsString = Tag.arrayToDisplayString(this.tags);
|
||||
return this.savedTagsString;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Tag extends Item {
|
||||
export class Tag extends SFItem {
|
||||
|
||||
constructor(json_obj) {
|
||||
super(json_obj);
|
||||
@@ -13,14 +13,6 @@ class Tag extends Item {
|
||||
this.title = content.title;
|
||||
}
|
||||
|
||||
referenceParams() {
|
||||
var references = _.map(this.notes, function(note){
|
||||
return {uuid: note.uuid, content_type: note.content_type};
|
||||
})
|
||||
|
||||
return references;
|
||||
}
|
||||
|
||||
structureParams() {
|
||||
var params = {
|
||||
title: this.title
|
||||
@@ -31,59 +23,20 @@ class Tag extends Item {
|
||||
return superParams;
|
||||
}
|
||||
|
||||
addItemAsRelationship(item) {
|
||||
if(item.content_type == "Note") {
|
||||
if(!_.find(this.notes, item)) {
|
||||
this.notes.unshift(item);
|
||||
}
|
||||
}
|
||||
super.addItemAsRelationship(item);
|
||||
}
|
||||
|
||||
removeItemAsRelationship(item) {
|
||||
if(item.content_type == "Note") {
|
||||
_.pull(this.notes, item);
|
||||
}
|
||||
super.removeItemAsRelationship(item);
|
||||
}
|
||||
|
||||
removeAndDirtyAllRelationships() {
|
||||
this.notes.forEach(function(note){
|
||||
_.pull(note.tags, this);
|
||||
note.setDirty(true);
|
||||
}.bind(this))
|
||||
|
||||
this.notes = [];
|
||||
}
|
||||
|
||||
removeReferencesNotPresentIn(references) {
|
||||
var uuids = references.map(function(ref){return ref.uuid});
|
||||
this.notes.slice().forEach(function(note){
|
||||
if(!uuids.includes(note.uuid)) {
|
||||
_.pull(note.tags, this);
|
||||
_.pull(this.notes, note);
|
||||
}
|
||||
}.bind(this))
|
||||
}
|
||||
|
||||
isBeingRemovedLocally() {
|
||||
this.notes.forEach(function(note){
|
||||
_.pull(note.tags, this);
|
||||
_.remove(note.tags, {uuid: this.uuid});
|
||||
}.bind(this))
|
||||
super.isBeingRemovedLocally();
|
||||
}
|
||||
|
||||
informReferencesOfUUIDChange(oldUUID, newUUID) {
|
||||
for(var note of this.notes) {
|
||||
_.pull(note.tags, {uuid: oldUUID});
|
||||
_.remove(note.tags, {uuid: oldUUID});
|
||||
note.tags.push(this);
|
||||
}
|
||||
}
|
||||
|
||||
get content_type() {
|
||||
return "Tag";
|
||||
}
|
||||
|
||||
static arrayToDisplayString(tags) {
|
||||
return tags.sort((a, b) => {return a.title > b.title}).map(function(tag, i){
|
||||
return "#" + tag.title;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class EncryptedStorage extends Item {
|
||||
class EncryptedStorage extends SFItem {
|
||||
|
||||
constructor(json_obj) {
|
||||
super(json_obj);
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
class ItemParams {
|
||||
|
||||
constructor(item, keys, version) {
|
||||
this.item = item;
|
||||
this.keys = keys;
|
||||
this.version = version || SFJS.version();
|
||||
}
|
||||
|
||||
async paramsForExportFile(includeDeleted) {
|
||||
this.additionalFields = ["updated_at"];
|
||||
this.forExportFile = true;
|
||||
if(includeDeleted) {
|
||||
return this.__params();
|
||||
} else {
|
||||
var result = await this.__params();
|
||||
return _.omit(result, ["deleted"]);
|
||||
}
|
||||
}
|
||||
|
||||
async paramsForExtension() {
|
||||
return this.paramsForExportFile();
|
||||
}
|
||||
|
||||
async paramsForLocalStorage() {
|
||||
this.additionalFields = ["updated_at", "dirty", "errorDecrypting"];
|
||||
this.forExportFile = true;
|
||||
return this.__params();
|
||||
}
|
||||
|
||||
async paramsForSync() {
|
||||
return this.__params();
|
||||
}
|
||||
|
||||
async __params() {
|
||||
|
||||
console.assert(!this.item.dummy, "Item is dummy, should not have gotten here.", this.item.dummy)
|
||||
|
||||
var params = {uuid: this.item.uuid, content_type: this.item.content_type, deleted: this.item.deleted, created_at: this.item.created_at};
|
||||
if(!this.item.errorDecrypting) {
|
||||
// Items should always be encrypted for export files. Only respect item.doNotEncrypt for remote sync params.
|
||||
var doNotEncrypt = this.item.doNotEncrypt() && !this.forExportFile;
|
||||
if(this.keys && !doNotEncrypt) {
|
||||
var encryptedParams = await SFJS.itemTransformer.encryptItem(this.item, this.keys, this.version);
|
||||
_.merge(params, encryptedParams);
|
||||
|
||||
if(this.version !== "001") {
|
||||
params.auth_hash = null;
|
||||
}
|
||||
}
|
||||
else {
|
||||
params.content = this.forExportFile ? this.item.createContentJSONFromProperties() : "000" + await SFJS.crypto.base64(JSON.stringify(this.item.createContentJSONFromProperties()));
|
||||
if(!this.forExportFile) {
|
||||
params.enc_item_key = null;
|
||||
params.auth_hash = null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Error decrypting, keep "content" and related fields as is (and do not try to encrypt, otherwise that would be undefined behavior)
|
||||
params.content = this.item.content;
|
||||
params.enc_item_key = this.item.enc_item_key;
|
||||
params.auth_hash = this.item.auth_hash;
|
||||
}
|
||||
|
||||
if(this.additionalFields) {
|
||||
_.merge(params, _.pick(this.item, this.additionalFields));
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -74,7 +74,7 @@ class ActionsManager {
|
||||
|
||||
if(!item.errorDecrypting) {
|
||||
if(merge) {
|
||||
var items = this.modelManager.mapResponseItemsToLocalModels([item], ModelManager.MappingSourceRemoteActionRetrieved);
|
||||
var items = this.modelManager.mapResponseItemsToLocalModels([item], SFModelManager.MappingSourceRemoteActionRetrieved);
|
||||
for(var mappedItem of items) {
|
||||
mappedItem.setDirty(true);
|
||||
}
|
||||
@@ -179,7 +179,7 @@ class ActionsManager {
|
||||
if(decrypted) {
|
||||
keys = null;
|
||||
}
|
||||
var itemParams = new ItemParams(item, keys, this.authManager.protocolVersion());
|
||||
var itemParams = new SFItemParams(item, keys, this.authManager.protocolVersion());
|
||||
return itemParams.paramsForExtension();
|
||||
}
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ angular.module('app')
|
||||
this.userPreferencesDidChange();
|
||||
}, (valueCallback) => {
|
||||
// Safe to create. Create and return object.
|
||||
var prefs = new Item({content_type: prefsContentType});
|
||||
var prefs = new SFItem({content_type: prefsContentType});
|
||||
modelManager.addItem(prefs);
|
||||
prefs.setDirty(true);
|
||||
$rootScope.sync("authManager singletonCreate");
|
||||
|
||||
@@ -53,13 +53,13 @@ class ComponentManager {
|
||||
|
||||
/* If the source of these new or updated items is from a Component itself saving items, we don't need to notify
|
||||
components again of the same item. Regarding notifying other components than the issuing component, other mapping sources
|
||||
will take care of that, like ModelManager.MappingSourceRemoteSaved
|
||||
will take care of that, like SFModelManager.MappingSourceRemoteSaved
|
||||
|
||||
Update: We will now check sourceKey to determine whether the incoming change should be sent to
|
||||
a component. If sourceKey == component.uuid, it will be skipped. This way, if one component triggers a change,
|
||||
it's sent to other components.
|
||||
*/
|
||||
// if(source == ModelManager.MappingSourceComponentRetrieved) {
|
||||
// if(source == SFModelManager.MappingSourceComponentRetrieved) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
@@ -70,7 +70,7 @@ class ComponentManager {
|
||||
/* We only want to sync if the item source is Retrieved, not MappingSourceRemoteSaved to avoid
|
||||
recursion caused by the component being modified and saved after it is updated.
|
||||
*/
|
||||
if(syncedComponents.length > 0 && source != ModelManager.MappingSourceRemoteSaved) {
|
||||
if(syncedComponents.length > 0 && source != SFModelManager.MappingSourceRemoteSaved) {
|
||||
// Ensure any component in our data is installed by the system
|
||||
this.desktopManager.syncComponentsInstallation(syncedComponents);
|
||||
}
|
||||
@@ -195,11 +195,11 @@ class ComponentManager {
|
||||
/* This means the this function is being triggered through a remote Saving response, which should not update
|
||||
actual local content values. The reason is, Save responses may be delayed, and a user may have changed some values
|
||||
in between the Save was initiated, and the time it completes. So we only want to update actual content values (and not just metadata)
|
||||
when its another source, like ModelManager.MappingSourceRemoteRetrieved.
|
||||
when its another source, like SFModelManager.MappingSourceRemoteRetrieved.
|
||||
|
||||
3/7/18: Add MappingSourceLocalSaved as well to handle fully offline saving. github.com/standardnotes/forum/issues/169
|
||||
*/
|
||||
if(source && (source == ModelManager.MappingSourceRemoteSaved || source == ModelManager.MappingSourceLocalSaved)) {
|
||||
if(source && (source == SFModelManager.MappingSourceRemoteSaved || source == SFModelManager.MappingSourceLocalSaved)) {
|
||||
params.isMetadataUpdate = true;
|
||||
}
|
||||
this.removePrivatePropertiesFromResponseItems([params], component);
|
||||
@@ -468,7 +468,7 @@ class ComponentManager {
|
||||
We map the items here because modelManager is what updates the UI. If you were to instead get the items directly,
|
||||
this would update them server side via sync, but would never make its way back to the UI.
|
||||
*/
|
||||
var localItems = this.modelManager.mapResponseItemsToLocalModels(responseItems, ModelManager.MappingSourceComponentRetrieved, component.uuid);
|
||||
var localItems = this.modelManager.mapResponseItemsToLocalModels(responseItems, SFModelManager.MappingSourceComponentRetrieved, component.uuid);
|
||||
|
||||
for(var item of localItems) {
|
||||
var responseItem = _.find(responseItems, {uuid: item.uuid});
|
||||
|
||||
@@ -37,7 +37,7 @@ class DesktopManager {
|
||||
Keys are not passed into ItemParams, so the result is not encrypted
|
||||
*/
|
||||
async convertComponentForTransmission(component) {
|
||||
return new ItemParams(component).paramsForExportFile(true);
|
||||
return new SFItemParams(component).paramsForExportFile(true);
|
||||
}
|
||||
|
||||
// All `components` should be installed
|
||||
@@ -96,7 +96,7 @@ class DesktopManager {
|
||||
for(var key of permissableKeys) {
|
||||
component[key] = componentData.content[key];
|
||||
}
|
||||
this.modelManager.notifySyncObserversOfModels([component], ModelManager.MappingSourceDesktopInstalled);
|
||||
this.modelManager.notifySyncObserversOfModels([component], SFModelManager.MappingSourceDesktopInstalled);
|
||||
component.setAppDataItem("installError", null);
|
||||
}
|
||||
component.setDirty(true);
|
||||
|
||||
@@ -36,9 +36,11 @@ class MigrationManager {
|
||||
if(editor.url && !this.componentManager.componentForUrl(editor.url)) {
|
||||
var component = this.modelManager.createItem({
|
||||
content_type: "SN|Component",
|
||||
url: editor.url,
|
||||
name: editor.name,
|
||||
area: "editor-editor"
|
||||
content: {
|
||||
url: editor.url,
|
||||
name: editor.name,
|
||||
area: "editor-editor"
|
||||
}
|
||||
})
|
||||
component.setAppDataItem("data", editor.data);
|
||||
component.setDirty(true);
|
||||
|
||||
@@ -1,10 +1,25 @@
|
||||
class ModelManager {
|
||||
SFModelManager.ContentTypeClassMapping = {
|
||||
"Note" : Note,
|
||||
"Tag" : Tag,
|
||||
"Extension" : Extension,
|
||||
"SN|Editor" : Editor,
|
||||
"SN|Theme" : Theme,
|
||||
"SN|Component" : Component,
|
||||
"SF|Extension" : ServerExtension,
|
||||
"SF|MFA" : Mfa
|
||||
};
|
||||
|
||||
SFItem.AppDomain = "org.standardnotes.sn";
|
||||
|
||||
class ModelManager extends SFModelManager {
|
||||
|
||||
constructor(storageManager) {
|
||||
super(storageManager);
|
||||
super();
|
||||
this.notes = [];
|
||||
this.tags = [];
|
||||
this._extensions = [];
|
||||
|
||||
this.storageManager = storageManager;
|
||||
}
|
||||
|
||||
resetLocalMemory() {
|
||||
@@ -17,7 +32,7 @@ class ModelManager {
|
||||
findOrCreateTagByTitle(title) {
|
||||
var tag = _.find(this.tags, {title: title})
|
||||
if(!tag) {
|
||||
tag = this.createItem({content_type: "Tag", title: title});
|
||||
tag = this.createItem({content_type: "Tag", content: {title: title}});
|
||||
this.addItem(tag);
|
||||
}
|
||||
return tag;
|
||||
@@ -86,6 +101,8 @@ class ModelManager {
|
||||
} else if(item.content_type == "Extension") {
|
||||
_.pull(this._extensions, item);
|
||||
}
|
||||
|
||||
this.storageManager.deleteModel(item, callback);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -153,7 +153,7 @@ class StorageManager {
|
||||
encryptedStorage.storage = this.storageAsHash();
|
||||
|
||||
// Save new encrypted storage in Fixed storage
|
||||
var params = new ItemParams(encryptedStorage, this.encryptedStorageKeys, this.encryptedStorageAuthParams.version);
|
||||
var params = new SFItemParams(encryptedStorage, this.encryptedStorageKeys, this.encryptedStorageAuthParams.version);
|
||||
params.paramsForSync().then((syncParams) => {
|
||||
this.setItem("encryptedStorage", JSON.stringify(syncParams), StorageManager.Fixed);
|
||||
})
|
||||
|
||||
@@ -48,7 +48,7 @@ class SyncManager {
|
||||
var keys = this.authManager.offline() ? this.passcodeManager.keys() : this.authManager.keys();
|
||||
|
||||
Promise.all(items.map(async (item) => {
|
||||
var itemParams = new ItemParams(item, keys, version);
|
||||
var itemParams = new SFItemParams(item, keys, version);
|
||||
itemParams = await itemParams.paramsForLocalStorage();
|
||||
if(offlineOnly) {
|
||||
delete itemParams.dirty;
|
||||
@@ -79,13 +79,13 @@ class SyncManager {
|
||||
var processed = [];
|
||||
|
||||
var completion = () => {
|
||||
Item.sortItemsByDate(processed);
|
||||
SFItem.sortItemsByDate(processed);
|
||||
callback(processed);
|
||||
}
|
||||
|
||||
var decryptNext = async () => {
|
||||
var subitems = items.slice(current, current + iteration);
|
||||
var processedSubitems = await this.handleItemsResponse(subitems, null, ModelManager.MappingSourceLocalRetrieved);
|
||||
var processedSubitems = await this.handleItemsResponse(subitems, null, SFModelManager.MappingSourceLocalRetrieved);
|
||||
processed.push(processedSubitems);
|
||||
|
||||
current += subitems.length;
|
||||
@@ -93,6 +93,7 @@ class SyncManager {
|
||||
if(current < total) {
|
||||
this.$timeout(() => { decryptNext(); });
|
||||
} else {
|
||||
// this.modelManager.resolveReferencesForAllItems()
|
||||
completion();
|
||||
}
|
||||
}
|
||||
@@ -341,7 +342,7 @@ class SyncManager {
|
||||
params.limit = 150;
|
||||
|
||||
await Promise.all(subItems.map((item) => {
|
||||
var itemParams = new ItemParams(item, keys, version);
|
||||
var itemParams = new SFItemParams(item, keys, version);
|
||||
itemParams.additionalFields = options.additionalFields;
|
||||
return itemParams.paramsForSync();
|
||||
})).then((itemsParams) => {
|
||||
@@ -386,7 +387,7 @@ class SyncManager {
|
||||
|
||||
// Map retrieved items to local data
|
||||
// Note that deleted items will not be returned
|
||||
var retrieved = await this.handleItemsResponse(response.retrieved_items, null, ModelManager.MappingSourceRemoteRetrieved);
|
||||
var retrieved = await this.handleItemsResponse(response.retrieved_items, null, SFModelManager.MappingSourceRemoteRetrieved);
|
||||
|
||||
// Append items to master list of retrieved items for this ongoing sync operation
|
||||
this.allRetreivedItems = this.allRetreivedItems.concat(retrieved);
|
||||
@@ -397,7 +398,7 @@ class SyncManager {
|
||||
var omitFields = ["content", "auth_hash"];
|
||||
|
||||
// Map saved items to local data
|
||||
var saved = await this.handleItemsResponse(response.saved_items, omitFields, ModelManager.MappingSourceRemoteSaved);
|
||||
var saved = await this.handleItemsResponse(response.saved_items, omitFields, SFModelManager.MappingSourceRemoteSaved);
|
||||
|
||||
// Append items to master list of saved items for this ongoing sync operation
|
||||
this.allSavedItems = this.allSavedItems.concat(saved);
|
||||
@@ -504,7 +505,7 @@ class SyncManager {
|
||||
refreshErroredItems() {
|
||||
var erroredItems = this.modelManager.allItems.filter((item) => {return item.errorDecrypting == true});
|
||||
if(erroredItems.length > 0) {
|
||||
this.handleItemsResponse(erroredItems, null, ModelManager.MappingSourceLocalRetrieved);
|
||||
this.handleItemsResponse(erroredItems, null, SFModelManager.MappingSourceLocalRetrieved);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
3697
package-lock.json
generated
3697
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@
|
||||
"karma-jasmine": "^1.1.0",
|
||||
"karma-phantomjs-launcher": "^1.0.2",
|
||||
"sn-stylekit": "1.0.15",
|
||||
"standard-file-js": "0.3.1"
|
||||
"standard-file-js": "file:~/Desktop/sf/sfjs"
|
||||
},
|
||||
"license": "GPL-3.0"
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
require 'test_helper'
|
||||
|
||||
class ApikeyControllerTest < ActionController::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
@@ -1,7 +0,0 @@
|
||||
require 'test_helper'
|
||||
|
||||
class NamesControllerTest < ActionController::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
@@ -1,7 +0,0 @@
|
||||
require 'test_helper'
|
||||
|
||||
class ProtoControllerTest < ActionController::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
0
test/fixtures/.keep
vendored
0
test/fixtures/.keep
vendored
7
test/fixtures/api_keys.yml
vendored
7
test/fixtures/api_keys.yml
vendored
@@ -1,7 +0,0 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
access_token: MyString
|
||||
|
||||
two:
|
||||
access_token: MyString
|
||||
7
test/fixtures/names.yml
vendored
7
test/fixtures/names.yml
vendored
@@ -1,7 +0,0 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
text: MyString
|
||||
|
||||
two:
|
||||
text: MyString
|
||||
137
test/javascripts/mocha.js
Normal file
137
test/javascripts/mocha.js
Normal file
@@ -0,0 +1,137 @@
|
||||
describe("notes and tags", () => {
|
||||
const getNoteParams = () => {
|
||||
var params = {
|
||||
uuid: SFJS.crypto.generateUUIDSync(),
|
||||
content_type: "Note",
|
||||
content: {
|
||||
title: "hello",
|
||||
text: "world"
|
||||
}
|
||||
};
|
||||
return params;
|
||||
}
|
||||
|
||||
const createRelatedNoteTagPair = () => {
|
||||
let noteParams = getNoteParams();
|
||||
let tagParams = {
|
||||
uuid: SFJS.crypto.generateUUIDSync(),
|
||||
content_type: "Tag",
|
||||
content: {
|
||||
title: "thoughts",
|
||||
}
|
||||
};
|
||||
noteParams.content.references = [
|
||||
{
|
||||
uuid: tagParams.uuid,
|
||||
content_type: tagParams.content_type
|
||||
}
|
||||
]
|
||||
|
||||
tagParams.content.references = [
|
||||
{
|
||||
uuid: noteParams.uuid,
|
||||
content_type: noteParams.content_type
|
||||
}
|
||||
]
|
||||
|
||||
return [noteParams, tagParams];
|
||||
}
|
||||
|
||||
it('uses proper class for note', () => {
|
||||
let modelManager = createModelManager();
|
||||
let noteParams = getNoteParams();
|
||||
modelManager.mapResponseItemsToLocalModels([noteParams]);
|
||||
let note = modelManager.allItemsMatchingTypes(["Note"])[0];
|
||||
expect(note).to.be.an.instanceOf(Note);
|
||||
});
|
||||
|
||||
it('creates two-way relationship between note and tag', () => {
|
||||
let modelManager = createModelManager();
|
||||
|
||||
let pair = createRelatedNoteTagPair();
|
||||
let noteParams = pair[0];
|
||||
let tagParams = pair[1];
|
||||
|
||||
expect(tagParams.content.references.length).to.equal(1);
|
||||
expect(tagParams.content.references.length).to.equal(1);
|
||||
|
||||
modelManager.mapResponseItemsToLocalModels([noteParams, tagParams]);
|
||||
let note = modelManager.allItemsMatchingTypes(["Note"])[0];
|
||||
let tag = modelManager.allItemsMatchingTypes(["Tag"])[0];
|
||||
|
||||
// expect to be false
|
||||
expect(note.dirty).to.not.be.ok;
|
||||
expect(tag.dirty).to.not.be.ok;
|
||||
|
||||
expect(note).to.not.be.null;
|
||||
expect(tag).to.not.be.null;
|
||||
|
||||
expect(note.content.references.length).to.equal(1);
|
||||
expect(tag.content.references.length).to.equal(1);
|
||||
|
||||
expect(note.hasRelationshipWithItem(tag)).to.equal(true);
|
||||
expect(tag.hasRelationshipWithItem(note)).to.equal(true);
|
||||
|
||||
expect(note.tags.length).to.equal(1);
|
||||
expect(tag.notes.length).to.equal(1);
|
||||
|
||||
modelManager.setItemToBeDeleted(note);
|
||||
expect(note.tags.length).to.equal(0);
|
||||
expect(tag.notes.length).to.equal(0);
|
||||
|
||||
// expect to be true
|
||||
expect(note.dirty).to.be.ok;
|
||||
expect(tag.dirty).to.be.ok;
|
||||
});
|
||||
|
||||
it('handles remote deletion of relationship', () => {
|
||||
let modelManager = createModelManager();
|
||||
|
||||
let pair = createRelatedNoteTagPair();
|
||||
let noteParams = pair[0];
|
||||
let tagParams = pair[1];
|
||||
|
||||
modelManager.mapResponseItemsToLocalModels([noteParams, tagParams]);
|
||||
let note = modelManager.allItemsMatchingTypes(["Note"])[0];
|
||||
let tag = modelManager.allItemsMatchingTypes(["Tag"])[0];
|
||||
|
||||
expect(note.content.references.length).to.equal(1);
|
||||
expect(tag.content.references.length).to.equal(1);
|
||||
|
||||
noteParams.content.references = [];
|
||||
modelManager.mapResponseItemsToLocalModels([noteParams]);
|
||||
|
||||
expect(note.content.references.length).to.equal(0);
|
||||
expect(note.tags.length).to.equal(0);
|
||||
expect(tag.notes.length).to.equal(0);
|
||||
|
||||
// expect to be false
|
||||
expect(note.dirty).to.not.be.ok;
|
||||
expect(tag.dirty).to.not.be.ok;
|
||||
});
|
||||
|
||||
it('properly handles duplication', () => {
|
||||
let modelManager = createModelManager();
|
||||
|
||||
let pair = createRelatedNoteTagPair();
|
||||
let noteParams = pair[0];
|
||||
let tagParams = pair[1];
|
||||
|
||||
modelManager.mapResponseItemsToLocalModels([noteParams, tagParams]);
|
||||
let note = modelManager.allItemsMatchingTypes(["Note"])[0];
|
||||
let tag = modelManager.allItemsMatchingTypes(["Tag"])[0];
|
||||
|
||||
var duplicateNote = modelManager.createDuplicateItem(note);
|
||||
expect(note.uuid).to.equal(duplicateNote.uuid);
|
||||
|
||||
expect(duplicateNote.content.references.length).to.equal(1);
|
||||
expect(duplicateNote.tags.length).to.equal(1);
|
||||
|
||||
expect(tag.content.references.length).to.equal(1);
|
||||
expect(tag.notes.length).to.equal(1);
|
||||
|
||||
// expect to be false
|
||||
expect(note.dirty).to.not.be.ok;
|
||||
expect(tag.dirty).to.not.be.ok;
|
||||
});
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
require 'test_helper'
|
||||
|
||||
class ApiKeyTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
@@ -1,7 +0,0 @@
|
||||
require 'test_helper'
|
||||
|
||||
class NameTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @license
|
||||
* Lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash include="includes,merge,filter,map,remove,find,omit,pull,cloneDeep,pick,uniq,sortedIndexBy"`
|
||||
* Build: `lodash include="includes,merge,filter,map,remove,find,omit,pull,cloneDeep,pick,uniq,sortedIndexBy,mergeWith"`
|
||||
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
@@ -4890,6 +4890,41 @@
|
||||
baseMerge(object, source, srcIndex);
|
||||
});
|
||||
|
||||
/**
|
||||
* This method is like `_.merge` except that it accepts `customizer` which
|
||||
* is invoked to produce the merged values of the destination and source
|
||||
* properties. If `customizer` returns `undefined`, merging is handled by the
|
||||
* method instead. The `customizer` is invoked with six arguments:
|
||||
* (objValue, srcValue, key, object, source, stack).
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Object
|
||||
* @param {Object} object The destination object.
|
||||
* @param {...Object} sources The source objects.
|
||||
* @param {Function} customizer The function to customize assigned values.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function customizer(objValue, srcValue) {
|
||||
* if (_.isArray(objValue)) {
|
||||
* return objValue.concat(srcValue);
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* var object = { 'a': [1], 'b': [2] };
|
||||
* var other = { 'a': [3], 'b': [4] };
|
||||
*
|
||||
* _.mergeWith(object, other, customizer);
|
||||
* // => { 'a': [1, 3], 'b': [2, 4] }
|
||||
*/
|
||||
var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
|
||||
baseMerge(object, source, srcIndex, customizer);
|
||||
});
|
||||
|
||||
/**
|
||||
* The opposite of `_.pick`; this method creates an object composed of the
|
||||
* own and inherited enumerable property paths of `object` that are not omitted.
|
||||
@@ -5169,6 +5204,7 @@
|
||||
lodash.map = map;
|
||||
lodash.memoize = memoize;
|
||||
lodash.merge = merge;
|
||||
lodash.mergeWith = mergeWith;
|
||||
lodash.omit = omit;
|
||||
lodash.pick = pick;
|
||||
lodash.property = property;
|
||||
|
||||
@@ -1,50 +1,51 @@
|
||||
/**
|
||||
* @license
|
||||
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* Build: `lodash include="includes,merge,filter,map,remove,find,omit,pull,cloneDeep,pick,uniq,sortedIndexBy"`
|
||||
* Build: `lodash include="includes,merge,filter,map,remove,find,omit,pull,cloneDeep,pick,uniq,sortedIndexBy,mergeWith"`
|
||||
*/
|
||||
;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n){for(var r=-1,e=null==t?0:t.length;++r<e&&n(t[r],r,t)!==false;);return t}function u(t,n){for(var r=-1,e=null==t?0:t.length,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function o(t,n){return!!(null==t?0:t.length)&&h(t,n,0)>-1;
|
||||
}function i(t,n,r){for(var e=-1,u=null==t?0:t.length;++e<u;)if(r(n,t[e]))return true;return false}function c(t,n){for(var r=-1,e=null==t?0:t.length,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function f(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function a(t,n,r,e){var u=-1,o=null==t?0:t.length;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function l(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(n(t[r],r,t))return true;return false}function s(t,n,r,e){for(var u=t.length,o=r+(e?1:-1);e?o--:++o<u;)if(n(t[o],o,t))return o;
|
||||
return-1}function h(t,n,r){return n===n?A(t,n,r):s(t,p,r)}function v(t,n,r,e){for(var u=r-1,o=t.length;++u<o;)if(e(t[u],n))return u;return-1}function p(t){return t!==t}function y(t){return function(n){return null==n?Or:n[t]}}function g(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function b(t){return function(n){return t(n)}}function _(t,n){return c(n,function(n){return t[n]})}function d(t,n){return t.has(n)}function j(t,n){return null==t?Or:t[n]}function w(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){
|
||||
r[++n]=[e,t]}),r}function O(t,n){return function(r){return t(n(r))}}function m(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function A(t,n,r){for(var e=r-1,u=t.length;++e<u;)if(t[e]===n)return e;return-1}function z(){}function x(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function S(){this.__data__=Ou?Ou(null):{},this.size=0}function k(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}function $(t){var n=this.__data__;
|
||||
if(Ou){var r=n[t];return r===xr?Or:r}return Je.call(n,t)?n[t]:Or}function I(t){var n=this.__data__;return Ou?n[t]!==Or:Je.call(n,t)}function L(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ou&&n===Or?xr:n,this}function P(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function E(){this.__data__=[],this.size=0}function F(t){var n=this.__data__,r=rt(n,t);return!(r<0)&&(r==n.length-1?n.pop():iu.call(n,r,1),--this.size,true)}function B(t){var n=this.__data__,r=rt(n,t);
|
||||
return r<0?Or:n[r][1]}function M(t){return rt(this.__data__,t)>-1}function T(t,n){var r=this.__data__,e=rt(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this}function U(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function N(){this.size=0,this.__data__={hash:new x,map:new(_u||P),string:new x}}function C(t){var n=hn(this,t).delete(t);return this.size-=n?1:0,n}function D(t){return hn(this,t).get(t)}function R(t){return hn(this,t).has(t)}function V(t,n){
|
||||
var r=hn(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this}function q(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new U;++n<r;)this.add(t[n])}function W(t){return this.__data__.set(t,xr),this}function G(t){return this.__data__.has(t)}function H(t){this.size=(this.__data__=new P(t)).size}function J(){this.__data__=new P,this.size=0}function K(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}function Q(t){return this.__data__.get(t)}function X(t){return this.__data__.has(t);
|
||||
}function Y(t,n){var r=this.__data__;if(r instanceof P){var e=r.__data__;if(!_u||e.length<Ar-1)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new U(e)}return r.set(t,n),this.size=r.size,this}function Z(t,n){var r=qu(t),e=!r&&Vu(t),u=!r&&!e&&Wu(t),o=!r&&!e&&!u&&Gu(t),i=r||e||u||o,c=i?g(t.length,String):[],f=c.length;for(var a in t)!n&&!Je.call(t,a)||i&&("length"==a||u&&("offset"==a||"parent"==a)||o&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||wn(a,f))||c.push(a);return c}function tt(t,n,r){
|
||||
(r===Or||Kn(t[n],r))&&(r!==Or||n in t)||ot(t,n,r)}function nt(t,n,r){var e=t[n];Je.call(t,n)&&Kn(e,r)&&(r!==Or||n in t)||ot(t,n,r)}function rt(t,n){for(var r=t.length;r--;)if(Kn(t[r][0],n))return r;return-1}function et(t,n){return t&&Qt(n,hr(n),t)}function ut(t,n){return t&&Qt(n,vr(n),t)}function ot(t,n,r){"__proto__"==n&&au?au(t,n,{configurable:true,enumerable:true,value:r,writable:true}):t[n]=r}function it(t,n,r,u,o,i){var c,f=n&kr,a=n&$r,l=n&Ir;if(r&&(c=o?r(t,u,o,i):r(t)),c!==Or)return c;if(!tr(t))return t;
|
||||
var s=qu(t);if(s){if(c=bn(t),!f)return Kt(t,c)}else{var h=Uu(t),v=h==Hr||h==Jr;if(Wu(t))return Dt(t,f);if(h==Yr||h==Dr||v&&!o){if(c=a||v?{}:_n(t),!f)return a?Yt(t,ut(c,t)):Xt(t,et(c,t))}else{if(!Pe[h])return o?t:{};c=dn(t,h,it,f)}}i||(i=new H);var p=i.get(t);if(p)return p;i.set(t,c);var y=l?a?ln:an:a?vr:hr,g=s?Or:y(t);return e(g||t,function(e,u){g&&(u=e,e=t[u]),nt(c,u,it(e,n,r,u,t,i))}),c}function ct(t,n){var r=[];return Pu(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function ft(t,n,r,e,u){var o=-1,i=t.length;
|
||||
for(r||(r=jn),u||(u=[]);++o<i;){var c=t[o];n>0&&r(c)?n>1?ft(c,n-1,r,e,u):f(u,c):e||(u[u.length]=c)}return u}function at(t,n){return t&&Eu(t,n,hr)}function lt(t,n){n=Ct(n,t);for(var r=0,e=n.length;null!=t&&r<e;)t=t[Bn(n[r++])];return r&&r==e?t:Or}function st(t,n,r){var e=n(t);return qu(t)?e:f(e,r(t))}function ht(t){return null==t?t===Or?oe:Xr:fu&&fu in Object(t)?yn(t):Ln(t)}function vt(t,n){return null!=t&&n in Object(t)}function pt(t){return nr(t)&&ht(t)==Dr}function yt(t,n,r,e,u){return t===n||(null==t||null==n||!nr(t)&&!nr(n)?t!==t&&n!==n:gt(t,n,r,e,yt,u));
|
||||
}function gt(t,n,r,e,u,o){var i=qu(t),c=qu(n),f=i?Rr:Uu(t),a=c?Rr:Uu(n);f=f==Dr?Yr:f,a=a==Dr?Yr:a;var l=f==Yr,s=a==Yr,h=f==a;if(h&&Wu(t)){if(!Wu(n))return false;i=true,l=false}if(h&&!l)return o||(o=new H),i||Gu(t)?un(t,n,r,e,u,o):on(t,n,f,r,e,u,o);if(!(r&Lr)){var v=l&&Je.call(t,"__wrapped__"),p=s&&Je.call(n,"__wrapped__");if(v||p){var y=v?t.value():t,g=p?n.value():n;return o||(o=new H),u(y,g,r,e,o)}}return!!h&&(o||(o=new H),cn(t,n,r,e,u,o))}function bt(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(t);u--;){
|
||||
var c=r[u];if(i&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return false}for(;++u<o;){c=r[u];var f=c[0],a=t[f],l=c[1];if(i&&c[2]){if(a===Or&&!(f in t))return false}else{var s=new H;if(e)var h=e(a,l,f,t,n,s);if(!(h===Or?yt(l,a,Lr|Pr,e,s):h))return false}}return true}function _t(t){return!(!tr(t)||zn(t))&&(Yn(t)?Ye:ke).test(Mn(t))}function dt(t){return nr(t)&&Zn(t.length)&&!!Le[ht(t)]}function jt(t){return typeof t=="function"?t:null==t?gr:typeof t=="object"?qu(t)?zt(t[0],t[1]):At(t):dr(t)}function wt(t){if(!xn(t))return vu(t);
|
||||
var n=[];for(var r in Object(t))Je.call(t,r)&&"constructor"!=r&&n.push(r);return n}function Ot(t){if(!tr(t))return In(t);var n=xn(t),r=[];for(var e in t)("constructor"!=e||!n&&Je.call(t,e))&&r.push(e);return r}function mt(t,n){var r=-1,e=Qn(t)?Array(t.length):[];return Pu(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function At(t){var n=vn(t);return 1==n.length&&n[0][2]?kn(n[0][0],n[0][1]):function(r){return r===t||bt(r,t,n)}}function zt(t,n){return mn(t)&&Sn(n)?kn(Bn(t),n):function(r){var e=lr(r,t);return e===Or&&e===n?sr(r,t):yt(n,e,Lr|Pr);
|
||||
}}function xt(t,n,r,e,u){t!==n&&Eu(n,function(o,i){if(tr(o))u||(u=new H),St(t,n,i,r,xt,e,u);else{var c=e?e(t[i],o,i+"",t,n,u):Or;c===Or&&(c=o),tt(t,i,c)}},vr)}function St(t,n,r,e,u,o,i){var c=t[r],f=n[r],a=i.get(f);if(a)return tt(t,r,a),Or;var l=o?o(c,f,r+"",t,n,i):Or,s=l===Or;if(s){var h=qu(f),v=!h&&Wu(f),p=!h&&!v&&Gu(f);l=f,h||v||p?qu(c)?l=c:Xn(c)?l=Kt(c):v?(s=false,l=Dt(f,true)):p?(s=false,l=Jt(f,true)):l=[]:rr(f)||Vu(f)?(l=c,Vu(c)?l=fr(c):(!tr(c)||e&&Yn(c))&&(l=_n(f))):s=false}s&&(i.set(f,l),u(l,f,e,o,i),
|
||||
i.delete(f)),tt(t,r,l)}function kt(t,n){return $t(t,n,function(n,r){return sr(t,r)})}function $t(t,n,r){for(var e=-1,u=n.length,o={};++e<u;){var i=n[e],c=lt(t,i);r(c,i)&&Ft(o,Ct(i,t),c)}return o}function It(t){return function(n){return lt(n,t)}}function Lt(t,n,r,e){var u=e?v:h,o=-1,i=n.length,f=t;for(t===n&&(n=Kt(n)),r&&(f=c(t,b(r)));++o<i;)for(var a=0,l=n[o],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==t&&iu.call(f,a,1),iu.call(t,a,1);return t}function Pt(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==o){
|
||||
var o=u;wn(u)?iu.call(t,u,1):Nt(t,u)}}return t}function Et(t,n){return Nu(Pn(t,n,gr),t+"")}function Ft(t,n,r,e){if(!tr(t))return t;n=Ct(n,t);for(var u=-1,o=n.length,i=o-1,c=t;null!=c&&++u<o;){var f=Bn(n[u]),a=r;if(u!=i){var l=c[f];a=e?e(l,f,c):Or,a===Or&&(a=tr(l)?l:wn(n[u+1])?[]:{})}nt(c,f,a),c=c[f]}return t}function Bt(t,n,r){var e=-1,u=t.length;n<0&&(n=-n>u?0:u+n),r=r>u?u:r,r<0&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(u);++e<u;)o[e]=t[e+n];return o}function Mt(t,n,r,e){n=r(n);for(var u=0,o=null==t?0:t.length,i=n!==n,c=null===n,f=ur(n),a=n===Or;u<o;){
|
||||
var l=lu((u+o)/2),s=r(t[l]),h=s!==Or,v=null===s,p=s===s,y=ur(s);if(i)var g=e||p;else g=a?p&&(e||h):c?p&&h&&(e||!v):f?p&&h&&!v&&(e||!y):!v&&!y&&(e?s<=n:s<n);g?u=l+1:o=l}return yu(o,Cr)}function Tt(t){if(typeof t=="string")return t;if(qu(t))return c(t,Tt)+"";if(ur(t))return Iu?Iu.call(t):"";var n=t+"";return"0"==n&&1/t==-Br?"-0":n}function Ut(t,n,r){var e=-1,u=o,c=t.length,f=true,a=[],l=a;if(r)f=false,u=i;else if(c>=Ar){var s=n?null:Bu(t);if(s)return m(s);f=false,u=d,l=new q}else l=n?[]:a;t:for(;++e<c;){var h=t[e],v=n?n(h):h;
|
||||
if(h=r||0!==h?h:0,f&&v===v){for(var p=l.length;p--;)if(l[p]===v)continue t;n&&l.push(v),a.push(h)}else u(l,v,r)||(l!==a&&l.push(v),a.push(h))}return a}function Nt(t,n){return n=Ct(n,t),t=En(t,n),null==t||delete t[Bn(Nn(n))]}function Ct(t,n){return qu(t)?t:mn(t,n)?[t]:Cu(ar(t))}function Dt(t,n){if(n)return t.slice();var r=t.length,e=ru?ru(r):new t.constructor(r);return t.copy(e),e}function Rt(t){var n=new t.constructor(t.byteLength);return new nu(n).set(new nu(t)),n}function Vt(t,n){return new t.constructor(n?Rt(t.buffer):t.buffer,t.byteOffset,t.byteLength);
|
||||
}function qt(n,r,e){return a(r?e(w(n),kr):w(n),t,new n.constructor)}function Wt(t){var n=new t.constructor(t.source,ze.exec(t));return n.lastIndex=t.lastIndex,n}function Gt(t,r,e){return a(r?e(m(t),kr):m(t),n,new t.constructor)}function Ht(t){return $u?Object($u.call(t)):{}}function Jt(t,n){return new t.constructor(n?Rt(t.buffer):t.buffer,t.byteOffset,t.length)}function Kt(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function Qt(t,n,r,e){var u=!r;r||(r={});for(var o=-1,i=n.length;++o<i;){
|
||||
var c=n[o],f=e?e(r[c],t[c],c,r,t):Or;f===Or&&(f=t[c]),u?ot(r,c,f):nt(r,c,f)}return r}function Xt(t,n){return Qt(t,Mu(t),n)}function Yt(t,n){return Qt(t,Tu(t),n)}function Zt(t){return Et(function(n,r){var e=-1,u=r.length,o=u>1?r[u-1]:Or,i=u>2?r[2]:Or;for(o=t.length>3&&typeof o=="function"?(u--,o):Or,i&&On(r[0],r[1],i)&&(o=u<3?Or:o,u=1),n=Object(n);++e<u;){var c=r[e];c&&t(n,c,e,o)}return n})}function tn(t,n){return function(r,e){if(null==r)return r;if(!Qn(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&e(i[o],o,i)!==false;);
|
||||
return r}}function nn(t){return function(n,r,e){for(var u=-1,o=Object(n),i=e(n),c=i.length;c--;){var f=i[t?c:++u];if(r(o[f],f,o)===false)break}return n}}function rn(t){return function(n,r,e){var u=Object(n);if(!Qn(n)){var o=sn(r,3);n=hr(n),r=function(t){return o(u[t],t,u)}}var i=t(n,r,e);return i>-1?u[o?n[i]:i]:Or}}function en(t){return rr(t)?Or:t}function un(t,n,r,e,u,o){var i=r&Lr,c=t.length,f=n.length;if(c!=f&&!(i&&f>c))return false;var a=o.get(t);if(a&&o.get(n))return a==n;var s=-1,h=true,v=r&Pr?new q:Or;
|
||||
for(o.set(t,n),o.set(n,t);++s<c;){var p=t[s],y=n[s];if(e)var g=i?e(y,p,s,n,t,o):e(p,y,s,t,n,o);if(g!==Or){if(g)continue;h=false;break}if(v){if(!l(n,function(t,n){if(!d(v,n)&&(p===t||u(p,t,r,e,o)))return v.push(n)})){h=false;break}}else if(p!==y&&!u(p,y,r,e,o)){h=false;break}}return o.delete(t),o.delete(n),h}function on(t,n,r,e,u,o,i){switch(r){case fe:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return false;t=t.buffer,n=n.buffer;case ce:return!(t.byteLength!=n.byteLength||!o(new nu(t),new nu(n)));
|
||||
case qr:case Wr:case Qr:return Kn(+t,+n);case Gr:return t.name==n.name&&t.message==n.message;case ne:case ee:return t==n+"";case Kr:var c=w;case re:var f=e&Lr;if(c||(c=m),t.size!=n.size&&!f)return false;var a=i.get(t);if(a)return a==n;e|=Pr,i.set(t,n);var l=un(c(t),c(n),e,u,o,i);return i.delete(t),l;case ue:if($u)return $u.call(t)==$u.call(n)}return false}function cn(t,n,r,e,u,o){var i=r&Lr,c=an(t),f=c.length;if(f!=an(n).length&&!i)return false;for(var a=f;a--;){var l=c[a];if(!(i?l in n:Je.call(n,l)))return false;
|
||||
}var s=o.get(t);if(s&&o.get(n))return s==n;var h=true;o.set(t,n),o.set(n,t);for(var v=i;++a<f;){l=c[a];var p=t[l],y=n[l];if(e)var g=i?e(y,p,l,n,t,o):e(p,y,l,t,n,o);if(!(g===Or?p===y||u(p,y,r,e,o):g)){h=false;break}v||(v="constructor"==l)}if(h&&!v){var b=t.constructor,_=n.constructor;b!=_&&"constructor"in t&&"constructor"in n&&!(typeof b=="function"&&b instanceof b&&typeof _=="function"&&_ instanceof _)&&(h=false)}return o.delete(t),o.delete(n),h}function fn(t){return Nu(Pn(t,Or,Un),t+"")}function an(t){return st(t,hr,Mu);
|
||||
}function ln(t){return st(t,vr,Tu)}function sn(){var t=z.iteratee||br;return t=t===br?jt:t,arguments.length?t(arguments[0],arguments[1]):t}function hn(t,n){var r=t.__data__;return An(n)?r[typeof n=="string"?"string":"hash"]:r.map}function vn(t){for(var n=hr(t),r=n.length;r--;){var e=n[r],u=t[e];n[r]=[e,u,Sn(u)]}return n}function pn(t,n){var r=j(t,n);return _t(r)?r:Or}function yn(t){var n=Je.call(t,fu),r=t[fu];try{t[fu]=Or;var e=true}catch(t){}var u=Qe.call(t);return e&&(n?t[fu]=r:delete t[fu]),u}function gn(t,n,r){
|
||||
n=Ct(n,t);for(var e=-1,u=n.length,o=false;++e<u;){var i=Bn(n[e]);if(!(o=null!=t&&r(t,i)))break;t=t[i]}return o||++e!=u?o:(u=null==t?0:t.length,!!u&&Zn(u)&&wn(i,u)&&(qu(t)||Vu(t)))}function bn(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&Je.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function _n(t){return typeof t.constructor!="function"||xn(t)?{}:Lu(eu(t))}function dn(t,n,r,e){var u=t.constructor;switch(n){case ce:return Rt(t);case qr:case Wr:return new u(+t);case fe:
|
||||
return Vt(t,e);case ae:case le:case se:case he:case ve:case pe:case ye:case ge:case be:return Jt(t,e);case Kr:return qt(t,e,r);case Qr:case ee:return new u(t);case ne:return Wt(t);case re:return Gt(t,e,r);case ue:return Ht(t)}}function jn(t){return qu(t)||Vu(t)||!!(cu&&t&&t[cu])}function wn(t,n){return n=null==n?Mr:n,!!n&&(typeof t=="number"||Ie.test(t))&&t>-1&&t%1==0&&t<n}function On(t,n,r){if(!tr(r))return false;var e=typeof n;return!!("number"==e?Qn(r)&&wn(n,r.length):"string"==e&&n in r)&&Kn(r[n],t);
|
||||
}function mn(t,n){if(qu(t))return false;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!ur(t))||(de.test(t)||!_e.test(t)||null!=n&&t in Object(n))}function An(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}function zn(t){return!!Ke&&Ke in t}function xn(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||We)}function Sn(t){return t===t&&!tr(t)}function kn(t,n){return function(r){return null!=r&&(r[t]===n&&(n!==Or||t in Object(r)));
|
||||
}}function $n(t){var n=Hn(t,function(t){return r.size===Sr&&r.clear(),t}),r=n.cache;return n}function In(t){var n=[];if(null!=t)for(var r in Object(t))n.push(r);return n}function Ln(t){return Qe.call(t)}function Pn(t,n,e){return n=pu(n===Or?t.length-1:n,0),function(){for(var u=arguments,o=-1,i=pu(u.length-n,0),c=Array(i);++o<i;)c[o]=u[n+o];o=-1;for(var f=Array(n+1);++o<n;)f[o]=u[o];return f[n]=e(c),r(t,this,f)}}function En(t,n){return n.length<2?t:lt(t,Bt(n,0,-1))}function Fn(t){var n=0,r=0;return function(){
|
||||
var e=gu(),u=Fr-(e-r);if(r=e,u>0){if(++n>=Er)return arguments[0]}else n=0;return t.apply(Or,arguments)}}function Bn(t){if(typeof t=="string"||ur(t))return t;var n=t+"";return"0"==n&&1/t==-Br?"-0":n}function Mn(t){if(null!=t){try{return He.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Tn(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var u=null==r?0:ir(r);return u<0&&(u=pu(e+u,0)),s(t,sn(n,3),u)}function Un(t){return(null==t?0:t.length)?ft(t,1):[]}function Nn(t){var n=null==t?0:t.length;
|
||||
return n?t[n-1]:Or}function Cn(t,n){return t&&t.length&&n&&n.length?Lt(t,n):t}function Dn(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=sn(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i),u.push(e))}return Pt(t,u),r}function Rn(t,n,r){return Mt(t,n,sn(r,2))}function Vn(t){return t&&t.length?Ut(t):[]}function qn(t,n){return(qu(t)?u:ct)(t,sn(n,3))}function Wn(t,n,r,e){t=Qn(t)?t:pr(t),r=r&&!e?ir(r):0;var u=t.length;return r<0&&(r=pu(u+r,0)),er(t)?r<=u&&t.indexOf(n,r)>-1:!!u&&h(t,n,r)>-1;
|
||||
}function Gn(t,n){return(qu(t)?c:mt)(t,sn(n,3))}function Hn(t,n){if(typeof t!="function"||null!=n&&typeof n!="function")throw new TypeError(zr);var r=function(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;if(o.has(u))return o.get(u);var i=t.apply(this,e);return r.cache=o.set(u,i)||o,i};return r.cache=new(Hn.Cache||U),r}function Jn(t){return it(t,kr|Ir)}function Kn(t,n){return t===n||t!==t&&n!==n}function Qn(t){return null!=t&&Zn(t.length)&&!Yn(t)}function Xn(t){return nr(t)&&Qn(t)}function Yn(t){
|
||||
if(!tr(t))return false;var n=ht(t);return n==Hr||n==Jr||n==Vr||n==te}function Zn(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Mr}function tr(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function nr(t){return null!=t&&typeof t=="object"}function rr(t){if(!nr(t)||ht(t)!=Yr)return false;var n=eu(t);if(null===n)return true;var r=Je.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&He.call(r)==Xe}function er(t){return typeof t=="string"||!qu(t)&&nr(t)&&ht(t)==ee}function ur(t){
|
||||
return typeof t=="symbol"||nr(t)&&ht(t)==ue}function or(t){if(!t)return 0===t?t:0;if(t=cr(t),t===Br||t===-Br){return(t<0?-1:1)*Tr}return t===t?t:0}function ir(t){var n=or(t),r=n%1;return n===n?r?n-r:n:0}function cr(t){if(typeof t=="number")return t;if(ur(t))return Ur;if(tr(t)){var n=typeof t.valueOf=="function"?t.valueOf():t;t=tr(n)?n+"":n}if(typeof t!="string")return 0===t?t:+t;t=t.replace(me,"");var r=Se.test(t);return r||$e.test(t)?Ee(t.slice(2),r?2:8):xe.test(t)?Ur:+t}function fr(t){return Qt(t,vr(t));
|
||||
}function ar(t){return null==t?"":Tt(t)}function lr(t,n,r){var e=null==t?Or:lt(t,n);return e===Or?r:e}function sr(t,n){return null!=t&&gn(t,n,vt)}function hr(t){return Qn(t)?Z(t):wt(t)}function vr(t){return Qn(t)?Z(t,true):Ot(t)}function pr(t){return null==t?[]:_(t,hr(t))}function yr(t){return function(){return t}}function gr(t){return t}function br(t){return jt(typeof t=="function"?t:it(t,kr))}function _r(){}function dr(t){return mn(t)?y(Bn(t)):It(t)}function jr(){return[]}function wr(){return false}var Or,mr="4.17.4",Ar=200,zr="Expected a function",xr="__lodash_hash_undefined__",Sr=500,kr=1,$r=2,Ir=4,Lr=1,Pr=2,Er=800,Fr=16,Br=1/0,Mr=9007199254740991,Tr=1.7976931348623157e308,Ur=NaN,Nr=4294967295,Cr=Nr-1,Dr="[object Arguments]",Rr="[object Array]",Vr="[object AsyncFunction]",qr="[object Boolean]",Wr="[object Date]",Gr="[object Error]",Hr="[object Function]",Jr="[object GeneratorFunction]",Kr="[object Map]",Qr="[object Number]",Xr="[object Null]",Yr="[object Object]",Zr="[object Promise]",te="[object Proxy]",ne="[object RegExp]",re="[object Set]",ee="[object String]",ue="[object Symbol]",oe="[object Undefined]",ie="[object WeakMap]",ce="[object ArrayBuffer]",fe="[object DataView]",ae="[object Float32Array]",le="[object Float64Array]",se="[object Int8Array]",he="[object Int16Array]",ve="[object Int32Array]",pe="[object Uint8Array]",ye="[object Uint8ClampedArray]",ge="[object Uint16Array]",be="[object Uint32Array]",_e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,de=/^\w*$/,je=/^\./,we=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Oe=/[\\^$.*+?()[\]{}|]/g,me=/^\s+|\s+$/g,Ae=/\\(\\)?/g,ze=/\w*$/,xe=/^[-+]0x[0-9a-f]+$/i,Se=/^0b[01]+$/i,ke=/^\[object .+?Constructor\]$/,$e=/^0o[0-7]+$/i,Ie=/^(?:0|[1-9]\d*)$/,Le={};
|
||||
Le[ae]=Le[le]=Le[se]=Le[he]=Le[ve]=Le[pe]=Le[ye]=Le[ge]=Le[be]=true,Le[Dr]=Le[Rr]=Le[ce]=Le[qr]=Le[fe]=Le[Wr]=Le[Gr]=Le[Hr]=Le[Kr]=Le[Qr]=Le[Yr]=Le[ne]=Le[re]=Le[ee]=Le[ie]=false;var Pe={};Pe[Dr]=Pe[Rr]=Pe[ce]=Pe[fe]=Pe[qr]=Pe[Wr]=Pe[ae]=Pe[le]=Pe[se]=Pe[he]=Pe[ve]=Pe[Kr]=Pe[Qr]=Pe[Yr]=Pe[ne]=Pe[re]=Pe[ee]=Pe[ue]=Pe[pe]=Pe[ye]=Pe[ge]=Pe[be]=true,Pe[Gr]=Pe[Hr]=Pe[ie]=false;var Ee=parseInt,Fe=typeof global=="object"&&global&&global.Object===Object&&global,Be=typeof self=="object"&&self&&self.Object===Object&&self,Me=Fe||Be||Function("return this")(),Te=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ue=Te&&typeof module=="object"&&module&&!module.nodeType&&module,Ne=Ue&&Ue.exports===Te,Ce=Ne&&Fe.process,De=function(){
|
||||
try{return Ce&&Ce.binding&&Ce.binding("util")}catch(t){}}(),Re=De&&De.isTypedArray,Ve=Array.prototype,qe=Function.prototype,We=Object.prototype,Ge=Me["__core-js_shared__"],He=qe.toString,Je=We.hasOwnProperty,Ke=function(){var t=/[^.]+$/.exec(Ge&&Ge.keys&&Ge.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Qe=We.toString,Xe=He.call(Object),Ye=RegExp("^"+He.call(Je).replace(Oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ze=Ne?Me.Buffer:Or,tu=Me.Symbol,nu=Me.Uint8Array,ru=Ze?Ze.allocUnsafe:Or,eu=O(Object.getPrototypeOf,Object),uu=Object.create,ou=We.propertyIsEnumerable,iu=Ve.splice,cu=tu?tu.isConcatSpreadable:Or,fu=tu?tu.toStringTag:Or,au=function(){
|
||||
try{var t=pn(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),lu=Math.floor,su=Object.getOwnPropertySymbols,hu=Ze?Ze.isBuffer:Or,vu=O(Object.keys,Object),pu=Math.max,yu=Math.min,gu=Date.now,bu=pn(Me,"DataView"),_u=pn(Me,"Map"),du=pn(Me,"Promise"),ju=pn(Me,"Set"),wu=pn(Me,"WeakMap"),Ou=pn(Object,"create"),mu=Mn(bu),Au=Mn(_u),zu=Mn(du),xu=Mn(ju),Su=Mn(wu),ku=tu?tu.prototype:Or,$u=ku?ku.valueOf:Or,Iu=ku?ku.toString:Or,Lu=function(){function t(){}return function(n){if(!tr(n))return{};if(uu)return uu(n);
|
||||
t.prototype=n;var r=new t;return t.prototype=Or,r}}();x.prototype.clear=S,x.prototype.delete=k,x.prototype.get=$,x.prototype.has=I,x.prototype.set=L,P.prototype.clear=E,P.prototype.delete=F,P.prototype.get=B,P.prototype.has=M,P.prototype.set=T,U.prototype.clear=N,U.prototype.delete=C,U.prototype.get=D,U.prototype.has=R,U.prototype.set=V,q.prototype.add=q.prototype.push=W,q.prototype.has=G,H.prototype.clear=J,H.prototype.delete=K,H.prototype.get=Q,H.prototype.has=X,H.prototype.set=Y;var Pu=tn(at),Eu=nn(),Fu=au?function(t,n){
|
||||
return au(t,"toString",{configurable:true,enumerable:false,value:yr(n),writable:true})}:gr,Bu=ju&&1/m(new ju([,-0]))[1]==Br?function(t){return new ju(t)}:_r,Mu=su?function(t){return null==t?[]:(t=Object(t),u(su(t),function(n){return ou.call(t,n)}))}:jr,Tu=su?function(t){for(var n=[];t;)f(n,Mu(t)),t=eu(t);return n}:jr,Uu=ht;(bu&&Uu(new bu(new ArrayBuffer(1)))!=fe||_u&&Uu(new _u)!=Kr||du&&Uu(du.resolve())!=Zr||ju&&Uu(new ju)!=re||wu&&Uu(new wu)!=ie)&&(Uu=function(t){var n=ht(t),r=n==Yr?t.constructor:Or,e=r?Mn(r):"";
|
||||
if(e)switch(e){case mu:return fe;case Au:return Kr;case zu:return Zr;case xu:return re;case Su:return ie}return n});var Nu=Fn(Fu),Cu=$n(function(t){var n=[];return je.test(t)&&n.push(""),t.replace(we,function(t,r,e,u){n.push(e?u.replace(Ae,"$1"):r||t)}),n}),Du=Et(Cn),Ru=rn(Tn);Hn.Cache=U;var Vu=pt(function(){return arguments}())?pt:function(t){return nr(t)&&Je.call(t,"callee")&&!ou.call(t,"callee")},qu=Array.isArray,Wu=hu||wr,Gu=Re?b(Re):dt,Hu=Zt(function(t,n,r){xt(t,n,r)}),Ju=fn(function(t,n){var r={};
|
||||
if(null==t)return r;var e=false;n=c(n,function(n){return n=Ct(n,t),e||(e=n.length>1),n}),Qt(t,ln(t),r),e&&(r=it(r,kr|$r|Ir,en));for(var u=n.length;u--;)Nt(r,n[u]);return r}),Ku=fn(function(t,n){return null==t?{}:kt(t,n)});z.constant=yr,z.filter=qn,z.flatten=Un,z.iteratee=br,z.keys=hr,z.keysIn=vr,z.map=Gn,z.memoize=Hn,z.merge=Hu,z.omit=Ju,z.pick=Ku,z.property=dr,z.pull=Du,z.pullAll=Cn,z.remove=Dn,z.toPlainObject=fr,z.uniq=Vn,z.values=pr,z.cloneDeep=Jn,z.eq=Kn,z.find=Ru,z.findIndex=Tn,z.get=lr,z.hasIn=sr,
|
||||
z.identity=gr,z.includes=Wn,z.isArguments=Vu,z.isArray=qu,z.isArrayLike=Qn,z.isArrayLikeObject=Xn,z.isBuffer=Wu,z.isFunction=Yn,z.isLength=Zn,z.isObject=tr,z.isObjectLike=nr,z.isPlainObject=rr,z.isString=er,z.isSymbol=ur,z.isTypedArray=Gu,z.last=Nn,z.stubArray=jr,z.stubFalse=wr,z.noop=_r,z.sortedIndexBy=Rn,z.toFinite=or,z.toInteger=ir,z.toNumber=cr,z.toString=ar,z.VERSION=mr,typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Me._=z, define(function(){return z})):Ue?((Ue.exports=z)._=z,
|
||||
Te._=z):Me._=z}).call(this);
|
||||
;(function(){function t(t,e){return t.set(e[0],e[1]),t}function e(t,e){return t.add(e),t}function n(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function r(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&false!==e(t[n],n,t););}function o(t,e){for(var n=-1,r=null==t?0:t.length,o=0,u=[];++n<r;){var c=t[n];e(c,n,t)&&(u[o++]=c)}return u}function u(t,e){return!(null==t||!t.length)&&-1<s(t,e,0);
|
||||
}function c(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function i(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function a(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)n=e(n,t[r],r,t);return n}function f(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return true;return false}function l(t,e,n){var r=t.length;for(n+=-1;++n<r;)if(e(t[n],n,t))return n;return-1}function s(t,e,n){if(e===e)t:{--n;for(var r=t.length;++n<r;)if(t[n]===e){
|
||||
t=n;break t}t=-1}else t=l(t,b,n);return t}function b(t){return t!==t}function h(t){return function(e){return null==e?ae:e[t]}}function p(t){return function(e){return t(e)}}function y(t,e){return c(e,function(e){return t[e]})}function j(t,e){return t.has(e)}function v(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function g(t){var e=Object;return function(n){return t(e(n))}}function _(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function d(){}
|
||||
function A(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function w(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function m(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function O(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new m;++e<n;)this.add(t[e])}function S(t){this.size=(this.__data__=new w(t)).size}function k(t,e){var n=Dn(t),r=!n&&Bn(t),o=!n&&!r&&Pn(t),u=!n&&!r&&!o&&Ln(t);
|
||||
if(n=n||r||o||u){for(var r=t.length,c=String,i=-1,a=Array(r);++i<r;)a[i]=c(i);r=a}else r=[];var f,c=r.length;for(f in t)!e&&!Ne.call(t,f)||n&&("length"==f||o&&("offset"==f||"parent"==f)||u&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||mt(f,c))||r.push(f);return r}function z(t,e,n){(n===ae||Bt(t[e],n))&&(n!==ae||e in t)||M(t,e,n)}function x(t,e,n){var r=t[e];Ne.call(t,e)&&Bt(r,n)&&(n!==ae||e in t)||M(t,e,n)}function I(t,e){for(var n=t.length;n--;)if(Bt(t[n][0],e))return n;return-1}function F(t,e){
|
||||
return t&&ut(e,Yt(e),t)}function E(t,e){return t&&ut(e,Zt(e),t)}function M(t,e,n){"__proto__"==e&&tn?tn(t,e,{configurable:true,enumerable:true,value:n,writable:true}):t[e]=n}function $(t,e,n,o,u,c){var i,a=1&e,f=2&e,l=4&e;if(n&&(i=u?n(t,o,u,c):n(t)),i!==ae)return i;if(!Vt(t))return t;if(o=Dn(t)){if(i=_t(t),!a)return ot(t,i)}else{var s=Fn(t),b="[object Function]"==s||"[object GeneratorFunction]"==s;if(Pn(t))return et(t,a);if("[object Object]"==s||"[object Arguments]"==s||b&&!u){if(i=f||b?{}:dt(t),!a)return f?it(t,E(i,t)):ct(t,F(i,t));
|
||||
}else{if(!Oe[s])return u?t:{};i=At(t,s,$,a)}}if(c||(c=new S),u=c.get(t))return u;c.set(t,i);var f=l?f?pt:ht:f?Zt:Yt,h=o?ae:f(t);return r(h||t,function(r,o){h&&(o=r,r=t[o]),x(i,o,$(r,e,n,o,t,c))}),i}function U(t,e){var n=[];return On(t,function(t,r,o){e(t,r,o)&&n.push(t)}),n}function B(t,e,n,r,o){var u=-1,c=t.length;for(n||(n=wt),o||(o=[]);++u<c;){var a=t[u];0<e&&n(a)?1<e?B(a,e-1,n,r,o):i(o,a):r||(o[o.length]=a)}return o}function D(t,e){e=tt(e,t);for(var n=0,r=e.length;null!=t&&n<r;)t=t[xt(e[n++])];
|
||||
return n&&n==r?t:ae}function P(t,e,n){return e=e(t),Dn(t)?e:i(e,n(t))}function L(t){if(null==t)t=t===ae?"[object Undefined]":"[object Null]";else if(Ze&&Ze in Object(t)){var e=Ne.call(t,Ze),n=t[Ze];try{t[Ze]=ae;var r=true}catch(t){}var o=Ce.call(t);r&&(e?t[Ze]=n:delete t[Ze]),t=o}else t=Ce.call(t);return t}function N(t){return Ct(t)&&"[object Arguments]"==L(t)}function V(t,e,n,r,o){if(t===e)e=true;else if(null==t||null==e||!Ct(t)&&!Ct(e))e=t!==t&&e!==e;else t:{var u=Dn(t),c=Dn(e),i=u?"[object Array]":Fn(t),a=c?"[object Array]":Fn(e),i="[object Arguments]"==i?"[object Object]":i,a="[object Arguments]"==a?"[object Object]":a,f="[object Object]"==i,c="[object Object]"==a;
|
||||
if((a=i==a)&&Pn(t)){if(!Pn(e)){e=false;break t}u=true,f=false}if(a&&!f)o||(o=new S),e=u||Ln(t)?lt(t,e,n,r,V,o):st(t,e,i,n,r,V,o);else{if(!(1&n)&&(u=f&&Ne.call(t,"__wrapped__"),i=c&&Ne.call(e,"__wrapped__"),u||i)){t=u?t.value():t,e=i?e.value():e,o||(o=new S),e=V(t,e,n,r,o);break t}if(a)e:if(o||(o=new S),u=1&n,i=ht(t),c=i.length,a=ht(e).length,c==a||u){for(f=c;f--;){var l=i[f];if(!(u?l in e:Ne.call(e,l))){e=false;break e}}if((a=o.get(t))&&o.get(e))e=a==e;else{a=true,o.set(t,e),o.set(e,t);for(var s=u;++f<c;){var l=i[f],b=t[l],h=e[l];
|
||||
if(r)var p=u?r(h,b,l,e,t,o):r(b,h,l,t,e,o);if(p===ae?b!==h&&!V(b,h,n,r,o):!p){a=false;break}s||(s="constructor"==l)}a&&!s&&(n=t.constructor,r=e.constructor,n!=r&&"constructor"in t&&"constructor"in e&&!(typeof n=="function"&&n instanceof n&&typeof r=="function"&&r instanceof r)&&(a=false)),o.delete(t),o.delete(e),e=a}}else e=false;else e=false}}return e}function C(t,e){var n=e.length,r=n;if(null==t)return!r;for(t=Object(t);n--;){var o=e[n];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return false}for(;++n<r;){var o=e[n],u=o[0],c=t[u],i=o[1];
|
||||
if(o[2]){if(c===ae&&!(u in t))return false}else if(o=new S,void 0===ae?!V(i,c,3,void 0,o):1)return false}return true}function R(t){return Ct(t)&&Nt(t.length)&&!!me[L(t)]}function T(t){return typeof t=="function"?t:null==t?ne:typeof t=="object"?Dn(t)?G(t[0],t[1]):q(t):ue(t)}function W(t,e){var n=-1,r=Dt(t)?Array(t.length):[];return On(t,function(t,o,u){r[++n]=e(t,o,u)}),r}function q(t){var e=vt(t);return 1==e.length&&e[0][2]?kt(e[0][0],e[0][1]):function(n){return n===t||C(n,e)}}function G(t,e){return Ot(t)&&e===e&&!Vt(e)?kt(xt(t),e):function(n){
|
||||
var r=Qt(n,t);return r===ae&&r===e?Xt(n,t):V(e,r,3)}}function H(t,e,n,r,o){t!==e&&Sn(e,function(u,c){if(Vt(u)){o||(o=new S);var i=o,a=t[c],f=e[c],l=i.get(f);if(l)z(t,c,l);else{var l=r?r(a,f,c+"",t,e,i):ae,s=l===ae;if(s){var b=Dn(f),h=!b&&Pn(f),p=!b&&!h&&Ln(f),l=f;b||h||p?Dn(a)?l=a:Pt(a)?l=ot(a):h?(s=false,l=et(f,true)):p?(s=false,l=rt(f,true)):l=[]:Rt(f)||Bn(f)?(l=a,Bn(a)?l=Jt(a):(!Vt(a)||n&&Lt(a))&&(l=dt(f))):s=false}s&&(i.set(f,l),H(l,f,n,r,i),i.delete(f)),z(t,c,l)}}else i=r?r(t[c],u,c+"",t,e,o):ae,i===ae&&(i=u),
|
||||
z(t,c,i)},Zt)}function J(t,e){return K(t,e,function(e,n){return Xt(t,n)})}function K(t,e,n){for(var r=-1,o=e.length,u={};++r<o;){var c=e[r],i=D(t,c);if(n(i,c)){var a=u,c=tt(c,t);if(Vt(a))for(var c=tt(c,a),f=-1,l=c.length,s=l-1;null!=a&&++f<l;){var b=xt(c[f]),h=i;if(f!=s){var p=a[b],h=ae;h===ae&&(h=Vt(p)?p:mt(c[f+1])?[]:{})}x(a,b,h),a=a[b]}}}return u}function Q(t){return function(e){return D(e,t)}}function X(t){return En(zt(t,void 0,ne),t+"")}function Y(t){if(typeof t=="string")return t;if(Dn(t))return c(t,Y)+"";
|
||||
if(Wt(t))return wn?wn.call(t):"";var e=t+"";return"0"==e&&1/t==-fe?"-0":e}function Z(t,e){e=tt(e,t);var n;if(2>e.length)n=t;else{n=e;var r=0,o=-1,u=-1,c=n.length;for(0>r&&(r=-r>c?0:c+r),o=o>c?c:o,0>o&&(o+=c),c=r>o?0:o-r>>>0,r>>>=0,o=Array(c);++u<c;)o[u]=n[u+r];n=D(t,o)}t=n,null==t||delete t[xt(Mt(e))]}function tt(t,e){return Dn(t)?t:Ot(t,e)?[t]:Mn(Kt(t))}function et(t,e){if(e)return t.slice();var n=t.length,n=He?He(n):new t.constructor(n);return t.copy(n),n}function nt(t){var e=new t.constructor(t.byteLength);
|
||||
return new Ge(e).set(new Ge(t)),e}function rt(t,e){return new t.constructor(e?nt(t.buffer):t.buffer,t.byteOffset,t.length)}function ot(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function ut(t,e,n){var r=!n;n||(n={});for(var o=-1,u=e.length;++o<u;){var c=e[o],i=ae;i===ae&&(i=t[c]),r?M(n,c,i):x(n,c,i)}return n}function ct(t,e){return ut(t,xn(t),e)}function it(t,e){return ut(t,In(t),e)}function at(t){return X(function(e,n){var r,o=-1,u=n.length,c=1<u?n[u-1]:ae,i=2<u?n[2]:ae,c=3<t.length&&typeof c=="function"?(u--,
|
||||
c):ae;if(r=i){r=n[0];var a=n[1];if(Vt(i)){var f=typeof a;r=!!("number"==f?Dt(i)&&mt(a,i.length):"string"==f&&a in i)&&Bt(i[a],r)}else r=false}for(r&&(c=3>u?ae:c,u=1),e=Object(e);++o<u;)(i=n[o])&&t(e,i,o,c);return e})}function ft(t){return Rt(t)?ae:t}function lt(t,e,n,r,o,u){var c=1&n,i=t.length,a=e.length;if(i!=a&&!(c&&a>i))return false;if((a=u.get(t))&&u.get(e))return a==e;var a=-1,l=true,s=2&n?new O:ae;for(u.set(t,e),u.set(e,t);++a<i;){var b=t[a],h=e[a];if(r)var p=c?r(h,b,a,e,t,u):r(b,h,a,t,e,u);if(p!==ae){
|
||||
if(p)continue;l=false;break}if(s){if(!f(e,function(t,e){if(!j(s,e)&&(b===t||o(b,t,n,r,u)))return s.push(e)})){l=false;break}}else if(b!==h&&!o(b,h,n,r,u)){l=false;break}}return u.delete(t),u.delete(e),l}function st(t,e,n,r,o,u,c){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!u(new Ge(t),new Ge(e)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":
|
||||
return Bt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var i=v;case"[object Set]":if(i||(i=_),t.size!=e.size&&!(1&r))break;return(n=c.get(t))?n==e:(r|=2,c.set(t,e),e=lt(i(t),i(e),r,o,u,c),c.delete(t),e);case"[object Symbol]":if(An)return An.call(t)==An.call(e)}return false}function bt(t){return En(zt(t,ae,Et),t+"")}function ht(t){return P(t,Yt,xn)}function pt(t){return P(t,Zt,In)}function yt(){var t=d.iteratee||re,t=t===re?T:t;
|
||||
return arguments.length?t(arguments[0],arguments[1]):t}function jt(t,e){var n=t.__data__,r=typeof e;return("string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?n[typeof e=="string"?"string":"hash"]:n.map}function vt(t){for(var e=Yt(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,o===o&&!Vt(o)]}return e}function gt(t,e){var n=null==t?ae:t[e];return(!Vt(n)||Ve&&Ve in n?0:(Lt(n)?Te:de).test(It(n)))?n:ae}function _t(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&Ne.call(t,"index")&&(n.index=t.index,
|
||||
n.input=t.input),n}function dt(t){return typeof t.constructor!="function"||St(t)?{}:mn(Je(t))}function At(n,r,o,u){var c=n.constructor;switch(r){case"[object ArrayBuffer]":return nt(n);case"[object Boolean]":case"[object Date]":return new c(+n);case"[object DataView]":return r=u?nt(n.buffer):n.buffer,new n.constructor(r,n.byteOffset,n.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":
|
||||
case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return rt(n,u);case"[object Map]":return r=u?o(v(n),1):v(n),a(r,t,new n.constructor);case"[object Number]":case"[object String]":return new c(n);case"[object RegExp]":return r=new n.constructor(n.source,ve.exec(n)),r.lastIndex=n.lastIndex,r;case"[object Set]":return r=u?o(_(n),1):_(n),a(r,e,new n.constructor);case"[object Symbol]":return An?Object(An.call(n)):{}}}function wt(t){return Dn(t)||Bn(t)||!!(Ye&&t&&t[Ye]);
|
||||
}function mt(t,e){return e=null==e?9007199254740991:e,!!e&&(typeof t=="number"||we.test(t))&&-1<t&&0==t%1&&t<e}function Ot(t,e){if(Dn(t))return false;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Wt(t))||(be.test(t)||!se.test(t)||null!=e&&t in Object(e))}function St(t){var e=t&&t.constructor;return t===(typeof e=="function"&&e.prototype||De)}function kt(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==ae||t in Object(n)))}}function zt(t,e,r){return e=un(e===ae?t.length-1:e,0),
|
||||
function(){for(var o=arguments,u=-1,c=un(o.length-e,0),i=Array(c);++u<c;)i[u]=o[e+u];for(u=-1,c=Array(e+1);++u<e;)c[u]=o[u];return c[e]=r(i),n(t,this,c)}}function xt(t){if(typeof t=="string"||Wt(t))return t;var e=t+"";return"0"==e&&1/t==-fe?"-0":e}function It(t){if(null!=t){try{return Le.call(t)}catch(t){}return t+""}return""}function Ft(t,e,n){var r=null==t?0:t.length;return r?(n=null==n?0:Gt(n),0>n&&(n=un(r+n,0)),l(t,yt(e,3),n)):-1}function Et(t){return(null==t?0:t.length)?B(t,1):[]}function Mt(t){
|
||||
var e=null==t?0:t.length;return e?t[e-1]:ae}function $t(t,e){var n;if(t&&t.length&&e&&e.length){n=e;var r=s,o=-1,u=n.length;for(t===n&&(n=ot(n));++o<u;)for(var c=0,i=n[o];-1<(c=r(t,i,c,void 0));)t!==t&&Xe.call(t,c,1),Xe.call(t,c,1);n=t}else n=t;return n}function Ut(t,e){function n(){var r=arguments,o=e?e.apply(this,r):r[0],u=n.cache;return u.has(o)?u.get(o):(r=t.apply(this,r),n.cache=u.set(o,r)||u,r)}if(typeof t!="function"||null!=e&&typeof e!="function")throw new TypeError("Expected a function");
|
||||
return n.cache=new(Ut.Cache||m),n}function Bt(t,e){return t===e||t!==t&&e!==e}function Dt(t){return null!=t&&Nt(t.length)&&!Lt(t)}function Pt(t){return Ct(t)&&Dt(t)}function Lt(t){return!!Vt(t)&&(t=L(t),"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function Nt(t){return typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t}function Vt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ct(t){return null!=t&&typeof t=="object";
|
||||
}function Rt(t){return!(!Ct(t)||"[object Object]"!=L(t))&&(t=Je(t),null===t||(t=Ne.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&Le.call(t)==Re))}function Tt(t){return typeof t=="string"||!Dn(t)&&Ct(t)&&"[object String]"==L(t)}function Wt(t){return typeof t=="symbol"||Ct(t)&&"[object Symbol]"==L(t)}function qt(t){return t?(t=Ht(t),t===fe||t===-fe?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function Gt(t){t=qt(t);var e=t%1;return t===t?e?t-e:t:0}function Ht(t){
|
||||
if(typeof t=="number")return t;if(Wt(t))return le;if(Vt(t)&&(t=typeof t.valueOf=="function"?t.valueOf():t,t=Vt(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(ye,"");var e=_e.test(t);return e||Ae.test(t)?ke(t.slice(2),e?2:8):ge.test(t)?le:+t}function Jt(t){return ut(t,Zt(t))}function Kt(t){return null==t?"":Y(t)}function Qt(t,e,n){return t=null==t?ae:D(t,e),t===ae?n:t}function Xt(t,e){var n;if(n=null!=t){n=t;var r;r=tt(e,n);for(var o=-1,u=r.length,c=false;++o<u;){var i=xt(r[o]);if(!(c=null!=n&&null!=n&&i in Object(n)))break;
|
||||
n=n[i]}c||++o!=u?n=c:(u=null==n?0:n.length,n=!!u&&Nt(u)&&mt(i,u)&&(Dn(n)||Bn(n)))}return n}function Yt(t){if(Dt(t))t=k(t);else if(St(t)){var e,n=[];for(e in Object(t))Ne.call(t,e)&&"constructor"!=e&&n.push(e);t=n}else t=on(t);return t}function Zt(t){if(Dt(t))t=k(t,true);else if(Vt(t)){var e,n=St(t),r=[];for(e in t)("constructor"!=e||!n&&Ne.call(t,e))&&r.push(e);t=r}else{if(e=[],null!=t)for(n in Object(t))e.push(n);t=e}return t}function te(t){return null==t?[]:y(t,Yt(t))}function ee(t){return function(){
|
||||
return t}}function ne(t){return t}function re(t){return T(typeof t=="function"?t:$(t,1))}function oe(){}function ue(t){return Ot(t)?h(xt(t)):Q(t)}function ce(){return[]}function ie(){return false}var ae,fe=1/0,le=NaN,se=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,be=/^\w*$/,he=/^\./,pe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ye=/^\s+|\s+$/g,je=/\\(\\)?/g,ve=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,_e=/^0b[01]+$/i,de=/^\[object .+?Constructor\]$/,Ae=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,me={};
|
||||
me["[object Float32Array]"]=me["[object Float64Array]"]=me["[object Int8Array]"]=me["[object Int16Array]"]=me["[object Int32Array]"]=me["[object Uint8Array]"]=me["[object Uint8ClampedArray]"]=me["[object Uint16Array]"]=me["[object Uint32Array]"]=true,me["[object Arguments]"]=me["[object Array]"]=me["[object ArrayBuffer]"]=me["[object Boolean]"]=me["[object DataView]"]=me["[object Date]"]=me["[object Error]"]=me["[object Function]"]=me["[object Map]"]=me["[object Number]"]=me["[object Object]"]=me["[object RegExp]"]=me["[object Set]"]=me["[object String]"]=me["[object WeakMap]"]=false;
|
||||
var Oe={};Oe["[object Arguments]"]=Oe["[object Array]"]=Oe["[object ArrayBuffer]"]=Oe["[object DataView]"]=Oe["[object Boolean]"]=Oe["[object Date]"]=Oe["[object Float32Array]"]=Oe["[object Float64Array]"]=Oe["[object Int8Array]"]=Oe["[object Int16Array]"]=Oe["[object Int32Array]"]=Oe["[object Map]"]=Oe["[object Number]"]=Oe["[object Object]"]=Oe["[object RegExp]"]=Oe["[object Set]"]=Oe["[object String]"]=Oe["[object Symbol]"]=Oe["[object Uint8Array]"]=Oe["[object Uint8ClampedArray]"]=Oe["[object Uint16Array]"]=Oe["[object Uint32Array]"]=true,
|
||||
Oe["[object Error]"]=Oe["[object Function]"]=Oe["[object WeakMap]"]=false;var Se,ke=parseInt,ze=typeof global=="object"&&global&&global.Object===Object&&global,xe=typeof self=="object"&&self&&self.Object===Object&&self,Ie=ze||xe||Function("return this")(),Fe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ee=Fe&&typeof module=="object"&&module&&!module.nodeType&&module,Me=Ee&&Ee.exports===Fe,$e=Me&&ze.process;t:{try{Se=$e&&$e.binding&&$e.binding("util");break t}catch(t){}Se=void 0}var Ue=Se&&Se.isTypedArray,Be=Array.prototype,De=Object.prototype,Pe=Ie["__core-js_shared__"],Le=Function.prototype.toString,Ne=De.hasOwnProperty,Ve=function(){
|
||||
var t=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ce=De.toString,Re=Le.call(Object),Te=RegExp("^"+Le.call(Ne).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=Me?Ie.Buffer:ae,qe=Ie.Symbol,Ge=Ie.Uint8Array,He=We?We.a:ae,Je=g(Object.getPrototypeOf),Ke=Object.create,Qe=De.propertyIsEnumerable,Xe=Be.splice,Ye=qe?qe.isConcatSpreadable:ae,Ze=qe?qe.toStringTag:ae,tn=function(){try{var t=gt(Object,"defineProperty");
|
||||
return t({},"",{}),t}catch(t){}}(),en=Math.floor,nn=Object.getOwnPropertySymbols,rn=We?We.isBuffer:ae,on=g(Object.keys),un=Math.max,cn=Math.min,an=Date.now,fn=gt(Ie,"DataView"),ln=gt(Ie,"Map"),sn=gt(Ie,"Promise"),bn=gt(Ie,"Set"),hn=gt(Ie,"WeakMap"),pn=gt(Object,"create"),yn=It(fn),jn=It(ln),vn=It(sn),gn=It(bn),_n=It(hn),dn=qe?qe.prototype:ae,An=dn?dn.valueOf:ae,wn=dn?dn.toString:ae,mn=function(){function t(){}return function(e){return Vt(e)?Ke?Ke(e):(t.prototype=e,e=new t,t.prototype=ae,e):{}}}();
|
||||
A.prototype.clear=function(){this.__data__=pn?pn(null):{},this.size=0},A.prototype.delete=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},A.prototype.get=function(t){var e=this.__data__;return pn?(t=e[t],"__lodash_hash_undefined__"===t?ae:t):Ne.call(e,t)?e[t]:ae},A.prototype.has=function(t){var e=this.__data__;return pn?e[t]!==ae:Ne.call(e,t)},A.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=pn&&e===ae?"__lodash_hash_undefined__":e,
|
||||
this},w.prototype.clear=function(){this.__data__=[],this.size=0},w.prototype.delete=function(t){var e=this.__data__;return t=I(e,t),!(0>t)&&(t==e.length-1?e.pop():Xe.call(e,t,1),--this.size,true)},w.prototype.get=function(t){var e=this.__data__;return t=I(e,t),0>t?ae:e[t][1]},w.prototype.has=function(t){return-1<I(this.__data__,t)},w.prototype.set=function(t,e){var n=this.__data__,r=I(n,t);return 0>r?(++this.size,n.push([t,e])):n[r][1]=e,this},m.prototype.clear=function(){this.size=0,this.__data__={
|
||||
hash:new A,map:new(ln||w),string:new A}},m.prototype.delete=function(t){return t=jt(this,t).delete(t),this.size-=t?1:0,t},m.prototype.get=function(t){return jt(this,t).get(t)},m.prototype.has=function(t){return jt(this,t).has(t)},m.prototype.set=function(t,e){var n=jt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},O.prototype.add=O.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},O.prototype.has=function(t){return this.__data__.has(t)},S.prototype.clear=function(){
|
||||
this.__data__=new w,this.size=0},S.prototype.delete=function(t){var e=this.__data__;return t=e.delete(t),this.size=e.size,t},S.prototype.get=function(t){return this.__data__.get(t)},S.prototype.has=function(t){return this.__data__.has(t)},S.prototype.set=function(t,e){var n=this.__data__;if(n instanceof w){var r=n.__data__;if(!ln||199>r.length)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new m(r)}return n.set(t,e),this.size=n.size,this};var On=function(t,e){return function(n,r){if(null==n)return n;
|
||||
if(!Dt(n))return t(n,r);for(var o=n.length,u=e?o:-1,c=Object(n);(e?u--:++u<o)&&false!==r(c[u],u,c););return n}}(function(t,e){return t&&Sn(t,e,Yt)}),Sn=function(t){return function(e,n,r){var o=-1,u=Object(e);r=r(e);for(var c=r.length;c--;){var i=r[t?c:++o];if(false===n(u[i],i,u))break}return e}}(),kn=tn?function(t,e){return tn(t,"toString",{configurable:true,enumerable:false,value:ee(e),writable:true})}:ne,zn=bn&&1/_(new bn([,-0]))[1]==fe?function(t){return new bn(t)}:oe,xn=nn?function(t){return null==t?[]:(t=Object(t),
|
||||
o(nn(t),function(e){return Qe.call(t,e)}))}:ce,In=nn?function(t){for(var e=[];t;)i(e,xn(t)),t=Je(t);return e}:ce,Fn=L;(fn&&"[object DataView]"!=Fn(new fn(new ArrayBuffer(1)))||ln&&"[object Map]"!=Fn(new ln)||sn&&"[object Promise]"!=Fn(sn.resolve())||bn&&"[object Set]"!=Fn(new bn)||hn&&"[object WeakMap]"!=Fn(new hn))&&(Fn=function(t){var e=L(t);if(t=(t="[object Object]"==e?t.constructor:ae)?It(t):"")switch(t){case yn:return"[object DataView]";case jn:return"[object Map]";case vn:return"[object Promise]";
|
||||
case gn:return"[object Set]";case _n:return"[object WeakMap]"}return e});var En=function(t){var e=0,n=0;return function(){var r=an(),o=16-(r-n);if(n=r,0<o){if(800<=++e)return arguments[0]}else e=0;return t.apply(ae,arguments)}}(kn),Mn=function(t){t=Ut(t,function(t){return 500===e.size&&e.clear(),t});var e=t.cache;return t}(function(t){var e=[];return he.test(t)&&e.push(""),t.replace(pe,function(t,n,r,o){e.push(r?o.replace(je,"$1"):n||t)}),e}),$n=X($t),Un=function(t){return function(e,n,r){var o=Object(e);
|
||||
if(!Dt(e)){var u=yt(n,3);e=Yt(e),n=function(t){return u(o[t],t,o)}}return n=t(e,n,r),-1<n?o[u?e[n]:n]:ae}}(Ft);Ut.Cache=m;var Bn=N(function(){return arguments}())?N:function(t){return Ct(t)&&Ne.call(t,"callee")&&!Qe.call(t,"callee")},Dn=Array.isArray,Pn=rn||ie,Ln=Ue?p(Ue):R,Nn=at(function(t,e,n){H(t,e,n)}),Vn=at(function(t,e,n,r){H(t,e,n,r)}),Cn=bt(function(t,e){var n={};if(null==t)return n;var r=false;e=c(e,function(e){return e=tt(e,t),r||(r=1<e.length),e}),ut(t,pt(t),n),r&&(n=$(n,7,ft));for(var o=e.length;o--;)Z(n,e[o]);
|
||||
return n}),Rn=bt(function(t,e){return null==t?{}:J(t,e)});d.constant=ee,d.filter=function(t,e){return(Dn(t)?o:U)(t,yt(e,3))},d.flatten=Et,d.iteratee=re,d.keys=Yt,d.keysIn=Zt,d.map=function(t,e){return(Dn(t)?c:W)(t,yt(e,3))},d.memoize=Ut,d.merge=Nn,d.mergeWith=Vn,d.omit=Cn,d.pick=Rn,d.property=ue,d.pull=$n,d.pullAll=$t,d.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],u=t.length;for(e=yt(e,3);++r<u;){var c=t[r];e(c,r,t)&&(n.push(c),o.push(r))}for(r=t?o.length:0,u=r-1;r--;)if(c=o[r],
|
||||
r==u||c!==i){var i=c;mt(c)?Xe.call(t,c,1):Z(t,c)}return n},d.toPlainObject=Jt,d.uniq=function(t){if(t&&t.length)t:{var e=-1,n=u,r=t.length,o=true,c=[],i=c;if(200<=r){if(n=zn(t)){t=_(n);break t}o=false,n=j,i=new O}else i=c;e:for(;++e<r;){var a=t[e],f=a,a=0!==a?a:0;if(o&&f===f){for(var l=i.length;l--;)if(i[l]===f)continue e;c.push(a)}else n(i,f,void 0)||(i!==c&&i.push(f),c.push(a))}t=c}else t=[];return t},d.values=te,d.cloneDeep=function(t){return $(t,5)},d.eq=Bt,d.find=Un,d.findIndex=Ft,d.get=Qt,d.hasIn=Xt,
|
||||
d.identity=ne,d.includes=function(t,e,n,r){return t=Dt(t)?t:te(t),n=n&&!r?Gt(n):0,r=t.length,0>n&&(n=un(r+n,0)),Tt(t)?n<=r&&-1<t.indexOf(e,n):!!r&&-1<s(t,e,n)},d.isArguments=Bn,d.isArray=Dn,d.isArrayLike=Dt,d.isArrayLikeObject=Pt,d.isBuffer=Pn,d.isFunction=Lt,d.isLength=Nt,d.isObject=Vt,d.isObjectLike=Ct,d.isPlainObject=Rt,d.isString=Tt,d.isSymbol=Wt,d.isTypedArray=Ln,d.last=Mt,d.stubArray=ce,d.stubFalse=ie,d.noop=oe,d.sortedIndexBy=function(t,e,n){n=yt(n,2),e=n(e);for(var r=0,o=null==t?0:t.length,u=e!==e,c=null===e,i=Wt(e),a=e===ae;r<o;){
|
||||
var f=en((r+o)/2),l=n(t[f]),s=l!==ae,b=null===l,h=l===l,p=Wt(l);(u?h:a?h&&s:c?h&&s&&!b:i?h&&s&&!b&&!p:b||p?0:l<e)?r=f+1:o=f}return cn(o,4294967294)},d.toFinite=qt,d.toInteger=Gt,d.toNumber=Ht,d.toString=Kt,d.VERSION="4.17.4",typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ie._=d, define(function(){return d})):Ee?((Ee.exports=d)._=d,Fe._=d):Ie._=d}).call(this);
|
||||
Reference in New Issue
Block a user