@nextgis/ngw-map 4.0.0-alpha.1 → 4.0.0-alpha.4

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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.1; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.4; author: NextGIS */
2
2
  var NgwMap = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -382,23 +382,23 @@ var NgwMap = (function (exports) {
382
382
  });
383
383
  }
384
384
 
385
- var __defProp$T = Object.defineProperty;
386
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
387
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
388
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
389
- var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
390
- var __spreadValues$A = (a, b) => {
385
+ var __defProp$U = Object.defineProperty;
386
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
387
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
388
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
389
+ var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
390
+ var __spreadValues$z = (a, b) => {
391
391
  for (var prop in b || (b = {}))
392
- if (__hasOwnProp$B.call(b, prop))
393
- __defNormalProp$T(a, prop, b[prop]);
394
- if (__getOwnPropSymbols$B)
395
- for (var prop of __getOwnPropSymbols$B(b)) {
396
- if (__propIsEnum$B.call(b, prop))
397
- __defNormalProp$T(a, prop, b[prop]);
392
+ if (__hasOwnProp$A.call(b, prop))
393
+ __defNormalProp$U(a, prop, b[prop]);
394
+ if (__getOwnPropSymbols$A)
395
+ for (var prop of __getOwnPropSymbols$A(b)) {
396
+ if (__propIsEnum$A.call(b, prop))
397
+ __defNormalProp$U(a, prop, b[prop]);
398
398
  }
399
399
  return a;
400
400
  };
401
- var __async$w = (__this, __arguments, generator) => {
401
+ var __async$x = (__this, __arguments, generator) => {
402
402
  return new Promise((resolve, reject) => {
403
403
  var fulfilled = (value) => {
404
404
  try {
@@ -419,7 +419,7 @@ var NgwMap = (function (exports) {
419
419
  });
420
420
  };
421
421
  function apiRequest(opt) {
422
- return __async$w(this, null, function* () {
422
+ return __async$x(this, null, function* () {
423
423
  const { params, name, connector, requestOptions } = opt;
424
424
  const apiItems = yield connector.connect();
425
425
  let apiItem = apiItems && apiItems[name];
@@ -457,7 +457,7 @@ var NgwMap = (function (exports) {
457
457
  }
458
458
  }
459
459
  if (url) {
460
- return connector.makeQuery(url, params, __spreadValues$A({
460
+ return connector.makeQuery(url, params, __spreadValues$z({
461
461
  cacheName: name
462
462
  }, requestOptions));
463
463
  } else {
@@ -469,12 +469,12 @@ var NgwMap = (function (exports) {
469
469
  });
470
470
  }
471
471
 
472
- var __defProp$S = Object.defineProperty;
473
- var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
474
- var __publicField$A = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
472
+ var __defProp$T = Object.defineProperty;
473
+ var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
474
+ var __publicField$B = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
475
475
  const _Cache = class _Cache {
476
476
  constructor(options = {}) {
477
- __publicField$A(this, "cache", []);
477
+ __publicField$B(this, "cache", []);
478
478
  var _a;
479
479
  const namespace = (_a = options.namespace) != null ? _a : "default";
480
480
  if (_Cache.instance[namespace]) {
@@ -605,7 +605,7 @@ var NgwMap = (function (exports) {
605
605
  return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
606
606
  }
607
607
  };
608
- __publicField$A(_Cache, "instance", {});
608
+ __publicField$B(_Cache, "instance", {});
609
609
  let Cache = _Cache;
610
610
 
611
611
  var domain;
@@ -1083,7 +1083,7 @@ var NgwMap = (function (exports) {
1083
1083
  }
1084
1084
 
1085
1085
  var pkg = {
1086
- version: "3.0.1"};
1086
+ version: "4.0.0-alpha.2"};
1087
1087
 
1088
1088
  class AbortError extends Error {
1089
1089
  constructor(message = "AbortError") {
@@ -1092,46 +1092,46 @@ var NgwMap = (function (exports) {
1092
1092
  }
1093
1093
  }
1094
1094
 
1095
- var __defProp$R = Object.defineProperty;
1096
- var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1097
- var __publicField$z = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
1095
+ var __defProp$S = Object.defineProperty;
1096
+ var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1097
+ var __publicField$A = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
1098
1098
  class NgwError extends Error {
1099
1099
  constructor(er) {
1100
1100
  super();
1101
- __publicField$z(this, "name", "NgwError");
1102
- __publicField$z(this, "title");
1103
- __publicField$z(this, "message");
1104
- __publicField$z(this, "detail");
1105
- __publicField$z(this, "exception");
1106
- __publicField$z(this, "status_code");
1107
- __publicField$z(this, "data");
1108
- __publicField$z(this, "guru_meditation");
1101
+ __publicField$A(this, "name", "NgwError");
1102
+ __publicField$A(this, "title");
1103
+ __publicField$A(this, "message");
1104
+ __publicField$A(this, "detail");
1105
+ __publicField$A(this, "exception");
1106
+ __publicField$A(this, "status_code");
1107
+ __publicField$A(this, "data");
1108
+ __publicField$A(this, "guru_meditation");
1109
1109
  Object.assign(this, er);
1110
1110
  Object.setPrototypeOf(this, NgwError.prototype);
1111
1111
  }
1112
1112
  }
1113
1113
 
1114
- var __defProp$Q = Object.defineProperty;
1115
- var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1116
- var __publicField$y = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
1114
+ var __defProp$R = Object.defineProperty;
1115
+ var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1116
+ var __publicField$z = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
1117
1117
  class InsufficientPermissionsError extends NgwError {
1118
1118
  constructor(obj) {
1119
1119
  super(obj);
1120
- __publicField$y(this, "name", "InsufficientPermissionsError");
1121
- __publicField$y(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
1120
+ __publicField$z(this, "name", "InsufficientPermissionsError");
1121
+ __publicField$z(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
1122
1122
  Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
1123
1123
  }
1124
1124
  }
1125
1125
 
1126
- var __defProp$P = Object.defineProperty;
1127
- var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1128
- var __publicField$x = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
1126
+ var __defProp$Q = Object.defineProperty;
1127
+ var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1128
+ var __publicField$y = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
1129
1129
  let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
1130
1130
  constructor(obj) {
1131
1131
  super(obj);
1132
- __publicField$x(this, "message", "There is no response from the server or problem connecting to server.");
1133
- __publicField$x(this, "title", "Network error");
1134
- __publicField$x(this, "detail", "Check network connectivity and try again later.");
1132
+ __publicField$y(this, "message", "There is no response from the server or problem connecting to server.");
1133
+ __publicField$y(this, "title", "Network error");
1134
+ __publicField$y(this, "detail", "Check network connectivity and try again later.");
1135
1135
  Object.setPrototypeOf(this, NetworksResponseError.prototype);
1136
1136
  }
1137
1137
  };
@@ -1168,27 +1168,27 @@ var NgwMap = (function (exports) {
1168
1168
  return false;
1169
1169
  }
1170
1170
 
1171
- var __defProp$O = Object.defineProperty;
1172
- var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1173
- var __publicField$w = (obj, key, value) => __defNormalProp$O(obj, key + "" , value);
1171
+ var __defProp$P = Object.defineProperty;
1172
+ var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1173
+ var __publicField$x = (obj, key, value) => __defNormalProp$P(obj, key + "" , value);
1174
1174
  class NetworkError extends Error {
1175
1175
  constructor(url) {
1176
1176
  super();
1177
- __publicField$w(this, "name", "NetworkError");
1177
+ __publicField$x(this, "name", "NetworkError");
1178
1178
  Object.setPrototypeOf(this, NetworkError.prototype);
1179
1179
  this.message = `Unable to request ${url}.
1180
1180
  Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
1181
1181
  }
1182
1182
  }
1183
1183
 
1184
- var __defProp$N = Object.defineProperty;
1185
- var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1186
- var __publicField$v = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
1184
+ var __defProp$O = Object.defineProperty;
1185
+ var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1186
+ var __publicField$w = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
1187
1187
  class ResourceNotFoundError extends NgwError {
1188
1188
  constructor(obj) {
1189
1189
  super(obj);
1190
- __publicField$v(this, "name", "ResourceNotFoundError");
1191
- __publicField$v(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
1190
+ __publicField$w(this, "name", "ResourceNotFoundError");
1191
+ __publicField$w(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
1192
1192
  Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
1193
1193
  }
1194
1194
  }
@@ -1205,13 +1205,13 @@ var NgwMap = (function (exports) {
1205
1205
  isError: isError
1206
1206
  });
1207
1207
 
1208
- var __defProp$M = Object.defineProperty;
1209
- var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1210
- var __publicField$u = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
1208
+ var __defProp$N = Object.defineProperty;
1209
+ var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1210
+ var __publicField$v = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
1211
1211
  class BaseAPIError extends Error {
1212
1212
  constructor(message) {
1213
1213
  super(message || "Something went wrong.");
1214
- __publicField$u(this, "title");
1214
+ __publicField$v(this, "title");
1215
1215
  this.name = "BaseAPIError";
1216
1216
  this.title = "Unknown API error";
1217
1217
  if (Error.captureStackTrace) {
@@ -1223,7 +1223,7 @@ var NgwMap = (function (exports) {
1223
1223
  // prettier-ignore
1224
1224
  constructor(message) {
1225
1225
  super(message || "There is no response from the server or problem connecting to server.");
1226
- __publicField$u(this, "detail");
1226
+ __publicField$v(this, "detail");
1227
1227
  this.title = "Network error";
1228
1228
  this.detail = "Check network connectivity and try again later.";
1229
1229
  }
@@ -1237,8 +1237,8 @@ var NgwMap = (function (exports) {
1237
1237
  class ServerResponseError extends BaseAPIError {
1238
1238
  constructor(data) {
1239
1239
  super(data.message);
1240
- __publicField$u(this, "detail");
1241
- __publicField$u(this, "data");
1240
+ __publicField$v(this, "detail");
1241
+ __publicField$v(this, "data");
1242
1242
  this.title = data.title || this.title;
1243
1243
  this.detail = data.detail || null;
1244
1244
  this.data = data;
@@ -1248,8 +1248,8 @@ var NgwMap = (function (exports) {
1248
1248
  // prettier-ignore
1249
1249
  constructor(message, data = {}) {
1250
1250
  super(message || "Unexpected error while processing long-running request.");
1251
- __publicField$u(this, "title");
1252
- __publicField$u(this, "data");
1251
+ __publicField$v(this, "title");
1252
+ __publicField$v(this, "data");
1253
1253
  this.name = "LunkwillError";
1254
1254
  this.title = "Long-running request error";
1255
1255
  this.data = data;
@@ -1269,35 +1269,35 @@ var NgwMap = (function (exports) {
1269
1269
  }
1270
1270
  }
1271
1271
 
1272
- var __defProp$L = Object.defineProperty;
1273
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
1274
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
1275
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
1276
- var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1277
- var __spreadValues$z = (a, b) => {
1272
+ var __defProp$M = Object.defineProperty;
1273
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
1274
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
1275
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
1276
+ var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1277
+ var __spreadValues$y = (a, b) => {
1278
1278
  for (var prop in b || (b = {}))
1279
- if (__hasOwnProp$A.call(b, prop))
1280
- __defNormalProp$L(a, prop, b[prop]);
1281
- if (__getOwnPropSymbols$A)
1282
- for (var prop of __getOwnPropSymbols$A(b)) {
1283
- if (__propIsEnum$A.call(b, prop))
1284
- __defNormalProp$L(a, prop, b[prop]);
1279
+ if (__hasOwnProp$z.call(b, prop))
1280
+ __defNormalProp$M(a, prop, b[prop]);
1281
+ if (__getOwnPropSymbols$z)
1282
+ for (var prop of __getOwnPropSymbols$z(b)) {
1283
+ if (__propIsEnum$z.call(b, prop))
1284
+ __defNormalProp$M(a, prop, b[prop]);
1285
1285
  }
1286
1286
  return a;
1287
1287
  };
1288
1288
  var __objRest$7 = (source, exclude) => {
1289
1289
  var target = {};
1290
1290
  for (var prop in source)
1291
- if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
1291
+ if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
1292
1292
  target[prop] = source[prop];
1293
- if (source != null && __getOwnPropSymbols$A)
1294
- for (var prop of __getOwnPropSymbols$A(source)) {
1295
- if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
1293
+ if (source != null && __getOwnPropSymbols$z)
1294
+ for (var prop of __getOwnPropSymbols$z(source)) {
1295
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
1296
1296
  target[prop] = source[prop];
1297
1297
  }
1298
1298
  return target;
1299
1299
  };
1300
- var __async$v = (__this, __arguments, generator) => {
1300
+ var __async$w = (__this, __arguments, generator) => {
1301
1301
  return new Promise((resolve, reject) => {
1302
1302
  var fulfilled = (value) => {
1303
1303
  try {
@@ -1322,7 +1322,7 @@ var NgwMap = (function (exports) {
1322
1322
  return ct !== void 0 && ct !== null && ct.includes("application/vnd.lunkwill.request-summary+json");
1323
1323
  }
1324
1324
  function responseJson(response) {
1325
- return __async$v(this, null, function* () {
1325
+ return __async$w(this, null, function* () {
1326
1326
  try {
1327
1327
  return response.json();
1328
1328
  } catch (e) {
@@ -1331,7 +1331,7 @@ var NgwMap = (function (exports) {
1331
1331
  });
1332
1332
  }
1333
1333
  function lunkwillResponseUrl(lwResp) {
1334
- return __async$v(this, null, function* () {
1334
+ return __async$w(this, null, function* () {
1335
1335
  const lwData = yield responseJson(lwResp);
1336
1336
  let delay = lwData.delay_ms;
1337
1337
  const retry = lwData.retry_ms !== void 0 ? lwData.retry_ms : 2e3;
@@ -1375,7 +1375,7 @@ var NgwMap = (function (exports) {
1375
1375
  });
1376
1376
  }
1377
1377
  function lunkwillFetch(lwRespUrl) {
1378
- return __async$v(this, null, function* () {
1378
+ return __async$w(this, null, function* () {
1379
1379
  try {
1380
1380
  return yield window.fetch(lwRespUrl, { credentials: "same-origin" });
1381
1381
  } catch (e) {
@@ -1423,14 +1423,14 @@ var NgwMap = (function (exports) {
1423
1423
  return path + urlParams;
1424
1424
  }
1425
1425
  function request(path, options, cacheEngine) {
1426
- return __async$v(this, null, function* () {
1426
+ return __async$w(this, null, function* () {
1427
1427
  var _b, _c;
1428
1428
  const defaults = {
1429
1429
  method: "GET",
1430
1430
  credentials: "same-origin",
1431
1431
  headers: {}
1432
1432
  };
1433
- const _a = __spreadValues$z(__spreadValues$z({}, defaults), options), {
1433
+ const _a = __spreadValues$y(__spreadValues$y({}, defaults), options), {
1434
1434
  withCredentials,
1435
1435
  responseType,
1436
1436
  cacheProps,
@@ -1467,7 +1467,7 @@ var NgwMap = (function (exports) {
1467
1467
  opt.headers = headers;
1468
1468
  }
1469
1469
  const url = generateUrl(path, query);
1470
- const makeRequest = () => __async$v(null, null, function* () {
1470
+ const makeRequest = () => __async$w(null, null, function* () {
1471
1471
  let response;
1472
1472
  try {
1473
1473
  response = yield fetch(url, opt);
@@ -1510,7 +1510,7 @@ var NgwMap = (function (exports) {
1510
1510
  if (cacheEngine) {
1511
1511
  if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
1512
1512
  if (cache !== false) {
1513
- const props = cacheProps ? cacheProps : __spreadValues$z({}, objectRemoveEmpty({
1513
+ const props = cacheProps ? cacheProps : __spreadValues$y({}, objectRemoveEmpty({
1514
1514
  withCredentials,
1515
1515
  responseType
1516
1516
  }));
@@ -1530,38 +1530,38 @@ var NgwMap = (function (exports) {
1530
1530
  });
1531
1531
  }
1532
1532
 
1533
- var __defProp$K = Object.defineProperty;
1534
- var __defProps$l = Object.defineProperties;
1535
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
1536
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
1537
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
1538
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
1539
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1540
- var __spreadValues$y = (a, b) => {
1533
+ var __defProp$L = Object.defineProperty;
1534
+ var __defProps$m = Object.defineProperties;
1535
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
1536
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
1537
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
1538
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
1539
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1540
+ var __spreadValues$x = (a, b) => {
1541
1541
  for (var prop in b || (b = {}))
1542
- if (__hasOwnProp$z.call(b, prop))
1543
- __defNormalProp$K(a, prop, b[prop]);
1544
- if (__getOwnPropSymbols$z)
1545
- for (var prop of __getOwnPropSymbols$z(b)) {
1546
- if (__propIsEnum$z.call(b, prop))
1547
- __defNormalProp$K(a, prop, b[prop]);
1542
+ if (__hasOwnProp$y.call(b, prop))
1543
+ __defNormalProp$L(a, prop, b[prop]);
1544
+ if (__getOwnPropSymbols$y)
1545
+ for (var prop of __getOwnPropSymbols$y(b)) {
1546
+ if (__propIsEnum$y.call(b, prop))
1547
+ __defNormalProp$L(a, prop, b[prop]);
1548
1548
  }
1549
1549
  return a;
1550
1550
  };
1551
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
1551
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
1552
1552
  var __objRest$6 = (source, exclude) => {
1553
1553
  var target = {};
1554
1554
  for (var prop in source)
1555
- if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
1555
+ if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
1556
1556
  target[prop] = source[prop];
1557
- if (source != null && __getOwnPropSymbols$z)
1558
- for (var prop of __getOwnPropSymbols$z(source)) {
1559
- if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
1557
+ if (source != null && __getOwnPropSymbols$y)
1558
+ for (var prop of __getOwnPropSymbols$y(source)) {
1559
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
1560
1560
  target[prop] = source[prop];
1561
1561
  }
1562
1562
  return target;
1563
1563
  };
1564
- var __async$u = (__this, __arguments, generator) => {
1564
+ var __async$v = (__this, __arguments, generator) => {
1565
1565
  return new Promise((resolve, reject) => {
1566
1566
  var fulfilled = (value) => {
1567
1567
  try {
@@ -1612,7 +1612,7 @@ var NgwMap = (function (exports) {
1612
1612
  }
1613
1613
  function route(name, connector, ...rest) {
1614
1614
  const result = {
1615
- url: (opt) => __async$u(null, null, function* () {
1615
+ url: (opt) => __async$v(null, null, function* () {
1616
1616
  var _a;
1617
1617
  const routeData = yield connector.connect();
1618
1618
  const template = routeURL(
@@ -1640,10 +1640,10 @@ var NgwMap = (function (exports) {
1640
1640
  routeData,
1641
1641
  ...rest
1642
1642
  );
1643
- const headers = objectRemoveEmpty(__spreadValues$y(__spreadValues$y({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
1643
+ const headers = objectRemoveEmpty(__spreadValues$x(__spreadValues$x({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
1644
1644
  return request(
1645
1645
  template,
1646
- __spreadProps$l(__spreadValues$y({
1646
+ __spreadProps$m(__spreadValues$x({
1647
1647
  headers
1648
1648
  }, restOpt), {
1649
1649
  method
@@ -1767,39 +1767,39 @@ var NgwMap = (function (exports) {
1767
1767
  }
1768
1768
  }
1769
1769
 
1770
- var __defProp$J = Object.defineProperty;
1771
- var __defProps$k = Object.defineProperties;
1772
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
1773
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
1774
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
1775
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
1776
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1777
- var __spreadValues$x = (a, b) => {
1770
+ var __defProp$K = Object.defineProperty;
1771
+ var __defProps$l = Object.defineProperties;
1772
+ var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
1773
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
1774
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
1775
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
1776
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1777
+ var __spreadValues$w = (a, b) => {
1778
1778
  for (var prop in b || (b = {}))
1779
- if (__hasOwnProp$y.call(b, prop))
1780
- __defNormalProp$J(a, prop, b[prop]);
1781
- if (__getOwnPropSymbols$y)
1782
- for (var prop of __getOwnPropSymbols$y(b)) {
1783
- if (__propIsEnum$y.call(b, prop))
1784
- __defNormalProp$J(a, prop, b[prop]);
1779
+ if (__hasOwnProp$x.call(b, prop))
1780
+ __defNormalProp$K(a, prop, b[prop]);
1781
+ if (__getOwnPropSymbols$x)
1782
+ for (var prop of __getOwnPropSymbols$x(b)) {
1783
+ if (__propIsEnum$x.call(b, prop))
1784
+ __defNormalProp$K(a, prop, b[prop]);
1785
1785
  }
1786
1786
  return a;
1787
1787
  };
1788
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
1788
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
1789
1789
  var __objRest$5 = (source, exclude) => {
1790
1790
  var target = {};
1791
1791
  for (var prop in source)
1792
- if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
1792
+ if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
1793
1793
  target[prop] = source[prop];
1794
- if (source != null && __getOwnPropSymbols$y)
1795
- for (var prop of __getOwnPropSymbols$y(source)) {
1796
- if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
1794
+ if (source != null && __getOwnPropSymbols$x)
1795
+ for (var prop of __getOwnPropSymbols$x(source)) {
1796
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
1797
1797
  target[prop] = source[prop];
1798
1798
  }
1799
1799
  return target;
1800
1800
  };
1801
- var __publicField$t = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
1802
- var __async$t = (__this, __arguments, generator) => {
1801
+ var __publicField$u = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
1802
+ var __async$u = (__this, __arguments, generator) => {
1803
1803
  return new Promise((resolve, reject) => {
1804
1804
  var fulfilled = (value) => {
1805
1805
  try {
@@ -1824,18 +1824,18 @@ var NgwMap = (function (exports) {
1824
1824
  class NgwConnector {
1825
1825
  constructor(options) {
1826
1826
  this.options = options;
1827
- __publicField$t(this, "id", ID$2++);
1828
- __publicField$t(this, "emitter", new EventEmitter());
1829
- __publicField$t(this, "user");
1830
- __publicField$t(this, "cache");
1831
- __publicField$t(this, "withCredentials");
1827
+ __publicField$u(this, "id", ID$2++);
1828
+ __publicField$u(this, "emitter", new EventEmitter());
1829
+ __publicField$u(this, "user");
1830
+ __publicField$u(this, "cache");
1831
+ __publicField$u(this, "withCredentials");
1832
1832
  // Dedicated cache for route requests, as these are executed before any other requests.
1833
1833
  // This cache does not need to be cleared during the session.
1834
- __publicField$t(this, "routeCache");
1835
- __publicField$t(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
1836
- __publicField$t(this, "routeStr", "/api/component/pyramid/route");
1837
- __publicField$t(this, "activeRequests", {});
1838
- __publicField$t(this, "requestTransform");
1834
+ __publicField$u(this, "routeCache");
1835
+ __publicField$u(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
1836
+ __publicField$u(this, "routeStr", "/api/component/pyramid/route");
1837
+ __publicField$u(this, "activeRequests", {});
1838
+ __publicField$u(this, "requestTransform");
1839
1839
  const exist = findConnector(options);
1840
1840
  this.cache = new Cache({ namespace: options.cacheId });
1841
1841
  this.routeCache = new Cache({ namespace: "routecache" });
@@ -1888,7 +1888,7 @@ var NgwMap = (function (exports) {
1888
1888
  * ```
1889
1889
  */
1890
1890
  connect() {
1891
- return __async$t(this, arguments, function* ({
1891
+ return __async$u(this, arguments, function* ({
1892
1892
  signal
1893
1893
  } = {}) {
1894
1894
  const auth = this.options.auth;
@@ -1927,14 +1927,14 @@ var NgwMap = (function (exports) {
1927
1927
  this.emitter.emit("logout");
1928
1928
  }
1929
1929
  getUserInfo(credentials, options) {
1930
- return __async$t(this, null, function* () {
1930
+ return __async$u(this, null, function* () {
1931
1931
  if (this.user && this.user.id) {
1932
1932
  return this.user;
1933
1933
  }
1934
1934
  if (credentials) {
1935
1935
  this.options.auth = credentials;
1936
1936
  }
1937
- const options_ = __spreadValues$x({
1937
+ const options_ = __spreadValues$w({
1938
1938
  headers: this.getAuthorizationHeaders(credentials),
1939
1939
  cache: true
1940
1940
  }, options);
@@ -1975,7 +1975,7 @@ var NgwMap = (function (exports) {
1975
1975
  this.activeRequests = {};
1976
1976
  }
1977
1977
  getActiveApiRequests() {
1978
- return __spreadValues$x({}, this.activeRequests);
1978
+ return __spreadValues$w({}, this.activeRequests);
1979
1979
  }
1980
1980
  route(name, ...rest) {
1981
1981
  return route(name, this, ...rest);
@@ -1987,7 +1987,7 @@ var NgwMap = (function (exports) {
1987
1987
  * @param options - Request options
1988
1988
  */
1989
1989
  makeQuery(_0, _1) {
1990
- return __async$t(this, arguments, function* (url, params, options = {}) {
1990
+ return __async$u(this, arguments, function* (url, params, options = {}) {
1991
1991
  var _b;
1992
1992
  url = (this.options.baseUrl ? this.options.baseUrl : "") + url;
1993
1993
  if (!url) {
@@ -1998,7 +1998,7 @@ var NgwMap = (function (exports) {
1998
1998
  url = template(url, restParams);
1999
1999
  }
2000
2000
  url = encodeURI(fixUrlStr(url));
2001
- options = __spreadValues$x({ withCredentials: this.withCredentials }, options);
2001
+ options = __spreadValues$w({ withCredentials: this.withCredentials }, options);
2002
2002
  const {
2003
2003
  cache,
2004
2004
  signal: externalSignal,
@@ -2020,7 +2020,7 @@ var NgwMap = (function (exports) {
2020
2020
  });
2021
2021
  }
2022
2022
  options.signal = internalSignal;
2023
- const createPromise = () => __async$t(this, null, function* () {
2023
+ const createPromise = () => __async$u(this, null, function* () {
2024
2024
  const id = REQUEST_ID++;
2025
2025
  this.activeRequests[id] = internalAbortController;
2026
2026
  try {
@@ -2030,7 +2030,7 @@ var NgwMap = (function (exports) {
2030
2030
  }
2031
2031
  });
2032
2032
  if (method === "GET" && cache !== false) {
2033
- const cacheOptions = cacheProps ? cacheProps : __spreadProps$k(__spreadValues$x({}, objectRemoveEmpty({
2033
+ const cacheOptions = cacheProps ? cacheProps : __spreadProps$l(__spreadValues$w({}, objectRemoveEmpty({
2034
2034
  headers,
2035
2035
  withCredentials,
2036
2036
  responseType,
@@ -2053,7 +2053,7 @@ var NgwMap = (function (exports) {
2053
2053
  var _a;
2054
2054
  if (this.user) {
2055
2055
  options = options || {};
2056
- options.headers = __spreadValues$x(__spreadValues$x({}, this.getAuthorizationHeaders()), options.headers);
2056
+ options.headers = __spreadValues$w(__spreadValues$w({}, this.getAuthorizationHeaders()), options.headers);
2057
2057
  }
2058
2058
  if (this.requestTransform) {
2059
2059
  const [transUrl, transOptions] = this.requestTransform(url, options);
@@ -2084,7 +2084,7 @@ var NgwMap = (function (exports) {
2084
2084
  });
2085
2085
  }
2086
2086
  _login(credentials, options) {
2087
- return __async$t(this, null, function* () {
2087
+ return __async$u(this, null, function* () {
2088
2088
  try {
2089
2089
  const data = yield this.getUserInfo(credentials, options);
2090
2090
  this.user = data;
@@ -2112,7 +2112,7 @@ var NgwMap = (function (exports) {
2112
2112
  return er;
2113
2113
  }
2114
2114
  }
2115
- __publicField$t(NgwConnector, "errors", errors);
2115
+ __publicField$u(NgwConnector, "errors", errors);
2116
2116
 
2117
2117
  function resourceCompare(res1, res2) {
2118
2118
  return objectDeepEqual(res1, res2);
@@ -2142,27 +2142,27 @@ var NgwMap = (function (exports) {
2142
2142
  return query;
2143
2143
  }
2144
2144
 
2145
- var __defProp$I = Object.defineProperty;
2146
- var __defProps$j = Object.defineProperties;
2147
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
2148
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
2149
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
2150
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
2151
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2152
- var __spreadValues$w = (a, b) => {
2145
+ var __defProp$J = Object.defineProperty;
2146
+ var __defProps$k = Object.defineProperties;
2147
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
2148
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
2149
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
2150
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
2151
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2152
+ var __spreadValues$v = (a, b) => {
2153
2153
  for (var prop in b || (b = {}))
2154
- if (__hasOwnProp$x.call(b, prop))
2155
- __defNormalProp$I(a, prop, b[prop]);
2156
- if (__getOwnPropSymbols$x)
2157
- for (var prop of __getOwnPropSymbols$x(b)) {
2158
- if (__propIsEnum$x.call(b, prop))
2159
- __defNormalProp$I(a, prop, b[prop]);
2154
+ if (__hasOwnProp$w.call(b, prop))
2155
+ __defNormalProp$J(a, prop, b[prop]);
2156
+ if (__getOwnPropSymbols$w)
2157
+ for (var prop of __getOwnPropSymbols$w(b)) {
2158
+ if (__propIsEnum$w.call(b, prop))
2159
+ __defNormalProp$J(a, prop, b[prop]);
2160
2160
  }
2161
2161
  return a;
2162
2162
  };
2163
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
2164
- var __publicField$s = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
2165
- var __async$s = (__this, __arguments, generator) => {
2163
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
2164
+ var __publicField$t = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
2165
+ var __async$t = (__this, __arguments, generator) => {
2166
2166
  return new Promise((resolve, reject) => {
2167
2167
  var fulfilled = (value) => {
2168
2168
  try {
@@ -2187,8 +2187,8 @@ var NgwMap = (function (exports) {
2187
2187
  connector,
2188
2188
  cacheId
2189
2189
  }) {
2190
- __publicField$s(this, "cache");
2191
- __publicField$s(this, "connector");
2190
+ __publicField$t(this, "cache");
2191
+ __publicField$t(this, "connector");
2192
2192
  this.connector = connector;
2193
2193
  this.cache = new Cache({ namespace: cacheId });
2194
2194
  }
@@ -2203,7 +2203,7 @@ var NgwMap = (function (exports) {
2203
2203
  * Fetching resource would be cached to speed up next call
2204
2204
  */
2205
2205
  getOne(resource, requestOptions) {
2206
- const opt = __spreadValues$w({}, requestOptions);
2206
+ const opt = __spreadValues$v({}, requestOptions);
2207
2207
  if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
2208
2208
  if (resource.id !== void 0) {
2209
2209
  resource.id;
@@ -2280,8 +2280,8 @@ var NgwMap = (function (exports) {
2280
2280
  } else {
2281
2281
  Object.assign(query, resourceToQuery(resource));
2282
2282
  }
2283
- return this.connector.route("resource.search").get(__spreadProps$j(__spreadValues$w({}, requestOptions), {
2284
- query: __spreadValues$w({
2283
+ return this.connector.route("resource.search").get(__spreadProps$k(__spreadValues$v({}, requestOptions), {
2284
+ query: __spreadValues$v({
2285
2285
  serialization: "full"
2286
2286
  }, query)
2287
2287
  })).then((resources) => {
@@ -2334,7 +2334,7 @@ var NgwMap = (function (exports) {
2334
2334
  });
2335
2335
  }
2336
2336
  _getChildrenOf(_0, _1) {
2337
- return __async$s(this, arguments, function* (parentDef, requestOptions, _items = []) {
2337
+ return __async$t(this, arguments, function* (parentDef, requestOptions, _items = []) {
2338
2338
  let parent = void 0;
2339
2339
  if (typeof parentDef === "string") {
2340
2340
  parent = yield this.getId(parentDef, requestOptions);
@@ -2343,7 +2343,7 @@ var NgwMap = (function (exports) {
2343
2343
  } else {
2344
2344
  parent = parentDef;
2345
2345
  }
2346
- const items = yield this.connector.route("resource.collection").get(__spreadProps$j(__spreadValues$w({}, requestOptions), {
2346
+ const items = yield this.connector.route("resource.collection").get(__spreadProps$k(__spreadValues$v({}, requestOptions), {
2347
2347
  query: {
2348
2348
  parent
2349
2349
  }
@@ -2371,7 +2371,7 @@ var NgwMap = (function (exports) {
2371
2371
  });
2372
2372
  }
2373
2373
  _cleanResourceItemCache(id) {
2374
- return __async$s(this, null, function* () {
2374
+ return __async$t(this, null, function* () {
2375
2375
  var _a;
2376
2376
  const all = this.cache.all();
2377
2377
  const toDelete = [];
@@ -2424,13 +2424,13 @@ var NgwMap = (function (exports) {
2424
2424
  }
2425
2425
  }
2426
2426
 
2427
- var __defProp$H = Object.defineProperty;
2428
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2429
- var __publicField$r = (obj, key, value) => __defNormalProp$H(obj, key + "" , value);
2427
+ var __defProp$I = Object.defineProperty;
2428
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2429
+ var __publicField$s = (obj, key, value) => __defNormalProp$I(obj, key + "" , value);
2430
2430
  class NgwConnectorExtended extends NgwConnector {
2431
2431
  constructor(options) {
2432
2432
  super(options);
2433
- __publicField$r(this, "resources");
2433
+ __publicField$s(this, "resources");
2434
2434
  this.resources = new ResourcesControl({
2435
2435
  connector: this,
2436
2436
  cacheId: options.cacheId
@@ -2640,25 +2640,25 @@ var NgwMap = (function (exports) {
2640
2640
  }
2641
2641
  }
2642
2642
 
2643
- var __defProp$G = Object.defineProperty;
2644
- var __defProps$i = Object.defineProperties;
2645
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
2646
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
2647
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
2648
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
2649
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2650
- var __spreadValues$v = (a, b) => {
2643
+ var __defProp$H = Object.defineProperty;
2644
+ var __defProps$j = Object.defineProperties;
2645
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
2646
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
2647
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
2648
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
2649
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2650
+ var __spreadValues$u = (a, b) => {
2651
2651
  for (var prop in b || (b = {}))
2652
- if (__hasOwnProp$w.call(b, prop))
2653
- __defNormalProp$G(a, prop, b[prop]);
2654
- if (__getOwnPropSymbols$w)
2655
- for (var prop of __getOwnPropSymbols$w(b)) {
2656
- if (__propIsEnum$w.call(b, prop))
2657
- __defNormalProp$G(a, prop, b[prop]);
2652
+ if (__hasOwnProp$v.call(b, prop))
2653
+ __defNormalProp$H(a, prop, b[prop]);
2654
+ if (__getOwnPropSymbols$v)
2655
+ for (var prop of __getOwnPropSymbols$v(b)) {
2656
+ if (__propIsEnum$v.call(b, prop))
2657
+ __defNormalProp$H(a, prop, b[prop]);
2658
2658
  }
2659
2659
  return a;
2660
2660
  };
2661
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
2661
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
2662
2662
  function getNgwWebmapExtent(webmap) {
2663
2663
  const bottom = webmap["extent_bottom"];
2664
2664
  const left = webmap["extent_left"];
@@ -2725,14 +2725,14 @@ var NgwMap = (function (exports) {
2725
2725
  if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
2726
2726
  return connector.getResource(resource.parent.id, options).then((res) => {
2727
2727
  if (res) {
2728
- return fetchNgwLayerExtent(__spreadProps$i(__spreadValues$v({}, options), {
2728
+ return fetchNgwLayerExtent(__spreadProps$j(__spreadValues$u({}, options), {
2729
2729
  resourceId: res.resource.id,
2730
2730
  connector
2731
2731
  }));
2732
2732
  }
2733
2733
  });
2734
2734
  } else {
2735
- return fetchNgwLayerExtent(__spreadProps$i(__spreadValues$v({}, options), {
2735
+ return fetchNgwLayerExtent(__spreadProps$j(__spreadValues$u({}, options), {
2736
2736
  resourceId: resource.id,
2737
2737
  connector
2738
2738
  }));
@@ -2740,10 +2740,10 @@ var NgwMap = (function (exports) {
2740
2740
  }
2741
2741
  }
2742
2742
 
2743
- var __defProp$F = Object.defineProperty;
2744
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2745
- var __publicField$q = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
2746
- var __async$r = (__this, __arguments, generator) => {
2743
+ var __defProp$G = Object.defineProperty;
2744
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2745
+ var __publicField$r = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
2746
+ var __async$s = (__this, __arguments, generator) => {
2747
2747
  return new Promise((resolve, reject) => {
2748
2748
  var fulfilled = (value) => {
2749
2749
  try {
@@ -2765,18 +2765,18 @@ var NgwMap = (function (exports) {
2765
2765
  };
2766
2766
  class NgwResource {
2767
2767
  constructor() {
2768
- __publicField$q(this, "item");
2769
- __publicField$q(this, "connector");
2770
- __publicField$q(this, "_extent");
2768
+ __publicField$r(this, "item");
2769
+ __publicField$r(this, "connector");
2770
+ __publicField$r(this, "_extent");
2771
2771
  }
2772
2772
  /** @deprecated use {@link NgwResource.getBounds} instead */
2773
2773
  getExtent() {
2774
- return __async$r(this, null, function* () {
2774
+ return __async$s(this, null, function* () {
2775
2775
  return this.getBounds();
2776
2776
  });
2777
2777
  }
2778
2778
  getBounds(options) {
2779
- return __async$r(this, null, function* () {
2779
+ return __async$s(this, null, function* () {
2780
2780
  if (this._extent) {
2781
2781
  return this._extent;
2782
2782
  }
@@ -2792,7 +2792,7 @@ var NgwMap = (function (exports) {
2792
2792
  }
2793
2793
  }
2794
2794
 
2795
- var __async$q = (__this, __arguments, generator) => {
2795
+ var __async$r = (__this, __arguments, generator) => {
2796
2796
  return new Promise((resolve, reject) => {
2797
2797
  var fulfilled = (value) => {
2798
2798
  try {
@@ -2813,7 +2813,7 @@ var NgwMap = (function (exports) {
2813
2813
  });
2814
2814
  };
2815
2815
  function resourceIdFromLayerOptions(options, connector) {
2816
- return __async$q(this, null, function* () {
2816
+ return __async$r(this, null, function* () {
2817
2817
  const resource = options.resource;
2818
2818
  const item = resource;
2819
2819
  let { keyname, resourceId } = options;
@@ -2838,25 +2838,25 @@ var NgwMap = (function (exports) {
2838
2838
  });
2839
2839
  }
2840
2840
 
2841
- var __defProp$E = Object.defineProperty;
2842
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
2843
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
2844
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
2845
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2846
- var __spreadValues$u = (a, b) => {
2841
+ var __defProp$F = Object.defineProperty;
2842
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
2843
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
2844
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
2845
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2846
+ var __spreadValues$t = (a, b) => {
2847
2847
  for (var prop in b || (b = {}))
2848
- if (__hasOwnProp$v.call(b, prop))
2849
- __defNormalProp$E(a, prop, b[prop]);
2850
- if (__getOwnPropSymbols$v)
2851
- for (var prop of __getOwnPropSymbols$v(b)) {
2852
- if (__propIsEnum$v.call(b, prop))
2853
- __defNormalProp$E(a, prop, b[prop]);
2848
+ if (__hasOwnProp$u.call(b, prop))
2849
+ __defNormalProp$F(a, prop, b[prop]);
2850
+ if (__getOwnPropSymbols$u)
2851
+ for (var prop of __getOwnPropSymbols$u(b)) {
2852
+ if (__propIsEnum$u.call(b, prop))
2853
+ __defNormalProp$F(a, prop, b[prop]);
2854
2854
  }
2855
2855
  return a;
2856
2856
  };
2857
- var __publicField$p = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
2858
- var __async$p = (__this, __arguments, generator) => {
2859
- return new Promise((resolve, reject) => {
2857
+ var __publicField$q = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
2858
+ var __async$q = (__this, __arguments, generator) => {
2859
+ return new Promise((resolve, reject) => {
2860
2860
  var fulfilled = (value) => {
2861
2861
  try {
2862
2862
  step(generator.next(value));
@@ -2876,7 +2876,7 @@ var NgwMap = (function (exports) {
2876
2876
  });
2877
2877
  };
2878
2878
  function createOnFirstShowAdapter(_0) {
2879
- return __async$p(this, arguments, function* ({
2879
+ return __async$q(this, arguments, function* ({
2880
2880
  webMap,
2881
2881
  adapterOptions = {},
2882
2882
  onLayerAdded,
@@ -2884,10 +2884,10 @@ var NgwMap = (function (exports) {
2884
2884
  }) {
2885
2885
  class OnFirstShowAdapter {
2886
2886
  constructor() {
2887
- __publicField$p(this, "options", {});
2888
- __publicField$p(this, "layer", []);
2889
- __publicField$p(this, "_removed", false);
2890
- __publicField$p(this, "_creatingInProgress", false);
2887
+ __publicField$q(this, "options", {});
2888
+ __publicField$q(this, "layer", []);
2889
+ __publicField$q(this, "_removed", false);
2890
+ __publicField$q(this, "_creatingInProgress", false);
2891
2891
  }
2892
2892
  addLayer() {
2893
2893
  return this.layer;
@@ -2902,7 +2902,7 @@ var NgwMap = (function (exports) {
2902
2902
  return this._removed;
2903
2903
  }
2904
2904
  showLayer() {
2905
- return __async$p(this, null, function* () {
2905
+ return __async$q(this, null, function* () {
2906
2906
  this.options.visibility = true;
2907
2907
  if (this.layer.length) {
2908
2908
  for (const x of this.layer) {
@@ -2914,7 +2914,7 @@ var NgwMap = (function (exports) {
2914
2914
  });
2915
2915
  }
2916
2916
  hideLayer() {
2917
- return __async$p(this, null, function* () {
2917
+ return __async$q(this, null, function* () {
2918
2918
  this.options.visibility = false;
2919
2919
  if (this.layer) {
2920
2920
  for (const x of this.layer) {
@@ -2924,12 +2924,12 @@ var NgwMap = (function (exports) {
2924
2924
  });
2925
2925
  }
2926
2926
  loadLayer() {
2927
- return __async$p(this, null, function* () {
2927
+ return __async$q(this, null, function* () {
2928
2928
  if (!this.layer.length && !this._creatingInProgress) {
2929
2929
  this._creatingInProgress = true;
2930
2930
  const Adapter = yield createAdapter(this);
2931
2931
  if (Adapter) {
2932
- const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$u({}, adapterOptions));
2932
+ const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$t({}, adapterOptions));
2933
2933
  const realLayer = yield adapter.addLayer({
2934
2934
  order: this.options.order,
2935
2935
  headers: this.options.headers,
@@ -2958,7 +2958,7 @@ var NgwMap = (function (exports) {
2958
2958
  });
2959
2959
  }
2960
2960
 
2961
- var __async$o = (__this, __arguments, generator) => {
2961
+ var __async$p = (__this, __arguments, generator) => {
2962
2962
  return new Promise((resolve, reject) => {
2963
2963
  var fulfilled = (value) => {
2964
2964
  try {
@@ -2979,7 +2979,7 @@ var NgwMap = (function (exports) {
2979
2979
  });
2980
2980
  };
2981
2981
  function createOnFirstShowNgwAdapter(_0) {
2982
- return __async$o(this, arguments, function* ({
2982
+ return __async$p(this, arguments, function* ({
2983
2983
  webMap,
2984
2984
  connector,
2985
2985
  item,
@@ -3013,19 +3013,19 @@ var NgwMap = (function (exports) {
3013
3013
  });
3014
3014
  }
3015
3015
 
3016
- var __defProp$D = Object.defineProperty;
3017
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
3018
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
3019
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
3020
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3021
- var __spreadValues$t = (a, b) => {
3016
+ var __defProp$E = Object.defineProperty;
3017
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
3018
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
3019
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
3020
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3021
+ var __spreadValues$s = (a, b) => {
3022
3022
  for (var prop in b || (b = {}))
3023
- if (__hasOwnProp$u.call(b, prop))
3024
- __defNormalProp$D(a, prop, b[prop]);
3025
- if (__getOwnPropSymbols$u)
3026
- for (var prop of __getOwnPropSymbols$u(b)) {
3027
- if (__propIsEnum$u.call(b, prop))
3028
- __defNormalProp$D(a, prop, b[prop]);
3023
+ if (__hasOwnProp$t.call(b, prop))
3024
+ __defNormalProp$E(a, prop, b[prop]);
3025
+ if (__getOwnPropSymbols$t)
3026
+ for (var prop of __getOwnPropSymbols$t(b)) {
3027
+ if (__propIsEnum$t.call(b, prop))
3028
+ __defNormalProp$E(a, prop, b[prop]);
3029
3029
  }
3030
3030
  return a;
3031
3031
  };
@@ -3072,7 +3072,7 @@ var NgwMap = (function (exports) {
3072
3072
  return false;
3073
3073
  }
3074
3074
  function featureFilter(feature, filters) {
3075
- const properties = __spreadValues$t({}, feature.properties);
3075
+ const properties = __spreadValues$s({}, feature.properties);
3076
3076
  if (properties) {
3077
3077
  properties.$id = feature.id;
3078
3078
  return propertiesFilter(properties, filters);
@@ -3107,26 +3107,26 @@ var NgwMap = (function (exports) {
3107
3107
  return logic === "any" ? filters_.some(filterFunction) : filters_.every(filterFunction);
3108
3108
  }
3109
3109
 
3110
- var __defProp$C = Object.defineProperty;
3111
- var __defProps$h = Object.defineProperties;
3112
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
3113
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
3114
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
3115
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
3116
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3117
- var __spreadValues$s = (a, b) => {
3110
+ var __defProp$D = Object.defineProperty;
3111
+ var __defProps$i = Object.defineProperties;
3112
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
3113
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
3114
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
3115
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
3116
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3117
+ var __spreadValues$r = (a, b) => {
3118
3118
  for (var prop in b || (b = {}))
3119
- if (__hasOwnProp$t.call(b, prop))
3120
- __defNormalProp$C(a, prop, b[prop]);
3121
- if (__getOwnPropSymbols$t)
3122
- for (var prop of __getOwnPropSymbols$t(b)) {
3123
- if (__propIsEnum$t.call(b, prop))
3124
- __defNormalProp$C(a, prop, b[prop]);
3119
+ if (__hasOwnProp$s.call(b, prop))
3120
+ __defNormalProp$D(a, prop, b[prop]);
3121
+ if (__getOwnPropSymbols$s)
3122
+ for (var prop of __getOwnPropSymbols$s(b)) {
3123
+ if (__propIsEnum$s.call(b, prop))
3124
+ __defNormalProp$D(a, prop, b[prop]);
3125
3125
  }
3126
3126
  return a;
3127
3127
  };
3128
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
3129
- var __async$n = (__this, __arguments, generator) => {
3128
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
3129
+ var __async$o = (__this, __arguments, generator) => {
3130
3130
  return new Promise((resolve, reject) => {
3131
3131
  var fulfilled = (value) => {
3132
3132
  try {
@@ -3193,7 +3193,7 @@ var NgwMap = (function (exports) {
3193
3193
  );
3194
3194
  }
3195
3195
  function createFeatureFieldFilterQueries(opt) {
3196
- return __async$n(this, null, function* () {
3196
+ return __async$o(this, null, function* () {
3197
3197
  const queries = getQueries(opt);
3198
3198
  const itemsParts = yield Promise.all(queries);
3199
3199
  const ids = [];
@@ -3237,12 +3237,12 @@ var NgwMap = (function (exports) {
3237
3237
  for (const f of filters_) {
3238
3238
  if (isPropertyFilter$1(f)) {
3239
3239
  _queries.push(
3240
- fetchNgwLayerItemsRequest(__spreadProps$h(__spreadValues$s({}, opt), {
3240
+ fetchNgwLayerItemsRequest(__spreadProps$i(__spreadValues$r({}, opt), {
3241
3241
  paramList: [..._parentAllParams, ...paramList, createParam(f)]
3242
3242
  }))
3243
3243
  );
3244
3244
  } else {
3245
- getQueries(__spreadProps$h(__spreadValues$s({}, opt), { filters: f }), _queries, [..._parentAllParams]);
3245
+ getQueries(__spreadProps$i(__spreadValues$r({}, opt), { filters: f }), _queries, [..._parentAllParams]);
3246
3246
  }
3247
3247
  }
3248
3248
  } else if (logic === "all") {
@@ -3257,14 +3257,14 @@ var NgwMap = (function (exports) {
3257
3257
  }
3258
3258
  if (propertiesFilterList.length) {
3259
3259
  for (const x of propertiesFilterList) {
3260
- getQueries(__spreadProps$h(__spreadValues$s({}, opt), { filters: x }), _queries, [
3260
+ getQueries(__spreadProps$i(__spreadValues$r({}, opt), { filters: x }), _queries, [
3261
3261
  ..._parentAllParams,
3262
3262
  ...filters2
3263
3263
  ]);
3264
3264
  }
3265
3265
  } else {
3266
3266
  _queries.push(
3267
- fetchNgwLayerItemsRequest(__spreadProps$h(__spreadValues$s({}, opt), {
3267
+ fetchNgwLayerItemsRequest(__spreadProps$i(__spreadValues$r({}, opt), {
3268
3268
  paramList: [..._parentAllParams, ...paramList, ...filters2]
3269
3269
  }))
3270
3270
  );
@@ -3280,7 +3280,7 @@ var NgwMap = (function (exports) {
3280
3280
  return `POLYGON((${polygon.join(", ")}))`;
3281
3281
  }
3282
3282
  function fetchNgwLayerItemsRequest(options) {
3283
- const params = __spreadValues$s({}, FEATURE_REQUEST_PARAMS);
3283
+ const params = __spreadValues$r({}, FEATURE_REQUEST_PARAMS);
3284
3284
  const {
3285
3285
  limit,
3286
3286
  query,
@@ -3316,7 +3316,7 @@ var NgwMap = (function (exports) {
3316
3316
  if (paramList) {
3317
3317
  Object.assign(params, paramListToQuery(paramList));
3318
3318
  }
3319
- return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$s(__spreadValues$s({}, params), query), cache, signal });
3319
+ return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$r(__spreadValues$r({}, params), query), cache, signal });
3320
3320
  }
3321
3321
 
3322
3322
  function prepareNgwFieldsToPropertiesFilter(fields) {
@@ -3345,26 +3345,26 @@ var NgwMap = (function (exports) {
3345
3345
  return fields;
3346
3346
  }
3347
3347
 
3348
- var __defProp$B = Object.defineProperty;
3349
- var __defProps$g = Object.defineProperties;
3350
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
3351
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
3352
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
3353
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
3354
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3355
- var __spreadValues$r = (a, b) => {
3348
+ var __defProp$C = Object.defineProperty;
3349
+ var __defProps$h = Object.defineProperties;
3350
+ var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
3351
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
3352
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
3353
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
3354
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3355
+ var __spreadValues$q = (a, b) => {
3356
3356
  for (var prop in b || (b = {}))
3357
- if (__hasOwnProp$s.call(b, prop))
3358
- __defNormalProp$B(a, prop, b[prop]);
3359
- if (__getOwnPropSymbols$s)
3360
- for (var prop of __getOwnPropSymbols$s(b)) {
3361
- if (__propIsEnum$s.call(b, prop))
3362
- __defNormalProp$B(a, prop, b[prop]);
3357
+ if (__hasOwnProp$r.call(b, prop))
3358
+ __defNormalProp$C(a, prop, b[prop]);
3359
+ if (__getOwnPropSymbols$r)
3360
+ for (var prop of __getOwnPropSymbols$r(b)) {
3361
+ if (__propIsEnum$r.call(b, prop))
3362
+ __defNormalProp$C(a, prop, b[prop]);
3363
3363
  }
3364
3364
  return a;
3365
3365
  };
3366
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
3367
- var __async$m = (__this, __arguments, generator) => {
3366
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
3367
+ var __async$n = (__this, __arguments, generator) => {
3368
3368
  return new Promise((resolve, reject) => {
3369
3369
  var fulfilled = (value) => {
3370
3370
  try {
@@ -3385,17 +3385,17 @@ var NgwMap = (function (exports) {
3385
3385
  });
3386
3386
  };
3387
3387
  function fetchNgwLayerItems(options) {
3388
- return __async$m(this, null, function* () {
3388
+ return __async$n(this, null, function* () {
3389
3389
  var _a;
3390
3390
  const filters = options.filters;
3391
3391
  if (filters) {
3392
- let data = yield createFeatureFieldFilterQueries(__spreadProps$g(__spreadValues$r({}, options), {
3392
+ let data = yield createFeatureFieldFilterQueries(__spreadProps$h(__spreadValues$q({}, options), {
3393
3393
  filters
3394
3394
  }));
3395
3395
  const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
3396
3396
  if (clientFilterValidate) {
3397
3397
  data = data.filter((y) => {
3398
- const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$g(__spreadValues$r({}, y.fields), {
3398
+ const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$h(__spreadValues$q({}, y.fields), {
3399
3399
  id: y.id
3400
3400
  }));
3401
3401
  const result = propertiesFilter(fields, filters);
@@ -3513,26 +3513,26 @@ var NgwMap = (function (exports) {
3513
3513
  }
3514
3514
  }
3515
3515
 
3516
- var __defProp$A = Object.defineProperty;
3517
- var __defProps$f = Object.defineProperties;
3518
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
3519
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
3520
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
3521
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
3522
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3523
- var __spreadValues$q = (a, b) => {
3516
+ var __defProp$B = Object.defineProperty;
3517
+ var __defProps$g = Object.defineProperties;
3518
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
3519
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
3520
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
3521
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
3522
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3523
+ var __spreadValues$p = (a, b) => {
3524
3524
  for (var prop in b || (b = {}))
3525
- if (__hasOwnProp$r.call(b, prop))
3526
- __defNormalProp$A(a, prop, b[prop]);
3527
- if (__getOwnPropSymbols$r)
3528
- for (var prop of __getOwnPropSymbols$r(b)) {
3529
- if (__propIsEnum$r.call(b, prop))
3530
- __defNormalProp$A(a, prop, b[prop]);
3525
+ if (__hasOwnProp$q.call(b, prop))
3526
+ __defNormalProp$B(a, prop, b[prop]);
3527
+ if (__getOwnPropSymbols$q)
3528
+ for (var prop of __getOwnPropSymbols$q(b)) {
3529
+ if (__propIsEnum$q.call(b, prop))
3530
+ __defNormalProp$B(a, prop, b[prop]);
3531
3531
  }
3532
3532
  return a;
3533
3533
  };
3534
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
3535
- var __async$l = (__this, __arguments, generator) => {
3534
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
3535
+ var __async$m = (__this, __arguments, generator) => {
3536
3536
  return new Promise((resolve, reject) => {
3537
3537
  var fulfilled = (value) => {
3538
3538
  try {
@@ -3553,56 +3553,56 @@ var NgwMap = (function (exports) {
3553
3553
  });
3554
3554
  };
3555
3555
  function fetchNgwLayerItem(options) {
3556
- return __async$l(this, null, function* () {
3557
- const params = __spreadValues$q({}, FEATURE_REQUEST_PARAMS);
3556
+ return __async$m(this, null, function* () {
3557
+ const params = __spreadValues$p({}, FEATURE_REQUEST_PARAMS);
3558
3558
  updateItemRequestParam(params, options);
3559
3559
  const resp = yield options.connector.route("feature_layer.feature.item", {
3560
3560
  id: Number(options.resourceId),
3561
3561
  fid: options.featureId
3562
- }).get(__spreadProps$f(__spreadValues$q({}, options), { query: params }));
3563
- const toGeojson = () => __async$l(null, null, function* () {
3562
+ }).get(__spreadProps$g(__spreadValues$p({}, options), { query: params }));
3563
+ const toGeojson = () => __async$m(null, null, function* () {
3564
3564
  if (resp.geom) {
3565
3565
  return createGeoJsonFeature(resp);
3566
3566
  } else {
3567
- const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$f(__spreadValues$q({}, options), {
3567
+ const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$g(__spreadValues$p({}, options), {
3568
3568
  geom: true,
3569
3569
  fields: null,
3570
3570
  extensions: null
3571
3571
  }));
3572
3572
  const geom = onlyGeomItem.geom;
3573
- return createGeoJsonFeature(__spreadProps$f(__spreadValues$q({}, resp), { geom }));
3573
+ return createGeoJsonFeature(__spreadProps$g(__spreadValues$p({}, resp), { geom }));
3574
3574
  }
3575
3575
  });
3576
- return __spreadProps$f(__spreadValues$q({}, resp), {
3576
+ return __spreadProps$g(__spreadValues$p({}, resp), {
3577
3577
  toGeojson
3578
3578
  });
3579
3579
  });
3580
3580
  }
3581
3581
 
3582
- var __defProp$z = Object.defineProperty;
3583
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
3584
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
3585
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
3586
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3587
- var __spreadValues$p = (a, b) => {
3582
+ var __defProp$A = Object.defineProperty;
3583
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
3584
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
3585
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
3586
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3587
+ var __spreadValues$o = (a, b) => {
3588
3588
  for (var prop in b || (b = {}))
3589
- if (__hasOwnProp$q.call(b, prop))
3590
- __defNormalProp$z(a, prop, b[prop]);
3591
- if (__getOwnPropSymbols$q)
3592
- for (var prop of __getOwnPropSymbols$q(b)) {
3593
- if (__propIsEnum$q.call(b, prop))
3594
- __defNormalProp$z(a, prop, b[prop]);
3589
+ if (__hasOwnProp$p.call(b, prop))
3590
+ __defNormalProp$A(a, prop, b[prop]);
3591
+ if (__getOwnPropSymbols$p)
3592
+ for (var prop of __getOwnPropSymbols$p(b)) {
3593
+ if (__propIsEnum$p.call(b, prop))
3594
+ __defNormalProp$A(a, prop, b[prop]);
3595
3595
  }
3596
3596
  return a;
3597
3597
  };
3598
- var __publicField$o = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
3598
+ var __publicField$p = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
3599
3599
  class BookmarkItem {
3600
3600
  constructor(options) {
3601
3601
  this.options = options;
3602
- __publicField$o(this, "name");
3603
- __publicField$o(this, "resourceId");
3604
- __publicField$o(this, "item");
3605
- __publicField$o(this, "_extent");
3602
+ __publicField$p(this, "name");
3603
+ __publicField$p(this, "resourceId");
3604
+ __publicField$p(this, "item");
3605
+ __publicField$p(this, "_extent");
3606
3606
  this.resourceId = options.resourceId;
3607
3607
  const item = options.item;
3608
3608
  this.item = item;
@@ -3632,7 +3632,7 @@ var NgwMap = (function (exports) {
3632
3632
  if (this.item.geom) {
3633
3633
  return Promise.resolve(createGeoJsonFeature(this.item));
3634
3634
  } else {
3635
- return fetchNgwLayerItem(__spreadValues$p({
3635
+ return fetchNgwLayerItem(__spreadValues$o({
3636
3636
  resourceId: this.resourceId,
3637
3637
  featureId: this.item.id,
3638
3638
  connector: this.options.connector,
@@ -3650,19 +3650,19 @@ var NgwMap = (function (exports) {
3650
3650
 
3651
3651
  const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
3652
3652
 
3653
- var __defProp$y = Object.defineProperty;
3654
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3655
- var __publicField$n = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
3653
+ var __defProp$z = Object.defineProperty;
3654
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3655
+ var __publicField$o = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
3656
3656
  class BaseProperty {
3657
3657
  constructor(name, item, options) {
3658
- __publicField$n(this, "options");
3659
- __publicField$n(this, "emitter", new EventEmitter());
3660
- __publicField$n(this, "name");
3661
- __publicField$n(this, "item");
3662
- __publicField$n(this, "_blocked", false);
3663
- __publicField$n(this, "_container");
3664
- __publicField$n(this, "__value");
3665
- __publicField$n(this, "_removeEventsListener");
3658
+ __publicField$o(this, "options");
3659
+ __publicField$o(this, "emitter", new EventEmitter());
3660
+ __publicField$o(this, "name");
3661
+ __publicField$o(this, "item");
3662
+ __publicField$o(this, "_blocked", false);
3663
+ __publicField$o(this, "_container");
3664
+ __publicField$o(this, "__value");
3665
+ __publicField$o(this, "_removeEventsListener");
3666
3666
  this.item = item;
3667
3667
  this.options = Object.assign({}, options);
3668
3668
  this.name = name;
@@ -3765,26 +3765,26 @@ var NgwMap = (function (exports) {
3765
3765
  }
3766
3766
  }
3767
3767
 
3768
- var __defProp$x = Object.defineProperty;
3769
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
3770
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
3771
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
3772
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3773
- var __spreadValues$o = (a, b) => {
3768
+ var __defProp$y = Object.defineProperty;
3769
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
3770
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
3771
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
3772
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3773
+ var __spreadValues$n = (a, b) => {
3774
3774
  for (var prop in b || (b = {}))
3775
- if (__hasOwnProp$p.call(b, prop))
3776
- __defNormalProp$x(a, prop, b[prop]);
3777
- if (__getOwnPropSymbols$p)
3778
- for (var prop of __getOwnPropSymbols$p(b)) {
3779
- if (__propIsEnum$p.call(b, prop))
3780
- __defNormalProp$x(a, prop, b[prop]);
3775
+ if (__hasOwnProp$o.call(b, prop))
3776
+ __defNormalProp$y(a, prop, b[prop]);
3777
+ if (__getOwnPropSymbols$o)
3778
+ for (var prop of __getOwnPropSymbols$o(b)) {
3779
+ if (__propIsEnum$o.call(b, prop))
3780
+ __defNormalProp$y(a, prop, b[prop]);
3781
3781
  }
3782
3782
  return a;
3783
3783
  };
3784
- var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, key + "" , value);
3784
+ var __publicField$n = (obj, key, value) => __defNormalProp$y(obj, key + "" , value);
3785
3785
  const _CheckProperty = class _CheckProperty extends BaseProperty {
3786
3786
  constructor(name, item, options) {
3787
- super(name, item, __spreadValues$o(__spreadValues$o({}, _CheckProperty.options), options));
3787
+ super(name, item, __spreadValues$n(__spreadValues$n({}, _CheckProperty.options), options));
3788
3788
  this.set(this.get());
3789
3789
  }
3790
3790
  update(value, options) {
@@ -3865,13 +3865,13 @@ var NgwMap = (function (exports) {
3865
3865
  _blockChild(item, options) {
3866
3866
  const prop = item.properties && item.properties.property(this.name);
3867
3867
  if (prop && prop.block) {
3868
- prop.block(__spreadValues$o({ silent: true }, options || {}));
3868
+ prop.block(__spreadValues$n({ silent: true }, options || {}));
3869
3869
  }
3870
3870
  }
3871
3871
  _unBlockChild(item, options) {
3872
3872
  const prop = item.properties && item.properties.property(this.name);
3873
3873
  if (prop && prop.unBlock) {
3874
- prop.unBlock(__spreadValues$o({ silent: true }, options || {}));
3874
+ prop.unBlock(__spreadValues$n({ silent: true }, options || {}));
3875
3875
  }
3876
3876
  }
3877
3877
  _propagation(value, options) {
@@ -3881,7 +3881,7 @@ var NgwMap = (function (exports) {
3881
3881
  const child = children[fry];
3882
3882
  const property = child.properties && child.properties.property(this.name);
3883
3883
  if (property) {
3884
- property.set(value, __spreadValues$o(__spreadValues$o({}, options), {
3884
+ property.set(value, __spreadValues$n(__spreadValues$n({}, options), {
3885
3885
  propagation: true,
3886
3886
  bubble: false
3887
3887
  }));
@@ -3890,7 +3890,7 @@ var NgwMap = (function (exports) {
3890
3890
  }
3891
3891
  }
3892
3892
  };
3893
- __publicField$m(_CheckProperty, "options", {
3893
+ __publicField$n(_CheckProperty, "options", {
3894
3894
  hierarchy: true,
3895
3895
  bubble: false,
3896
3896
  propagation: false,
@@ -3899,31 +3899,31 @@ var NgwMap = (function (exports) {
3899
3899
  });
3900
3900
  let CheckProperty = _CheckProperty;
3901
3901
 
3902
- var __defProp$w = Object.defineProperty;
3903
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
3904
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
3905
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
3906
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3907
- var __spreadValues$n = (a, b) => {
3902
+ var __defProp$x = Object.defineProperty;
3903
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
3904
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
3905
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
3906
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3907
+ var __spreadValues$m = (a, b) => {
3908
3908
  for (var prop in b || (b = {}))
3909
- if (__hasOwnProp$o.call(b, prop))
3910
- __defNormalProp$w(a, prop, b[prop]);
3911
- if (__getOwnPropSymbols$o)
3912
- for (var prop of __getOwnPropSymbols$o(b)) {
3913
- if (__propIsEnum$o.call(b, prop))
3914
- __defNormalProp$w(a, prop, b[prop]);
3909
+ if (__hasOwnProp$n.call(b, prop))
3910
+ __defNormalProp$x(a, prop, b[prop]);
3911
+ if (__getOwnPropSymbols$n)
3912
+ for (var prop of __getOwnPropSymbols$n(b)) {
3913
+ if (__propIsEnum$n.call(b, prop))
3914
+ __defNormalProp$x(a, prop, b[prop]);
3915
3915
  }
3916
3916
  return a;
3917
3917
  };
3918
- var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
3918
+ var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
3919
3919
  const BOOLEAN_TYPE = "boolean";
3920
3920
  const STRING_TYPE = "string";
3921
3921
  const _ItemProperties = class _ItemProperties {
3922
3922
  constructor(item, propertiesList) {
3923
3923
  this.item = item;
3924
- __publicField$l(this, "options", {});
3925
- __publicField$l(this, "_properties", {});
3926
- __publicField$l(this, "_propertiesList", []);
3924
+ __publicField$m(this, "options", {});
3925
+ __publicField$m(this, "_properties", {});
3926
+ __publicField$m(this, "_propertiesList", []);
3927
3927
  if (propertiesList) {
3928
3928
  propertiesList.forEach(this._setPropertyHandler.bind(this));
3929
3929
  }
@@ -3963,7 +3963,7 @@ var NgwMap = (function (exports) {
3963
3963
  _setPropertyHandler(propOpt) {
3964
3964
  const Handler = this._getHandler(propOpt);
3965
3965
  if (Handler && propOpt.name) {
3966
- const options = __spreadValues$n({}, propOpt);
3966
+ const options = __spreadValues$m({}, propOpt);
3967
3967
  this._properties[propOpt.name] = new Handler(
3968
3968
  propOpt.name,
3969
3969
  this.item,
@@ -3986,7 +3986,7 @@ var NgwMap = (function (exports) {
3986
3986
  return Handler;
3987
3987
  }
3988
3988
  };
3989
- __publicField$l(_ItemProperties, "handlers", {
3989
+ __publicField$m(_ItemProperties, "handlers", {
3990
3990
  CheckProperty
3991
3991
  });
3992
3992
  let ItemProperties = _ItemProperties;
@@ -4093,14 +4093,14 @@ var NgwMap = (function (exports) {
4093
4093
  return true;
4094
4094
  }
4095
4095
 
4096
- var __defProp$v = Object.defineProperty;
4097
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4098
- var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
4096
+ var __defProp$w = Object.defineProperty;
4097
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4098
+ var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
4099
4099
  class TreeHelper {
4100
4100
  constructor(item) {
4101
- __publicField$k(this, "item");
4102
- __publicField$k(this, "_children", []);
4103
- __publicField$k(this, "_parent");
4101
+ __publicField$l(this, "item");
4102
+ __publicField$l(this, "_children", []);
4103
+ __publicField$l(this, "_parent");
4104
4104
  this.item = item;
4105
4105
  }
4106
4106
  setParent(parent) {
@@ -4163,32 +4163,32 @@ var NgwMap = (function (exports) {
4163
4163
  }
4164
4164
  }
4165
4165
 
4166
- var __defProp$u = Object.defineProperty;
4167
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
4168
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
4169
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
4170
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4171
- var __spreadValues$m = (a, b) => {
4166
+ var __defProp$v = Object.defineProperty;
4167
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
4168
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
4169
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
4170
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4171
+ var __spreadValues$l = (a, b) => {
4172
4172
  for (var prop in b || (b = {}))
4173
- if (__hasOwnProp$n.call(b, prop))
4174
- __defNormalProp$u(a, prop, b[prop]);
4175
- if (__getOwnPropSymbols$n)
4176
- for (var prop of __getOwnPropSymbols$n(b)) {
4177
- if (__propIsEnum$n.call(b, prop))
4178
- __defNormalProp$u(a, prop, b[prop]);
4173
+ if (__hasOwnProp$m.call(b, prop))
4174
+ __defNormalProp$v(a, prop, b[prop]);
4175
+ if (__getOwnPropSymbols$m)
4176
+ for (var prop of __getOwnPropSymbols$m(b)) {
4177
+ if (__propIsEnum$m.call(b, prop))
4178
+ __defNormalProp$v(a, prop, b[prop]);
4179
4179
  }
4180
4180
  return a;
4181
4181
  };
4182
- var __publicField$j = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
4182
+ var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
4183
4183
  let ID$1 = 0;
4184
4184
  class Item {
4185
4185
  constructor(options) {
4186
- __publicField$j(this, "options", {});
4187
- __publicField$j(this, "properties");
4188
- __publicField$j(this, "tree");
4189
- __publicField$j(this, "id", ID$1);
4186
+ __publicField$k(this, "options", {});
4187
+ __publicField$k(this, "properties");
4188
+ __publicField$k(this, "tree");
4189
+ __publicField$k(this, "id", ID$1);
4190
4190
  ID$1 += 1;
4191
- this.options = __spreadValues$m({}, options);
4191
+ this.options = __spreadValues$l({}, options);
4192
4192
  this.tree = new TreeHelper(this);
4193
4193
  }
4194
4194
  initProperties() {
@@ -4244,27 +4244,27 @@ var NgwMap = (function (exports) {
4244
4244
  return { [`symbols[${resourceId}]`]: intervals.join(",") || void 0 };
4245
4245
  }
4246
4246
 
4247
- var __defProp$t = Object.defineProperty;
4248
- var __defProps$e = Object.defineProperties;
4249
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
4250
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
4251
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
4252
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
4253
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4254
- var __spreadValues$l = (a, b) => {
4247
+ var __defProp$u = Object.defineProperty;
4248
+ var __defProps$f = Object.defineProperties;
4249
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
4250
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
4251
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
4252
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
4253
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4254
+ var __spreadValues$k = (a, b) => {
4255
4255
  for (var prop in b || (b = {}))
4256
- if (__hasOwnProp$m.call(b, prop))
4257
- __defNormalProp$t(a, prop, b[prop]);
4258
- if (__getOwnPropSymbols$m)
4259
- for (var prop of __getOwnPropSymbols$m(b)) {
4260
- if (__propIsEnum$m.call(b, prop))
4261
- __defNormalProp$t(a, prop, b[prop]);
4256
+ if (__hasOwnProp$l.call(b, prop))
4257
+ __defNormalProp$u(a, prop, b[prop]);
4258
+ if (__getOwnPropSymbols$l)
4259
+ for (var prop of __getOwnPropSymbols$l(b)) {
4260
+ if (__propIsEnum$l.call(b, prop))
4261
+ __defNormalProp$u(a, prop, b[prop]);
4262
4262
  }
4263
4263
  return a;
4264
4264
  };
4265
- var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
4266
- var __publicField$i = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
4267
- var __async$k = (__this, __arguments, generator) => {
4265
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
4266
+ var __publicField$j = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
4267
+ var __async$l = (__this, __arguments, generator) => {
4268
4268
  return new Promise((resolve, reject) => {
4269
4269
  var fulfilled = (value) => {
4270
4270
  try {
@@ -4295,17 +4295,17 @@ var NgwMap = (function (exports) {
4295
4295
  layer,
4296
4296
  onSymbolRenderChange
4297
4297
  }) {
4298
- __publicField$i(this, "layerId");
4299
- __publicField$i(this, "layer");
4300
- __publicField$i(this, "resourceId");
4301
- __publicField$i(this, "legendSymbols", "expand");
4302
- __publicField$i(this, "legend");
4298
+ __publicField$j(this, "layerId");
4299
+ __publicField$j(this, "layer");
4300
+ __publicField$j(this, "resourceId");
4301
+ __publicField$j(this, "legendSymbols", "expand");
4302
+ __publicField$j(this, "legend");
4303
4303
  // private blocked: boolean = false;
4304
- __publicField$i(this, "layerVisibility", true);
4304
+ __publicField$j(this, "layerVisibility", true);
4305
4305
  // private symbolRenderIndexes?: number[];
4306
- __publicField$i(this, "onSymbolRenderChange");
4307
- __publicField$i(this, "webMap");
4308
- __publicField$i(this, "connector");
4306
+ __publicField$j(this, "onSymbolRenderChange");
4307
+ __publicField$j(this, "webMap");
4308
+ __publicField$j(this, "connector");
4309
4309
  if (legendSymbols) {
4310
4310
  this.legendSymbols = legendSymbols;
4311
4311
  }
@@ -4324,18 +4324,18 @@ var NgwMap = (function (exports) {
4324
4324
  this.layer = layer;
4325
4325
  }
4326
4326
  create() {
4327
- return __async$k(this, arguments, function* (options = {}) {
4327
+ return __async$l(this, arguments, function* (options = {}) {
4328
4328
  if (this.connector) {
4329
4329
  const ngwLegend = yield this.connector.route("render.legend_symbols", {
4330
4330
  id: this.resourceId
4331
- }).get(__spreadValues$l({}, options));
4331
+ }).get(__spreadValues$k({}, options));
4332
4332
  this.legend = ngwLegend;
4333
4333
  return this.createLegend(ngwLegend);
4334
4334
  }
4335
4335
  });
4336
4336
  }
4337
4337
  createLegend(items) {
4338
- return items.map((params) => __spreadProps$e(__spreadValues$l({}, params), {
4338
+ return items.map((params) => __spreadProps$f(__spreadValues$k({}, params), {
4339
4339
  /** @deprecated use display_name instead */
4340
4340
  name: params.display_name,
4341
4341
  /** @deprecated use icon instead */
@@ -4365,7 +4365,7 @@ var NgwMap = (function (exports) {
4365
4365
  }
4366
4366
  if (this.layer.updateLayer) {
4367
4367
  this.layer.updateLayer({
4368
- params: __spreadValues$l({}, createLayerSymbolParam(this.resourceId, intervals))
4368
+ params: __spreadValues$k({}, createLayerSymbolParam(this.resourceId, intervals))
4369
4369
  });
4370
4370
  }
4371
4371
  if (intervals.length) {
@@ -4402,27 +4402,27 @@ var NgwMap = (function (exports) {
4402
4402
  }
4403
4403
  }
4404
4404
 
4405
- var __defProp$s = Object.defineProperty;
4406
- var __defProps$d = Object.defineProperties;
4407
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
4408
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
4409
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
4410
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
4411
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4412
- var __spreadValues$k = (a, b) => {
4405
+ var __defProp$t = Object.defineProperty;
4406
+ var __defProps$e = Object.defineProperties;
4407
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
4408
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
4409
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
4410
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
4411
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4412
+ var __spreadValues$j = (a, b) => {
4413
4413
  for (var prop in b || (b = {}))
4414
- if (__hasOwnProp$l.call(b, prop))
4415
- __defNormalProp$s(a, prop, b[prop]);
4416
- if (__getOwnPropSymbols$l)
4417
- for (var prop of __getOwnPropSymbols$l(b)) {
4418
- if (__propIsEnum$l.call(b, prop))
4419
- __defNormalProp$s(a, prop, b[prop]);
4414
+ if (__hasOwnProp$k.call(b, prop))
4415
+ __defNormalProp$t(a, prop, b[prop]);
4416
+ if (__getOwnPropSymbols$k)
4417
+ for (var prop of __getOwnPropSymbols$k(b)) {
4418
+ if (__propIsEnum$k.call(b, prop))
4419
+ __defNormalProp$t(a, prop, b[prop]);
4420
4420
  }
4421
4421
  return a;
4422
4422
  };
4423
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
4424
- var __publicField$h = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
4425
- var __async$j = (__this, __arguments, generator) => {
4423
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
4424
+ var __publicField$i = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
4425
+ var __async$k = (__this, __arguments, generator) => {
4426
4426
  return new Promise((resolve, reject) => {
4427
4427
  var fulfilled = (value) => {
4428
4428
  try {
@@ -4451,14 +4451,14 @@ var NgwMap = (function (exports) {
4451
4451
  parent,
4452
4452
  noInit
4453
4453
  }) {
4454
- super(__spreadValues$k(__spreadValues$k({}, _NgwWebmapItem.options), options));
4455
- __publicField$h(this, "item");
4456
- __publicField$h(this, "webMap");
4457
- __publicField$h(this, "connector");
4458
- __publicField$h(this, "layer");
4459
- __publicField$h(this, "legend");
4460
- __publicField$h(this, "emitter", new EventEmitter());
4461
- __publicField$h(this, "_rootDescendantsCount", 0);
4454
+ super(__spreadValues$j(__spreadValues$j({}, _NgwWebmapItem.options), options));
4455
+ __publicField$i(this, "item");
4456
+ __publicField$i(this, "webMap");
4457
+ __publicField$i(this, "connector");
4458
+ __publicField$i(this, "layer");
4459
+ __publicField$i(this, "legend");
4460
+ __publicField$i(this, "emitter", new EventEmitter());
4461
+ __publicField$i(this, "_rootDescendantsCount", 0);
4462
4462
  this.webMap = webMap;
4463
4463
  if (connector) {
4464
4464
  this.connector = connector;
@@ -4481,7 +4481,7 @@ var NgwMap = (function (exports) {
4481
4481
  }
4482
4482
  }
4483
4483
  static create(webMap, item, options, connector, parent) {
4484
- return __async$j(this, null, function* () {
4484
+ return __async$k(this, null, function* () {
4485
4485
  const ngwWebmapItem = new _NgwWebmapItem({
4486
4486
  webMap,
4487
4487
  item,
@@ -4510,7 +4510,7 @@ var NgwMap = (function (exports) {
4510
4510
  return this.layer;
4511
4511
  }
4512
4512
  getLegend(options) {
4513
- return __async$j(this, null, function* () {
4513
+ return __async$k(this, null, function* () {
4514
4514
  var _a, _b;
4515
4515
  const id = (_a = this.layer) == null ? void 0 : _a.id;
4516
4516
  if (id !== void 0) {
@@ -4547,7 +4547,7 @@ var NgwMap = (function (exports) {
4547
4547
  getItemOptions(item) {
4548
4548
  const transparency = item.item_type === "layer" && item.layer_transparency;
4549
4549
  const opacity = typeof transparency === "number" ? (100 - transparency) / 100 : void 0;
4550
- const options = __spreadProps$d(__spreadValues$k({
4550
+ const options = __spreadProps$e(__spreadValues$j({
4551
4551
  visibility: false,
4552
4552
  name: item.display_name
4553
4553
  }, this.options), {
@@ -4567,7 +4567,7 @@ var NgwMap = (function (exports) {
4567
4567
  }
4568
4568
  if (item.item_type === "layer") {
4569
4569
  const { maxZoom, minZoom } = this._getZoomRange(item);
4570
- Object.assign(options, __spreadProps$d(__spreadValues$k({
4570
+ Object.assign(options, __spreadProps$e(__spreadValues$j({
4571
4571
  updateWmsParams: item.updateWmsParams
4572
4572
  }, options), {
4573
4573
  url: item.url,
@@ -4670,8 +4670,8 @@ var NgwMap = (function (exports) {
4670
4670
  return totalValue;
4671
4671
  }
4672
4672
  };
4673
- __publicField$h(_NgwWebmapItem, "GetAdapterFromLayerType", {});
4674
- __publicField$h(_NgwWebmapItem, "options", {
4673
+ __publicField$i(_NgwWebmapItem, "GetAdapterFromLayerType", {});
4674
+ __publicField$i(_NgwWebmapItem, "options", {
4675
4675
  properties: [
4676
4676
  {
4677
4677
  type: "boolean",
@@ -4711,27 +4711,27 @@ var NgwMap = (function (exports) {
4711
4711
  });
4712
4712
  let NgwWebmapItem = _NgwWebmapItem;
4713
4713
 
4714
- var __defProp$r = Object.defineProperty;
4715
- var __defProps$c = Object.defineProperties;
4716
- var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
4717
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
4718
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
4719
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
4720
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4721
- var __spreadValues$j = (a, b) => {
4714
+ var __defProp$s = Object.defineProperty;
4715
+ var __defProps$d = Object.defineProperties;
4716
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
4717
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
4718
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
4719
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
4720
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4721
+ var __spreadValues$i = (a, b) => {
4722
4722
  for (var prop in b || (b = {}))
4723
- if (__hasOwnProp$k.call(b, prop))
4724
- __defNormalProp$r(a, prop, b[prop]);
4725
- if (__getOwnPropSymbols$k)
4726
- for (var prop of __getOwnPropSymbols$k(b)) {
4727
- if (__propIsEnum$k.call(b, prop))
4728
- __defNormalProp$r(a, prop, b[prop]);
4723
+ if (__hasOwnProp$j.call(b, prop))
4724
+ __defNormalProp$s(a, prop, b[prop]);
4725
+ if (__getOwnPropSymbols$j)
4726
+ for (var prop of __getOwnPropSymbols$j(b)) {
4727
+ if (__propIsEnum$j.call(b, prop))
4728
+ __defNormalProp$s(a, prop, b[prop]);
4729
4729
  }
4730
4730
  return a;
4731
4731
  };
4732
- var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
4733
- var __publicField$g = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
4734
- var __async$i = (__this, __arguments, generator) => {
4732
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
4733
+ var __publicField$h = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
4734
+ var __async$j = (__this, __arguments, generator) => {
4735
4735
  return new Promise((resolve, reject) => {
4736
4736
  var fulfilled = (value) => {
4737
4737
  try {
@@ -4755,20 +4755,20 @@ var NgwMap = (function (exports) {
4755
4755
  constructor(map, options) {
4756
4756
  this.map = map;
4757
4757
  this.options = options;
4758
- __publicField$g(this, "layer");
4759
- __publicField$g(this, "NgwWebmapItem", NgwWebmapItem);
4758
+ __publicField$h(this, "layer");
4759
+ __publicField$h(this, "NgwWebmapItem", NgwWebmapItem);
4760
4760
  /**
4761
4761
  * Radius for searching objects in pixels
4762
4762
  */
4763
- __publicField$g(this, "pixelRadius", 10);
4763
+ __publicField$h(this, "pixelRadius", 10);
4764
4764
  // webmapSettings.identify_radius,
4765
- __publicField$g(this, "resourceId");
4766
- __publicField$g(this, "webmapClassName", "webmap");
4767
- __publicField$g(this, "emitter", new EventEmitter());
4768
- __publicField$g(this, "_extent");
4769
- __publicField$g(this, "webmapResource");
4770
- __publicField$g(this, "_webmapBaselayersIds", []);
4771
- __publicField$g(this, "_lastActiveBaselayer");
4765
+ __publicField$h(this, "resourceId");
4766
+ __publicField$h(this, "webmapClassName", "webmap");
4767
+ __publicField$h(this, "emitter", new EventEmitter());
4768
+ __publicField$h(this, "_extent");
4769
+ __publicField$h(this, "webmapResource");
4770
+ __publicField$h(this, "_webmapBaselayersIds", []);
4771
+ __publicField$h(this, "_lastActiveBaselayer");
4772
4772
  const r = options.resourceId;
4773
4773
  if (Array.isArray(r)) {
4774
4774
  this.resourceId = r[0];
@@ -4781,9 +4781,9 @@ var NgwMap = (function (exports) {
4781
4781
  }
4782
4782
  }
4783
4783
  addLayer(options) {
4784
- return __async$i(this, null, function* () {
4784
+ return __async$j(this, null, function* () {
4785
4785
  var _a;
4786
- this.options = __spreadValues$j(__spreadValues$j({}, this.options), options);
4786
+ this.options = __spreadValues$i(__spreadValues$i({}, this.options), options);
4787
4787
  this.layer = yield this._getWebMapLayerItem();
4788
4788
  const extentConstrained = (_a = this.webmapResource) == null ? void 0 : _a.constraining_extent;
4789
4789
  if (this.options.useExtentConstrained && this._extent && extentConstrained) {
@@ -4813,21 +4813,21 @@ var NgwMap = (function (exports) {
4813
4813
  delete this.webmapResource;
4814
4814
  }
4815
4815
  showLayer() {
4816
- return __async$i(this, null, function* () {
4816
+ return __async$j(this, null, function* () {
4817
4817
  if (this.layer && this.layer.properties) {
4818
4818
  return this.layer.properties.property("visibility").set(true);
4819
4819
  }
4820
4820
  });
4821
4821
  }
4822
4822
  hideLayer() {
4823
- return __async$i(this, null, function* () {
4823
+ return __async$j(this, null, function* () {
4824
4824
  if (this.layer && this.layer.properties) {
4825
4825
  return this.layer.properties.property("visibility").set(false);
4826
4826
  }
4827
4827
  });
4828
4828
  }
4829
4829
  setOpacity(val) {
4830
- return __async$i(this, null, function* () {
4830
+ return __async$j(this, null, function* () {
4831
4831
  if (this.layer && this.layer.properties) {
4832
4832
  return this.layer.properties.property("opacity").set(val);
4833
4833
  }
@@ -4862,7 +4862,7 @@ var NgwMap = (function (exports) {
4862
4862
  (x) => x.label_field
4863
4863
  );
4864
4864
  const keyname = labelField && labelField.keyname;
4865
- return fetchNgwLayerItems(__spreadValues$j({
4865
+ return fetchNgwLayerItems(__spreadValues$i({
4866
4866
  connector,
4867
4867
  resourceId: bookmarkResId,
4868
4868
  geom: false,
@@ -4887,7 +4887,7 @@ var NgwMap = (function (exports) {
4887
4887
  );
4888
4888
  }
4889
4889
  getLegend(options) {
4890
- return __async$i(this, null, function* () {
4890
+ return __async$j(this, null, function* () {
4891
4891
  const legends = [];
4892
4892
  let deps = this.getDependLayers();
4893
4893
  deps = deps.sort((a, b) => b.id - a.id);
@@ -4899,7 +4899,7 @@ var NgwMap = (function (exports) {
4899
4899
  });
4900
4900
  }
4901
4901
  getIdentificationIds(options) {
4902
- return __async$i(this, null, function* () {
4902
+ return __async$j(this, null, function* () {
4903
4903
  const visibleLayers = [];
4904
4904
  let deps = this.getDependLayers();
4905
4905
  deps = deps.sort((a, b) => b.id - a.id);
@@ -4918,7 +4918,7 @@ var NgwMap = (function (exports) {
4918
4918
  });
4919
4919
  }
4920
4920
  _getWebMapLayerItem() {
4921
- return __async$i(this, null, function* () {
4921
+ return __async$j(this, null, function* () {
4922
4922
  if (!this.resourceId) {
4923
4923
  return void 0;
4924
4924
  }
@@ -4931,7 +4931,7 @@ var NgwMap = (function (exports) {
4931
4931
  const connector = this.options.connector;
4932
4932
  const headers = (connector == null ? void 0 : connector.options.auth) ? connector.getAuthorizationHeaders() : void 0;
4933
4933
  const withCredentials = connector.withCredentials;
4934
- const options = __spreadProps$c(__spreadValues$j({}, this.options), {
4934
+ const options = __spreadProps$d(__spreadValues$i({}, this.options), {
4935
4935
  withCredentials,
4936
4936
  headers,
4937
4937
  drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
@@ -4949,7 +4949,7 @@ var NgwMap = (function (exports) {
4949
4949
  });
4950
4950
  }
4951
4951
  getWebMapConfig(id) {
4952
- return __async$i(this, null, function* () {
4952
+ return __async$j(this, null, function* () {
4953
4953
  var _a;
4954
4954
  const data = yield this.options.connector.getResource(id);
4955
4955
  if (data) {
@@ -5037,7 +5037,7 @@ var NgwMap = (function (exports) {
5037
5037
  webMap,
5038
5038
  baseUrl: this.options.connector.options.baseUrl || ""
5039
5039
  });
5040
- item = __spreadValues$j(__spreadValues$j({}, layerItem), layerAdapterOptions);
5040
+ item = __spreadValues$i(__spreadValues$i({}, layerItem), layerAdapterOptions);
5041
5041
  }
5042
5042
  }
5043
5043
  if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
@@ -5047,40 +5047,40 @@ var NgwMap = (function (exports) {
5047
5047
  }
5048
5048
  }
5049
5049
 
5050
- var __defProp$q = Object.defineProperty;
5051
- var __defProps$b = Object.defineProperties;
5052
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
5053
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
5054
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
5055
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
5056
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5057
- var __spreadValues$i = (a, b) => {
5050
+ var __defProp$r = Object.defineProperty;
5051
+ var __defProps$c = Object.defineProperties;
5052
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
5053
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
5054
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
5055
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
5056
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5057
+ var __spreadValues$h = (a, b) => {
5058
5058
  for (var prop in b || (b = {}))
5059
- if (__hasOwnProp$j.call(b, prop))
5060
- __defNormalProp$q(a, prop, b[prop]);
5061
- if (__getOwnPropSymbols$j)
5062
- for (var prop of __getOwnPropSymbols$j(b)) {
5063
- if (__propIsEnum$j.call(b, prop))
5064
- __defNormalProp$q(a, prop, b[prop]);
5059
+ if (__hasOwnProp$i.call(b, prop))
5060
+ __defNormalProp$r(a, prop, b[prop]);
5061
+ if (__getOwnPropSymbols$i)
5062
+ for (var prop of __getOwnPropSymbols$i(b)) {
5063
+ if (__propIsEnum$i.call(b, prop))
5064
+ __defNormalProp$r(a, prop, b[prop]);
5065
5065
  }
5066
5066
  return a;
5067
5067
  };
5068
- var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
5068
+ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
5069
5069
  var __objRest$4 = (source, exclude) => {
5070
5070
  var target = {};
5071
5071
  for (var prop in source)
5072
- if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
5072
+ if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
5073
5073
  target[prop] = source[prop];
5074
- if (source != null && __getOwnPropSymbols$j)
5075
- for (var prop of __getOwnPropSymbols$j(source)) {
5076
- if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
5074
+ if (source != null && __getOwnPropSymbols$i)
5075
+ for (var prop of __getOwnPropSymbols$i(source)) {
5076
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
5077
5077
  target[prop] = source[prop];
5078
5078
  }
5079
5079
  return target;
5080
5080
  };
5081
5081
  function updateImageParams(params, resourceId) {
5082
5082
  const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$4(_a, ["bbox", "width", "height", "nd"]);
5083
- return __spreadProps$b(__spreadValues$i({}, rest), {
5083
+ return __spreadProps$c(__spreadValues$h({}, rest), {
5084
5084
  resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
5085
5085
  extent: bbox,
5086
5086
  size: width + "," + height,
@@ -5115,7 +5115,7 @@ var NgwMap = (function (exports) {
5115
5115
  function extendNgwWebmapLayerAdapter(opt) {
5116
5116
  class A extends NgwWebmapLayerAdapter {
5117
5117
  constructor(map, options) {
5118
- options = __spreadValues$i(__spreadValues$i({}, opt), options);
5118
+ options = __spreadValues$h(__spreadValues$h({}, opt), options);
5119
5119
  super(map, options);
5120
5120
  }
5121
5121
  }
@@ -5146,78 +5146,174 @@ var NgwMap = (function (exports) {
5146
5146
  return zoom;
5147
5147
  }
5148
5148
 
5149
+ function parseQmsExtent(value) {
5150
+ if (!value) {
5151
+ return void 0;
5152
+ }
5153
+ const match = value.match(/^(?:SRID=(\d+);)?POLYGON\s*\(\((.+)\)\)\s*$/i);
5154
+ if (!match || match[1] && match[1] !== "4326") {
5155
+ return void 0;
5156
+ }
5157
+ const coordinates = match[2].split(",").map((coordinate) => coordinate.trim().split(/\s+/).map(Number)).filter(
5158
+ (coordinate) => coordinate.length >= 2 && Number.isFinite(coordinate[0]) && Number.isFinite(coordinate[1])
5159
+ );
5160
+ if (!coordinates.length) {
5161
+ return void 0;
5162
+ }
5163
+ const xs = coordinates.map((coordinate) => coordinate[0]);
5164
+ const ys = coordinates.map((coordinate) => coordinate[1]);
5165
+ return [Math.min(...xs), Math.min(...ys), Math.max(...xs), Math.max(...ys)];
5166
+ }
5167
+ function normalizeQmsUrl(url) {
5168
+ return url.replace(/^(http|ftp):\/\//, "https://");
5169
+ }
5149
5170
  function getSubdomainsOriginUrl(originUrl) {
5150
- const submodules = [];
5151
- originUrl = originUrl.replace(/{switch:(.*?)}/, (m, group) => {
5171
+ const subdomains = [];
5172
+ originUrl = originUrl.replace(/{switch:(.*?)}/, (match, group) => {
5152
5173
  if (typeof group === "string") {
5153
- group.split(",").forEach((s) => submodules.push(s));
5174
+ group.split(",").forEach((subdomain) => subdomains.push(subdomain));
5154
5175
  }
5155
5176
  return "{s}";
5156
5177
  });
5157
- return [originUrl, submodules];
5178
+ return [originUrl, subdomains];
5179
+ }
5180
+ function parseQmsWmsParams(params) {
5181
+ if (!params) {
5182
+ return {};
5183
+ }
5184
+ return Object.fromEntries(new URLSearchParams(params).entries());
5185
+ }
5186
+ function prepareQmsTmsLayer(service) {
5187
+ var _a, _b;
5188
+ const [url, subdomains] = getSubdomainsOriginUrl(
5189
+ normalizeQmsUrl(service.origin_url || service.url)
5190
+ );
5191
+ return {
5192
+ type: "tms",
5193
+ service,
5194
+ url,
5195
+ subdomains,
5196
+ scheme: service.y_origin_top ? "xyz" : "tms",
5197
+ name: service.name,
5198
+ attribution: service.copyright_text || void 0,
5199
+ extent: parseQmsExtent(service.extent),
5200
+ minZoom: (_a = service.z_min) != null ? _a : void 0,
5201
+ maxZoom: (_b = service.z_max) != null ? _b : void 0
5202
+ };
5203
+ }
5204
+ function prepareQmsWmsLayer(service) {
5205
+ const params = parseQmsWmsParams(service.params);
5206
+ const versionEntry = Object.entries(params).find(
5207
+ ([key]) => key.toLowerCase() === "version"
5208
+ );
5209
+ return {
5210
+ type: "wms",
5211
+ service,
5212
+ url: normalizeQmsUrl(service.url),
5213
+ layers: service.layers,
5214
+ format: service.format || "image/png",
5215
+ version: (versionEntry == null ? void 0 : versionEntry[1]) || "1.3.0",
5216
+ params,
5217
+ name: service.name,
5218
+ attribution: service.copyright_text || void 0,
5219
+ extent: parseQmsExtent(service.extent)
5220
+ };
5158
5221
  }
5159
5222
 
5160
- function loadJson(url) {
5223
+ var __defProp$q = Object.defineProperty;
5224
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5225
+ var __publicField$g = (obj, key, value) => __defNormalProp$q(obj, key + "" , value);
5226
+ var __async$i = (__this, __arguments, generator) => {
5161
5227
  return new Promise((resolve, reject) => {
5162
- const xmlHttp = new XMLHttpRequest();
5163
- xmlHttp.onreadystatechange = () => {
5164
- if (xmlHttp.readyState === 4 && xmlHttp.status === 200) {
5165
- if (xmlHttp.responseText) {
5166
- try {
5167
- resolve(JSON.parse(xmlHttp.responseText));
5168
- } catch (er) {
5169
- reject(er);
5170
- }
5171
- }
5228
+ var fulfilled = (value) => {
5229
+ try {
5230
+ step(generator.next(value));
5231
+ } catch (e) {
5232
+ reject(e);
5172
5233
  }
5173
5234
  };
5174
- xmlHttp.open("GET", fixUrlStr(url), true);
5175
- xmlHttp.send();
5235
+ var rejected = (value) => {
5236
+ try {
5237
+ step(generator.throw(value));
5238
+ } catch (e) {
5239
+ reject(e);
5240
+ }
5241
+ };
5242
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
5243
+ step((generator = generator.apply(__this, __arguments)).next());
5176
5244
  });
5177
- }
5178
-
5179
- const alias = {
5180
- tms: "TILE"
5181
5245
  };
5182
- function updateQmsOptions(qms) {
5183
- const protocol = (location.protocol === "https:" ? "https" : "http") + "://";
5184
- let serviceUrl = qms.url.replace(/^(https?|ftp):\/\//, protocol);
5185
- if (!qms.y_origin_top) {
5186
- serviceUrl = serviceUrl.replace("{y}", "{-y}");
5246
+ const QMS_URL = "https://qms.nextgis.com";
5247
+ const _QmsClient = class _QmsClient {
5248
+ constructor() {
5249
+ __publicField$g(this, "url");
5250
+ this.url = _QmsClient.url.replace(/\/$/, "").trim();
5187
5251
  }
5188
- return {
5189
- url: serviceUrl,
5190
- name: qms.name,
5191
- attribution: qms.copyright_text,
5192
- maxZoom: qms.z_max,
5193
- minZoom: qms.z_min
5194
- };
5195
- }
5252
+ getService(_0) {
5253
+ return __async$i(this, arguments, function* (id, options = {}) {
5254
+ const service = yield this._getJson(
5255
+ `${this.url}/api/v1/geoservices/${id}`,
5256
+ options
5257
+ );
5258
+ if (service.type !== "tms" && service.type !== "wms") {
5259
+ throw new Error("Unsupported QMS service type.");
5260
+ }
5261
+ return service;
5262
+ });
5263
+ }
5264
+ getLayer(_0) {
5265
+ return __async$i(this, arguments, function* (id, options = {}) {
5266
+ const service = yield this.getService(id, options);
5267
+ if (service.type === "tms") {
5268
+ return prepareQmsTmsLayer(service);
5269
+ }
5270
+ return prepareQmsWmsLayer(service);
5271
+ });
5272
+ }
5273
+ _getJson(_0, _1) {
5274
+ return __async$i(this, arguments, function* (url, { signal }) {
5275
+ const response = yield fetch(url, {
5276
+ signal
5277
+ });
5278
+ if (!response.ok) {
5279
+ throw new Error(
5280
+ `QMS request failed with status ${response.status}: ${url}`
5281
+ );
5282
+ }
5283
+ return response.json();
5284
+ });
5285
+ }
5286
+ };
5287
+ __publicField$g(_QmsClient, "url", QMS_URL);
5288
+ let QmsClient = _QmsClient;
5196
5289
 
5197
5290
  var __defProp$p = Object.defineProperty;
5198
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
5199
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
5200
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
5291
+ var __defProps$b = Object.defineProperties;
5292
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
5293
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
5294
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
5295
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
5201
5296
  var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5202
- var __spreadValues$h = (a, b) => {
5297
+ var __spreadValues$g = (a, b) => {
5203
5298
  for (var prop in b || (b = {}))
5204
- if (__hasOwnProp$i.call(b, prop))
5299
+ if (__hasOwnProp$h.call(b, prop))
5205
5300
  __defNormalProp$p(a, prop, b[prop]);
5206
- if (__getOwnPropSymbols$i)
5207
- for (var prop of __getOwnPropSymbols$i(b)) {
5208
- if (__propIsEnum$i.call(b, prop))
5301
+ if (__getOwnPropSymbols$h)
5302
+ for (var prop of __getOwnPropSymbols$h(b)) {
5303
+ if (__propIsEnum$h.call(b, prop))
5209
5304
  __defNormalProp$p(a, prop, b[prop]);
5210
5305
  }
5211
5306
  return a;
5212
5307
  };
5308
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
5213
5309
  var __objRest$3 = (source, exclude) => {
5214
5310
  var target = {};
5215
5311
  for (var prop in source)
5216
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
5312
+ if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
5217
5313
  target[prop] = source[prop];
5218
- if (source != null && __getOwnPropSymbols$i)
5219
- for (var prop of __getOwnPropSymbols$i(source)) {
5220
- if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
5314
+ if (source != null && __getOwnPropSymbols$h)
5315
+ for (var prop of __getOwnPropSymbols$h(source)) {
5316
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
5221
5317
  target[prop] = source[prop];
5222
5318
  }
5223
5319
  return target;
@@ -5243,31 +5339,48 @@ var NgwMap = (function (exports) {
5243
5339
  step((generator = generator.apply(__this, __arguments)).next());
5244
5340
  });
5245
5341
  };
5246
- const URL$1 = "https://qms.nextgis.com";
5247
- function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
5342
+ const alias = {
5343
+ tms: "TILE",
5344
+ wms: "WMS"
5345
+ };
5346
+ function qmsLayerToOptions(layer) {
5347
+ if (layer.type === "tms") {
5348
+ return {
5349
+ url: layer.scheme === "tms" ? layer.url.replace("{y}", "{-y}") : layer.url,
5350
+ subdomains: layer.subdomains,
5351
+ maxZoom: layer.maxZoom,
5352
+ minZoom: layer.minZoom,
5353
+ name: layer.name,
5354
+ attribution: layer.attribution
5355
+ };
5356
+ }
5357
+ return {
5358
+ url: layer.url,
5359
+ layers: layer.layers,
5360
+ format: layer.format,
5361
+ version: layer.version,
5362
+ params: layer.params,
5363
+ name: layer.name,
5364
+ attribution: layer.attribution
5365
+ };
5366
+ }
5367
+ function createQmsAdapter(webMapOrOptions, createOpt = {}) {
5248
5368
  let webMap;
5249
5369
  if ("webMap" in webMapOrOptions) {
5250
- const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$3(_a, ["webMap", "url"]);
5370
+ const _a = webMapOrOptions, { webMap: webMap_ } = _a, adapterOptions = __objRest$3(_a, ["webMap"]);
5251
5371
  webMap = webMap_;
5252
- if (url_) {
5253
- url = url_;
5254
- }
5255
- if (adapterOptions) {
5256
- createOpt = adapterOptions;
5257
- }
5372
+ createOpt = adapterOptions;
5258
5373
  } else {
5259
5374
  webMap = webMapOrOptions;
5260
5375
  }
5261
- if (!url) {
5262
- url = URL$1;
5263
- }
5376
+ const client = new QmsClient();
5264
5377
  class QmsAdapter {
5265
5378
  constructor(map, options) {
5266
5379
  __publicField$f(this, "qms");
5267
5380
  __publicField$f(this, "options");
5268
5381
  __publicField$f(this, "map");
5269
5382
  this.map = map;
5270
- const opt = __spreadValues$h(__spreadValues$h({}, createOpt), options);
5383
+ const opt = __spreadValues$g(__spreadValues$g({}, createOpt), options);
5271
5384
  this.options = opt;
5272
5385
  this.options.baselayer = true;
5273
5386
  if (opt.qms) {
@@ -5276,42 +5389,38 @@ var NgwMap = (function (exports) {
5276
5389
  }
5277
5390
  addLayer(options) {
5278
5391
  return __async$h(this, null, function* () {
5279
- if (!this.qms && options.qmsId) {
5280
- try {
5281
- this.qms = yield loadJson(
5282
- url + "/api/v1/geoservices/" + options.qmsId
5283
- );
5284
- } catch (er) {
5285
- console.error(er);
5286
- }
5392
+ var _a2, _b, _c;
5393
+ const signal = (_a2 = options.signal) != null ? _a2 : this.options.signal;
5394
+ const qmsId = (_c = options.qmsId) != null ? _c : (_b = this.qms) == null ? void 0 : _b.id;
5395
+ if (qmsId === void 0) {
5396
+ return;
5287
5397
  }
5288
- const qms = this.qms;
5289
- if (qms) {
5290
- const type = alias[qms.type || "tms"];
5398
+ try {
5399
+ const layer = yield client.getLayer(qmsId, { signal });
5400
+ this.qms = layer.service;
5401
+ const type = alias[layer.type];
5291
5402
  const WebMapAdapter = webMap.mapAdapter.layerAdapters[type];
5292
5403
  if (WebMapAdapter) {
5293
5404
  mixinProperties(QmsAdapter, WebMapAdapter, [
5294
5405
  "showLayer",
5295
5406
  "hideLayer"
5296
5407
  ]);
5297
- if (type === "TILE") {
5298
- options = __spreadValues$h(__spreadValues$h({
5299
- order: 0,
5300
- maxZoom: webMap.options.maxZoom,
5301
- minZoom: webMap.options.minZoom
5302
- }, this.options), updateQmsOptions(qms));
5303
- if (qms.origin_url) {
5304
- const [url2, subdomains] = getSubdomainsOriginUrl(qms.origin_url);
5305
- if (subdomains.length) {
5306
- options.subdomains = subdomains;
5307
- options.url = url2;
5308
- }
5309
- }
5310
- this.options = options;
5311
- const adapter = new WebMapAdapter(this.map, options);
5312
- return adapter.addLayer(options);
5313
- }
5408
+ options = __spreadProps$b(__spreadValues$g(__spreadValues$g(__spreadValues$g({}, type === "TILE" ? {
5409
+ order: 0,
5410
+ maxZoom: webMap.options.maxZoom,
5411
+ minZoom: webMap.options.minZoom
5412
+ } : {}), this.options), qmsLayerToOptions(layer)), {
5413
+ signal
5414
+ });
5415
+ this.options = options;
5416
+ const adapter = new WebMapAdapter(this.map, options);
5417
+ return adapter.addLayer(options);
5418
+ }
5419
+ } catch (er) {
5420
+ if (signal == null ? void 0 : signal.aborted) {
5421
+ throw er;
5314
5422
  }
5423
+ console.error(er);
5315
5424
  }
5316
5425
  });
5317
5426
  }
@@ -5320,31 +5429,9 @@ var NgwMap = (function (exports) {
5320
5429
  }
5321
5430
 
5322
5431
  var __defProp$o = Object.defineProperty;
5323
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
5324
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
5325
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
5326
5432
  var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5327
- var __spreadValues$g = (a, b) => {
5328
- for (var prop in b || (b = {}))
5329
- if (__hasOwnProp$h.call(b, prop))
5330
- __defNormalProp$o(a, prop, b[prop]);
5331
- if (__getOwnPropSymbols$h)
5332
- for (var prop of __getOwnPropSymbols$h(b)) {
5333
- if (__propIsEnum$h.call(b, prop))
5334
- __defNormalProp$o(a, prop, b[prop]);
5335
- }
5336
- return a;
5337
- };
5338
- var __publicField$e = (obj, key, value) => __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
5433
+ var __publicField$e = (obj, key, value) => __defNormalProp$o(obj, key + "" , value);
5339
5434
  class QmsKit {
5340
- constructor(options) {
5341
- __publicField$e(this, "options", {
5342
- url: "https://qms.nextgis.com"
5343
- });
5344
- __publicField$e(this, "url");
5345
- this.options = __spreadValues$g(__spreadValues$g({}, this.options), options);
5346
- this.url = this.options.url;
5347
- }
5348
5435
  getLayerAdapters() {
5349
5436
  return Promise.resolve([
5350
5437
  {
@@ -5354,7 +5441,7 @@ var NgwMap = (function (exports) {
5354
5441
  ]);
5355
5442
  }
5356
5443
  _createAdapter(webMap) {
5357
- return createQmsAdapter({ webMap, url: this.url });
5444
+ return createQmsAdapter({ webMap });
5358
5445
  }
5359
5446
  }
5360
5447
  __publicField$e(QmsKit, "utils", {
@@ -5414,7 +5501,7 @@ var NgwMap = (function (exports) {
5414
5501
  if (qms) {
5415
5502
  const qms_ = JSON.parse(qms);
5416
5503
  const adapter = Promise.resolve(
5417
- QmsKit.utils.createQmsAdapter(webMap, void 0, {
5504
+ QmsKit.utils.createQmsAdapter(webMap, {
5418
5505
  qms: qms_,
5419
5506
  baselayer: true
5420
5507
  })
@@ -9533,7 +9620,8 @@ var NgwMap = (function (exports) {
9533
9620
  maxZoom: tileJson.maxzoom,
9534
9621
  minZoom: tileJson.minzoom,
9535
9622
  subdomains: tileJson.scheme,
9536
- attribution: tileJson.attribution
9623
+ attribution: tileJson.attribution,
9624
+ request: tileJson.request
9537
9625
  });
9538
9626
  }
9539
9627
  /**