@nextgis/ngw-leaflet 3.0.0-alpha.16 → 3.0.0-alpha.18

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-leaflet; version: 3.0.0-alpha.16; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.17; author: NextGIS */
2
2
  var domain;
3
3
 
4
4
  // This constructor is used to store event handlers. Instantiating this is
@@ -15029,15 +15029,15 @@ function createFeaturePositionOptions(features) {
15029
15029
  };
15030
15030
  }
15031
15031
 
15032
- var __defProp$12 = Object.defineProperty;
15033
- var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15034
- var __publicField$I = (obj, key, value) => __defNormalProp$12(obj, typeof key !== "symbol" ? key + "" : key, value);
15032
+ var __defProp$13 = Object.defineProperty;
15033
+ var __defNormalProp$13 = (obj, key, value) => key in obj ? __defProp$13(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15034
+ var __publicField$J = (obj, key, value) => __defNormalProp$13(obj, typeof key !== "symbol" ? key + "" : key, value);
15035
15035
  class BaseAdapter {
15036
15036
  constructor(map, options) {
15037
15037
  this.map = map;
15038
15038
  this.options = options;
15039
- __publicField$I(this, "layer");
15040
- __publicField$I(this, "pane", "order-0");
15039
+ __publicField$J(this, "layer");
15040
+ __publicField$J(this, "pane", "order-0");
15041
15041
  if (options.order !== void 0) {
15042
15042
  const pane = "order-" + options.order;
15043
15043
  let exist = map.getPane(pane);
@@ -15066,19 +15066,19 @@ function convertMapClickEvent(evt) {
15066
15066
  };
15067
15067
  }
15068
15068
 
15069
- var __defProp$11 = Object.defineProperty;
15070
- var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
15071
- var __hasOwnProp$I = Object.prototype.hasOwnProperty;
15072
- var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
15073
- var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15074
- var __spreadValues$H = (a, b) => {
15069
+ var __defProp$12 = Object.defineProperty;
15070
+ var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
15071
+ var __hasOwnProp$J = Object.prototype.hasOwnProperty;
15072
+ var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
15073
+ var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15074
+ var __spreadValues$I = (a, b) => {
15075
15075
  for (var prop in b || (b = {}))
15076
- if (__hasOwnProp$I.call(b, prop))
15077
- __defNormalProp$11(a, prop, b[prop]);
15078
- if (__getOwnPropSymbols$I)
15079
- for (var prop of __getOwnPropSymbols$I(b)) {
15080
- if (__propIsEnum$I.call(b, prop))
15081
- __defNormalProp$11(a, prop, b[prop]);
15076
+ if (__hasOwnProp$J.call(b, prop))
15077
+ __defNormalProp$12(a, prop, b[prop]);
15078
+ if (__getOwnPropSymbols$J)
15079
+ for (var prop of __getOwnPropSymbols$J(b)) {
15080
+ if (__propIsEnum$J.call(b, prop))
15081
+ __defNormalProp$12(a, prop, b[prop]);
15082
15082
  }
15083
15083
  return a;
15084
15084
  };
@@ -15088,7 +15088,7 @@ function createMouseEvent({
15088
15088
  }) {
15089
15089
  const layer_ = source.target;
15090
15090
  const feature = layer_.feature;
15091
- const opt = __spreadValues$H({
15091
+ const opt = __spreadValues$I({
15092
15092
  layer,
15093
15093
  feature,
15094
15094
  event: convertMapClickEvent(source),
@@ -15097,30 +15097,30 @@ function createMouseEvent({
15097
15097
  return opt;
15098
15098
  }
15099
15099
 
15100
- var __defProp$10 = Object.defineProperty;
15101
- var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
15102
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
15103
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
15104
- var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15105
- var __spreadValues$G = (a, b) => {
15100
+ var __defProp$11 = Object.defineProperty;
15101
+ var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
15102
+ var __hasOwnProp$I = Object.prototype.hasOwnProperty;
15103
+ var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
15104
+ var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15105
+ var __spreadValues$H = (a, b) => {
15106
15106
  for (var prop in b || (b = {}))
15107
- if (__hasOwnProp$H.call(b, prop))
15108
- __defNormalProp$10(a, prop, b[prop]);
15109
- if (__getOwnPropSymbols$H)
15110
- for (var prop of __getOwnPropSymbols$H(b)) {
15111
- if (__propIsEnum$H.call(b, prop))
15112
- __defNormalProp$10(a, prop, b[prop]);
15107
+ if (__hasOwnProp$I.call(b, prop))
15108
+ __defNormalProp$11(a, prop, b[prop]);
15109
+ if (__getOwnPropSymbols$I)
15110
+ for (var prop of __getOwnPropSymbols$I(b)) {
15111
+ if (__propIsEnum$I.call(b, prop))
15112
+ __defNormalProp$11(a, prop, b[prop]);
15113
15113
  }
15114
15114
  return a;
15115
15115
  };
15116
- var __publicField$H = (obj, key, value) => __defNormalProp$10(obj, typeof key !== "symbol" ? key + "" : key, value);
15116
+ var __publicField$I = (obj, key, value) => __defNormalProp$11(obj, typeof key !== "symbol" ? key + "" : key, value);
15117
15117
  class GeoJsonEvents {
15118
15118
  constructor(layer) {
15119
- __publicField$H(this, "layer");
15120
- __publicField$H(this, "_onclick");
15121
- __publicField$H(this, "_ondblclick");
15122
- __publicField$H(this, "_mouseout");
15123
- __publicField$H(this, "_mouseover");
15119
+ __publicField$I(this, "layer");
15120
+ __publicField$I(this, "_onclick");
15121
+ __publicField$I(this, "_ondblclick");
15122
+ __publicField$I(this, "_mouseout");
15123
+ __publicField$I(this, "_mouseover");
15124
15124
  this.layer = layer;
15125
15125
  }
15126
15126
  handleMouseEvents(layer) {
@@ -15129,7 +15129,7 @@ class GeoJsonEvents {
15129
15129
  if (onClick_) {
15130
15130
  this._onclick = (e) => {
15131
15131
  const selected = !!this.layer._getSelected(layer);
15132
- onClick_(__spreadValues$G({
15132
+ onClick_(__spreadValues$H({
15133
15133
  selected
15134
15134
  }, this._createMouseEvent(e)));
15135
15135
  };
@@ -15139,7 +15139,7 @@ class GeoJsonEvents {
15139
15139
  this._ondblclick = (e) => {
15140
15140
  leafletSrcExports.DomEvent.stopPropagation(e);
15141
15141
  const selected = !!this.layer._getSelected(layer);
15142
- onDoubleClick(__spreadValues$G({
15142
+ onDoubleClick(__spreadValues$H({
15143
15143
  selected
15144
15144
  }, this._createMouseEvent(e)));
15145
15145
  };
@@ -15798,19 +15798,19 @@ const typeExpressions = {
15798
15798
  typeof: evaluateArgs(([arg]) => typeOfValue(arg))
15799
15799
  };
15800
15800
 
15801
- var __defProp$$ = Object.defineProperty;
15802
- var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
15803
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
15804
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
15805
- var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15806
- var __spreadValues$F = (a, b) => {
15801
+ var __defProp$10 = Object.defineProperty;
15802
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
15803
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
15804
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
15805
+ var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15806
+ var __spreadValues$G = (a, b) => {
15807
15807
  for (var prop in b || (b = {}))
15808
- if (__hasOwnProp$G.call(b, prop))
15809
- __defNormalProp$$(a, prop, b[prop]);
15810
- if (__getOwnPropSymbols$G)
15811
- for (var prop of __getOwnPropSymbols$G(b)) {
15812
- if (__propIsEnum$G.call(b, prop))
15813
- __defNormalProp$$(a, prop, b[prop]);
15808
+ if (__hasOwnProp$H.call(b, prop))
15809
+ __defNormalProp$10(a, prop, b[prop]);
15810
+ if (__getOwnPropSymbols$H)
15811
+ for (var prop of __getOwnPropSymbols$H(b)) {
15812
+ if (__propIsEnum$H.call(b, prop))
15813
+ __defNormalProp$10(a, prop, b[prop]);
15814
15814
  }
15815
15815
  return a;
15816
15816
  };
@@ -15822,7 +15822,7 @@ function isExpression(value) {
15822
15822
  }
15823
15823
  return false;
15824
15824
  }
15825
- const expressions = __spreadValues$F(__spreadValues$F(__spreadValues$F(__spreadValues$F(__spreadValues$F(__spreadValues$F({}, mathExpressions), typeExpressions), stringExpressions), lookupExpressions), decisionExpressions), interpolationExpressions);
15825
+ const expressions = __spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G({}, mathExpressions), typeExpressions), stringExpressions), lookupExpressions), decisionExpressions), interpolationExpressions);
15826
15826
  function evaluate(expression, data = {}) {
15827
15827
  const [name, ...args] = expression;
15828
15828
  const expressionFun = expressions[name];
@@ -15835,19 +15835,19 @@ function evaluate(expression, data = {}) {
15835
15835
  throw new Error(`Expression "${name}" is not supported.`);
15836
15836
  }
15837
15837
 
15838
- var __defProp$_ = Object.defineProperty;
15839
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
15840
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
15841
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
15842
- var __defNormalProp$_ = (obj, key, value) => key in obj ? __defProp$_(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15843
- var __spreadValues$E = (a, b) => {
15838
+ var __defProp$$ = Object.defineProperty;
15839
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
15840
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
15841
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
15842
+ var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15843
+ var __spreadValues$F = (a, b) => {
15844
15844
  for (var prop in b || (b = {}))
15845
- if (__hasOwnProp$F.call(b, prop))
15846
- __defNormalProp$_(a, prop, b[prop]);
15847
- if (__getOwnPropSymbols$F)
15848
- for (var prop of __getOwnPropSymbols$F(b)) {
15849
- if (__propIsEnum$F.call(b, prop))
15850
- __defNormalProp$_(a, prop, b[prop]);
15845
+ if (__hasOwnProp$G.call(b, prop))
15846
+ __defNormalProp$$(a, prop, b[prop]);
15847
+ if (__getOwnPropSymbols$G)
15848
+ for (var prop of __getOwnPropSymbols$G(b)) {
15849
+ if (__propIsEnum$G.call(b, prop))
15850
+ __defNormalProp$$(a, prop, b[prop]);
15851
15851
  }
15852
15852
  return a;
15853
15853
  };
@@ -15880,25 +15880,25 @@ function createExpressionCallback(paint) {
15880
15880
  for (const p in expressions) {
15881
15881
  fromCb[p] = expressions[p](feature);
15882
15882
  }
15883
- return __spreadValues$E(__spreadValues$E({}, paint), fromCb);
15883
+ return __spreadValues$F(__spreadValues$F({}, paint), fromCb);
15884
15884
  };
15885
15885
  }
15886
15886
  return;
15887
15887
  }
15888
15888
 
15889
- var __defProp$Z = Object.defineProperty;
15890
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
15891
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
15892
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
15893
- var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15894
- var __spreadValues$D = (a, b) => {
15889
+ var __defProp$_ = Object.defineProperty;
15890
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
15891
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
15892
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
15893
+ var __defNormalProp$_ = (obj, key, value) => key in obj ? __defProp$_(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15894
+ var __spreadValues$E = (a, b) => {
15895
15895
  for (var prop in b || (b = {}))
15896
- if (__hasOwnProp$E.call(b, prop))
15897
- __defNormalProp$Z(a, prop, b[prop]);
15898
- if (__getOwnPropSymbols$E)
15899
- for (var prop of __getOwnPropSymbols$E(b)) {
15900
- if (__propIsEnum$E.call(b, prop))
15901
- __defNormalProp$Z(a, prop, b[prop]);
15896
+ if (__hasOwnProp$F.call(b, prop))
15897
+ __defNormalProp$_(a, prop, b[prop]);
15898
+ if (__getOwnPropSymbols$F)
15899
+ for (var prop of __getOwnPropSymbols$F(b)) {
15900
+ if (__propIsEnum$F.call(b, prop))
15901
+ __defNormalProp$_(a, prop, b[prop]);
15902
15902
  }
15903
15903
  return a;
15904
15904
  };
@@ -15945,7 +15945,7 @@ function isPropertyFilter(filter) {
15945
15945
  return false;
15946
15946
  }
15947
15947
  function featureFilter(feature, filters) {
15948
- const properties = __spreadValues$D({}, feature.properties);
15948
+ const properties = __spreadValues$E({}, feature.properties);
15949
15949
  if (properties) {
15950
15950
  properties.$id = feature.id;
15951
15951
  return propertiesFilter(properties, filters);
@@ -15999,19 +15999,19 @@ function isPaintCallback(paint) {
15999
15999
  return false;
16000
16000
  }
16001
16001
 
16002
- var __defProp$Y = Object.defineProperty;
16003
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16004
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16005
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16006
- var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16007
- var __spreadValues$C = (a, b) => {
16002
+ var __defProp$Z = Object.defineProperty;
16003
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
16004
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
16005
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
16006
+ var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16007
+ var __spreadValues$D = (a, b) => {
16008
16008
  for (var prop in b || (b = {}))
16009
- if (__hasOwnProp$D.call(b, prop))
16010
- __defNormalProp$Y(a, prop, b[prop]);
16011
- if (__getOwnPropSymbols$D)
16012
- for (var prop of __getOwnPropSymbols$D(b)) {
16013
- if (__propIsEnum$D.call(b, prop))
16014
- __defNormalProp$Y(a, prop, b[prop]);
16009
+ if (__hasOwnProp$E.call(b, prop))
16010
+ __defNormalProp$Z(a, prop, b[prop]);
16011
+ if (__getOwnPropSymbols$E)
16012
+ for (var prop of __getOwnPropSymbols$E(b)) {
16013
+ if (__propIsEnum$E.call(b, prop))
16014
+ __defNormalProp$Z(a, prop, b[prop]);
16015
16015
  }
16016
16016
  return a;
16017
16017
  };
@@ -16040,7 +16040,7 @@ function createPropertiesPaint(propertiesPaint) {
16040
16040
  return (feature) => {
16041
16041
  const paint = paintsFilters.find((x) => featureFilter(feature, x[0]));
16042
16042
  if (paint) {
16043
- return __spreadValues$C(__spreadValues$C({}, mask), paint[1]);
16043
+ return __spreadValues$D(__spreadValues$D({}, mask), paint[1]);
16044
16044
  }
16045
16045
  return mask;
16046
16046
  };
@@ -16064,8 +16064,8 @@ function expressionCallback({
16064
16064
  }
16065
16065
  function finalizePaint({ paint, defaultPaint }) {
16066
16066
  var _a;
16067
- let newPaint = __spreadValues$C({}, defaultPaint);
16068
- newPaint = __spreadValues$C(__spreadValues$C({}, newPaint), paint);
16067
+ let newPaint = __spreadValues$D({}, defaultPaint);
16068
+ newPaint = __spreadValues$D(__spreadValues$D({}, newPaint), paint);
16069
16069
  newPaint.fill = (_a = newPaint.fill) != null ? _a : true;
16070
16070
  newPaint.stroke = newPaint.stroke !== void 0 ? newPaint.stroke : !newPaint.fill || !!(newPaint.strokeColor || newPaint.strokeOpacity);
16071
16071
  return newPaint;
@@ -16078,7 +16078,7 @@ function preparePaint({
16078
16078
  if (!paint) {
16079
16079
  throw new Error("paint is empty");
16080
16080
  }
16081
- let newPaint = __spreadValues$C({}, defaultPaint);
16081
+ let newPaint = __spreadValues$D({}, defaultPaint);
16082
16082
  if (isPaintCallback(paint)) {
16083
16083
  const getPaintFunction = (feature) => {
16084
16084
  const getPaint = preparePaint({
@@ -16135,41 +16135,41 @@ function preparePaint({
16135
16135
  return newPaint;
16136
16136
  }
16137
16137
 
16138
- var __defProp$X = Object.defineProperty;
16139
- var __defProps$p = Object.defineProperties;
16140
- var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
16141
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16142
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16143
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16144
- var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16145
- var __spreadValues$B = (a, b) => {
16138
+ var __defProp$Y = Object.defineProperty;
16139
+ var __defProps$q = Object.defineProperties;
16140
+ var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
16141
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16142
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16143
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16144
+ var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16145
+ var __spreadValues$C = (a, b) => {
16146
16146
  for (var prop in b || (b = {}))
16147
- if (__hasOwnProp$C.call(b, prop))
16148
- __defNormalProp$X(a, prop, b[prop]);
16149
- if (__getOwnPropSymbols$C)
16150
- for (var prop of __getOwnPropSymbols$C(b)) {
16151
- if (__propIsEnum$C.call(b, prop))
16152
- __defNormalProp$X(a, prop, b[prop]);
16147
+ if (__hasOwnProp$D.call(b, prop))
16148
+ __defNormalProp$Y(a, prop, b[prop]);
16149
+ if (__getOwnPropSymbols$D)
16150
+ for (var prop of __getOwnPropSymbols$D(b)) {
16151
+ if (__propIsEnum$D.call(b, prop))
16152
+ __defNormalProp$Y(a, prop, b[prop]);
16153
16153
  }
16154
16154
  return a;
16155
16155
  };
16156
- var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
16156
+ var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
16157
16157
  var __objRest$8 = (source, exclude) => {
16158
16158
  var target = {};
16159
16159
  for (var prop in source)
16160
- if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
16160
+ if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
16161
16161
  target[prop] = source[prop];
16162
- if (source != null && __getOwnPropSymbols$C)
16163
- for (var prop of __getOwnPropSymbols$C(source)) {
16164
- if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
16162
+ if (source != null && __getOwnPropSymbols$D)
16163
+ for (var prop of __getOwnPropSymbols$D(source)) {
16164
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
16165
16165
  target[prop] = source[prop];
16166
16166
  }
16167
16167
  return target;
16168
16168
  };
16169
- var __publicField$G = (obj, key, value) => __defNormalProp$X(obj, key + "" , value);
16169
+ var __publicField$H = (obj, key, value) => __defNormalProp$Y(obj, key + "" , value);
16170
16170
  class GeoJsonPaint {
16171
16171
  constructor(layer) {
16172
- __publicField$G(this, "layer");
16172
+ __publicField$H(this, "layer");
16173
16173
  this.layer = layer;
16174
16174
  }
16175
16175
  setPaintEachLayer(paint) {
@@ -16248,7 +16248,7 @@ class GeoJsonPaint {
16248
16248
  if (html) {
16249
16249
  element.innerHTML = html;
16250
16250
  }
16251
- const divIcon = new leafletSrcExports.DivIcon(__spreadProps$p(__spreadValues$B({
16251
+ const divIcon = new leafletSrcExports.DivIcon(__spreadProps$q(__spreadValues$C({
16252
16252
  className: ""
16253
16253
  }, toLIconOpt), {
16254
16254
  html: element
@@ -16274,7 +16274,7 @@ class GeoJsonPaint {
16274
16274
  }
16275
16275
  return (_, latlng) => {
16276
16276
  const p = PAINT;
16277
- return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$B(__spreadValues$B({}, p), icon)));
16277
+ return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$C(__spreadValues$C({}, p), icon)));
16278
16278
  };
16279
16279
  }
16280
16280
  createPaintOptions(paint) {
@@ -16296,27 +16296,27 @@ class GeoJsonPaint {
16296
16296
  }
16297
16297
  }
16298
16298
 
16299
- var __defProp$W = Object.defineProperty;
16300
- var __defProps$o = Object.defineProperties;
16301
- var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
16302
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
16303
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
16304
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
16305
- var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16306
- var __spreadValues$A = (a, b) => {
16299
+ var __defProp$X = Object.defineProperty;
16300
+ var __defProps$p = Object.defineProperties;
16301
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
16302
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16303
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16304
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16305
+ var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16306
+ var __spreadValues$B = (a, b) => {
16307
16307
  for (var prop in b || (b = {}))
16308
- if (__hasOwnProp$B.call(b, prop))
16309
- __defNormalProp$W(a, prop, b[prop]);
16310
- if (__getOwnPropSymbols$B)
16311
- for (var prop of __getOwnPropSymbols$B(b)) {
16312
- if (__propIsEnum$B.call(b, prop))
16313
- __defNormalProp$W(a, prop, b[prop]);
16308
+ if (__hasOwnProp$C.call(b, prop))
16309
+ __defNormalProp$X(a, prop, b[prop]);
16310
+ if (__getOwnPropSymbols$C)
16311
+ for (var prop of __getOwnPropSymbols$C(b)) {
16312
+ if (__propIsEnum$C.call(b, prop))
16313
+ __defNormalProp$X(a, prop, b[prop]);
16314
16314
  }
16315
16315
  return a;
16316
16316
  };
16317
- var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
16318
- var __publicField$F = (obj, key, value) => __defNormalProp$W(obj, typeof key !== "symbol" ? key + "" : key, value);
16319
- var __async$v = (__this, __arguments, generator) => {
16317
+ var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
16318
+ var __publicField$G = (obj, key, value) => __defNormalProp$X(obj, typeof key !== "symbol" ? key + "" : key, value);
16319
+ var __async$w = (__this, __arguments, generator) => {
16320
16320
  return new Promise((resolve, reject) => {
16321
16321
  var fulfilled = (value) => {
16322
16322
  try {
@@ -16339,22 +16339,22 @@ var __async$v = (__this, __arguments, generator) => {
16339
16339
  class GeoJsonAdapter extends BaseAdapter {
16340
16340
  constructor(map, options) {
16341
16341
  super(map, options);
16342
- __publicField$F(this, "layer");
16343
- __publicField$F(this, "selected", false);
16344
- __publicField$F(this, "type");
16345
- __publicField$F(this, "_layers", []);
16346
- __publicField$F(this, "_events");
16347
- __publicField$F(this, "paint");
16348
- __publicField$F(this, "selectedPaint");
16349
- __publicField$F(this, "_selectedLayers", []);
16350
- __publicField$F(this, "_filteredLayers", []);
16351
- __publicField$F(this, "_filterFun");
16352
- __publicField$F(this, "_openedPopup", []);
16353
- __publicField$F(this, "_paint");
16354
- __publicField$F(this, "$updateTooltip", debounce(() => {
16342
+ __publicField$G(this, "layer");
16343
+ __publicField$G(this, "selected", false);
16344
+ __publicField$G(this, "type");
16345
+ __publicField$G(this, "_layers", []);
16346
+ __publicField$G(this, "_events");
16347
+ __publicField$G(this, "paint");
16348
+ __publicField$G(this, "selectedPaint");
16349
+ __publicField$G(this, "_selectedLayers", []);
16350
+ __publicField$G(this, "_filteredLayers", []);
16351
+ __publicField$G(this, "_filterFun");
16352
+ __publicField$G(this, "_openedPopup", []);
16353
+ __publicField$G(this, "_paint");
16354
+ __publicField$G(this, "$updateTooltip", debounce(() => {
16355
16355
  this.updateTooltip();
16356
16356
  }, 300));
16357
- __publicField$F(this, "$unselect", () => {
16357
+ __publicField$G(this, "$unselect", () => {
16358
16358
  this.unselect();
16359
16359
  });
16360
16360
  this._events = new GeoJsonEvents(this);
@@ -16363,7 +16363,7 @@ class GeoJsonAdapter extends BaseAdapter {
16363
16363
  addLayer(options) {
16364
16364
  Object.assign(this.options, options);
16365
16365
  this.paint = options.paint;
16366
- this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$o(__spreadValues$A({}, options.nativeOptions), {
16366
+ this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$p(__spreadValues$B({}, options.nativeOptions), {
16367
16367
  pane: this.pane
16368
16368
  }));
16369
16369
  this.selectedPaint = options.selectedPaint;
@@ -16412,7 +16412,7 @@ class GeoJsonAdapter extends BaseAdapter {
16412
16412
  }
16413
16413
  getSelected() {
16414
16414
  return this._selectedLayers.map((x) => {
16415
- return __spreadValues$A({
16415
+ return __spreadValues$B({
16416
16416
  target: this,
16417
16417
  feature: x.feature,
16418
16418
  layer: x
@@ -16431,14 +16431,14 @@ class GeoJsonAdapter extends BaseAdapter {
16431
16431
  const filteredLayers = [];
16432
16432
  this._layers.forEach(({ feature, layer }) => {
16433
16433
  if (layer) {
16434
- const ok = fun ? fun(__spreadValues$A({
16434
+ const ok = fun ? fun(__spreadValues$B({
16435
16435
  target: this,
16436
16436
  feature,
16437
16437
  layer
16438
16438
  }, createFeaturePositionOptions(feature))) : true;
16439
16439
  if (ok) {
16440
16440
  layer_.addLayer(layer);
16441
- filteredLayers.push(__spreadValues$A({
16441
+ filteredLayers.push(__spreadValues$B({
16442
16442
  target: this,
16443
16443
  feature,
16444
16444
  layer
@@ -16459,7 +16459,7 @@ class GeoJsonAdapter extends BaseAdapter {
16459
16459
  getLayers() {
16460
16460
  return this._layers.map(({ layer, feature }) => {
16461
16461
  const visible = layer && !!layer._map;
16462
- return __spreadValues$A({
16462
+ return __spreadValues$B({
16463
16463
  feature,
16464
16464
  layer,
16465
16465
  visible,
@@ -16577,13 +16577,13 @@ class GeoJsonAdapter extends BaseAdapter {
16577
16577
  }
16578
16578
  }
16579
16579
  updatePaint(paint) {
16580
- this.paint = __spreadValues$A(__spreadValues$A({}, this.paint), paint);
16580
+ this.paint = __spreadValues$B(__spreadValues$B({}, this.paint), paint);
16581
16581
  for (const l of this._layers) {
16582
16582
  this._paint.setPaint(l, this.paint);
16583
16583
  }
16584
16584
  }
16585
16585
  updateSelectedPaint(paint) {
16586
- this.selectedPaint = __spreadValues$A(__spreadValues$A({}, this.selectedPaint), paint);
16586
+ this.selectedPaint = __spreadValues$B(__spreadValues$B({}, this.selectedPaint), paint);
16587
16587
  for (const l of this._selectedLayers) {
16588
16588
  this._paint.setPaint(l, this.selectedPaint);
16589
16589
  }
@@ -16600,7 +16600,7 @@ class GeoJsonAdapter extends BaseAdapter {
16600
16600
  if (feature.properties && labelField) {
16601
16601
  message = feature.properties[labelField];
16602
16602
  } else if (label) {
16603
- message = label(__spreadValues$A(__spreadValues$A({
16603
+ message = label(__spreadValues$B(__spreadValues$B({
16604
16604
  target: this
16605
16605
  }, layerDef), createFeaturePositionOptions(feature)));
16606
16606
  }
@@ -16611,7 +16611,7 @@ class GeoJsonAdapter extends BaseAdapter {
16611
16611
  }
16612
16612
  }
16613
16613
  _openPopup(_0) {
16614
- return __async$v(this, arguments, function* (def, options = {}, type, latLng) {
16614
+ return __async$w(this, arguments, function* (def, options = {}, type, latLng) {
16615
16615
  var _a, _b;
16616
16616
  const { feature, layer } = def;
16617
16617
  const {
@@ -16619,7 +16619,7 @@ class GeoJsonAdapter extends BaseAdapter {
16619
16619
  autoPan,
16620
16620
  maxWidth,
16621
16621
  closeButton: closeButton_
16622
- } = __spreadValues$A({
16622
+ } = __spreadValues$B({
16623
16623
  minWidth: 300
16624
16624
  }, options);
16625
16625
  const closeButton = closeButton_ != null ? closeButton_ : !this.options.selectOnHover;
@@ -16635,7 +16635,7 @@ class GeoJsonAdapter extends BaseAdapter {
16635
16635
  };
16636
16636
  let content;
16637
16637
  if (options.createPopupContent) {
16638
- content = yield options.createPopupContent(__spreadValues$A({
16638
+ content = yield options.createPopupContent(__spreadValues$B({
16639
16639
  layer,
16640
16640
  feature,
16641
16641
  target: this,
@@ -16713,9 +16713,9 @@ class GeoJsonAdapter extends BaseAdapter {
16713
16713
  lopt = {
16714
16714
  style: (feature) => {
16715
16715
  if (feature) {
16716
- return this._paint.preparePaint(__spreadValues$A(__spreadValues$A({}, PAINT), paint(feature)));
16716
+ return this._paint.preparePaint(__spreadValues$B(__spreadValues$B({}, PAINT), paint(feature)));
16717
16717
  } else {
16718
- return this._paint.preparePaint(__spreadProps$o(__spreadValues$A({}, PAINT), { type: "path" }));
16718
+ return this._paint.preparePaint(__spreadProps$p(__spreadValues$B({}, PAINT), { type: "path" }));
16719
16719
  }
16720
16720
  }
16721
16721
  };
@@ -16731,7 +16731,7 @@ class GeoJsonAdapter extends BaseAdapter {
16731
16731
  _onEachFeature(feature, layer) {
16732
16732
  const layer_ = this.layer;
16733
16733
  if (layer_) {
16734
- const def = __spreadValues$A({
16734
+ const def = __spreadValues$B({
16735
16735
  target: this,
16736
16736
  feature,
16737
16737
  layer
@@ -16766,7 +16766,7 @@ class GeoJsonAdapter extends BaseAdapter {
16766
16766
  setTimeout(() => {
16767
16767
  if (popup) {
16768
16768
  this._openPopup(
16769
- __spreadValues$A({
16769
+ __spreadValues$B({
16770
16770
  target: this,
16771
16771
  layer,
16772
16772
  feature
@@ -16784,7 +16784,7 @@ class GeoJsonAdapter extends BaseAdapter {
16784
16784
  leafletSrcExports.DomEvent.stopPropagation(e);
16785
16785
  const layer = e.target;
16786
16786
  const feature = layer.feature;
16787
- const def = __spreadValues$A({
16787
+ const def = __spreadValues$B({
16788
16788
  target: this,
16789
16789
  layer,
16790
16790
  feature
@@ -16817,7 +16817,7 @@ class GeoJsonAdapter extends BaseAdapter {
16817
16817
  }
16818
16818
  if (this.options.onSelect) {
16819
16819
  const features = def.feature ? [def.feature] : [];
16820
- this.options.onSelect(__spreadValues$A({
16820
+ this.options.onSelect(__spreadValues$B({
16821
16821
  type,
16822
16822
  layer: this,
16823
16823
  features
@@ -16909,20 +16909,20 @@ function callAjax({
16909
16909
  return [promise, abortFunc];
16910
16910
  }
16911
16911
 
16912
- var __defProp$V = Object.defineProperty;
16913
- var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16914
- var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, typeof key !== "symbol" ? key + "" : key, value);
16912
+ var __defProp$W = Object.defineProperty;
16913
+ var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16914
+ var __publicField$F = (obj, key, value) => __defNormalProp$W(obj, typeof key !== "symbol" ? key + "" : key, value);
16915
16915
  class Queue {
16916
16916
  /**
16917
16917
  * @param {PromiseQueueOptions} options - Configuration options for the queue.
16918
16918
  */
16919
16919
  constructor({ concurrency = 1, delay = 0 } = {}) {
16920
- __publicField$E(this, "queue", []);
16921
- __publicField$E(this, "concurrency");
16922
- __publicField$E(this, "activeCount", 0);
16923
- __publicField$E(this, "timeoutId");
16924
- __publicField$E(this, "delay");
16925
- __publicField$E(this, "toAbort", []);
16920
+ __publicField$F(this, "queue", []);
16921
+ __publicField$F(this, "concurrency");
16922
+ __publicField$F(this, "activeCount", 0);
16923
+ __publicField$F(this, "timeoutId");
16924
+ __publicField$F(this, "delay");
16925
+ __publicField$F(this, "toAbort", []);
16926
16926
  this.concurrency = concurrency;
16927
16927
  this.delay = delay;
16928
16928
  }
@@ -16998,13 +16998,13 @@ class Queue {
16998
16998
 
16999
16999
  const imageQueue = new Queue({ concurrency: 6, delay: 200 });
17000
17000
 
17001
- var __defProp$U = Object.defineProperty;
17002
- var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17003
- var __publicField$D = (obj, key, value) => __defNormalProp$U(obj, key + "" , value);
17001
+ var __defProp$V = Object.defineProperty;
17002
+ var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17003
+ var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, key + "" , value);
17004
17004
  class ImageOverlay extends leafletSrcExports.ImageOverlay {
17005
17005
  constructor(imageUrl, bounds, options) {
17006
17006
  super(imageUrl, bounds, options);
17007
- __publicField$D(this, "_aborter");
17007
+ __publicField$E(this, "_aborter");
17008
17008
  }
17009
17009
  cancelLoad() {
17010
17010
  if (this._aborter) {
@@ -17033,14 +17033,14 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
17033
17033
  }
17034
17034
  }
17035
17035
 
17036
- var __defProp$T = Object.defineProperty;
17037
- var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17038
- var __publicField$C = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
17036
+ var __defProp$U = Object.defineProperty;
17037
+ var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17038
+ var __publicField$D = (obj, key, value) => __defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
17039
17039
  class ImageLayer extends leafletSrcExports.Layer {
17040
17040
  constructor(url, options) {
17041
17041
  var _a;
17042
17042
  super(options);
17043
- __publicField$C(this, "defaultWmsParams", {
17043
+ __publicField$D(this, "defaultWmsParams", {
17044
17044
  service: "WMS",
17045
17045
  request: "GetMap",
17046
17046
  version: "1.1.1",
@@ -17049,7 +17049,7 @@ class ImageLayer extends leafletSrcExports.Layer {
17049
17049
  format: "image/jpeg",
17050
17050
  transparent: false
17051
17051
  });
17052
- __publicField$C(this, "options", {
17052
+ __publicField$D(this, "options", {
17053
17053
  crs: null,
17054
17054
  uppercase: false,
17055
17055
  attribution: "",
@@ -17063,11 +17063,11 @@ class ImageLayer extends leafletSrcExports.Layer {
17063
17063
  viewPortBuffer: 0,
17064
17064
  setViewDelay: 100
17065
17065
  });
17066
- __publicField$C(this, "wmsParams");
17067
- __publicField$C(this, "_url");
17068
- __publicField$C(this, "_currentUrl");
17069
- __publicField$C(this, "_currentOverlay");
17070
- __publicField$C(this, "_loadedOverlay");
17066
+ __publicField$D(this, "wmsParams");
17067
+ __publicField$D(this, "_url");
17068
+ __publicField$D(this, "_currentUrl");
17069
+ __publicField$D(this, "_currentOverlay");
17070
+ __publicField$D(this, "_loadedOverlay");
17071
17071
  this._url = url;
17072
17072
  const params = {};
17073
17073
  const opts = {};
@@ -17075,7 +17075,7 @@ class ImageLayer extends leafletSrcExports.Layer {
17075
17075
  for (opt in options) {
17076
17076
  if (opt in this.options) {
17077
17077
  opts[opt] = options[opt];
17078
- } else {
17078
+ } else if (!isObject$1(options[opt])) {
17079
17079
  params[opt] = options[opt];
17080
17080
  }
17081
17081
  }
@@ -17231,47 +17231,45 @@ class ImageLayer extends leafletSrcExports.Layer {
17231
17231
  }
17232
17232
  }
17233
17233
 
17234
- var __defProp$S = Object.defineProperty;
17235
- var __defProps$n = Object.defineProperties;
17236
- var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
17237
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
17238
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
17239
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
17240
- var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17241
- var __spreadValues$z = (a, b) => {
17234
+ var __defProp$T = Object.defineProperty;
17235
+ var __defProps$o = Object.defineProperties;
17236
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
17237
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
17238
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
17239
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
17240
+ var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17241
+ var __spreadValues$A = (a, b) => {
17242
17242
  for (var prop in b || (b = {}))
17243
- if (__hasOwnProp$A.call(b, prop))
17244
- __defNormalProp$S(a, prop, b[prop]);
17245
- if (__getOwnPropSymbols$A)
17246
- for (var prop of __getOwnPropSymbols$A(b)) {
17247
- if (__propIsEnum$A.call(b, prop))
17248
- __defNormalProp$S(a, prop, b[prop]);
17243
+ if (__hasOwnProp$B.call(b, prop))
17244
+ __defNormalProp$T(a, prop, b[prop]);
17245
+ if (__getOwnPropSymbols$B)
17246
+ for (var prop of __getOwnPropSymbols$B(b)) {
17247
+ if (__propIsEnum$B.call(b, prop))
17248
+ __defNormalProp$T(a, prop, b[prop]);
17249
17249
  }
17250
17250
  return a;
17251
17251
  };
17252
- var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
17253
- var __publicField$B = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
17252
+ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
17253
+ var __publicField$C = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
17254
17254
  class ImageAdapter extends BaseAdapter {
17255
17255
  constructor() {
17256
17256
  super(...arguments);
17257
- __publicField$B(this, "layer");
17257
+ __publicField$C(this, "layer");
17258
17258
  }
17259
17259
  addLayer(options) {
17260
17260
  var _a;
17261
17261
  const url = options && options.url;
17262
17262
  if (url) {
17263
17263
  const updateWmsParamsFromOpt = options.updateWmsParams;
17264
- this.layer = new ImageLayer(url, __spreadProps$n(__spreadValues$z(__spreadValues$z(__spreadValues$z({
17264
+ this.layer = new ImageLayer(url, __spreadValues$A(__spreadValues$A(__spreadValues$A({
17265
17265
  pane: this.pane,
17266
17266
  headers: options.headers,
17267
17267
  setViewDelay: options.setViewDelay
17268
- }, __spreadProps$n(__spreadValues$z({
17268
+ }, __spreadProps$o(__spreadValues$A({
17269
17269
  transparent: true
17270
17270
  }, options), {
17271
17271
  opacity: (_a = options.opacity) != null ? _a : void 0
17272
- })), options.params), options.nativeOptions), {
17273
- maxZoom: 12
17274
- }));
17272
+ })), options.params), options.nativeOptions));
17275
17273
  if (updateWmsParamsFromOpt) {
17276
17274
  const updateWmsParams = this.layer.updateWmsParams;
17277
17275
  this.layer.updateWmsParams = function(map) {
@@ -17290,7 +17288,7 @@ class ImageAdapter extends BaseAdapter {
17290
17288
  }
17291
17289
  }
17292
17290
  }
17293
- __publicField$B(ImageAdapter, "queue", imageQueue);
17291
+ __publicField$C(ImageAdapter, "queue", imageQueue);
17294
17292
 
17295
17293
  function makeRemote(Base) {
17296
17294
  return class RemoteTileLayer extends Base {
@@ -17352,33 +17350,33 @@ class TileLayerBase extends leafletSrcExports.TileLayer {
17352
17350
  }
17353
17351
  const TileLayer = makeRemote(TileLayerBase);
17354
17352
 
17355
- var __defProp$R = Object.defineProperty;
17356
- var __defProps$m = Object.defineProperties;
17357
- var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
17358
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
17359
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
17360
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
17361
- var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17362
- var __spreadValues$y = (a, b) => {
17363
- for (var prop in b || (b = {}))
17364
- if (__hasOwnProp$z.call(b, prop))
17365
- __defNormalProp$R(a, prop, b[prop]);
17366
- if (__getOwnPropSymbols$z)
17367
- for (var prop of __getOwnPropSymbols$z(b)) {
17368
- if (__propIsEnum$z.call(b, prop))
17369
- __defNormalProp$R(a, prop, b[prop]);
17353
+ var __defProp$S = Object.defineProperty;
17354
+ var __defProps$n = Object.defineProperties;
17355
+ var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
17356
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
17357
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
17358
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
17359
+ var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17360
+ var __spreadValues$z = (a, b) => {
17361
+ for (var prop in b || (b = {}))
17362
+ if (__hasOwnProp$A.call(b, prop))
17363
+ __defNormalProp$S(a, prop, b[prop]);
17364
+ if (__getOwnPropSymbols$A)
17365
+ for (var prop of __getOwnPropSymbols$A(b)) {
17366
+ if (__propIsEnum$A.call(b, prop))
17367
+ __defNormalProp$S(a, prop, b[prop]);
17370
17368
  }
17371
17369
  return a;
17372
17370
  };
17373
- var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
17371
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
17374
17372
  var __objRest$7 = (source, exclude) => {
17375
17373
  var target = {};
17376
17374
  for (var prop in source)
17377
- if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
17375
+ if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
17378
17376
  target[prop] = source[prop];
17379
- if (source != null && __getOwnPropSymbols$z)
17380
- for (var prop of __getOwnPropSymbols$z(source)) {
17381
- if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
17377
+ if (source != null && __getOwnPropSymbols$A)
17378
+ for (var prop of __getOwnPropSymbols$A(source)) {
17379
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
17382
17380
  target[prop] = source[prop];
17383
17381
  }
17384
17382
  return target;
@@ -17389,7 +17387,7 @@ class TileAdapter extends BaseAdapter {
17389
17387
  if (options) {
17390
17388
  const _a = options, { url } = _a, opt = __objRest$7(_a, ["url"]);
17391
17389
  if (url) {
17392
- const tileLayerOptions = __spreadValues$y({
17390
+ const tileLayerOptions = __spreadValues$z({
17393
17391
  pane: this.pane,
17394
17392
  attribution: opt.attribution,
17395
17393
  minZoom: opt.minZoom,
@@ -17400,7 +17398,7 @@ class TileAdapter extends BaseAdapter {
17400
17398
  }
17401
17399
  let layer;
17402
17400
  if (opt.headers || opt.withCredentials) {
17403
- layer = new TileLayer(url, __spreadProps$m(__spreadValues$y({}, tileLayerOptions), {
17401
+ layer = new TileLayer(url, __spreadProps$n(__spreadValues$z({}, tileLayerOptions), {
17404
17402
  headers: opt.headers,
17405
17403
  withCredentials: opt.withCredentials,
17406
17404
  setViewDelay: opt.setViewDelay
@@ -17423,29 +17421,29 @@ class TileAdapter extends BaseAdapter {
17423
17421
  }
17424
17422
  }
17425
17423
 
17426
- var __defProp$Q = Object.defineProperty;
17427
- var __defProps$l = Object.defineProperties;
17428
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
17429
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
17430
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
17431
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
17432
- var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17433
- var __spreadValues$x = (a, b) => {
17424
+ var __defProp$R = Object.defineProperty;
17425
+ var __defProps$m = Object.defineProperties;
17426
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
17427
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
17428
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
17429
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
17430
+ var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17431
+ var __spreadValues$y = (a, b) => {
17434
17432
  for (var prop in b || (b = {}))
17435
- if (__hasOwnProp$y.call(b, prop))
17436
- __defNormalProp$Q(a, prop, b[prop]);
17437
- if (__getOwnPropSymbols$y)
17438
- for (var prop of __getOwnPropSymbols$y(b)) {
17439
- if (__propIsEnum$y.call(b, prop))
17440
- __defNormalProp$Q(a, prop, b[prop]);
17433
+ if (__hasOwnProp$z.call(b, prop))
17434
+ __defNormalProp$R(a, prop, b[prop]);
17435
+ if (__getOwnPropSymbols$z)
17436
+ for (var prop of __getOwnPropSymbols$z(b)) {
17437
+ if (__propIsEnum$z.call(b, prop))
17438
+ __defNormalProp$R(a, prop, b[prop]);
17441
17439
  }
17442
17440
  return a;
17443
17441
  };
17444
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
17442
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
17445
17443
  class OsmAdapter extends TileAdapter {
17446
17444
  addLayer(options) {
17447
17445
  const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
17448
- return super.addLayer(__spreadProps$l(__spreadValues$x({
17446
+ return super.addLayer(__spreadProps$m(__spreadValues$y({
17449
17447
  name: "OpenStreetMap",
17450
17448
  attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
17451
17449
  }, options), {
@@ -17461,33 +17459,33 @@ class WmsLayerBase extends leafletSrcExports.TileLayer.WMS {
17461
17459
  }
17462
17460
  const WmsLayer = makeRemote(WmsLayerBase);
17463
17461
 
17464
- var __defProp$P = Object.defineProperty;
17465
- var __defProps$k = Object.defineProperties;
17466
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
17467
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
17468
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
17469
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
17470
- var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17471
- var __spreadValues$w = (a, b) => {
17462
+ var __defProp$Q = Object.defineProperty;
17463
+ var __defProps$l = Object.defineProperties;
17464
+ var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
17465
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
17466
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
17467
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
17468
+ var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17469
+ var __spreadValues$x = (a, b) => {
17472
17470
  for (var prop in b || (b = {}))
17473
- if (__hasOwnProp$x.call(b, prop))
17474
- __defNormalProp$P(a, prop, b[prop]);
17475
- if (__getOwnPropSymbols$x)
17476
- for (var prop of __getOwnPropSymbols$x(b)) {
17477
- if (__propIsEnum$x.call(b, prop))
17478
- __defNormalProp$P(a, prop, b[prop]);
17471
+ if (__hasOwnProp$y.call(b, prop))
17472
+ __defNormalProp$Q(a, prop, b[prop]);
17473
+ if (__getOwnPropSymbols$y)
17474
+ for (var prop of __getOwnPropSymbols$y(b)) {
17475
+ if (__propIsEnum$y.call(b, prop))
17476
+ __defNormalProp$Q(a, prop, b[prop]);
17479
17477
  }
17480
17478
  return a;
17481
17479
  };
17482
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
17480
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
17483
17481
  var __objRest$6 = (source, exclude) => {
17484
17482
  var target = {};
17485
17483
  for (var prop in source)
17486
- if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
17484
+ if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
17487
17485
  target[prop] = source[prop];
17488
- if (source != null && __getOwnPropSymbols$x)
17489
- for (var prop of __getOwnPropSymbols$x(source)) {
17490
- if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
17486
+ if (source != null && __getOwnPropSymbols$y)
17487
+ for (var prop of __getOwnPropSymbols$y(source)) {
17488
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
17491
17489
  target[prop] = source[prop];
17492
17490
  }
17493
17491
  return target;
@@ -17497,7 +17495,7 @@ class WmsAdapter extends BaseAdapter {
17497
17495
  Object.assign(this.options, options);
17498
17496
  const _a = options, { url } = _a, opt = __objRest$6(_a, ["url"]);
17499
17497
  if (url) {
17500
- const layerOptions = __spreadValues$w({
17498
+ const layerOptions = __spreadValues$x({
17501
17499
  pane: this.pane,
17502
17500
  attribution: opt.attribution,
17503
17501
  minZoom: opt.minZoom,
@@ -17508,7 +17506,7 @@ class WmsAdapter extends BaseAdapter {
17508
17506
  }, options.nativeOptions);
17509
17507
  let layer;
17510
17508
  if (opt.headers || opt.withCredentials) {
17511
- layer = new WmsLayer(url, __spreadProps$k(__spreadValues$w({}, layerOptions), {
17509
+ layer = new WmsLayer(url, __spreadProps$l(__spreadValues$x({}, layerOptions), {
17512
17510
  headers: opt.headers,
17513
17511
  withCredentials: opt.withCredentials
17514
17512
  }));
@@ -17528,33 +17526,33 @@ function arrayToBoundsExpression(bounds) {
17528
17526
  ];
17529
17527
  }
17530
17528
 
17531
- var __defProp$O = Object.defineProperty;
17532
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
17533
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
17534
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
17535
- var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17536
- var __spreadValues$v = (a, b) => {
17529
+ var __defProp$P = Object.defineProperty;
17530
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
17531
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
17532
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
17533
+ var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17534
+ var __spreadValues$w = (a, b) => {
17537
17535
  for (var prop in b || (b = {}))
17538
- if (__hasOwnProp$w.call(b, prop))
17539
- __defNormalProp$O(a, prop, b[prop]);
17540
- if (__getOwnPropSymbols$w)
17541
- for (var prop of __getOwnPropSymbols$w(b)) {
17542
- if (__propIsEnum$w.call(b, prop))
17543
- __defNormalProp$O(a, prop, b[prop]);
17536
+ if (__hasOwnProp$x.call(b, prop))
17537
+ __defNormalProp$P(a, prop, b[prop]);
17538
+ if (__getOwnPropSymbols$x)
17539
+ for (var prop of __getOwnPropSymbols$x(b)) {
17540
+ if (__propIsEnum$x.call(b, prop))
17541
+ __defNormalProp$P(a, prop, b[prop]);
17544
17542
  }
17545
17543
  return a;
17546
17544
  };
17547
- var __publicField$A = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
17545
+ var __publicField$B = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
17548
17546
  const _LeafletMapAdapter = class _LeafletMapAdapter {
17549
17547
  constructor() {
17550
- __publicField$A(this, "options", { target: "map" });
17551
- __publicField$A(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
17552
- __publicField$A(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
17553
- __publicField$A(this, "emitter", new EventEmitter());
17554
- __publicField$A(this, "map");
17555
- __publicField$A(this, "_resizeObserver");
17556
- __publicField$A(this, "_unselectCb", []);
17557
- __publicField$A(this, "_universalEvents", [
17548
+ __publicField$B(this, "options", { target: "map" });
17549
+ __publicField$B(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
17550
+ __publicField$B(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
17551
+ __publicField$B(this, "emitter", new EventEmitter());
17552
+ __publicField$B(this, "map");
17553
+ __publicField$B(this, "_resizeObserver");
17554
+ __publicField$B(this, "_unselectCb", []);
17555
+ __publicField$B(this, "_universalEvents", [
17558
17556
  "move",
17559
17557
  "zoom",
17560
17558
  "zoomend",
@@ -17562,14 +17560,14 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17562
17560
  "moveend",
17563
17561
  "movestart"
17564
17562
  ]);
17565
- __publicField$A(this, "_positionEvents", [
17563
+ __publicField$B(this, "_positionEvents", [
17566
17564
  "mousemove",
17567
17565
  "mouseout",
17568
17566
  "mouseover"
17569
17567
  ]);
17570
17568
  }
17571
17569
  create(options) {
17572
- this.options = __spreadValues$v({}, options);
17570
+ this.options = __spreadValues$w({}, options);
17573
17571
  if (this.options.target) {
17574
17572
  const {
17575
17573
  zoom,
@@ -17579,7 +17577,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17579
17577
  maxBounds: mb,
17580
17578
  mapAdapterOptions
17581
17579
  } = this.options;
17582
- this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$v({
17580
+ this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$w({
17583
17581
  attributionControl: false,
17584
17582
  zoomControl: false,
17585
17583
  maxBounds: mb ? arrayToBoundsExpression(mb) : void 0,
@@ -17862,7 +17860,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17862
17860
  }
17863
17861
  }
17864
17862
  };
17865
- __publicField$A(_LeafletMapAdapter, "layerAdapters", {
17863
+ __publicField$B(_LeafletMapAdapter, "layerAdapters", {
17866
17864
  GEOJSON: GeoJsonAdapter,
17867
17865
  IMAGE: ImageAdapter,
17868
17866
  TILE: TileAdapter,
@@ -17870,11 +17868,11 @@ __publicField$A(_LeafletMapAdapter, "layerAdapters", {
17870
17868
  // // MVT: MvtAdapter,
17871
17869
  OSM: OsmAdapter
17872
17870
  });
17873
- __publicField$A(_LeafletMapAdapter, "controlAdapters", {
17871
+ __publicField$B(_LeafletMapAdapter, "controlAdapters", {
17874
17872
  ZOOM: leafletSrcExports.Control.Zoom,
17875
17873
  ATTRIBUTION: AttributionControl
17876
17874
  });
17877
- __publicField$A(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
17875
+ __publicField$B(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
17878
17876
  let LeafletMapAdapter = _LeafletMapAdapter;
17879
17877
 
17880
17878
  const svgPath = {
@@ -17962,23 +17960,23 @@ function template(str, data) {
17962
17960
  });
17963
17961
  }
17964
17962
 
17965
- var __defProp$N = Object.defineProperty;
17966
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
17967
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
17968
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
17969
- var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17970
- var __spreadValues$u = (a, b) => {
17963
+ var __defProp$O = Object.defineProperty;
17964
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
17965
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
17966
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
17967
+ var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17968
+ var __spreadValues$v = (a, b) => {
17971
17969
  for (var prop in b || (b = {}))
17972
- if (__hasOwnProp$v.call(b, prop))
17973
- __defNormalProp$N(a, prop, b[prop]);
17974
- if (__getOwnPropSymbols$v)
17975
- for (var prop of __getOwnPropSymbols$v(b)) {
17976
- if (__propIsEnum$v.call(b, prop))
17977
- __defNormalProp$N(a, prop, b[prop]);
17970
+ if (__hasOwnProp$w.call(b, prop))
17971
+ __defNormalProp$O(a, prop, b[prop]);
17972
+ if (__getOwnPropSymbols$w)
17973
+ for (var prop of __getOwnPropSymbols$w(b)) {
17974
+ if (__propIsEnum$w.call(b, prop))
17975
+ __defNormalProp$O(a, prop, b[prop]);
17978
17976
  }
17979
17977
  return a;
17980
17978
  };
17981
- var __async$u = (__this, __arguments, generator) => {
17979
+ var __async$v = (__this, __arguments, generator) => {
17982
17980
  return new Promise((resolve, reject) => {
17983
17981
  var fulfilled = (value) => {
17984
17982
  try {
@@ -17999,7 +17997,7 @@ var __async$u = (__this, __arguments, generator) => {
17999
17997
  });
18000
17998
  };
18001
17999
  function apiRequest(opt) {
18002
- return __async$u(this, null, function* () {
18000
+ return __async$v(this, null, function* () {
18003
18001
  const { params, name, connector, requestOptions } = opt;
18004
18002
  const apiItems = yield connector.connect();
18005
18003
  let apiItem = apiItems && apiItems[name];
@@ -18037,7 +18035,7 @@ function apiRequest(opt) {
18037
18035
  }
18038
18036
  }
18039
18037
  if (url) {
18040
- return connector.makeQuery(url, params, __spreadValues$u({
18038
+ return connector.makeQuery(url, params, __spreadValues$v({
18041
18039
  cacheName: name
18042
18040
  }, requestOptions));
18043
18041
  } else {
@@ -18049,12 +18047,12 @@ function apiRequest(opt) {
18049
18047
  });
18050
18048
  }
18051
18049
 
18052
- var __defProp$M = Object.defineProperty;
18053
- var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18054
- var __publicField$z = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
18050
+ var __defProp$N = Object.defineProperty;
18051
+ var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18052
+ var __publicField$A = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
18055
18053
  const _Cache = class _Cache {
18056
18054
  constructor(options = {}) {
18057
- __publicField$z(this, "cache", []);
18055
+ __publicField$A(this, "cache", []);
18058
18056
  var _a;
18059
18057
  const namespace = (_a = options.namespace) != null ? _a : "default";
18060
18058
  if (_Cache.instance[namespace]) {
@@ -18185,12 +18183,12 @@ const _Cache = class _Cache {
18185
18183
  return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
18186
18184
  }
18187
18185
  };
18188
- __publicField$z(_Cache, "instance", {});
18186
+ __publicField$A(_Cache, "instance", {});
18189
18187
  let Cache = _Cache;
18190
18188
 
18191
18189
  var pkg = {
18192
18190
  name: "@nextgis/ngw-connector",
18193
- version: "3.0.0-alpha.16",
18191
+ version: "3.0.0-alpha.17",
18194
18192
  _priority: 12,
18195
18193
  description: "A lightweight HTTP client optimized for use with NextGIS Web API",
18196
18194
  main: "index.js",
@@ -18199,15 +18197,15 @@ var pkg = {
18199
18197
  jsdelivr: "lib/ngw-connector.global.prod.js",
18200
18198
  types: "lib/index.d.ts",
18201
18199
  dependencies: {
18202
- "@nextgis/cache": "^3.0.0-alpha.13",
18203
- "@nextgis/cancelable-promise": "^3.0.0-alpha.13",
18204
- "@nextgis/utils": "^3.0.0-alpha.13",
18200
+ "@nextgis/cache": "^3.0.0-alpha.17",
18201
+ "@nextgis/cancelable-promise": "^3.0.0-alpha.17",
18202
+ "@nextgis/utils": "^3.0.0-alpha.17",
18205
18203
  "@types/events": "^3.0.0",
18206
18204
  events: "*",
18207
18205
  "form-data": "^4.0.0"
18208
18206
  },
18209
18207
  devDependencies: {
18210
- "@nextgis/build-tools": "^3.0.0-alpha.13"
18208
+ "@nextgis/build-tools": "^3.0.0-alpha.17"
18211
18209
  },
18212
18210
  scripts: {
18213
18211
  clean: "rimraf ./lib",
@@ -18254,46 +18252,46 @@ class AbortError extends Error {
18254
18252
  }
18255
18253
  }
18256
18254
 
18257
- var __defProp$L = Object.defineProperty;
18258
- var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18259
- var __publicField$y = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
18255
+ var __defProp$M = Object.defineProperty;
18256
+ var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18257
+ var __publicField$z = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
18260
18258
  class NgwError extends Error {
18261
18259
  constructor(er) {
18262
18260
  super();
18263
- __publicField$y(this, "name", "NgwError");
18264
- __publicField$y(this, "title");
18265
- __publicField$y(this, "message");
18266
- __publicField$y(this, "detail");
18267
- __publicField$y(this, "exception");
18268
- __publicField$y(this, "status_code");
18269
- __publicField$y(this, "data");
18270
- __publicField$y(this, "guru_meditation");
18261
+ __publicField$z(this, "name", "NgwError");
18262
+ __publicField$z(this, "title");
18263
+ __publicField$z(this, "message");
18264
+ __publicField$z(this, "detail");
18265
+ __publicField$z(this, "exception");
18266
+ __publicField$z(this, "status_code");
18267
+ __publicField$z(this, "data");
18268
+ __publicField$z(this, "guru_meditation");
18271
18269
  Object.assign(this, er);
18272
18270
  Object.setPrototypeOf(this, NgwError.prototype);
18273
18271
  }
18274
18272
  }
18275
18273
 
18276
- var __defProp$K = Object.defineProperty;
18277
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18278
- var __publicField$x = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
18274
+ var __defProp$L = Object.defineProperty;
18275
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18276
+ var __publicField$y = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
18279
18277
  class InsufficientPermissionsError extends NgwError {
18280
18278
  constructor(obj) {
18281
18279
  super(obj);
18282
- __publicField$x(this, "name", "InsufficientPermissionsError");
18283
- __publicField$x(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
18280
+ __publicField$y(this, "name", "InsufficientPermissionsError");
18281
+ __publicField$y(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
18284
18282
  Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
18285
18283
  }
18286
18284
  }
18287
18285
 
18288
- var __defProp$J = Object.defineProperty;
18289
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18290
- var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
18286
+ var __defProp$K = Object.defineProperty;
18287
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18288
+ var __publicField$x = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
18291
18289
  let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
18292
18290
  constructor(obj) {
18293
18291
  super(obj);
18294
- __publicField$w(this, "message", "There is no response from the server or problem connecting to server.");
18295
- __publicField$w(this, "title", "Network error");
18296
- __publicField$w(this, "detail", "Check network connectivity and try again later.");
18292
+ __publicField$x(this, "message", "There is no response from the server or problem connecting to server.");
18293
+ __publicField$x(this, "title", "Network error");
18294
+ __publicField$x(this, "detail", "Check network connectivity and try again later.");
18297
18295
  Object.setPrototypeOf(this, NetworksResponseError.prototype);
18298
18296
  }
18299
18297
  };
@@ -18330,27 +18328,27 @@ function isError(error) {
18330
18328
  return false;
18331
18329
  }
18332
18330
 
18333
- var __defProp$I = Object.defineProperty;
18334
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18335
- var __publicField$v = (obj, key, value) => __defNormalProp$I(obj, key + "" , value);
18331
+ var __defProp$J = Object.defineProperty;
18332
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18333
+ var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, key + "" , value);
18336
18334
  class NetworkError extends Error {
18337
18335
  constructor(url) {
18338
18336
  super();
18339
- __publicField$v(this, "name", "NetworkError");
18337
+ __publicField$w(this, "name", "NetworkError");
18340
18338
  Object.setPrototypeOf(this, NetworkError.prototype);
18341
18339
  this.message = `Unable to request ${url}.
18342
18340
  Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
18343
18341
  }
18344
18342
  }
18345
18343
 
18346
- var __defProp$H = Object.defineProperty;
18347
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18348
- var __publicField$u = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
18344
+ var __defProp$I = Object.defineProperty;
18345
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18346
+ var __publicField$v = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
18349
18347
  class ResourceNotFoundError extends NgwError {
18350
18348
  constructor(obj) {
18351
18349
  super(obj);
18352
- __publicField$u(this, "name", "ResourceNotFoundError");
18353
- __publicField$u(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
18350
+ __publicField$v(this, "name", "ResourceNotFoundError");
18351
+ __publicField$v(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
18354
18352
  Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
18355
18353
  }
18356
18354
  }
@@ -18367,13 +18365,13 @@ var errors = /*#__PURE__*/Object.freeze({
18367
18365
  isError: isError
18368
18366
  });
18369
18367
 
18370
- var __defProp$G = Object.defineProperty;
18371
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18372
- var __publicField$t = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
18368
+ var __defProp$H = Object.defineProperty;
18369
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18370
+ var __publicField$u = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
18373
18371
  class BaseAPIError extends Error {
18374
18372
  constructor(message) {
18375
18373
  super(message || "Something went wrong.");
18376
- __publicField$t(this, "title");
18374
+ __publicField$u(this, "title");
18377
18375
  this.name = "BaseAPIError";
18378
18376
  this.title = "Unknown API error";
18379
18377
  if (Error.captureStackTrace) {
@@ -18385,7 +18383,7 @@ class NetworksResponseError extends BaseAPIError {
18385
18383
  // prettier-ignore
18386
18384
  constructor(message) {
18387
18385
  super(message || "There is no response from the server or problem connecting to server.");
18388
- __publicField$t(this, "detail");
18386
+ __publicField$u(this, "detail");
18389
18387
  this.title = "Network error";
18390
18388
  this.detail = "Check network connectivity and try again later.";
18391
18389
  }
@@ -18399,8 +18397,8 @@ class InvalidResponseError extends BaseAPIError {
18399
18397
  class ServerResponseError extends BaseAPIError {
18400
18398
  constructor(data) {
18401
18399
  super(data.message);
18402
- __publicField$t(this, "detail");
18403
- __publicField$t(this, "data");
18400
+ __publicField$u(this, "detail");
18401
+ __publicField$u(this, "data");
18404
18402
  this.title = data.title || this.title;
18405
18403
  this.detail = data.detail || null;
18406
18404
  this.data = data;
@@ -18410,8 +18408,8 @@ class LunkwillError extends Error {
18410
18408
  // prettier-ignore
18411
18409
  constructor(message, data = {}) {
18412
18410
  super(message || "Unexpected error while processing long-running request.");
18413
- __publicField$t(this, "title");
18414
- __publicField$t(this, "data");
18411
+ __publicField$u(this, "title");
18412
+ __publicField$u(this, "data");
18415
18413
  this.name = "LunkwillError";
18416
18414
  this.title = "Long-running request error";
18417
18415
  this.data = data;
@@ -18431,35 +18429,35 @@ class LunkwillRequestFailed extends LunkwillError {
18431
18429
  }
18432
18430
  }
18433
18431
 
18434
- var __defProp$F = Object.defineProperty;
18435
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
18436
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
18437
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
18438
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18439
- var __spreadValues$t = (a, b) => {
18432
+ var __defProp$G = Object.defineProperty;
18433
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
18434
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
18435
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
18436
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18437
+ var __spreadValues$u = (a, b) => {
18440
18438
  for (var prop in b || (b = {}))
18441
- if (__hasOwnProp$u.call(b, prop))
18442
- __defNormalProp$F(a, prop, b[prop]);
18443
- if (__getOwnPropSymbols$u)
18444
- for (var prop of __getOwnPropSymbols$u(b)) {
18445
- if (__propIsEnum$u.call(b, prop))
18446
- __defNormalProp$F(a, prop, b[prop]);
18439
+ if (__hasOwnProp$v.call(b, prop))
18440
+ __defNormalProp$G(a, prop, b[prop]);
18441
+ if (__getOwnPropSymbols$v)
18442
+ for (var prop of __getOwnPropSymbols$v(b)) {
18443
+ if (__propIsEnum$v.call(b, prop))
18444
+ __defNormalProp$G(a, prop, b[prop]);
18447
18445
  }
18448
18446
  return a;
18449
18447
  };
18450
18448
  var __objRest$5 = (source, exclude) => {
18451
18449
  var target = {};
18452
18450
  for (var prop in source)
18453
- if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
18451
+ if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
18454
18452
  target[prop] = source[prop];
18455
- if (source != null && __getOwnPropSymbols$u)
18456
- for (var prop of __getOwnPropSymbols$u(source)) {
18457
- if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
18453
+ if (source != null && __getOwnPropSymbols$v)
18454
+ for (var prop of __getOwnPropSymbols$v(source)) {
18455
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
18458
18456
  target[prop] = source[prop];
18459
18457
  }
18460
18458
  return target;
18461
18459
  };
18462
- var __async$t = (__this, __arguments, generator) => {
18460
+ var __async$u = (__this, __arguments, generator) => {
18463
18461
  return new Promise((resolve, reject) => {
18464
18462
  var fulfilled = (value) => {
18465
18463
  try {
@@ -18484,7 +18482,7 @@ function lunkwillCheckResponse(lwResp) {
18484
18482
  return ct !== void 0 && ct !== null && ct.includes("application/vnd.lunkwill.request-summary+json");
18485
18483
  }
18486
18484
  function responseJson(response) {
18487
- return __async$t(this, null, function* () {
18485
+ return __async$u(this, null, function* () {
18488
18486
  try {
18489
18487
  return response.json();
18490
18488
  } catch (e) {
@@ -18493,7 +18491,7 @@ function responseJson(response) {
18493
18491
  });
18494
18492
  }
18495
18493
  function lunkwillResponseUrl(lwResp) {
18496
- return __async$t(this, null, function* () {
18494
+ return __async$u(this, null, function* () {
18497
18495
  const lwData = yield responseJson(lwResp);
18498
18496
  let delay = lwData.delay_ms;
18499
18497
  const retry = lwData.retry_ms !== void 0 ? lwData.retry_ms : 2e3;
@@ -18537,7 +18535,7 @@ function lunkwillResponseUrl(lwResp) {
18537
18535
  });
18538
18536
  }
18539
18537
  function lunkwillFetch(lwRespUrl) {
18540
- return __async$t(this, null, function* () {
18538
+ return __async$u(this, null, function* () {
18541
18539
  try {
18542
18540
  return yield window.fetch(lwRespUrl, { credentials: "same-origin" });
18543
18541
  } catch (e) {
@@ -18585,14 +18583,14 @@ function generateUrl(path, query) {
18585
18583
  return path + urlParams;
18586
18584
  }
18587
18585
  function request(path, options, cacheEngine) {
18588
- return __async$t(this, null, function* () {
18586
+ return __async$u(this, null, function* () {
18589
18587
  var _b, _c;
18590
18588
  const defaults = {
18591
18589
  method: "GET",
18592
18590
  credentials: "same-origin",
18593
18591
  headers: {}
18594
18592
  };
18595
- const _a = __spreadValues$t(__spreadValues$t({}, defaults), options), {
18593
+ const _a = __spreadValues$u(__spreadValues$u({}, defaults), options), {
18596
18594
  withCredentials,
18597
18595
  responseType,
18598
18596
  cacheProps,
@@ -18629,7 +18627,7 @@ function request(path, options, cacheEngine) {
18629
18627
  opt.headers = headers;
18630
18628
  }
18631
18629
  const url = generateUrl(path, query);
18632
- const makeRequest = () => __async$t(this, null, function* () {
18630
+ const makeRequest = () => __async$u(this, null, function* () {
18633
18631
  let response;
18634
18632
  try {
18635
18633
  response = yield fetch(url, opt);
@@ -18672,7 +18670,7 @@ function request(path, options, cacheEngine) {
18672
18670
  if (cacheEngine) {
18673
18671
  if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
18674
18672
  if (cache !== false) {
18675
- const props = cacheProps ? cacheProps : __spreadValues$t({}, objectRemoveEmpty({
18673
+ const props = cacheProps ? cacheProps : __spreadValues$u({}, objectRemoveEmpty({
18676
18674
  withCredentials,
18677
18675
  responseType
18678
18676
  }));
@@ -18692,38 +18690,38 @@ function request(path, options, cacheEngine) {
18692
18690
  });
18693
18691
  }
18694
18692
 
18695
- var __defProp$E = Object.defineProperty;
18696
- var __defProps$j = Object.defineProperties;
18697
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
18698
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
18699
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
18700
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
18701
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18702
- var __spreadValues$s = (a, b) => {
18693
+ var __defProp$F = Object.defineProperty;
18694
+ var __defProps$k = Object.defineProperties;
18695
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
18696
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
18697
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
18698
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
18699
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18700
+ var __spreadValues$t = (a, b) => {
18703
18701
  for (var prop in b || (b = {}))
18704
- if (__hasOwnProp$t.call(b, prop))
18705
- __defNormalProp$E(a, prop, b[prop]);
18706
- if (__getOwnPropSymbols$t)
18707
- for (var prop of __getOwnPropSymbols$t(b)) {
18708
- if (__propIsEnum$t.call(b, prop))
18709
- __defNormalProp$E(a, prop, b[prop]);
18702
+ if (__hasOwnProp$u.call(b, prop))
18703
+ __defNormalProp$F(a, prop, b[prop]);
18704
+ if (__getOwnPropSymbols$u)
18705
+ for (var prop of __getOwnPropSymbols$u(b)) {
18706
+ if (__propIsEnum$u.call(b, prop))
18707
+ __defNormalProp$F(a, prop, b[prop]);
18710
18708
  }
18711
18709
  return a;
18712
18710
  };
18713
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
18711
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
18714
18712
  var __objRest$4 = (source, exclude) => {
18715
18713
  var target = {};
18716
18714
  for (var prop in source)
18717
- if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
18715
+ if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
18718
18716
  target[prop] = source[prop];
18719
- if (source != null && __getOwnPropSymbols$t)
18720
- for (var prop of __getOwnPropSymbols$t(source)) {
18721
- if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
18717
+ if (source != null && __getOwnPropSymbols$u)
18718
+ for (var prop of __getOwnPropSymbols$u(source)) {
18719
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
18722
18720
  target[prop] = source[prop];
18723
18721
  }
18724
18722
  return target;
18725
18723
  };
18726
- var __async$s = (__this, __arguments, generator) => {
18724
+ var __async$t = (__this, __arguments, generator) => {
18727
18725
  return new Promise((resolve, reject) => {
18728
18726
  var fulfilled = (value) => {
18729
18727
  try {
@@ -18774,7 +18772,7 @@ function routeURL(name, baseUrl, routeData, ...rest) {
18774
18772
  }
18775
18773
  function route(name, connector, ...rest) {
18776
18774
  const result = {
18777
- url: (opt) => __async$s(this, null, function* () {
18775
+ url: (opt) => __async$t(this, null, function* () {
18778
18776
  var _a;
18779
18777
  const routeData = yield connector.connect();
18780
18778
  const template = routeURL(
@@ -18802,10 +18800,10 @@ function route(name, connector, ...rest) {
18802
18800
  routeData,
18803
18801
  ...rest
18804
18802
  );
18805
- const headers = objectRemoveEmpty(__spreadValues$s(__spreadValues$s({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
18803
+ const headers = objectRemoveEmpty(__spreadValues$t(__spreadValues$t({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
18806
18804
  return request(
18807
18805
  template,
18808
- __spreadProps$j(__spreadValues$s({
18806
+ __spreadProps$k(__spreadValues$t({
18809
18807
  headers
18810
18808
  }, restOpt), {
18811
18809
  method
@@ -18929,39 +18927,39 @@ function removeConnector(connector) {
18929
18927
  }
18930
18928
  }
18931
18929
 
18932
- var __defProp$D = Object.defineProperty;
18933
- var __defProps$i = Object.defineProperties;
18934
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
18935
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
18936
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
18937
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
18938
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18939
- var __spreadValues$r = (a, b) => {
18930
+ var __defProp$E = Object.defineProperty;
18931
+ var __defProps$j = Object.defineProperties;
18932
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
18933
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
18934
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
18935
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
18936
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18937
+ var __spreadValues$s = (a, b) => {
18940
18938
  for (var prop in b || (b = {}))
18941
- if (__hasOwnProp$s.call(b, prop))
18942
- __defNormalProp$D(a, prop, b[prop]);
18943
- if (__getOwnPropSymbols$s)
18944
- for (var prop of __getOwnPropSymbols$s(b)) {
18945
- if (__propIsEnum$s.call(b, prop))
18946
- __defNormalProp$D(a, prop, b[prop]);
18939
+ if (__hasOwnProp$t.call(b, prop))
18940
+ __defNormalProp$E(a, prop, b[prop]);
18941
+ if (__getOwnPropSymbols$t)
18942
+ for (var prop of __getOwnPropSymbols$t(b)) {
18943
+ if (__propIsEnum$t.call(b, prop))
18944
+ __defNormalProp$E(a, prop, b[prop]);
18947
18945
  }
18948
18946
  return a;
18949
18947
  };
18950
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
18948
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
18951
18949
  var __objRest$3 = (source, exclude) => {
18952
18950
  var target = {};
18953
18951
  for (var prop in source)
18954
- if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
18952
+ if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
18955
18953
  target[prop] = source[prop];
18956
- if (source != null && __getOwnPropSymbols$s)
18957
- for (var prop of __getOwnPropSymbols$s(source)) {
18958
- if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
18954
+ if (source != null && __getOwnPropSymbols$t)
18955
+ for (var prop of __getOwnPropSymbols$t(source)) {
18956
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
18959
18957
  target[prop] = source[prop];
18960
18958
  }
18961
18959
  return target;
18962
18960
  };
18963
- var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
18964
- var __async$r = (__this, __arguments, generator) => {
18961
+ var __publicField$t = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
18962
+ var __async$s = (__this, __arguments, generator) => {
18965
18963
  return new Promise((resolve, reject) => {
18966
18964
  var fulfilled = (value) => {
18967
18965
  try {
@@ -18986,18 +18984,18 @@ let REQUEST_ID = 0;
18986
18984
  class NgwConnector {
18987
18985
  constructor(options) {
18988
18986
  this.options = options;
18989
- __publicField$s(this, "id", ID$2++);
18990
- __publicField$s(this, "emitter", new EventEmitter());
18991
- __publicField$s(this, "user");
18992
- __publicField$s(this, "cache");
18993
- __publicField$s(this, "withCredentials");
18987
+ __publicField$t(this, "id", ID$2++);
18988
+ __publicField$t(this, "emitter", new EventEmitter());
18989
+ __publicField$t(this, "user");
18990
+ __publicField$t(this, "cache");
18991
+ __publicField$t(this, "withCredentials");
18994
18992
  // Dedicated cache for route requests, as these are executed before any other requests.
18995
18993
  // This cache does not need to be cleared during the session.
18996
- __publicField$s(this, "routeCache");
18997
- __publicField$s(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18998
- __publicField$s(this, "routeStr", "/api/component/pyramid/route");
18999
- __publicField$s(this, "activeRequests", {});
19000
- __publicField$s(this, "requestTransform");
18994
+ __publicField$t(this, "routeCache");
18995
+ __publicField$t(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18996
+ __publicField$t(this, "routeStr", "/api/component/pyramid/route");
18997
+ __publicField$t(this, "activeRequests", {});
18998
+ __publicField$t(this, "requestTransform");
19001
18999
  const exist = findConnector(options);
19002
19000
  this.cache = new Cache({ namespace: options.cacheId });
19003
19001
  this.routeCache = new Cache({ namespace: "routecache" });
@@ -19050,7 +19048,7 @@ class NgwConnector {
19050
19048
  * ```
19051
19049
  */
19052
19050
  connect() {
19053
- return __async$r(this, arguments, function* ({
19051
+ return __async$s(this, arguments, function* ({
19054
19052
  signal
19055
19053
  } = {}) {
19056
19054
  const auth = this.options.auth;
@@ -19089,14 +19087,14 @@ class NgwConnector {
19089
19087
  this.emitter.emit("logout");
19090
19088
  }
19091
19089
  getUserInfo(credentials, options) {
19092
- return __async$r(this, null, function* () {
19090
+ return __async$s(this, null, function* () {
19093
19091
  if (this.user && this.user.id) {
19094
19092
  return this.user;
19095
19093
  }
19096
19094
  if (credentials) {
19097
19095
  this.options.auth = credentials;
19098
19096
  }
19099
- const options_ = __spreadValues$r({
19097
+ const options_ = __spreadValues$s({
19100
19098
  headers: this.getAuthorizationHeaders(credentials),
19101
19099
  cache: true
19102
19100
  }, options);
@@ -19137,7 +19135,7 @@ class NgwConnector {
19137
19135
  this.activeRequests = {};
19138
19136
  }
19139
19137
  getActiveApiRequests() {
19140
- return __spreadValues$r({}, this.activeRequests);
19138
+ return __spreadValues$s({}, this.activeRequests);
19141
19139
  }
19142
19140
  route(name, ...rest) {
19143
19141
  return route(name, this, ...rest);
@@ -19149,7 +19147,7 @@ class NgwConnector {
19149
19147
  * @param options - Request options
19150
19148
  */
19151
19149
  makeQuery(_0, _1) {
19152
- return __async$r(this, arguments, function* (url, params, options = {}) {
19150
+ return __async$s(this, arguments, function* (url, params, options = {}) {
19153
19151
  var _b;
19154
19152
  url = (this.options.baseUrl ? this.options.baseUrl : "") + url;
19155
19153
  if (!url) {
@@ -19160,7 +19158,7 @@ class NgwConnector {
19160
19158
  url = template(url, restParams);
19161
19159
  }
19162
19160
  url = encodeURI(fixUrlStr(url));
19163
- options = __spreadValues$r({ withCredentials: this.withCredentials }, options);
19161
+ options = __spreadValues$s({ withCredentials: this.withCredentials }, options);
19164
19162
  const {
19165
19163
  cache,
19166
19164
  signal: externalSignal,
@@ -19182,7 +19180,7 @@ class NgwConnector {
19182
19180
  });
19183
19181
  }
19184
19182
  options.signal = internalSignal;
19185
- const createPromise = () => __async$r(this, null, function* () {
19183
+ const createPromise = () => __async$s(this, null, function* () {
19186
19184
  const id = REQUEST_ID++;
19187
19185
  this.activeRequests[id] = internalAbortController;
19188
19186
  try {
@@ -19192,7 +19190,7 @@ class NgwConnector {
19192
19190
  }
19193
19191
  });
19194
19192
  if (method === "GET" && cache !== false) {
19195
- const cacheOptions = cacheProps ? cacheProps : __spreadProps$i(__spreadValues$r({}, objectRemoveEmpty({
19193
+ const cacheOptions = cacheProps ? cacheProps : __spreadProps$j(__spreadValues$s({}, objectRemoveEmpty({
19196
19194
  headers,
19197
19195
  withCredentials,
19198
19196
  responseType,
@@ -19215,7 +19213,7 @@ class NgwConnector {
19215
19213
  var _a;
19216
19214
  if (this.user) {
19217
19215
  options = options || {};
19218
- options.headers = __spreadValues$r(__spreadValues$r({}, this.getAuthorizationHeaders()), options.headers);
19216
+ options.headers = __spreadValues$s(__spreadValues$s({}, this.getAuthorizationHeaders()), options.headers);
19219
19217
  }
19220
19218
  if (this.requestTransform) {
19221
19219
  const [transUrl, transOptions] = this.requestTransform(url, options);
@@ -19246,7 +19244,7 @@ class NgwConnector {
19246
19244
  });
19247
19245
  }
19248
19246
  _login(credentials, options) {
19249
- return __async$r(this, null, function* () {
19247
+ return __async$s(this, null, function* () {
19250
19248
  try {
19251
19249
  const data = yield this.getUserInfo(credentials, options);
19252
19250
  this.user = data;
@@ -19274,7 +19272,7 @@ class NgwConnector {
19274
19272
  return er;
19275
19273
  }
19276
19274
  }
19277
- __publicField$s(NgwConnector, "errors", errors);
19275
+ __publicField$t(NgwConnector, "errors", errors);
19278
19276
 
19279
19277
  function resourceCompare(res1, res2) {
19280
19278
  return objectDeepEqual(res1, res2);
@@ -19304,27 +19302,27 @@ function resourceToQuery(resource, prefix = "") {
19304
19302
  return query;
19305
19303
  }
19306
19304
 
19307
- var __defProp$C = Object.defineProperty;
19308
- var __defProps$h = Object.defineProperties;
19309
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
19310
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
19311
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
19312
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
19313
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19314
- var __spreadValues$q = (a, b) => {
19305
+ var __defProp$D = Object.defineProperty;
19306
+ var __defProps$i = Object.defineProperties;
19307
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
19308
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
19309
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
19310
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
19311
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19312
+ var __spreadValues$r = (a, b) => {
19315
19313
  for (var prop in b || (b = {}))
19316
- if (__hasOwnProp$r.call(b, prop))
19317
- __defNormalProp$C(a, prop, b[prop]);
19318
- if (__getOwnPropSymbols$r)
19319
- for (var prop of __getOwnPropSymbols$r(b)) {
19320
- if (__propIsEnum$r.call(b, prop))
19321
- __defNormalProp$C(a, prop, b[prop]);
19314
+ if (__hasOwnProp$s.call(b, prop))
19315
+ __defNormalProp$D(a, prop, b[prop]);
19316
+ if (__getOwnPropSymbols$s)
19317
+ for (var prop of __getOwnPropSymbols$s(b)) {
19318
+ if (__propIsEnum$s.call(b, prop))
19319
+ __defNormalProp$D(a, prop, b[prop]);
19322
19320
  }
19323
19321
  return a;
19324
19322
  };
19325
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
19326
- var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
19327
- var __async$q = (__this, __arguments, generator) => {
19323
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
19324
+ var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
19325
+ var __async$r = (__this, __arguments, generator) => {
19328
19326
  return new Promise((resolve, reject) => {
19329
19327
  var fulfilled = (value) => {
19330
19328
  try {
@@ -19349,8 +19347,8 @@ class ResourcesControl {
19349
19347
  connector,
19350
19348
  cacheId
19351
19349
  }) {
19352
- __publicField$r(this, "cache");
19353
- __publicField$r(this, "connector");
19350
+ __publicField$s(this, "cache");
19351
+ __publicField$s(this, "connector");
19354
19352
  this.connector = connector;
19355
19353
  this.cache = new Cache({ namespace: cacheId });
19356
19354
  }
@@ -19365,7 +19363,7 @@ class ResourcesControl {
19365
19363
  * Fetching resource would be cached to speed up next call
19366
19364
  */
19367
19365
  getOne(resource, requestOptions) {
19368
- const opt = __spreadValues$q({}, requestOptions);
19366
+ const opt = __spreadValues$r({}, requestOptions);
19369
19367
  if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
19370
19368
  if (resource.id !== void 0) {
19371
19369
  resource.id;
@@ -19442,8 +19440,8 @@ class ResourcesControl {
19442
19440
  } else {
19443
19441
  Object.assign(query, resourceToQuery(resource));
19444
19442
  }
19445
- return this.connector.route("resource.search").get(__spreadProps$h(__spreadValues$q({}, requestOptions), {
19446
- query: __spreadValues$q({
19443
+ return this.connector.route("resource.search").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
19444
+ query: __spreadValues$r({
19447
19445
  serialization: "full"
19448
19446
  }, query)
19449
19447
  })).then((resources) => {
@@ -19496,7 +19494,7 @@ class ResourcesControl {
19496
19494
  });
19497
19495
  }
19498
19496
  _getChildrenOf(_0, _1) {
19499
- return __async$q(this, arguments, function* (parentDef, requestOptions, _items = []) {
19497
+ return __async$r(this, arguments, function* (parentDef, requestOptions, _items = []) {
19500
19498
  let parent = void 0;
19501
19499
  if (typeof parentDef === "string") {
19502
19500
  parent = yield this.getId(parentDef, requestOptions);
@@ -19505,7 +19503,7 @@ class ResourcesControl {
19505
19503
  } else {
19506
19504
  parent = parentDef;
19507
19505
  }
19508
- const items = yield this.connector.route("resource.collection").get(__spreadProps$h(__spreadValues$q({}, requestOptions), {
19506
+ const items = yield this.connector.route("resource.collection").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
19509
19507
  query: {
19510
19508
  parent
19511
19509
  }
@@ -19533,7 +19531,7 @@ class ResourcesControl {
19533
19531
  });
19534
19532
  }
19535
19533
  _cleanResourceItemCache(id) {
19536
- return __async$q(this, null, function* () {
19534
+ return __async$r(this, null, function* () {
19537
19535
  var _a;
19538
19536
  const all = this.cache.all();
19539
19537
  const toDelete = [];
@@ -19586,13 +19584,13 @@ class ResourcesControl {
19586
19584
  }
19587
19585
  }
19588
19586
 
19589
- var __defProp$B = Object.defineProperty;
19590
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19591
- var __publicField$q = (obj, key, value) => __defNormalProp$B(obj, key + "" , value);
19587
+ var __defProp$C = Object.defineProperty;
19588
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19589
+ var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, key + "" , value);
19592
19590
  class NgwConnectorExtended extends NgwConnector {
19593
19591
  constructor(options) {
19594
19592
  super(options);
19595
- __publicField$q(this, "resources");
19593
+ __publicField$r(this, "resources");
19596
19594
  this.resources = new ResourcesControl({
19597
19595
  connector: this,
19598
19596
  cacheId: options.cacheId
@@ -19802,25 +19800,25 @@ class NgwConnectorExtended extends NgwConnector {
19802
19800
  }
19803
19801
  }
19804
19802
 
19805
- var __defProp$A = Object.defineProperty;
19806
- var __defProps$g = Object.defineProperties;
19807
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
19808
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
19809
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
19810
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
19811
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19812
- var __spreadValues$p = (a, b) => {
19803
+ var __defProp$B = Object.defineProperty;
19804
+ var __defProps$h = Object.defineProperties;
19805
+ var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
19806
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
19807
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
19808
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
19809
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19810
+ var __spreadValues$q = (a, b) => {
19813
19811
  for (var prop in b || (b = {}))
19814
- if (__hasOwnProp$q.call(b, prop))
19815
- __defNormalProp$A(a, prop, b[prop]);
19816
- if (__getOwnPropSymbols$q)
19817
- for (var prop of __getOwnPropSymbols$q(b)) {
19818
- if (__propIsEnum$q.call(b, prop))
19819
- __defNormalProp$A(a, prop, b[prop]);
19812
+ if (__hasOwnProp$r.call(b, prop))
19813
+ __defNormalProp$B(a, prop, b[prop]);
19814
+ if (__getOwnPropSymbols$r)
19815
+ for (var prop of __getOwnPropSymbols$r(b)) {
19816
+ if (__propIsEnum$r.call(b, prop))
19817
+ __defNormalProp$B(a, prop, b[prop]);
19820
19818
  }
19821
19819
  return a;
19822
19820
  };
19823
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
19821
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
19824
19822
  function getNgwWebmapExtent(webmap) {
19825
19823
  const bottom = webmap["extent_bottom"];
19826
19824
  const left = webmap["extent_left"];
@@ -19862,7 +19860,7 @@ function fetchNgwLayerItemExtent({
19862
19860
  id: Number(resourceId),
19863
19861
  fid: featureId
19864
19862
  }).get({ cache, signal }).then((resp) => {
19865
- if (resp) {
19863
+ if (resp && resp.extent) {
19866
19864
  const { maxLat, maxLon, minLat, minLon } = resp.extent;
19867
19865
  const extentArray = [minLon, minLat, maxLon, maxLat];
19868
19866
  return extentArray;
@@ -19887,14 +19885,14 @@ function fetchNgwResourceExtent(item, connector, options) {
19887
19885
  if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
19888
19886
  return connector.getResource(resource.parent.id, options).then((res) => {
19889
19887
  if (res) {
19890
- return fetchNgwLayerExtent(__spreadProps$g(__spreadValues$p({}, options), {
19888
+ return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
19891
19889
  resourceId: res.resource.id,
19892
19890
  connector
19893
19891
  }));
19894
19892
  }
19895
19893
  });
19896
19894
  } else {
19897
- return fetchNgwLayerExtent(__spreadProps$g(__spreadValues$p({}, options), {
19895
+ return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
19898
19896
  resourceId: resource.id,
19899
19897
  connector
19900
19898
  }));
@@ -19902,10 +19900,10 @@ function fetchNgwResourceExtent(item, connector, options) {
19902
19900
  }
19903
19901
  }
19904
19902
 
19905
- var __defProp$z = Object.defineProperty;
19906
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19907
- var __publicField$p = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
19908
- var __async$p = (__this, __arguments, generator) => {
19903
+ var __defProp$A = Object.defineProperty;
19904
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19905
+ var __publicField$q = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
19906
+ var __async$q = (__this, __arguments, generator) => {
19909
19907
  return new Promise((resolve, reject) => {
19910
19908
  var fulfilled = (value) => {
19911
19909
  try {
@@ -19927,18 +19925,18 @@ var __async$p = (__this, __arguments, generator) => {
19927
19925
  };
19928
19926
  class NgwResource {
19929
19927
  constructor() {
19930
- __publicField$p(this, "item");
19931
- __publicField$p(this, "connector");
19932
- __publicField$p(this, "_extent");
19928
+ __publicField$q(this, "item");
19929
+ __publicField$q(this, "connector");
19930
+ __publicField$q(this, "_extent");
19933
19931
  }
19934
19932
  /** @deprecated use {@link NgwResource.getBounds} instead */
19935
19933
  getExtent() {
19936
- return __async$p(this, null, function* () {
19934
+ return __async$q(this, null, function* () {
19937
19935
  return this.getBounds();
19938
19936
  });
19939
19937
  }
19940
19938
  getBounds(options) {
19941
- return __async$p(this, null, function* () {
19939
+ return __async$q(this, null, function* () {
19942
19940
  if (this._extent) {
19943
19941
  return this._extent;
19944
19942
  }
@@ -19954,7 +19952,7 @@ class NgwResource {
19954
19952
  }
19955
19953
  }
19956
19954
 
19957
- var __async$o = (__this, __arguments, generator) => {
19955
+ var __async$p = (__this, __arguments, generator) => {
19958
19956
  return new Promise((resolve, reject) => {
19959
19957
  var fulfilled = (value) => {
19960
19958
  try {
@@ -19975,7 +19973,7 @@ var __async$o = (__this, __arguments, generator) => {
19975
19973
  });
19976
19974
  };
19977
19975
  function resourceIdFromLayerOptions(options, connector) {
19978
- return __async$o(this, null, function* () {
19976
+ return __async$p(this, null, function* () {
19979
19977
  const resource = options.resource;
19980
19978
  const item = resource;
19981
19979
  let { keyname, resourceId } = options;
@@ -20000,24 +19998,24 @@ function resourceIdFromLayerOptions(options, connector) {
20000
19998
  });
20001
19999
  }
20002
20000
 
20003
- var __defProp$y = Object.defineProperty;
20004
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
20005
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
20006
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
20007
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20008
- var __spreadValues$o = (a, b) => {
20001
+ var __defProp$z = Object.defineProperty;
20002
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
20003
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
20004
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
20005
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20006
+ var __spreadValues$p = (a, b) => {
20009
20007
  for (var prop in b || (b = {}))
20010
- if (__hasOwnProp$p.call(b, prop))
20011
- __defNormalProp$y(a, prop, b[prop]);
20012
- if (__getOwnPropSymbols$p)
20013
- for (var prop of __getOwnPropSymbols$p(b)) {
20014
- if (__propIsEnum$p.call(b, prop))
20015
- __defNormalProp$y(a, prop, b[prop]);
20008
+ if (__hasOwnProp$q.call(b, prop))
20009
+ __defNormalProp$z(a, prop, b[prop]);
20010
+ if (__getOwnPropSymbols$q)
20011
+ for (var prop of __getOwnPropSymbols$q(b)) {
20012
+ if (__propIsEnum$q.call(b, prop))
20013
+ __defNormalProp$z(a, prop, b[prop]);
20016
20014
  }
20017
20015
  return a;
20018
20016
  };
20019
- var __publicField$o = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
20020
- var __async$n = (__this, __arguments, generator) => {
20017
+ var __publicField$p = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
20018
+ var __async$o = (__this, __arguments, generator) => {
20021
20019
  return new Promise((resolve, reject) => {
20022
20020
  var fulfilled = (value) => {
20023
20021
  try {
@@ -20038,7 +20036,7 @@ var __async$n = (__this, __arguments, generator) => {
20038
20036
  });
20039
20037
  };
20040
20038
  function createOnFirstShowAdapter(_0) {
20041
- return __async$n(this, arguments, function* ({
20039
+ return __async$o(this, arguments, function* ({
20042
20040
  webMap,
20043
20041
  adapterOptions = {},
20044
20042
  onLayerAdded,
@@ -20046,10 +20044,10 @@ function createOnFirstShowAdapter(_0) {
20046
20044
  }) {
20047
20045
  class OnFirstShowAdapter {
20048
20046
  constructor() {
20049
- __publicField$o(this, "options", {});
20050
- __publicField$o(this, "layer", []);
20051
- __publicField$o(this, "_removed", false);
20052
- __publicField$o(this, "_creatingInProgress", false);
20047
+ __publicField$p(this, "options", {});
20048
+ __publicField$p(this, "layer", []);
20049
+ __publicField$p(this, "_removed", false);
20050
+ __publicField$p(this, "_creatingInProgress", false);
20053
20051
  }
20054
20052
  addLayer() {
20055
20053
  return this.layer;
@@ -20064,7 +20062,7 @@ function createOnFirstShowAdapter(_0) {
20064
20062
  return this._removed;
20065
20063
  }
20066
20064
  showLayer() {
20067
- return __async$n(this, null, function* () {
20065
+ return __async$o(this, null, function* () {
20068
20066
  this.options.visibility = true;
20069
20067
  if (this.layer.length) {
20070
20068
  for (const x of this.layer) {
@@ -20076,7 +20074,7 @@ function createOnFirstShowAdapter(_0) {
20076
20074
  });
20077
20075
  }
20078
20076
  hideLayer() {
20079
- return __async$n(this, null, function* () {
20077
+ return __async$o(this, null, function* () {
20080
20078
  this.options.visibility = false;
20081
20079
  if (this.layer) {
20082
20080
  for (const x of this.layer) {
@@ -20086,12 +20084,12 @@ function createOnFirstShowAdapter(_0) {
20086
20084
  });
20087
20085
  }
20088
20086
  loadLayer() {
20089
- return __async$n(this, null, function* () {
20087
+ return __async$o(this, null, function* () {
20090
20088
  if (!this.layer.length && !this._creatingInProgress) {
20091
20089
  this._creatingInProgress = true;
20092
20090
  const Adapter = yield createAdapter(this);
20093
20091
  if (Adapter) {
20094
- const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$o({}, adapterOptions));
20092
+ const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$p({}, adapterOptions));
20095
20093
  const realLayer = yield adapter.addLayer({
20096
20094
  order: this.options.order,
20097
20095
  headers: this.options.headers,
@@ -20120,7 +20118,7 @@ function createOnFirstShowAdapter(_0) {
20120
20118
  });
20121
20119
  }
20122
20120
 
20123
- var __async$m = (__this, __arguments, generator) => {
20121
+ var __async$n = (__this, __arguments, generator) => {
20124
20122
  return new Promise((resolve, reject) => {
20125
20123
  var fulfilled = (value) => {
20126
20124
  try {
@@ -20141,7 +20139,7 @@ var __async$m = (__this, __arguments, generator) => {
20141
20139
  });
20142
20140
  };
20143
20141
  function createOnFirstShowNgwAdapter(_0) {
20144
- return __async$m(this, arguments, function* ({
20142
+ return __async$n(this, arguments, function* ({
20145
20143
  webMap,
20146
20144
  connector,
20147
20145
  item,
@@ -20179,26 +20177,26 @@ const config = {
20179
20177
  defaultRequestLimit: 7e3
20180
20178
  };
20181
20179
 
20182
- var __defProp$x = Object.defineProperty;
20183
- var __defProps$f = Object.defineProperties;
20184
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
20185
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
20186
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
20187
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
20188
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20189
- var __spreadValues$n = (a, b) => {
20180
+ var __defProp$y = Object.defineProperty;
20181
+ var __defProps$g = Object.defineProperties;
20182
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
20183
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
20184
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
20185
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
20186
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20187
+ var __spreadValues$o = (a, b) => {
20190
20188
  for (var prop in b || (b = {}))
20191
- if (__hasOwnProp$o.call(b, prop))
20192
- __defNormalProp$x(a, prop, b[prop]);
20193
- if (__getOwnPropSymbols$o)
20194
- for (var prop of __getOwnPropSymbols$o(b)) {
20195
- if (__propIsEnum$o.call(b, prop))
20196
- __defNormalProp$x(a, prop, b[prop]);
20189
+ if (__hasOwnProp$p.call(b, prop))
20190
+ __defNormalProp$y(a, prop, b[prop]);
20191
+ if (__getOwnPropSymbols$p)
20192
+ for (var prop of __getOwnPropSymbols$p(b)) {
20193
+ if (__propIsEnum$p.call(b, prop))
20194
+ __defNormalProp$y(a, prop, b[prop]);
20197
20195
  }
20198
20196
  return a;
20199
20197
  };
20200
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
20201
- var __async$l = (__this, __arguments, generator) => {
20198
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
20199
+ var __async$m = (__this, __arguments, generator) => {
20202
20200
  return new Promise((resolve, reject) => {
20203
20201
  var fulfilled = (value) => {
20204
20202
  try {
@@ -20220,7 +20218,8 @@ var __async$l = (__this, __arguments, generator) => {
20220
20218
  };
20221
20219
  const FEATURE_REQUEST_PARAMS = {
20222
20220
  srs: 4326,
20223
- geom_format: "geojson"
20221
+ geom_format: "geojson",
20222
+ dt_format: "iso"
20224
20223
  };
20225
20224
  function createGeoJsonFeature(item) {
20226
20225
  const geometry = item.geom;
@@ -20264,7 +20263,7 @@ function paramListToQuery(paramList) {
20264
20263
  );
20265
20264
  }
20266
20265
  function createFeatureFieldFilterQueries(opt) {
20267
- return __async$l(this, null, function* () {
20266
+ return __async$m(this, null, function* () {
20268
20267
  const queries = getQueries(opt);
20269
20268
  const itemsParts = yield Promise.all(queries);
20270
20269
  const ids = [];
@@ -20308,13 +20307,13 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20308
20307
  for (const f of filters_) {
20309
20308
  if (isPropertyFilter(f)) {
20310
20309
  _queries.push(
20311
- fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$n({}, opt), {
20310
+ fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
20312
20311
  paramList: [..._parentAllParams, ...paramList, createParam(f)]
20313
20312
  }))
20314
20313
  );
20315
20314
  } else {
20316
20315
  getQueries(
20317
- __spreadProps$f(__spreadValues$n({}, opt), {
20316
+ __spreadProps$g(__spreadValues$o({}, opt), {
20318
20317
  filters: f
20319
20318
  }),
20320
20319
  _queries,
@@ -20335,7 +20334,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20335
20334
  if (propertiesFilterList.length) {
20336
20335
  for (const x of propertiesFilterList) {
20337
20336
  getQueries(
20338
- __spreadProps$f(__spreadValues$n({}, opt), {
20337
+ __spreadProps$g(__spreadValues$o({}, opt), {
20339
20338
  filters: x
20340
20339
  }),
20341
20340
  _queries,
@@ -20344,7 +20343,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20344
20343
  }
20345
20344
  } else {
20346
20345
  _queries.push(
20347
- fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$n({}, opt), {
20346
+ fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
20348
20347
  paramList: [..._parentAllParams, ...paramList, ...filters2]
20349
20348
  }))
20350
20349
  );
@@ -20360,7 +20359,7 @@ function createWktFromCoordArray(coord) {
20360
20359
  return `POLYGON((${polygon.join(", ")}))`;
20361
20360
  }
20362
20361
  function fetchNgwLayerItemsRequest(options) {
20363
- const params = __spreadValues$n({}, FEATURE_REQUEST_PARAMS);
20362
+ const params = __spreadValues$o({}, FEATURE_REQUEST_PARAMS);
20364
20363
  const {
20365
20364
  limit,
20366
20365
  query,
@@ -20398,7 +20397,7 @@ function fetchNgwLayerItemsRequest(options) {
20398
20397
  if (paramList) {
20399
20398
  Object.assign(params, paramListToQuery(paramList));
20400
20399
  }
20401
- return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$n(__spreadValues$n({}, params), query), cache, signal });
20400
+ return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$o(__spreadValues$o({}, params), query), cache, signal });
20402
20401
  }
20403
20402
 
20404
20403
  function prepareNgwFieldsToPropertiesFilter(fields) {
@@ -20427,26 +20426,26 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
20427
20426
  return fields;
20428
20427
  }
20429
20428
 
20430
- var __defProp$w = Object.defineProperty;
20431
- var __defProps$e = Object.defineProperties;
20432
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
20433
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
20434
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
20435
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
20436
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20437
- var __spreadValues$m = (a, b) => {
20429
+ var __defProp$x = Object.defineProperty;
20430
+ var __defProps$f = Object.defineProperties;
20431
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
20432
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
20433
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
20434
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
20435
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20436
+ var __spreadValues$n = (a, b) => {
20438
20437
  for (var prop in b || (b = {}))
20439
- if (__hasOwnProp$n.call(b, prop))
20440
- __defNormalProp$w(a, prop, b[prop]);
20441
- if (__getOwnPropSymbols$n)
20442
- for (var prop of __getOwnPropSymbols$n(b)) {
20443
- if (__propIsEnum$n.call(b, prop))
20444
- __defNormalProp$w(a, prop, b[prop]);
20438
+ if (__hasOwnProp$o.call(b, prop))
20439
+ __defNormalProp$x(a, prop, b[prop]);
20440
+ if (__getOwnPropSymbols$o)
20441
+ for (var prop of __getOwnPropSymbols$o(b)) {
20442
+ if (__propIsEnum$o.call(b, prop))
20443
+ __defNormalProp$x(a, prop, b[prop]);
20445
20444
  }
20446
20445
  return a;
20447
20446
  };
20448
- var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
20449
- var __async$k = (__this, __arguments, generator) => {
20447
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
20448
+ var __async$l = (__this, __arguments, generator) => {
20450
20449
  return new Promise((resolve, reject) => {
20451
20450
  var fulfilled = (value) => {
20452
20451
  try {
@@ -20467,17 +20466,17 @@ var __async$k = (__this, __arguments, generator) => {
20467
20466
  });
20468
20467
  };
20469
20468
  function fetchNgwLayerItems(options) {
20470
- return __async$k(this, null, function* () {
20469
+ return __async$l(this, null, function* () {
20471
20470
  var _a;
20472
20471
  const filters = options.filters;
20473
20472
  if (filters) {
20474
- let data = yield createFeatureFieldFilterQueries(__spreadProps$e(__spreadValues$m({}, options), {
20473
+ let data = yield createFeatureFieldFilterQueries(__spreadProps$f(__spreadValues$n({}, options), {
20475
20474
  filters
20476
20475
  }));
20477
20476
  const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
20478
20477
  if (clientFilterValidate) {
20479
20478
  data = data.filter((y) => {
20480
- const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$e(__spreadValues$m({}, y.fields), {
20479
+ const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$f(__spreadValues$n({}, y.fields), {
20481
20480
  id: y.id
20482
20481
  }));
20483
20482
  const result = propertiesFilter(fields, filters);
@@ -20595,26 +20594,26 @@ function ngwApiToAdapterOptions({
20595
20594
  }
20596
20595
  }
20597
20596
 
20598
- var __defProp$v = Object.defineProperty;
20599
- var __defProps$d = Object.defineProperties;
20600
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
20601
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
20602
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
20603
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
20604
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20605
- var __spreadValues$l = (a, b) => {
20597
+ var __defProp$w = Object.defineProperty;
20598
+ var __defProps$e = Object.defineProperties;
20599
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
20600
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
20601
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
20602
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
20603
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20604
+ var __spreadValues$m = (a, b) => {
20606
20605
  for (var prop in b || (b = {}))
20607
- if (__hasOwnProp$m.call(b, prop))
20608
- __defNormalProp$v(a, prop, b[prop]);
20609
- if (__getOwnPropSymbols$m)
20610
- for (var prop of __getOwnPropSymbols$m(b)) {
20611
- if (__propIsEnum$m.call(b, prop))
20612
- __defNormalProp$v(a, prop, b[prop]);
20606
+ if (__hasOwnProp$n.call(b, prop))
20607
+ __defNormalProp$w(a, prop, b[prop]);
20608
+ if (__getOwnPropSymbols$n)
20609
+ for (var prop of __getOwnPropSymbols$n(b)) {
20610
+ if (__propIsEnum$n.call(b, prop))
20611
+ __defNormalProp$w(a, prop, b[prop]);
20613
20612
  }
20614
20613
  return a;
20615
20614
  };
20616
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
20617
- var __async$j = (__this, __arguments, generator) => {
20615
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
20616
+ var __async$k = (__this, __arguments, generator) => {
20618
20617
  return new Promise((resolve, reject) => {
20619
20618
  var fulfilled = (value) => {
20620
20619
  try {
@@ -20635,56 +20634,56 @@ var __async$j = (__this, __arguments, generator) => {
20635
20634
  });
20636
20635
  };
20637
20636
  function fetchNgwLayerItem(options) {
20638
- return __async$j(this, null, function* () {
20639
- const params = __spreadValues$l({}, FEATURE_REQUEST_PARAMS);
20637
+ return __async$k(this, null, function* () {
20638
+ const params = __spreadValues$m({}, FEATURE_REQUEST_PARAMS);
20640
20639
  updateItemRequestParam(params, options);
20641
20640
  const resp = yield options.connector.route("feature_layer.feature.item", {
20642
20641
  id: Number(options.resourceId),
20643
20642
  fid: options.featureId
20644
- }).get(__spreadProps$d(__spreadValues$l({}, options), { query: params }));
20645
- const toGeojson = () => __async$j(this, null, function* () {
20643
+ }).get(__spreadProps$e(__spreadValues$m({}, options), { query: params }));
20644
+ const toGeojson = () => __async$k(this, null, function* () {
20646
20645
  if (resp.geom) {
20647
20646
  return createGeoJsonFeature(resp);
20648
20647
  } else {
20649
- const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$d(__spreadValues$l({}, options), {
20648
+ const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$m({}, options), {
20650
20649
  geom: true,
20651
20650
  fields: null,
20652
20651
  extensions: null
20653
20652
  }));
20654
20653
  const geom = onlyGeomItem.geom;
20655
- return createGeoJsonFeature(__spreadProps$d(__spreadValues$l({}, resp), { geom }));
20654
+ return createGeoJsonFeature(__spreadProps$e(__spreadValues$m({}, resp), { geom }));
20656
20655
  }
20657
20656
  });
20658
- return __spreadProps$d(__spreadValues$l({}, resp), {
20657
+ return __spreadProps$e(__spreadValues$m({}, resp), {
20659
20658
  toGeojson
20660
20659
  });
20661
20660
  });
20662
20661
  }
20663
20662
 
20664
- var __defProp$u = Object.defineProperty;
20665
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
20666
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
20667
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
20668
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20669
- var __spreadValues$k = (a, b) => {
20663
+ var __defProp$v = Object.defineProperty;
20664
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
20665
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
20666
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
20667
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20668
+ var __spreadValues$l = (a, b) => {
20670
20669
  for (var prop in b || (b = {}))
20671
- if (__hasOwnProp$l.call(b, prop))
20672
- __defNormalProp$u(a, prop, b[prop]);
20673
- if (__getOwnPropSymbols$l)
20674
- for (var prop of __getOwnPropSymbols$l(b)) {
20675
- if (__propIsEnum$l.call(b, prop))
20676
- __defNormalProp$u(a, prop, b[prop]);
20670
+ if (__hasOwnProp$m.call(b, prop))
20671
+ __defNormalProp$v(a, prop, b[prop]);
20672
+ if (__getOwnPropSymbols$m)
20673
+ for (var prop of __getOwnPropSymbols$m(b)) {
20674
+ if (__propIsEnum$m.call(b, prop))
20675
+ __defNormalProp$v(a, prop, b[prop]);
20677
20676
  }
20678
20677
  return a;
20679
20678
  };
20680
- var __publicField$n = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
20679
+ var __publicField$o = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
20681
20680
  class BookmarkItem {
20682
20681
  constructor(options) {
20683
20682
  this.options = options;
20684
- __publicField$n(this, "name");
20685
- __publicField$n(this, "resourceId");
20686
- __publicField$n(this, "item");
20687
- __publicField$n(this, "_extent");
20683
+ __publicField$o(this, "name");
20684
+ __publicField$o(this, "resourceId");
20685
+ __publicField$o(this, "item");
20686
+ __publicField$o(this, "_extent");
20688
20687
  this.resourceId = options.resourceId;
20689
20688
  const item = options.item;
20690
20689
  this.item = item;
@@ -20702,17 +20701,19 @@ class BookmarkItem {
20702
20701
  id: this.resourceId,
20703
20702
  fid: this.item.id
20704
20703
  }).get(opt).then((resp) => {
20705
- const { minLat, minLon, maxLat, maxLon } = resp.extent;
20706
- const lonLat = [minLon, minLat, maxLon, maxLat];
20707
- this._extent = lonLat;
20708
- return lonLat;
20704
+ if (resp.extent) {
20705
+ const { minLat, minLon, maxLat, maxLon } = resp.extent;
20706
+ const lonLat = [minLon, minLat, maxLon, maxLat];
20707
+ this._extent = lonLat;
20708
+ return lonLat;
20709
+ }
20709
20710
  });
20710
20711
  }
20711
20712
  geoJson(opt) {
20712
20713
  if (this.item.geom) {
20713
20714
  return Promise.resolve(createGeoJsonFeature(this.item));
20714
20715
  } else {
20715
- return fetchNgwLayerItem(__spreadValues$k({
20716
+ return fetchNgwLayerItem(__spreadValues$l({
20716
20717
  resourceId: this.resourceId,
20717
20718
  featureId: this.item.id,
20718
20719
  connector: this.options.connector,
@@ -20730,19 +20731,19 @@ class BookmarkItem {
20730
20731
 
20731
20732
  const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
20732
20733
 
20733
- var __defProp$t = Object.defineProperty;
20734
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20735
- var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
20734
+ var __defProp$u = Object.defineProperty;
20735
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20736
+ var __publicField$n = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
20736
20737
  class BaseProperty {
20737
20738
  constructor(name, item, options) {
20738
- __publicField$m(this, "options");
20739
- __publicField$m(this, "emitter", new EventEmitter());
20740
- __publicField$m(this, "name");
20741
- __publicField$m(this, "item");
20742
- __publicField$m(this, "_blocked", false);
20743
- __publicField$m(this, "_container");
20744
- __publicField$m(this, "_value");
20745
- __publicField$m(this, "_removeEventsListener");
20739
+ __publicField$n(this, "options");
20740
+ __publicField$n(this, "emitter", new EventEmitter());
20741
+ __publicField$n(this, "name");
20742
+ __publicField$n(this, "item");
20743
+ __publicField$n(this, "_blocked", false);
20744
+ __publicField$n(this, "_container");
20745
+ __publicField$n(this, "_value");
20746
+ __publicField$n(this, "_removeEventsListener");
20746
20747
  this.item = item;
20747
20748
  this.options = Object.assign({}, options);
20748
20749
  this.name = name;
@@ -20837,28 +20838,28 @@ class BaseProperty {
20837
20838
  });
20838
20839
  return isBlocked;
20839
20840
  }
20840
- }
20841
-
20842
- var __defProp$s = Object.defineProperty;
20843
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
20844
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
20845
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
20846
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20847
- var __spreadValues$j = (a, b) => {
20841
+ }
20842
+
20843
+ var __defProp$t = Object.defineProperty;
20844
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
20845
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
20846
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
20847
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20848
+ var __spreadValues$k = (a, b) => {
20848
20849
  for (var prop in b || (b = {}))
20849
- if (__hasOwnProp$k.call(b, prop))
20850
- __defNormalProp$s(a, prop, b[prop]);
20851
- if (__getOwnPropSymbols$k)
20852
- for (var prop of __getOwnPropSymbols$k(b)) {
20853
- if (__propIsEnum$k.call(b, prop))
20854
- __defNormalProp$s(a, prop, b[prop]);
20850
+ if (__hasOwnProp$l.call(b, prop))
20851
+ __defNormalProp$t(a, prop, b[prop]);
20852
+ if (__getOwnPropSymbols$l)
20853
+ for (var prop of __getOwnPropSymbols$l(b)) {
20854
+ if (__propIsEnum$l.call(b, prop))
20855
+ __defNormalProp$t(a, prop, b[prop]);
20855
20856
  }
20856
20857
  return a;
20857
20858
  };
20858
- var __publicField$l = (obj, key, value) => __defNormalProp$s(obj, key + "" , value);
20859
+ var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, key + "" , value);
20859
20860
  const _CheckProperty = class _CheckProperty extends BaseProperty {
20860
20861
  constructor(name, item, options) {
20861
- super(name, item, __spreadValues$j(__spreadValues$j({}, _CheckProperty.options), options));
20862
+ super(name, item, __spreadValues$k(__spreadValues$k({}, _CheckProperty.options), options));
20862
20863
  this.set(this.get());
20863
20864
  }
20864
20865
  update(value, options) {
@@ -20954,7 +20955,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
20954
20955
  const child = children[fry];
20955
20956
  const property = child.properties && child.properties.property(this.name);
20956
20957
  if (property) {
20957
- property.set(value, __spreadValues$j(__spreadValues$j({}, options), {
20958
+ property.set(value, __spreadValues$k(__spreadValues$k({}, options), {
20958
20959
  propagation: true,
20959
20960
  bubble: false
20960
20961
  }));
@@ -20963,7 +20964,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
20963
20964
  }
20964
20965
  }
20965
20966
  };
20966
- __publicField$l(_CheckProperty, "options", {
20967
+ __publicField$m(_CheckProperty, "options", {
20967
20968
  hierarchy: true,
20968
20969
  bubble: false,
20969
20970
  propagation: false,
@@ -20972,31 +20973,31 @@ __publicField$l(_CheckProperty, "options", {
20972
20973
  });
20973
20974
  let CheckProperty = _CheckProperty;
20974
20975
 
20975
- var __defProp$r = Object.defineProperty;
20976
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
20977
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
20978
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
20979
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20980
- var __spreadValues$i = (a, b) => {
20976
+ var __defProp$s = Object.defineProperty;
20977
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
20978
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
20979
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
20980
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20981
+ var __spreadValues$j = (a, b) => {
20981
20982
  for (var prop in b || (b = {}))
20982
- if (__hasOwnProp$j.call(b, prop))
20983
- __defNormalProp$r(a, prop, b[prop]);
20984
- if (__getOwnPropSymbols$j)
20985
- for (var prop of __getOwnPropSymbols$j(b)) {
20986
- if (__propIsEnum$j.call(b, prop))
20987
- __defNormalProp$r(a, prop, b[prop]);
20983
+ if (__hasOwnProp$k.call(b, prop))
20984
+ __defNormalProp$s(a, prop, b[prop]);
20985
+ if (__getOwnPropSymbols$k)
20986
+ for (var prop of __getOwnPropSymbols$k(b)) {
20987
+ if (__propIsEnum$k.call(b, prop))
20988
+ __defNormalProp$s(a, prop, b[prop]);
20988
20989
  }
20989
20990
  return a;
20990
20991
  };
20991
- var __publicField$k = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
20992
+ var __publicField$l = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
20992
20993
  const BOOLEAN_TYPE = "boolean";
20993
20994
  const STRING_TYPE = "string";
20994
20995
  const _ItemProperties = class _ItemProperties {
20995
20996
  constructor(item, propertiesList) {
20996
20997
  this.item = item;
20997
- __publicField$k(this, "options", {});
20998
- __publicField$k(this, "_properties", {});
20999
- __publicField$k(this, "_propertiesList", []);
20998
+ __publicField$l(this, "options", {});
20999
+ __publicField$l(this, "_properties", {});
21000
+ __publicField$l(this, "_propertiesList", []);
21000
21001
  if (propertiesList) {
21001
21002
  propertiesList.forEach(this._setPropertyHandler.bind(this));
21002
21003
  }
@@ -21036,7 +21037,7 @@ const _ItemProperties = class _ItemProperties {
21036
21037
  _setPropertyHandler(propOpt) {
21037
21038
  const Handler = this._getHandler(propOpt);
21038
21039
  if (Handler && propOpt.name) {
21039
- const options = __spreadValues$i({}, propOpt);
21040
+ const options = __spreadValues$j({}, propOpt);
21040
21041
  this._properties[propOpt.name] = new Handler(
21041
21042
  propOpt.name,
21042
21043
  this.item,
@@ -21059,7 +21060,7 @@ const _ItemProperties = class _ItemProperties {
21059
21060
  return Handler;
21060
21061
  }
21061
21062
  };
21062
- __publicField$k(_ItemProperties, "handlers", {
21063
+ __publicField$l(_ItemProperties, "handlers", {
21063
21064
  CheckProperty
21064
21065
  });
21065
21066
  let ItemProperties = _ItemProperties;
@@ -21166,14 +21167,14 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
21166
21167
  return true;
21167
21168
  }
21168
21169
 
21169
- var __defProp$q = Object.defineProperty;
21170
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21171
- var __publicField$j = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
21170
+ var __defProp$r = Object.defineProperty;
21171
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21172
+ var __publicField$k = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
21172
21173
  class TreeHelper {
21173
21174
  constructor(item) {
21174
- __publicField$j(this, "item");
21175
- __publicField$j(this, "_children", []);
21176
- __publicField$j(this, "_parent");
21175
+ __publicField$k(this, "item");
21176
+ __publicField$k(this, "_children", []);
21177
+ __publicField$k(this, "_parent");
21177
21178
  this.item = item;
21178
21179
  }
21179
21180
  setParent(parent) {
@@ -21236,32 +21237,32 @@ class TreeHelper {
21236
21237
  }
21237
21238
  }
21238
21239
 
21239
- var __defProp$p = Object.defineProperty;
21240
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
21241
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
21242
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
21243
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21244
- var __spreadValues$h = (a, b) => {
21240
+ var __defProp$q = Object.defineProperty;
21241
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
21242
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
21243
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
21244
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21245
+ var __spreadValues$i = (a, b) => {
21245
21246
  for (var prop in b || (b = {}))
21246
- if (__hasOwnProp$i.call(b, prop))
21247
- __defNormalProp$p(a, prop, b[prop]);
21248
- if (__getOwnPropSymbols$i)
21249
- for (var prop of __getOwnPropSymbols$i(b)) {
21250
- if (__propIsEnum$i.call(b, prop))
21251
- __defNormalProp$p(a, prop, b[prop]);
21247
+ if (__hasOwnProp$j.call(b, prop))
21248
+ __defNormalProp$q(a, prop, b[prop]);
21249
+ if (__getOwnPropSymbols$j)
21250
+ for (var prop of __getOwnPropSymbols$j(b)) {
21251
+ if (__propIsEnum$j.call(b, prop))
21252
+ __defNormalProp$q(a, prop, b[prop]);
21252
21253
  }
21253
21254
  return a;
21254
21255
  };
21255
- var __publicField$i = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
21256
+ var __publicField$j = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
21256
21257
  let ID$1 = 0;
21257
21258
  class Item {
21258
21259
  constructor(options) {
21259
- __publicField$i(this, "options", {});
21260
- __publicField$i(this, "properties");
21261
- __publicField$i(this, "tree");
21262
- __publicField$i(this, "id", ID$1);
21260
+ __publicField$j(this, "options", {});
21261
+ __publicField$j(this, "properties");
21262
+ __publicField$j(this, "tree");
21263
+ __publicField$j(this, "id", ID$1);
21263
21264
  ID$1 += 1;
21264
- this.options = __spreadValues$h({}, options);
21265
+ this.options = __spreadValues$i({}, options);
21265
21266
  this.tree = new TreeHelper(this);
21266
21267
  }
21267
21268
  initProperties() {
@@ -21313,6 +21314,161 @@ class WebmapLayerOpacityPropertyHandler extends BaseProperty {
21313
21314
  }
21314
21315
  }
21315
21316
 
21317
+ var __defProp$p = Object.defineProperty;
21318
+ var __defProps$d = Object.defineProperties;
21319
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
21320
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
21321
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
21322
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
21323
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21324
+ var __spreadValues$h = (a, b) => {
21325
+ for (var prop in b || (b = {}))
21326
+ if (__hasOwnProp$i.call(b, prop))
21327
+ __defNormalProp$p(a, prop, b[prop]);
21328
+ if (__getOwnPropSymbols$i)
21329
+ for (var prop of __getOwnPropSymbols$i(b)) {
21330
+ if (__propIsEnum$i.call(b, prop))
21331
+ __defNormalProp$p(a, prop, b[prop]);
21332
+ }
21333
+ return a;
21334
+ };
21335
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
21336
+ var __publicField$i = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
21337
+ var __async$j = (__this, __arguments, generator) => {
21338
+ return new Promise((resolve, reject) => {
21339
+ var fulfilled = (value) => {
21340
+ try {
21341
+ step(generator.next(value));
21342
+ } catch (e) {
21343
+ reject(e);
21344
+ }
21345
+ };
21346
+ var rejected = (value) => {
21347
+ try {
21348
+ step(generator.throw(value));
21349
+ } catch (e) {
21350
+ reject(e);
21351
+ }
21352
+ };
21353
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
21354
+ step((generator = generator.apply(__this, __arguments)).next());
21355
+ });
21356
+ };
21357
+ class Legend {
21358
+ constructor({
21359
+ legendSymbols,
21360
+ resourceId,
21361
+ connector,
21362
+ layerId,
21363
+ legend,
21364
+ webMap,
21365
+ layer,
21366
+ onSymbolRenderChange
21367
+ }) {
21368
+ __publicField$i(this, "layerId");
21369
+ __publicField$i(this, "layer");
21370
+ __publicField$i(this, "resourceId");
21371
+ __publicField$i(this, "legendSymbols", "expand");
21372
+ __publicField$i(this, "legend");
21373
+ // private blocked: boolean = false;
21374
+ __publicField$i(this, "layerVisibility", true);
21375
+ // private symbolRenderIndexes?: number[];
21376
+ __publicField$i(this, "onSymbolRenderChange");
21377
+ __publicField$i(this, "webMap");
21378
+ __publicField$i(this, "connector");
21379
+ if (legendSymbols) {
21380
+ this.legendSymbols = legendSymbols;
21381
+ }
21382
+ this.connector = connector;
21383
+ this.layer = layer;
21384
+ this.layerId = layerId;
21385
+ this.legend = this.createLegend(legend);
21386
+ this.resourceId = resourceId;
21387
+ this.webMap = webMap;
21388
+ this.onSymbolRenderChange = onSymbolRenderChange;
21389
+ }
21390
+ attachLayer(layer) {
21391
+ this.layerId = String(layer.id);
21392
+ this.layer = layer;
21393
+ }
21394
+ create(options) {
21395
+ return __async$j(this, null, function* () {
21396
+ if (this.connector) {
21397
+ const ngwLegend = yield this.connector.route("render.legend_symbols", {
21398
+ id: this.resourceId
21399
+ }).get(__spreadValues$h({}, options));
21400
+ return this.createLegend(ngwLegend);
21401
+ }
21402
+ });
21403
+ }
21404
+ createLegend(items) {
21405
+ return items.map((params) => __spreadProps$d(__spreadValues$h({}, params), {
21406
+ /** @deprecated use display_name instead */
21407
+ name: params.display_name,
21408
+ /** @deprecated use icon instead */
21409
+ symbol: params.icon
21410
+ }));
21411
+ }
21412
+ setSymbolRender(symbolIndex, status) {
21413
+ const legendItem = this.legend.find((l) => l.index === symbolIndex);
21414
+ if (legendItem) {
21415
+ const render = legendItem.render;
21416
+ if (render !== status) {
21417
+ legendItem.render = status;
21418
+ const newSymbols = this.legend.filter((l) => l.render).map((l) => l.index);
21419
+ this.setLegendSymbol(newSymbols);
21420
+ if (this.onSymbolRenderChange) {
21421
+ this.onSymbolRenderChange(newSymbols);
21422
+ }
21423
+ }
21424
+ }
21425
+ }
21426
+ setLegendSymbol(symbolRenderIndexes) {
21427
+ const intervals = this._consolidateIntervals(symbolRenderIndexes);
21428
+ if (!intervals.length) {
21429
+ this._hideLayer();
21430
+ }
21431
+ if (this.layer.updateLayer) {
21432
+ this.layer.updateLayer({
21433
+ params: {
21434
+ [`symbols[${this.resourceId}]`]: intervals.join(",") || void 0
21435
+ }
21436
+ });
21437
+ }
21438
+ if (intervals.length) {
21439
+ this._showLayer();
21440
+ }
21441
+ }
21442
+ _hideLayer() {
21443
+ if (this.layer.options.id) {
21444
+ this.webMap.mapAdapter.hideLayer(this.layer.layer);
21445
+ }
21446
+ }
21447
+ _showLayer() {
21448
+ if (this.layer.options.id) {
21449
+ if (this.layerVisibility) {
21450
+ this.webMap.showLayer(this.layer.options.id, { silent: true });
21451
+ }
21452
+ }
21453
+ }
21454
+ _consolidateIntervals(symbols) {
21455
+ const sortedSymbols = symbols.slice().sort((a, b) => a - b);
21456
+ const intervals = [];
21457
+ let start = sortedSymbols[0];
21458
+ let end = start;
21459
+ for (let i = 1; i <= sortedSymbols.length; i++) {
21460
+ if (sortedSymbols[i] === end + 1) {
21461
+ end = sortedSymbols[i];
21462
+ } else {
21463
+ intervals.push(start === end ? `${start}` : `${start}-${end}`);
21464
+ start = sortedSymbols[i];
21465
+ end = start;
21466
+ }
21467
+ }
21468
+ return intervals;
21469
+ }
21470
+ }
21471
+
21316
21472
  var __defProp$o = Object.defineProperty;
21317
21473
  var __defProps$c = Object.defineProperties;
21318
21474
  var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
@@ -21354,14 +21510,23 @@ var __async$i = (__this, __arguments, generator) => {
21354
21510
  });
21355
21511
  };
21356
21512
  const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21357
- constructor(webMap, item, options, connector, parent, noInit) {
21513
+ constructor({
21514
+ webMap,
21515
+ item,
21516
+ options,
21517
+ connector,
21518
+ parent,
21519
+ noInit
21520
+ }) {
21358
21521
  super(__spreadValues$g(__spreadValues$g({}, _NgwWebmapItem.options), options));
21359
- this.webMap = webMap;
21360
21522
  __publicField$h(this, "item");
21523
+ __publicField$h(this, "webMap");
21361
21524
  __publicField$h(this, "connector");
21362
21525
  __publicField$h(this, "layer");
21526
+ __publicField$h(this, "legend");
21363
21527
  __publicField$h(this, "emitter", new EventEmitter());
21364
21528
  __publicField$h(this, "_rootDescendantsCount", 0);
21529
+ this.webMap = webMap;
21365
21530
  if (connector) {
21366
21531
  this.connector = connector;
21367
21532
  }
@@ -21384,14 +21549,14 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21384
21549
  }
21385
21550
  static create(webMap, item, options, connector, parent) {
21386
21551
  return __async$i(this, null, function* () {
21387
- const ngwWebmapItem = new _NgwWebmapItem(
21552
+ const ngwWebmapItem = new _NgwWebmapItem({
21388
21553
  webMap,
21389
21554
  item,
21390
21555
  options,
21391
21556
  connector,
21392
21557
  parent,
21393
- true
21394
- );
21558
+ noInit: true
21559
+ });
21395
21560
  yield ngwWebmapItem._init(item);
21396
21561
  return ngwWebmapItem;
21397
21562
  });
@@ -21413,22 +21578,36 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21413
21578
  }
21414
21579
  getLegend(options) {
21415
21580
  return __async$i(this, null, function* () {
21416
- var _a;
21581
+ var _a, _b;
21417
21582
  const id = (_a = this.layer) == null ? void 0 : _a.id;
21418
21583
  if (id !== void 0) {
21419
21584
  const connector = this.connector;
21420
21585
  if (connector && "resourceId" in this.item) {
21421
- const ngwLegend = yield connector.route("render.legend_symbols", { id: Number(this.item.resourceId) }).get(__spreadValues$g({}, options));
21422
- const legend = {
21423
- layerId: id,
21424
- legend: ngwLegend.map((legend2) => __spreadValues$g({
21425
- /** @deprecated use display_name instead */
21426
- name: legend2.display_name,
21427
- /** @deprecated use icon instead */
21428
- symbol: legend2.icon
21429
- }, legend2))
21430
- };
21431
- return [legend];
21586
+ const resourceId = Number(this.item.resourceId);
21587
+ if (this.item.item_type === "layer") {
21588
+ const ngwLegend = yield connector.route("render.legend_symbols", {
21589
+ id: resourceId
21590
+ }).get(__spreadValues$g({}, options));
21591
+ if (this.layer && ngwLegend) {
21592
+ const legend = new Legend({
21593
+ layerId: id,
21594
+ legend: ngwLegend,
21595
+ layer: this.layer,
21596
+ resourceId,
21597
+ webMap: this.webMap,
21598
+ legendSymbols: (_b = this.item.legend_symbols) != null ? _b : void 0,
21599
+ onSymbolRenderChange: (indexes) => {
21600
+ this.webMap.emitter.emit("event-symbol-render:change", {
21601
+ layerId: id,
21602
+ resourceId,
21603
+ indexes
21604
+ });
21605
+ }
21606
+ });
21607
+ return [legend];
21608
+ }
21609
+ }
21610
+ return [];
21432
21611
  }
21433
21612
  }
21434
21613
  return [];
@@ -21483,13 +21662,13 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21483
21662
  if (group.children && group.children.length) {
21484
21663
  const children = this.getChildren(group);
21485
21664
  for (const child of children) {
21486
- const childItem = new this.constructor(
21487
- this.webMap,
21488
- child,
21489
- this.options,
21490
- this.connector,
21491
- this
21492
- );
21665
+ const childItem = new this.constructor({
21666
+ webMap: this.webMap,
21667
+ item: child,
21668
+ options: this.options,
21669
+ connector: this.connector,
21670
+ parent: this
21671
+ });
21493
21672
  this.tree.addChild(childItem);
21494
21673
  }
21495
21674
  }
@@ -21517,6 +21696,15 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21517
21696
  }
21518
21697
  if (adapter) {
21519
21698
  return this.webMap.addLayer(adapter, options).then((newLayer) => {
21699
+ this.webMap.emitter.on("layer:toggle", (e) => {
21700
+ if (e.id === newLayer.id) {
21701
+ const enabled = this.properties.get("visibility");
21702
+ const mapVisible = this.webMap.isLayerVisible(newLayer);
21703
+ if (enabled !== mapVisible) {
21704
+ this.properties.set("visibility", mapVisible);
21705
+ }
21706
+ }
21707
+ });
21520
21708
  setNewLayer(newLayer);
21521
21709
  });
21522
21710
  }
@@ -21819,12 +22007,12 @@ class NgwWebmapLayerAdapter {
21819
22007
  headers,
21820
22008
  drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
21821
22009
  });
21822
- const layer = new this.NgwWebmapItem(
21823
- this.options.webMap,
21824
- webmap.root_item,
22010
+ const layer = new this.NgwWebmapItem({
22011
+ webMap: this.options.webMap,
22012
+ item: webmap.root_item,
21825
22013
  options,
21826
22014
  connector
21827
- );
22015
+ });
21828
22016
  layer.emitter.on("init", () => {
21829
22017
  resolve(layer);
21830
22018
  });
@@ -21890,6 +22078,7 @@ class NgwWebmapLayerAdapter {
21890
22078
  }
21891
22079
  }
21892
22080
  _updateItemsParams(item, webMap, data) {
22081
+ var _a;
21893
22082
  if (item) {
21894
22083
  if (item.item_type === "group" || item.item_type === "root") {
21895
22084
  if ("children" in item && item.children) {
@@ -21922,6 +22111,9 @@ class NgwWebmapLayerAdapter {
21922
22111
  item = __spreadValues$f(__spreadValues$f({}, layerItem), layerAdapterOptions);
21923
22112
  }
21924
22113
  }
22114
+ if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
22115
+ item = this.options.nativeOptions.beforeItemCreated(item);
22116
+ }
21925
22117
  return item;
21926
22118
  }
21927
22119
  }
@@ -22807,42 +22999,6 @@ var __async$b = (__this, __arguments, generator) => {
22807
22999
  step((generator = generator.apply(__this, __arguments)).next());
22808
23000
  });
22809
23001
  };
22810
- class Legend {
22811
- constructor({
22812
- layerId,
22813
- legend,
22814
- onSymbolRenderChange
22815
- }) {
22816
- __publicField$c(this, "layerId");
22817
- __publicField$c(this, "legend");
22818
- __publicField$c(this, "onSymbolRenderChange");
22819
- this.layerId = layerId;
22820
- this.legend = this.createLegend(legend);
22821
- this.onSymbolRenderChange = onSymbolRenderChange;
22822
- }
22823
- createLegend(items) {
22824
- return items.map((params) => __spreadProps$7(__spreadValues$9({}, params), {
22825
- /** @deprecated use display_name instead */
22826
- name: params.display_name,
22827
- /** @deprecated use icon instead */
22828
- symbol: params.icon
22829
- }));
22830
- }
22831
- setSymbolRender(symbolIndex, status) {
22832
- const legendItem = this.legend.find((l) => l.index === symbolIndex);
22833
- if (legendItem) {
22834
- const render = legendItem.render;
22835
- if (render !== status) {
22836
- legendItem.render = status;
22837
- if (this.onSymbolRenderChange) {
22838
- this.onSymbolRenderChange(
22839
- this.legend.filter((l) => l.render).map((l) => l.index)
22840
- );
22841
- }
22842
- }
22843
- }
22844
- }
22845
- }
22846
23002
  function createRasterAdapter(_0) {
22847
23003
  return __async$b(this, arguments, function* ({
22848
23004
  layerOptions,
@@ -22878,8 +23034,8 @@ function createRasterAdapter(_0) {
22878
23034
  this.map = map;
22879
23035
  __publicField$c(this, "item", item);
22880
23036
  __publicField$c(this, "resourceId", resourceId);
22881
- __publicField$c(this, "_blocked", false);
22882
- __publicField$c(this, "_layerVisibility");
23037
+ __publicField$c(this, "blocked", false);
23038
+ __publicField$c(this, "layerVisibility");
22883
23039
  const opt = ngwApiToAdapterOptions({
22884
23040
  options: layerOptions,
22885
23041
  webMap,
@@ -22900,24 +23056,6 @@ function createRasterAdapter(_0) {
22900
23056
  addLayer(addOptions) {
22901
23057
  return super.addLayer(__spreadValues$9(__spreadValues$9({}, this.options), addOptions));
22902
23058
  }
22903
- showLayer() {
22904
- this._layerVisibility = true;
22905
- if (!this._blocked) {
22906
- if (super.showLayer) {
22907
- super.showLayer(this.layer);
22908
- } else if (this.layer) {
22909
- webMap.mapAdapter.showLayer(this.layer);
22910
- }
22911
- }
22912
- }
22913
- hideLayer() {
22914
- this._layerVisibility = false;
22915
- if (super.hideLayer) {
22916
- super.hideLayer(this.layer);
22917
- } else if (this.layer) {
22918
- webMap.mapAdapter.hideLayer(this.layer);
22919
- }
22920
- }
22921
23059
  getIdentificationIds() {
22922
23060
  return __async$b(this, null, function* () {
22923
23061
  if (this.item) {
@@ -22943,59 +23081,16 @@ function createRasterAdapter(_0) {
22943
23081
  }, options));
22944
23082
  const legend = new Legend({
22945
23083
  layerId: id,
22946
- legend: ngwLegend,
22947
- onSymbolRenderChange: this._setLegendSymbol.bind(this)
23084
+ layer: this,
23085
+ resourceId,
23086
+ webMap,
23087
+ legend: ngwLegend
22948
23088
  });
22949
23089
  return [legend];
22950
23090
  }
22951
23091
  return [];
22952
23092
  });
22953
23093
  }
22954
- _hideLayer() {
22955
- if (this.options.id) {
22956
- webMap.mapAdapter.hideLayer(this.layer);
22957
- }
22958
- }
22959
- _showLayer() {
22960
- if (this.options.id) {
22961
- if (this._layerVisibility) {
22962
- webMap.showLayer(this.options.id, { silent: true });
22963
- }
22964
- }
22965
- }
22966
- _setLegendSymbol(renderIndexes) {
22967
- const intervals = this._consolidateIntervals(renderIndexes);
22968
- if (!intervals.length) {
22969
- this._hideLayer();
22970
- this._blocked = true;
22971
- } else {
22972
- this._blocked = false;
22973
- this._showLayer();
22974
- }
22975
- if (this.updateLayer) {
22976
- this.updateLayer({
22977
- params: {
22978
- [`symbols[${resourceId}]`]: intervals.join(",") || void 0
22979
- }
22980
- });
22981
- }
22982
- }
22983
- _consolidateIntervals(symbols) {
22984
- const sortedSymbols = symbols.slice().sort((a, b) => a - b);
22985
- const intervals = [];
22986
- let start = sortedSymbols[0];
22987
- let end = start;
22988
- for (let i = 1; i <= sortedSymbols.length; i++) {
22989
- if (sortedSymbols[i] === end + 1) {
22990
- end = sortedSymbols[i];
22991
- } else {
22992
- intervals.push(start === end ? `${start}` : `${start}-${end}`);
22993
- start = sortedSymbols[i];
22994
- end = start;
22995
- }
22996
- }
22997
- return intervals;
22998
- }
22999
23094
  };
23000
23095
  } else {
23001
23096
  throw new Error(adapter + " not supported yet. Only TILE");
@@ -23357,16 +23452,25 @@ class IdentifyItem {
23357
23452
  });
23358
23453
  }
23359
23454
  resource(opt) {
23455
+ return __async$8(this, null, function* () {
23456
+ const composite = yield this.composite(opt);
23457
+ return composite.feature_layer;
23458
+ });
23459
+ }
23460
+ composite(opt) {
23360
23461
  return __async$8(this, null, function* () {
23361
23462
  if (this._resource && this._resource.feature_layer) {
23362
- return this._resource.feature_layer;
23463
+ return this._resource;
23363
23464
  }
23364
23465
  const resp = yield this.connector.getResource(this.layerId, opt);
23365
- if (!(resp == null ? void 0 : resp.feature_layer)) {
23366
- throw new Error("Resource is not avector layer");
23466
+ if (!resp) {
23467
+ throw new Error("Resource does not exist");
23468
+ }
23469
+ if (!resp.feature_layer) {
23470
+ throw new Error("Resource is not a vector layer");
23367
23471
  }
23368
23472
  this._resource = resp;
23369
- return resp.feature_layer;
23473
+ return resp;
23370
23474
  });
23371
23475
  }
23372
23476
  getBounds(opt) {
@@ -23379,7 +23483,7 @@ class IdentifyItem {
23379
23483
  resourceId: this.layerId
23380
23484
  }, opt));
23381
23485
  }
23382
- geojson(options) {
23486
+ geojson(options = {}) {
23383
23487
  if (this._geojson) {
23384
23488
  return Promise.resolve(this._geojson);
23385
23489
  }
@@ -26341,7 +26445,8 @@ const _NgwMap = class _NgwMap extends WebMap {
26341
26445
  const identFunc = typeof layer.getIdentificationIds === "function" ? layer.getIdentificationIds : false;
26342
26446
  const interactive = (_a = layer.options.interactive) != null ? _a : true;
26343
26447
  if (identFunc && layer.options.selectable && interactive && this.isLayerVisible(layer)) {
26344
- promises.push(identFunc.call(layer));
26448
+ const layerIds = identFunc.call(layer);
26449
+ promises.push(layerIds);
26345
26450
  }
26346
26451
  }
26347
26452
  const getIdsPromise = Promise.all(promises);