atriusmaps-node-sdk 3.3.347 → 3.3.349

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/cjs/nodesdk/nodeEntry.js +4 -10
  2. package/dist/cjs/package.json.js +13 -14
  3. package/dist/cjs/plugins/clientAPI/src/clientAPI.js +0 -2
  4. package/dist/cjs/plugins/dynamicPois/src/dynamicPois.js +7 -12
  5. package/dist/cjs/plugins/poiDataManager/src/poiDataManager.js +10 -16
  6. package/dist/cjs/plugins/sdkServer/src/sdkHeadless.js +3 -6
  7. package/dist/cjs/plugins/sdkServer/src/sdkServer.js +1 -3
  8. package/dist/cjs/plugins/searchService/src/poiSearch.js +3 -4
  9. package/dist/cjs/plugins/searchService/src/searchService.js +5 -11
  10. package/dist/cjs/plugins/searchService/src/utils.js +1 -7
  11. package/dist/cjs/plugins/venueDataLoader/src/venueDataLoader.js +12 -18
  12. package/dist/cjs/plugins/venueDataLoader/src/venueLoadingUtils.js +4 -14
  13. package/dist/cjs/plugins/wayfinder/src/findRoute.js +3 -6
  14. package/dist/cjs/plugins/wayfinder/src/navGraph.js +0 -2
  15. package/dist/cjs/plugins/wayfinder/src/navGraphDebug.js +3 -6
  16. package/dist/cjs/plugins/wayfinder/src/segmentBuilder.js +3 -6
  17. package/dist/cjs/plugins/wayfinder/src/stepBuilder.js +1 -1
  18. package/dist/cjs/plugins/wayfinder/src/wayfinder.js +9 -15
  19. package/dist/cjs/src/app.js +11 -37
  20. package/dist/cjs/src/configs/postproc-mol-url-parms.js +0 -2
  21. package/dist/cjs/src/configs/postproc-stateTracking.js +3 -6
  22. package/dist/cjs/src/configs/sdkHeadless.json.js +1 -1
  23. package/dist/cjs/src/controller.js +5 -10
  24. package/dist/cjs/src/debugTools.js +3 -4
  25. package/dist/cjs/src/env.js +0 -2
  26. package/dist/cjs/src/extModules/bustle.js +5 -10
  27. package/dist/cjs/src/extModules/flexapi/src/help.js +0 -2
  28. package/dist/cjs/src/extModules/flexapi/src/index.js +1 -5
  29. package/dist/cjs/src/extModules/flexapi/src/validate.js +0 -2
  30. package/dist/cjs/src/extModules/geohasher.js +0 -2
  31. package/dist/cjs/src/extModules/log.js +0 -2
  32. package/dist/cjs/src/historyManager.js +0 -2
  33. package/dist/cjs/src/utils/bounds.js +0 -2
  34. package/dist/cjs/src/utils/buildStructureLookup.js +3 -6
  35. package/dist/cjs/src/utils/configUtils.js +0 -2
  36. package/dist/cjs/src/utils/dom.js +1 -3
  37. package/dist/cjs/src/utils/funcs.js +0 -2
  38. package/dist/cjs/src/utils/geodesy.js +0 -2
  39. package/dist/cjs/src/utils/geom.js +6 -56
  40. package/dist/cjs/src/utils/i18n.js +2 -6
  41. package/dist/cjs/src/utils/location.js +0 -2
  42. package/dist/cjs/src/utils/rand.js +0 -2
  43. package/dist/package.json.js +1 -1
  44. package/dist/plugins/poiDataManager/src/poiDataManager.js +1 -1
  45. package/dist/plugins/venueDataLoader/src/venueDataLoader.js +1 -1
  46. package/dist/plugins/venueDataLoader/src/venueLoadingUtils.js +1 -1
  47. package/dist/plugins/wayfinder/src/navGraph.js +1 -1
  48. package/dist/plugins/wayfinder/src/stepBuilder.js +1 -1
  49. package/dist/plugins/wayfinder/src/wayfinder.js +1 -1
  50. package/dist/src/controller.js +1 -1
  51. package/dist/src/utils/dom.js +1 -1
  52. package/dist/src/utils/geom.js +1 -1
  53. package/package.json +10 -8
