@nextgis/ngw-leaflet 3.0.0-alpha.17 → 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,41 +17231,41 @@ 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, __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
@@ -17288,7 +17288,7 @@ class ImageAdapter extends BaseAdapter {
17288
17288
  }
17289
17289
  }
17290
17290
  }
17291
- __publicField$B(ImageAdapter, "queue", imageQueue);
17291
+ __publicField$C(ImageAdapter, "queue", imageQueue);
17292
17292
 
17293
17293
  function makeRemote(Base) {
17294
17294
  return class RemoteTileLayer extends Base {
@@ -17350,33 +17350,33 @@ class TileLayerBase extends leafletSrcExports.TileLayer {
17350
17350
  }
17351
17351
  const TileLayer = makeRemote(TileLayerBase);
17352
17352
 
17353
- var __defProp$R = Object.defineProperty;
17354
- var __defProps$m = Object.defineProperties;
17355
- var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
17356
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
17357
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
17358
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
17359
- var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17360
- var __spreadValues$y = (a, b) => {
17361
- for (var prop in b || (b = {}))
17362
- if (__hasOwnProp$z.call(b, prop))
17363
- __defNormalProp$R(a, prop, b[prop]);
17364
- if (__getOwnPropSymbols$z)
17365
- for (var prop of __getOwnPropSymbols$z(b)) {
17366
- if (__propIsEnum$z.call(b, prop))
17367
- __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]);
17368
17368
  }
17369
17369
  return a;
17370
17370
  };
17371
- var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
17371
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
17372
17372
  var __objRest$7 = (source, exclude) => {
17373
17373
  var target = {};
17374
17374
  for (var prop in source)
17375
- if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
17375
+ if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
17376
17376
  target[prop] = source[prop];
17377
- if (source != null && __getOwnPropSymbols$z)
17378
- for (var prop of __getOwnPropSymbols$z(source)) {
17379
- 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))
17380
17380
  target[prop] = source[prop];
17381
17381
  }
17382
17382
  return target;
