100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
UI update: Added or-map web component
Rich Turnerd939d697c339
diff --git a/ui/component/core/src/core.ts b/ui/component/core/src/core.tsindex d5d5f12dc..f43bc284f 100644--- a/ui/component/core/src/core.ts+++ b/ui/component/core/src/core.ts@@ -1,437 +1,459 @@export enum ORError {- NONE = "NONE",- MANAGER_FAILED_TO_LOAD = "MANAGER_FAILED_TO_LOAD",- KEYCLOAK_FAILED_TO_LOAD = "KEYCLOAK_FAILED_TO_LOAD",- AUTH_TYPE_UNSUPPORTED = "AUTH_TYPE_UNSUPPORTED"+ NONE = "NONE",+ MANAGER_FAILED_TO_LOAD = "MANAGER_FAILED_TO_LOAD",+ KEYCLOAK_FAILED_TO_LOAD = "KEYCLOAK_FAILED_TO_LOAD",+ AUTH_TYPE_UNSUPPORTED = "AUTH_TYPE_UNSUPPORTED"}export enum Auth {- KEYCLOAK = "KEYCLOAK",- BASIC = "BASIC",- NONE = "NONE"+ KEYCLOAK = "KEYCLOAK",+ BASIC = "BASIC",+ NONE = "NONE"}export enum OREvent {- INIT = "INIT",- AUTHENTICATED = "AUTHENTICATED",- ERROR = "ERROR"+ INIT = "INIT",+ AUTHENTICATED = "AUTHENTICATED",+ ERROR = "ERROR",+ READY = "READY"}export interface Credentials {- username: string;- password: string;+ username: string;+ password: string;}export interface LoginOptions {- redirectUrl?: string;- credentials?: Credentials;+ redirectUrl?: string;+ credentials?: Credentials;}export interface ManagerConfig {- managerUrl: string;- keycloakUrl?: string;- auth?: Auth;- realm?: string;- autoLogin: boolean;- credentials?: Credentials;+ managerUrl: string;+ keycloakUrl?: string;+ auth?: Auth;+ realm?: string;+ autoLogin: boolean;+ credentials?: Credentials;}export type EventCallback = (event: OREvent) => any;export class Manager {- get username() {- return this._username;- }-- get error() {- return this._error;- }-- get authenticated() {- return this._authenticated;- }-- get initialised() {- return this._config != null;- }-- get config() {- return this._config;- }-- get roles() {- return this._roles;- }-- get managerVersion() {- return this._managerVersion;- }-- get isManagerAvailable() {- return this._managerVersion && this._managerVersion !== "";- }-- get isError() {- return this._error != null;- }-- protected static normaliseConfig(config: ManagerConfig): ManagerConfig {- const normalisedConfig: ManagerConfig = Object.assign({}, config);-- if (!normalisedConfig.managerUrl || normalisedConfig.managerUrl === "") {- // Assume manager is running on same host as this code- normalisedConfig.managerUrl = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port;- } else {- // Normalise by stripping any trailing slashes- normalisedConfig.managerUrl = normalisedConfig.managerUrl.replace(/\/+$/, "");- }-- if (!normalisedConfig.realm || normalisedConfig.realm === "") {- // Assume master realm- normalisedConfig.realm = "master";- }-- if (normalisedConfig.auth === Auth.KEYCLOAK) {- // Determine URL of keycloak server- if (!normalisedConfig.keycloakUrl || normalisedConfig.keycloakUrl === "") {- // Assume keycloak is running on same host as the manager- normalisedConfig.keycloakUrl = normalisedConfig.managerUrl + "/auth";- } else {- // Normalise by stripping any trailing slashes- normalisedConfig.keycloakUrl = normalisedConfig.keycloakUrl.replace(/\/+$/, "");- }- }-- return normalisedConfig;- }-- // TODO: Implement console offline tokens- protected static getNativeOfflineRefreshToken(): string | null {- // if (this.console && this.console.enabled) {- // let storedToken = this.console.readNativeShellMessage('token');- // if (storedToken && storedToken.length > 0) {- // let storedTokenParsed = JSON.parse(storedToken);- // return storedTokenParsed.refreshToken;- // }- // }- return null;- }-- private _error: ORError = ORError.NONE;- private _config!: ManagerConfig;- private _authenticated: boolean = false;- private _name: string = "";- private _username: string = "";- private _keycloak: any = null;- private _roles: string[] = [];- private _keycloakUpdateTokenInterval?: number = undefined;- private _managerVersion: string = "";- private _listeners: EventCallback[] = [];-- public isManagerSameOrigin(): boolean {- if (!this.initialised) {- return false;- }-- const managerUrl = new URL(this._config.managerUrl);- const windowUrl = window.location;- return managerUrl.protocol === windowUrl.protocol- && managerUrl.hostname === windowUrl.hostname- && managerUrl.port === windowUrl.port;- }-- public addListener(callback: EventCallback) {- const index = this._listeners.indexOf(callback);- if (index < 0) {- this._listeners.push(callback);- }- }-- public removeListener(callback: EventCallback) {- const index = this._listeners.indexOf(callback);- if (index >= 0) {- this._listeners.splice(index, 1);- }- }-- public async init(config: ManagerConfig): Promise<boolean> {- if (this._config) {- console.log("Already initialised");- }-- this._config = config = Manager.normaliseConfig(config);-- // Check manager exists by calling the info endpoint- try {- const json = await new Promise<any>((resolve, reject) => {- const oReq = new XMLHttpRequest();- oReq.addEventListener("load", () => {- resolve(JSON.parse(oReq.responseText));- });- oReq.addEventListener("error", () => {- reject(new Error("Failed to contact the manager"));- });- oReq.open("GET", this._config.managerUrl + "/api/master/info");- oReq.send();- });- this._managerVersion = json && json.version ? json.version : "";- } catch (e) {- // TODO: Implement auto retry?- console.info("Failed to contact the manager", e);- this.setError(ORError.MANAGER_FAILED_TO_LOAD);- this.emitEvent(OREvent.INIT);- return false;- }-- switch (config.auth) {- case Auth.BASIC:- // TODO: Implement Basic auth support- this.setError(ORError.AUTH_TYPE_UNSUPPORTED);- this.emitEvent(OREvent.INIT);- return false;- case Auth.KEYCLOAK:- const success = await this.loadAndInitialiseKeycloak(config);- this.emitEvent(OREvent.INIT);- return success;- case Auth.NONE:- // Nothing for us to do here- this.emitEvent(OREvent.INIT);- return true;- default:- this.setError(ORError.AUTH_TYPE_UNSUPPORTED);- this.emitEvent(OREvent.INIT);- return false;+ get username() {+ return this._username;+ }++ get error() {+ return this._error;+ }++ get authenticated() {+ return this._authenticated;+ }++ get initialised() {+ return this._config != null;}- }- public getLogoutUrl(redirectUrl?: string) {- if (this._keycloak) {- const options = redirectUrl && redirectUrl !== "" ? {redirectUri: redirectUrl} : null;- return this._keycloak.createLogoutUrl(options);+ get ready() {+ return this._ready;}- return "#";- }+ get config() {+ return this._config;+ }- public getLoginUrl(redirectUrl?: string) {- if (this._keycloak) {- const options = redirectUrl && redirectUrl !== "" ? {redirectUri: redirectUrl} : null;- return this._keycloak.createLoginUrl(options);+ get roles() {+ return this._roles;}- return "#";- }+ get managerVersion() {+ return this._managerVersion;+ }- public logout(redirectUrl?: string) {- if (this._keycloak) {- const options = redirectUrl && redirectUrl !== "" ? {redirectUri: redirectUrl} : null;- this._keycloak.logout(options);+ get isManagerAvailable() {+ return this._managerVersion && this._managerVersion !== "";}- }- public login(options?: LoginOptions) {- if (!this.initialised) {- return;+ get isError() {+ return this._error != null;}- switch (this._config.auth) {- case Auth.BASIC:- if (options && options.credentials) {- this._config.credentials = Object.assign({}, options.credentials);++ protected static normaliseConfig(config: ManagerConfig): ManagerConfig {+ const normalisedConfig: ManagerConfig = Object.assign({}, config);++ if (!normalisedConfig.managerUrl || normalisedConfig.managerUrl === "") {+ // Assume manager is running on same host as this code+ normalisedConfig.managerUrl = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port;+ } else {+ // Normalise by stripping any trailing slashes+ normalisedConfig.managerUrl = normalisedConfig.managerUrl.replace(/\/+$/, "");+ }++ if (!normalisedConfig.realm || normalisedConfig.realm === "") {+ // Assume master realm+ normalisedConfig.realm = "master";}- const username = this._config.credentials ? this._config.credentials.username : null;- const password = this._config.credentials ? this._config.credentials.password : null;- if (username && password && username !== "" && password !== "") {- // TODO: Perform some request to check basic auth credentials- this.setAuthenticated(true);+ if (normalisedConfig.auth === Auth.KEYCLOAK) {+ // Determine URL of keycloak server+ if (!normalisedConfig.keycloakUrl || normalisedConfig.keycloakUrl === "") {+ // Assume keycloak is running on same host as the manager+ normalisedConfig.keycloakUrl = normalisedConfig.managerUrl + "/auth";+ } else {+ // Normalise by stripping any trailing slashes+ normalisedConfig.keycloakUrl = normalisedConfig.keycloakUrl.replace(/\/+$/, "");+ }}- break;- case Auth.KEYCLOAK:++ return normalisedConfig;+ }++ // TODO: Implement console offline tokens+ protected static getNativeOfflineRefreshToken(): string | null {+ // if (this.console && this.console.enabled) {+ // let storedToken = this.console.readNativeShellMessage('token');+ // if (storedToken && storedToken.length > 0) {+ // let storedTokenParsed = JSON.parse(storedToken);+ // return storedTokenParsed.refreshToken;+ // }+ // }+ return null;+ }++ private _error: ORError = ORError.NONE;+ private _config!: ManagerConfig;+ private _authenticated: boolean = false;+ private _ready: boolean = false;+ private _name: string = "";+ private _username: string = "";+ private _keycloak: any = null;+ private _roles: string[] = [];+ private _keycloakUpdateTokenInterval?: number = undefined;+ private _managerVersion: string = "";+ private _listeners: EventCallback[] = [];++ public isManagerSameOrigin(): boolean {+ if (!this.initialised) {+ return false;+ }++ const managerUrl = new URL(this._config.managerUrl);+ const windowUrl = window.location;+ return managerUrl.protocol === windowUrl.protocol+ && managerUrl.hostname === windowUrl.hostname+ && managerUrl.port === windowUrl.port;+ }++ public addListener(callback: EventCallback) {+ const index = this._listeners.indexOf(callback);+ if (index < 0) {+ this._listeners.push(callback);+ }+ }++ public removeListener(callback: EventCallback) {+ const index = this._listeners.indexOf(callback);+ if (index >= 0) {+ this._listeners.splice(index, 1);+ }+ }++ public async init(config: ManagerConfig): Promise<boolean> {+ if (this._config) {+ console.log("Already initialised");+ }++ this._config = config = Manager.normaliseConfig(config);+ const success = await this.doInit(config);+ if (success) {+ this._ready = true;+ this.emitEvent(OREvent.READY);+ }+ return success;+ }++ protected async doInit(config: ManagerConfig): Promise<boolean> {+ // Check manager exists by calling the info endpoint+ try {+ const json = await new Promise<any>((resolve, reject) => {+ const oReq = new XMLHttpRequest();+ oReq.addEventListener("load", () => {+ resolve(JSON.parse(oReq.responseText));+ });+ oReq.addEventListener("error", () => {+ reject(new Error("Failed to contact the manager"));+ });+ oReq.open("GET", this._config.managerUrl + "/api/master/info");+ oReq.send();+ });+ this._managerVersion = json && json.version ? json.version : "";+ } catch (e) {+ // TODO: Implement auto retry?+ console.info("Failed to contact the manager", e);+ this.setError(ORError.MANAGER_FAILED_TO_LOAD);+ this.emitEvent(OREvent.INIT);+ return false;+ }++ switch (config.auth) {+ case Auth.BASIC:+ // TODO: Implement Basic auth support+ this.setError(ORError.AUTH_TYPE_UNSUPPORTED);+ this.emitEvent(OREvent.INIT);+ return false;+ case Auth.KEYCLOAK:+ const success = await this.loadAndInitialiseKeycloak(config);+ this.emitEvent(OREvent.INIT);+ return success;+ case Auth.NONE:+ // Nothing for us to do here+ this.emitEvent(OREvent.INIT);+ return true;+ default:+ this.setError(ORError.AUTH_TYPE_UNSUPPORTED);+ this.emitEvent(OREvent.INIT);+ return false;+ }+ }++ public getLogoutUrl(redirectUrl?: string) {if (this._keycloak) {- const keycloakOptions: any = {};- if (options && options.redirectUrl && options.redirectUrl !== "") {- keycloakOptions.redirectUri = options.redirectUrl;- }- this._keycloak.login(keycloakOptions);+ const options = redirectUrl && redirectUrl !== "" ? {redirectUri: redirectUrl} : null;+ return this._keycloak.createLogoutUrl(options);}- break;- case Auth.NONE:- break;- }- }-- public isSuperUser() {- return this.hasRole("admin");- }-- public hasRole(role: string) {- return this._roles && this._roles.indexOf(role) >= 0;- }-- public getKeycloakToken(): string | undefined {- if (this._keycloak && this.authenticated) {- return this._keycloak.token;- }- return undefined;- }-- // TODO: Native shell support- protected isNative(): boolean {- // return this.console && this.console.enabled;- return false;- }-- protected onAuthenticated() {- console.log("Authentication successful");- }-- // NOTE: The below works with Keycloak 2.x JS API - They made breaking changes in newer versions- // so this will need updating.- protected async loadAndInitialiseKeycloak(config: ManagerConfig): Promise<boolean> {-- // Load the keycloak JS API- const promise = new Promise<Event>((resolve, reject) => {- // Load keycloak script from keycloak server- const scriptElement = document.createElement("script");- scriptElement.src = config.keycloakUrl + "/js/keycloak.js";- scriptElement.onload = (e) => resolve(e);- scriptElement.onerror = (e) => reject(e);- document.querySelector("head")!.appendChild(scriptElement);- });-- try {- await promise;-- // Should have Keycloak global var now- if (!(window as any).Keycloak) {- this.setError(ORError.KEYCLOAK_FAILED_TO_LOAD);- return false;- }-- // Initialise keycloak- this._keycloak = (window as any).Keycloak({- clientId: "openremote",- realm: config.realm,- url: config.keycloakUrl- });-- this._keycloak.onAuthSuccess = () => {- if (keycloakPromise) {- keycloakPromise(true);++ return "#";+ }++ public getLoginUrl(redirectUrl?: string) {+ if (this._keycloak) {+ const options = redirectUrl && redirectUrl !== "" ? {redirectUri: redirectUrl} : null;+ return this._keycloak.createLoginUrl(options);}- };-- this._keycloak.onAuthError = () => {- this.setAuthenticated(false);- };-- // There's a bug in some Keycloak versions which means the init promise doesn't resolve- // so putting a check in place; wrap keycloak promise in proper ES6 promise- let keycloakPromise: any = null;- try {- const authenticated = await new Promise<boolean>(((resolve, reject) => {- keycloakPromise = resolve;- this._keycloak.init({- checkLoginIframe: false, // Doesn't work well with offline tokens- onLoad: config.autoLogin ? "login-required" : "check-sso",- refreshToken: Manager.getNativeOfflineRefreshToken(), // Try to use a stored offline refresh token- scope: this.isNative() ? "offline_access" : null- }).success((auth: boolean) => {- resolve(auth);- }).error(() => {- reject();- });- }));-- keycloakPromise = null;- if (authenticated) {- this._name = this._keycloak.tokenParsed.name;- this._username = this._keycloak.tokenParsed.preferred_username;- this._roles = this._keycloak.realmAccess.roles;-- // Update the access token every 10s (note keycloak will only update if expiring within configured- // time period.- if (this._keycloakUpdateTokenInterval) {- clearInterval(this._keycloakUpdateTokenInterval);- delete this._keycloakUpdateTokenInterval;- }- this._keycloakUpdateTokenInterval = setInterval(() => {- this.updateKeycloakAccessToken();- }, 10000);- this.onAuthenticated();+ return "#";+ }++ public logout(redirectUrl?: string) {+ if (this._keycloak) {+ const options = redirectUrl && redirectUrl !== "" ? {redirectUri: redirectUrl} : null;+ this._keycloak.logout(options);+ }+ }++ public login(options?: LoginOptions) {+ if (!this.initialised) {+ return;+ }+ switch (this._config.auth) {+ case Auth.BASIC:+ if (options && options.credentials) {+ this._config.credentials = Object.assign({}, options.credentials);+ }+ const username = this._config.credentials ? this._config.credentials.username : null;+ const password = this._config.credentials ? this._config.credentials.password : null;++ if (username && password && username !== "" && password !== "") {+ // TODO: Perform some request to check basic auth credentials+ this.setAuthenticated(true);+ }+ break;+ case Auth.KEYCLOAK:+ if (this._keycloak) {+ const keycloakOptions: any = {};+ if (options && options.redirectUrl && options.redirectUrl !== "") {+ keycloakOptions.redirectUri = options.redirectUrl;+ }+ this._keycloak.login(keycloakOptions);+ }+ break;+ case Auth.NONE:+ break;+ }+ }++ public isSuperUser() {+ return this.hasRole("admin");+ }++ public hasRole(role: string) {+ return this._roles && this._roles.indexOf(role) >= 0;+ }++ public getAuthorizationHeader(): string | undefined {+ if (this._keycloak && this.authenticated) {+ return "Bearer " + this._keycloak.token;+ }++ return undefined;+ }++ public getKeycloakToken(): string | undefined {+ if (this._keycloak && this.authenticated) {+ return this._keycloak.token;}- this.setAuthenticated(authenticated);- return true;- } catch (e) {- keycloakPromise = null;- this.setAuthenticated(false);+ return undefined;+ }++ // TODO: Native shell support+ protected isNative(): boolean {+ // return this.console && this.console.enabled;return false;- }- } catch (error) {- this.setError(ORError.KEYCLOAK_FAILED_TO_LOAD);- return false;- }- }-- // TODO: Implement console offline tokens- protected storeNativeOfflineRefreshToken() {- // // If native shell is enabled, we need an offline refresh token- // if (this.console && this.console.enabled) {- //- // // If we don't have an offline refresh token, try to get one- // if (this.keycloak.refreshTokenParsed.typ !== "Offline") {- // console.debug("Native shell enabled, requesting offline refresh token")- // this.doKeycloakLogin()- // return;- // }- //- // // Transfer offline refresh token to native shell so it can be stored for future usage- // console.debug("Native shell enabled, storing offline refresh token");- // this.console.postNativeShellMessage({- // type: 'token',- // data: {refreshToken: this.keycloak.refreshToken}- // });- // }- }-- protected updateKeycloakAccessToken(): Promise<boolean> {- // Access token must be good for X more seconds, should be half of Constants.ACCESS_TOKEN_LIFESPAN_SECONDS- return new Promise<boolean>(() => {- this._keycloak.updateToken(30)- .success((tokenRefreshed: boolean) => {- // If refreshed from server, it means the refresh token was still good for another access token- console.debug("Access token update success, refreshed from server: " + tokenRefreshed);- return tokenRefreshed;- })- .error(() => {- // Refresh token expired (either SSO max session duration or offline idle timeout), see- // IDENTITY_SESSION_MAX_MINUTES and IDENTITY_SESSION_OFFLINE_TIMEOUT_MINUTES server config- console.info("Access token update failed, refresh token expired, login required");- this._keycloak.clearToken();- throw new Error("Access token update failed, refresh token expired, login required");+ }++ protected onAuthenticated() {+ console.log("Authentication successful");+ }++ // NOTE: The below works with Keycloak 2.x JS API - They made breaking changes in newer versions+ // so this will need updating.+ protected async loadAndInitialiseKeycloak(config: ManagerConfig): Promise<boolean> {++ // Load the keycloak JS API+ const promise = new Promise<Event>((resolve, reject) => {+ // Load keycloak script from keycloak server+ const scriptElement = document.createElement("script");+ scriptElement.src = config.keycloakUrl + "/js/keycloak.js";+ scriptElement.onload = (e) => resolve(e);+ scriptElement.onerror = (e) => reject(e);+ document.querySelector("head")!.appendChild(scriptElement);});- });- }- protected emitEvent(event: OREvent) {- for (const listener of this._listeners) {- listener(event);+ try {+ await promise;++ // Should have Keycloak global var now+ if (!(window as any).Keycloak) {+ this.setError(ORError.KEYCLOAK_FAILED_TO_LOAD);+ return false;+ }++ // Initialise keycloak+ this._keycloak = (window as any).Keycloak({+ clientId: "openremote",+ realm: config.realm,+ url: config.keycloakUrl+ });++ this._keycloak.onAuthSuccess = () => {+ if (keycloakPromise) {+ keycloakPromise(true);+ }+ };++ this._keycloak.onAuthError = () => {+ this.setAuthenticated(false);+ };++ // There's a bug in some Keycloak versions which means the init promise doesn't resolve+ // so putting a check in place; wrap keycloak promise in proper ES6 promise+ let keycloakPromise: any = null;+ try {+ const authenticated = await new Promise<boolean>(((resolve, reject) => {+ keycloakPromise = resolve;+ this._keycloak.init({+ checkLoginIframe: false, // Doesn't work well with offline tokens+ onLoad: config.autoLogin ? "login-required" : "check-sso",+ refreshToken: Manager.getNativeOfflineRefreshToken(), // Try to use a stored offline refresh token+ scope: this.isNative() ? "offline_access" : null+ }).success((auth: boolean) => {+ resolve(auth);+ }).error(() => {+ reject();+ });+ }));++ keycloakPromise = null;++ if (authenticated) {+ this._name = this._keycloak.tokenParsed.name;+ this._username = this._keycloak.tokenParsed.preferred_username;+ this._roles = this._keycloak.realmAccess.roles;++ // Update the access token every 10s (note keycloak will only update if expiring within configured+ // time period.+ if (this._keycloakUpdateTokenInterval) {+ clearInterval(this._keycloakUpdateTokenInterval);+ delete this._keycloakUpdateTokenInterval;+ }+ this._keycloakUpdateTokenInterval = setInterval(() => {+ this.updateKeycloakAccessToken();+ }, 10000);+ this.onAuthenticated();+ }+ this.setAuthenticated(authenticated);+ return true;+ } catch (e) {+ keycloakPromise = null;+ this.setAuthenticated(false);+ return false;+ }+ } catch (error) {+ this.setError(ORError.KEYCLOAK_FAILED_TO_LOAD);+ return false;+ }}- }- protected setError(error: ORError) {- this._error = error;- this.emitEvent(OREvent.ERROR);- }+ // TODO: Implement console offline tokens+ protected storeNativeOfflineRefreshToken() {+ // // If native shell is enabled, we need an offline refresh token+ // if (this.console && this.console.enabled) {+ //+ // // If we don't have an offline refresh token, try to get one+ // if (this.keycloak.refreshTokenParsed.typ !== "Offline") {+ // console.debug("Native shell enabled, requesting offline refresh token")+ // this.doKeycloakLogin()+ // return;+ // }+ //+ // // Transfer offline refresh token to native shell so it can be stored for future usage+ // console.debug("Native shell enabled, storing offline refresh token");+ // this.console.postNativeShellMessage({+ // type: 'token',+ // data: {refreshToken: this.keycloak.refreshToken}+ // });+ // }+ }- private setAuthenticated(authenticated: boolean) {- this._authenticated = authenticated;- if (authenticated) {- this.emitEvent(OREvent.AUTHENTICATED);+ protected updateKeycloakAccessToken(): Promise<boolean> {+ // Access token must be good for X more seconds, should be half of Constants.ACCESS_TOKEN_LIFESPAN_SECONDS+ return new Promise<boolean>(() => {+ this._keycloak.updateToken(30)+ .success((tokenRefreshed: boolean) => {+ // If refreshed from server, it means the refresh token was still good for another access token+ console.debug("Access token update success, refreshed from server: " + tokenRefreshed);+ return tokenRefreshed;+ })+ .error(() => {+ // Refresh token expired (either SSO max session duration or offline idle timeout), see+ // IDENTITY_SESSION_MAX_MINUTES and IDENTITY_SESSION_OFFLINE_TIMEOUT_MINUTES server config+ console.info("Access token update failed, refresh token expired, login required");+ this._keycloak.clearToken();+ throw new Error("Access token update failed, refresh token expired, login required");+ });+ });+ }++ protected emitEvent(event: OREvent) {+ for (const listener of this._listeners) {+ listener(event);+ }+ }++ protected setError(error: ORError) {+ this._error = error;+ this.emitEvent(OREvent.ERROR);+ }++ private setAuthenticated(authenticated: boolean) {+ this._authenticated = authenticated;+ if (authenticated) {+ this.emitEvent(OREvent.AUTHENTICATED);+ }}- }}export default new Manager();diff --git a/ui/component/or-map/.npmignore b/ui/component/or-map/.npmignorenew file mode 100644index 000000000..ca658009d--- /dev/null+++ b/ui/component/or-map/.npmignore@@ -0,0 +1,3 @@+build/+build.gradle+test/\ No newline at end of filediff --git a/ui/component/or-map/@types/mapbox.js.d.ts b/ui/component/or-map/@types/mapbox.js.d.tsnew file mode 100644index 000000000..95bdbc260--- /dev/null+++ b/ui/component/or-map/@types/mapbox.js.d.ts@@ -0,0 +1,20 @@+import {LngLatBoundsLike, LngLatLike} from "mapbox-gl";++export = L+export as namespace L;++declare namespace L {+ export namespace mapbox {+ export class Map {+ constructor(element: string | Element, tilejson: object, options?: MapOptions);+ }++ export interface MapOptions {+ boxZoom?: boolean;+ center?: LngLatLike;+ maxBounds?: LngLatBoundsLike;+ maxZoom?: number;+ minZoom?: number;+ }+ }+}\ No newline at end of filediff --git a/ui/component/or-map/README.md b/ui/component/or-map/README.mdnew file mode 100644index 000000000..db087e0eb--- /dev/null+++ b/ui/component/or-map/README.md@@ -0,0 +1,21 @@+# \<or-asset-tree\>++Displays assets in a tree++## Install the Polymer-CLI++First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) and npm (packaged with [Node.js](https://nodejs.org)) installed. Run `npm install` to install your element's dependencies, then run `polymer serve` to serve your element locally.++## Viewing Your Element++```+$ polymer serve+```++## Running Tests++```+$ polymer test+```++Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.diff --git a/ui/component/or-map/build.gradle b/ui/component/or-map/build.gradlenew file mode 100644index 000000000..012bdf2b6--- /dev/null+++ b/ui/component/or-map/build.gradle@@ -0,0 +1,11 @@+task clean() {+ doLast {+ delete "dist"+ }+}++task build() {+ dependsOn npmBuild+}++npmBuild.dependsOn(resolveTask(":ui:component:rest:build"))\ No newline at end of filediff --git a/ui/component/or-map/package.json b/ui/component/or-map/package.jsonnew file mode 100644index 000000000..db524eb35--- /dev/null+++ b/ui/component/or-map/package.json@@ -0,0 +1,30 @@+{+ "name": "@openremote/or-map",+ "version": "1.0.0",+ "description": "Displays s vector or raster mapx",+ "main": "build/or-map.js",+ "types": "src/or-map.ts",+ "scripts": {+ "build": "npx tsc",+ "test": "echo \"No tests\" && exit 0"+ },+ "author": "OpenRemote",+ "license": "AGPL-3.0-or-later",+ "dependencies": {+ "@openremote/rest": "^1.0.0",+ "@polymer/polymer": "^3.0.0",+ "@types/mapbox-gl": "^0.51.1",+ "mapbox-gl": "^0.52.0-beta.1",+ "mapbox.js": "^3.1.1"+ },+ "devDependencies": {+ "@polymer/decorators": "^3.0.0",+ "@polymer/iron-demo-helpers": "^3.0.0-pre.19",+ "@webcomponents/webcomponentsjs": "^2.0.0",+ "css-loader": "^2.0.0",+ "style-loader": "^0.23.1",+ "tslint": "^5.11.0",+ "typescript": "^3.1.6",+ "wct-browser-legacy": "^1.0.0"+ }+}diff --git a/ui/component/or-map/src/or-map.ts b/ui/component/or-map/src/or-map.tsnew file mode 100644index 000000000..d3ec6b763--- /dev/null+++ b/ui/component/or-map/src/or-map.ts@@ -0,0 +1,144 @@+import openremote, {EventCallback, OREvent} from "@openremote/core";+import {html, PolymerElement} from "@polymer/polymer";+import {customElement, property} from '@polymer/decorators';+import rest from "@openremote/rest";+import {Map, MapboxOptions, Style as MapboxStyle} from "mapbox-gl";+import L from "mapbox.js";++export enum Type {+ VECTOR = "VECTOR",+ RASTER = "RASTER"+}++/**+ * `or-map`+ * Displays a map+ *+ */+@customElement('or-map')+export class OrMap extends PolymerElement {+ protected _initCallback?: EventCallback;+ protected _map?: Map;+ protected static _mapboxGlStyle?: any;+ protected static _mapboxJsStyle?: any;+ protected _loaded: boolean;++ static get template() {+ return html`+ <style>+ :host {+ display: block;+ overflow: hidden;+ }+ #map {+ position: relative;+ width: 100%;+ height: 100%;+ }+ </style>+ <div id="map"></div>+ `;+ }++ @property({type: String})+ type: Type = Type.VECTOR;++ constructor() {+ super();+ }++ ready() {+ super.ready();++ if (!openremote.ready) {+ // Defer until openremote is initialised+ this._initCallback = (initEvent) => {+ if (initEvent === OREvent.READY) {+ this.loadMap();+ }+ };+ openremote.addListener(this._initCallback);+ } else {+ this.loadMap();+ }+ }++ async loadMap() {++ if (this._loaded) {+ return;+ }++ if (this.shadowRoot) {+ const mapElement: HTMLElement | null = this.shadowRoot.getElementById('map');+ if (this.type === Type.RASTER) {++ if (!OrMap._mapboxJsStyle) {+ // @ts-ignore+ OrMap._mapboxJsStyle = await import("mapbox.js/theme/style.css");+ }++ // Add style to shadow root+ var style = document.createElement('style');+ style.id = "mapboxJsStyle";+ style.textContent = OrMap._mapboxJsStyle.default.toString();+ this.shadowRoot.appendChild(style);++ const map: typeof import("mapbox.js") = await import("mapbox.js");+ const settingsResponse = await rest.api.MapResource.getSettingsJs();+ const settings = <any> settingsResponse.data;+ const options: L.mapbox.MapOptionsJs = {+ zoom: settings.zoom+1, // JS zoom is out by one compared to GL+ minZoom: settings.minZoom || 0,+ maxZoom: settings.maxZoom || 22,+ boxZoom: settings.boxZoom || false,+ };+ if (settings.bounds) {+ let b = settings.bounds;+ options.maxBounds = [+ [b[1], b[0]],+ [b[3], b[2]],+ ];+ }++ const m: L.mapbox.map = new L.mapbox.map(mapElement, settings, options);++ } else {+ if (!OrMap._mapboxGlStyle) {+ // @ts-ignore+ OrMap._mapboxGlStyle = await import("mapbox-gl/dist/mapbox-gl.css");+ }++ // Add style to shadow root+ var style = document.createElement('style');+ style.id = "mapboxGlStyle";+ style.textContent = OrMap._mapboxGlStyle.default.toString();+ this.shadowRoot.appendChild(style);++ const map: typeof import("mapbox-gl") = await import("mapbox-gl");+ const settingsResponse = await rest.api.MapResource.getSettings();+ const settings = <any> settingsResponse.data;++ const options: MapboxOptions = {+ container: mapElement,+ style: <MapboxStyle> settings,+ attributionControl: true,+ minZoom: settings.minZoom || 0,+ maxZoom: settings.maxZoom || 0,+ maxBounds: settings.maxBounds || null,+ boxZoom: settings.boxZoom || false,+ transformRequest: (url, resourceType) => {+ return {+ url: url,+ headers: {'Authorization': openremote.getAuthorizationHeader()}+ }+ }+ };++ this._map = new map.Map(options);+ }+ }++ this._loaded = true;+ }+}diff --git a/ui/component/or-map/test/index.html b/ui/component/or-map/test/index.htmlnew file mode 100644index 000000000..8960f4bb9--- /dev/null+++ b/ui/component/or-map/test/index.html@@ -0,0 +1,17 @@+<!doctype html>+<html>+ <head>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">++ <script src="../node_modules/wct-browser-legacy/browser.js"></script>+ </head>+ <body>+ <script>+ // Load and run all tests (.html, .js):+ WCT.loadSuites([+ 'or-asset-tree_test.html'+ ]);+ </script>+ </body>+</html>diff --git a/ui/component/or-map/test/or-asset-tree_test.html b/ui/component/or-map/test/or-asset-tree_test.htmlnew file mode 100644index 000000000..8db8b67dc--- /dev/null+++ b/ui/component/or-map/test/or-asset-tree_test.html@@ -0,0 +1,52 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">++ <title>or-asset-tree test</title>++ <script src="../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>+ <script src="../node_modules/wct-browser-legacy/browser.js"></script>++ <script type="module" src="../or-asset-tree.ts"></script>+ </head>+ <body>++ <test-fixture id="BasicTestFixture">+ <template>+ <or-asset-tree></or-asset-tree>+ </template>+ </test-fixture>++ <test-fixture id="ChangedPropertyTestFixture">+ <template>+ <or-asset-tree prop1="new-prop1"></or-asset-tree>+ </template>+ </test-fixture>++ <script type="module">+ suite('or-asset-tree', () => {++ test('instantiating the element with default properties works', () => {+ const element = fixture('BasicTestFixture');+ assert.equal(element.prop1, 'or-asset-tree');+ const elementShadowRoot = element.shadowRoot;+ const elementHeader = elementShadowRoot.querySelector('h2');+ assert.equal(elementHeader.innerHTML, 'Hello or-asset-tree!');+ });++ test('setting a property on the element works', () => {+ // Create a test fixture+ const element = fixture('ChangedPropertyTestFixture');+ assert.equal(element.prop1, 'new-prop1');+ const elementShadowRoot = element.shadowRoot;+ const elementHeader = elementShadowRoot.querySelector('h2');+ assert.equal(elementHeader.innerHTML, 'Hello new-prop1!');+ });++ });+ </script>++ </body>+</html>diff --git a/ui/component/or-map/tsconfig.json b/ui/component/or-map/tsconfig.jsonnew file mode 100644index 000000000..97cea101f--- /dev/null+++ b/ui/component/or-map/tsconfig.json@@ -0,0 +1,19 @@+{+ "compilerOptions": {+ "outDir": "./dist/",+ "target": "es5",+ "module": "esNext",+ "moduleResolution": "node",+ "lib": [+ "dom",+ "es2015",+ "es2017",+ "es5",+ "es2015.promise",+ "es2016.array.include"+ ],+ "strict": false,+ "experimentalDecorators": true,+ "allowSyntheticDefaultImports": true+ }+}\ No newline at end of filediff --git a/ui/component/or-map/tslint.json b/ui/component/or-map/tslint.jsonnew file mode 100644index 000000000..846fa2dfc--- /dev/null+++ b/ui/component/or-map/tslint.json@@ -0,0 +1,11 @@+{+ "defaultSeverity": "error",+ "extends": "tslint:recommended",+ "rules": {+ "interface-name" : [true, "never-prefix"],+ "variable-name": [false],+ "trailing-comma": [false],+ "no-trailing-whitespace": [false],+ "no-console": [false]+ }+}\ No newline at end of filediff --git a/ui/demo/demo-or-map/index.html b/ui/demo/demo-or-map/index.htmlnew file mode 100644index 000000000..ec74f262e--- /dev/null+++ b/ui/demo/demo-or-map/index.html@@ -0,0 +1,61 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">++ <title>Demo</title>++ <custom-style>+ <style is="custom-style" include="demo-pages-shared-styles">+ </style>+ </custom-style>+</head>+<body>+<div class="vertical-section-container centered">+ <h3>Demo</h3>+ <demo-snippet>+ <template>+ <or-map style="height: 500px; width: 100%;"></or-map>+ <or-map type="RASTER" style="height: 500px; width: 100%;"></or-map>+ </template>+ </demo-snippet>+</div>++<!--+Feature detect Custom Elements support. If the browser DOES support Custom+Elements then we need to load the custom-elements-es5-adapter because+our project code has been transpiled from ES2015 to ES5 and native Custom+Elements expect elements will be registered as classes.+-->+<div id="ce-es5-shim">+ <script type="text/javascript">+ if (!window.customElements) {+ var ceShimContainer = document.querySelector('#ce-es5-shim');+ ceShimContainer.parentElement.removeChild(ceShimContainer);+ }+ </script>+ <script type="text/javascript" src="modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>+</div>++<!--+Use the webcomponents-loader script which will feature detect which Web+Components features are missing and lazy load the appropriate polyfills.+When we hear the 'WebComponentsReady' event from the polyfill bundle we can+insert our 'bundle.js'.+-->+<script>+ (function () {+ document.addEventListener('WebComponentsReady', function componentsReady() {+ document.removeEventListener('WebComponentsReady', componentsReady, false);+ var script = document.createElement('script');+ script.src = '<%= htmlWebpackPlugin.files.js[0] %>';+ var refScript = document.getElementsByTagName('script')[0];+ refScript.parentNode.insertBefore(script, refScript);+ }, false);+ })();+</script>+<script src="modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>++</body>+</html>diff --git a/ui/demo/demo-or-map/package.json b/ui/demo/demo-or-map/package.jsonnew file mode 100644index 000000000..cbd9af55f--- /dev/null+++ b/ui/demo/demo-or-map/package.json@@ -0,0 +1,35 @@+{+ "name": "@openremote/demo-or-map",+ "version": "1.0.0",+ "description": "Component Demo",+ "scripts": {+ "clean": "npx shx rm -rf dist",+ "build": "npx webpack",+ "test": "echo \"Error: no test specified\" && exit 1"+ },+ "author": "OpenRemote",+ "license": "AGPL-3.0-or-later",+ "dependencies": {+ "@openremote/or-map": "^1.0.0"+ },+ "devDependencies": {+ "@babel/core": "^7.1.2",+ "@babel/preset-env": "^7.1.0",+ "@polymer/iron-demo-helpers": "^3.0.0-pre.19",+ "awesome-typescript-loader": "^5.2.1",+ "babel-loader": "^8.0.4",+ "copy-webpack-plugin": "^4.6.0",+ "css-loader": "^2.0.0",+ "file-loader": "^2.0.0",+ "html-webpack-plugin": "^3.2.0",+ "raw-loader": "^0.5.1",+ "shx": "^0.3.2",+ "style-loader": "^0.23.1",+ "tslint": "^5.11.0",+ "typescript": "^3.1.6",+ "url-loader": "^1.1.2",+ "webpack": "^4.24.0",+ "webpack-cli": "^3.1.2",+ "webpack-dev-server": "^3.1.10"+ }+}diff --git a/ui/demo/demo-or-map/src/index.ts b/ui/demo/demo-or-map/src/index.tsnew file mode 100644index 000000000..8ea3a118f--- /dev/null+++ b/ui/demo/demo-or-map/src/index.ts@@ -0,0 +1,13 @@+import '@polymer/iron-demo-helpers/demo-pages-shared-styles';+import '@polymer/iron-demo-helpers/demo-snippet';+import "@openremote/or-map";+import openremote, {Auth} from "@openremote/core";++openremote.init({+ auth: Auth.KEYCLOAK,+ autoLogin: true,+ keycloakUrl: "http://localhost:8080/auth",+ managerUrl: "http://localhost:8080",+ realm: "customerA"+});+diff --git a/ui/demo/demo-or-map/tsconfig.json b/ui/demo/demo-or-map/tsconfig.jsonnew file mode 100644index 000000000..97cea101f--- /dev/null+++ b/ui/demo/demo-or-map/tsconfig.json@@ -0,0 +1,19 @@+{+ "compilerOptions": {+ "outDir": "./dist/",+ "target": "es5",+ "module": "esNext",+ "moduleResolution": "node",+ "lib": [+ "dom",+ "es2015",+ "es2017",+ "es5",+ "es2015.promise",+ "es2016.array.include"+ ],+ "strict": false,+ "experimentalDecorators": true,+ "allowSyntheticDefaultImports": true+ }+}\ No newline at end of filediff --git a/ui/demo/demo-or-map/tslint.json b/ui/demo/demo-or-map/tslint.jsonnew file mode 100644index 000000000..846fa2dfc--- /dev/null+++ b/ui/demo/demo-or-map/tslint.json@@ -0,0 +1,11 @@+{+ "defaultSeverity": "error",+ "extends": "tslint:recommended",+ "rules": {+ "interface-name" : [true, "never-prefix"],+ "variable-name": [false],+ "trailing-comma": [false],+ "no-trailing-whitespace": [false],+ "no-console": [false]+ }+}\ No newline at end of filediff --git a/ui/demo/demo-or-map/webpack.config.js b/ui/demo/demo-or-map/webpack.config.jsnew file mode 100644index 000000000..f2c917c36--- /dev/null+++ b/ui/demo/demo-or-map/webpack.config.js@@ -0,0 +1,104 @@++var CopyWebpackPlugin = require("copy-webpack-plugin");+var HtmlWebpackPlugin = require("html-webpack-plugin");+// The below was an attempt to get native ES6 module support alongside bundled JS modules but due to lack+// of understanding about webpack internals and poor docs given up for now and will just rely on bundles.+// class ES6Plugin {+// apply(compiler) {+// compiler.hooks.normalModuleFactory.tap(+// "NormalModuleReplacementPlugin",+// nmf => {+// nmf.hooks.afterResolve.tap("NormalModuleReplacementPlugin", result => {+// if (!result) return;+// if (/node_modules/.test(result.request)) {+// let relPath = path.relative(__dirname, result.request);+// let dest = relPath.split(path.sep);+// while(dest.length > 0 && dest[0] !== 'node_modules') {+// dest.shift();+// }+// dest.shift();+// dest = path.join(compiler.options.output.path, 'modules', dest.join(path.sep));+// fs.mkdirsSync(path.dirname(dest));+// fs.copySync(result.request, dest, {overwrite: true});+// result.resource = dest;+// } else {+// console.log(result.request);+// }+// return result;+// });+// }+// );+// }+// }++module.exports = {+ mode: 'development',+ entry: {+ 'bundle': './src/index.ts'+ },+ output: {+ path: __dirname + "/dist",+ filename: "[name].[hash].js",+ publicPath: ""+ },+ resolve: {+ extensions: [ '.tsx', '.ts', '.js' ],+ mainFields: ['types', 'browser', 'module', 'main']+ },+ devtool: 'inline-source-map',+ devServer: {+ port: 9000,+ contentBase: './dist'+ },+ plugins: [+ new HtmlWebpackPlugin({+ chunksSortMode: 'none',+ inject: false,+ template: 'index.html'+ }),+ new CopyWebpackPlugin([+ {+ from: "../../node_modules/@webcomponents/webcomponentsjs",+ to: "modules/@webcomponents/webcomponentsjs",+ ignore: "!*.js"+ }+ ])+ ],+ module: {+ rules: [+ {+ test: /\.tsx?$/,+ use: 'awesome-typescript-loader',+ exclude: /node_modules/+ },+ {+ test: /\.js$/,+ exclude: [+ /mapbox-gl/,+ /webcomponentsjs/+ ],+ use: [+ {+ loader: 'babel-loader',+ options: {+ presets: ['@babel/preset-env']+ }+ }+ ]+ },+ {+ test: /\.css$/,+ use: [+ { loader: "css-loader" }+ ]+ },+ {+ test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,+ loader: 'url-loader',+ options: {+ limit: 10000,+ },+ }+ ]+ }+};\ No newline at end of filediff --git a/ui/yarn.lock b/ui/yarn.lockindex 57339f198..8b77de5e6 100644--- a/ui/yarn.lock+++ b/ui/yarn.lock@@ -583,6 +583,62 @@lodash "^4.17.10"to-fast-properties "^2.0.0"+"@mapbox/[email protected]":+ version "0.2.2"+ resolved "https://registry.yarnpkg.com/@mapbox/geojson-area/-/geojson-area-0.2.2.tgz#18d7814aa36bf23fbbcc379f8e26a22927debf10"+ integrity sha1-GNeBSqNr8j+7zDefjiaiKSfevxA=+ dependencies:+ wgs84 "0.0.0"++"@mapbox/geojson-types@^1.0.2":+ version "1.0.2"+ resolved "https://registry.yarnpkg.com/@mapbox/geojson-types/-/geojson-types-1.0.2.tgz#9aecf642cb00eab1080a57c4f949a65b4a5846d6"+ integrity sha512-e9EBqHHv3EORHrSfbR9DqecPNn+AmuAoQxV6aL8Xu30bJMJR1o8PZLZzpk1Wq7/NfCbuhmakHTPYRhoqLsXRnw==++"@mapbox/jsonlint-lines-primitives@^2.0.2":+ version "2.0.2"+ resolved "https://registry.yarnpkg.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz#ce56e539f83552b58d10d672ea4d6fc9adc7b234"+ integrity sha1-zlblOfg1UrWNENZy6k1vya3HsjQ=++"@mapbox/mapbox-gl-supported@^1.4.0":+ version "1.4.0"+ resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.4.0.tgz#36946b22944fe2cfa43cfafd5ef36fdb54a069e4"+ integrity sha512-ZD0Io4XK+/vU/4zpANjOtdWfVszAgnaMPsGR6LKsWh4kLIEv9qoobTVmJPPuwuM+ZI2b3BlZ6DYw1XHVmv6YTA==++"@mapbox/[email protected]", "@mapbox/point-geometry@^0.1.0", "@mapbox/point-geometry@~0.1.0":+ version "0.1.0"+ resolved "https://registry.yarnpkg.com/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz#8a83f9335c7860effa2eeeca254332aa0aeed8f2"+ integrity sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI=++"@mapbox/tiny-sdf@^1.1.0":+ version "1.1.0"+ resolved "https://registry.yarnpkg.com/@mapbox/tiny-sdf/-/tiny-sdf-1.1.0.tgz#b0b8f5c22005e6ddb838f421ffd257c1f74f9a20"+ integrity sha512-dnhyk8X2BkDRWImgHILYAGgo+kuciNYX30CUKj/Qd5eNjh54OWM/mdOS/PWsPeN+3abtN+QDGYM4G220ynVJKA==++"@mapbox/unitbezier@^0.0.0":+ version "0.0.0"+ resolved "https://registry.yarnpkg.com/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz#15651bd553a67b8581fb398810c98ad86a34524e"+ integrity sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4=++"@mapbox/vector-tile@^1.3.1":+ version "1.3.1"+ resolved "https://registry.yarnpkg.com/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz#d3a74c90402d06e89ec66de49ec817ff53409666"+ integrity sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==+ dependencies:+ "@mapbox/point-geometry" "~0.1.0"++"@mapbox/whoots-js@^3.1.0":+ version "3.1.0"+ resolved "https://registry.yarnpkg.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz#497c67a1cef50d1a2459ba60f315e448d2ad87fe"+ integrity sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==++"@polymer/decorators@^3.0.0":+ version "3.0.0"+ resolved "https://registry.yarnpkg.com/@polymer/decorators/-/decorators-3.0.0.tgz#e4212ac976d9abd1210f560b6e1be4165c1c0183"+ integrity sha512-qh+VID9nDV9q3ABvIfWgm7/+udl7v2HKsMLPXFm8tj1fI7qr7yWJMFwS3xWBkMmuNPtmkS8MDP0vqLAQIEOWzg==+ dependencies:+ "@polymer/polymer" "^3.0.5"+"@polymer/font-roboto@^3.0.0-pre.25":version "3.0.2"resolved "https://registry.yarnpkg.com/@polymer/font-roboto/-/font-roboto-3.0.2.tgz#80cdaa7225db2359130dfb2c6d9a3be1820020c3"@@ -617,7 +673,7 @@"@polymer/polymer" "^3.0.0"marked "~0.3.9"-"@polymer/polymer@^3.0.0":+"@polymer/polymer@^3.0.0", "@polymer/polymer@^3.0.5":version "3.1.0"resolved "https://registry.yarnpkg.com/@polymer/polymer/-/polymer-3.1.0.tgz#3e1b7447a1e350fd654e1823def655d0f0828a70"dependencies:@@ -638,6 +694,18 @@version "3.0.0-pre.21"resolved "https://registry.yarnpkg.com/@polymer/test-fixture/-/test-fixture-3.0.0-pre.21.tgz#85152207cb0bf57caebc191c80bb0fdb6952614e"+"@types/geojson@*":+ version "7946.0.4"+ resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.4.tgz#4e049756383c3f055dd8f3d24e63fb543e98eb07"+ integrity sha512-MHmwBtCb7OCv1DSivz2UNJXPGU/1btAWRKlqJ2saEhVJkpkvqHMMaOpKg0v4sAbDWSQekHGvPVMM8nQ+Jen03Q==++"@types/mapbox-gl@^0.51.1":+ version "0.51.1"+ resolved "https://registry.yarnpkg.com/@types/mapbox-gl/-/mapbox-gl-0.51.1.tgz#49654733ff3916766773f7332233aa0d63161886"+ integrity sha512-IEgoqMzLuk+MYD3v48A7WBNktg30aozrIaTcd1o9OUwPVaftcRGQ326m3u5APef0su2karigO7NndvrWMpu24w==+ dependencies:+ "@types/geojson" "*"+"@webassemblyjs/[email protected]":version "1.7.11"resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.11.tgz#b988582cafbb2b095e8b556526f30c90d057cace"@@ -878,6 +946,11 @@ ansi-styles@^3.2.1:dependencies:color-convert "^1.9.0"+ansicolors@~0.2.1:+ version "0.2.1"+ resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef"+ integrity sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8=+anymatch@^2.0.0:version "2.0.0"resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"@@ -1328,6 +1401,14 @@ caniuse-lite@^1.0.30000899:resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000910.tgz#755d5181d4b006e5a2b59b1ffa05d0a0470039f5"integrity sha512-u/nxtHGAzCGZzIxt3dA/tpSPOcirBZFWKwz1EPz4aaupnBI2XR0Rbr74g0zc6Hzy41OEM4uMoZ38k56TpYAWjQ==+cardinal@~0.4.2:+ version "0.4.4"+ resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-0.4.4.tgz#ca5bb68a5b511b90fe93b9acea49bdee5c32bfe2"+ integrity sha1-ylu2iltRG5D+k7ms6km97lwyv+I=+ dependencies:+ ansicolors "~0.2.1"+ redeyed "~0.4.0"+chai@^3.5.0:version "3.5.0"resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"@@ -1504,7 +1585,7 @@ [email protected]:version "0.0.1"resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"-concat-stream@^1.5.0:+concat-stream@^1.5.0, concat-stream@~1.6.0:version "1.6.2"resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==@@ -1599,6 +1680,11 @@ core-util-is@~1.0.0:resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=+ version "0.0.6"+ resolved "https://registry.yarnpkg.com/corslite/-/corslite-0.0.6.tgz#622954e14c33852123c4c68fa3deffa9e2d1c896"+ integrity sha1-YilU4UwzhSEjxMaPo97/qeLRyJY=+create-ecdh@^4.0.0:version "4.0.3"resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff"@@ -1658,6 +1744,22 @@ crypto-browserify@^3.11.0:randombytes "^2.0.0"randomfill "^1.0.3"+css-loader@^2.0.0:+ version "2.0.0"+ resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.0.0.tgz#f0f7469dc8e750dace97534328ed80395b5c575b"+ integrity sha512-3Fq8HJYs7ruBiDpJA/w2ZROtivA769ePuH3/vgPdOB+FQiotErJ7VJYRZq86SPRVFaccn1wEktUnaaUyf+Uslw==+ dependencies:+ icss-utils "^4.0.0"+ loader-utils "^1.0.2"+ lodash "^4.17.11"+ postcss "^7.0.6"+ postcss-modules-extract-imports "^2.0.0"+ postcss-modules-local-by-default "^2.0.2"+ postcss-modules-scope "^2.0.0"+ postcss-modules-values "^2.0.0"+ postcss-value-parser "^3.3.0"+ schema-utils "^1.0.0"+css-select@^1.1.0:version "1.2.0"resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858"@@ -1668,11 +1770,30 @@ css-select@^1.1.0:domutils "1.5.1"nth-check "~1.0.1"+css-selector-tokenizer@^0.7.0:+ version "0.7.1"+ resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz#a177271a8bca5019172f4f891fc6eed9cbf68d5d"+ integrity sha512-xYL0AMZJ4gFzJQsHUKa5jiWWi2vH77WVNg7JYRyewwj6oPh4yb/y6Y9ZCw9dsj/9UauMhtuxR+ogQd//EdEVNA==+ dependencies:+ cssesc "^0.1.0"+ fastparse "^1.1.1"+ regexpu-core "^1.0.0"+version "2.1.2"resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.2.tgz#c0876d9d0480927d7d4920dcd72af3595649554d"integrity sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ==+csscolorparser@~1.0.2:+ version "1.0.3"+ resolved "https://registry.yarnpkg.com/csscolorparser/-/csscolorparser-1.0.3.tgz#b34f391eea4da8f3e98231e2ccd8df9c041f171b"+ integrity sha1-s085HupNqPPpgjHizNjfnAQfFxs=++cssesc@^0.1.0:+ version "0.1.0"+ resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4"+ integrity sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=+cyclist@~0.2.2:version "0.2.2"resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640"@@ -1950,6 +2071,11 @@ duplexify@^3.4.2, duplexify@^3.6.0:readable-stream "^2.0.0"stream-shift "^1.0.0"+earcut@^2.1.3:+ version "2.1.4"+ resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.1.4.tgz#6b161f89bfe4bb08576b9e8af165e1477d6a1c02"+ integrity sha512-ttRjmPD5oaTtXOoxhFp9aZvMB14kBjapYaiBuzBB1elOgSLU9P2Ev86G2OClBg+uspUXERsIzXKpUWweH2K4Xg==+version "1.1.1"resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"@@ -2079,11 +2205,21 @@ eslint-scope@^4.0.0:esrecurse "^4.1.0"estraverse "^4.1.1"+esm@^3.0.84:+ version "3.0.84"+ resolved "https://registry.yarnpkg.com/esm/-/esm-3.0.84.tgz#bb108989f4673b32d4f62406869c28eed3815a63"+ integrity sha512-SzSGoZc17S7P+12R9cg21Bdb7eybX25RnIeRZ80xZs+VZ3kdQKzqTp2k4hZJjR7p9l0186TTXSgrxzlMDBktlw==+esprima@^4.0.0:version "4.0.1"resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==+esprima@~1.0.4:+ version "1.0.4"+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad"+ integrity sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=+esrecurse@^4.1.0:version "4.2.1"resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"@@ -2157,6 +2293,11 @@ expand-brackets@^2.1.4:snapdragon "^0.8.1"to-regex "^3.0.1"+expect.js@~0.2.0:+ version "0.2.0"+ resolved "https://registry.yarnpkg.com/expect.js/-/expect.js-0.2.0.tgz#1028533d2c1c363f74a6796ff57ec0520ded2be1"+ integrity sha1-EChTPSwcNj90pnlv9X7AUg3tK+E=+express@^4.16.2:version "4.16.4"resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e"@@ -2232,6 +2373,11 @@ fast-json-stable-stringify@^2.0.0:resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I=+fastparse@^1.1.1:+ version "1.1.2"+ resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9"+ integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==+faye-websocket@^0.10.0:version "0.10.0"resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4"@@ -2419,6 +2565,21 @@ gauge@~2.7.3:strip-ansi "^3.0.1"wide-align "^1.1.0"+geojson-rewind@^0.3.0:+ version "0.3.1"+ resolved "https://registry.yarnpkg.com/geojson-rewind/-/geojson-rewind-0.3.1.tgz#22240797c847cc2f0c1d313e4aa0c915afa7f29d"+ integrity sha1-IiQHl8hHzC8MHTE+SqDJFa+n8p0=+ dependencies:+ "@mapbox/geojson-area" "0.2.2"+ concat-stream "~1.6.0"+ minimist "1.2.0"+ sharkdown "^0.1.0"++geojson-vt@^3.2.1:+ version "3.2.1"+ resolved "https://registry.yarnpkg.com/geojson-vt/-/geojson-vt-3.2.1.tgz#f8adb614d2c1d3f6ee7c4265cad4bbf3ad60c8b7"+ integrity sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg==+get-caller-file@^1.0.1:version "1.0.3"resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"@@ -2434,6 +2595,11 @@ get-value@^2.0.3, get-value@^2.0.6:resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=+gl-matrix@^2.6.1:+ version "2.8.1"+ resolved "https://registry.yarnpkg.com/gl-matrix/-/gl-matrix-2.8.1.tgz#1c7873448eac61d2cd25803a074e837bd42581a3"+ integrity sha512-0YCjVpE3pS5XWlN3J4X7AiAx65+nqAI54LndtVFnQZB6G/FVLkZH8y8V6R3cIoOQR4pUdfwQGd1iwyoXHJ4Qfw==+glob-parent@^3.1.0:version "3.1.0"resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"@@ -2513,6 +2679,11 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2:version "1.0.1"resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"+grid-index@^1.0.0:+ version "1.0.0"+ resolved "https://registry.yarnpkg.com/grid-index/-/grid-index-1.0.0.tgz#ad2c5d54ce5b35437faff1d70a9aeb3d1d261110"+ integrity sha1-rSxdVM5bNUN/r/HXCprrPR0mERA=+version "1.9.2"resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"@@ -2728,7 +2899,19 @@ iconv-lite@^0.4.4:dependencies:safer-buffer ">= 2.1.2 < 3"-ieee754@^1.1.4:+icss-replace-symbols@^1.1.0:+ version "1.1.0"+ resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded"+ integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=++icss-utils@^4.0.0:+ version "4.0.0"+ resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.0.0.tgz#d52cf4bcdcfa1c45c2dbefb4ffdf6b00ef608098"+ integrity sha512-bA/xGiwWM17qjllIs9X/y0EjsB7e0AV08F3OL8UPsoNkNRibIuu8f1eKTnQ8QO1DteKKTxTUAn+IEWUToIwGOA==+ dependencies:+ postcss "^7.0.5"++ieee754@^1.1.4, ieee754@^1.1.6:version "1.1.12"resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b"integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==@@ -3092,6 +3275,11 @@ json5@^2.1.0:dependencies:minimist "^1.2.0"+kdbush@^3.0.0:+ version "3.0.0"+ resolved "https://registry.yarnpkg.com/kdbush/-/kdbush-3.0.0.tgz#f8484794d47004cc2d85ed3a79353dbe0abc2bf0"+ integrity sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==+killable@^1.0.0:version "1.0.1"resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"@@ -3128,6 +3316,11 @@ lcid@^2.0.0:dependencies:invert-kv "^2.0.0"+ version "1.0.2"+ resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.0.2.tgz#fa4fbcb7844944fc2bfb0bcf9ca0dea13463ca21"+ integrity sha1-+k+8t4RJRPwr+wvPnKDeoTRjyiE=+lit-html@^0.12.0:version "0.12.0"resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-0.12.0.tgz#d994420fda74744f9d4a79401b086de929643e6a"@@ -3229,7 +3422,7 @@ lodash@^3.0.0, lodash@^3.10.1:version "3.10.1"resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"-lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.5:+lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.5:version "4.17.11"resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==@@ -3304,6 +3497,47 @@ map-visit@^1.0.0:dependencies:object-visit "^1.0.0"+mapbox-gl@^0.52.0-beta.1:+ version "0.52.0-beta.1"+ resolved "https://registry.yarnpkg.com/mapbox-gl/-/mapbox-gl-0.52.0-beta.1.tgz#e53a93c12daf4f94fd6a786d63ce0f7a6d9676cd"+ integrity sha512-3PagU8LjpoGcZsdYYDmNwjTFa5xZtVw8g569Jvq7825Zx0RefjVM6IjVTky7rY4k/JpCfEoDjUewbwhc/Yp2Rg==+ dependencies:+ "@mapbox/geojson-types" "^1.0.2"+ "@mapbox/jsonlint-lines-primitives" "^2.0.2"+ "@mapbox/mapbox-gl-supported" "^1.4.0"+ "@mapbox/point-geometry" "^0.1.0"+ "@mapbox/tiny-sdf" "^1.1.0"+ "@mapbox/unitbezier" "^0.0.0"+ "@mapbox/vector-tile" "^1.3.1"+ "@mapbox/whoots-js" "^3.1.0"+ csscolorparser "~1.0.2"+ earcut "^2.1.3"+ esm "^3.0.84"+ geojson-rewind "^0.3.0"+ geojson-vt "^3.2.1"+ gl-matrix "^2.6.1"+ grid-index "^1.0.0"+ minimist "0.0.8"+ murmurhash-js "^1.0.0"+ pbf "^3.0.5"+ potpack "^1.0.1"+ quickselect "^1.0.0"+ rw "^1.3.3"+ supercluster "^5.0.0"+ tinyqueue "^1.1.0"+ vt-pbf "^3.0.1"++mapbox.js@^3.1.1:+ version "3.1.1"+ resolved "https://registry.yarnpkg.com/mapbox.js/-/mapbox.js-3.1.1.tgz#4ebe41bd89b533f507fb3455f4f490e417ea1e8f"+ integrity sha1-Tr5BvYm1M/UH+zRV9PSQ5BfqHo8=+ dependencies:+ corslite "0.0.6"+ isarray "0.0.1"+ leaflet "1.0.2"+ mustache "2.2.1"+ sanitize-caja "0.1.4"+marked@~0.3.9:version "0.3.19"resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790"@@ -3393,6 +3627,11 @@ [email protected]:resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==+mime@^2.0.3:+ version "2.4.0"+ resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.0.tgz#e051fd881358585f3279df333fe694da0bcffdd6"+ integrity sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==+mime@^2.3.1:version "2.3.1"resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369"@@ -3419,11 +3658,16 @@ minimatch@^3.0.2, minimatch@^3.0.4:dependencies:brace-expansion "^1.1.7"+ version "0.0.5"+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.5.tgz#d7aa327bcecf518f9106ac6b8f003fa3bcea8566"+ integrity sha1-16oye87PUY+RBqxrjwA/o7zqhWY=+version "0.0.8"resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"-minimist@^1.2.0:[email protected], minimist@^1.2.0:version "1.2.0"resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=@@ -3540,6 +3784,16 @@ multicast-dns@^6.0.1:dns-packet "^1.3.1"thunky "^1.0.2"+murmurhash-js@^1.0.0:+ version "1.0.0"+ resolved "https://registry.yarnpkg.com/murmurhash-js/-/murmurhash-js-1.0.0.tgz#b06278e21fc6c37fa5313732b0412bcb6ae15f51"+ integrity sha1-sGJ44h/Gw3+lMTcysEEry2rhX1E=++ version "2.2.1"+ resolved "https://registry.yarnpkg.com/mustache/-/mustache-2.2.1.tgz#2c40ca21c278f53150682bcf9090e41a3339b876"+ integrity sha1-LEDKIcJ49TFQaCvPkJDkGjM5uHY=+nan@^2.9.2:version "2.11.1"resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766"@@ -3978,6 +4232,14 @@ path-type@^3.0.0:dependencies:pify "^3.0.0"+pbf@^3.0.5:+ version "3.1.0"+ resolved "https://registry.yarnpkg.com/pbf/-/pbf-3.1.0.tgz#f70004badcb281761eabb1e76c92f179f08189e9"+ integrity sha512-/hYJmIsTmh7fMkHAWWXJ5b8IKLWdjdlAFb3IHkRBn1XUhIYBChVGfVwmHEAV3UfXTxsP/AKfYTXTS/dCPxJd5w==+ dependencies:+ ieee754 "^1.1.6"+ resolve-protobuf-schema "^2.0.0"+pbkdf2@^3.0.3:version "3.0.17"resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6"@@ -4039,6 +4301,57 @@ posix-character-classes@^0.1.0:resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=+postcss-modules-extract-imports@^2.0.0:+ version "2.0.0"+ resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e"+ integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==+ dependencies:+ postcss "^7.0.5"++postcss-modules-local-by-default@^2.0.2:+ version "2.0.2"+ resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.2.tgz#edfd6a874d326b52daaa3014bfc11e9e4b0cfafc"+ integrity sha512-qghHvHeydUBQ3EQic5NjYryZ5jzXzAYxHR7lZQlCNmjGpJtINRyX/ELnh/7fxBBmHNkEzNkq2l5cV6trfidYng==+ dependencies:+ css-selector-tokenizer "^0.7.0"+ postcss "^7.0.6"+ postcss-value-parser "^3.3.1"++postcss-modules-scope@^2.0.0:+ version "2.0.1"+ resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.0.1.tgz#2c0f2394cde4cd09147db054c68917e38f6d43a4"+ integrity sha512-7+6k9c3/AuZ5c596LJx9n923A/j3nF3ormewYBF1RrIQvjvjXe1xE8V8A1KFyFwXbvnshT6FBZFX0k/F1igneg==+ dependencies:+ css-selector-tokenizer "^0.7.0"+ postcss "^7.0.6"++postcss-modules-values@^2.0.0:+ version "2.0.0"+ resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz#479b46dc0c5ca3dc7fa5270851836b9ec7152f64"+ integrity sha512-Ki7JZa7ff1N3EIMlPnGTZfUMe69FFwiQPnVSXC9mnn3jozCRBYIxiZd44yJOV2AmabOo4qFf8s0dC/+lweG7+w==+ dependencies:+ icss-replace-symbols "^1.1.0"+ postcss "^7.0.6"++postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1:+ version "3.3.1"+ resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281"+ integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==++postcss@^7.0.5, postcss@^7.0.6:+ version "7.0.6"+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.6.tgz#6dcaa1e999cdd4a255dcd7d4d9547f4ca010cdc2"+ integrity sha512-Nq/rNjnHFcKgCDDZYO0lNsl6YWe6U7tTy+ESN+PnLxebL8uBtYX59HZqvrj7YLK5UCyll2hqDsJOo3ndzEW8Ug==+ dependencies:+ chalk "^2.4.1"+ source-map "^0.6.1"+ supports-color "^5.5.0"++potpack@^1.0.1:+ version "1.0.1"+ resolved "https://registry.yarnpkg.com/potpack/-/potpack-1.0.1.tgz#d1b1afd89e4c8f7762865ec30bd112ab767e2ebf"+ integrity sha512-15vItUAbViaYrmaB/Pbw7z6qX2xENbFSTA7Ii4tgbPtasxm5v6ryKhKtL91tpWovDJzTiZqdwzhcFBCwiMVdVw==+pretty-error@^2.0.2:version "2.1.1"resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"@@ -4073,6 +4386,11 @@ promise-inflight@^1.0.1:resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=+protocol-buffers-schema@^3.3.1:+ version "3.3.2"+ resolved "https://registry.yarnpkg.com/protocol-buffers-schema/-/protocol-buffers-schema-3.3.2.tgz#00434f608b4e8df54c59e070efeefc37fb4bb859"+ integrity sha512-Xdayp8sB/mU+sUV4G7ws8xtYMGdQnxbeIfLjyO9TZZRJdztBGhlmbI5x1qcY4TG5hBkIKGnc28i7nXxaugu88w==+proxy-addr@~2.0.4:version "2.0.4"resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93"@@ -4163,6 +4481,11 @@ querystringify@^2.0.0:resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.0.tgz#7ded8dfbf7879dcc60d0a644ac6754b283ad17ef"integrity sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg==+quickselect@^1.0.0:+ version "1.1.1"+ resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-1.1.1.tgz#852e412ce418f237ad5b660d70cffac647ae94c2"+ integrity sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ==+randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5:version "2.0.6"resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80"@@ -4231,6 +4554,16 @@ [email protected]:isarray "0.0.1"string_decoder "~0.10.x"+readable-stream@~1.1.0:+ version "1.1.14"+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"+ integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk=+ dependencies:+ core-util-is "~1.0.0"+ inherits "~2.0.1"+ isarray "0.0.1"+ string_decoder "~0.10.x"+readdirp@^2.0.0:version "2.2.1"resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525"@@ -4247,6 +4580,13 @@ rechoir@^0.6.2:dependencies:resolve "^1.1.6"+redeyed@~0.4.0:+ version "0.4.4"+ resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-0.4.4.tgz#37e990a6f2b21b2a11c2e6a48fd4135698cba97f"+ integrity sha1-N+mQpvKyGyoRwuakj9QTVpjLqX8=+ dependencies:+ esprima "~1.0.4"+regenerate-unicode-properties@^7.0.0:version "7.0.0"resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c"@@ -4254,7 +4594,7 @@ regenerate-unicode-properties@^7.0.0:dependencies:regenerate "^1.4.0"-regenerate@^1.4.0:+regenerate@^1.2.1, regenerate@^1.4.0:version "1.4.0"resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==@@ -4274,6 +4614,15 @@ regex-not@^1.0.0, regex-not@^1.0.2:extend-shallow "^3.0.2"safe-regex "^1.1.0"+regexpu-core@^1.0.0:+ version "1.0.0"+ resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b"+ integrity sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=+ dependencies:+ regenerate "^1.2.1"+ regjsgen "^0.2.0"+ regjsparser "^0.1.4"+regexpu-core@^4.1.3, regexpu-core@^4.2.0:version "4.2.0"resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.2.0.tgz#a3744fa03806cffe146dea4421a3e73bdcc47b1d"@@ -4286,11 +4635,23 @@ regexpu-core@^4.1.3, regexpu-core@^4.2.0:unicode-match-property-ecmascript "^1.0.4"unicode-match-property-value-ecmascript "^1.0.2"+regjsgen@^0.2.0:+ version "0.2.0"+ resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"+ integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=+regjsgen@^0.4.0:version "0.4.0"resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.4.0.tgz#c1eb4c89a209263f8717c782591523913ede2561"integrity sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA==+regjsparser@^0.1.4:+ version "0.1.5"+ resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c"+ integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=+ dependencies:+ jsesc "~0.5.0"+regjsparser@^0.3.0:version "0.3.0"resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.3.0.tgz#3c326da7fcfd69fa0d332575a41c8c0cdf588c96"@@ -4356,6 +4717,13 @@ resolve-from@^3.0.0:resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"integrity sha1-six699nWiBvItuZTM17rywoYh0g=+resolve-protobuf-schema@^2.0.0:+ version "2.1.0"+ resolved "https://registry.yarnpkg.com/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz#9ca9a9e69cf192bbdaf1006ec1973948aa4a3758"+ integrity sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==+ dependencies:+ protocol-buffers-schema "^3.3.1"+resolve-url@^0.2.1:version "0.2.1"resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"@@ -4395,6 +4763,11 @@ run-queue@^1.0.0, run-queue@^1.0.3:dependencies:aproba "^1.1.1"+rw@^1.3.3:+ version "1.3.3"+ resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4"+ integrity sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=+[email protected], safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:version "5.1.2"resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"@@ -4420,6 +4793,11 @@ samsam@~1.1:version "1.1.3"resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.1.3.tgz#9f5087419b4d091f232571e7fa52e90b0f552621"+ version "0.1.4"+ resolved "https://registry.yarnpkg.com/sanitize-caja/-/sanitize-caja-0.1.4.tgz#7803e8e452b8e3bacb342dbd93adb885acd078af"+ integrity sha1-eAPo5FK447rLNC29k624hazQeK8=+sax@^1.2.4:version "1.2.4"resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"@@ -4553,6 +4931,18 @@ sha.js@^2.4.0, sha.js@^2.4.8:inherits "^2.0.1"safe-buffer "^5.0.1"+sharkdown@^0.1.0:+ version "0.1.0"+ resolved "https://registry.yarnpkg.com/sharkdown/-/sharkdown-0.1.0.tgz#61d4fe529e75d02442127cc9234362265099214f"+ integrity sha1-YdT+Up510CRCEnzJI0NiJlCZIU8=+ dependencies:+ cardinal "~0.4.2"+ expect.js "~0.2.0"+ minimist "0.0.5"+ split "~0.2.10"+ stream-spigot "~2.1.2"+ through "~2.3.4"+shebang-command@^1.2.0:version "1.2.0"resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"@@ -4727,6 +5117,13 @@ split-string@^3.0.1, split-string@^3.0.2:dependencies:extend-shallow "^3.0.0"+split@~0.2.10:+ version "0.2.10"+ resolved "https://registry.yarnpkg.com/split/-/split-0.2.10.tgz#67097c601d697ce1368f418f06cd201cf0521a57"+ integrity sha1-Zwl8YB1pfOE2j0GPBs0gHPBSGlc=+ dependencies:+ through "2"+sprintf-js@~1.0.2:version "1.0.3"resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"@@ -4803,6 +5200,13 @@ stream-shift@^1.0.0:resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=+stream-spigot@~2.1.2:+ version "2.1.2"+ resolved "https://registry.yarnpkg.com/stream-spigot/-/stream-spigot-2.1.2.tgz#7de145e819f8dd0db45090d13dcf73a8ed3cc035"+ integrity sha1-feFF6Bn43Q20UJDRPc9zqO08wDU=+ dependencies:+ readable-stream "~1.1.0"+string-width@^1.0.1:version "1.0.2"resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"@@ -4855,6 +5259,21 @@ strip-json-comments@~2.0.1:resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=+style-loader@^0.23.1:+ version "0.23.1"+ resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925"+ integrity sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==+ dependencies:+ loader-utils "^1.1.0"+ schema-utils "^1.0.0"++supercluster@^5.0.0:+ version "5.0.0"+ resolved "https://registry.yarnpkg.com/supercluster/-/supercluster-5.0.0.tgz#2a5a9b1ffbd0d6180dea10039d78b5d95fdb8f27"+ integrity sha512-9eeD5Q3908+tqdz+wYHHzi5mLKgnqtpO5mrjUfqr67UmGuOwBtVoQ9pJJrfcVHwMwC0wEBvfNRF9PgFOZgsOpw==+ dependencies:+ kdbush "^3.0.0"+version "3.1.2"resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5"@@ -4921,6 +5340,11 @@ through2@^2.0.0:readable-stream "~2.3.6"xtend "~4.0.1"+through@2, through@~2.3.4:+ version "2.3.8"+ resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"+ integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=+thunky@^1.0.2:version "1.0.3"resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.3.tgz#f5df732453407b09191dae73e2a8cc73f381a826"@@ -4937,6 +5361,11 @@ tiny-emitter@^2.0.0:version "2.0.2"resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.0.2.tgz#82d27468aca5ade8e5fd1e6d22b57dd43ebdfb7c"+tinyqueue@^1.1.0:+ version "1.2.3"+ resolved "https://registry.yarnpkg.com/tinyqueue/-/tinyqueue-1.2.3.tgz#b6a61de23060584da29f82362e45df1ec7353f3d"+ integrity sha512-Qz9RgWuO9l8lT+Y9xvbzhPT2efIUIFd69N7eF7tJ9lnQl0iLj1M7peK7IoUGZL9DJHw9XftqLreccfxcQgYLxA==+to-arraybuffer@^1.0.0:version "1.0.1"resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"@@ -5132,6 +5561,15 @@ urix@^0.1.0:resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=+url-loader@^1.1.2:+ version "1.1.2"+ resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-1.1.2.tgz#b971d191b83af693c5e3fea4064be9e1f2d7f8d8"+ integrity sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg==+ dependencies:+ loader-utils "^1.1.0"+ mime "^2.0.3"+ schema-utils "^1.0.0"+url-parse@^1.4.3:version "1.4.4"resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.4.tgz#cac1556e95faa0303691fec5cf9d5a1bc34648f8"@@ -5218,6 +5656,15 @@ [email protected]:dependencies:indexof "0.0.1"+vt-pbf@^3.0.1:+ version "3.1.1"+ resolved "https://registry.yarnpkg.com/vt-pbf/-/vt-pbf-3.1.1.tgz#b0f627e39a10ce91d943b898ed2363d21899fb82"+ integrity sha512-pHjWdrIoxurpmTcbfBWXaPwSmtPAHS105253P1qyEfSTV2HJddqjM+kIHquaT/L6lVJIk9ltTGc0IxR/G47hYA==+ dependencies:+ "@mapbox/point-geometry" "0.1.0"+ "@mapbox/vector-tile" "^1.3.1"+ pbf "^3.0.5"+watchpack@^1.5.0:version "1.6.0"resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00"@@ -5380,6 +5827,11 @@ websocket-extensions@>=0.1.1:resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==+ version "0.0.0"+ resolved "https://registry.yarnpkg.com/wgs84/-/wgs84-0.0.0.tgz#34fdc555917b6e57cf2a282ed043710c049cdc76"+ integrity sha1-NP3FVZF7blfPKigu0ENxDASc3HY=+which-module@^2.0.0:version "2.0.0"resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"