@@ -9,18 +9,12 @@ var _package = require('../package.json.js');
9
9
  var controller = require('../src/controller.js');
10
10
  var observable = require('../src/utils/observable.js');
11
11
 
12
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
-
14
- var http__default = /*#__PURE__*/_interopDefaultLegacy(http);
15
- var https__default = /*#__PURE__*/_interopDefaultLegacy(https);
16
- var fetch__default = /*#__PURE__*/_interopDefaultLegacy(fetch);
17
-
18
- const version = _package["default"].version;
12
+ const version = _package.default.version;
19
13
  const LIB_NAME = 'Atrius Maps JS SDK Client';
20
14
 
21
15
  function setupFetch (config) {
22
- const httpAgent = new http__default["default"].Agent({ keepAlive: true });
23
- const httpsAgent = new https__default["default"].Agent({ keepAlive: true });
16
+ const httpAgent = new http.Agent({ keepAlive: true });
17
+ const httpsAgent = new https.Agent({ keepAlive: true });
24
18
 
25
19
  // provide easy proxy handling via config.proxy in form of { host, port }
26
20
  const proxyAgent = config.proxy ? new httpsProxyAgent.HttpsProxyAgent(`http://${config.proxy.host}:${config.proxy.port}`) : null;
@@ -28,7 +22,7 @@ function setupFetch (config) {
28
22
  // Support a user defined agent - or a proxy agent - else we specify our own, forcing keepAlive to true (which is default in Node >= 19)
29
23
  const agent = config.agent || proxyAgent || (url => url.protocol === 'http:' ? httpAgent : httpsAgent);
30
24
 
31
- global.fetch = async (url, options) => fetch__default["default"](url, { ...options, agent });
25
+ global.fetch = async (url, options) => fetch(url, { ...options, agent });
32
26
  }
33
27
 
34
28
  // logging setup
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var name = "web-engine";
6
- var version = "3.3.347";
6
+ var version = "3.3.349";
7
7
  var license = "UNLICENSED";
8
8
  var type = "module";
9
9
  var main = "src/main.js";
@@ -24,7 +24,7 @@ var scripts = {
24
24
  "e2e:comp": "cypress run --component",
25
25
  "e2e:record": "yarn cypress run --env RECORD_MODE=true",
26
26
  e2eSDKTest: "yarn start-server-and-test 'cd ./deploy && yarn buildDev && yarn serveLocal' 8085 'cd ./cypress/e2e/sdk && npx http-server' 8080 'yarn cypress run --spec cypress/e2e/sdk/**'",
27
- e2eTest: "percy exec -- cypress run --browser chrome",
27
+ e2eTest: "cypress run --browser chrome",
28
28
  goProd: "cd deploy && scripts/goProd.sh",
29
29
  goStaging: "deploy/scripts/goStaging.sh",
30
30
  i18nOverrides: "yarn node utils/i18nOverrideCli src/i18n src/i18n-overrides",
@@ -75,7 +75,7 @@ var dependencies = {
75
75
  "@locus-labs/mol-mobile-toast": "^0.1.102",
76
76
  "@mapbox/mapbox-gl-draw": "^1.4.3",
77
77
  "@mapbox/mapbox-gl-draw-static-mode": "^1.0.1",
78
- "@microsoft/applicationinsights-web": "^3.1.2",
78
+ "@microsoft/applicationinsights-web": "^3.3.4",
79
79
  "@turf/circle": "^6.5.0",
80
80
  "@turf/helpers": "^6.5.0",
81
81
  "@turf/point-to-line-distance": "^6.5.0",
@@ -91,8 +91,8 @@ var dependencies = {
91
91
  "h3-js": "^4.1.0",
92
92
  i18next: "^20.3.4",
93
93
  "i18next-browser-languagedetector": "^6.1.1",
94
- "jest-transform-css": "4.0.1",
95
- jsdom: "^25.0.0",
94
+ "jest-transform-css": "6.0.1",
95
+ jsdom: "^25.0.1",
96
96
  jsonschema: "^1.2.6",
97
97
  luxon: "^3.3.0",
98
98
  "maplibre-gl": "^4.7.1",
@@ -104,7 +104,7 @@ var dependencies = {
104
104
  polished: "^4.0.2",
105
105
  "prop-types": "^15.7.2",
106
106
  "query-string": "^8.1.0",
107
- ramda: "^0.28.0",
107
+ ramda: "^0.30.1",
108
108
  react: "^17.0.2",
109
109
  "react-compound-slider": "^3.3.1",
110
110
  "react-dom": "^17.0.2",
@@ -134,9 +134,7 @@ var devDependencies = {
134
134
  "@babel/plugin-transform-runtime": "^7.25.9",
135
135
  "@babel/preset-env": "^7.26.0",
136
136
  "@babel/preset-react": "^7.25.9",
137
- "@percy/cli": "^1.0.0-beta.60",
138
- "@percy/cypress": "^3.1.0",
139
- "@testing-library/jest-dom": "^6.5.0",
137
+ "@testing-library/jest-dom": "^6.6.3",
140
138
  "@typescript-eslint/eslint-plugin": "^7.13.0",
141
139
  "@typescript-eslint/parser": "^7.13.0",
142
140
  "babel-jest": "^27.0.6",
@@ -163,7 +161,8 @@ var devDependencies = {
163
161
  "fetch-mock-jest": "^1.3.0",
164
162
  glob: "^10.3.3",
165
163
  husky: "^6.0.0",
166
- jest: "27.5.1",
164
+ jest: "29.7.0",
165
+ "jest-environment-jsdom": "^29.7.0",
167
166
  "lint-staged": "^11.0.1",
168
167
  "node-fetch": "^2.6.0",
169
168
  "null-loader": "^4.0.1",
@@ -172,9 +171,9 @@ var devDependencies = {
172
171
  "start-server-and-test": "^2.0.0",
173
172
  typescript: "^5.4.5",
174
173
  vite: "^4.3.9",
175
- vitest: "^2.0.5",
176
- webpack: "^5.84.1",
177
- "webpack-merge": "^5.8.0"
174
+ vitest: "^2.1.5",
175
+ webpack: "^5.96.1",
176
+ "webpack-merge": "^6.0.1"
178
177
  };
179
178
  var packageManager = "yarn@4.3.1";
180
179
  var engines = {
@@ -205,7 +204,7 @@ var pkg = {
205
204
  };
206
205
 
207
206
  exports.browserslist = browserslist;
208
- exports["default"] = pkg;
207
+ exports.default = pkg;
209
208
  exports.dependencies = dependencies;
210
209
  exports.devDependencies = devDependencies;
211
210
  exports.engines = engines;
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var index = require('../../../src/extModules/flexapi/src/index.js');
6
4
 
7
5
  function create (app, config) {
@@ -1,14 +1,9 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var R = require('ramda');
6
4
  var Zousan = require('zousan');
7
5
 
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
-
10
- function _interopNamespace(e) {
11
- if (e && e.__esModule) return e;
6
+ function _interopNamespaceDefault(e) {
12
7
  var n = Object.create(null);
13
8
  if (e) {
14
9
  Object.keys(e).forEach(function (k) {
@@ -21,12 +16,11 @@ function _interopNamespace(e) {
21
16
  }
22
17
  });
23
18
  }
24
- n["default"] = e;
19
+ n.default = e;
25
20
  return Object.freeze(n);
26
21
  }
27
22
 
28
- var R__namespace = /*#__PURE__*/_interopNamespace(R);
29
- var Zousan__default = /*#__PURE__*/_interopDefaultLegacy(Zousan);
23
+ var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
30
24
 
31
25
  /*
32
26
  This service obtains dynamic POI data from our own backend REST API service.
@@ -53,11 +47,12 @@ var Zousan__default = /*#__PURE__*/_interopDefaultLegacy(Zousan);
53
47
  lastUpdated: timestamp of last update (as sent by server)
54
48
  */
55
49
 
50
+
56
51
  const REFRESH_FREQUENCY = 1000 * 30; // every 30 seconds
57
52
 
58
53
  function create (app, config) {
59
- let dataLoadedProm = new Zousan__default["default"]();
60
- const dynamicDataNotPending = new Zousan__default["default"]();
54
+ let dataLoadedProm = new Zousan();
55
+ const dynamicDataNotPending = new Zousan();
61
56
 
62
57
  const T = app.gt();
63
58
 
@@ -209,7 +204,7 @@ function create (app, config) {
209
204
 
210
205
  app.bus.on('venueData/venueDataLoaded', ({ venueData }) => {
211
206
  if (dataLoadedProm.v) // non-standard - indicates promise has been resolved...
212
- dataLoadedProm = Zousan__default["default"].resolve(venueData);
207
+ dataLoadedProm = Zousan.resolve(venueData);
213
208
  else
214
209
  dataLoadedProm.resolve(venueData);
215
210
  });
@@ -1,17 +1,12 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var R = require('ramda');
6
4
  var Zousan = require('zousan');
7
5
  var buildStructureLookup = require('../../../src/utils/buildStructureLookup.js');
8
6
  var configUtils = require('../../../src/utils/configUtils.js');
9
7
  var i18n = require('../../../src/utils/i18n.js');
10
8
 
11
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
-
13
- function _interopNamespace(e) {
14
- if (e && e.__esModule) return e;
9
+ function _interopNamespaceDefault(e) {
15
10
  var n = Object.create(null);
16
11
  if (e) {
17
12
  Object.keys(e).forEach(function (k) {
@@ -24,12 +19,11 @@ function _interopNamespace(e) {
24
19
  }
25
20
  });
26
21
  }
27
- n["default"] = e;
22
+ n.default = e;
28
23
  return Object.freeze(n);
29
24
  }
30
25
 
31
- var R__namespace = /*#__PURE__*/_interopNamespace(R);
32
- var Zousan__default = /*#__PURE__*/_interopDefaultLegacy(Zousan);
26
+ var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
33
27
 
34
28
  async function create (app, config) {
35
29
  const log = app.log.sublog('poiDataManager');
@@ -37,7 +31,7 @@ async function create (app, config) {
37
31
  app.bus.send('venueData/loadPoiData');
38
32
  };
39
33
 
40
- let poisLoaded = new Zousan__default["default"]();
34
+ let poisLoaded = new Zousan();
41
35
 
42
36
  const fixPositionInfo = (poi, structuresLookup) => {
43
37
  const { position } = poi;
@@ -89,7 +83,7 @@ async function create (app, config) {
89
83
 
90
84
  const getRoomId = R__namespace.pipe(
91
85
  R__namespace.propOr([], 'externalIds'),
92
- R__namespace.find(R__namespace.propEq('type', 'roomId')),
86
+ R__namespace.find(R__namespace.propEq('roomId', 'type')),
93
87
  R__namespace.prop('id'),
94
88
  R__namespace.unless(R__namespace.isNil, R__namespace.tail)
95
89
  );
@@ -174,7 +168,7 @@ async function create (app, config) {
174
168
  });
175
169
 
176
170
  app.bus.on('poi/getByFloorId', async ({ floorId }) => poisLoaded.then(
177
- R__namespace.pickBy(R__namespace.pathEq(['position', 'floorId'], floorId))));
171
+ R__namespace.pickBy(R__namespace.pathEq(floorId, ['position', 'floorId']))));
178
172
 
179
173
  app.bus.on('poi/getByCategoryId', async ({ categoryId }) => {
180
174
  // returns true for exact category matches or parent category matches
@@ -207,7 +201,7 @@ async function create (app, config) {
207
201
  const queueSubtypes = queueTypes[queueType];
208
202
  const primaryCheckpointId = R__namespace.path(checkpointPath, currentPoi);
209
203
  return securityPois
210
- .filter(R__namespace.pathEq(checkpointPath, primaryCheckpointId)) // filter only connected security checkpoints
204
+ .filter(R__namespace.pathEq(primaryCheckpointId, checkpointPath)) // filter only connected security checkpoints
211
205
  .filter(poi => poi.poiId !== currentPoi.poiId) // skip current poi
212
206
  .map(poi => {
213
207
  const laneId = R__namespace.path(['queue', 'queueSubtype'], poi);
@@ -225,7 +219,7 @@ async function create (app, config) {
225
219
  };
226
220
 
227
221
  const getLaneData = laneId => R__namespace.pipe(
228
- R__namespace.find(R__namespace.propEq('id', laneId)),
222
+ R__namespace.find(R__namespace.propEq(laneId, 'id')),
229
223
  ensureDefined(`No queue found with ID: ${laneId}`),
230
224
  R__namespace.pick(['displayText', 'imageId'])
231
225
  );
@@ -241,7 +235,7 @@ async function create (app, config) {
241
235
  if (!R__namespace.length(poi.images)) {
242
236
  poi.images = [];
243
237
  } else if (!poi.images[0].startsWith('https:')) { // then images are not yet transformed
244
- poi.images = await Zousan__default["default"].all(
238
+ poi.images = await Zousan.all(
245
239
  poi.images.map(imageName =>
246
240
  app.bus.get('venueData/getPoiImageUrl', { imageName, size: `${Math.round(351 * dpr)}x${Math.round(197 * dpr)}` })));
247
241
  }
@@ -253,7 +247,7 @@ async function create (app, config) {
253
247
  app.bus.on('poi/getAllCategories', async () => poisLoaded.then(getUniqueCategories));
254
248
 
255
249
  app.bus.on('venueData/loadNewVenue', () => {
256
- poisLoaded = new Zousan__default["default"]();
250
+ poisLoaded = new Zousan();
257
251
  init();
258
252
  });
259
253
 
@@ -1,12 +1,9 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var R = require('ramda');
6
4
  var location = require('../../../src/utils/location.js');
7
5
 
8
- function _interopNamespace(e) {
9
- if (e && e.__esModule) return e;
6
+ function _interopNamespaceDefault(e) {
10
7
  var n = Object.create(null);
11
8
  if (e) {
12
9
  Object.keys(e).forEach(function (k) {
@@ -19,11 +16,11 @@ function _interopNamespace(e) {
19
16
  }
20
17
  });
21
18
  }
22
- n["default"] = e;
19
+ n.default = e;
23
20
  return Object.freeze(n);
24
21
  }
25
22
 
26
- var R__namespace = /*#__PURE__*/_interopNamespace(R);
23
+ var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
27
24
 
28
25
  const headlessCommands = [
29
26
  { command: 'destroy' },
@@ -1,12 +1,10 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var geom = require('../../../src/utils/geom.js');
6
4
  var observable = require('../../../src/utils/observable.js');
7
5
  var sdkHeadless = require('./sdkHeadless.js');
8
6
 
9
- function _interopNamespaceDefaultOnly (e) { return Object.freeze({ __proto__: null, 'default': e }); }
7
+ function _interopNamespaceDefaultOnly (e) { return Object.freeze({ __proto__: null, default: e }); }
10
8
 
11
9
  let removePreviousListener = null;
12
10
 
@@ -3,8 +3,7 @@
3
3
  var R = require('ramda');
4
4
  var utils = require('./utils.js');
5
5
 
6
- function _interopNamespace(e) {
7
- if (e && e.__esModule) return e;
6
+ function _interopNamespaceDefault(e) {
8
7
  var n = Object.create(null);
9
8
  if (e) {
10
9
  Object.keys(e).forEach(function (k) {
@@ -17,11 +16,11 @@ function _interopNamespace(e) {
17
16
  }
18
17
  });
19
18
  }
20
- n["default"] = e;
19
+ n.default = e;
21
20
  return Object.freeze(n);
22
21
  }
23
22
 
24
- var R__namespace = /*#__PURE__*/_interopNamespace(R);
23
+ var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
25
24
 
26
25
  const DEFAULT_RESULTS_LIMIT = 5000;
27
26
 
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var R = require('ramda');
6
4
  var Zousan = require('zousan');
7
5
  var configUtils = require('../../../src/utils/configUtils.js');
@@ -9,10 +7,7 @@ var rand = require('../../../src/utils/rand.js');
9
7
  var poiSearch = require('./poiSearch.js');
10
8
  var searchTypeahead = require('./searchTypeahead.js');
11
9
 
12
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
-
14
- function _interopNamespace(e) {
15
- if (e && e.__esModule) return e;
10
+ function _interopNamespaceDefault(e) {
16
11
  var n = Object.create(null);
17
12
  if (e) {
18
13
  Object.keys(e).forEach(function (k) {
@@ -25,18 +20,17 @@ function _interopNamespace(e) {
25
20
  }
26
21
  });
27
22
  }
28
- n["default"] = e;
23
+ n.default = e;
29
24
  return Object.freeze(n);
30
25
  }
31
26
 
32
- var R__namespace = /*#__PURE__*/_interopNamespace(R);
33
- var Zousan__default = /*#__PURE__*/_interopDefaultLegacy(Zousan);
27
+ var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
34
28
 
35
29
  function create (app, config) {
36
30
  const state = {
37
31
  poiSearch: null,
38
32
  typeahead: null,
39
- indexesCreated: new Zousan__default["default"](), // re-initialize this when changing venues
33
+ indexesCreated: new Zousan(), // re-initialize this when changing venues
40
34
  defaultSearchTerms: null,
41
35
  specialQueryTerms: {}
42
36
  };
@@ -225,7 +219,7 @@ function create (app, config) {
225
219
  * Resets plugin state.
226
220
  */
227
221
  app.bus.on('venueData/loadNewVenue', () => {
228
- state.indexesCreated = new Zousan__default["default"]();
222
+ state.indexesCreated = new Zousan();
229
223
  init();
230
224
  });
231
225
 
@@ -1,13 +1,7 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var FlexSearch = require('flexsearch');
6
4
 
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- var FlexSearch__default = /*#__PURE__*/_interopDefaultLegacy(FlexSearch);
10
-
11
5
  const NON_ASCII_LANGUAGES = ['ko', 'ja', 'zh-Hans', 'zh-Hant'];
12
6
 
13
7
  const getFlexSearchInstance = ({ lang, type = 'standard' }) => {
@@ -26,7 +20,7 @@ const getFlexSearchInstance = ({ lang, type = 'standard' }) => {
26
20
  if (NON_ASCII_LANGUAGES.includes(lang))
27
21
  options.tokenize = 'full';
28
22
 
29
- return new FlexSearch__default["default"].Index(options)
23
+ return new FlexSearch.Index(options)
30
24
  };
31
25
 
32
26
  exports.getFlexSearchInstance = getFlexSearchInstance;
@@ -1,15 +1,10 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var R = require('ramda');
6
4
  var Zousan = require('zousan');
7
5
  var venueLoadingUtils = require('./venueLoadingUtils.js');
8
6
 
9
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
-
11
- function _interopNamespace(e) {
12
- if (e && e.__esModule) return e;
7
+ function _interopNamespaceDefault(e) {
13
8
  var n = Object.create(null);
14
9
  if (e) {
15
10
  Object.keys(e).forEach(function (k) {
@@ -22,19 +17,18 @@ function _interopNamespace(e) {
22
17
  }
23
18
  });
24
19
  }
25
- n["default"] = e;
20
+ n.default = e;
26
21
  return Object.freeze(n);
27
22
  }
28
23
 
29
- var R__namespace = /*#__PURE__*/_interopNamespace(R);
30
- var Zousan__default = /*#__PURE__*/_interopDefaultLegacy(Zousan);
24
+ var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
31
25
 
32
26
  const USE_AUTH_WHEN_NOT_PROD_STAGE = false; // turning this off for now (per Jessica request)
33
27
 
34
28
  async function create (app, config) {
35
29
  const log = app.log.sublog('venueDataLoader');
36
- let venueDataLoaded = new Zousan__default["default"]();
37
- let mapDataLoaded = new Zousan__default["default"]();
30
+ let venueDataLoaded = new Zousan();
31
+ let mapDataLoaded = new Zousan();
38
32
 
39
33
  const getDefaultStructureId = venueData =>
40
34
  venueData.defaultStructureId ||
@@ -99,7 +93,7 @@ async function create (app, config) {
99
93
 
100
94
  function getDefaultOrdinal (venueData) {
101
95
  const defaultStructureId = getDefaultStructureId(venueData);
102
- const defaultStructure = Object.values(venueData.structures).find(R__namespace.propEq('id', defaultStructureId));
96
+ const defaultStructure = Object.values(venueData.structures).find(R__namespace.propEq(defaultStructureId, 'id'));
103
97
  return defaultStructure.levels[defaultStructure.defaultLevelId].ordinal
104
98
  }
105
99
 
@@ -203,7 +197,7 @@ async function create (app, config) {
203
197
  R__namespace.map(venueData.fetchJson),
204
198
  R__namespace.map(R__namespace.andThen(featureJSON =>
205
199
  [featureJSON.id, enrichFeaturesForLevel(featureJSON.id, featureJSON.features, venueData.id, venueData.structures)])),
206
- promises => Zousan__default["default"].all(promises),
200
+ promises => Zousan.all(promises),
207
201
  R__namespace.andThen(R__namespace.fromPairs)
208
202
  )(venueData)
209
203
  }
@@ -354,8 +348,8 @@ async function create (app, config) {
354
348
  app.bus.on('venueData/loadNewVenue', async ({ venueId, accountId, assetStage = config.assetStage }) => {
355
349
  venueDataLoaded.reject(new Error('loadNewVenue called - previous loading ignored'));
356
350
  mapDataLoaded.reject(new Error('loadNewVenue called - previous loading ignored'));
357
- venueDataLoaded = new Zousan__default["default"]();
358
- mapDataLoaded = new Zousan__default["default"]();
351
+ venueDataLoaded = new Zousan();
352
+ mapDataLoaded = new Zousan();
359
353
  loadVenueData({ ...config, venueId, accountId, assetStage }, [])
360
354
  .then(notifyState);
361
355
  });
@@ -438,11 +432,11 @@ async function create (app, config) {
438
432
 
439
433
  const runTest = async ({ testRoutine, reset = false, venueData = null }) => {
440
434
  if (reset || venueData) {
441
- venueDataLoaded = new Zousan__default["default"]();
442
- mapDataLoaded = new Zousan__default["default"]();
435
+ venueDataLoaded = new Zousan();
436
+ mapDataLoaded = new Zousan();
443
437
  }
444
438
  if (venueData)
445
- venueDataLoaded = Zousan__default["default"].resolve(venueData);
439
+ venueDataLoaded = Zousan.resolve(venueData);
446
440
 
447
441
  await testRoutine();
448
442
 
@@ -1,13 +1,10 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var R = require('ramda');
6
4
  var bounds = require('../../../src/utils/bounds.js');
7
5
  var configUtils = require('../../../src/utils/configUtils.js');
8
6
 
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
7
+ function _interopNamespaceDefault(e) {
11
8
  var n = Object.create(null);
12
9
  if (e) {
13
10
  Object.keys(e).forEach(function (k) {
@@ -20,21 +17,14 @@ function _interopNamespace(e) {
20
17
  }
21
18
  });
22
19
  }
23
- n["default"] = e;
20
+ n.default = e;
24
21
  return Object.freeze(n);
25
22
  }
26
23
 
27
- var R__namespace = /*#__PURE__*/_interopNamespace(R);
24
+ var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
28
25
 
29
26
  const fetchURL = async (token, url) => {
30
- if (token) {
31
- return fetch(url, {
32
- headers: {
33
- Authorization: token
34
- }
35
- })
36
- } else
37
- return fetch(url)
27
+ return fetch(url)
38
28
  };
39
29
 
40
30
  const createFetchJson = (token) => url => fetchURL(token, url).then(response => response.json());
@@ -1,12 +1,9 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var R = require('ramda');
6
4
  var wayfinder = require('./wayfinder.js');
7
5
 
8
- function _interopNamespace(e) {
9
- if (e && e.__esModule) return e;
6
+ function _interopNamespaceDefault(e) {
10
7
  var n = Object.create(null);
11
8
  if (e) {
12
9
  Object.keys(e).forEach(function (k) {
@@ -19,11 +16,11 @@ function _interopNamespace(e) {
19
16
  }
20
17
  });
21
18
  }
22
- n["default"] = e;
19
+ n.default = e;
23
20
  return Object.freeze(n);
24
21
  }
25
22
 
26
- var R__namespace = /*#__PURE__*/_interopNamespace(R);
23
+ var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
27
24
 
28
25
  const getEdgeTo = dst => node => R__namespace.find(e => e.dst === dst, node.edges);
29
26
 
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var R = require('ramda');
6
4
  var geohasher = require('../../../src/extModules/geohasher.js');
7
5
  var geodesy = require('../../../src/utils/geodesy.js');
@@ -1,11 +1,8 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var R = require('ramda');
6
4
 
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
5
+ function _interopNamespaceDefault(e) {
9
6
  var n = Object.create(null);
10
7
  if (e) {
11
8
  Object.keys(e).forEach(function (k) {
@@ -18,11 +15,11 @@ function _interopNamespace(e) {
18
15
  }
19
16
  });
20
17
  }
21
- n["default"] = e;
18
+ n.default = e;
22
19
  return Object.freeze(n);
23
20
  }
24
21
 
25
- var R__namespace = /*#__PURE__*/_interopNamespace(R);
22
+ var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
26
23
 
27
24
  /**
28
25
  * Visits all nodes (breadth-first) from the nodes2visit
@@ -1,14 +1,11 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var R = require('ramda');
6
4
  var geom = require('../../../src/utils/geom.js');
7
5
  var segmentCategories = require('./segmentCategories.js');
8
6
  var stepBuilder = require('./stepBuilder.js');
9
7
 
10
- function _interopNamespace(e) {
11
- if (e && e.__esModule) return e;
8
+ function _interopNamespaceDefault(e) {
12
9
  var n = Object.create(null);
13
10
  if (e) {
14
11
  Object.keys(e).forEach(function (k) {
@@ -21,11 +18,11 @@ function _interopNamespace(e) {
21
18
  }
22
19
  });
23
20
  }
24
- n["default"] = e;
21
+ n.default = e;
25
22
  return Object.freeze(n);
26
23
  }
27
24
 
28
- var R__namespace = /*#__PURE__*/_interopNamespace(R);
25
+ var R__namespace = /*#__PURE__*/_interopNamespaceDefault(R);
29
26
 
30
27
  const setSegmentCategory = (segments) => {
31
28
  // Set the category of each segment based on the type of the current segment or the type of the next segment in case we are walking
@@ -233,7 +233,7 @@ const getSecurityLaneName = (queueTypes, waypoints) => {
233
233
  const lane = findPropWaypoints('securityLane')(waypoints);
234
234
  if (!lane) return
235
235
  const types = R.prop(lane.type, queueTypes);
236
- const laneType = R.find(R.propEq('id', lane.id), types);
236
+ const laneType = R.find(R.propEq(lane.id, 'id'), types);
237
237
  return R.prop('displayText', laneType)
238
238
  };
239
239