@@ -17387,7 +17387,7 @@ class TileAdapter extends BaseAdapter {
17387
17387
  if (options) {
17388
17388
  const _a = options, { url } = _a, opt = __objRest$7(_a, ["url"]);
17389
17389
  if (url) {
17390
- const tileLayerOptions = __spreadValues$y({
17390
+ const tileLayerOptions = __spreadValues$z({
17391
17391
  pane: this.pane,
17392
17392
  attribution: opt.attribution,
17393
17393
  minZoom: opt.minZoom,
@@ -17398,7 +17398,7 @@ class TileAdapter extends BaseAdapter {
17398
17398
  }
17399
17399
  let layer;
17400
17400
  if (opt.headers || opt.withCredentials) {
17401
- layer = new TileLayer(url, __spreadProps$m(__spreadValues$y({}, tileLayerOptions), {
17401
+ layer = new TileLayer(url, __spreadProps$n(__spreadValues$z({}, tileLayerOptions), {
17402
17402
  headers: opt.headers,
17403
17403
  withCredentials: opt.withCredentials,
17404
17404
  setViewDelay: opt.setViewDelay
@@ -17421,29 +17421,29 @@ class TileAdapter extends BaseAdapter {
17421
17421
  }
17422
17422
  }
17423
17423
 
17424
- var __defProp$Q = Object.defineProperty;
17425
- var __defProps$l = Object.defineProperties;
17426
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
17427
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
17428
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
17429
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
17430
- var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17431
- 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) => {
17432
17432
  for (var prop in b || (b = {}))
17433
- if (__hasOwnProp$y.call(b, prop))
17434
- __defNormalProp$Q(a, prop, b[prop]);
17435
- if (__getOwnPropSymbols$y)
17436
- for (var prop of __getOwnPropSymbols$y(b)) {
17437
- if (__propIsEnum$y.call(b, prop))
17438
- __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]);
17439
17439
  }
17440
17440
  return a;
17441
17441
  };
17442
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
17442
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
17443
17443
  class OsmAdapter extends TileAdapter {
17444
17444
  addLayer(options) {
17445
17445
  const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
17446
- return super.addLayer(__spreadProps$l(__spreadValues$x({
17446
+ return super.addLayer(__spreadProps$m(__spreadValues$y({
17447
17447
  name: "OpenStreetMap",
17448
17448
  attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
17449
17449
  }, options), {
@@ -17459,33 +17459,33 @@ class WmsLayerBase extends leafletSrcExports.TileLayer.WMS {
17459
17459
  }
17460
17460
  const WmsLayer = makeRemote(WmsLayerBase);
17461
17461
 
17462
- var __defProp$P = Object.defineProperty;
17463
- var __defProps$k = Object.defineProperties;
17464
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
17465
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
17466
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
17467
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
17468
- var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17469
- 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) => {
17470
17470
  for (var prop in b || (b = {}))
17471
- if (__hasOwnProp$x.call(b, prop))
17472
- __defNormalProp$P(a, prop, b[prop]);
17473
- if (__getOwnPropSymbols$x)
17474
- for (var prop of __getOwnPropSymbols$x(b)) {
17475
- if (__propIsEnum$x.call(b, prop))
17476
- __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]);
17477
17477
  }
17478
17478
  return a;
17479
17479
  };
17480
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
17480
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
17481
17481
  var __objRest$6 = (source, exclude) => {
17482
17482
  var target = {};
17483
17483
  for (var prop in source)
17484
- if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
17484
+ if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
17485
17485
  target[prop] = source[prop];
17486
- if (source != null && __getOwnPropSymbols$x)
17487
- for (var prop of __getOwnPropSymbols$x(source)) {
17488
- 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))
17489
17489
  target[prop] = source[prop];
17490
17490
  }
17491
17491
  return target;
@@ -17495,7 +17495,7 @@ class WmsAdapter extends BaseAdapter {
17495
17495
  Object.assign(this.options, options);
17496
17496
  const _a = options, { url } = _a, opt = __objRest$6(_a, ["url"]);
17497
17497
  if (url) {
17498
- const layerOptions = __spreadValues$w({
17498
+ const layerOptions = __spreadValues$x({
17499
17499
  pane: this.pane,
17500
17500
  attribution: opt.attribution,
17501
17501
  minZoom: opt.minZoom,
@@ -17506,7 +17506,7 @@ class WmsAdapter extends BaseAdapter {
17506
17506
  }, options.nativeOptions);
17507
17507
  let layer;
17508
17508
  if (opt.headers || opt.withCredentials) {
17509
- layer = new WmsLayer(url, __spreadProps$k(__spreadValues$w({}, layerOptions), {
17509
+ layer = new WmsLayer(url, __spreadProps$l(__spreadValues$x({}, layerOptions), {
17510
17510
  headers: opt.headers,
17511
17511
  withCredentials: opt.withCredentials
17512
17512
  }));
@@ -17526,33 +17526,33 @@ function arrayToBoundsExpression(bounds) {
17526
17526
  ];
17527
17527
  }
17528
17528
 
17529
- var __defProp$O = Object.defineProperty;
17530
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
17531
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
17532
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
17533
- var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17534
- 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) => {
17535
17535
  for (var prop in b || (b = {}))
17536
- if (__hasOwnProp$w.call(b, prop))
17537
- __defNormalProp$O(a, prop, b[prop]);
17538
- if (__getOwnPropSymbols$w)
17539
- for (var prop of __getOwnPropSymbols$w(b)) {
17540
- if (__propIsEnum$w.call(b, prop))
17541
- __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]);
17542
17542
  }
17543
17543
  return a;
17544
17544
  };
17545
- 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);
17546
17546
  const _LeafletMapAdapter = class _LeafletMapAdapter {
17547
17547
  constructor() {
17548
- __publicField$A(this, "options", { target: "map" });
17549
- __publicField$A(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
17550
- __publicField$A(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
17551
- __publicField$A(this, "emitter", new EventEmitter());
17552
- __publicField$A(this, "map");
17553
- __publicField$A(this, "_resizeObserver");
17554
- __publicField$A(this, "_unselectCb", []);
17555
- __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", [
17556
17556
  "move",
17557
17557
  "zoom",
17558
17558
  "zoomend",
@@ -17560,14 +17560,14 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17560
17560
  "moveend",
17561
17561
  "movestart"
17562
17562
  ]);
17563
- __publicField$A(this, "_positionEvents", [
17563
+ __publicField$B(this, "_positionEvents", [
17564
17564
  "mousemove",
17565
17565
  "mouseout",
17566
17566
  "mouseover"
17567
17567
  ]);
17568
17568
  }
17569
17569
  create(options) {
17570
- this.options = __spreadValues$v({}, options);
17570
+ this.options = __spreadValues$w({}, options);
17571
17571
  if (this.options.target) {
17572
17572
  const {
17573
17573
  zoom,
@@ -17577,7 +17577,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17577
17577
  maxBounds: mb,
17578
17578
  mapAdapterOptions
17579
17579
  } = this.options;
17580
- 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({
17581
17581
  attributionControl: false,
17582
17582
  zoomControl: false,
17583
17583
  maxBounds: mb ? arrayToBoundsExpression(mb) : void 0,
@@ -17860,7 +17860,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17860
17860
  }
17861
17861
  }
17862
17862
  };
17863
- __publicField$A(_LeafletMapAdapter, "layerAdapters", {
17863
+ __publicField$B(_LeafletMapAdapter, "layerAdapters", {
17864
17864
  GEOJSON: GeoJsonAdapter,
17865
17865
  IMAGE: ImageAdapter,
17866
17866
  TILE: TileAdapter,
@@ -17868,11 +17868,11 @@ __publicField$A(_LeafletMapAdapter, "layerAdapters", {
17868
17868
  // // MVT: MvtAdapter,
17869
17869
  OSM: OsmAdapter
17870
17870
  });
17871
- __publicField$A(_LeafletMapAdapter, "controlAdapters", {
17871
+ __publicField$B(_LeafletMapAdapter, "controlAdapters", {
17872
17872
  ZOOM: leafletSrcExports.Control.Zoom,
17873
17873
  ATTRIBUTION: AttributionControl
17874
17874
  });
17875
- __publicField$A(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
17875
+ __publicField$B(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
17876
17876
  let LeafletMapAdapter = _LeafletMapAdapter;
17877
17877
 
17878
17878
  const svgPath = {
@@ -17960,23 +17960,23 @@ function template(str, data) {
17960
17960
  });
17961
17961
  }
17962
17962
 
17963
- var __defProp$N = Object.defineProperty;
17964
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
17965
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
17966
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
17967
- var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17968
- 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) => {
17969
17969
  for (var prop in b || (b = {}))
17970
- if (__hasOwnProp$v.call(b, prop))
17971
- __defNormalProp$N(a, prop, b[prop]);
17972
- if (__getOwnPropSymbols$v)
17973
- for (var prop of __getOwnPropSymbols$v(b)) {
17974
- if (__propIsEnum$v.call(b, prop))
17975
- __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]);
17976
17976
  }
17977
17977
  return a;
17978
17978
  };
17979
- var __async$u = (__this, __arguments, generator) => {
17979
+ var __async$v = (__this, __arguments, generator) => {
17980
17980
  return new Promise((resolve, reject) => {
17981
17981
  var fulfilled = (value) => {
17982
17982
  try {
@@ -17997,7 +17997,7 @@ var __async$u = (__this, __arguments, generator) => {
17997
17997
  });
17998
17998
  };
17999
17999
  function apiRequest(opt) {
18000
- return __async$u(this, null, function* () {
18000
+ return __async$v(this, null, function* () {
18001
18001
  const { params, name, connector, requestOptions } = opt;
18002
18002
  const apiItems = yield connector.connect();
18003
18003
  let apiItem = apiItems && apiItems[name];
@@ -18035,7 +18035,7 @@ function apiRequest(opt) {
18035
18035
  }
18036
18036
  }
18037
18037
  if (url) {
18038
- return connector.makeQuery(url, params, __spreadValues$u({
18038
+ return connector.makeQuery(url, params, __spreadValues$v({
18039
18039
  cacheName: name
18040
18040
  }, requestOptions));
18041
18041
  } else {
@@ -18047,12 +18047,12 @@ function apiRequest(opt) {
18047
18047
  });
18048
18048
  }
18049
18049
 
18050
- var __defProp$M = Object.defineProperty;
18051
- var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18052
- 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);
18053
18053
  const _Cache = class _Cache {
18054
18054
  constructor(options = {}) {
18055
- __publicField$z(this, "cache", []);
18055
+ __publicField$A(this, "cache", []);
18056
18056
  var _a;
18057
18057
  const namespace = (_a = options.namespace) != null ? _a : "default";
18058
18058
  if (_Cache.instance[namespace]) {
@@ -18183,12 +18183,12 @@ const _Cache = class _Cache {
18183
18183
  return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
18184
18184
  }
18185
18185
  };
18186
- __publicField$z(_Cache, "instance", {});
18186
+ __publicField$A(_Cache, "instance", {});
18187
18187
  let Cache = _Cache;
18188
18188
 
18189
18189
  var pkg = {
18190
18190
  name: "@nextgis/ngw-connector",
18191
- version: "3.0.0-alpha.16",
18191
+ version: "3.0.0-alpha.17",
18192
18192
  _priority: 12,
18193
18193
  description: "A lightweight HTTP client optimized for use with NextGIS Web API",
18194
18194
  main: "index.js",
@@ -18197,15 +18197,15 @@ var pkg = {
18197
18197
  jsdelivr: "lib/ngw-connector.global.prod.js",
18198
18198
  types: "lib/index.d.ts",
18199
18199
  dependencies: {
18200
- "@nextgis/cache": "^3.0.0-alpha.13",
18201
- "@nextgis/cancelable-promise": "^3.0.0-alpha.13",
18202
- "@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",
18203
18203
  "@types/events": "^3.0.0",
18204
18204
  events: "*",
18205
18205
  "form-data": "^4.0.0"
18206
18206
  },
18207
18207
  devDependencies: {
18208
- "@nextgis/build-tools": "^3.0.0-alpha.13"
18208
+ "@nextgis/build-tools": "^3.0.0-alpha.17"
18209
18209
  },
18210
18210
  scripts: {
18211
18211
  clean: "rimraf ./lib",
@@ -18252,46 +18252,46 @@ class AbortError extends Error {
18252
18252
  }
18253
18253
  }
18254
18254
 
18255
- var __defProp$L = Object.defineProperty;
18256
- var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18257
- 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);
18258
18258
  class NgwError extends Error {
18259
18259
  constructor(er) {
18260
18260
  super();
18261
- __publicField$y(this, "name", "NgwError");
18262
- __publicField$y(this, "title");
18263
- __publicField$y(this, "message");
18264
- __publicField$y(this, "detail");
18265
- __publicField$y(this, "exception");
18266
- __publicField$y(this, "status_code");
18267
- __publicField$y(this, "data");
18268
- __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");
18269
18269
  Object.assign(this, er);
18270
18270
  Object.setPrototypeOf(this, NgwError.prototype);
18271
18271
  }
18272
18272
  }
18273
18273
 
18274
- var __defProp$K = Object.defineProperty;
18275
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18276
- 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);
18277
18277
  class InsufficientPermissionsError extends NgwError {
18278
18278
  constructor(obj) {
18279
18279
  super(obj);
18280
- __publicField$x(this, "name", "InsufficientPermissionsError");
18281
- __publicField$x(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
18280
+ __publicField$y(this, "name", "InsufficientPermissionsError");
18281
+ __publicField$y(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
18282
18282
  Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
18283
18283
  }
18284
18284
  }
18285
18285
 
18286
- var __defProp$J = Object.defineProperty;
18287
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18288
- 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);
18289
18289
  let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
18290
18290
  constructor(obj) {
18291
18291
  super(obj);
18292
- __publicField$w(this, "message", "There is no response from the server or problem connecting to server.");
18293
- __publicField$w(this, "title", "Network error");
18294
- __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.");
18295
18295
  Object.setPrototypeOf(this, NetworksResponseError.prototype);
18296
18296
  }
18297
18297
  };
@@ -18328,27 +18328,27 @@ function isError(error) {
18328
18328
  return false;
18329
18329
  }
18330
18330
 
18331
- var __defProp$I = Object.defineProperty;
18332
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18333
- 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);
18334
18334
  class NetworkError extends Error {
18335
18335
  constructor(url) {
18336
18336
  super();
18337
- __publicField$v(this, "name", "NetworkError");
18337
+ __publicField$w(this, "name", "NetworkError");
18338
18338
  Object.setPrototypeOf(this, NetworkError.prototype);
18339
18339
  this.message = `Unable to request ${url}.
18340
18340
  Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
18341
18341
  }
18342
18342
  }
18343
18343
 
18344
- var __defProp$H = Object.defineProperty;
18345
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18346
- 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);
18347
18347
  class ResourceNotFoundError extends NgwError {
18348
18348
  constructor(obj) {
18349
18349
  super(obj);
18350
- __publicField$u(this, "name", "ResourceNotFoundError");
18351
- __publicField$u(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
18350
+ __publicField$v(this, "name", "ResourceNotFoundError");
18351
+ __publicField$v(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
18352
18352
  Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
18353
18353
  }
18354
18354
  }
@@ -18365,13 +18365,13 @@ var errors = /*#__PURE__*/Object.freeze({
18365
18365
  isError: isError
18366
18366
  });
18367
18367
 
18368
- var __defProp$G = Object.defineProperty;
18369
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18370
- 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);
18371
18371
  class BaseAPIError extends Error {
18372
18372
  constructor(message) {
18373
18373
  super(message || "Something went wrong.");
18374
- __publicField$t(this, "title");
18374
+ __publicField$u(this, "title");
18375
18375
  this.name = "BaseAPIError";
18376
18376
  this.title = "Unknown API error";
18377
18377
  if (Error.captureStackTrace) {
@@ -18383,7 +18383,7 @@ class NetworksResponseError extends BaseAPIError {
18383
18383
  // prettier-ignore
18384
18384
  constructor(message) {
18385
18385
  super(message || "There is no response from the server or problem connecting to server.");
18386
- __publicField$t(this, "detail");
18386
+ __publicField$u(this, "detail");
18387
18387
  this.title = "Network error";
18388
18388
  this.detail = "Check network connectivity and try again later.";
18389
18389
  }
@@ -18397,8 +18397,8 @@ class InvalidResponseError extends BaseAPIError {
18397
18397
  class ServerResponseError extends BaseAPIError {
18398
18398
  constructor(data) {
18399
18399
  super(data.message);
18400
- __publicField$t(this, "detail");
18401
- __publicField$t(this, "data");
18400
+ __publicField$u(this, "detail");
18401
+ __publicField$u(this, "data");
18402
18402
  this.title = data.title || this.title;
18403
18403
  this.detail = data.detail || null;
18404
18404
  this.data = data;
@@ -18408,8 +18408,8 @@ class LunkwillError extends Error {
18408
18408
  // prettier-ignore
18409
18409
  constructor(message, data = {}) {
18410
18410
  super(message || "Unexpected error while processing long-running request.");
18411
- __publicField$t(this, "title");
18412
- __publicField$t(this, "data");
18411
+ __publicField$u(this, "title");
18412
+ __publicField$u(this, "data");
18413
18413
  this.name = "LunkwillError";
18414
18414
  this.title = "Long-running request error";
18415
18415
  this.data = data;
@@ -18429,35 +18429,35 @@ class LunkwillRequestFailed extends LunkwillError {
18429
18429
  }
18430
18430
  }
18431
18431
 
18432
- var __defProp$F = Object.defineProperty;
18433
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
18434
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
18435
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
18436
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18437
- 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) => {
18438
18438
  for (var prop in b || (b = {}))
18439
- if (__hasOwnProp$u.call(b, prop))
18440
- __defNormalProp$F(a, prop, b[prop]);
18441
- if (__getOwnPropSymbols$u)
18442
- for (var prop of __getOwnPropSymbols$u(b)) {
18443
- if (__propIsEnum$u.call(b, prop))
18444
- __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]);
18445
18445
  }
18446
18446
  return a;
18447
18447
  };
18448
18448
  var __objRest$5 = (source, exclude) => {
18449
18449
  var target = {};
18450
18450
  for (var prop in source)
18451
- if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
18451
+ if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
18452
18452
  target[prop] = source[prop];
18453
- if (source != null && __getOwnPropSymbols$u)
18454
- for (var prop of __getOwnPropSymbols$u(source)) {
18455
- 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))
18456
18456
  target[prop] = source[prop];
18457
18457
  }
18458
18458
  return target;
18459
18459
  };
18460
- var __async$t = (__this, __arguments, generator) => {
18460
+ var __async$u = (__this, __arguments, generator) => {
18461
18461
  return new Promise((resolve, reject) => {
18462
18462
  var fulfilled = (value) => {
18463
18463
  try {
@@ -18482,7 +18482,7 @@ function lunkwillCheckResponse(lwResp) {
18482
18482
  return ct !== void 0 && ct !== null && ct.includes("application/vnd.lunkwill.request-summary+json");
18483
18483
  }
18484
18484
  function responseJson(response) {
18485
- return __async$t(this, null, function* () {
18485
+ return __async$u(this, null, function* () {
18486
18486
  try {
18487
18487
  return response.json();
18488
18488
  } catch (e) {
@@ -18491,7 +18491,7 @@ function responseJson(response) {
18491
18491
  });
18492
18492
  }
18493
18493
  function lunkwillResponseUrl(lwResp) {
18494
- return __async$t(this, null, function* () {
18494
+ return __async$u(this, null, function* () {
18495
18495
  const lwData = yield responseJson(lwResp);
18496
18496
  let delay = lwData.delay_ms;
18497
18497
  const retry = lwData.retry_ms !== void 0 ? lwData.retry_ms : 2e3;
@@ -18535,7 +18535,7 @@ function lunkwillResponseUrl(lwResp) {
18535
18535
  });
18536
18536
  }
18537
18537
  function lunkwillFetch(lwRespUrl) {
18538
- return __async$t(this, null, function* () {
18538
+ return __async$u(this, null, function* () {
18539
18539
  try {
18540
18540
  return yield window.fetch(lwRespUrl, { credentials: "same-origin" });
18541
18541
  } catch (e) {
@@ -18583,14 +18583,14 @@ function generateUrl(path, query) {
18583
18583
  return path + urlParams;
18584
18584
  }
18585
18585
  function request(path, options, cacheEngine) {
18586
- return __async$t(this, null, function* () {
18586
+ return __async$u(this, null, function* () {
18587
18587
  var _b, _c;
18588
18588
  const defaults = {
18589
18589
  method: "GET",
18590
18590
  credentials: "same-origin",
18591
18591
  headers: {}
18592
18592
  };
18593
- const _a = __spreadValues$t(__spreadValues$t({}, defaults), options), {
18593
+ const _a = __spreadValues$u(__spreadValues$u({}, defaults), options), {
18594
18594
  withCredentials,
18595
18595
  responseType,
18596
18596
  cacheProps,
@@ -18627,7 +18627,7 @@ function request(path, options, cacheEngine) {
18627
18627
  opt.headers = headers;
18628
18628
  }
18629
18629
  const url = generateUrl(path, query);
18630
- const makeRequest = () => __async$t(this, null, function* () {
18630
+ const makeRequest = () => __async$u(this, null, function* () {
18631
18631
  let response;
18632
18632
  try {
18633
18633
  response = yield fetch(url, opt);
@@ -18670,7 +18670,7 @@ function request(path, options, cacheEngine) {
18670
18670
  if (cacheEngine) {
18671
18671
  if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
18672
18672
  if (cache !== false) {
18673
- const props = cacheProps ? cacheProps : __spreadValues$t({}, objectRemoveEmpty({
18673
+ const props = cacheProps ? cacheProps : __spreadValues$u({}, objectRemoveEmpty({
18674
18674
  withCredentials,
18675
18675
  responseType
18676
18676
  }));
@@ -18690,38 +18690,38 @@ function request(path, options, cacheEngine) {
18690
18690
  });
18691
18691
  }
18692
18692
 
18693
- var __defProp$E = Object.defineProperty;
18694
- var __defProps$j = Object.defineProperties;
18695
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
18696
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
18697
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
18698
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
18699
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18700
- 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) => {
18701
18701
  for (var prop in b || (b = {}))
18702
- if (__hasOwnProp$t.call(b, prop))
18703
- __defNormalProp$E(a, prop, b[prop]);
18704
- if (__getOwnPropSymbols$t)
18705
- for (var prop of __getOwnPropSymbols$t(b)) {
18706
- if (__propIsEnum$t.call(b, prop))
18707
- __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]);
18708
18708
  }
18709
18709
  return a;
18710
18710
  };
18711
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
18711
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
18712
18712
  var __objRest$4 = (source, exclude) => {
18713
18713
  var target = {};
18714
18714
  for (var prop in source)
18715
- if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
18715
+ if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
18716
18716
  target[prop] = source[prop];
18717
- if (source != null && __getOwnPropSymbols$t)
18718
- for (var prop of __getOwnPropSymbols$t(source)) {
18719
- 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))
18720
18720
  target[prop] = source[prop];
18721
18721
  }
18722
18722
  return target;
18723
18723
  };
18724
- var __async$s = (__this, __arguments, generator) => {
18724
+ var __async$t = (__this, __arguments, generator) => {
18725
18725
  return new Promise((resolve, reject) => {
18726
18726
  var fulfilled = (value) => {
18727
18727
  try {
@@ -18772,7 +18772,7 @@ function routeURL(name, baseUrl, routeData, ...rest) {
18772
18772
  }
18773
18773
  function route(name, connector, ...rest) {
18774
18774
  const result = {
18775
- url: (opt) => __async$s(this, null, function* () {
18775
+ url: (opt) => __async$t(this, null, function* () {
18776
18776
  var _a;
18777
18777
  const routeData = yield connector.connect();
18778
18778
  const template = routeURL(
@@ -18800,10 +18800,10 @@ function route(name, connector, ...rest) {
18800
18800
  routeData,
18801
18801
  ...rest
18802
18802
  );
18803
- 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 : {}));
18804
18804
  return request(
18805
18805
  template,
18806
- __spreadProps$j(__spreadValues$s({
18806
+ __spreadProps$k(__spreadValues$t({
18807
18807
  headers
18808
18808
  }, restOpt), {
18809
18809
  method
@@ -18927,39 +18927,39 @@ function removeConnector(connector) {
18927
18927
  }
18928
18928
  }
18929
18929
 
18930
- var __defProp$D = Object.defineProperty;
18931
- var __defProps$i = Object.defineProperties;
18932
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
18933
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
18934
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
18935
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
18936
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18937
- 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) => {
18938
18938
  for (var prop in b || (b = {}))
18939
- if (__hasOwnProp$s.call(b, prop))
18940
- __defNormalProp$D(a, prop, b[prop]);
18941
- if (__getOwnPropSymbols$s)
18942
- for (var prop of __getOwnPropSymbols$s(b)) {
18943
- if (__propIsEnum$s.call(b, prop))
18944
- __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]);
18945
18945
  }
18946
18946
  return a;
18947
18947
  };
18948
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
18948
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
18949
18949
  var __objRest$3 = (source, exclude) => {
18950
18950
  var target = {};
18951
18951
  for (var prop in source)
18952
- if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
18952
+ if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
18953
18953
  target[prop] = source[prop];
18954
- if (source != null && __getOwnPropSymbols$s)
18955
- for (var prop of __getOwnPropSymbols$s(source)) {
18956
- 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))
18957
18957
  target[prop] = source[prop];
18958
18958
  }
18959
18959
  return target;
18960
18960
  };
18961
- var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
18962
- 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) => {
18963
18963
  return new Promise((resolve, reject) => {
18964
18964
  var fulfilled = (value) => {
18965
18965
  try {
@@ -18984,18 +18984,18 @@ let REQUEST_ID = 0;
18984
18984
  class NgwConnector {
18985
18985
  constructor(options) {
18986
18986
  this.options = options;
18987
- __publicField$s(this, "id", ID$2++);
18988
- __publicField$s(this, "emitter", new EventEmitter());
18989
- __publicField$s(this, "user");
18990
- __publicField$s(this, "cache");
18991
- __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");
18992
18992
  // Dedicated cache for route requests, as these are executed before any other requests.
18993
18993
  // This cache does not need to be cleared during the session.
18994
- __publicField$s(this, "routeCache");
18995
- __publicField$s(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18996
- __publicField$s(this, "routeStr", "/api/component/pyramid/route");
18997
- __publicField$s(this, "activeRequests", {});
18998
- __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");
18999
18999
  const exist = findConnector(options);
19000
19000
  this.cache = new Cache({ namespace: options.cacheId });
19001
19001
  this.routeCache = new Cache({ namespace: "routecache" });
@@ -19048,7 +19048,7 @@ class NgwConnector {
19048
19048
  * ```
19049
19049
  */
19050
19050
  connect() {
19051
- return __async$r(this, arguments, function* ({
19051
+ return __async$s(this, arguments, function* ({
19052
19052
  signal
19053
19053
  } = {}) {
19054
19054
  const auth = this.options.auth;
@@ -19087,14 +19087,14 @@ class NgwConnector {
19087
19087
  this.emitter.emit("logout");
19088
19088
  }
19089
19089
  getUserInfo(credentials, options) {
19090
- return __async$r(this, null, function* () {
19090
+ return __async$s(this, null, function* () {
19091
19091
  if (this.user && this.user.id) {
19092
19092
  return this.user;
19093
19093
  }
19094
19094
  if (credentials) {
19095
19095
  this.options.auth = credentials;
19096
19096
  }
19097
- const options_ = __spreadValues$r({
19097
+ const options_ = __spreadValues$s({
19098
19098
  headers: this.getAuthorizationHeaders(credentials),
19099
19099
  cache: true
19100
19100
  }, options);
@@ -19135,7 +19135,7 @@ class NgwConnector {
19135
19135
  this.activeRequests = {};
19136
19136
  }
19137
19137
  getActiveApiRequests() {
19138
- return __spreadValues$r({}, this.activeRequests);
19138
+ return __spreadValues$s({}, this.activeRequests);
19139
19139
  }
19140
19140
  route(name, ...rest) {
19141
19141
  return route(name, this, ...rest);
@@ -19147,7 +19147,7 @@ class NgwConnector {
19147
19147
  * @param options - Request options
19148
19148
  */
19149
19149
  makeQuery(_0, _1) {
19150
- return __async$r(this, arguments, function* (url, params, options = {}) {
19150
+ return __async$s(this, arguments, function* (url, params, options = {}) {
19151
19151
  var _b;
19152
19152
  url = (this.options.baseUrl ? this.options.baseUrl : "") + url;
19153
19153
  if (!url) {
@@ -19158,7 +19158,7 @@ class NgwConnector {
19158
19158
  url = template(url, restParams);
19159
19159
  }
19160
19160
  url = encodeURI(fixUrlStr(url));
19161
- options = __spreadValues$r({ withCredentials: this.withCredentials }, options);
19161
+ options = __spreadValues$s({ withCredentials: this.withCredentials }, options);
19162
19162
  const {
19163
19163
  cache,
19164
19164
  signal: externalSignal,
@@ -19180,7 +19180,7 @@ class NgwConnector {
19180
19180
  });
19181
19181
  }
19182
19182
  options.signal = internalSignal;
19183
- const createPromise = () => __async$r(this, null, function* () {
19183
+ const createPromise = () => __async$s(this, null, function* () {
19184
19184
  const id = REQUEST_ID++;
19185
19185
  this.activeRequests[id] = internalAbortController;
19186
19186
  try {
@@ -19190,7 +19190,7 @@ class NgwConnector {
19190
19190
  }
19191
19191
  });
19192
19192
  if (method === "GET" && cache !== false) {
19193
- const cacheOptions = cacheProps ? cacheProps : __spreadProps$i(__spreadValues$r({}, objectRemoveEmpty({
19193
+ const cacheOptions = cacheProps ? cacheProps : __spreadProps$j(__spreadValues$s({}, objectRemoveEmpty({
19194
19194
  headers,
19195
19195
  withCredentials,
19196
19196
  responseType,
@@ -19213,7 +19213,7 @@ class NgwConnector {
19213
19213
  var _a;
19214
19214
  if (this.user) {
19215
19215
  options = options || {};
19216
- options.headers = __spreadValues$r(__spreadValues$r({}, this.getAuthorizationHeaders()), options.headers);
19216
+ options.headers = __spreadValues$s(__spreadValues$s({}, this.getAuthorizationHeaders()), options.headers);
19217
19217
  }
19218
19218
  if (this.requestTransform) {
19219
19219
  const [transUrl, transOptions] = this.requestTransform(url, options);
@@ -19244,7 +19244,7 @@ class NgwConnector {
19244
19244
  });
19245
19245
  }
19246
19246
  _login(credentials, options) {
19247
- return __async$r(this, null, function* () {
19247
+ return __async$s(this, null, function* () {
19248
19248
  try {
19249
19249
  const data = yield this.getUserInfo(credentials, options);
19250
19250
  this.user = data;
@@ -19272,7 +19272,7 @@ class NgwConnector {
19272
19272
  return er;
19273
19273
  }
19274
19274
  }
19275
- __publicField$s(NgwConnector, "errors", errors);
19275
+ __publicField$t(NgwConnector, "errors", errors);
19276
19276
 
19277
19277
  function resourceCompare(res1, res2) {
19278
19278
  return objectDeepEqual(res1, res2);
@@ -19302,27 +19302,27 @@ function resourceToQuery(resource, prefix = "") {
19302
19302
  return query;
19303
19303
  }
19304
19304
 
19305
- var __defProp$C = Object.defineProperty;
19306
- var __defProps$h = Object.defineProperties;
19307
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
19308
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
19309
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
19310
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
19311
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19312
- 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) => {
19313
19313
  for (var prop in b || (b = {}))
19314
- if (__hasOwnProp$r.call(b, prop))
19315
- __defNormalProp$C(a, prop, b[prop]);
19316
- if (__getOwnPropSymbols$r)
19317
- for (var prop of __getOwnPropSymbols$r(b)) {
19318
- if (__propIsEnum$r.call(b, prop))
19319
- __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]);
19320
19320
  }
19321
19321
  return a;
19322
19322
  };
19323
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
19324
- var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
19325
- 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) => {
19326
19326
  return new Promise((resolve, reject) => {
19327
19327
  var fulfilled = (value) => {
19328
19328
  try {
@@ -19347,8 +19347,8 @@ class ResourcesControl {
19347
19347
  connector,
19348
19348
  cacheId
19349
19349
  }) {
19350
- __publicField$r(this, "cache");
19351
- __publicField$r(this, "connector");
19350
+ __publicField$s(this, "cache");
19351
+ __publicField$s(this, "connector");
19352
19352
  this.connector = connector;
19353
19353
  this.cache = new Cache({ namespace: cacheId });
19354
19354
  }
@@ -19363,7 +19363,7 @@ class ResourcesControl {
19363
19363
  * Fetching resource would be cached to speed up next call
19364
19364
  */
19365
19365
  getOne(resource, requestOptions) {
19366
- const opt = __spreadValues$q({}, requestOptions);
19366
+ const opt = __spreadValues$r({}, requestOptions);
19367
19367
  if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
19368
19368
  if (resource.id !== void 0) {
19369
19369
  resource.id;
@@ -19440,8 +19440,8 @@ class ResourcesControl {
19440
19440
  } else {
19441
19441
  Object.assign(query, resourceToQuery(resource));
19442
19442
  }
19443
- return this.connector.route("resource.search").get(__spreadProps$h(__spreadValues$q({}, requestOptions), {
19444
- query: __spreadValues$q({
19443
+ return this.connector.route("resource.search").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
19444
+ query: __spreadValues$r({
19445
19445
  serialization: "full"
19446
19446
  }, query)
19447
19447
  })).then((resources) => {
@@ -19494,7 +19494,7 @@ class ResourcesControl {
19494
19494
  });
19495
19495
  }
19496
19496
  _getChildrenOf(_0, _1) {
19497
- return __async$q(this, arguments, function* (parentDef, requestOptions, _items = []) {
19497
+ return __async$r(this, arguments, function* (parentDef, requestOptions, _items = []) {
19498
19498
  let parent = void 0;
19499
19499
  if (typeof parentDef === "string") {
19500
19500
  parent = yield this.getId(parentDef, requestOptions);
@@ -19503,7 +19503,7 @@ class ResourcesControl {
19503
19503
  } else {
19504
19504
  parent = parentDef;
19505
19505
  }
19506
- 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), {
19507
19507
  query: {
19508
19508
  parent
19509
19509
  }
@@ -19531,7 +19531,7 @@ class ResourcesControl {
19531
19531
  });
19532
19532
  }
19533
19533
  _cleanResourceItemCache(id) {
19534
- return __async$q(this, null, function* () {
19534
+ return __async$r(this, null, function* () {
19535
19535
  var _a;
19536
19536
  const all = this.cache.all();
19537
19537
  const toDelete = [];
@@ -19584,13 +19584,13 @@ class ResourcesControl {
19584
19584
  }
19585
19585
  }
19586
19586
 
19587
- var __defProp$B = Object.defineProperty;
19588
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19589
- 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);
19590
19590
  class NgwConnectorExtended extends NgwConnector {
19591
19591
  constructor(options) {
19592
19592
  super(options);
19593
- __publicField$q(this, "resources");
19593
+ __publicField$r(this, "resources");
19594
19594
  this.resources = new ResourcesControl({
19595
19595
  connector: this,
19596
19596
  cacheId: options.cacheId
@@ -19800,25 +19800,25 @@ class NgwConnectorExtended extends NgwConnector {
19800
19800
  }
19801
19801
  }
19802
19802
 
19803
- var __defProp$A = Object.defineProperty;
19804
- var __defProps$g = Object.defineProperties;
19805
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
19806
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
19807
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
19808
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
19809
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19810
- 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) => {
19811
19811
  for (var prop in b || (b = {}))
19812
- if (__hasOwnProp$q.call(b, prop))
19813
- __defNormalProp$A(a, prop, b[prop]);
19814
- if (__getOwnPropSymbols$q)
19815
- for (var prop of __getOwnPropSymbols$q(b)) {
19816
- if (__propIsEnum$q.call(b, prop))
19817
- __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]);
19818
19818
  }
19819
19819
  return a;
19820
19820
  };
19821
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
19821
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
19822
19822
  function getNgwWebmapExtent(webmap) {
19823
19823
  const bottom = webmap["extent_bottom"];
19824
19824
  const left = webmap["extent_left"];
@@ -19885,14 +19885,14 @@ function fetchNgwResourceExtent(item, connector, options) {
19885
19885
  if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
19886
19886
  return connector.getResource(resource.parent.id, options).then((res) => {
19887
19887
  if (res) {
19888
- return fetchNgwLayerExtent(__spreadProps$g(__spreadValues$p({}, options), {
19888
+ return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
19889
19889
  resourceId: res.resource.id,
19890
19890
  connector
19891
19891
  }));
19892
19892
  }
19893
19893
  });
19894
19894
  } else {
19895
- return fetchNgwLayerExtent(__spreadProps$g(__spreadValues$p({}, options), {
19895
+ return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
19896
19896
  resourceId: resource.id,
19897
19897
  connector
19898
19898
  }));
@@ -19900,10 +19900,10 @@ function fetchNgwResourceExtent(item, connector, options) {
19900
19900
  }
19901
19901
  }
19902
19902
 
19903
- var __defProp$z = Object.defineProperty;
19904
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19905
- var __publicField$p = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
19906
- 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) => {
19907
19907
  return new Promise((resolve, reject) => {
19908
19908
  var fulfilled = (value) => {
19909
19909
  try {
@@ -19925,18 +19925,18 @@ var __async$p = (__this, __arguments, generator) => {
19925
19925
  };
19926
19926
  class NgwResource {
19927
19927
  constructor() {
19928
- __publicField$p(this, "item");
19929
- __publicField$p(this, "connector");
19930
- __publicField$p(this, "_extent");
19928
+ __publicField$q(this, "item");
19929
+ __publicField$q(this, "connector");
19930
+ __publicField$q(this, "_extent");
19931
19931
  }
19932
19932
  /** @deprecated use {@link NgwResource.getBounds} instead */
19933
19933
  getExtent() {
19934
- return __async$p(this, null, function* () {
19934
+ return __async$q(this, null, function* () {
19935
19935
  return this.getBounds();
19936
19936
  });
19937
19937
  }
19938
19938
  getBounds(options) {
19939
- return __async$p(this, null, function* () {
19939
+ return __async$q(this, null, function* () {
19940
19940
  if (this._extent) {
19941
19941
  return this._extent;
19942
19942
  }
@@ -19952,7 +19952,7 @@ class NgwResource {
19952
19952
  }
19953
19953
  }
19954
19954
 
19955
- var __async$o = (__this, __arguments, generator) => {
19955
+ var __async$p = (__this, __arguments, generator) => {
19956
19956
  return new Promise((resolve, reject) => {
19957
19957
  var fulfilled = (value) => {
19958
19958
  try {
@@ -19973,7 +19973,7 @@ var __async$o = (__this, __arguments, generator) => {
19973
19973
  });
19974
19974
  };
19975
19975
  function resourceIdFromLayerOptions(options, connector) {
19976
- return __async$o(this, null, function* () {
19976
+ return __async$p(this, null, function* () {
19977
19977
  const resource = options.resource;
19978
19978
  const item = resource;
19979
19979
  let { keyname, resourceId } = options;
@@ -19998,24 +19998,24 @@ function resourceIdFromLayerOptions(options, connector) {
19998
19998
  });
19999
19999
  }
20000
20000
 
20001
- var __defProp$y = Object.defineProperty;
20002
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
20003
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
20004
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
20005
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20006
- 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) => {
20007
20007
  for (var prop in b || (b = {}))
20008
- if (__hasOwnProp$p.call(b, prop))
20009
- __defNormalProp$y(a, prop, b[prop]);
20010
- if (__getOwnPropSymbols$p)
20011
- for (var prop of __getOwnPropSymbols$p(b)) {
20012
- if (__propIsEnum$p.call(b, prop))
20013
- __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]);
20014
20014
  }
20015
20015
  return a;
20016
20016
  };
20017
- var __publicField$o = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
20018
- 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) => {
20019
20019
  return new Promise((resolve, reject) => {
20020
20020
  var fulfilled = (value) => {
20021
20021
  try {
@@ -20036,7 +20036,7 @@ var __async$n = (__this, __arguments, generator) => {
20036
20036
  });
20037
20037
  };
20038
20038
  function createOnFirstShowAdapter(_0) {
20039
- return __async$n(this, arguments, function* ({
20039
+ return __async$o(this, arguments, function* ({
20040
20040
  webMap,
20041
20041
  adapterOptions = {},
20042
20042
  onLayerAdded,
@@ -20044,10 +20044,10 @@ function createOnFirstShowAdapter(_0) {
20044
20044
  }) {
20045
20045
  class OnFirstShowAdapter {
20046
20046
  constructor() {
20047
- __publicField$o(this, "options", {});
20048
- __publicField$o(this, "layer", []);
20049
- __publicField$o(this, "_removed", false);
20050
- __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);
20051
20051
  }
20052
20052
  addLayer() {
20053
20053
  return this.layer;
@@ -20062,7 +20062,7 @@ function createOnFirstShowAdapter(_0) {
20062
20062
  return this._removed;
20063
20063
  }
20064
20064
  showLayer() {
20065
- return __async$n(this, null, function* () {
20065
+ return __async$o(this, null, function* () {
20066
20066
  this.options.visibility = true;
20067
20067
  if (this.layer.length) {
20068
20068
  for (const x of this.layer) {
@@ -20074,7 +20074,7 @@ function createOnFirstShowAdapter(_0) {
20074
20074
  });
20075
20075
  }
20076
20076
  hideLayer() {
20077
- return __async$n(this, null, function* () {
20077
+ return __async$o(this, null, function* () {
20078
20078
  this.options.visibility = false;
20079
20079
  if (this.layer) {
20080
20080
  for (const x of this.layer) {
@@ -20084,12 +20084,12 @@ function createOnFirstShowAdapter(_0) {
20084
20084
  });
20085
20085
  }
20086
20086
  loadLayer() {
20087
- return __async$n(this, null, function* () {
20087
+ return __async$o(this, null, function* () {
20088
20088
  if (!this.layer.length && !this._creatingInProgress) {
20089
20089
  this._creatingInProgress = true;
20090
20090
  const Adapter = yield createAdapter(this);
20091
20091
  if (Adapter) {
20092
- const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$o({}, adapterOptions));
20092
+ const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$p({}, adapterOptions));
20093
20093
  const realLayer = yield adapter.addLayer({
20094
20094
  order: this.options.order,
20095
20095
  headers: this.options.headers,
@@ -20118,7 +20118,7 @@ function createOnFirstShowAdapter(_0) {
20118
20118
  });
20119
20119
  }
20120
20120
 
20121
- var __async$m = (__this, __arguments, generator) => {
20121
+ var __async$n = (__this, __arguments, generator) => {
20122
20122
  return new Promise((resolve, reject) => {
20123
20123
  var fulfilled = (value) => {
20124
20124
  try {
@@ -20139,7 +20139,7 @@ var __async$m = (__this, __arguments, generator) => {
20139
20139
  });
20140
20140
  };
20141
20141
  function createOnFirstShowNgwAdapter(_0) {
20142
- return __async$m(this, arguments, function* ({
20142
+ return __async$n(this, arguments, function* ({
20143
20143
  webMap,
20144
20144
  connector,
20145
20145
  item,
@@ -20177,26 +20177,26 @@ const config = {
20177
20177
  defaultRequestLimit: 7e3
20178
20178
  };
20179
20179
 
20180
- var __defProp$x = Object.defineProperty;
20181
- var __defProps$f = Object.defineProperties;
20182
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
20183
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
20184
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
20185
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
20186
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20187
- 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) => {
20188
20188
  for (var prop in b || (b = {}))
20189
- if (__hasOwnProp$o.call(b, prop))
20190
- __defNormalProp$x(a, prop, b[prop]);
20191
- if (__getOwnPropSymbols$o)
20192
- for (var prop of __getOwnPropSymbols$o(b)) {
20193
- if (__propIsEnum$o.call(b, prop))
20194
- __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]);
20195
20195
  }
20196
20196
  return a;
20197
20197
  };
20198
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
20199
- 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) => {
20200
20200
  return new Promise((resolve, reject) => {
20201
20201
  var fulfilled = (value) => {
20202
20202
  try {
@@ -20263,7 +20263,7 @@ function paramListToQuery(paramList) {
20263
20263
  );
20264
20264
  }
20265
20265
  function createFeatureFieldFilterQueries(opt) {
20266
- return __async$l(this, null, function* () {
20266
+ return __async$m(this, null, function* () {
20267
20267
  const queries = getQueries(opt);
20268
20268
  const itemsParts = yield Promise.all(queries);
20269
20269
  const ids = [];
@@ -20307,13 +20307,13 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20307
20307
  for (const f of filters_) {
20308
20308
  if (isPropertyFilter(f)) {
20309
20309
  _queries.push(
20310
- fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$n({}, opt), {
20310
+ fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
20311
20311
  paramList: [..._parentAllParams, ...paramList, createParam(f)]
20312
20312
  }))
20313
20313
  );
20314
20314
  } else {
20315
20315
  getQueries(
20316
- __spreadProps$f(__spreadValues$n({}, opt), {
20316
+ __spreadProps$g(__spreadValues$o({}, opt), {
20317
20317
  filters: f
20318
20318
  }),
20319
20319
  _queries,
@@ -20334,7 +20334,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20334
20334
  if (propertiesFilterList.length) {
20335
20335
  for (const x of propertiesFilterList) {
20336
20336
  getQueries(
20337
- __spreadProps$f(__spreadValues$n({}, opt), {
20337
+ __spreadProps$g(__spreadValues$o({}, opt), {
20338
20338
  filters: x
20339
20339
  }),
20340
20340
  _queries,
@@ -20343,7 +20343,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20343
20343
  }
20344
20344
  } else {
20345
20345
  _queries.push(
20346
- fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$n({}, opt), {
20346
+ fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
20347
20347
  paramList: [..._parentAllParams, ...paramList, ...filters2]
20348
20348
  }))
20349
20349
  );
@@ -20359,7 +20359,7 @@ function createWktFromCoordArray(coord) {
20359
20359
  return `POLYGON((${polygon.join(", ")}))`;
20360
20360
  }
20361
20361
  function fetchNgwLayerItemsRequest(options) {
20362
- const params = __spreadValues$n({}, FEATURE_REQUEST_PARAMS);
20362
+ const params = __spreadValues$o({}, FEATURE_REQUEST_PARAMS);
20363
20363
  const {
20364
20364
  limit,
20365
20365
  query,
@@ -20397,7 +20397,7 @@ function fetchNgwLayerItemsRequest(options) {
20397
20397
  if (paramList) {
20398
20398
  Object.assign(params, paramListToQuery(paramList));
20399
20399
  }
20400
- 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 });
20401
20401
  }
20402
20402
 
20403
20403
  function prepareNgwFieldsToPropertiesFilter(fields) {
@@ -20426,26 +20426,26 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
20426
20426
  return fields;
20427
20427
  }
20428
20428
 
20429
- var __defProp$w = Object.defineProperty;
20430
- var __defProps$e = Object.defineProperties;
20431
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
20432
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
20433
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
20434
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
20435
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20436
- 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) => {
20437
20437
  for (var prop in b || (b = {}))
20438
- if (__hasOwnProp$n.call(b, prop))
20439
- __defNormalProp$w(a, prop, b[prop]);
20440
- if (__getOwnPropSymbols$n)
20441
- for (var prop of __getOwnPropSymbols$n(b)) {
20442
- if (__propIsEnum$n.call(b, prop))
20443
- __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]);
20444
20444
  }
20445
20445
  return a;
20446
20446
  };
20447
- var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
20448
- 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) => {
20449
20449
  return new Promise((resolve, reject) => {
20450
20450
  var fulfilled = (value) => {
20451
20451
  try {
@@ -20466,17 +20466,17 @@ var __async$k = (__this, __arguments, generator) => {
20466
20466
  });
20467
20467
  };
20468
20468
  function fetchNgwLayerItems(options) {
20469
- return __async$k(this, null, function* () {
20469
+ return __async$l(this, null, function* () {
20470
20470
  var _a;
20471
20471
  const filters = options.filters;
20472
20472
  if (filters) {
20473
- let data = yield createFeatureFieldFilterQueries(__spreadProps$e(__spreadValues$m({}, options), {
20473
+ let data = yield createFeatureFieldFilterQueries(__spreadProps$f(__spreadValues$n({}, options), {
20474
20474
  filters
20475
20475
  }));
20476
20476
  const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
20477
20477
  if (clientFilterValidate) {
20478
20478
  data = data.filter((y) => {
20479
- const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$e(__spreadValues$m({}, y.fields), {
20479
+ const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$f(__spreadValues$n({}, y.fields), {
20480
20480
  id: y.id
20481
20481
  }));
20482
20482
  const result = propertiesFilter(fields, filters);
@@ -20594,26 +20594,26 @@ function ngwApiToAdapterOptions({
20594
20594
  }
20595
20595
  }
20596
20596
 
20597
- var __defProp$v = Object.defineProperty;
20598
- var __defProps$d = Object.defineProperties;
20599
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
20600
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
20601
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
20602
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
20603
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20604
- 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) => {
20605
20605
  for (var prop in b || (b = {}))
20606
- if (__hasOwnProp$m.call(b, prop))
20607
- __defNormalProp$v(a, prop, b[prop]);
20608
- if (__getOwnPropSymbols$m)
20609
- for (var prop of __getOwnPropSymbols$m(b)) {
20610
- if (__propIsEnum$m.call(b, prop))
20611
- __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]);
20612
20612
  }
20613
20613
  return a;
20614
20614
  };
20615
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
20616
- 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) => {
20617
20617
  return new Promise((resolve, reject) => {
20618
20618
  var fulfilled = (value) => {
20619
20619
  try {
@@ -20634,56 +20634,56 @@ var __async$j = (__this, __arguments, generator) => {
20634
20634
  });
20635
20635
  };
20636
20636
  function fetchNgwLayerItem(options) {
20637
- return __async$j(this, null, function* () {
20638
- const params = __spreadValues$l({}, FEATURE_REQUEST_PARAMS);
20637
+ return __async$k(this, null, function* () {
20638
+ const params = __spreadValues$m({}, FEATURE_REQUEST_PARAMS);
20639
20639
  updateItemRequestParam(params, options);
20640
20640
  const resp = yield options.connector.route("feature_layer.feature.item", {
20641
20641
  id: Number(options.resourceId),
20642
20642
  fid: options.featureId
20643
- }).get(__spreadProps$d(__spreadValues$l({}, options), { query: params }));
20644
- const toGeojson = () => __async$j(this, null, function* () {
20643
+ }).get(__spreadProps$e(__spreadValues$m({}, options), { query: params }));
20644
+ const toGeojson = () => __async$k(this, null, function* () {
20645
20645
  if (resp.geom) {
20646
20646
  return createGeoJsonFeature(resp);
20647
20647
  } else {
20648
- const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$d(__spreadValues$l({}, options), {
20648
+ const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$m({}, options), {
20649
20649
  geom: true,
20650
20650
  fields: null,
20651
20651
  extensions: null
20652
20652
  }));
20653
20653
  const geom = onlyGeomItem.geom;
20654
- return createGeoJsonFeature(__spreadProps$d(__spreadValues$l({}, resp), { geom }));
20654
+ return createGeoJsonFeature(__spreadProps$e(__spreadValues$m({}, resp), { geom }));
20655
20655
  }
20656
20656
  });
20657
- return __spreadProps$d(__spreadValues$l({}, resp), {
20657
+ return __spreadProps$e(__spreadValues$m({}, resp), {
20658
20658
  toGeojson
20659
20659
  });
20660
20660
  });
20661
20661
  }
20662
20662
 
20663
- var __defProp$u = Object.defineProperty;
20664
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
20665
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
20666
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
20667
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20668
- 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) => {
20669
20669
  for (var prop in b || (b = {}))
20670
- if (__hasOwnProp$l.call(b, prop))
20671
- __defNormalProp$u(a, prop, b[prop]);
20672
- if (__getOwnPropSymbols$l)
20673
- for (var prop of __getOwnPropSymbols$l(b)) {
20674
- if (__propIsEnum$l.call(b, prop))
20675
- __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]);
20676
20676
  }
20677
20677
  return a;
20678
20678
  };
20679
- 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);
20680
20680
  class BookmarkItem {
20681
20681
  constructor(options) {
20682
20682
  this.options = options;
20683
- __publicField$n(this, "name");
20684
- __publicField$n(this, "resourceId");
20685
- __publicField$n(this, "item");
20686
- __publicField$n(this, "_extent");
20683
+ __publicField$o(this, "name");
20684
+ __publicField$o(this, "resourceId");
20685
+ __publicField$o(this, "item");
20686
+ __publicField$o(this, "_extent");
20687
20687
  this.resourceId = options.resourceId;
20688
20688
  const item = options.item;
20689
20689
  this.item = item;
@@ -20713,7 +20713,7 @@ class BookmarkItem {
20713
20713
  if (this.item.geom) {
20714
20714
  return Promise.resolve(createGeoJsonFeature(this.item));
20715
20715
  } else {
20716
- return fetchNgwLayerItem(__spreadValues$k({
20716
+ return fetchNgwLayerItem(__spreadValues$l({
20717
20717
  resourceId: this.resourceId,
20718
20718
  featureId: this.item.id,
20719
20719
  connector: this.options.connector,
@@ -20731,19 +20731,19 @@ class BookmarkItem {
20731
20731
 
20732
20732
  const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
20733
20733
 
20734
- var __defProp$t = Object.defineProperty;
20735
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20736
- 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);
20737
20737
  class BaseProperty {
20738
20738
  constructor(name, item, options) {
20739
- __publicField$m(this, "options");
20740
- __publicField$m(this, "emitter", new EventEmitter());
20741
- __publicField$m(this, "name");
20742
- __publicField$m(this, "item");
20743
- __publicField$m(this, "_blocked", false);
20744
- __publicField$m(this, "_container");
20745
- __publicField$m(this, "_value");
20746
- __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");
20747
20747
  this.item = item;
20748
20748
  this.options = Object.assign({}, options);
20749
20749
  this.name = name;
@@ -20838,28 +20838,28 @@ class BaseProperty {
20838
20838
  });
20839
20839
  return isBlocked;
20840
20840
  }
20841
- }
20842
-
20843
- var __defProp$s = Object.defineProperty;
20844
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
20845
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
20846
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
20847
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20848
- 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) => {
20849
20849
  for (var prop in b || (b = {}))
20850
- if (__hasOwnProp$k.call(b, prop))
20851
- __defNormalProp$s(a, prop, b[prop]);
20852
- if (__getOwnPropSymbols$k)
20853
- for (var prop of __getOwnPropSymbols$k(b)) {
20854
- if (__propIsEnum$k.call(b, prop))
20855
- __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]);
20856
20856
  }
20857
20857
  return a;
20858
20858
  };
20859
- var __publicField$l = (obj, key, value) => __defNormalProp$s(obj, key + "" , value);
20859
+ var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, key + "" , value);
20860
20860
  const _CheckProperty = class _CheckProperty extends BaseProperty {
20861
20861
  constructor(name, item, options) {
20862
- super(name, item, __spreadValues$j(__spreadValues$j({}, _CheckProperty.options), options));
20862
+ super(name, item, __spreadValues$k(__spreadValues$k({}, _CheckProperty.options), options));
20863
20863
  this.set(this.get());
20864
20864
  }
20865
20865
  update(value, options) {
@@ -20955,7 +20955,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
20955
20955
  const child = children[fry];
20956
20956
  const property = child.properties && child.properties.property(this.name);
20957
20957
  if (property) {
20958
- property.set(value, __spreadValues$j(__spreadValues$j({}, options), {
20958
+ property.set(value, __spreadValues$k(__spreadValues$k({}, options), {
20959
20959
  propagation: true,
20960
20960
  bubble: false
20961
20961
  }));
@@ -20964,7 +20964,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
20964
20964
  }
20965
20965
  }
20966
20966
  };
20967
- __publicField$l(_CheckProperty, "options", {
20967
+ __publicField$m(_CheckProperty, "options", {
20968
20968
  hierarchy: true,
20969
20969
  bubble: false,
20970
20970
  propagation: false,
@@ -20973,31 +20973,31 @@ __publicField$l(_CheckProperty, "options", {
20973
20973
  });
20974
20974
  let CheckProperty = _CheckProperty;
20975
20975
 
20976
- var __defProp$r = Object.defineProperty;
20977
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
20978
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
20979
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
20980
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20981
- 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) => {
20982
20982
  for (var prop in b || (b = {}))
20983
- if (__hasOwnProp$j.call(b, prop))
20984
- __defNormalProp$r(a, prop, b[prop]);
20985
- if (__getOwnPropSymbols$j)
20986
- for (var prop of __getOwnPropSymbols$j(b)) {
20987
- if (__propIsEnum$j.call(b, prop))
20988
- __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]);
20989
20989
  }
20990
20990
  return a;
20991
20991
  };
20992
- 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);
20993
20993
  const BOOLEAN_TYPE = "boolean";
20994
20994
  const STRING_TYPE = "string";
20995
20995
  const _ItemProperties = class _ItemProperties {
20996
20996
  constructor(item, propertiesList) {
20997
20997
  this.item = item;
20998
- __publicField$k(this, "options", {});
20999
- __publicField$k(this, "_properties", {});
21000
- __publicField$k(this, "_propertiesList", []);
20998
+ __publicField$l(this, "options", {});
20999
+ __publicField$l(this, "_properties", {});
21000
+ __publicField$l(this, "_propertiesList", []);
21001
21001
  if (propertiesList) {
21002
21002
  propertiesList.forEach(this._setPropertyHandler.bind(this));
21003
21003
  }
@@ -21037,7 +21037,7 @@ const _ItemProperties = class _ItemProperties {
21037
21037
  _setPropertyHandler(propOpt) {
21038
21038
  const Handler = this._getHandler(propOpt);
21039
21039
  if (Handler && propOpt.name) {
21040
- const options = __spreadValues$i({}, propOpt);
21040
+ const options = __spreadValues$j({}, propOpt);
21041
21041
  this._properties[propOpt.name] = new Handler(
21042
21042
  propOpt.name,
21043
21043
  this.item,
@@ -21060,7 +21060,7 @@ const _ItemProperties = class _ItemProperties {
21060
21060
  return Handler;
21061
21061
  }
21062
21062
  };
21063
- __publicField$k(_ItemProperties, "handlers", {
21063
+ __publicField$l(_ItemProperties, "handlers", {
21064
21064
  CheckProperty
21065
21065
  });
21066
21066
  let ItemProperties = _ItemProperties;
@@ -21167,14 +21167,14 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
21167
21167
  return true;
21168
21168
  }
21169
21169
 
21170
- var __defProp$q = Object.defineProperty;
21171
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21172
- 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);
21173
21173
  class TreeHelper {
21174
21174
  constructor(item) {
21175
- __publicField$j(this, "item");
21176
- __publicField$j(this, "_children", []);
21177
- __publicField$j(this, "_parent");
21175
+ __publicField$k(this, "item");
21176
+ __publicField$k(this, "_children", []);
21177
+ __publicField$k(this, "_parent");
21178
21178
  this.item = item;
21179
21179
  }
21180
21180
  setParent(parent) {
@@ -21237,32 +21237,32 @@ class TreeHelper {
21237
21237
  }
21238
21238
  }
21239
21239
 
21240
- var __defProp$p = Object.defineProperty;
21241
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
21242
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
21243
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
21244
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21245
- 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) => {
21246
21246
  for (var prop in b || (b = {}))
21247
- if (__hasOwnProp$i.call(b, prop))
21248
- __defNormalProp$p(a, prop, b[prop]);
21249
- if (__getOwnPropSymbols$i)
21250
- for (var prop of __getOwnPropSymbols$i(b)) {
21251
- if (__propIsEnum$i.call(b, prop))
21252
- __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]);
21253
21253
  }
21254
21254
  return a;
21255
21255
  };
21256
- 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);
21257
21257
  let ID$1 = 0;
21258
21258
  class Item {
21259
21259
  constructor(options) {
21260
- __publicField$i(this, "options", {});
21261
- __publicField$i(this, "properties");
21262
- __publicField$i(this, "tree");
21263
- __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);
21264
21264
  ID$1 += 1;
21265
- this.options = __spreadValues$h({}, options);
21265
+ this.options = __spreadValues$i({}, options);
21266
21266
  this.tree = new TreeHelper(this);
21267
21267
  }
21268
21268
  initProperties() {
@@ -21314,6 +21314,161 @@ class WebmapLayerOpacityPropertyHandler extends BaseProperty {
21314
21314
  }
21315
21315
  }
21316
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
+
21317
21472
  var __defProp$o = Object.defineProperty;
21318
21473
  var __defProps$c = Object.defineProperties;
21319
21474
  var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
@@ -21355,14 +21510,23 @@ var __async$i = (__this, __arguments, generator) => {
21355
21510
  });
21356
21511
  };
21357
21512
  const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21358
- constructor(webMap, item, options, connector, parent, noInit) {
21513
+ constructor({
21514
+ webMap,
21515
+ item,
21516
+ options,
21517
+ connector,
21518
+ parent,
21519
+ noInit
21520
+ }) {
21359
21521
  super(__spreadValues$g(__spreadValues$g({}, _NgwWebmapItem.options), options));
21360
- this.webMap = webMap;
21361
21522
  __publicField$h(this, "item");
21523
+ __publicField$h(this, "webMap");
21362
21524
  __publicField$h(this, "connector");
21363
21525
  __publicField$h(this, "layer");
21526
+ __publicField$h(this, "legend");
21364
21527
  __publicField$h(this, "emitter", new EventEmitter());
21365
21528
  __publicField$h(this, "_rootDescendantsCount", 0);
21529
+ this.webMap = webMap;
21366
21530
  if (connector) {
21367
21531
  this.connector = connector;
21368
21532
  }
@@ -21385,14 +21549,14 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21385
21549
  }
21386
21550
  static create(webMap, item, options, connector, parent) {
21387
21551
  return __async$i(this, null, function* () {
21388
- const ngwWebmapItem = new _NgwWebmapItem(
21552
+ const ngwWebmapItem = new _NgwWebmapItem({
21389
21553
  webMap,
21390
21554
  item,
21391
21555
  options,
21392
21556
  connector,
21393
21557
  parent,
21394
- true
21395
- );
21558
+ noInit: true
21559
+ });
21396
21560
  yield ngwWebmapItem._init(item);
21397
21561
  return ngwWebmapItem;
21398
21562
  });
@@ -21414,22 +21578,36 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21414
21578
  }
21415
21579
  getLegend(options) {
21416
21580
  return __async$i(this, null, function* () {
21417
- var _a;
21581
+ var _a, _b;
21418
21582
  const id = (_a = this.layer) == null ? void 0 : _a.id;
21419
21583
  if (id !== void 0) {
21420
21584
  const connector = this.connector;
21421
21585
  if (connector && "resourceId" in this.item) {
21422
- const ngwLegend = yield connector.route("render.legend_symbols", { id: Number(this.item.resourceId) }).get(__spreadValues$g({}, options));
21423
- const legend = {
21424
- layerId: id,
21425
- legend: ngwLegend.map((legend2) => __spreadValues$g({
21426
- /** @deprecated use display_name instead */
21427
- name: legend2.display_name,
21428
- /** @deprecated use icon instead */
21429
- symbol: legend2.icon
21430
- }, legend2))
21431
- };
21432
- 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 [];
21433
21611
  }
21434
21612
  }
21435
21613
  return [];
@@ -21484,13 +21662,13 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21484
21662
  if (group.children && group.children.length) {
21485
21663
  const children = this.getChildren(group);
21486
21664
  for (const child of children) {
21487
- const childItem = new this.constructor(
21488
- this.webMap,
21489
- child,
21490
- this.options,
21491
- this.connector,
21492
- this
21493
- );
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
+ });
21494
21672
  this.tree.addChild(childItem);
21495
21673
  }
21496
21674
  }
@@ -21518,6 +21696,15 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21518
21696
  }
21519
21697
  if (adapter) {
21520
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
+ });
21521
21708
  setNewLayer(newLayer);
21522
21709
  });
21523
21710
  }
@@ -21820,12 +22007,12 @@ class NgwWebmapLayerAdapter {
21820
22007
  headers,
21821
22008
  drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
21822
22009
  });
21823
- const layer = new this.NgwWebmapItem(
21824
- this.options.webMap,
21825
- webmap.root_item,
22010
+ const layer = new this.NgwWebmapItem({
22011
+ webMap: this.options.webMap,
22012
+ item: webmap.root_item,
21826
22013
  options,
21827
22014
  connector
21828
- );
22015
+ });
21829
22016
  layer.emitter.on("init", () => {
21830
22017
  resolve(layer);
21831
22018
  });
@@ -21891,6 +22078,7 @@ class NgwWebmapLayerAdapter {
21891
22078
  }
21892
22079
  }
21893
22080
  _updateItemsParams(item, webMap, data) {
22081
+ var _a;
21894
22082
  if (item) {
21895
22083
  if (item.item_type === "group" || item.item_type === "root") {
21896
22084
  if ("children" in item && item.children) {
@@ -21923,6 +22111,9 @@ class NgwWebmapLayerAdapter {
21923
22111
  item = __spreadValues$f(__spreadValues$f({}, layerItem), layerAdapterOptions);
21924
22112
  }
21925
22113
  }
22114
+ if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
22115
+ item = this.options.nativeOptions.beforeItemCreated(item);
22116
+ }
21926
22117
  return item;
21927
22118
  }
21928
22119
  }
@@ -22808,42 +22999,6 @@ var __async$b = (__this, __arguments, generator) => {
22808
22999
  step((generator = generator.apply(__this, __arguments)).next());
22809
23000
  });
22810
23001
  };
22811
- class Legend {
22812
- constructor({
22813
- layerId,
22814
- legend,
22815
- onSymbolRenderChange
22816
- }) {
22817
- __publicField$c(this, "layerId");
22818
- __publicField$c(this, "legend");
22819
- __publicField$c(this, "onSymbolRenderChange");
22820
- this.layerId = layerId;
22821
- this.legend = this.createLegend(legend);
22822
- this.onSymbolRenderChange = onSymbolRenderChange;
22823
- }
22824
- createLegend(items) {
22825
- return items.map((params) => __spreadProps$7(__spreadValues$9({}, params), {
22826
- /** @deprecated use display_name instead */
22827
- name: params.display_name,
22828
- /** @deprecated use icon instead */
22829
- symbol: params.icon
22830
- }));
22831
- }
22832
- setSymbolRender(symbolIndex, status) {
22833
- const legendItem = this.legend.find((l) => l.index === symbolIndex);
22834
- if (legendItem) {
22835
- const render = legendItem.render;
22836
- if (render !== status) {
22837
- legendItem.render = status;
22838
- if (this.onSymbolRenderChange) {
22839
- this.onSymbolRenderChange(
22840
- this.legend.filter((l) => l.render).map((l) => l.index)
22841
- );
22842
- }
22843
- }
22844
- }
22845
- }
22846
- }
22847
23002
  function createRasterAdapter(_0) {
22848
23003
  return __async$b(this, arguments, function* ({
22849
23004
  layerOptions,
@@ -22879,8 +23034,8 @@ function createRasterAdapter(_0) {
22879
23034
  this.map = map;
22880
23035
  __publicField$c(this, "item", item);
22881
23036
  __publicField$c(this, "resourceId", resourceId);
22882
- __publicField$c(this, "_blocked", false);
22883
- __publicField$c(this, "_layerVisibility");
23037
+ __publicField$c(this, "blocked", false);
23038
+ __publicField$c(this, "layerVisibility");
22884
23039
  const opt = ngwApiToAdapterOptions({
22885
23040
  options: layerOptions,
22886
23041
  webMap,
@@ -22901,24 +23056,6 @@ function createRasterAdapter(_0) {
22901
23056
  addLayer(addOptions) {
22902
23057
  return super.addLayer(__spreadValues$9(__spreadValues$9({}, this.options), addOptions));
22903
23058
  }
22904
- showLayer() {
22905
- this._layerVisibility = true;
22906
- if (!this._blocked) {
22907
- if (super.showLayer) {
22908
- super.showLayer(this.layer);
22909
- } else if (this.layer) {
22910
- webMap.mapAdapter.showLayer(this.layer);
22911
- }
22912
- }
22913
- }
22914
- hideLayer() {
22915
- this._layerVisibility = false;
22916
- if (super.hideLayer) {
22917
- super.hideLayer(this.layer);
22918
- } else if (this.layer) {
22919
- webMap.mapAdapter.hideLayer(this.layer);
22920
- }
22921
- }
22922
23059
  getIdentificationIds() {
22923
23060
  return __async$b(this, null, function* () {
22924
23061
  if (this.item) {
@@ -22944,59 +23081,16 @@ function createRasterAdapter(_0) {
22944
23081
  }, options));
22945
23082
  const legend = new Legend({
22946
23083
  layerId: id,
22947
- legend: ngwLegend,
22948
- onSymbolRenderChange: this._setLegendSymbol.bind(this)
23084
+ layer: this,
23085
+ resourceId,
23086
+ webMap,
23087
+ legend: ngwLegend
22949
23088
  });
22950
23089
  return [legend];
22951
23090
  }
22952
23091
  return [];
22953
23092
  });
22954
23093
  }
22955
- _hideLayer() {
22956
- if (this.options.id) {
22957
- webMap.mapAdapter.hideLayer(this.layer);
22958
- }
22959
- }
22960
- _showLayer() {
22961
- if (this.options.id) {
22962
- if (this._layerVisibility) {
22963
- webMap.showLayer(this.options.id, { silent: true });
22964
- }
22965
- }
22966
- }
22967
- _setLegendSymbol(renderIndexes) {
22968
- const intervals = this._consolidateIntervals(renderIndexes);
22969
- if (!intervals.length) {
22970
- this._hideLayer();
22971
- this._blocked = true;
22972
- } else {
22973
- this._blocked = false;
22974
- this._showLayer();
22975
- }
22976
- if (this.updateLayer) {
22977
- this.updateLayer({
22978
- params: {
22979
- [`symbols[${resourceId}]`]: intervals.join(",") || void 0
22980
- }
22981
- });
22982
- }
22983
- }
22984
- _consolidateIntervals(symbols) {
22985
- const sortedSymbols = symbols.slice().sort((a, b) => a - b);
22986
- const intervals = [];
22987
- let start = sortedSymbols[0];
22988
- let end = start;
22989
- for (let i = 1; i <= sortedSymbols.length; i++) {
22990
- if (sortedSymbols[i] === end + 1) {
22991
- end = sortedSymbols[i];
22992
- } else {
22993
- intervals.push(start === end ? `${start}` : `${start}-${end}`);
22994
- start = sortedSymbols[i];
22995
- end = start;
22996
- }
22997
- }
22998
- return intervals;
22999
- }
23000
23094
  };
23001
23095
  } else {
23002
23096
  throw new Error(adapter + " not supported yet. Only TILE");
@@ -23358,16 +23452,25 @@ class IdentifyItem {
23358
23452
  });
23359
23453
  }
23360
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) {
23361
23461
  return __async$8(this, null, function* () {
23362
23462
  if (this._resource && this._resource.feature_layer) {
23363
- return this._resource.feature_layer;
23463
+ return this._resource;
23364
23464
  }
23365
23465
  const resp = yield this.connector.getResource(this.layerId, opt);
23366
- if (!(resp == null ? void 0 : resp.feature_layer)) {
23367
- 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");
23368
23471
  }
23369
23472
  this._resource = resp;
23370
- return resp.feature_layer;
23473
+ return resp;
23371
23474
  });
23372
23475
  }
23373
23476
  getBounds(opt) {
@@ -23380,7 +23483,7 @@ class IdentifyItem {
23380
23483
  resourceId: this.layerId
23381
23484
  }, opt));
23382
23485
  }
23383
- geojson(options) {
23486
+ geojson(options = {}) {
23384
23487
  if (this._geojson) {
23385
23488
  return Promise.resolve(this._geojson);
23386
23489
  }
@@ -26342,7 +26445,8 @@ const _NgwMap = class _NgwMap extends WebMap {
26342
26445
  const identFunc = typeof layer.getIdentificationIds === "function" ? layer.getIdentificationIds : false;
26343
26446
  const interactive = (_a = layer.options.interactive) != null ? _a : true;
26344
26447
  if (identFunc && layer.options.selectable && interactive && this.isLayerVisible(layer)) {
26345
- promises.push(identFunc.call(layer));
26448
+ const layerIds = identFunc.call(layer);
26449
+ promises.push(layerIds);
26346
26450
  }
26347
26451
  }
26348
26452
  const getIdsPromise = Promise.all(promises);