@mapvx/web-js 1.7.0 → 1.8.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.js CHANGED
@@ -6814,7 +6814,7 @@ var rollbar_umd_min_default = /*#__PURE__*/__webpack_require__.n(rollbar_umd_min
6814
6814
  // version placeholder is replaced with the package version by
6815
6815
  // scripts/inject-build-defines.js. The access token falls back to the MapVX
6816
6816
  // SDK-web Rollbar project token when none is injected at build time.
6817
- var SDK_VERSION = true ? "1.7.0" : 0;
6817
+ var SDK_VERSION = true ? "1.8.0-dev.2" : 0;
6818
6818
  var ACCESS_TOKEN = false ? 0 : "28279d52df43411ebd138c2bee0ab1df";
6819
6819
  var _rollbarConfig = {
6820
6820
  accessToken: ACCESS_TOKEN,
@@ -6861,7 +6861,7 @@ function logger_toPrimitive(t, r) { if ("object" != logger_typeof(t) || !t) retu
6861
6861
  // by scripts/inject-build-defines.js. The Countly key falls back to the
6862
6862
  // MapVX key when none is injected at build time.
6863
6863
  var IS_DEBUG = true ? false : 0;
6864
- var logger_SDK_VERSION = true ? "1.7.0" : 0;
6864
+ var logger_SDK_VERSION = true ? "1.8.0-dev.2" : 0;
6865
6865
  var COUNTLY_API_KEY = false ? 0 : "f0c8d3b96d336e857a8628f49dd1baf7d7add0e9";
6866
6866
  var logger_countly = {
6867
6867
  apiKey: COUNTLY_API_KEY,
@@ -11980,6 +11980,37 @@ var Requester = /*#__PURE__*/function () {
11980
11980
  }
11981
11981
  return fetchRouteV2;
11982
11982
  }()
11983
+ /**
11984
+ * To obtain the route from the live routing endpoint (`/sdk/liveroute`).
11985
+ * @param routeConfig
11986
+ * @returns
11987
+ */
11988
+ )
11989
+ }, {
11990
+ key: "fetchLiveRoute",
11991
+ value: (function () {
11992
+ var _fetchLiveRoute = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee12(routeConfig, token) {
11993
+ var options, cleanParams;
11994
+ return requester_regenerator().w(function (_context12) {
11995
+ while (1) switch (_context12.n) {
11996
+ case 0:
11997
+ options = {
11998
+ method: "GET",
11999
+ headers: {
12000
+ "content-type": "application/json",
12001
+ Authorization: "Bearer ".concat(token)
12002
+ }
12003
+ };
12004
+ cleanParams = this.buildRouteParams(routeConfig);
12005
+ return _context12.a(2, this.fetchFromUrl(this.routeBaseUrl + "liveroute", cleanParams, options));
12006
+ }
12007
+ }, _callee12, this);
12008
+ }));
12009
+ function fetchLiveRoute(_x32, _x33) {
12010
+ return _fetchLiveRoute.apply(this, arguments);
12011
+ }
12012
+ return fetchLiveRoute;
12013
+ }()
11983
12014
  /**
11984
12015
  * To obtain info associated to an Institution based on id provided
11985
12016
  * It return 403 if the institution id
@@ -11991,10 +12022,10 @@ var Requester = /*#__PURE__*/function () {
11991
12022
  }, {
11992
12023
  key: "fetchInstitutions",
11993
12024
  value: (function () {
11994
- var _fetchInstitutions = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee12(token) {
12025
+ var _fetchInstitutions = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee13(token) {
11995
12026
  var options, params;
11996
- return requester_regenerator().w(function (_context12) {
11997
- while (1) switch (_context12.n) {
12027
+ return requester_regenerator().w(function (_context13) {
12028
+ while (1) switch (_context13.n) {
11998
12029
  case 0:
11999
12030
  options = {
12000
12031
  method: "GET",
@@ -12006,11 +12037,11 @@ var Requester = /*#__PURE__*/function () {
12006
12037
  params = {
12007
12038
  lang: this.lang
12008
12039
  };
12009
- return _context12.a(2, this.fetchFromUrl(this.baseUrl + "institution", params, options));
12040
+ return _context13.a(2, this.fetchFromUrl(this.baseUrl + "institution", params, options));
12010
12041
  }
12011
- }, _callee12, this);
12042
+ }, _callee13, this);
12012
12043
  }));
12013
- function fetchInstitutions(_x32) {
12044
+ function fetchInstitutions(_x34) {
12014
12045
  return _fetchInstitutions.apply(this, arguments);
12015
12046
  }
12016
12047
  return fetchInstitutions;
@@ -12031,10 +12062,10 @@ var Requester = /*#__PURE__*/function () {
12031
12062
  }, {
12032
12063
  key: "fetchSearchResults",
12033
12064
  value: (function () {
12034
- var _fetchSearchResults = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee13(institutionId, input, token, parentIds, origin, lat, lng, floor) {
12065
+ var _fetchSearchResults = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee14(institutionId, input, token, parentIds, origin, lat, lng, floor) {
12035
12066
  var options, params;
12036
- return requester_regenerator().w(function (_context13) {
12037
- while (1) switch (_context13.n) {
12067
+ return requester_regenerator().w(function (_context14) {
12068
+ while (1) switch (_context14.n) {
12038
12069
  case 0:
12039
12070
  options = {
12040
12071
  method: "GET",
@@ -12063,11 +12094,11 @@ var Requester = /*#__PURE__*/function () {
12063
12094
  if (floor) {
12064
12095
  params.floor = floor;
12065
12096
  }
12066
- return _context13.a(2, this.fetchFromUrl(this.baseUrl + "searchPlacesWithFilters", params, options));
12097
+ return _context14.a(2, this.fetchFromUrl(this.baseUrl + "searchPlacesWithFilters", params, options));
12067
12098
  }
12068
- }, _callee13, this);
12099
+ }, _callee14, this);
12069
12100
  }));
12070
- function fetchSearchResults(_x33, _x34, _x35, _x36, _x37, _x38, _x39, _x40) {
12101
+ function fetchSearchResults(_x35, _x36, _x37, _x38, _x39, _x40, _x41, _x42) {
12071
12102
  return _fetchSearchResults.apply(this, arguments);
12072
12103
  }
12073
12104
  return fetchSearchResults;
@@ -12094,10 +12125,10 @@ var Requester = /*#__PURE__*/function () {
12094
12125
  }, {
12095
12126
  key: "fetchSearchPlacesByTags",
12096
12127
  value: (function () {
12097
- var _fetchSearchPlacesByTags = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee14(institutionId, tags, token, parentPlaces, sort, origin, lat, lng, floor) {
12128
+ var _fetchSearchPlacesByTags = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee15(institutionId, tags, token, parentPlaces, sort, origin, lat, lng, floor) {
12098
12129
  var options, params;
12099
- return requester_regenerator().w(function (_context14) {
12100
- while (1) switch (_context14.n) {
12130
+ return requester_regenerator().w(function (_context15) {
12131
+ while (1) switch (_context15.n) {
12101
12132
  case 0:
12102
12133
  // The v2 endpoints authenticate via the Authorization header (Bearer),
12103
12134
  // not via a `token` query parameter like the legacy /api/sdk/* routes.
@@ -12131,11 +12162,11 @@ var Requester = /*#__PURE__*/function () {
12131
12162
  if (floor) {
12132
12163
  params.floor = floor;
12133
12164
  }
12134
- return _context14.a(2, this.fetchFromUrl(this.baseUrl + "searchPlacesByTags", params, options));
12165
+ return _context15.a(2, this.fetchFromUrl(this.baseUrl + "searchPlacesByTags", params, options));
12135
12166
  }
12136
- }, _callee14, this);
12167
+ }, _callee15, this);
12137
12168
  }));
12138
- function fetchSearchPlacesByTags(_x41, _x42, _x43, _x44, _x45, _x46, _x47, _x48, _x49) {
12169
+ function fetchSearchPlacesByTags(_x43, _x44, _x45, _x46, _x47, _x48, _x49, _x50, _x51) {
12139
12170
  return _fetchSearchPlacesByTags.apply(this, arguments);
12140
12171
  }
12141
12172
  return fetchSearchPlacesByTags;
@@ -12143,10 +12174,10 @@ var Requester = /*#__PURE__*/function () {
12143
12174
  }, {
12144
12175
  key: "fetchConfiguration",
12145
12176
  value: function () {
12146
- var _fetchConfiguration = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee15(token, place_id, product) {
12177
+ var _fetchConfiguration = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee16(token, place_id, product) {
12147
12178
  var options, params;
12148
- return requester_regenerator().w(function (_context15) {
12149
- while (1) switch (_context15.n) {
12179
+ return requester_regenerator().w(function (_context16) {
12180
+ while (1) switch (_context16.n) {
12150
12181
  case 0:
12151
12182
  options = {
12152
12183
  method: "GET",
@@ -12160,11 +12191,11 @@ var Requester = /*#__PURE__*/function () {
12160
12191
  };
12161
12192
  if (place_id) params.place_id = place_id;
12162
12193
  if (product) params.product = product;
12163
- return _context15.a(2, this.fetchFromUrl(this.baseUrl + "configuration", params, options));
12194
+ return _context16.a(2, this.fetchFromUrl(this.baseUrl + "configuration", params, options));
12164
12195
  }
12165
- }, _callee15, this);
12196
+ }, _callee16, this);
12166
12197
  }));
12167
- function fetchConfiguration(_x50, _x51, _x52) {
12198
+ function fetchConfiguration(_x52, _x53, _x54) {
12168
12199
  return _fetchConfiguration.apply(this, arguments);
12169
12200
  }
12170
12201
  return fetchConfiguration;
@@ -12172,10 +12203,10 @@ var Requester = /*#__PURE__*/function () {
12172
12203
  }, {
12173
12204
  key: "fetchCategories",
12174
12205
  value: function () {
12175
- var _fetchCategories = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee16(token, place_id) {
12206
+ var _fetchCategories = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee17(token, place_id) {
12176
12207
  var options, params;
12177
- return requester_regenerator().w(function (_context16) {
12178
- while (1) switch (_context16.n) {
12208
+ return requester_regenerator().w(function (_context17) {
12209
+ while (1) switch (_context17.n) {
12179
12210
  case 0:
12180
12211
  options = {
12181
12212
  method: "GET",
@@ -12188,11 +12219,11 @@ var Requester = /*#__PURE__*/function () {
12188
12219
  lang: this.lang
12189
12220
  };
12190
12221
  if (place_id) params.id = place_id;
12191
- return _context16.a(2, this.fetchFromUrl(this.baseUrl + "category", params, options));
12222
+ return _context17.a(2, this.fetchFromUrl(this.baseUrl + "category", params, options));
12192
12223
  }
12193
- }, _callee16, this);
12224
+ }, _callee17, this);
12194
12225
  }));
12195
- function fetchCategories(_x53, _x54) {
12226
+ function fetchCategories(_x55, _x56) {
12196
12227
  return _fetchCategories.apply(this, arguments);
12197
12228
  }
12198
12229
  return fetchCategories;
@@ -12200,10 +12231,10 @@ var Requester = /*#__PURE__*/function () {
12200
12231
  }, {
12201
12232
  key: "fetchRoutesForOrigin",
12202
12233
  value: function () {
12203
- var _fetchRoutesForOrigin = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee17(token, parentPlaceId, fromPlaceId, announceFormat, unitSystem, mode) {
12234
+ var _fetchRoutesForOrigin = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee18(token, parentPlaceId, fromPlaceId, announceFormat, unitSystem, mode) {
12204
12235
  var options, params;
12205
- return requester_regenerator().w(function (_context17) {
12206
- while (1) switch (_context17.n) {
12236
+ return requester_regenerator().w(function (_context18) {
12237
+ while (1) switch (_context18.n) {
12207
12238
  case 0:
12208
12239
  options = {
12209
12240
  method: "GET",
@@ -12220,11 +12251,11 @@ var Requester = /*#__PURE__*/function () {
12220
12251
  mode: mode,
12221
12252
  lang: this.lang
12222
12253
  };
12223
- return _context17.a(2, this.fetchFromUrl(this.routeBaseUrl + "routes_for_origin", params, options));
12254
+ return _context18.a(2, this.fetchFromUrl(this.routeBaseUrl + "routes_for_origin", params, options));
12224
12255
  }
12225
- }, _callee17, this);
12256
+ }, _callee18, this);
12226
12257
  }));
12227
- function fetchRoutesForOrigin(_x55, _x56, _x57, _x58, _x59, _x60) {
12258
+ function fetchRoutesForOrigin(_x57, _x58, _x59, _x60, _x61, _x62) {
12228
12259
  return _fetchRoutesForOrigin.apply(this, arguments);
12229
12260
  }
12230
12261
  return fetchRoutesForOrigin;
@@ -12232,10 +12263,10 @@ var Requester = /*#__PURE__*/function () {
12232
12263
  }, {
12233
12264
  key: "fetchCacheTimestamp",
12234
12265
  value: function () {
12235
- var _fetchCacheTimestamp = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee18(token, placeId) {
12266
+ var _fetchCacheTimestamp = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee19(token, placeId) {
12236
12267
  var options, params;
12237
- return requester_regenerator().w(function (_context18) {
12238
- while (1) switch (_context18.n) {
12268
+ return requester_regenerator().w(function (_context19) {
12269
+ while (1) switch (_context19.n) {
12239
12270
  case 0:
12240
12271
  options = {
12241
12272
  method: "GET",
@@ -12247,11 +12278,11 @@ var Requester = /*#__PURE__*/function () {
12247
12278
  params = {
12248
12279
  placeId: placeId
12249
12280
  };
12250
- return _context18.a(2, this.fetchFromUrl(this.routeBaseUrl + "cache_timestamp", params, options));
12281
+ return _context19.a(2, this.fetchFromUrl(this.routeBaseUrl + "cache_timestamp", params, options));
12251
12282
  }
12252
- }, _callee18, this);
12283
+ }, _callee19, this);
12253
12284
  }));
12254
- function fetchCacheTimestamp(_x61, _x62) {
12285
+ function fetchCacheTimestamp(_x63, _x64) {
12255
12286
  return _fetchCacheTimestamp.apply(this, arguments);
12256
12287
  }
12257
12288
  return fetchCacheTimestamp;
@@ -12259,10 +12290,10 @@ var Requester = /*#__PURE__*/function () {
12259
12290
  }, {
12260
12291
  key: "fetchCssCustomization",
12261
12292
  value: function () {
12262
- var _fetchCssCustomization = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee19(token, type) {
12293
+ var _fetchCssCustomization = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee20(token, type) {
12263
12294
  var options, params;
12264
- return requester_regenerator().w(function (_context19) {
12265
- while (1) switch (_context19.n) {
12295
+ return requester_regenerator().w(function (_context20) {
12296
+ while (1) switch (_context20.n) {
12266
12297
  case 0:
12267
12298
  options = {
12268
12299
  method: "GET",
@@ -12274,11 +12305,11 @@ var Requester = /*#__PURE__*/function () {
12274
12305
  params = {
12275
12306
  type: type
12276
12307
  };
12277
- return _context19.a(2, this.fetchFromUrl(this.baseUrl + "styles/customStyles", params, options));
12308
+ return _context20.a(2, this.fetchFromUrl(this.baseUrl + "styles/customStyles", params, options));
12278
12309
  }
12279
- }, _callee19, this);
12310
+ }, _callee20, this);
12280
12311
  }));
12281
- function fetchCssCustomization(_x63, _x64) {
12312
+ function fetchCssCustomization(_x65, _x66) {
12282
12313
  return _fetchCssCustomization.apply(this, arguments);
12283
12314
  }
12284
12315
  return fetchCssCustomization;
@@ -12286,10 +12317,10 @@ var Requester = /*#__PURE__*/function () {
12286
12317
  }, {
12287
12318
  key: "postHealth",
12288
12319
  value: function () {
12289
- var _postHealth = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee20(token, healthPingId, placeId, totemId, status) {
12320
+ var _postHealth = requester_asyncToGenerator(/*#__PURE__*/requester_regenerator().m(function _callee21(token, healthPingId, placeId, totemId, status) {
12290
12321
  var requestData, params, options;
12291
- return requester_regenerator().w(function (_context20) {
12292
- while (1) switch (_context20.n) {
12322
+ return requester_regenerator().w(function (_context21) {
12323
+ while (1) switch (_context21.n) {
12293
12324
  case 0:
12294
12325
  requestData = JSON.stringify({
12295
12326
  healthPingId: healthPingId,
@@ -12307,11 +12338,11 @@ var Requester = /*#__PURE__*/function () {
12307
12338
  },
12308
12339
  body: requestData
12309
12340
  };
12310
- return _context20.a(2, this.fetchFromUrl(this.baseUrlHealth, params, options));
12341
+ return _context21.a(2, this.fetchFromUrl(this.baseUrlHealth, params, options));
12311
12342
  }
12312
- }, _callee20, this);
12343
+ }, _callee21, this);
12313
12344
  }));
12314
- function postHealth(_x65, _x66, _x67, _x68, _x69) {
12345
+ function postHealth(_x67, _x68, _x69, _x70, _x71) {
12315
12346
  return _postHealth.apply(this, arguments);
12316
12347
  }
12317
12348
  return postHealth;
@@ -13111,54 +13142,99 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13111
13142
  return fetchAndParseRouteV2;
13112
13143
  }()
13113
13144
  }, {
13114
- key: "fetchAndParseTransport",
13145
+ key: "fetchAndParseLiveRoute",
13115
13146
  value: function () {
13116
- var _fetchAndParseTransport = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee10(stopId) {
13117
- var _this7 = this;
13118
- var cachedResponse, response, errorBody, typedResponseData, stopsPromises, stops, transport, _cachedResponse, _transport, _t10;
13147
+ var _fetchAndParseLiveRoute = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee10(config) {
13148
+ var response, errorBody, responseData, route, _t10;
13119
13149
  return repository_regenerator().w(function (_context10) {
13120
13150
  while (1) switch (_context10.p = _context10.n) {
13121
13151
  case 0:
13122
13152
  _context10.p = 0;
13153
+ _context10.n = 1;
13154
+ return this.requester.fetchLiveRoute(config, this.token);
13155
+ case 1:
13156
+ response = _context10.v;
13157
+ if (response.ok) {
13158
+ _context10.n = 3;
13159
+ break;
13160
+ }
13161
+ _context10.n = 2;
13162
+ return response.json();
13163
+ case 2:
13164
+ errorBody = _context10.v;
13165
+ throw new Error("Fetch failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13166
+ case 3:
13167
+ _context10.n = 4;
13168
+ return response.json();
13169
+ case 4:
13170
+ responseData = _context10.v;
13171
+ route = new MVXRoute(responseData[0]);
13172
+ this.logEvent("fetchAndParseLiveRoute");
13173
+ this.debugLog("Live route fetched.");
13174
+ return _context10.a(2, route);
13175
+ case 5:
13176
+ _context10.p = 5;
13177
+ _t10 = _context10.v;
13178
+ throw new Error("Failed to fetch and parse route");
13179
+ case 6:
13180
+ return _context10.a(2);
13181
+ }
13182
+ }, _callee10, this, [[0, 5]]);
13183
+ }));
13184
+ function fetchAndParseLiveRoute(_x12) {
13185
+ return _fetchAndParseLiveRoute.apply(this, arguments);
13186
+ }
13187
+ return fetchAndParseLiveRoute;
13188
+ }()
13189
+ }, {
13190
+ key: "fetchAndParseTransport",
13191
+ value: function () {
13192
+ var _fetchAndParseTransport = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee11(stopId) {
13193
+ var _this7 = this;
13194
+ var cachedResponse, response, errorBody, typedResponseData, stopsPromises, stops, transport, _cachedResponse, _transport, _t11;
13195
+ return repository_regenerator().w(function (_context11) {
13196
+ while (1) switch (_context11.p = _context11.n) {
13197
+ case 0:
13198
+ _context11.p = 0;
13123
13199
  cachedResponse = this.cache.getVehicle(stopId, this.currentLang);
13124
13200
  if (!(cachedResponse != null && (Date.now() - cachedResponse.timestamp < 60 * 1000 || cachedResponse.data.routes.length === 0))) {
13125
- _context10.n = 1;
13201
+ _context11.n = 1;
13126
13202
  break;
13127
13203
  }
13128
13204
  this.logEvent("fetchAndParseTransport", {
13129
13205
  cached: "true"
13130
13206
  });
13131
- return _context10.a(2, cachedResponse.data);
13207
+ return _context11.a(2, cachedResponse.data);
13132
13208
  case 1:
13133
- _context10.n = 2;
13209
+ _context11.n = 2;
13134
13210
  return this.requester.fetchTransport(this.token, stopId);
13135
13211
  case 2:
13136
- response = _context10.v;
13212
+ response = _context11.v;
13137
13213
  if (response.ok) {
13138
- _context10.n = 4;
13214
+ _context11.n = 4;
13139
13215
  break;
13140
13216
  }
13141
- _context10.n = 3;
13217
+ _context11.n = 3;
13142
13218
  return response.json();
13143
13219
  case 3:
13144
- errorBody = _context10.v;
13220
+ errorBody = _context11.v;
13145
13221
  throw new Error("Fetch failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13146
13222
  case 4:
13147
- _context10.n = 5;
13223
+ _context11.n = 5;
13148
13224
  return response.json();
13149
13225
  case 5:
13150
- typedResponseData = _context10.v;
13226
+ typedResponseData = _context11.v;
13151
13227
  if (!(typedResponseData.realtimeSchedules.length > 0)) {
13152
- _context10.n = 7;
13228
+ _context11.n = 7;
13153
13229
  break;
13154
13230
  }
13155
13231
  stopsPromises = typedResponseData.realtimeSchedules.map(function (e) {
13156
13232
  return _this7.fetchAndParseStops(stopId, e.vehicleId);
13157
13233
  });
13158
- _context10.n = 6;
13234
+ _context11.n = 6;
13159
13235
  return Promise.all(stopsPromises);
13160
13236
  case 6:
13161
- stops = _context10.v;
13237
+ stops = _context11.v;
13162
13238
  if (stops.length > 0) {
13163
13239
  typedResponseData.realtimeSchedules.forEach(function (vehicle) {
13164
13240
  var _stops$find$places, _stops$find;
@@ -13176,13 +13252,13 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13176
13252
  this.logEvent("fetchAndParseTransport", {
13177
13253
  cached: "false"
13178
13254
  });
13179
- return _context10.a(2, transport);
13255
+ return _context11.a(2, transport);
13180
13256
  case 8:
13181
- _context10.p = 8;
13182
- _t10 = _context10.v;
13257
+ _context11.p = 8;
13258
+ _t11 = _context11.v;
13183
13259
  _cachedResponse = this.cache.getVehicle(stopId, this.currentLang);
13184
13260
  if (!(_cachedResponse != null)) {
13185
- _context10.n = 9;
13261
+ _context11.n = 9;
13186
13262
  break;
13187
13263
  }
13188
13264
  _transport = new MVXTransport({
@@ -13192,15 +13268,15 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13192
13268
  this.logEvent("fetchAndParseTransport", {
13193
13269
  cached: "true"
13194
13270
  });
13195
- return _context10.a(2, _transport);
13271
+ return _context11.a(2, _transport);
13196
13272
  case 9:
13197
13273
  throw new Error("Failed to fetch and parse transport");
13198
13274
  case 10:
13199
- return _context10.a(2);
13275
+ return _context11.a(2);
13200
13276
  }
13201
- }, _callee10, this, [[0, 8]]);
13277
+ }, _callee11, this, [[0, 8]]);
13202
13278
  }));
13203
- function fetchAndParseTransport(_x12) {
13279
+ function fetchAndParseTransport(_x13) {
13204
13280
  return _fetchAndParseTransport.apply(this, arguments);
13205
13281
  }
13206
13282
  return fetchAndParseTransport;
@@ -13208,43 +13284,43 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13208
13284
  }, {
13209
13285
  key: "fetchAndParseStops",
13210
13286
  value: function () {
13211
- var _fetchAndParseStops = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee11(stopId, vehicleId) {
13212
- var cachedResponse, response, errorBody, typedResponseData, data, _t11;
13213
- return repository_regenerator().w(function (_context11) {
13214
- while (1) switch (_context11.p = _context11.n) {
13287
+ var _fetchAndParseStops = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee12(stopId, vehicleId) {
13288
+ var cachedResponse, response, errorBody, typedResponseData, data, _t12;
13289
+ return repository_regenerator().w(function (_context12) {
13290
+ while (1) switch (_context12.p = _context12.n) {
13215
13291
  case 0:
13216
- _context11.p = 0;
13292
+ _context12.p = 0;
13217
13293
  cachedResponse = this.cache.getStops(stopId + vehicleId, this.currentLang);
13218
13294
  if (!(cachedResponse != null && Date.now() - cachedResponse.timestamp < 60 * 1000)) {
13219
- _context11.n = 1;
13295
+ _context12.n = 1;
13220
13296
  break;
13221
13297
  }
13222
13298
  this.logEvent("fetchAndParseStops", {
13223
13299
  cached: "true"
13224
13300
  });
13225
- return _context11.a(2, {
13301
+ return _context12.a(2, {
13226
13302
  id: vehicleId,
13227
13303
  places: cachedResponse.data
13228
13304
  });
13229
13305
  case 1:
13230
- _context11.n = 2;
13306
+ _context12.n = 2;
13231
13307
  return this.requester.fetchStops(this.token, stopId, vehicleId);
13232
13308
  case 2:
13233
- response = _context11.v;
13309
+ response = _context12.v;
13234
13310
  if (response.ok) {
13235
- _context11.n = 4;
13311
+ _context12.n = 4;
13236
13312
  break;
13237
13313
  }
13238
- _context11.n = 3;
13314
+ _context12.n = 3;
13239
13315
  return response.json();
13240
13316
  case 3:
13241
- errorBody = _context11.v;
13317
+ errorBody = _context12.v;
13242
13318
  throw new Error("Fetch failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13243
13319
  case 4:
13244
- _context11.n = 5;
13320
+ _context12.n = 5;
13245
13321
  return response.json();
13246
13322
  case 5:
13247
- typedResponseData = _context11.v;
13323
+ typedResponseData = _context12.v;
13248
13324
  data = typedResponseData.map(function (e) {
13249
13325
  return new place_MVXPlace(e);
13250
13326
  });
@@ -13255,20 +13331,20 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13255
13331
  this.logEvent("fetchAndParseStops", {
13256
13332
  cached: "false"
13257
13333
  });
13258
- return _context11.a(2, {
13334
+ return _context12.a(2, {
13259
13335
  id: vehicleId,
13260
13336
  places: data
13261
13337
  });
13262
13338
  case 6:
13263
- _context11.p = 6;
13264
- _t11 = _context11.v;
13339
+ _context12.p = 6;
13340
+ _t12 = _context12.v;
13265
13341
  throw new Error("Failed to fetch and parse stops");
13266
13342
  case 7:
13267
- return _context11.a(2);
13343
+ return _context12.a(2);
13268
13344
  }
13269
- }, _callee11, this, [[0, 6]]);
13345
+ }, _callee12, this, [[0, 6]]);
13270
13346
  }));
13271
- function fetchAndParseStops(_x13, _x14) {
13347
+ function fetchAndParseStops(_x14, _x15) {
13272
13348
  return _fetchAndParseStops.apply(this, arguments);
13273
13349
  }
13274
13350
  return fetchAndParseStops;
@@ -13276,44 +13352,44 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13276
13352
  }, {
13277
13353
  key: "fetchAndParseSearchResults",
13278
13354
  value: function () {
13279
- var _fetchAndParseSearchResults = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee12(institutionId, input, parentPlaces, origin, lat, lng, floor) {
13280
- var response, errorBody, responseData, searchResults, _t12;
13281
- return repository_regenerator().w(function (_context12) {
13282
- while (1) switch (_context12.p = _context12.n) {
13355
+ var _fetchAndParseSearchResults = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee13(institutionId, input, parentPlaces, origin, lat, lng, floor) {
13356
+ var response, errorBody, responseData, searchResults, _t13;
13357
+ return repository_regenerator().w(function (_context13) {
13358
+ while (1) switch (_context13.p = _context13.n) {
13283
13359
  case 0:
13284
- _context12.p = 0;
13285
- _context12.n = 1;
13360
+ _context13.p = 0;
13361
+ _context13.n = 1;
13286
13362
  return this.requester.fetchSearchResults(institutionId, input, this.token, parentPlaces, origin, lat, lng, floor);
13287
13363
  case 1:
13288
- response = _context12.v;
13364
+ response = _context13.v;
13289
13365
  if (response.ok) {
13290
- _context12.n = 3;
13366
+ _context13.n = 3;
13291
13367
  break;
13292
13368
  }
13293
- _context12.n = 2;
13369
+ _context13.n = 2;
13294
13370
  return response.json();
13295
13371
  case 2:
13296
- errorBody = _context12.v;
13372
+ errorBody = _context13.v;
13297
13373
  throw new Error("Fetch failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13298
13374
  case 3:
13299
- _context12.n = 4;
13375
+ _context13.n = 4;
13300
13376
  return response.json();
13301
13377
  case 4:
13302
- responseData = _context12.v;
13378
+ responseData = _context13.v;
13303
13379
  searchResults = responseData.map(function (result) {
13304
13380
  return new place_MVXPlace(result);
13305
13381
  });
13306
- return _context12.a(2, searchResults);
13382
+ return _context13.a(2, searchResults);
13307
13383
  case 5:
13308
- _context12.p = 5;
13309
- _t12 = _context12.v;
13384
+ _context13.p = 5;
13385
+ _t13 = _context13.v;
13310
13386
  throw new Error("Failed to fetch and parse search results");
13311
13387
  case 6:
13312
- return _context12.a(2);
13388
+ return _context13.a(2);
13313
13389
  }
13314
- }, _callee12, this, [[0, 5]]);
13390
+ }, _callee13, this, [[0, 5]]);
13315
13391
  }));
13316
- function fetchAndParseSearchResults(_x15, _x16, _x17, _x18, _x19, _x20, _x21) {
13392
+ function fetchAndParseSearchResults(_x16, _x17, _x18, _x19, _x20, _x21, _x22) {
13317
13393
  return _fetchAndParseSearchResults.apply(this, arguments);
13318
13394
  }
13319
13395
  return fetchAndParseSearchResults;
@@ -13321,31 +13397,31 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13321
13397
  }, {
13322
13398
  key: "fetchAndParseSearchPlacesByTags",
13323
13399
  value: function () {
13324
- var _fetchAndParseSearchPlacesByTags = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee13(institutionId, tags, parentPlaces, sort, origin, lat, lng, floor) {
13400
+ var _fetchAndParseSearchPlacesByTags = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee14(institutionId, tags, parentPlaces, sort, origin, lat, lng, floor) {
13325
13401
  var _this8 = this;
13326
- var response, errorBody, responseData, places, _t13;
13327
- return repository_regenerator().w(function (_context13) {
13328
- while (1) switch (_context13.p = _context13.n) {
13402
+ var response, errorBody, responseData, places, _t14;
13403
+ return repository_regenerator().w(function (_context14) {
13404
+ while (1) switch (_context14.p = _context14.n) {
13329
13405
  case 0:
13330
- _context13.p = 0;
13331
- _context13.n = 1;
13406
+ _context14.p = 0;
13407
+ _context14.n = 1;
13332
13408
  return this.requester.fetchSearchPlacesByTags(institutionId, tags, this.token, parentPlaces, sort, origin, lat, lng, floor);
13333
13409
  case 1:
13334
- response = _context13.v;
13410
+ response = _context14.v;
13335
13411
  if (response.ok) {
13336
- _context13.n = 3;
13412
+ _context14.n = 3;
13337
13413
  break;
13338
13414
  }
13339
- _context13.n = 2;
13415
+ _context14.n = 2;
13340
13416
  return response.json();
13341
13417
  case 2:
13342
- errorBody = _context13.v;
13418
+ errorBody = _context14.v;
13343
13419
  throw new Error("Fetch failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13344
13420
  case 3:
13345
- _context13.n = 4;
13421
+ _context14.n = 4;
13346
13422
  return response.json();
13347
13423
  case 4:
13348
- responseData = _context13.v;
13424
+ responseData = _context14.v;
13349
13425
  places = responseData.map(function (place) {
13350
13426
  return new place_MVXPlace(place);
13351
13427
  });
@@ -13358,17 +13434,17 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13358
13434
  _this8.cache.setPlace(place.clientId, place, _this8.currentLang);
13359
13435
  }
13360
13436
  });
13361
- return _context13.a(2, places);
13437
+ return _context14.a(2, places);
13362
13438
  case 5:
13363
- _context13.p = 5;
13364
- _t13 = _context13.v;
13439
+ _context14.p = 5;
13440
+ _t14 = _context14.v;
13365
13441
  throw new Error("Failed to fetch and parse search places by tags");
13366
13442
  case 6:
13367
- return _context13.a(2);
13443
+ return _context14.a(2);
13368
13444
  }
13369
- }, _callee13, this, [[0, 5]]);
13445
+ }, _callee14, this, [[0, 5]]);
13370
13446
  }));
13371
- function fetchAndParseSearchPlacesByTags(_x22, _x23, _x24, _x25, _x26, _x27, _x28, _x29) {
13447
+ function fetchAndParseSearchPlacesByTags(_x23, _x24, _x25, _x26, _x27, _x28, _x29, _x30) {
13372
13448
  return _fetchAndParseSearchPlacesByTags.apply(this, arguments);
13373
13449
  }
13374
13450
  return fetchAndParseSearchPlacesByTags;
@@ -13376,31 +13452,31 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13376
13452
  }, {
13377
13453
  key: "fetchAndParseRoutesFromOrigin",
13378
13454
  value: function () {
13379
- var _fetchAndParseRoutesFromOrigin = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee14(parentPlaceId, fromPlaceId, announceFormat, unitSystem, mode) {
13455
+ var _fetchAndParseRoutesFromOrigin = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee15(parentPlaceId, fromPlaceId, announceFormat, unitSystem, mode) {
13380
13456
  var _this9 = this;
13381
- var response, errorBody, _ref, routes, accessibleRoutes, _t14;
13382
- return repository_regenerator().w(function (_context14) {
13383
- while (1) switch (_context14.p = _context14.n) {
13457
+ var response, errorBody, _ref, routes, accessibleRoutes, _t15;
13458
+ return repository_regenerator().w(function (_context15) {
13459
+ while (1) switch (_context15.p = _context15.n) {
13384
13460
  case 0:
13385
- _context14.p = 0;
13386
- _context14.n = 1;
13461
+ _context15.p = 0;
13462
+ _context15.n = 1;
13387
13463
  return this.requester.fetchRoutesForOrigin(this.token, parentPlaceId, fromPlaceId, announceFormat, unitSystem, mode);
13388
13464
  case 1:
13389
- response = _context14.v;
13465
+ response = _context15.v;
13390
13466
  if (response.ok) {
13391
- _context14.n = 3;
13467
+ _context15.n = 3;
13392
13468
  break;
13393
13469
  }
13394
- _context14.n = 2;
13470
+ _context15.n = 2;
13395
13471
  return response.json();
13396
13472
  case 2:
13397
- errorBody = _context14.v;
13473
+ errorBody = _context15.v;
13398
13474
  throw new Error("Fetch failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13399
13475
  case 3:
13400
- _context14.n = 4;
13476
+ _context15.n = 4;
13401
13477
  return response.json();
13402
13478
  case 4:
13403
- _ref = _context14.v;
13479
+ _ref = _context15.v;
13404
13480
  routes = _ref.routes;
13405
13481
  accessibleRoutes = _ref.accessibleRoutes;
13406
13482
  Object.entries(routes).forEach(function (_ref2) {
@@ -13424,18 +13500,18 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13424
13500
  });
13425
13501
  });
13426
13502
  this.debugLog("Route cache testing. Cache populated!");
13427
- _context14.n = 6;
13503
+ _context15.n = 6;
13428
13504
  break;
13429
13505
  case 5:
13430
- _context14.p = 5;
13431
- _t14 = _context14.v;
13506
+ _context15.p = 5;
13507
+ _t15 = _context15.v;
13432
13508
  throw new Error("Failed to fetch and parse routes from origin results");
13433
13509
  case 6:
13434
- return _context14.a(2);
13510
+ return _context15.a(2);
13435
13511
  }
13436
- }, _callee14, this, [[0, 5]]);
13512
+ }, _callee15, this, [[0, 5]]);
13437
13513
  }));
13438
- function fetchAndParseRoutesFromOrigin(_x30, _x31, _x32, _x33, _x34) {
13514
+ function fetchAndParseRoutesFromOrigin(_x31, _x32, _x33, _x34, _x35) {
13439
13515
  return _fetchAndParseRoutesFromOrigin.apply(this, arguments);
13440
13516
  }
13441
13517
  return fetchAndParseRoutesFromOrigin;
@@ -13443,42 +13519,42 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13443
13519
  }, {
13444
13520
  key: "fetchAndParseCacheTimestamp",
13445
13521
  value: function () {
13446
- var _fetchAndParseCacheTimestamp = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee15(parentPlaceId) {
13447
- var response, errorBody, _ref6, lastUpdate, _t15;
13448
- return repository_regenerator().w(function (_context15) {
13449
- while (1) switch (_context15.p = _context15.n) {
13522
+ var _fetchAndParseCacheTimestamp = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee16(parentPlaceId) {
13523
+ var response, errorBody, _ref6, lastUpdate, _t16;
13524
+ return repository_regenerator().w(function (_context16) {
13525
+ while (1) switch (_context16.p = _context16.n) {
13450
13526
  case 0:
13451
- _context15.p = 0;
13452
- _context15.n = 1;
13527
+ _context16.p = 0;
13528
+ _context16.n = 1;
13453
13529
  return this.requester.fetchCacheTimestamp(this.token, parentPlaceId);
13454
13530
  case 1:
13455
- response = _context15.v;
13531
+ response = _context16.v;
13456
13532
  if (response.ok) {
13457
- _context15.n = 3;
13533
+ _context16.n = 3;
13458
13534
  break;
13459
13535
  }
13460
- _context15.n = 2;
13536
+ _context16.n = 2;
13461
13537
  return response.json();
13462
13538
  case 2:
13463
- errorBody = _context15.v;
13539
+ errorBody = _context16.v;
13464
13540
  throw new Error("Fetch failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13465
13541
  case 3:
13466
- _context15.n = 4;
13542
+ _context16.n = 4;
13467
13543
  return response.json();
13468
13544
  case 4:
13469
- _ref6 = _context15.v;
13545
+ _ref6 = _context16.v;
13470
13546
  lastUpdate = _ref6.lastUpdate;
13471
- return _context15.a(2, lastUpdate);
13547
+ return _context16.a(2, lastUpdate);
13472
13548
  case 5:
13473
- _context15.p = 5;
13474
- _t15 = _context15.v;
13549
+ _context16.p = 5;
13550
+ _t16 = _context16.v;
13475
13551
  throw new Error("Failed to fetch and parse cache timestamp");
13476
13552
  case 6:
13477
- return _context15.a(2);
13553
+ return _context16.a(2);
13478
13554
  }
13479
- }, _callee15, this, [[0, 5]]);
13555
+ }, _callee16, this, [[0, 5]]);
13480
13556
  }));
13481
- function fetchAndParseCacheTimestamp(_x35) {
13557
+ function fetchAndParseCacheTimestamp(_x36) {
13482
13558
  return _fetchAndParseCacheTimestamp.apply(this, arguments);
13483
13559
  }
13484
13560
  return fetchAndParseCacheTimestamp;
@@ -13492,41 +13568,41 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13492
13568
  }, {
13493
13569
  key: "fetchAndParseConfiguration",
13494
13570
  value: function () {
13495
- var _fetchAndParseConfiguration = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee16(placeId, product) {
13496
- var cachedConfig, response, errorBody, config, _t16;
13497
- return repository_regenerator().w(function (_context16) {
13498
- while (1) switch (_context16.p = _context16.n) {
13571
+ var _fetchAndParseConfiguration = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee17(placeId, product) {
13572
+ var cachedConfig, response, errorBody, config, _t17;
13573
+ return repository_regenerator().w(function (_context17) {
13574
+ while (1) switch (_context17.p = _context17.n) {
13499
13575
  case 0:
13500
- _context16.p = 0;
13576
+ _context17.p = 0;
13501
13577
  // Check cache first
13502
13578
  cachedConfig = this.cache.getConfiguration(placeId || "default", product || "default", this.currentLang);
13503
13579
  if (!(cachedConfig != null)) {
13504
- _context16.n = 1;
13580
+ _context17.n = 1;
13505
13581
  break;
13506
13582
  }
13507
13583
  this.logEvent("fetchAndParseConfiguration", {
13508
13584
  cached: "true"
13509
13585
  });
13510
- return _context16.a(2, cachedConfig.data);
13586
+ return _context17.a(2, cachedConfig.data);
13511
13587
  case 1:
13512
- _context16.n = 2;
13588
+ _context17.n = 2;
13513
13589
  return this.requester.fetchConfiguration(this.token, placeId, product);
13514
13590
  case 2:
13515
- response = _context16.v;
13591
+ response = _context17.v;
13516
13592
  if (response.ok) {
13517
- _context16.n = 4;
13593
+ _context17.n = 4;
13518
13594
  break;
13519
13595
  }
13520
- _context16.n = 3;
13596
+ _context17.n = 3;
13521
13597
  return response.json();
13522
13598
  case 3:
13523
- errorBody = _context16.v;
13599
+ errorBody = _context17.v;
13524
13600
  throw new Error("Fetch failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13525
13601
  case 4:
13526
- _context16.n = 5;
13602
+ _context17.n = 5;
13527
13603
  return response.json();
13528
13604
  case 5:
13529
- config = _context16.v;
13605
+ config = _context17.v;
13530
13606
  // Cache the result
13531
13607
  this.cache.setConfiguration(placeId || "default", product || "default", this.currentLang, {
13532
13608
  timestamp: Date.now(),
@@ -13535,20 +13611,20 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13535
13611
  this.logEvent("fetchAndParseConfiguration", {
13536
13612
  cached: "false"
13537
13613
  });
13538
- return _context16.a(2, config);
13614
+ return _context17.a(2, config);
13539
13615
  case 6:
13540
- _context16.p = 6;
13541
- _t16 = _context16.v;
13542
- this.logError(_t16, {
13616
+ _context17.p = 6;
13617
+ _t17 = _context17.v;
13618
+ this.logError(_t17, {
13543
13619
  functionName: "fetchAndParseConfiguration"
13544
13620
  });
13545
13621
  throw new Error("Failed to fetch and parse configuration");
13546
13622
  case 7:
13547
- return _context16.a(2);
13623
+ return _context17.a(2);
13548
13624
  }
13549
- }, _callee16, this, [[0, 6]]);
13625
+ }, _callee17, this, [[0, 6]]);
13550
13626
  }));
13551
- function fetchAndParseConfiguration(_x36, _x37) {
13627
+ function fetchAndParseConfiguration(_x37, _x38) {
13552
13628
  return _fetchAndParseConfiguration.apply(this, arguments);
13553
13629
  }
13554
13630
  return fetchAndParseConfiguration;
@@ -13556,41 +13632,41 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13556
13632
  }, {
13557
13633
  key: "fetchAndParseCategories",
13558
13634
  value: function () {
13559
- var _fetchAndParseCategories = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee17(placeId) {
13560
- var cachedCategories, response, errorBody, categories, _t17;
13561
- return repository_regenerator().w(function (_context17) {
13562
- while (1) switch (_context17.p = _context17.n) {
13635
+ var _fetchAndParseCategories = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee18(placeId) {
13636
+ var cachedCategories, response, errorBody, categories, _t18;
13637
+ return repository_regenerator().w(function (_context18) {
13638
+ while (1) switch (_context18.p = _context18.n) {
13563
13639
  case 0:
13564
- _context17.p = 0;
13640
+ _context18.p = 0;
13565
13641
  // Check cache first
13566
13642
  cachedCategories = this.cache.getCategories(placeId || "default", this.currentLang);
13567
13643
  if (!(cachedCategories != null)) {
13568
- _context17.n = 1;
13644
+ _context18.n = 1;
13569
13645
  break;
13570
13646
  }
13571
13647
  this.logEvent("fetchAndParseCategories", {
13572
13648
  cached: "true"
13573
13649
  });
13574
- return _context17.a(2, cachedCategories.data);
13650
+ return _context18.a(2, cachedCategories.data);
13575
13651
  case 1:
13576
- _context17.n = 2;
13652
+ _context18.n = 2;
13577
13653
  return this.requester.fetchCategories(this.token, placeId);
13578
13654
  case 2:
13579
- response = _context17.v;
13655
+ response = _context18.v;
13580
13656
  if (response.ok) {
13581
- _context17.n = 4;
13657
+ _context18.n = 4;
13582
13658
  break;
13583
13659
  }
13584
- _context17.n = 3;
13660
+ _context18.n = 3;
13585
13661
  return response.json();
13586
13662
  case 3:
13587
- errorBody = _context17.v;
13663
+ errorBody = _context18.v;
13588
13664
  throw new Error("Fetch failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13589
13665
  case 4:
13590
- _context17.n = 5;
13666
+ _context18.n = 5;
13591
13667
  return response.json();
13592
13668
  case 5:
13593
- categories = _context17.v;
13669
+ categories = _context18.v;
13594
13670
  // Cache the result
13595
13671
  this.cache.setCategories(placeId || "default", this.currentLang, {
13596
13672
  timestamp: Date.now(),
@@ -13599,17 +13675,17 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13599
13675
  this.logEvent("fetchAndParseCategories", {
13600
13676
  cached: "false"
13601
13677
  });
13602
- return _context17.a(2, categories);
13678
+ return _context18.a(2, categories);
13603
13679
  case 6:
13604
- _context17.p = 6;
13605
- _t17 = _context17.v;
13680
+ _context18.p = 6;
13681
+ _t18 = _context18.v;
13606
13682
  throw new Error("Failed to fetch and parse categories");
13607
13683
  case 7:
13608
- return _context17.a(2);
13684
+ return _context18.a(2);
13609
13685
  }
13610
- }, _callee17, this, [[0, 6]]);
13686
+ }, _callee18, this, [[0, 6]]);
13611
13687
  }));
13612
- function fetchAndParseCategories(_x38) {
13688
+ function fetchAndParseCategories(_x39) {
13613
13689
  return _fetchAndParseCategories.apply(this, arguments);
13614
13690
  }
13615
13691
  return fetchAndParseCategories;
@@ -13617,41 +13693,41 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13617
13693
  }, {
13618
13694
  key: "fetchAndParseCssCustomization",
13619
13695
  value: function () {
13620
- var _fetchAndParseCssCustomization = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee18(type) {
13621
- var response, errorBody, cssCustomization, _t18;
13622
- return repository_regenerator().w(function (_context18) {
13623
- while (1) switch (_context18.p = _context18.n) {
13696
+ var _fetchAndParseCssCustomization = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee19(type) {
13697
+ var response, errorBody, cssCustomization, _t19;
13698
+ return repository_regenerator().w(function (_context19) {
13699
+ while (1) switch (_context19.p = _context19.n) {
13624
13700
  case 0:
13625
- _context18.p = 0;
13626
- _context18.n = 1;
13701
+ _context19.p = 0;
13702
+ _context19.n = 1;
13627
13703
  return this.requester.fetchCssCustomization(this.token, type);
13628
13704
  case 1:
13629
- response = _context18.v;
13705
+ response = _context19.v;
13630
13706
  if (response.ok) {
13631
- _context18.n = 3;
13707
+ _context19.n = 3;
13632
13708
  break;
13633
13709
  }
13634
- _context18.n = 2;
13710
+ _context19.n = 2;
13635
13711
  return response.json();
13636
13712
  case 2:
13637
- errorBody = _context18.v;
13713
+ errorBody = _context19.v;
13638
13714
  throw new Error("Fetch failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13639
13715
  case 3:
13640
- _context18.n = 4;
13716
+ _context19.n = 4;
13641
13717
  return response.json();
13642
13718
  case 4:
13643
- cssCustomization = _context18.v;
13644
- return _context18.a(2, cssCustomization);
13719
+ cssCustomization = _context19.v;
13720
+ return _context19.a(2, cssCustomization);
13645
13721
  case 5:
13646
- _context18.p = 5;
13647
- _t18 = _context18.v;
13722
+ _context19.p = 5;
13723
+ _t19 = _context19.v;
13648
13724
  throw new Error("Failed to fetch and parse css customization");
13649
13725
  case 6:
13650
- return _context18.a(2);
13726
+ return _context19.a(2);
13651
13727
  }
13652
- }, _callee18, this, [[0, 5]]);
13728
+ }, _callee19, this, [[0, 5]]);
13653
13729
  }));
13654
- function fetchAndParseCssCustomization(_x39) {
13730
+ function fetchAndParseCssCustomization(_x40) {
13655
13731
  return _fetchAndParseCssCustomization.apply(this, arguments);
13656
13732
  }
13657
13733
  return fetchAndParseCssCustomization;
@@ -13659,34 +13735,34 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
13659
13735
  }, {
13660
13736
  key: "postAndParseHealthPing",
13661
13737
  value: function () {
13662
- var _postAndParseHealthPing = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee19(healthPingId, placeId, totemId, status) {
13738
+ var _postAndParseHealthPing = repository_asyncToGenerator(/*#__PURE__*/repository_regenerator().m(function _callee20(healthPingId, placeId, totemId, status) {
13663
13739
  var response, errorBody, data;
13664
- return repository_regenerator().w(function (_context19) {
13665
- while (1) switch (_context19.n) {
13740
+ return repository_regenerator().w(function (_context20) {
13741
+ while (1) switch (_context20.n) {
13666
13742
  case 0:
13667
- _context19.n = 1;
13743
+ _context20.n = 1;
13668
13744
  return this.requester.postHealth(this.token, healthPingId, placeId, totemId, status);
13669
13745
  case 1:
13670
- response = _context19.v;
13746
+ response = _context20.v;
13671
13747
  if (response.ok) {
13672
- _context19.n = 3;
13748
+ _context20.n = 3;
13673
13749
  break;
13674
13750
  }
13675
- _context19.n = 2;
13751
+ _context20.n = 2;
13676
13752
  return response.json();
13677
13753
  case 2:
13678
- errorBody = _context19.v;
13754
+ errorBody = _context20.v;
13679
13755
  throw new Error("Post failed with status ".concat(response.status, ": ").concat(extractErrorMessage(errorBody)));
13680
13756
  case 3:
13681
- _context19.n = 4;
13757
+ _context20.n = 4;
13682
13758
  return response.json();
13683
13759
  case 4:
13684
- data = _context19.v;
13685
- return _context19.a(2, data);
13760
+ data = _context20.v;
13761
+ return _context20.a(2, data);
13686
13762
  }
13687
- }, _callee19, this);
13763
+ }, _callee20, this);
13688
13764
  }));
13689
- function postAndParseHealthPing(_x40, _x41, _x42, _x43) {
13765
+ function postAndParseHealthPing(_x41, _x42, _x43, _x44) {
13690
13766
  return _postAndParseHealthPing.apply(this, arguments);
13691
13767
  }
13692
13768
  return postAndParseHealthPing;
@@ -14223,6 +14299,18 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
14223
14299
  var _this;
14224
14300
  map_classCallCheck(this, InternalMapVXMap);
14225
14301
  _this = map_callSuper(this, InternalMapVXMap);
14302
+ /**
14303
+ * Id of the live route currently drawn by {@link addLiveRoute}. A live route is
14304
+ * refreshed repeatedly as the user moves, so each refresh replaces this one
14305
+ * instead of stacking another set of layers on the map.
14306
+ */
14307
+ /**
14308
+ * Monotonic counter for {@link addLiveRoute} calls. Refreshes overlap (each one
14309
+ * awaits a fetch), so only the call holding the latest ticket may touch the
14310
+ * map — an older response resolving last is discarded instead of clobbering
14311
+ * the newer route.
14312
+ */
14313
+ map_defineProperty(_this, "liveRouteTicket", 0);
14226
14314
  map_defineProperty(_this, "potentialParentPlaces", []);
14227
14315
  map_defineProperty(_this, "innerFloors", []);
14228
14316
  map_defineProperty(_this, "subPlaces", []);
@@ -15189,6 +15277,18 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15189
15277
  value: function getContainer() {
15190
15278
  return this.map.getContainer();
15191
15279
  }
15280
+ }, {
15281
+ key: "resize",
15282
+ value: function resize() {
15283
+ try {
15284
+ if (this.map) {
15285
+ this.map.resize();
15286
+ this.logEvent("resize");
15287
+ }
15288
+ } catch (error) {
15289
+ // Resize may fail if the map/container is not ready
15290
+ }
15291
+ }
15192
15292
  }, {
15193
15293
  key: "updateMarkersTo",
15194
15294
  value: function updateMarkersTo(floorId) {
@@ -15572,18 +15672,83 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15572
15672
  this.routeController.addRoute(_route, drawRouteConfig);
15573
15673
  return _context.a(2, _route);
15574
15674
  case 3:
15575
- _context.p = 3;
15576
- _t = _context.v;
15577
- throw new Error("Error: Failed to add route");
15675
+ _context.p = 3;
15676
+ _t = _context.v;
15677
+ throw new Error("Error: Failed to add route");
15678
+ case 4:
15679
+ return _context.a(2);
15680
+ }
15681
+ }, _callee, this, [[1, 3]]);
15682
+ }));
15683
+ function addRoute(_x) {
15684
+ return _addRoute.apply(this, arguments);
15685
+ }
15686
+ return addRoute;
15687
+ }()
15688
+ }, {
15689
+ key: "addLiveRoute",
15690
+ value: function () {
15691
+ var _addLiveRoute = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee2(config) {
15692
+ var drawConfig,
15693
+ fetchRouteConfig,
15694
+ drawRouteConfig,
15695
+ ticket,
15696
+ _route2,
15697
+ cause,
15698
+ _args2 = arguments,
15699
+ _t2;
15700
+ return map_regenerator().w(function (_context2) {
15701
+ while (1) switch (_context2.p = _context2.n) {
15702
+ case 0:
15703
+ drawConfig = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
15704
+ _context2.p = 1;
15705
+ this.logEvent("addLiveRoute");
15706
+ fetchRouteConfig = new InternalGetRouteConfiguration(config);
15707
+ drawRouteConfig = new InternalDrawRouteConfiguration(drawConfig); // Take a ticket BEFORE awaiting: refreshes overlap, and an older response
15708
+ // resolving after a newer one must not clobber it (stale route drawn,
15709
+ // liveRouteId pointing at the wrong instance).
15710
+ ticket = ++this.liveRouteTicket;
15711
+ _context2.n = 2;
15712
+ return this.repository.fetchAndParseLiveRoute(fetchRouteConfig);
15713
+ case 2:
15714
+ _route2 = _context2.v;
15715
+ if (!(ticket !== this.liveRouteTicket)) {
15716
+ _context2.n = 3;
15717
+ break;
15718
+ }
15719
+ return _context2.a(2, _route2);
15720
+ case 3:
15721
+ // Replace the previous live route so repeated refreshes don't stack paths
15722
+ // on the map. Removal happens AFTER the fetch, so a failed refresh leaves
15723
+ // the current route on screen. Targeted by id, so routes drawn with
15724
+ // addRoute are untouched.
15725
+ if (this.liveRouteId !== undefined && this.liveRouteId !== _route2.id) {
15726
+ this.routeController.removeRoute(this.liveRouteId);
15727
+ }
15728
+ // Clear any instance already using this id (a same-id refresh, or the same
15729
+ // route previously drawn via addRoute) — the controller derives its
15730
+ // source/layer ids from the route id, so re-adding without removing would
15731
+ // throw "Source already exists".
15732
+ if (this.routeController.getRouteIds().includes(_route2.id)) {
15733
+ this.routeController.removeRoute(_route2.id);
15734
+ }
15735
+ this.routeController.addRoute(_route2, drawRouteConfig);
15736
+ this.liveRouteId = _route2.id;
15737
+ return _context2.a(2, _route2);
15578
15738
  case 4:
15579
- return _context.a(2);
15739
+ _context2.p = 4;
15740
+ _t2 = _context2.v;
15741
+ cause = _t2 instanceof Error ? _t2.message : String(_t2);
15742
+ throw new Error("Error: Failed to add route: ".concat(cause));
15743
+ case 5:
15744
+ return _context2.a(2);
15580
15745
  }
15581
- }, _callee, this, [[1, 3]]);
15746
+ }, _callee2, this, [[1, 4]]);
15582
15747
  }));
15583
- function addRoute(_x) {
15584
- return _addRoute.apply(this, arguments);
15748
+ function addLiveRoute(_x2) {
15749
+ return _addLiveRoute.apply(this, arguments);
15585
15750
  }
15586
- return addRoute;
15751
+ return addLiveRoute;
15587
15752
  }()
15588
15753
  }, {
15589
15754
  key: "updateRouteProgress",
@@ -15610,6 +15775,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15610
15775
  } catch (error) {
15611
15776
  // Remove route may fail if no route exists
15612
15777
  }
15778
+ this.syncLiveRouteId();
15613
15779
  }
15614
15780
  }, {
15615
15781
  key: "removeRouteById",
@@ -15620,6 +15786,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15620
15786
  } catch (error) {
15621
15787
  // Remove route may fail if route doesn't exist
15622
15788
  }
15789
+ this.syncLiveRouteId();
15623
15790
  }
15624
15791
  }, {
15625
15792
  key: "removeAllRoutes",
@@ -15630,6 +15797,22 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15630
15797
  } catch (error) {
15631
15798
  // Remove all routes may fail
15632
15799
  }
15800
+ this.syncLiveRouteId();
15801
+ }
15802
+
15803
+ /**
15804
+ * Drop {@link liveRouteId} when the instance it points at is no longer on the
15805
+ * map (removed via removeRoute/removeRouteById/removeAllRoutes — including the
15806
+ * no-arg removeRoute, which removes the last-added route). Keeps the live
15807
+ * bookkeeping in sync so a later {@link addLiveRoute} doesn't act on a
15808
+ * dangling id.
15809
+ */
15810
+ }, {
15811
+ key: "syncLiveRouteId",
15812
+ value: function syncLiveRouteId() {
15813
+ if (this.liveRouteId !== undefined && !this.routeController.getRouteIds().includes(this.liveRouteId)) {
15814
+ this.liveRouteId = undefined;
15815
+ }
15633
15816
  }
15634
15817
  }, {
15635
15818
  key: "getActiveRouteIds",
@@ -15670,10 +15853,10 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15670
15853
  value: function defaultClickListener() {
15671
15854
  var _this12 = this;
15672
15855
  this.map.on("click", /*#__PURE__*/function () {
15673
- var _ref4 = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee2(e) {
15674
- var features, roomFeatures, touchedFeature, ref, _clickedPlace, _ref5, _clickedPlace$mapvxId, _clickedPlace2, _clickedPlace3, clickedPlace, _iterator3, _step3, potentialParentPlace, cachedSubPlaces, cachedPlaces, clickedPlaceId, _t2;
15675
- return map_regenerator().w(function (_context2) {
15676
- while (1) switch (_context2.p = _context2.n) {
15856
+ var _ref4 = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee3(e) {
15857
+ var features, roomFeatures, touchedFeature, ref, _clickedPlace, _ref5, _clickedPlace$mapvxId, _clickedPlace2, _clickedPlace3, clickedPlace, _iterator3, _step3, potentialParentPlace, cachedSubPlaces, cachedPlaces, clickedPlaceId, _t3;
15858
+ return map_regenerator().w(function (_context3) {
15859
+ while (1) switch (_context3.p = _context3.n) {
15677
15860
  case 0:
15678
15861
  features = _this12.map.queryRenderedFeatures(e.point); // Filter room features by current floor
15679
15862
  roomFeatures = features.filter(function (feature) {
@@ -15683,7 +15866,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15683
15866
  touchedFeature = roomFeatures[0];
15684
15867
  ref = touchedFeature === null || touchedFeature === void 0 ? void 0 : touchedFeature.properties.ref;
15685
15868
  if (!(ref != null && typeof ref === "string" && ref.length > 0)) {
15686
- _context2.n = 11;
15869
+ _context3.n = 11;
15687
15870
  break;
15688
15871
  }
15689
15872
  console.log("touchedFeature", ref);
@@ -15693,63 +15876,63 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15693
15876
  return subPlace.mapvxId === ref;
15694
15877
  }); // If not found, search in subplaces of potential parent places
15695
15878
  if (!(clickedPlace === undefined)) {
15696
- _context2.n = 7;
15879
+ _context3.n = 7;
15697
15880
  break;
15698
15881
  }
15699
15882
  _iterator3 = map_createForOfIteratorHelper(_this12.potentialParentPlaces);
15700
- _context2.p = 1;
15883
+ _context3.p = 1;
15701
15884
  _iterator3.s();
15702
15885
  case 2:
15703
15886
  if ((_step3 = _iterator3.n()).done) {
15704
- _context2.n = 4;
15887
+ _context3.n = 4;
15705
15888
  break;
15706
15889
  }
15707
15890
  potentialParentPlace = _step3.value;
15708
15891
  cachedSubPlaces = _this12.repository.getCachedSubPlaces(potentialParentPlace.mapvxId);
15709
15892
  if (!cachedSubPlaces) {
15710
- _context2.n = 3;
15893
+ _context3.n = 3;
15711
15894
  break;
15712
15895
  }
15713
15896
  clickedPlace = cachedSubPlaces.find(function (subPlace) {
15714
15897
  return subPlace.mapvxId === ref;
15715
15898
  });
15716
15899
  if (!(clickedPlace !== undefined)) {
15717
- _context2.n = 3;
15900
+ _context3.n = 3;
15718
15901
  break;
15719
15902
  }
15720
- return _context2.a(3, 4);
15903
+ return _context3.a(3, 4);
15721
15904
  case 3:
15722
- _context2.n = 2;
15905
+ _context3.n = 2;
15723
15906
  break;
15724
15907
  case 4:
15725
- _context2.n = 6;
15908
+ _context3.n = 6;
15726
15909
  break;
15727
15910
  case 5:
15728
- _context2.p = 5;
15729
- _t2 = _context2.v;
15730
- _iterator3.e(_t2);
15911
+ _context3.p = 5;
15912
+ _t3 = _context3.v;
15913
+ _iterator3.e(_t3);
15731
15914
  case 6:
15732
- _context2.p = 6;
15915
+ _context3.p = 6;
15733
15916
  _iterator3.f();
15734
- return _context2.f(6);
15917
+ return _context3.f(6);
15735
15918
  case 7:
15736
15919
  if (!(clickedPlace === undefined)) {
15737
- _context2.n = 10;
15920
+ _context3.n = 10;
15738
15921
  break;
15739
15922
  }
15740
15923
  cachedPlaces = _this12.repository.getCachedPlaces([ref]);
15741
15924
  if (!(cachedPlaces.length === 0)) {
15742
- _context2.n = 9;
15925
+ _context3.n = 9;
15743
15926
  break;
15744
15927
  }
15745
15928
  console.log("fetching place detail from server", ref);
15746
- _context2.n = 8;
15929
+ _context3.n = 8;
15747
15930
  return _this12.repository.fetchAndParsePlaceDetail({
15748
15931
  id: ref
15749
15932
  });
15750
15933
  case 8:
15751
- clickedPlace = _context2.v;
15752
- _context2.n = 10;
15934
+ clickedPlace = _context3.v;
15935
+ _context3.n = 10;
15753
15936
  break;
15754
15937
  case 9:
15755
15938
  console.log("using cached place detail", ref);
@@ -15761,11 +15944,11 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15761
15944
  _this12.clickCallback(clickedPlaceId);
15762
15945
  }
15763
15946
  case 11:
15764
- return _context2.a(2);
15947
+ return _context3.a(2);
15765
15948
  }
15766
- }, _callee2, null, [[1, 5, 6, 7]]);
15949
+ }, _callee3, null, [[1, 5, 6, 7]]);
15767
15950
  }));
15768
- return function (_x2) {
15951
+ return function (_x3) {
15769
15952
  return _ref4.apply(this, arguments);
15770
15953
  };
15771
15954
  }());
@@ -15904,49 +16087,49 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15904
16087
  }, {
15905
16088
  key: "startAnimateRoute",
15906
16089
  value: function () {
15907
- var _startAnimateRoute = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee3(routeConfig) {
16090
+ var _startAnimateRoute = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee4(routeConfig) {
15908
16091
  var drawConfig,
15909
16092
  animationConfig,
15910
- _route2,
16093
+ _route3,
15911
16094
  fetchRouteConfig,
15912
16095
  drawRouteConfig,
15913
16096
  animationRouteConfig,
15914
- _args3 = arguments,
15915
- _t3;
15916
- return map_regenerator().w(function (_context3) {
15917
- while (1) switch (_context3.p = _context3.n) {
16097
+ _args4 = arguments,
16098
+ _t4;
16099
+ return map_regenerator().w(function (_context4) {
16100
+ while (1) switch (_context4.p = _context4.n) {
15918
16101
  case 0:
15919
- drawConfig = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
15920
- animationConfig = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
15921
- _context3.p = 1;
16102
+ drawConfig = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
16103
+ animationConfig = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
16104
+ _context4.p = 1;
15922
16105
  if (!(routeConfig instanceof MVXRoute)) {
15923
- _context3.n = 2;
16106
+ _context4.n = 2;
15924
16107
  break;
15925
16108
  }
15926
- _route2 = routeConfig;
15927
- _context3.n = 4;
16109
+ _route3 = routeConfig;
16110
+ _context4.n = 4;
15928
16111
  break;
15929
16112
  case 2:
15930
16113
  fetchRouteConfig = new InternalGetRouteConfiguration(routeConfig);
15931
- _context3.n = 3;
16114
+ _context4.n = 3;
15932
16115
  return this.repository.fetchAndParseRoute(fetchRouteConfig);
15933
16116
  case 3:
15934
- _route2 = _context3.v;
16117
+ _route3 = _context4.v;
15935
16118
  case 4:
15936
16119
  drawRouteConfig = new InternalAnimationDrawingConfig(drawConfig);
15937
16120
  animationRouteConfig = new InternalAnimationConfig(animationConfig);
15938
- this.routeController.startAnimating(_route2, drawRouteConfig, animationRouteConfig);
15939
- return _context3.a(2, _route2);
16121
+ this.routeController.startAnimating(_route3, drawRouteConfig, animationRouteConfig);
16122
+ return _context4.a(2, _route3);
15940
16123
  case 5:
15941
- _context3.p = 5;
15942
- _t3 = _context3.v;
16124
+ _context4.p = 5;
16125
+ _t4 = _context4.v;
15943
16126
  throw new Error("Error: Failed to start animating route");
15944
16127
  case 6:
15945
- return _context3.a(2);
16128
+ return _context4.a(2);
15946
16129
  }
15947
- }, _callee3, this, [[1, 5]]);
16130
+ }, _callee4, this, [[1, 5]]);
15948
16131
  }));
15949
- function startAnimateRoute(_x3) {
16132
+ function startAnimateRoute(_x4) {
15950
16133
  return _startAnimateRoute.apply(this, arguments);
15951
16134
  }
15952
16135
  return startAnimateRoute;
@@ -15954,49 +16137,49 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
15954
16137
  }, {
15955
16138
  key: "startAnimateRouteV2",
15956
16139
  value: function () {
15957
- var _startAnimateRouteV = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee4(routeConfig) {
16140
+ var _startAnimateRouteV = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee5(routeConfig) {
15958
16141
  var drawConfig,
15959
16142
  animationConfig,
15960
- _route3,
16143
+ _route4,
15961
16144
  fetchRouteConfig,
15962
16145
  drawRouteConfig,
15963
16146
  animationRouteConfig,
15964
- _args4 = arguments,
15965
- _t4;
15966
- return map_regenerator().w(function (_context4) {
15967
- while (1) switch (_context4.p = _context4.n) {
16147
+ _args5 = arguments,
16148
+ _t5;
16149
+ return map_regenerator().w(function (_context5) {
16150
+ while (1) switch (_context5.p = _context5.n) {
15968
16151
  case 0:
15969
- drawConfig = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
15970
- animationConfig = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
15971
- _context4.p = 1;
16152
+ drawConfig = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
16153
+ animationConfig = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
16154
+ _context5.p = 1;
15972
16155
  if (!(routeConfig instanceof MVXRoute)) {
15973
- _context4.n = 2;
16156
+ _context5.n = 2;
15974
16157
  break;
15975
16158
  }
15976
- _route3 = routeConfig;
15977
- _context4.n = 4;
16159
+ _route4 = routeConfig;
16160
+ _context5.n = 4;
15978
16161
  break;
15979
16162
  case 2:
15980
16163
  fetchRouteConfig = new InternalGetRouteConfiguration(routeConfig);
15981
- _context4.n = 3;
16164
+ _context5.n = 3;
15982
16165
  return this.repository.fetchAndParseRouteV2(fetchRouteConfig);
15983
16166
  case 3:
15984
- _route3 = _context4.v;
16167
+ _route4 = _context5.v;
15985
16168
  case 4:
15986
16169
  drawRouteConfig = new InternalAnimationDrawingConfig(drawConfig);
15987
16170
  animationRouteConfig = new InternalAnimationConfig(animationConfig);
15988
- this.routeController.startAnimating(_route3, drawRouteConfig, animationRouteConfig);
15989
- return _context4.a(2, _route3);
16171
+ this.routeController.startAnimating(_route4, drawRouteConfig, animationRouteConfig);
16172
+ return _context5.a(2, _route4);
15990
16173
  case 5:
15991
- _context4.p = 5;
15992
- _t4 = _context4.v;
16174
+ _context5.p = 5;
16175
+ _t5 = _context5.v;
15993
16176
  throw new Error("Error: Failed to start animating route");
15994
16177
  case 6:
15995
- return _context4.a(2);
16178
+ return _context5.a(2);
15996
16179
  }
15997
- }, _callee4, this, [[1, 5]]);
16180
+ }, _callee5, this, [[1, 5]]);
15998
16181
  }));
15999
- function startAnimateRouteV2(_x4) {
16182
+ function startAnimateRouteV2(_x5) {
16000
16183
  return _startAnimateRouteV.apply(this, arguments);
16001
16184
  }
16002
16185
  return startAnimateRouteV2;
@@ -16041,50 +16224,50 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
16041
16224
  }, {
16042
16225
  key: "addStepAnimation",
16043
16226
  value: function () {
16044
- var _addStepAnimation = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee5(routeConfig) {
16227
+ var _addStepAnimation = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee6(routeConfig) {
16045
16228
  var drawConfig,
16046
16229
  animationConfig,
16047
- _route4,
16230
+ _route5,
16048
16231
  fetchRouteConfig,
16049
16232
  drawRouteConfig,
16050
16233
  animationRouteConfig,
16051
- _args5 = arguments,
16052
- _t5;
16053
- return map_regenerator().w(function (_context5) {
16054
- while (1) switch (_context5.p = _context5.n) {
16234
+ _args6 = arguments,
16235
+ _t6;
16236
+ return map_regenerator().w(function (_context6) {
16237
+ while (1) switch (_context6.p = _context6.n) {
16055
16238
  case 0:
16056
- drawConfig = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
16057
- animationConfig = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
16058
- _context5.p = 1;
16239
+ drawConfig = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
16240
+ animationConfig = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};
16241
+ _context6.p = 1;
16059
16242
  if (!(routeConfig instanceof MVXRoute)) {
16060
- _context5.n = 2;
16243
+ _context6.n = 2;
16061
16244
  break;
16062
16245
  }
16063
- _route4 = routeConfig;
16064
- _context5.n = 4;
16246
+ _route5 = routeConfig;
16247
+ _context6.n = 4;
16065
16248
  break;
16066
16249
  case 2:
16067
16250
  fetchRouteConfig = new InternalGetRouteConfiguration(routeConfig);
16068
- _context5.n = 3;
16251
+ _context6.n = 3;
16069
16252
  return this.repository.fetchAndParseRoute(fetchRouteConfig);
16070
16253
  case 3:
16071
- _route4 = _context5.v;
16254
+ _route5 = _context6.v;
16072
16255
  case 4:
16073
16256
  drawRouteConfig = new InternalAnimationDrawingConfig(drawConfig);
16074
16257
  animationRouteConfig = new InternalAnimationConfig(animationConfig);
16075
- this.routeController.addStepAnimation(_route4, drawRouteConfig, animationRouteConfig);
16258
+ this.routeController.addStepAnimation(_route5, drawRouteConfig, animationRouteConfig);
16076
16259
  this.logEvent("addStepAnimation");
16077
- return _context5.a(2, _route4);
16260
+ return _context6.a(2, _route5);
16078
16261
  case 5:
16079
- _context5.p = 5;
16080
- _t5 = _context5.v;
16262
+ _context6.p = 5;
16263
+ _t6 = _context6.v;
16081
16264
  throw new Error("Error: Failed to add step animation");
16082
16265
  case 6:
16083
- return _context5.a(2);
16266
+ return _context6.a(2);
16084
16267
  }
16085
- }, _callee5, this, [[1, 5]]);
16268
+ }, _callee6, this, [[1, 5]]);
16086
16269
  }));
16087
- function addStepAnimation(_x5) {
16270
+ function addStepAnimation(_x6) {
16088
16271
  return _addStepAnimation.apply(this, arguments);
16089
16272
  }
16090
16273
  return addStepAnimation;
@@ -16092,50 +16275,50 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
16092
16275
  }, {
16093
16276
  key: "addStepAnimationV2",
16094
16277
  value: function () {
16095
- var _addStepAnimationV = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee6(routeConfig) {
16278
+ var _addStepAnimationV = map_asyncToGenerator(/*#__PURE__*/map_regenerator().m(function _callee7(routeConfig) {
16096
16279
  var drawConfig,
16097
16280
  animationConfig,
16098
- _route5,
16281
+ _route6,
16099
16282
  fetchRouteConfig,
16100
16283
  drawRouteConfig,
16101
16284
  animationRouteConfig,
16102
- _args6 = arguments,
16103
- _t6;
16104
- return map_regenerator().w(function (_context6) {
16105
- while (1) switch (_context6.p = _context6.n) {
16285
+ _args7 = arguments,
16286
+ _t7;
16287
+ return map_regenerator().w(function (_context7) {
16288
+ while (1) switch (_context7.p = _context7.n) {
16106
16289
  case 0:
16107
- drawConfig = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
16108
- animationConfig = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};
16109
- _context6.p = 1;
16290
+ drawConfig = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
16291
+ animationConfig = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : {};
16292
+ _context7.p = 1;
16110
16293
  if (!(routeConfig instanceof MVXRoute)) {
16111
- _context6.n = 2;
16294
+ _context7.n = 2;
16112
16295
  break;
16113
16296
  }
16114
- _route5 = routeConfig;
16115
- _context6.n = 4;
16297
+ _route6 = routeConfig;
16298
+ _context7.n = 4;
16116
16299
  break;
16117
16300
  case 2:
16118
16301
  fetchRouteConfig = new InternalGetRouteConfiguration(routeConfig);
16119
- _context6.n = 3;
16302
+ _context7.n = 3;
16120
16303
  return this.repository.fetchAndParseRouteV2(fetchRouteConfig);
16121
16304
  case 3:
16122
- _route5 = _context6.v;
16305
+ _route6 = _context7.v;
16123
16306
  case 4:
16124
16307
  drawRouteConfig = new InternalAnimationDrawingConfig(drawConfig);
16125
16308
  animationRouteConfig = new InternalAnimationConfig(animationConfig);
16126
- this.routeController.addStepAnimation(_route5, drawRouteConfig, animationRouteConfig);
16309
+ this.routeController.addStepAnimation(_route6, drawRouteConfig, animationRouteConfig);
16127
16310
  this.logEvent("addStepAnimationV2");
16128
- return _context6.a(2, _route5);
16311
+ return _context7.a(2, _route6);
16129
16312
  case 5:
16130
- _context6.p = 5;
16131
- _t6 = _context6.v;
16313
+ _context7.p = 5;
16314
+ _t7 = _context7.v;
16132
16315
  throw new Error("Error: Failed to add step animation");
16133
16316
  case 6:
16134
- return _context6.a(2);
16317
+ return _context7.a(2);
16135
16318
  }
16136
- }, _callee6, this, [[1, 5]]);
16319
+ }, _callee7, this, [[1, 5]]);
16137
16320
  }));
16138
- function addStepAnimationV2(_x6) {
16321
+ function addStepAnimationV2(_x7) {
16139
16322
  return _addStepAnimationV.apply(this, arguments);
16140
16323
  }
16141
16324
  return addStepAnimationV2;
@@ -16985,32 +17168,62 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
16985
17168
  return getRouteV2;
16986
17169
  }()
16987
17170
  }, {
16988
- key: "getPlacesByInput",
17171
+ key: "getLiveRoute",
16989
17172
  value: function () {
16990
- var _getPlacesByInput = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee11(input, institutionId, parentPlaceId, otherParentPlacesIds, origin, lat, lng, floor) {
16991
- var parentPlaces, places, _t11;
17173
+ var _getLiveRoute = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee11(routeConfig) {
17174
+ var config, route, _t11;
16992
17175
  return sdk_regenerator().w(function (_context11) {
16993
17176
  while (1) switch (_context11.p = _context11.n) {
16994
17177
  case 0:
16995
17178
  _context11.p = 0;
16996
- // TODO: se debe cambiar a usar un solo parámetro en la siguiente version major.
16997
- parentPlaces = parentPlaceId ? otherParentPlacesIds ? [parentPlaceId].concat(sdk_toConsumableArray(otherParentPlacesIds)) : [parentPlaceId] : otherParentPlacesIds;
17179
+ config = new InternalGetRouteConfiguration(routeConfig);
16998
17180
  _context11.n = 1;
16999
- return this.repository.fetchAndParseSearchResults(institutionId, input, parentPlaces, origin, lat, lng, floor);
17181
+ return this.repository.fetchAndParseLiveRoute(config);
17000
17182
  case 1:
17001
- places = _context11.v;
17002
- this.logEvent("getPlacesByInput");
17003
- return _context11.a(2, places);
17183
+ route = _context11.v;
17184
+ this.logEvent("getLiveRoute");
17185
+ return _context11.a(2, route);
17004
17186
  case 2:
17005
17187
  _context11.p = 2;
17006
17188
  _t11 = _context11.v;
17007
- throw new Error("Failed to get places by input");
17189
+ throw new Error("Failed to get route");
17008
17190
  case 3:
17009
17191
  return _context11.a(2);
17010
17192
  }
17011
17193
  }, _callee11, this, [[0, 2]]);
17012
17194
  }));
17013
- function getPlacesByInput(_x13, _x14, _x15, _x16, _x17, _x18, _x19, _x20) {
17195
+ function getLiveRoute(_x13) {
17196
+ return _getLiveRoute.apply(this, arguments);
17197
+ }
17198
+ return getLiveRoute;
17199
+ }()
17200
+ }, {
17201
+ key: "getPlacesByInput",
17202
+ value: function () {
17203
+ var _getPlacesByInput = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee12(input, institutionId, parentPlaceId, otherParentPlacesIds, origin, lat, lng, floor) {
17204
+ var parentPlaces, places, _t12;
17205
+ return sdk_regenerator().w(function (_context12) {
17206
+ while (1) switch (_context12.p = _context12.n) {
17207
+ case 0:
17208
+ _context12.p = 0;
17209
+ // TODO: se debe cambiar a usar un solo parámetro en la siguiente version major.
17210
+ parentPlaces = parentPlaceId ? otherParentPlacesIds ? [parentPlaceId].concat(sdk_toConsumableArray(otherParentPlacesIds)) : [parentPlaceId] : otherParentPlacesIds;
17211
+ _context12.n = 1;
17212
+ return this.repository.fetchAndParseSearchResults(institutionId, input, parentPlaces, origin, lat, lng, floor);
17213
+ case 1:
17214
+ places = _context12.v;
17215
+ this.logEvent("getPlacesByInput");
17216
+ return _context12.a(2, places);
17217
+ case 2:
17218
+ _context12.p = 2;
17219
+ _t12 = _context12.v;
17220
+ throw new Error("Failed to get places by input");
17221
+ case 3:
17222
+ return _context12.a(2);
17223
+ }
17224
+ }, _callee12, this, [[0, 2]]);
17225
+ }));
17226
+ function getPlacesByInput(_x14, _x15, _x16, _x17, _x18, _x19, _x20, _x21) {
17014
17227
  return _getPlacesByInput.apply(this, arguments);
17015
17228
  }
17016
17229
  return getPlacesByInput;
@@ -17018,7 +17231,7 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
17018
17231
  }, {
17019
17232
  key: "searchPlacesByTags",
17020
17233
  value: function () {
17021
- var _searchPlacesByTags = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee12(institutionId, tags) {
17234
+ var _searchPlacesByTags = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee13(institutionId, tags) {
17022
17235
  var options,
17023
17236
  parentPlaces,
17024
17237
  sort,
@@ -17028,47 +17241,47 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
17028
17241
  floor,
17029
17242
  hasCoordinateContext,
17030
17243
  places,
17031
- _args12 = arguments,
17032
- _t12;
17033
- return sdk_regenerator().w(function (_context12) {
17034
- while (1) switch (_context12.p = _context12.n) {
17244
+ _args13 = arguments,
17245
+ _t13;
17246
+ return sdk_regenerator().w(function (_context13) {
17247
+ while (1) switch (_context13.p = _context13.n) {
17035
17248
  case 0:
17036
- options = _args12.length > 2 && _args12[2] !== undefined ? _args12[2] : {};
17249
+ options = _args13.length > 2 && _args13[2] !== undefined ? _args13[2] : {};
17037
17250
  if (!(!tags || tags.length === 0)) {
17038
- _context12.n = 1;
17251
+ _context13.n = 1;
17039
17252
  break;
17040
17253
  }
17041
17254
  throw new Error("searchPlacesByTags requires at least one tag");
17042
17255
  case 1:
17043
17256
  parentPlaces = options.parentPlaces, sort = options.sort, origin = options.origin, lat = options.lat, lng = options.lng, floor = options.floor;
17044
17257
  if (!(sort === "distance")) {
17045
- _context12.n = 2;
17258
+ _context13.n = 2;
17046
17259
  break;
17047
17260
  }
17048
17261
  hasCoordinateContext = lat != null && lng != null && floor != null && parentPlaces != null && parentPlaces.length > 0;
17049
17262
  if (!(!origin && !hasCoordinateContext)) {
17050
- _context12.n = 2;
17263
+ _context13.n = 2;
17051
17264
  break;
17052
17265
  }
17053
17266
  throw new Error('searchPlacesByTags with sort "distance" requires "origin" or "lat" + "lng" + "floor" + "parentPlaces"');
17054
17267
  case 2:
17055
- _context12.p = 2;
17056
- _context12.n = 3;
17268
+ _context13.p = 2;
17269
+ _context13.n = 3;
17057
17270
  return this.repository.fetchAndParseSearchPlacesByTags(institutionId, tags, parentPlaces, sort, origin, lat, lng, floor);
17058
17271
  case 3:
17059
- places = _context12.v;
17272
+ places = _context13.v;
17060
17273
  this.logEvent("searchPlacesByTags");
17061
- return _context12.a(2, places);
17274
+ return _context13.a(2, places);
17062
17275
  case 4:
17063
- _context12.p = 4;
17064
- _t12 = _context12.v;
17276
+ _context13.p = 4;
17277
+ _t13 = _context13.v;
17065
17278
  throw new Error("Failed to search places by tags");
17066
17279
  case 5:
17067
- return _context12.a(2);
17280
+ return _context13.a(2);
17068
17281
  }
17069
- }, _callee12, this, [[2, 4]]);
17282
+ }, _callee13, this, [[2, 4]]);
17070
17283
  }));
17071
- function searchPlacesByTags(_x21, _x22) {
17284
+ function searchPlacesByTags(_x22, _x23) {
17072
17285
  return _searchPlacesByTags.apply(this, arguments);
17073
17286
  }
17074
17287
  return searchPlacesByTags;
@@ -17076,26 +17289,26 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
17076
17289
  }, {
17077
17290
  key: "getPlacesByCategory",
17078
17291
  value: function () {
17079
- var _getPlacesByCategory = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee13(category) {
17080
- var _t13;
17081
- return sdk_regenerator().w(function (_context13) {
17082
- while (1) switch (_context13.p = _context13.n) {
17292
+ var _getPlacesByCategory = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee14(category) {
17293
+ var _t14;
17294
+ return sdk_regenerator().w(function (_context14) {
17295
+ while (1) switch (_context14.p = _context14.n) {
17083
17296
  case 0:
17084
- _context13.p = 0;
17297
+ _context14.p = 0;
17085
17298
  // TODO: Implement proper category-based search when API endpoint is available
17086
17299
  // For now, return an empty array as a placeholder implementation
17087
17300
  this.logEvent("getPlacesByCategory");
17088
- return _context13.a(2, []);
17301
+ return _context14.a(2, []);
17089
17302
  case 1:
17090
- _context13.p = 1;
17091
- _t13 = _context13.v;
17303
+ _context14.p = 1;
17304
+ _t14 = _context14.v;
17092
17305
  throw new Error("Failed to get places by category");
17093
17306
  case 2:
17094
- return _context13.a(2);
17307
+ return _context14.a(2);
17095
17308
  }
17096
- }, _callee13, this, [[0, 1]]);
17309
+ }, _callee14, this, [[0, 1]]);
17097
17310
  }));
17098
- function getPlacesByCategory(_x23) {
17311
+ function getPlacesByCategory(_x24) {
17099
17312
  return _getPlacesByCategory.apply(this, arguments);
17100
17313
  }
17101
17314
  return getPlacesByCategory;
@@ -17190,18 +17403,18 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
17190
17403
  }, {
17191
17404
  key: "loadRoutesForOriginCache",
17192
17405
  value: function () {
17193
- var _loadRoutesForOriginCache = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee14(parentPlaceId, fromPlaceId, announceFormat, unitSystem, mode) {
17194
- return sdk_regenerator().w(function (_context14) {
17195
- while (1) switch (_context14.n) {
17406
+ var _loadRoutesForOriginCache = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee15(parentPlaceId, fromPlaceId, announceFormat, unitSystem, mode) {
17407
+ return sdk_regenerator().w(function (_context15) {
17408
+ while (1) switch (_context15.n) {
17196
17409
  case 0:
17197
- _context14.n = 1;
17410
+ _context15.n = 1;
17198
17411
  return this.repository.fetchAndParseRoutesFromOrigin(parentPlaceId, fromPlaceId, announceFormat, unitSystem, mode);
17199
17412
  case 1:
17200
- return _context14.a(2);
17413
+ return _context15.a(2);
17201
17414
  }
17202
- }, _callee14, this);
17415
+ }, _callee15, this);
17203
17416
  }));
17204
- function loadRoutesForOriginCache(_x24, _x25, _x26, _x27, _x28) {
17417
+ function loadRoutesForOriginCache(_x25, _x26, _x27, _x28, _x29) {
17205
17418
  return _loadRoutesForOriginCache.apply(this, arguments);
17206
17419
  }
17207
17420
  return loadRoutesForOriginCache;
@@ -17209,28 +17422,28 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
17209
17422
  }, {
17210
17423
  key: "getCacheTimestamp",
17211
17424
  value: function () {
17212
- var _getCacheTimestamp = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee15(parentPlaceId) {
17213
- var cacheTimestamp, _t14;
17214
- return sdk_regenerator().w(function (_context15) {
17215
- while (1) switch (_context15.p = _context15.n) {
17425
+ var _getCacheTimestamp = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee16(parentPlaceId) {
17426
+ var cacheTimestamp, _t15;
17427
+ return sdk_regenerator().w(function (_context16) {
17428
+ while (1) switch (_context16.p = _context16.n) {
17216
17429
  case 0:
17217
- _context15.p = 0;
17218
- _context15.n = 1;
17430
+ _context16.p = 0;
17431
+ _context16.n = 1;
17219
17432
  return this.repository.fetchAndParseCacheTimestamp(parentPlaceId);
17220
17433
  case 1:
17221
- cacheTimestamp = _context15.v;
17434
+ cacheTimestamp = _context16.v;
17222
17435
  this.logEvent("getCacheTimestamp");
17223
- return _context15.a(2, cacheTimestamp);
17436
+ return _context16.a(2, cacheTimestamp);
17224
17437
  case 2:
17225
- _context15.p = 2;
17226
- _t14 = _context15.v;
17438
+ _context16.p = 2;
17439
+ _t15 = _context16.v;
17227
17440
  throw new Error("Failed to get cache timestamp");
17228
17441
  case 3:
17229
- return _context15.a(2);
17442
+ return _context16.a(2);
17230
17443
  }
17231
- }, _callee15, this, [[0, 2]]);
17444
+ }, _callee16, this, [[0, 2]]);
17232
17445
  }));
17233
- function getCacheTimestamp(_x29) {
17446
+ function getCacheTimestamp(_x30) {
17234
17447
  return _getCacheTimestamp.apply(this, arguments);
17235
17448
  }
17236
17449
  return getCacheTimestamp;
@@ -17243,28 +17456,28 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
17243
17456
  }, {
17244
17457
  key: "getCssCustomization",
17245
17458
  value: function () {
17246
- var _getCssCustomization = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee16(type) {
17247
- var cssCustomization, _t15;
17248
- return sdk_regenerator().w(function (_context16) {
17249
- while (1) switch (_context16.p = _context16.n) {
17459
+ var _getCssCustomization = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee17(type) {
17460
+ var cssCustomization, _t16;
17461
+ return sdk_regenerator().w(function (_context17) {
17462
+ while (1) switch (_context17.p = _context17.n) {
17250
17463
  case 0:
17251
- _context16.p = 0;
17252
- _context16.n = 1;
17464
+ _context17.p = 0;
17465
+ _context17.n = 1;
17253
17466
  return this.repository.fetchAndParseCssCustomization(type);
17254
17467
  case 1:
17255
- cssCustomization = _context16.v;
17468
+ cssCustomization = _context17.v;
17256
17469
  this.logEvent("cssCustomization");
17257
- return _context16.a(2, cssCustomization);
17470
+ return _context17.a(2, cssCustomization);
17258
17471
  case 2:
17259
- _context16.p = 2;
17260
- _t15 = _context16.v;
17472
+ _context17.p = 2;
17473
+ _t16 = _context17.v;
17261
17474
  throw new Error("Failed to get css customization");
17262
17475
  case 3:
17263
- return _context16.a(2);
17476
+ return _context17.a(2);
17264
17477
  }
17265
- }, _callee16, this, [[0, 2]]);
17478
+ }, _callee17, this, [[0, 2]]);
17266
17479
  }));
17267
- function getCssCustomization(_x30) {
17480
+ function getCssCustomization(_x31) {
17268
17481
  return _getCssCustomization.apply(this, arguments);
17269
17482
  }
17270
17483
  return getCssCustomization;
@@ -17272,27 +17485,27 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
17272
17485
  }, {
17273
17486
  key: "notifyHealth",
17274
17487
  value: function () {
17275
- var _notifyHealth = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee17(healthPingId, placeId, totemId, status) {
17276
- var health, _t16;
17277
- return sdk_regenerator().w(function (_context17) {
17278
- while (1) switch (_context17.p = _context17.n) {
17488
+ var _notifyHealth = sdk_asyncToGenerator(/*#__PURE__*/sdk_regenerator().m(function _callee18(healthPingId, placeId, totemId, status) {
17489
+ var health, _t17;
17490
+ return sdk_regenerator().w(function (_context18) {
17491
+ while (1) switch (_context18.p = _context18.n) {
17279
17492
  case 0:
17280
- _context17.p = 0;
17281
- _context17.n = 1;
17493
+ _context18.p = 0;
17494
+ _context18.n = 1;
17282
17495
  return this.repository.postAndParseHealthPing(healthPingId, placeId, totemId, status);
17283
17496
  case 1:
17284
- health = _context17.v;
17285
- return _context17.a(2, health);
17497
+ health = _context18.v;
17498
+ return _context18.a(2, health);
17286
17499
  case 2:
17287
- _context17.p = 2;
17288
- _t16 = _context17.v;
17500
+ _context18.p = 2;
17501
+ _t17 = _context18.v;
17289
17502
  throw new Error("Failed to notify health");
17290
17503
  case 3:
17291
- return _context17.a(2);
17504
+ return _context18.a(2);
17292
17505
  }
17293
- }, _callee17, this, [[0, 2]]);
17506
+ }, _callee18, this, [[0, 2]]);
17294
17507
  }));
17295
- function notifyHealth(_x31, _x32, _x33, _x34) {
17508
+ function notifyHealth(_x32, _x33, _x34, _x35) {
17296
17509
  return _notifyHealth.apply(this, arguments);
17297
17510
  }
17298
17511
  return notifyHealth;