diff --git a/Customizations/AllKnownLayouts.ts b/Customizations/AllKnownLayouts.ts index f779bee..28bf590 100644 --- a/Customizations/AllKnownLayouts.ts +++ b/Customizations/AllKnownLayouts.ts @@ -1,7 +1,6 @@ import {LayerDefinition} from "./LayerDefinition"; import {Layout} from "./Layout"; import {All} from "./Layouts/All"; -import {CustomLayout} from "../Logic/CustomLayers"; import {Groen} from "./Layouts/Groen"; import Cyclofix from "./Layouts/Cyclofix"; import {StreetWidth} from "./Layouts/StreetWidth"; @@ -16,13 +15,14 @@ import * as bookcases from "../assets/themes/bookcases/Bookcases.json"; import * as aed from "../assets/themes/aed/aed.json"; import * as toilets from "../assets/themes/toilets/toilets.json"; import * as artworks from "../assets/themes/artwork/artwork.json"; +import {PersonalLayout} from "../Logic/PersonalLayout"; export class AllKnownLayouts { public static allLayers: Map = undefined; public static layoutsList: Layout[] = [ - new CustomLayout(), + new PersonalLayout(), new Natuurpunt(), new GRB(), new Cyclofix(), diff --git a/Customizations/JSON/CustomLayoutFromJSON.ts b/Customizations/JSON/CustomLayoutFromJSON.ts index 8bc2d15..122bda9 100644 --- a/Customizations/JSON/CustomLayoutFromJSON.ts +++ b/Customizations/JSON/CustomLayoutFromJSON.ts @@ -10,6 +10,7 @@ import {UIEventSource} from "../../Logic/UIEventSource"; import {TagDependantUIElementConstructor} from "../UIElementConstructor"; import {Map} from "../Layers/Map"; import {UIElement} from "../../UI/UIElement"; +import Translations from "../../UI/i18n/Translations"; export interface TagRenderingConfigJson { @@ -246,7 +247,7 @@ export class CustomLayoutFromJSON { json.id, { description: t(json.description), - name: t(json.title.render), + name: Translations.WT(t(json.title.render)).txt.replace(/[^a-zA-Z0-9-_]/g, ''), icon: icon, minzoom: parseInt(""+json.minzoom), title: tr(json.title), diff --git a/Customizations/Layout.ts b/Customizations/Layout.ts index 352df80..870c547 100644 --- a/Customizations/Layout.ts +++ b/Customizations/Layout.ts @@ -14,6 +14,7 @@ export class Layout { public icon: string = "./assets/logo.svg"; public title: UIElement; public maintainer: string; + public version: string; public description: string | UIElement; public socialImage: string = ""; diff --git a/InitUiElements.ts b/InitUiElements.ts index 860ffa3..b4a1ffd 100644 --- a/InitUiElements.ts +++ b/InitUiElements.ts @@ -20,13 +20,13 @@ import {WelcomeMessage} from "./UI/WelcomeMessage"; import {Img} from "./UI/Img"; import {DropDown} from "./UI/Input/DropDown"; import {LayerSelection} from "./UI/LayerSelection"; -import {CustomLayersPanel} from "./Logic/CustomLayersPanel"; -import {CustomLayout} from "./Logic/CustomLayers"; import {Preset} from "./Customizations/LayerDefinition"; import {VariableUiElement} from "./UI/Base/VariableUIElement"; import {LayerUpdater} from "./Logic/LayerUpdater"; import {UIEventSource} from "./Logic/UIEventSource"; import {QueryParameters} from "./Logic/Web/QueryParameters"; +import {PersonalLayout} from "./Logic/PersonalLayout"; +import {PersonalLayersPanel} from "./Logic/PersonalLayersPanel"; export class InitUiElements { @@ -50,8 +50,8 @@ export class InitUiElements { const layoutToUse = State.state.layoutToUse.data; let welcome: UIElement = new WelcomeMessage(); - if (layoutToUse.name === CustomLayout.NAME) { - welcome = new CustomLayersPanel(); + if (layoutToUse.name === PersonalLayout.NAME) { + welcome = new PersonalLayersPanel(); } const tabs = [ diff --git a/Logic/CustomLayersState.ts b/Logic/CustomLayersState.ts deleted file mode 100644 index e4cae27..0000000 --- a/Logic/CustomLayersState.ts +++ /dev/null @@ -1,88 +0,0 @@ -import {State} from "../State"; - -export class CustomLayersState { - static RemoveFavouriteLayer(layer: string) { - - State.state.GetFilteredLayerFor(layer)?.isDisplayed?.setData(false); - - const favs = State.state.favourteLayers.data; - const ind = favs.indexOf(layer); - if (ind < 0) { - return; - } - - favs.splice(ind, 1); - - - const osmConnection = State.state.osmConnection; - const count = osmConnection.GetPreference("mapcomplete-custom-layer-count"); - for (let i = 0; i < favs.length; i++) { - const layerIDescr = osmConnection.GetPreference("mapcomplete-custom-layer-" + i); - layerIDescr.setData(favs[i]); - } - count.setData("" + favs.length) - } - - static AddFavouriteLayer(layer: string) { - State.state.GetFilteredLayerFor(layer)?.isDisplayed?.setData(true); - - const favs = State.state.favourteLayers.data; - const ind = favs.indexOf(layer); - if (ind >= 0) { - return; - } - console.log("Adding fav layer", layer); - favs.push(layer); - - - const osmConnection = State.state.osmConnection; - const count = osmConnection.GetPreference("mapcomplete-custom-layer-count"); - if (count.data === undefined || isNaN(Number(count.data))) { - count.data = "0"; - } - const lastId = Number(count.data); - - for (let i = 0; i < lastId; i++) { - const layerIDescr = osmConnection.GetPreference("mapcomplete-custom-layer-" + i); - if (layerIDescr.data === undefined || layerIDescr.data === "") { - // An earlier item was removed -> overwrite it - layerIDescr.setData(layer); - count.ping(); - return; - } - } - - // No empty slot found -> create a new one - const layerIDescr = osmConnection.GetPreference("mapcomplete-custom-layer-" + lastId); - layerIDescr.setData(layer); - count.setData((lastId + 1) + ""); - } - - static InitFavouriteLayers(state: State) { - const osmConnection = state.osmConnection; - const count = osmConnection.GetPreference("mapcomplete-custom-layer-count"); - const favs = state.favourteLayers.data; - let changed = false; - count.addCallback((countStr) => { - console.log("Updating favourites") - if (countStr === undefined) { - return; - } - let countI = Number(countStr); - if (isNaN(countI)) { - countI = 999; - } - for (let i = 0; i < countI; i++) { - const layerId = osmConnection.GetPreference("mapcomplete-custom-layer-" + i).data; - if (layerId !== undefined && layerId !== "" && favs.indexOf(layerId) < 0) { - state.favourteLayers.data.push(layerId); - changed = true; - } - } - if (changed) { - state.favourteLayers.ping(); - } - }) - } - -} \ No newline at end of file diff --git a/Logic/Osm/ChangesetHandler.ts b/Logic/Osm/ChangesetHandler.ts new file mode 100644 index 0000000..2bf24af --- /dev/null +++ b/Logic/Osm/ChangesetHandler.ts @@ -0,0 +1,131 @@ +import {State} from "../../State"; +import {UserDetails} from "./OsmConnection"; +import {UIEventSource} from "../UIEventSource"; + +export class ChangesetHandler { + + private _dryRun: boolean; + private userDetails: UIEventSource; + private auth: any; + + constructor(dryRun: boolean, userDetails: UIEventSource, auth) { + this._dryRun = dryRun; + this.userDetails = userDetails; + this.auth = auth; + + if (dryRun) { + console.log("DRYRUN ENABLED"); + } + } + + + public UploadChangeset(generateChangeXML: (csid: string) => string, + handleMapping: (idMapping: any) => void, + continuation: () => void) { + + if (this._dryRun) { + console.log("NOT UPLOADING as dryrun is true"); + var changesetXML = generateChangeXML("123456"); + console.log(changesetXML); + continuation(); + return; + } + + const self = this; + this.OpenChangeset( + function (csId) { + var changesetXML = generateChangeXML(csId); + self.AddChange(csId, changesetXML, + function (csId, mapping) { + self.CloseChangeset(csId, continuation); + handleMapping(mapping); + } + ); + + } + ); + + this.userDetails.data.csCount++; + this.userDetails.ping(); + } + + + private OpenChangeset(continuation: (changesetId: string) => void) { + + const layout = State.state.layoutToUse.data; + + this.auth.xhr({ + method: 'PUT', + path: '/api/0.6/changeset/create', + options: {header: {'Content-Type': 'text/xml'}}, + content: [``, + ``, + ``, + ``, + layout.maintainer !== undefined ? `` : "", + ``].join("") + }, function (err, response) { + if (response === undefined) { + console.log("err", err); + alert("Could not upload change (opening failed). Please file a bug report") + return; + } else { + continuation(response); + } + }); + } + + private AddChange(changesetId: string, + changesetXML: string, + continuation: ((changesetId: string, idMapping: any) => void)) { + this.auth.xhr({ + method: 'POST', + options: {header: {'Content-Type': 'text/xml'}}, + path: '/api/0.6/changeset/' + changesetId + '/upload', + content: changesetXML + }, function (err, response) { + if (response == null) { + console.log("err", err); + return; + } + const mapping = ChangesetHandler.parseUploadChangesetResponse(response); + console.log("Uploaded changeset ", changesetId); + continuation(changesetId, mapping); + }); + } + + private CloseChangeset(changesetId: string, continuation: (() => void)) { + console.log("closing"); + this.auth.xhr({ + method: 'PUT', + path: '/api/0.6/changeset/' + changesetId + '/close', + }, function (err, response) { + if (response == null) { + + console.log("err", err); + } + console.log("Closed changeset ", changesetId); + + if (continuation !== undefined) { + continuation(); + } + }); + } + + private static parseUploadChangesetResponse(response: XMLDocument) { + const nodes = response.getElementsByTagName("node"); + const mapping = {}; + // @ts-ignore + for (const node of nodes) { + const oldId = parseInt(node.attributes.old_id.value); + const newId = parseInt(node.attributes.new_id.value); + if (oldId !== undefined && newId !== undefined && + !isNaN(oldId) && !isNaN(newId)) { + mapping["node/" + oldId] = "node/" + newId; + } + } + return mapping; + } + + +} \ No newline at end of file diff --git a/Logic/Osm/OsmConnection.ts b/Logic/Osm/OsmConnection.ts index c4e98b2..d8a6d92 100644 --- a/Logic/Osm/OsmConnection.ts +++ b/Logic/Osm/OsmConnection.ts @@ -1,8 +1,10 @@ // @ts-ignore import osmAuth from "osm-auth"; import {UIEventSource} from "../UIEventSource"; -import {CustomLayersState} from "../CustomLayersState"; import {State} from "../../State"; +import {All} from "../../Customizations/Layouts/All"; +import {OsmPreferences} from "./OsmPreferences"; +import {ChangesetHandler} from "./ChangesetHandler"; export class UserDetails { @@ -22,6 +24,11 @@ export class OsmConnection { public userDetails: UIEventSource; private _dryRun: boolean; + public _preferencesHandler: OsmPreferences; + private _changesetHandler: ChangesetHandler; + + private _onLoggedIn : ((userDetails: UserDetails) => void)[] = []; + constructor(dryRun: boolean, oauth_token: UIEventSource, singlePage: boolean = true) { let pwaStandAloneMode = false; @@ -61,16 +68,18 @@ export class OsmConnection { this.userDetails.data.dryRun = dryRun; this._dryRun = dryRun; - + this._preferencesHandler = new OsmPreferences(this.auth, this); + + this._changesetHandler = new ChangesetHandler(dryRun, this.userDetails, this.auth); if (oauth_token.data !== undefined) { console.log(oauth_token.data) const self = this; - this.auth.bootstrapToken(oauth_token.data, + this.auth.bootstrapToken(oauth_token.data, (x) => { console.log("Called back: ", x) self.AttemptLogin(); }, this.auth); - + oauth_token.setData(undefined); } @@ -79,15 +88,27 @@ export class OsmConnection { } else { console.log("Not authenticated"); } - - - if (dryRun) { - console.log("DRYRUN ENABLED"); - } - - } + + public UploadChangeset(generateChangeXML: (csid: string) => string, + handleMapping: (idMapping: any) => void, + continuation: () => void) { + this._changesetHandler.UploadChangeset(generateChangeXML, handleMapping, continuation); + } + + public GetPreference(key: string, prefix: string = "mapcomplete-"): UIEventSource { + return this._preferencesHandler.GetPreference(key, prefix); + } + + public GetLongPreference(key: string, prefix: string = "mapcomplete-"): UIEventSource { + return this._preferencesHandler.GetLongPreference(key, prefix); + } + + public OnLoggedIn(action: (userDetails: UserDetails) => void){ + this._onLoggedIn.push(action); + } + public LogOut() { this.auth.logout(); this.userDetails.data.loggedIn = false; @@ -112,7 +133,6 @@ export class OsmConnection { return; } - self.UpdatePreferences(); self.CheckForMessagesContinuously(); // details is an XML DOM of user details @@ -143,8 +163,12 @@ export class OsmConnection { const messages = userInfo.getElementsByTagName("messages")[0].getElementsByTagName("received")[0]; data.unreadMessages = parseInt(messages.getAttribute("unread")); data.totalMessages = parseInt(messages.getAttribute("count")); - self.userDetails.ping(); + + for (const action of self._onLoggedIn) { + action(self.userDetails.data); + } + self.userDetails.ping(); }); } @@ -159,208 +183,5 @@ export class OsmConnection { }, 5 * 60 * 1000); } - public preferences = new UIEventSource({}); - public preferenceSources : any = {} - - public GetPreference(key: string, prefix : string = "mapcomplete-") : UIEventSource{ - key = prefix+key; - if (this.preferenceSources[key] !== undefined) { - return this.preferenceSources[key]; - } - if (this.userDetails.data.loggedIn && this.preferences.data[key] === undefined) { - this.UpdatePreferences(); - } - const pref = new UIEventSource(this.preferences.data[key]); - pref.addCallback((v) => { - this.SetPreference(key, v); - }); - - this.preferences.addCallback((prefs) => { - if (prefs[key] !== undefined) { - pref.setData(prefs[key]); - } - }); - - this.preferenceSources[key] = pref; - return pref; - } - - private UpdatePreferences() { - const self = this; - this.auth.xhr({ - method: 'GET', - path: '/api/0.6/user/preferences' - }, function (error, value: XMLDocument) { - if(error){ - console.log("Could not load preferences", error); - return; - } - const prefs = value.getElementsByTagName("preference"); - for (let i = 0; i < prefs.length; i++) { - const pref = prefs[i]; - const k = pref.getAttribute("k"); - const v = pref.getAttribute("v"); - self.preferences.data[k] = v; - } - self.preferences.ping(); - }); - } - - private SetPreference(k:string, v:string) { - if(!this.userDetails.data.loggedIn){ - console.log("Not saving preference: user not logged in"); - return; - } - - if (this.preferences.data[k] === v) { - console.log("Not updating preference", k, " to ", v, "not changed"); - return; - } - console.log("Updating preference", k, " to ", v); - - this.preferences.data[k] = v; - this.preferences.ping(); - - if(v === ""){ - this.auth.xhr({ - method: 'DELETE', - path: '/api/0.6/user/preferences/' + k, - options: {header: {'Content-Type': 'text/plain'}}, - }, function (error, result) { - if (error) { - console.log("Could not remove preference", error); - return; - } - - console.log("Preference removed!", result == "" ? "OK" : result); - - }); - } - - - this.auth.xhr({ - method: 'PUT', - path: '/api/0.6/user/preferences/' + k, - options: {header: {'Content-Type': 'text/plain'}}, - content: v - }, function (error, result) { - if (error) { - console.log("Could not set preference", error); - return; - } - - console.log("Preference written!", result == "" ? "OK" : result); - - }); - } - - private static parseUploadChangesetResponse(response: XMLDocument) { - const nodes = response.getElementsByTagName("node"); - const mapping = {}; - // @ts-ignore - for (const node of nodes) { - const oldId = parseInt(node.attributes.old_id.value); - const newId = parseInt(node.attributes.new_id.value); - if (oldId !== undefined && newId !== undefined && - !isNaN(oldId) && !isNaN(newId)) { - mapping["node/" + oldId] = "node/" + newId; - } - } - return mapping; - } - - - public UploadChangeset(generateChangeXML: (csid: string) => string, - handleMapping: (idMapping: any) => void, - continuation: () => void) { - - if (this._dryRun) { - console.log("NOT UPLOADING as dryrun is true"); - var changesetXML = generateChangeXML("123456"); - console.log(changesetXML); - continuation(); - return; - } - - const self = this; - this.OpenChangeset( - function (csId) { - var changesetXML = generateChangeXML(csId); - self.AddChange(csId, changesetXML, - function (csId, mapping) { - self.CloseChangeset(csId, continuation); - handleMapping(mapping); - } - ); - - } - ); - - this.userDetails.data.csCount++; - this.userDetails.ping(); - } - - - private OpenChangeset(continuation: (changesetId: string) => void) { - - const layout = State.state.layoutToUse.data; - - this.auth.xhr({ - method: 'PUT', - path: '/api/0.6/changeset/create', - options: {header: {'Content-Type': 'text/xml'}}, - content: [``, - ``, - ``, - ``, - layout.maintainer !== undefined ? `` : "", - ``].join("") - }, function (err, response) { - if (response === undefined) { - console.log("err", err); - alert("Could not upload change (opening failed). Please file a bug report") - return; - } else { - continuation(response); - } - }); - } - - private AddChange(changesetId: string, - changesetXML: string, - continuation: ((changesetId: string, idMapping: any) => void)){ - this.auth.xhr({ - method: 'POST', - options: { header: { 'Content-Type': 'text/xml' } }, - path: '/api/0.6/changeset/'+changesetId+'/upload', - content: changesetXML - }, function (err, response) { - if (response == null) { - console.log("err", err); - return; - } - const mapping = OsmConnection.parseUploadChangesetResponse(response); - console.log("Uploaded changeset ", changesetId); - continuation(changesetId, mapping); - }); - } - - private CloseChangeset(changesetId: string, continuation : (() => void)) { - console.log("closing"); - this.auth.xhr({ - method: 'PUT', - path: '/api/0.6/changeset/'+changesetId+'/close', - }, function (err, response) { - if (response == null) { - - console.log("err", err); - } - console.log("Closed changeset ", changesetId); - - if(continuation !== undefined){ - continuation(); - } - }); - } } \ No newline at end of file diff --git a/Logic/Osm/OsmPreferences.ts b/Logic/Osm/OsmPreferences.ts new file mode 100644 index 0000000..d2a77ba --- /dev/null +++ b/Logic/Osm/OsmPreferences.ts @@ -0,0 +1,176 @@ +import {UIEventSource} from "../UIEventSource"; +import {OsmConnection, UserDetails} from "./OsmConnection"; +import {All} from "../../Customizations/Layouts/All"; +import {Utils} from "../../Utils"; + +export class OsmPreferences { + + private auth: any; + private userDetails: UIEventSource; + + public preferences = new UIEventSource({}); + public preferenceSources: any = {} + + constructor(auth, osmConnection: OsmConnection) { + this.auth = auth; + this.userDetails = osmConnection.userDetails; + const self = this; + osmConnection.OnLoggedIn(() => self.UpdatePreferences()); + } + + /** + * OSM preferences can be at most 255 chars + * @param key + * @param prefix + * @constructor + */ + public GetLongPreference(key: string, prefix: string = "mapcomplete-"): UIEventSource { + const source = new UIEventSource(undefined); + + const allStartWith = prefix + key + "-combined"; + // Gives the number of combined preferences + const length = this.GetPreference(allStartWith + "-length", ""); + + console.log("Getting long pref " + prefix + key); + const self = this; + source.addCallback(str => { + if (str === undefined) { + for (const prefKey in self.preferenceSources) { + if (prefKey.startsWith(allStartWith)) { + self.GetPreference(prefKey, "").setData(undefined); + } + } + return; + } + + let i = 0; + while (str !== "") { + self.GetPreference(allStartWith + "-" + i, "").setData(str.substr(0, 255)); + str = str.substr(255); + i++; + } + length.setData("" + i); + }); + + + function updateData(l: number) { + if (l === undefined) { + source.setData(undefined); + return; + } + const length = Number(l); + let str = ""; + for (let i = 0; i < length; i++) { + str += self.GetPreference(allStartWith + "-" + i, "").data; + } + source.setData(str); + source.ping(); + console.log("Long preference ", key, " has ", str.length, " chars"); + } + + length.addCallback(l => { + updateData(Number(l)); + }); + updateData(Number(length.data)); + + return source; + } + + public GetPreference(key: string, prefix: string = "mapcomplete-"): UIEventSource { + key = prefix + key; + if(key.length >= 255){ + throw "Preferences: key length to big"; + } + if (this.preferenceSources[key] !== undefined) { + return this.preferenceSources[key]; + } + if (this.userDetails.data.loggedIn && this.preferences.data[key] === undefined) { + this.UpdatePreferences(); + } + const pref = new UIEventSource(this.preferences.data[key]); + pref.addCallback((v) => { + this.SetPreference(key, v); + }); + + this.preferences.addCallback((prefs) => { + if (prefs[key] !== undefined) { + pref.setData(prefs[key]); + } + }); + + this.preferenceSources[key] = pref; + return pref; + } + + private UpdatePreferences() { + const self = this; + this.auth.xhr({ + method: 'GET', + path: '/api/0.6/user/preferences' + }, function (error, value: XMLDocument) { + if (error) { + console.log("Could not load preferences", error); + return; + } + const prefs = value.getElementsByTagName("preference"); + for (let i = 0; i < prefs.length; i++) { + const pref = prefs[i]; + const k = pref.getAttribute("k"); + const v = pref.getAttribute("v"); + self.preferences.data[k] = v; + } + self.preferences.ping(); + }); + } + + private SetPreference(k: string, v: string) { + if (!this.userDetails.data.loggedIn) { + console.log("Not saving preference: user not logged in"); + return; + } + + if (this.preferences.data[k] === v) { + console.log("Not updating preference", k, " to ", v, "not changed"); + return; + } + console.log("Updating preference", k, " to ", Utils.EllipsesAfter(v, 15)); + + this.preferences.data[k] = v; + this.preferences.ping(); + + if (v === "") { + this.auth.xhr({ + method: 'DELETE', + path: '/api/0.6/user/preferences/' + k, + options: {header: {'Content-Type': 'text/plain'}}, + }, function (error, result) { + if (error) { + console.log("Could not remove preference", error); + return; + } + + console.log("Preference removed!", result == "" ? "OK" : result); + + }); + return; + } + + + this.auth.xhr({ + method: 'PUT', + path: '/api/0.6/user/preferences/' + k, + options: {header: {'Content-Type': 'text/plain'}}, + content: v + }, function (error, result) { + if (error) { + console.log("Could not set preference", error); + return; + } + + console.log("Preference written!", result == "" ? "OK" : result); + + }); + } + + +} \ No newline at end of file diff --git a/Logic/CustomLayersPanel.ts b/Logic/PersonalLayersPanel.ts similarity index 84% rename from Logic/CustomLayersPanel.ts rename to Logic/PersonalLayersPanel.ts index 455b037..98fc1e1 100644 --- a/Logic/CustomLayersPanel.ts +++ b/Logic/PersonalLayersPanel.ts @@ -6,40 +6,38 @@ import {AllKnownLayouts} from "../Customizations/AllKnownLayouts"; import Combine from "../UI/Base/Combine"; import {Img} from "../UI/Img"; import {CheckBox} from "../UI/Input/CheckBox"; -import {CustomLayersState} from "./CustomLayersState"; import {VerticalCombine} from "../UI/Base/VerticalCombine"; import {FixedUiElement} from "../UI/Base/FixedUiElement"; -import {CustomLayout} from "./CustomLayers"; import {SubtleButton} from "../UI/Base/SubtleButton"; +import {PersonalLayout} from "./PersonalLayout"; -export class CustomLayersPanel extends UIElement { +export class PersonalLayersPanel extends UIElement { private checkboxes: UIElement[] = []; - - private updateButton : UIElement; + + private updateButton: UIElement; constructor() { - super(State.state.favourteLayers); + super(State.state.favouriteLayers); this.ListenTo(State.state.osmConnection.userDetails); const t = Translations.t.favourite; - const favs = State.state.favourteLayers.data; + const favs = State.state.favouriteLayers.data ?? []; this.updateButton = new SubtleButton("./assets/reload.svg", t.reload) .onClick(() => { State.state.layerUpdater.ForceRefresh(); - CustomLayersState.InitFavouriteLayers(State.state); State.state.layoutToUse.ping(); }) const controls = new Map>(); for (const layout of AllKnownLayouts.layoutsList) { - if(layout.name === CustomLayout.NAME){ + if (layout.name === PersonalLayout.NAME) { continue; } - if (layout.hideFromOverview && + if (layout.hideFromOverview && State.state.osmConnection.userDetails.data.name !== "Pieter Vander Vennet") { continue } @@ -86,18 +84,20 @@ export class CustomLayersPanel extends UIElement { controls[layer.id] = cb.isEnabled; cb.isEnabled.addCallback((isEnabled) => { + const favs = State.state.favouriteLayers; if (isEnabled) { - CustomLayersState.AddFavouriteLayer(layer.id) + favs.data.push(layer.id); } else { - CustomLayersState.RemoveFavouriteLayer(layer.id); + favs.data.splice(favs.data.indexOf(layer.id), 1); } + favs.ping(); }) this.checkboxes.push(cb); } - State.state.favourteLayers.addCallback((layers) => { + State.state.favouriteLayers.addCallback((layers) => { for (const layerId of layers) { controls[layerId]?.setData(true); } diff --git a/Logic/CustomLayers.ts b/Logic/PersonalLayout.ts similarity index 83% rename from Logic/CustomLayers.ts rename to Logic/PersonalLayout.ts index 72121f5..77355e0 100644 --- a/Logic/CustomLayers.ts +++ b/Logic/PersonalLayout.ts @@ -1,13 +1,13 @@ import {Layout} from "../Customizations/Layout"; import Translations from "../UI/i18n/Translations"; -export class CustomLayout extends Layout { +export class PersonalLayout extends Layout { public static NAME: string = "personal"; constructor() { super( - CustomLayout.NAME, + PersonalLayout.NAME, ["en"], Translations.t.favourite.title, [], @@ -20,7 +20,4 @@ export class CustomLayout extends Layout { this.icon = "./assets/star.svg" } -} - - - \ No newline at end of file +} \ No newline at end of file diff --git a/README.md b/README.md index 8181fad..353f890 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,9 @@ A typical user journey would be: ## License -GPL + pingback. +GPLv3.0 + recommended pingback. -I love it to see where the project ends up. You are free to reuse the software (under GPL) but, when you have made your own change and are using it, I would like to know about it. Drop me a line, give a pingback in the issues, ... +I love it to see where the project ends up. You are free to reuse the software (under GPL) but, when you have made your own change and are using it, I would like to know about it. Drop me a line, give a pingback in the issues,... ## Dev diff --git a/State.ts b/State.ts index 8b3de1f..e896c19 100644 --- a/State.ts +++ b/State.ts @@ -8,7 +8,6 @@ import {OsmConnection} from "./Logic/Osm/OsmConnection"; import Locale from "./UI/i18n/Locale"; import {VariableUiElement} from "./UI/Base/VariableUIElement"; import Translations from "./UI/i18n/Translations"; -import {CustomLayersState} from "./Logic/CustomLayersState"; import {FilteredLayer} from "./Logic/FilteredLayer"; import {LayerUpdater} from "./Logic/LayerUpdater"; import {UIEventSource} from "./Logic/UIEventSource"; @@ -24,7 +23,7 @@ export class State { // The singleton of the global state public static state: State; - public static vNumber = "0.0.6c"; + public static vNumber = "0.0.6d"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = { @@ -38,11 +37,7 @@ export class State { public static runningFromConsole: boolean = false; - /** - THe layout to use - */ public readonly layoutToUse = new UIEventSource(undefined); - public layoutDefinition : string; /** The mapping from id -> UIEventSource @@ -60,13 +55,15 @@ export class State { The user credentials */ public osmConnection: OsmConnection; - - public layerUpdater : LayerUpdater; - - + + public favouriteLayers: UIEventSource; + + public layerUpdater: LayerUpdater; + + public filteredLayers: UIEventSource = new UIEventSource([]) public presets: UIEventSource = new UIEventSource([]) - + /** * The message that should be shown at the center of the screen */ @@ -123,77 +120,96 @@ export class State { /** After this many milliseconds without changes, saves are sent of to OSM */ public readonly saveTimeout = new UIEventSource(30 * 1000); - - /** - * Layers can be marked as favourites, they show up in a custom layout - */ - public favourteLayers: UIEventSource = new UIEventSource([]) + public layoutDefinition: string; constructor(layoutToUse: Layout) { - this.layoutToUse = new UIEventSource(layoutToUse); + const self = this; + this.layoutToUse.setData(layoutToUse) this.locationControl = new UIEventSource<{ lat: number, lon: number, zoom: number }>({ - zoom: Utils.asFloat(this.zoom.data) ?? layoutToUse.startzoom, - lat: Utils.asFloat(this.lat.data) ?? layoutToUse.startLat, - lon: Utils.asFloat(this.lon.data) ?? layoutToUse.startLon + zoom: Utils.asFloat(this.zoom.data), + lat: Utils.asFloat(this.lat.data), + lon: Utils.asFloat(this.lon.data), }).addCallback((latlonz) => { this.zoom.setData(latlonz.zoom.toString()); this.lat.setData(latlonz.lat.toString().substr(0, 6)); this.lon.setData(latlonz.lon.toString().substr(0, 6)); - }) + }); + this.layoutToUse.addCallback(layoutToUse => { + const lcd = self.locationControl.data; + lcd.zoom = lcd.zoom ?? layoutToUse?.startzoom; + lcd.lat = lcd.lat ?? layoutToUse?.startLat; + lcd.lon = lcd.lon ?? layoutToUse?.startLon; + self.locationControl.ping(); + }); - const self = this; function featSw(key: string, deflt: (layout: Layout) => boolean): UIEventSource { const queryParameterSource = QueryParameters.GetQueryParameter(key, undefined); // I'm so sorry about someone trying to decipher this - + // It takes the current layout, extracts the default value for this query paramter. A query parameter event source is then retreived and flattened return UIEventSource.flatten( - self.layoutToUse.map((layout) => - QueryParameters.GetQueryParameter(key, "" + deflt(layout)).map((str) => str === undefined ? deflt(layout) : str !== "false")), [queryParameterSource]); + self.layoutToUse.map((layout) => { + const defaultValue = deflt(layout); + const queryParam = QueryParameters.GetQueryParameter(key, "" + defaultValue) + return queryParam.map((str) => str === undefined ? defaultValue : (str !== "false")); + }), [queryParameterSource]); } - this.featureSwitchUserbadge = featSw("fs-userbadge", (layoutToUse) => layoutToUse?.enableUserBadge); - this.featureSwitchSearch = featSw("fs-search", (layoutToUse) => layoutToUse?.enableSearch); - this.featureSwitchLayers = featSw("fs-layers", (layoutToUse) => layoutToUse?.enableLayers); - this.featureSwitchAddNew = featSw("fs-add-new", (layoutToUse) => layoutToUse?.enableAdd); + this.featureSwitchUserbadge = featSw("fs-userbadge", (layoutToUse) => layoutToUse?.enableUserBadge ?? true); + this.featureSwitchSearch = featSw("fs-search", (layoutToUse) => layoutToUse?.enableSearch ?? true); + this.featureSwitchLayers = featSw("fs-layers", (layoutToUse) => layoutToUse?.enableLayers ?? true); + this.featureSwitchAddNew = featSw("fs-add-new", (layoutToUse) => layoutToUse?.enableAdd ?? true); this.featureSwitchWelcomeMessage = featSw("fs-welcome-message", () => true); this.featureSwitchIframe = featSw("fs-iframe", () => false); - this.featureSwitchMoreQuests = featSw("fs-more-quests", () => layoutToUse?.enableMoreQuests); - this.featureSwitchShareScreen = featSw("fs-share-screen", () => layoutToUse?.enableShareScreen); - this.featureSwitchGeolocation = featSw("fs-geolocation", () => layoutToUse?.enableGeolocation); + this.featureSwitchMoreQuests = featSw("fs-more-quests", (layoutToUse) => layoutToUse?.enableMoreQuests ?? true); + this.featureSwitchShareScreen = featSw("fs-share-screen", (layoutToUse) => layoutToUse?.enableShareScreen ?? true); + this.featureSwitchGeolocation = featSw("fs-geolocation", (layoutToUse) => layoutToUse?.enableGeolocation ?? true); this.osmConnection = new OsmConnection( QueryParameters.GetQueryParameter("test", "false").data === "true", QueryParameters.GetQueryParameter("oauth_token", undefined) ); - - CustomLayersState.InitFavouriteLayers(this); - + + + this.favouriteLayers = this.osmConnection.GetLongPreference("favouriteLayers").map( + str => Utils.Dedup(str?.split(";")) ?? [], + [], layers => Utils.Dedup(layers)?.join(";") + ); + Locale.language.syncWith(this.osmConnection.GetPreference("language")); Locale.language.addCallback((currentLanguage) => { - if (layoutToUse.supportedLanguages.indexOf(currentLanguage) < 0) { + const layoutToUse = self.layoutToUse.data; + if (layoutToUse === undefined) { + return; + } + if (this.layoutToUse.data.supportedLanguages.indexOf(currentLanguage) < 0) { console.log("Resetting language to", layoutToUse.supportedLanguages[0], "as", currentLanguage, " is unsupported") // The current language is not supported -> switch to a supported one Locale.language.setData(layoutToUse.supportedLanguages[0]); } }).ping() - document.title = Translations.W(layoutToUse.title).InnerRender(); - Locale.language.addCallback(e => { - document.title = Translations.W(layoutToUse.title).InnerRender(); - }) + this.layoutToUse.map((layoutToUse) => { + if (layoutToUse === undefined) { + return "MapComplete"; + } + return Translations.W(layoutToUse.title).InnerRender() + }, [Locale.language] + ).addCallback((title) => { + document.title = title + }); this.allElements = new ElementStorage(); this.changes = new Changes(this); - if(State.runningFromConsole){ + if (State.runningFromConsole) { console.warn("running from console - not initializing map. Assuming test.html"); return; } diff --git a/UI/Base/VerticalCombine.ts b/UI/Base/VerticalCombine.ts index 03e7abf..2c4a0cd 100644 --- a/UI/Base/VerticalCombine.ts +++ b/UI/Base/VerticalCombine.ts @@ -13,7 +13,7 @@ export class VerticalCombine extends UIElement { InnerRender(): string { let html = ""; for (const element of this._elements) { - if (!element.IsEmpty()) { + if (element!== undefined && !element.IsEmpty()) { html += "
" + element.Render() + "
"; } } diff --git a/UI/MoreScreen.ts b/UI/MoreScreen.ts index 935274d..cd395fe 100644 --- a/UI/MoreScreen.ts +++ b/UI/MoreScreen.ts @@ -5,8 +5,12 @@ import {AllKnownLayouts} from "../Customizations/AllKnownLayouts"; import Combine from "./Base/Combine"; import {SubtleButton} from "./Base/SubtleButton"; import {State} from "../State"; -import {CustomLayout} from "../Logic/CustomLayers"; import {VariableUiElement} from "./Base/VariableUIElement"; +import {PersonalLayout} from "../Logic/PersonalLayout"; +import {FixedUiElement} from "./Base/FixedUiElement"; +import {Layout} from "../Customizations/Layout"; +import {CustomLayoutFromJSON} from "../Customizations/JSON/CustomLayoutFromJSON"; +import {All} from "../Customizations/Layouts/All"; export class MoreScreen extends UIElement { @@ -14,6 +18,48 @@ export class MoreScreen extends UIElement { constructor() { super(State.state.locationControl); this.ListenTo(State.state.osmConnection.userDetails); + this.ListenTo(State.state.osmConnection._preferencesHandler.preferences); + + } + + private createLinkButton(layout: Layout, customThemeDefinition: string = undefined) { + if (layout.hideFromOverview && State.state.osmConnection.userDetails.data.name !== "Pieter Vander Vennet") { + return undefined; + } + if (layout.name === State.state.layoutToUse.data.name) { + return undefined; + } + + if (layout.name === PersonalLayout.NAME) { + return undefined; + } + + const currentLocation = State.state.locationControl.data; + let linkText = + `./${layout.name}.html?z=${currentLocation.zoom}&lat=${currentLocation.lat}&lon=${currentLocation.lon}` + + if (location.hostname === "localhost" || location.hostname === "127.0.0.1") { + linkText = `./index.html?layout=${layout.name}&z=${currentLocation.zoom}&lat=${currentLocation.lat}&lon=${currentLocation.lon}` + } + + if (customThemeDefinition) { + linkText = `./index.html?userlayout=${layout.name}&z=${currentLocation.zoom}&lat=${currentLocation.lat}&lon=${currentLocation.lon}#${customThemeDefinition}` + + } + + let description = Translations.W(layout.description); + if (description !== undefined) { + description = new Combine(["
", description]); + } + const link = + new SubtleButton(layout.icon, + new Combine([ + "", + Translations.W(layout.title), + "", + description ?? "", + ]), {url: linkText, newTab: false}) + return link; } InnerRender(): string { @@ -28,7 +74,7 @@ export class MoreScreen extends UIElement { return tr.requestATheme.Render(); } return new SubtleButton("./assets/pencil.svg", tr.createYourOwnTheme, { - url: "https://pietervdvn.github.io/MapComplete/customGenerator.html", + url: "./customGenerator.html", newTab: false }).Render(); }) @@ -53,40 +99,44 @@ export class MoreScreen extends UIElement { for (const k in AllKnownLayouts.allSets) { - const layout = AllKnownLayouts.allSets[k] - if (layout.hideFromOverview && State.state.osmConnection.userDetails.data.name !== "Pieter Vander Vennet") { - continue + els.push(this.createLinkButton(AllKnownLayouts.allSets[k])); + } + + const installedThemes = State.state.osmConnection._preferencesHandler.preferences.map(allPreferences => { + const installedThemes = []; + if(allPreferences === undefined){ + return installedThemes; } - if (layout.name === State.state.layoutToUse.data.name) { + + for (const allPreferencesKey in allPreferences) { + "mapcomplete-installed-theme-Superficie-combined-length" + const themename = allPreferencesKey.match(/^mapcomplete-installed-theme-(.*)-combined-length$/); + if(themename){ + installedThemes.push(themename[1]); + } + } + + return installedThemes; + + }) + const customThemesNames = installedThemes.data ?? []; + if (customThemesNames !== []) { + els.push(Translations.t.general.customThemeIntro) + } + + console.log(customThemesNames); + for (const installedThemeName of customThemesNames) { + if(installedThemeName === ""){ continue; } - - if (layout.name === CustomLayout.NAME) { - continue; + const customThemeDefinition = State.state.osmConnection.GetLongPreference("installed-theme-" + installedThemeName); + try { + const layout = CustomLayoutFromJSON.FromQueryParam(customThemeDefinition.data); + els.push(this.createLinkButton(layout, customThemeDefinition.data)); + } catch (e) { + console.log(customThemeDefinition.data); + console.warn("Could not parse custom layout from preferences: ", installedThemeName, e); } - - const currentLocation = State.state.locationControl.data; - let linkText = - `./${layout.name}.html?z=${currentLocation.zoom}&lat=${currentLocation.lat}&lon=${currentLocation.lon}` - - if (location.hostname === "localhost" || location.hostname === "127.0.0.1") { - linkText = `./index.html?layout=${layout.name}&z=${currentLocation.zoom}&lat=${currentLocation.lat}&lon=${currentLocation.lon}` - } - - let description = Translations.W(layout.description); - if (description !== undefined) { - description = new Combine(["
", description]); - } - const link = - new SubtleButton(layout.icon, - new Combine([ - "", - Translations.W(layout.title), - "", - description ?? "", - ]), {url: linkText, newTab: false}); - - els.push(link) } diff --git a/UI/WelcomeMessage.ts b/UI/WelcomeMessage.ts index 34d86df..02282f5 100644 --- a/UI/WelcomeMessage.ts +++ b/UI/WelcomeMessage.ts @@ -22,11 +22,11 @@ export class WelcomeMessage extends UIElement { constructor() { super(State.state.osmConnection.userDetails); - this.languagePicker = Utils.CreateLanguagePicker(Translations.t.general.pickLanguage); this.ListenTo(Locale.language); + this.languagePicker = Utils.CreateLanguagePicker(Translations.t.general.pickLanguage); function fromLayout(f: (layout: Layout) => (string | UIElement)): UIElement { - return Translations.W(f(State.state.layoutToUse.data)) + return Translations.W(f(State.state.layoutToUse.data)); } this.description = fromLayout((layout) => layout.welcomeMessage); diff --git a/UI/i18n/Translations.ts b/UI/i18n/Translations.ts index 3133936..211ef68 100644 --- a/UI/i18n/Translations.ts +++ b/UI/i18n/Translations.ts @@ -901,7 +901,8 @@ export default class Translations { nl: " of maak een nieuwe account aan ", fr: " ou registrez vous" }), - noTagsSelected: new T({en: "No tags selected"}) + noTagsSelected: new T({en: "No tags selected"}), + customThemeIntro: new T({en:"

Custom themes

These are previously visited user-generated themes."}) }, favourite: { diff --git a/Utils.ts b/Utils.ts index ad78e05..2767d13 100644 --- a/Utils.ts +++ b/Utils.ts @@ -72,5 +72,18 @@ export class Utils { } return str.substr(0, l - 3)+"..."; } + + public static Dedup(arr: string[]):string[]{ + if(arr === undefined){ + return undefined; + } + const newArr = []; + for (const string of arr) { + if(newArr.indexOf(string) < 0){ + newArr.push(string); + } + } + return newArr; + } } diff --git a/deploy.sh b/deploy.sh index 87c63dc..d7c4fbc 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,6 +1,8 @@ #! /bin/bash +mkdir assets/generated ts-node createLayouts.ts +find -name '*.png' | parallel optipng '{}' npm run build rm -rf /home/pietervdvn/git/pietervdvn.github.io/MapComplete/* cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/MapComplete/ diff --git a/index.ts b/index.ts index fb5964b..7fcdfec 100644 --- a/index.ts +++ b/index.ts @@ -13,10 +13,11 @@ import {InitUiElements} from "./InitUiElements"; import {StrayClickHandler} from "./Logic/Leaflet/StrayClickHandler"; import {GeoLocationHandler} from "./Logic/Leaflet/GeoLocationHandler"; import {State} from "./State"; -import {CustomLayout} from "./Logic/CustomLayers"; import {CustomLayoutFromJSON} from "./Customizations/JSON/CustomLayoutFromJSON"; import {QueryParameters} from "./Logic/Web/QueryParameters"; import {LocalStorageSource} from "./Logic/Web/LocalStorageSource"; +import {PersonalLayout} from "./Logic/PersonalLayout"; +import {OsmConnection} from "./Logic/Osm/OsmConnection"; TagRendering.injectFunction(); @@ -109,7 +110,9 @@ console.log("Using layout: ", layoutToUse.name); State.state = new State(layoutToUse); if (layoutFromBase64 !== "false") { State.state.layoutDefinition = hash.substr(1); - console.log(State.state.layoutDefinition) + State.state.osmConnection.OnLoggedIn(() => { + State.state.osmConnection.GetLongPreference("installed-theme-"+layoutToUse.name).setData(State.state.layoutDefinition); + }) } InitUiElements.InitBaseMap(); @@ -152,8 +155,8 @@ function setupAllLayerElements() { setupAllLayerElements(); -if (layoutToUse === AllKnownLayouts.allSets[CustomLayout.NAME]) { - State.state.favourteLayers.addCallback((favs) => { +if (layoutToUse === AllKnownLayouts.allSets[PersonalLayout.NAME]) { + State.state.favouriteLayers.addCallback((favs: string[]) => { layoutToUse.layers = []; for (const fav of favs) { const layer = AllKnownLayouts.allLayers[fav]; @@ -161,9 +164,10 @@ if (layoutToUse === AllKnownLayouts.allSets[CustomLayout.NAME]) { layoutToUse.layers.push(layer); } setupAllLayerElements(); - }; + } + ; State.state.locationControl.ping(); - + }) } diff --git a/package-lock.json b/package-lock.json index 59ca8ef..f952f72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -917,82 +917,6 @@ "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==" }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "@istanbuljs/schema": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", - "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", - "dev": true - }, "@mapbox/geojson-area": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@mapbox/geojson-area/-/geojson-area-0.2.2.tgz", @@ -1084,30 +1008,12 @@ "integrity": "sha512-8GAYQ1jDRUQkSpHzJUqXwAkYFOxuWAOGLhIR4aPd/Y/yL12Q/9m7LsKpHKlfKdNE/362Hc9wPI1Yh6opDfxVJg==", "dev": true }, - "@types/chai": { - "version": "4.2.12", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.12.tgz", - "integrity": "sha512-aN5IAC8QNtSUdQzxu7lGBgYAOuU1tmRU4c9dIq5OKGf/SBVjXo+ffM2wEjudAWbgpOhy60nLoAGH1xm8fpCKFQ==", - "dev": true - }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, "@types/geojson": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz", "integrity": "sha512-Xqg/lIZMrUd0VRmSRbCAewtwGZiAk3mEUDvV4op1tGl+LvyPcb/MIOSxTl9z+9+J+R4/vpjiCAT4xeKzH9ji1w==", "optional": true }, - "@types/mocha": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", - "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", - "dev": true - }, "@types/node": { "version": "7.10.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.11.tgz", @@ -1164,16 +1070,6 @@ "robust-orientation": "^1.1.3" } }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, "ajv": { "version": "6.12.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", @@ -1190,12 +1086,6 @@ "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", @@ -1241,27 +1131,12 @@ } } }, - "append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "requires": { - "default-require-extensions": "^3.0.0" - } - }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, "are-we-there-yet": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", @@ -1317,18 +1192,6 @@ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, - "array.prototype.map": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", - "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.4" - } - }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -1642,12 +1505,6 @@ "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -1809,18 +1666,6 @@ "unset-value": "^1.0.0" } }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - } - }, "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", @@ -2081,12 +1926,6 @@ } } }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -2213,12 +2052,6 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -2708,15 +2541,6 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, - "default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", - "dev": true, - "requires": { - "strip-bom": "^4.0.0" - } - }, "defaults": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", @@ -3021,35 +2845,6 @@ } } }, - "es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, - "es-get-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", - "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", - "dev": true, - "requires": { - "es-abstract": "^1.17.4", - "has-symbols": "^1.0.1", - "is-arguments": "^1.0.4", - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-string": "^1.0.5", - "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -3060,12 +2855,6 @@ "is-symbol": "^1.0.2" } }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, "es6-object-assign": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", @@ -3343,17 +3132,6 @@ } } }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -3362,23 +3140,6 @@ "locate-path": "^2.0.0" } }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - } - } - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -3389,59 +3150,6 @@ "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" }, - "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -3470,12 +3178,6 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, - "fromentries": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.1.tgz", - "integrity": "sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw==", - "dev": true - }, "fs": { "version": "0.0.1-security", "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", @@ -3630,12 +3332,6 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, "get-port": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", @@ -3710,12 +3406,6 @@ "unicode-trie": "^0.3.1" } }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -3834,22 +3524,6 @@ "minimalistic-assert": "^1.0.1" } }, - "hasha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", - "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", - "dev": true, - "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, "hex-color-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", @@ -3888,12 +3562,6 @@ "whatwg-encoding": "^1.0.1" } }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, "html-tags": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-1.2.0.tgz", @@ -4023,12 +3691,6 @@ "resolve-from": "^3.0.0" } }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, "incremental-convex-hull": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/incremental-convex-hull/-/incremental-convex-hull-1.0.1.tgz", @@ -4038,12 +3700,6 @@ "simplicial-complex": "^1.0.0" } }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, "indexes-of": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", @@ -4224,12 +3880,6 @@ "html-tags": "^1.0.0" } }, - "is-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", - "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", - "dev": true - }, "is-nan": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.0.tgz", @@ -4262,12 +3912,6 @@ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -4289,24 +3933,6 @@ "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==" }, - "is-set": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", - "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", - "dev": true - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true - }, - "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "dev": true - }, "is-svg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", @@ -4375,173 +4001,6 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "requires": { - "append-transform": "^2.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - } - }, - "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "iterate-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", - "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==", - "dev": true - }, - "iterate-value": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", - "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", - "dev": true, - "requires": { - "es-get-iterator": "^1.0.2", - "iterate-iterator": "^1.0.1" - } - }, "jade": { "version": "0.26.3", "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", @@ -4870,12 +4329,6 @@ "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=" }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -4920,23 +4373,6 @@ "vlq": "^0.2.2" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -5131,317 +4567,6 @@ "minimist": "^1.2.5" } }, - "mocha": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.1.1.tgz", - "integrity": "sha512-p7FuGlYH8t7gaiodlFreseLxEmxTgvyG9RgPHODFPySNhwUehu8NIb0vdSt3WFckSneswZ0Un5typYcWElk7HQ==", - "dev": true, - "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.3.1", - "debug": "3.2.6", - "diff": "4.0.2", - "escape-string-regexp": "1.0.5", - "find-up": "4.1.0", - "glob": "7.1.6", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "ms": "2.1.2", - "object.assign": "4.1.0", - "promise.allsettled": "1.0.2", - "serialize-javascript": "4.0.0", - "strip-json-comments": "3.0.1", - "supports-color": "7.1.0", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.0.0", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.1" - }, - "dependencies": { - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", - "dev": true - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "chokidar": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", - "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.3.0" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "readdirp": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", - "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", - "dev": true, - "requires": { - "picomatch": "^2.0.7" - } - }, - "strip-json-comments": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", - "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, "monotone-convex-hull-2d": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/monotone-convex-hull-2d/-/monotone-convex-hull-2d-1.0.1.tgz", @@ -5594,15 +4719,6 @@ "tar": "^4" } }, - "node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "requires": { - "process-on-spawn": "^1.0.0" - } - }, "node-releases": { "version": "1.1.56", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.56.tgz", @@ -5696,221 +4812,6 @@ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==" }, - "nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", - "dev": true, - "requires": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -6259,32 +5160,11 @@ "p-limit": "^1.1.0" } }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" }, - "package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } - }, "pako": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", @@ -6497,72 +5377,6 @@ "resolved": "https://registry.npmjs.org/physical-cpu-count/-/physical-cpu-count-2.0.0.tgz", "integrity": "sha1-GN4vl+S/epVRrXURlCtUlverpmA=" }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } - } - }, "pkg-up": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", @@ -7046,15 +5860,6 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, - "process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "requires": { - "fromentries": "^1.2.0" - } - }, "promise-svg2img": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/promise-svg2img/-/promise-svg2img-0.2.0.tgz", @@ -7068,19 +5873,6 @@ "canvg": "^1.5.3" } }, - "promise.allsettled": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", - "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", - "dev": true, - "requires": { - "array.prototype.map": "^1.0.1", - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", - "iterate-value": "^1.0.0" - } - }, "protocol-buffers-schema": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.4.0.tgz", @@ -7305,15 +6097,6 @@ } } }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -7565,15 +6348,6 @@ } } }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, "serialize-to-js": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/serialize-to-js/-/serialize-to-js-3.1.1.tgz", @@ -7872,40 +6646,6 @@ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, - "spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "requires": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "dependencies": { - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, "split": { "version": "0.2.10", "resolved": "https://registry.npmjs.org/split/-/split-0.2.10.tgz", @@ -8136,12 +6876,6 @@ "ansi-regex": "^3.0.0" } }, - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -8228,17 +6962,6 @@ "source-map-support": "~0.5.10" } }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -8890,26 +7613,11 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, "typescript": { "version": "3.9.7", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", @@ -9261,12 +7969,6 @@ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" }, - "workerpool": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", - "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==", - "dev": true - }, "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", @@ -9307,18 +8009,6 @@ "mkdirp": "^0.5.1" } }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "ws": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", @@ -9439,19 +8129,6 @@ "decamelize": "^1.2.0" } }, - "yargs-unparser": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.1.tgz", - "integrity": "sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "decamelize": "^1.2.0", - "flat": "^4.1.0", - "is-plain-obj": "^1.1.0", - "yargs": "^14.2.3" - } - }, "yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index a895d9c..006b8fc 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "@babel/polyfill": "^7.10.4", "@types/node": "^7.0.5", "assert": "^2.0.0", + "canvas": "^2.6.1", "chai": "^4.2.0", "fs": "0.0.1-security", "marked": "^1.1.1", diff --git a/preferences.ts b/preferences.ts index f6f46d5..8970ae0 100644 --- a/preferences.ts +++ b/preferences.ts @@ -57,5 +57,5 @@ function createTable(preferences: any) { el.AttachTo("maindiv"); } -connection.preferences.addCallback((prefs) => createTable(prefs)) +connection._preferencesHandler.preferences.addCallback((prefs) => createTable(prefs)) diff --git a/test.ts b/test.ts index b9d122d..3ade0f0 100644 --- a/test.ts +++ b/test.ts @@ -1,10 +1,15 @@ -import {TextField, ValidatedTextField} from "./UI/Input/TextField"; -import {CustomLayoutFromJSON} from "./Customizations/JSON/CustomLayoutFromJSON"; -import {And} from "./Logic/TagsFilter"; +import {OsmConnection} from "./Logic/Osm/OsmConnection"; +import {UIEventSource} from "./Logic/UIEventSource"; -const tags = CustomLayoutFromJSON.TagsFromJson("indoor=yes&access!=private"); -console.log(tags); -const m0 = new And(tags).matches([{k:"indoor",v:"yes"}, {k:"access",v: "yes"}]); -console.log("Matches 0", m0) -const m1 = new And(tags).matches([{k:"indoor",v:"yes"}, {k:"access",v: "private"}]); -console.log("Matches 1", m1) \ No newline at end of file +const conn = new OsmConnection(true, new UIEventSource(undefined)); +conn.AttemptLogin(); + +conn.userDetails.addCallback(userDetails => { + if (!userDetails.loggedIn) { + return; + } + const str = "01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"; + console.log(str.length); + conn.GetLongPreference("test").setData(str); +// console.log(got.length) +});