@maptiler/geocoding-control 3.0.0-rc.3 → 3.0.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +0 -2
  2. package/dist/index.js +1 -1
  3. package/dist/index.umd.js +9 -9
  4. package/dist/index.umd.js.map +1 -1
  5. package/dist/leaflet.public.js +25 -22
  6. package/dist/leaflet.public.js.map +1 -1
  7. package/dist/leaflet.public.umd.js +6 -6
  8. package/dist/leaflet.public.umd.js.map +1 -1
  9. package/dist/maplibregl.js +40 -45
  10. package/dist/maplibregl.js.map +1 -1
  11. package/dist/maplibregl.umd.js +23 -23
  12. package/dist/maplibregl.umd.js.map +1 -1
  13. package/dist/maptilersdk.js +143 -122
  14. package/dist/maptilersdk.js.map +1 -1
  15. package/dist/maptilersdk.umd.js +45 -45
  16. package/dist/maptilersdk.umd.js.map +1 -1
  17. package/dist/openlayers.public.js +135 -131
  18. package/dist/openlayers.public.js.map +1 -1
  19. package/dist/openlayers.public.umd.js +28 -28
  20. package/dist/openlayers.public.umd.js.map +1 -1
  21. package/dist/src/controls/base-control.d.ts +4 -0
  22. package/dist/src/controls/leaflet-control.d.ts +1 -0
  23. package/dist/src/controls/leaflet-events.d.ts +55 -26
  24. package/dist/src/controls/maplibregl-control.d.ts +1 -0
  25. package/dist/src/controls/maplibregl-events.d.ts +54 -25
  26. package/dist/src/controls/maptilersdk-control.d.ts +17 -0
  27. package/dist/src/controls/maptilersdk-events.d.ts +72 -2
  28. package/dist/src/controls/maptilersdk-options.d.ts +10 -0
  29. package/dist/src/controls/openlayers-control.d.ts +5 -4
  30. package/dist/src/controls/openlayers-events.d.ts +55 -25
  31. package/dist/src/geocoder/geocoder-events.d.ts +40 -27
  32. package/dist/src/geocoder/geocoder-options.d.ts +1 -3
  33. package/dist/src/leaflet.public.d.ts +1 -1
  34. package/dist/src/maplibregl.d.ts +1 -1
  35. package/dist/src/maptilersdk.d.ts +1 -1
  36. package/dist/src/openlayers.public.d.ts +1 -1
  37. package/package.json +3 -2
@@ -1,5 +1,5 @@
1
1
  import { css as M, LitElement as S, svg as A, html as m, unsafeCSS as he, nothing as ee } from "lit";
2
- import { customElement as F, property as d, state as b, query as qe } from "lit/decorators.js";
2
+ import { customElement as O, property as d, state as b, query as qe } from "lit/decorators.js";
3
3
  import { convert as Ze } from "geo-coordinates-parser";
4
4
  import { classMap as V } from "lit/directives/class-map.js";
5
5
  import { repeat as Ne } from "lit/directives/repeat.js";
@@ -7,22 +7,23 @@ import "@turf/clone";
7
7
  import { styleMap as Qe } from "lit/directives/style-map.js";
8
8
  import { Feature as $ } from "ol";
9
9
  import { Control as Ke } from "ol/control";
10
- import { Point as X, Polygon as be, MultiPolygon as we, GeometryCollection as Ye, LineString as ke, MultiLineString as _e } from "ol/geom";
11
- import He from "ol/layer/Vector";
12
- import { transformExtent as Je, getUserProjection as Xe, fromLonLat as et, toLonLat as tt } from "ol/proj";
13
- import it from "ol/source/Vector";
10
+ import Ye from "ol/events/Event";
11
+ import { Point as X, Polygon as be, MultiPolygon as we, GeometryCollection as He, LineString as ke, MultiLineString as _e } from "ol/geom";
12
+ import Je from "ol/layer/Vector";
13
+ import { transformExtent as Xe, getUserProjection as et, fromLonLat as tt, toLonLat as it } from "ol/proj";
14
+ import st from "ol/source/Vector";
14
15
  import $e from "@turf/bbox";
15
- import st from "@turf/difference";
16
- import rt from "@turf/flatten";
17
- import { featureCollection as Le, polygon as ot } from "@turf/helpers";
18
- import at from "@turf/union";
16
+ import rt from "@turf/difference";
17
+ import ot from "@turf/flatten";
18
+ import { featureCollection as Le, polygon as at } from "@turf/helpers";
19
+ import nt from "@turf/union";
19
20
  import Ie from "ol/style/Fill";
20
- import nt from "ol/style/Icon";
21
+ import lt from "ol/style/Icon";
21
22
  import Me from "ol/style/Stroke";
22
- import lt from "ol/style/Style";
23
- import ct from "ol/style/Text";
24
- var ht = Object.getOwnPropertyDescriptor, dt = (t, e, i, o) => {
25
- for (var r = o > 1 ? void 0 : o ? ht(e, i) : e, s = t.length - 1, a; s >= 0; s--)
23
+ import ct from "ol/style/Style";
24
+ import ht from "ol/style/Text";
25
+ var dt = Object.getOwnPropertyDescriptor, pt = (t, e, i, o) => {
26
+ for (var r = o > 1 ? void 0 : o ? dt(e, i) : e, s = t.length - 1, a; s >= 0; s--)
26
27
  (a = t[s]) && (r = a(r) || r);
27
28
  return r;
28
29
  };
@@ -43,11 +44,11 @@ te.styles = M`
43
44
  fill: var(--color-icon-button);
44
45
  }
45
46
  `;
46
- te = dt([
47
- F("maptiler-geocode-clear-icon")
47
+ te = pt([
48
+ O("maptiler-geocode-clear-icon")
48
49
  ], te);
49
- var pt = Object.getOwnPropertyDescriptor, ut = (t, e, i, o) => {
50
- for (var r = o > 1 ? void 0 : o ? pt(e, i) : e, s = t.length - 1, a; s >= 0; s--)
50
+ var ut = Object.getOwnPropertyDescriptor, ft = (t, e, i, o) => {
51
+ for (var r = o > 1 ? void 0 : o ? ut(e, i) : e, s = t.length - 1, a; s >= 0; s--)
51
52
  (a = t[s]) && (r = a(r) || r);
52
53
  return r;
53
54
  };
@@ -68,11 +69,11 @@ ie.styles = M`
68
69
  fill: #e15042;
69
70
  }
70
71
  `;
71
- ie = ut([
72
- F("maptiler-geocode-fail-icon")
72
+ ie = ft([
73
+ O("maptiler-geocode-fail-icon")
73
74
  ], ie);
74
- var ft = Object.getOwnPropertyDescriptor, mt = (t, e, i, o) => {
75
- for (var r = o > 1 ? void 0 : o ? ft(e, i) : e, s = t.length - 1, a; s >= 0; s--)
75
+ var mt = Object.getOwnPropertyDescriptor, gt = (t, e, i, o) => {
76
+ for (var r = o > 1 ? void 0 : o ? mt(e, i) : e, s = t.length - 1, a; s >= 0; s--)
76
77
  (a = t[s]) && (r = a(r) || r);
77
78
  return r;
78
79
  };
@@ -115,11 +116,11 @@ se.styles = M`
115
116
  }
116
117
  }
117
118
  `;
118
- se = mt([
119
- F("maptiler-geocode-loading-icon")
119
+ se = gt([
120
+ O("maptiler-geocode-loading-icon")
120
121
  ], se);
121
- var gt = Object.getOwnPropertyDescriptor, yt = (t, e, i, o) => {
122
- for (var r = o > 1 ? void 0 : o ? gt(e, i) : e, s = t.length - 1, a; s >= 0; s--)
122
+ var yt = Object.getOwnPropertyDescriptor, vt = (t, e, i, o) => {
123
+ for (var r = o > 1 ? void 0 : o ? yt(e, i) : e, s = t.length - 1, a; s >= 0; s--)
123
124
  (a = t[s]) && (r = a(r) || r);
124
125
  return r;
125
126
  };
@@ -140,11 +141,11 @@ re.styles = M`
140
141
  fill: var(--color-icon-button);
141
142
  }
142
143
  `;
143
- re = yt([
144
- F("maptiler-geocode-reverse-geocoding-icon")
144
+ re = vt([
145
+ O("maptiler-geocode-reverse-geocoding-icon")
145
146
  ], re);
146
- var vt = Object.getOwnPropertyDescriptor, xt = (t, e, i, o) => {
147
- for (var r = o > 1 ? void 0 : o ? vt(e, i) : e, s = t.length - 1, a; s >= 0; s--)
147
+ var xt = Object.getOwnPropertyDescriptor, bt = (t, e, i, o) => {
148
+ for (var r = o > 1 ? void 0 : o ? xt(e, i) : e, s = t.length - 1, a; s >= 0; s--)
148
149
  (a = t[s]) && (r = a(r) || r);
149
150
  return r;
150
151
  };
@@ -179,10 +180,10 @@ oe.styles = M`
179
180
  stroke: var(--color-icon-button);
180
181
  }
181
182
  `;
182
- oe = xt([
183
- F("maptiler-geocode-search-icon")
183
+ oe = bt([
184
+ O("maptiler-geocode-search-icon")
184
185
  ], oe);
185
- function bt(t, e, i) {
186
+ function wt(t, e, i) {
186
187
  const o = e[1], r = e[0], s = o - r;
187
188
  return t === o && i ? t : ((t - r) % s + s) % s + r;
188
189
  }
@@ -191,7 +192,7 @@ function Z(t) {
191
192
  return e[2] < e[0] && (Math.abs((e[0] + e[2] + 360) / 2) > Math.abs((e[0] - 360 + e[2]) / 2) ? e[0] -= 360 : e[2] += 360), e;
192
193
  }
193
194
  let G;
194
- async function wt(t, e, i) {
195
+ async function kt(t, e, i) {
195
196
  for (const o of e ?? [])
196
197
  if (!(t && (o.minZoom != null && o.minZoom > t[0] || o.maxZoom != null && o.maxZoom < t[0]))) {
197
198
  if (o.type === "fixed")
@@ -232,18 +233,18 @@ async function wt(t, e, i) {
232
233
  return t[1].toFixed(6) + "," + t[2].toFixed(6);
233
234
  }
234
235
  }
235
- const kt = ".sprite-icon{align-self:center;justify-self:center;opacity:.75;background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:#e7edff}li.picked .secondary{color:#96a4c7;padding-left:4px}li.picked .line2{color:#96a4c7}li.selected{background-color:#f3f6ff;animation:backAndForth 5s linear infinite}li.selected .primary{color:#2b8bfb}li.selected .secondary{color:#a2adc7;padding-left:4px}li.selected .line2{color:#a2adc7}li>img{align-self:center;justify-self:center;opacity:.75}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:#aeb6c7;padding-left:4px}.line2{color:#aeb6c7}@keyframes backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}";
236
- var _t = Object.defineProperty, $t = Object.getOwnPropertyDescriptor, Se = (t) => {
236
+ const _t = ".sprite-icon{align-self:center;justify-self:center;opacity:.75;background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:#e7edff}li.picked .secondary{color:#96a4c7;padding-left:4px}li.picked .line2{color:#96a4c7}li.selected{background-color:#f3f6ff;animation:backAndForth 5s linear infinite}li.selected .primary{color:#2b8bfb}li.selected .secondary{color:#a2adc7;padding-left:4px}li.selected .line2{color:#a2adc7}li>img{align-self:center;justify-self:center;opacity:.75}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:#aeb6c7;padding-left:4px}.line2{color:#aeb6c7}@keyframes backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}";
237
+ var $t = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, Se = (t) => {
237
238
  throw TypeError(t);
238
239
  }, _ = (t, e, i, o) => {
239
- for (var r = o > 1 ? void 0 : o ? $t(e, i) : e, s = t.length - 1, a; s >= 0; s--)
240
+ for (var r = o > 1 ? void 0 : o ? Lt(e, i) : e, s = t.length - 1, a; s >= 0; s--)
240
241
  (a = t[s]) && (r = (o ? a(e, i, r) : a(r)) || r);
241
- return o && r && _t(e, i, r), r;
242
- }, Fe = (t, e, i) => e.has(t) || Se("Cannot " + i), u = (t, e, i) => (Fe(t, e, "read from private field"), i ? i.call(t) : e.get(t)), Lt = (t, e, i) => e.has(t) ? Se("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), U = (t, e, i) => (Fe(t, e, "access private method"), i), p, N, z, g, Oe, Ce, de, ae;
242
+ return o && r && $t(e, i, r), r;
243
+ }, Oe = (t, e, i) => e.has(t) || Se("Cannot " + i), u = (t, e, i) => (Oe(t, e, "read from private field"), i ? i.call(t) : e.get(t)), It = (t, e, i) => e.has(t) ? Se("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), U = (t, e, i) => (Oe(t, e, "access private method"), i), p, N, z, g, Fe, Ce, de, ae;
243
244
  const Te = typeof devicePixelRatio > "u" || devicePixelRatio > 1.25, Pe = Te ? "@2x" : "", P = Te ? 2 : 1;
244
245
  let C, Ee, w = class extends S {
245
246
  constructor() {
246
- super(...arguments), Lt(this, p), this.itemStyle = "default", this.showPlaceType = "if-needed", this.missingIconsCache = /* @__PURE__ */ new Set(), this.iconsBaseUrl = "", this.index = 0;
247
+ super(...arguments), It(this, p), this.itemStyle = "default", this.showPlaceType = "if-needed", this.missingIconsCache = /* @__PURE__ */ new Set(), this.iconsBaseUrl = "", this.index = 0;
247
248
  }
248
249
  willUpdate(t) {
249
250
  t.has("feature") && u(this, p, N) && (this.index = u(this, p, N).length, U(this, p, de).call(this));
@@ -295,7 +296,7 @@ z = function() {
295
296
  g = function() {
296
297
  return this.feature?.properties?.categories?.join(", ") ?? this.feature?.place_type_name?.[0] ?? this.feature?.place_type[0];
297
298
  };
298
- Oe = function() {
299
+ Fe = function() {
299
300
  Ee ??= fetch(`${this.iconsBaseUrl}sprite${Pe}.json`).then((t) => t.json()).then((t) => {
300
301
  C = t;
301
302
  }).catch(() => {
@@ -306,7 +307,7 @@ Ce = function() {
306
307
  this.imageUrl && this.missingIconsCache.add(this.imageUrl), U(this, p, de).call(this);
307
308
  };
308
309
  de = function() {
309
- C !== void 0 ? U(this, p, ae).call(this) : (U(this, p, Oe).call(this), Ee?.then(() => {
310
+ C !== void 0 ? U(this, p, ae).call(this) : (U(this, p, Fe).call(this), Ee?.then(() => {
310
311
  U(this, p, ae).call(this);
311
312
  }));
312
313
  };
@@ -318,7 +319,7 @@ ae = function() {
318
319
  } while (this.index > -1 && (!this.imageUrl || this.missingIconsCache.has(this.imageUrl)));
319
320
  };
320
321
  w.styles = M`
321
- ${he(kt)}
322
+ ${he(_t)}
322
323
  `;
323
324
  _([
324
325
  d({ type: Object })
@@ -348,19 +349,19 @@ _([
348
349
  b()
349
350
  ], w.prototype, "index", 2);
350
351
  w = _([
351
- F("maptiler-geocoder-feature-item")
352
+ O("maptiler-geocoder-feature-item")
352
353
  ], w);
353
- const It = "form{font-family:Open Sans,Ubuntu,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;z-index:10;border-radius:4px;margin:0;transition:max-width .25s;box-shadow:0 2px 5px #33335926;--color-text: #444952;--color-icon-button: #444952;pointer-events:all}form,form *,form *:after,form *:before{box-sizing:border-box}form.can-collapse{max-width:29px}form.can-collapse input::placeholder{transition:opacity .25s;opacity:0}form{width:270px;max-width:270px}form:focus-within,form:hover{width:270px;max-width:270px}form input::placeholder,form:focus-within input::placeholder,form:hover input::placeholder{opacity:1}input{font:inherit;font-size:14px;flex-grow:1;min-height:29px;background-color:transparent;color:#444952;white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input:focus{color:#444952;outline:0;outline:none;box-shadow:none}ul,div.error,div.no-results{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul{font-size:14px;line-height:16px;box-shadow:0 5px 10px #33335926}div.error,div.no-results{font:inherit;line-height:18px;font-size:12px;display:flex;gap:16px}div.error{padding:16px;font-weight:600;color:#e25041;background-color:#fbeae8}div.error div{flex-grow:1}div.error maptiler-geocode-fail-icon{flex-shrink:0;width:20px;height:20px}div.error button{flex-shrink:0}div.error button maptiler-geocode-clear-icon{--color-icon-button: #e25041}div.error button:hover maptiler-geocode-clear-icon,div.error button:active maptiler-geocode-clear-icon{--color-icon-button: inherit}div.no-results{padding:14px 24px 14px 16px;font-weight:400;color:#6b7c93;box-shadow:0 5px 10px #33335926}div.no-results maptiler-geocode-fail-icon{margin-top:4px;flex-shrink:0;width:20px;height:20px}ul.options.open-on-top{top:auto;bottom:calc(100% + 6px)}button{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button:hover{background-color:transparent}button:hover,button:active{--color-icon-button: #2b8bfb}.input-group{display:flex;align-items:stretch;gap:7px;padding-inline:8px;border-radius:4px;overflow:hidden}.input-group:focus-within{outline:#2b8bfb solid 2px}.search-button{flex-shrink:0}.clear-button-container{display:flex;display:none;position:relative;align-items:stretch}.clear-button-container.displayable{display:flex;flex-shrink:0}:host(.maptiler-geocoder):not(:empty){box-shadow:none}:host(.maptiler-geocoder) .input-group{border:white solid 2px}:host(.maptiler-geocoder) .input-group:focus-within{border:#2b8bfb solid 2px;outline:0;outline:none}:host(.maptiler-geocoder) form.can-collapse{max-width:33px}:host(.maptiler-geocoder) form,:host(.maptiler-geocoder) form:focus-within,:host(.maptiler-geocoder) form:hover{width:270px;max-width:270px}:host(.leaflet-geocoder) .input-group{border:white solid 1px}:host(.leaflet-geocoder) form.can-collapse{max-width:30px}";
354
- var Mt = Object.defineProperty, St = Object.getOwnPropertyDescriptor, Ue = (t) => {
354
+ const Mt = "form{font-family:Open Sans,Ubuntu,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;z-index:10;border-radius:4px;margin:0;transition:max-width .25s;box-shadow:0 2px 5px #33335926;--color-text: #444952;--color-icon-button: #444952;pointer-events:all}form,form *,form *:after,form *:before{box-sizing:border-box}form.can-collapse{max-width:29px}form.can-collapse input::placeholder{transition:opacity .25s;opacity:0}form{width:270px;max-width:270px}form:focus-within,form:hover{width:270px;max-width:270px}form input::placeholder,form:focus-within input::placeholder,form:hover input::placeholder{opacity:1}input{font:inherit;font-size:14px;flex-grow:1;min-height:29px;background-color:transparent;color:#444952;white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input:focus{color:#444952;outline:0;outline:none;box-shadow:none}ul,div.error,div.no-results{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul{font-size:14px;line-height:16px;box-shadow:0 5px 10px #33335926}div.error,div.no-results{font:inherit;line-height:18px;font-size:12px;display:flex;gap:16px}div.error{padding:16px;font-weight:600;color:#e25041;background-color:#fbeae8}div.error div{flex-grow:1}div.error maptiler-geocode-fail-icon{flex-shrink:0;width:20px;height:20px}div.error button{flex-shrink:0}div.error button maptiler-geocode-clear-icon{--color-icon-button: #e25041}div.error button:hover maptiler-geocode-clear-icon,div.error button:active maptiler-geocode-clear-icon{--color-icon-button: inherit}div.no-results{padding:14px 24px 14px 16px;font-weight:400;color:#6b7c93;box-shadow:0 5px 10px #33335926}div.no-results maptiler-geocode-fail-icon{margin-top:4px;flex-shrink:0;width:20px;height:20px}ul.options.open-on-top{top:auto;bottom:calc(100% + 6px)}button{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button:hover{background-color:transparent}button:hover,button:active{--color-icon-button: #2b8bfb}.input-group{display:flex;align-items:stretch;gap:7px;padding-inline:8px;border-radius:4px;overflow:hidden}.input-group:focus-within{outline:#2b8bfb solid 2px}.search-button{flex-shrink:0}.clear-button-container{display:flex;display:none;position:relative;align-items:stretch}.clear-button-container.displayable{display:flex;flex-shrink:0}:host(.maptiler-geocoder):not(:empty){box-shadow:none}:host(.maptiler-geocoder) .input-group{border:white solid 2px}:host(.maptiler-geocoder) .input-group:focus-within{border:#2b8bfb solid 2px;outline:0;outline:none}:host(.maptiler-geocoder) form.can-collapse{max-width:33px}:host(.maptiler-geocoder) form,:host(.maptiler-geocoder) form:focus-within,:host(.maptiler-geocoder) form:hover{width:270px;max-width:270px}:host(.leaflet-geocoder) .input-group{border:white solid 1px}:host(.leaflet-geocoder) form.can-collapse{max-width:30px}";
355
+ var St = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, Ue = (t) => {
355
356
  throw TypeError(t);
356
357
  }, c = (t, e, i, o) => {
357
- for (var r = o > 1 ? void 0 : o ? St(e, i) : e, s = t.length - 1, a; s >= 0; s--)
358
+ for (var r = o > 1 ? void 0 : o ? Ot(e, i) : e, s = t.length - 1, a; s >= 0; s--)
358
359
  (a = t[s]) && (r = (o ? a(e, i, r) : a(r)) || r);
359
- return o && r && Mt(e, i, r), r;
360
- }, pe = (t, e, i) => e.has(t) || Ue("Cannot " + i), x = (t, e, i) => (pe(t, e, "read from private field"), i ? i.call(t) : e.get(t)), E = (t, e, i) => e.has(t) ? Ue("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), W = (t, e, i, o) => (pe(t, e, "write to private field"), e.set(t, i), i), h = (t, e, i) => (pe(t, e, "access private method"), i), Q, q, R, ne, j, n, K, Be, Ge, ue, v, fe, Y, me, ge, I, ye, H, ze, le, Re, je, Ae, De, Ve;
360
+ return o && r && St(e, i, r), r;
361
+ }, pe = (t, e, i) => e.has(t) || Ue("Cannot " + i), x = (t, e, i) => (pe(t, e, "read from private field"), i ? i.call(t) : e.get(t)), E = (t, e, i) => e.has(t) ? Ue("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), W = (t, e, i, o) => (pe(t, e, "write to private field"), e.set(t, i), i), h = (t, e, i) => (pe(t, e, "access private method"), i), Q, q, j, ne, R, n, K, Be, Ge, ue, v, fe, Y, me, ge, I, ye, H, ze, le, je, Re, Ae, De, Ve;
361
362
  let l = class extends S {
362
363
  constructor() {
363
- super(...arguments), E(this, n), this.clearListOnPick = !1, this.clearOnBlur = !1, this.collapsed = !1, this.excludeTypes = !1, this.exhaustiveReverseGeocoding = !1, this.fetchFullGeometryOnPick = !1, this.keepListOpen = !1, this.openListOnTop = !1, this.reverseActive = !1, this.searchValue = "", this.selectedItemIndex = -1, this.cachedFeatures = [], this.lastSearchUrl = "", this.focused = !1, this.focusedDelayed = !1, E(this, Q, !1), E(this, q, !1), E(this, R), E(this, ne, /* @__PURE__ */ new Set()), E(this, j);
364
+ super(...arguments), E(this, n), this.clearListOnPick = !1, this.clearOnBlur = !1, this.collapsed = !1, this.excludeTypes = !1, this.exhaustiveReverseGeocoding = !1, this.fetchFullGeometryOnPick = !1, this.keepListOpen = !1, this.openListOnTop = !1, this.reverseActive = !1, this.searchValue = "", this.selectedItemIndex = -1, this.cachedFeatures = [], this.lastSearchUrl = "", this.focused = !1, this.focusedDelayed = !1, E(this, Q, !1), E(this, q, !1), E(this, j), E(this, ne, /* @__PURE__ */ new Set()), E(this, R);
364
365
  }
365
366
  firstUpdated() {
366
367
  W(this, Q, !0);
@@ -420,7 +421,7 @@ let l = class extends S {
420
421
  }
421
422
  /** @internal */
422
423
  handleMapChange(t) {
423
- W(this, j, t);
424
+ W(this, R, t);
424
425
  }
425
426
  /** @internal */
426
427
  handleMapClick(t) {
@@ -458,7 +459,7 @@ let l = class extends S {
458
459
  @blur=${() => this.focused = !1}
459
460
  @click=${() => this.focused = !0}
460
461
  @keydown=${h(this, n, le)}
461
- @input=${h(this, n, Re)}
462
+ @input=${h(this, n, je)}
462
463
  @change=${() => this.picked = void 0}
463
464
  placeholder=${this.placeholder ?? "Search"}
464
465
  aria-label=${this.placeholder ?? "Search"}
@@ -518,10 +519,10 @@ let l = class extends S {
518
519
  h(this, n, Ae).call(this, e);
519
520
  }}
520
521
  @select=${() => {
521
- h(this, n, je).call(this, t);
522
+ h(this, n, Re).call(this, t);
522
523
  }}
523
524
  .missingIconsCache=${x(this, ne)}
524
- .iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.3/icons/"}
525
+ .iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.5/icons/"}
525
526
  >
526
527
  ${t.place_name}
527
528
  </maptiler-geocoder-feature-item>
@@ -535,9 +536,9 @@ let l = class extends S {
535
536
  };
536
537
  Q = /* @__PURE__ */ new WeakMap();
537
538
  q = /* @__PURE__ */ new WeakMap();
538
- R = /* @__PURE__ */ new WeakMap();
539
- ne = /* @__PURE__ */ new WeakMap();
540
539
  j = /* @__PURE__ */ new WeakMap();
540
+ ne = /* @__PURE__ */ new WeakMap();
541
+ R = /* @__PURE__ */ new WeakMap();
541
542
  n = /* @__PURE__ */ new WeakSet();
542
543
  K = function() {
543
544
  return this.listFeatures?.[this.selectedItemIndex];
@@ -561,7 +562,7 @@ v = function(t, ...[e]) {
561
562
  );
562
563
  };
563
564
  fe = function(t) {
564
- t?.preventDefault(), this.focused = !1, clearTimeout(x(this, R)), this.selectedItemIndex > -1 && this.listFeatures ? (this.picked = this.listFeatures[this.selectedItemIndex], this.searchValue = this.picked.place_type[0] === "reverse" ? this.picked.place_name : this.picked.place_name.replace(/,.*/, ""), this.error = void 0, this.selectedItemIndex = -1) : this.searchValue && h(this, n, H).call(this, this.searchValue, { exact: !0 }).then(() => {
565
+ t?.preventDefault(), this.focused = !1, clearTimeout(x(this, j)), this.selectedItemIndex > -1 && this.listFeatures ? (this.picked = this.listFeatures[this.selectedItemIndex], this.searchValue = this.picked.place_type[0] === "reverse" ? this.picked.place_name : this.picked.place_name.replace(/,.*/, ""), this.error = void 0, this.selectedItemIndex = -1) : this.searchValue && h(this, n, H).call(this, this.searchValue, { exact: !0 }).then(() => {
565
566
  this.picked = void 0;
566
567
  }).catch((e) => this.error = e);
567
568
  };
@@ -579,10 +580,10 @@ me = function() {
579
580
  };
580
581
  ge = function(t) {
581
582
  if (this.searchValue = t, h(this, n, v).call(this, "querychange", { query: this.searchValue, reverseCoords: h(this, n, Y).call(this, t) }), this.error = void 0, this.picked = void 0, this.showResultsWhileTyping !== !1) {
582
- if (clearTimeout(x(this, R)), x(this, n, ue))
583
+ if (clearTimeout(x(this, j)), x(this, n, ue))
583
584
  return;
584
585
  const e = this.searchValue;
585
- W(this, R, window.setTimeout(() => {
586
+ W(this, j, window.setTimeout(() => {
586
587
  h(this, n, H).call(this, e).catch((i) => this.error = i);
587
588
  }, this.debounceSearch ?? 200));
588
589
  } else
@@ -601,14 +602,14 @@ H = async function(t, { byId: e = !1, exact: i = !1 } = {}) {
601
602
  try {
602
603
  const r = this.apiUrl ?? "https://api.maptiler.com/geocoding", s = h(this, n, Y).call(this, t), a = new URL(r + "/" + encodeURIComponent(s ? `${s.decimalLongitude},${s.decimalLatitude}` : t) + ".json"), f = a.searchParams;
603
604
  this.language !== void 0 && f.set("language", Array.isArray(this.language) ? this.language.join(",") : this.language ?? "");
604
- const [L] = x(this, j) ?? [void 0];
605
+ const [L] = x(this, R) ?? [void 0];
605
606
  let k = (!s || this.reverseGeocodingTypes === void 0 ? this.types : this.reverseGeocodingTypes)?.map(
606
607
  (y) => typeof y == "string" ? y : L === void 0 || (y[0] ?? 0) <= L && L < (y[1] ?? 1 / 0) ? y[2] : void 0
607
608
  ).filter((y) => y !== void 0);
608
609
  k && (k = [...new Set(k)], f.set("types", k.join(",")));
609
610
  const T = !s || this.reverseGeocodingExcludeTypes === void 0 ? this.excludeTypes : this.reverseGeocodingExcludeTypes;
610
611
  if (T && f.set("excludeTypes", String(T)), this.bbox && f.set("bbox", this.bbox.map((y) => y.toFixed(6)).join(",")), this.country && f.set("country", Array.isArray(this.country) ? this.country.join(",") : this.country), this.worldview && f.set("worldview", this.worldview), !e && !s) {
611
- const y = this.proximity ?? [{ type: "server-geolocation" }], xe = await wt(x(this, j), y, o);
612
+ const y = this.proximity ?? [{ type: "server-geolocation" }], xe = await kt(x(this, R), y, o);
612
613
  xe && f.set("proximity", xe), (i || this.showResultsWhileTyping === !1) && f.set("autocomplete", "false"), f.set("fuzzyMatch", String(this.fuzzyMatch !== !1));
613
614
  }
614
615
  const ve = this.limit ?? 5, J = this.reverseGeocodingLimit ?? ve;
@@ -657,7 +658,7 @@ H = async function(t, { byId: e = !1, exact: i = !1 } = {}) {
657
658
  }
658
659
  };
659
660
  ze = function(t) {
660
- this.reverseActive = this.enableReverse === "always", h(this, n, I).call(this), this.picked = void 0, h(this, n, ye).call(this, `${t[1].toFixed(6)}, ${bt(t[0], [-180, 180], !0).toFixed(6)}`), h(this, n, me).call(this);
661
+ this.reverseActive = this.enableReverse === "always", h(this, n, I).call(this), this.picked = void 0, h(this, n, ye).call(this, `${t[1].toFixed(6)}, ${wt(t[0], [-180, 180], !0).toFixed(6)}`), h(this, n, me).call(this);
661
662
  };
662
663
  le = function(t) {
663
664
  if (!this.listFeatures)
@@ -665,10 +666,10 @@ le = function(t) {
665
666
  const e = t.key === "ArrowDown" ? 1 : t.key === "ArrowUp" ? -1 : 0;
666
667
  e && (this.input.focus(), this.focused = !0, t.preventDefault(), this.picked && this.selectedItemIndex === -1 && (this.selectedItemIndex = this.listFeatures.findIndex((i) => i.id === this.picked?.id)), this.selectedItemIndex === (this.picked || this.selectFirst !== !1 ? 0 : -1) && e === -1 && (this.selectedItemIndex = this.listFeatures.length), this.selectedItemIndex += e, this.selectedItemIndex >= this.listFeatures.length && (this.selectedItemIndex = -1), this.selectedItemIndex < 0 && (this.picked || this.selectFirst !== !1) && (this.selectedItemIndex = 0));
667
668
  };
668
- Re = function(t) {
669
+ je = function(t) {
669
670
  h(this, n, ge).call(this, t.target.value);
670
671
  };
671
- je = function(t) {
672
+ Re = function(t) {
672
673
  (!this.picked || this.picked.id !== t.id) && (this.picked = t, this.searchValue = t.place_name);
673
674
  };
674
675
  Ae = function(t) {
@@ -681,7 +682,7 @@ Ve = function() {
681
682
  this.searchValue = "", h(this, n, v).call(this, "queryclear"), this.picked = void 0, this.input.focus();
682
683
  };
683
684
  l.styles = M`
684
- ${he(It)}
685
+ ${he(Mt)}
685
686
  `;
686
687
  c([
687
688
  d({ attribute: !1 })
@@ -828,7 +829,7 @@ c([
828
829
  b()
829
830
  ], l.prototype, "focusedDelayed", 2);
830
831
  l = c([
831
- F("maptiler-geocoder")
832
+ O("maptiler-geocoder")
832
833
  ], l);
833
834
  const Ft = [
834
835
  "adjustUrl",
@@ -868,9 +869,9 @@ const Ft = [
868
869
  "types",
869
870
  "reverseGeocodingTypes",
870
871
  "worldview"
871
- ], Ot = "svg{display:block;fill:var(--maptiler-geocode-marker-fill, #3170fe);stroke:var(--maptiler-geocode-marker-stroke, #3170fe);height:30px}:host(.marker-selected){z-index:2}:host(.marker-selected) svg path{fill:var(--maptiler-geocode-marker-selected-fill, #98b7ff);stroke:var(--maptiler-geocode-marker-selected-stroke, #3170fe)}:host(.marker-reverse) svg path{fill:var(--maptiler-geocode-marker-reverse-fill, silver);stroke:var(--maptiler-geocode-marker-reverse-stroke, gray)}:host(.marker-interactive){cursor:pointer!important}:host(.marker-fuzzy) svg path{fill:var(--maptiler-geocode-marker-fuzzy-fill, silver);stroke:var(--maptiler-geocode-marker-fuzzy-stroke, gray)}:host(.marker-fuzzy.marker-selected) svg path{fill:var(--maptiler-geocode-marker-selected-fuzzy-fill, #ddd);stroke:var(--maptiler-geocode-marker-selected-fuzzy-stroke, silver)}";
872
- var Ct = Object.getOwnPropertyDescriptor, Tt = (t, e, i, o) => {
873
- for (var r = o > 1 ? void 0 : o ? Ct(e, i) : e, s = t.length - 1, a; s >= 0; s--)
872
+ ], Ct = "svg{display:block;fill:var(--maptiler-geocode-marker-fill, #3170fe);stroke:var(--maptiler-geocode-marker-stroke, #3170fe);height:30px}:host(.marker-selected){z-index:2}:host(.marker-selected) svg path{fill:var(--maptiler-geocode-marker-selected-fill, #98b7ff);stroke:var(--maptiler-geocode-marker-selected-stroke, #3170fe)}:host(.marker-reverse) svg path{fill:var(--maptiler-geocode-marker-reverse-fill, silver);stroke:var(--maptiler-geocode-marker-reverse-stroke, gray)}:host(.marker-interactive){cursor:pointer!important}:host(.marker-fuzzy) svg path{fill:var(--maptiler-geocode-marker-fuzzy-fill, silver);stroke:var(--maptiler-geocode-marker-fuzzy-stroke, gray)}:host(.marker-fuzzy.marker-selected) svg path{fill:var(--maptiler-geocode-marker-selected-fuzzy-fill, #ddd);stroke:var(--maptiler-geocode-marker-selected-fuzzy-stroke, silver)}";
873
+ var Tt = Object.getOwnPropertyDescriptor, Pt = (t, e, i, o) => {
874
+ for (var r = o > 1 ? void 0 : o ? Tt(e, i) : e, s = t.length - 1, a; s >= 0; s--)
874
875
  (a = t[s]) && (r = a(r) || r);
875
876
  return r;
876
877
  };
@@ -891,15 +892,15 @@ let ce = class extends S {
891
892
  }
892
893
  };
893
894
  ce.styles = M`
894
- ${he(Ot)}
895
+ ${he(Ct)}
895
896
  `;
896
- ce = Tt([
897
- F("maptiler-geocode-marker")
897
+ ce = Pt([
898
+ O("maptiler-geocode-marker")
898
899
  ], ce);
899
- function Pt(t) {
900
- const e = st(
900
+ function Et(t) {
901
+ const e = rt(
901
902
  Le([
902
- ot([
903
+ at([
903
904
  [
904
905
  [180, 90],
905
906
  [-180, 90],
@@ -914,7 +915,7 @@ function Pt(t) {
914
915
  if (!e)
915
916
  return;
916
917
  e.properties = { isMask: !0 };
917
- const i = Z($e(t)), o = (i[2] - i[0]) / 360 / 1e3, r = i[0] < -180, s = i[2] > 180, a = rt(t);
918
+ const i = Z($e(t)), o = (i[2] - i[0]) / 360 / 1e3, r = i[0] < -180, s = i[2] > 180, a = ot(t);
918
919
  if (a.features.length > 1 && (r || s))
919
920
  for (const f of a.features) {
920
921
  const L = Z($e(f));
@@ -927,9 +928,9 @@ function Pt(t) {
927
928
  for (const T of k)
928
929
  T[0] -= 360 - o;
929
930
  }
930
- return Le([a.features.length < 2 ? t : at(a) ?? t, e]);
931
+ return Le([a.features.length < 2 ? t : nt(a) ?? t, e]);
931
932
  }
932
- const Et = {
933
+ const Ut = {
933
934
  continental_marine: 4,
934
935
  country: 4,
935
936
  major_landform: 8,
@@ -953,9 +954,9 @@ const Et = {
953
954
  "poi.restaurant": 18,
954
955
  "poi.aerodrome": 13
955
956
  // TODO add many more
956
- }, Ut = (t) => (e) => {
957
- const i = t.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.3/icons/", o = e.getProperties(), r = e.getGeometry()?.getType(), s = o.isMask ? 0 : r === "LineString" || r === "MultiLineString" ? 3 : 2;
958
- return new lt({
957
+ }, Bt = (t) => (e) => {
958
+ const i = t.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.5/icons/", o = e.getProperties(), r = e.getGeometry()?.getType(), s = o.isMask ? 0 : r === "LineString" || r === "MultiLineString" ? 3 : 2;
959
+ return new ct({
959
960
  stroke: o.isMask ? void 0 : new Me({
960
961
  color: "#3170fe",
961
962
  lineDash: [s, s],
@@ -965,12 +966,12 @@ const Et = {
965
966
  fill: o.isMask ? new Ie({
966
967
  color: "#00000020"
967
968
  }) : void 0,
968
- image: new nt({
969
+ image: new lt({
969
970
  src: `${i}marker_${o.isReverse ? "reverse" : o.isSelected ? "selected" : "unselected"}.svg`,
970
971
  anchor: [0.5, 1]
971
972
  }),
972
973
  zIndex: o.isSelected ? 2 : o.isReverse ? 0 : 1,
973
- text: (o.isSelected || o.isMouseOver) && o.tooltip ? new ct({
974
+ text: (o.isSelected || o.isMouseOver) && o.tooltip ? new ht({
974
975
  backgroundFill: new Ie({ color: "white" }),
975
976
  text: o.tooltip,
976
977
  offsetY: -40,
@@ -982,8 +983,8 @@ const Et = {
982
983
  padding: [2, 0, 0, 2]
983
984
  }) : void 0
984
985
  });
985
- }, O = "EPSG:4326";
986
- class oi extends Ke {
986
+ }, F = "EPSG:4326";
987
+ class ni extends Ke {
987
988
  #t;
988
989
  #e;
989
990
  #r;
@@ -992,14 +993,17 @@ class oi extends Ke {
992
993
  super({
993
994
  element: i,
994
995
  ...e
995
- }), this.#t = e, this.#r = document.createElement("maptiler-geocoder"), this.#r.classList.add("openlayers-geocoder"), this.#w(), i.classList.add("openlayers-ctrl-geocoder"), i.style.zIndex = "3", i.appendChild(this.#r);
996
+ }), this.#t = e, this.#r = document.createElement("maptiler-geocoder"), this.#r.classList.add("openlayers-geocoder"), this.#b(), i.classList.add("openlayers-ctrl-geocoder"), i.style.zIndex = "3", i.appendChild(this.#r);
996
997
  }
997
998
  /** @internal Not to be called directly */
998
999
  setMap(e) {
999
1000
  super.setMap(e), this.#e && this.#e !== e && (this.#I(), this.#P(), this.#e = void 0), e && (this.#e = e, this.#L(), this.#T());
1000
1001
  }
1002
+ getOptions() {
1003
+ return { ...this.#t };
1004
+ }
1001
1005
  setOptions(e) {
1002
- Object.assign(this.#t, e), this.#w();
1006
+ Object.assign(this.#t, e), this.#b();
1003
1007
  }
1004
1008
  setQuery(e) {
1005
1009
  this.#r.setQuery(e);
@@ -1031,7 +1035,7 @@ class oi extends Ke {
1031
1035
  /** Features currently marked on the map */
1032
1036
  #a;
1033
1037
  /** Remember last feature that the map flew to as to not do it again */
1034
- #y;
1038
+ #g;
1035
1039
  /** Layer used for showing results */
1036
1040
  #l;
1037
1041
  /** Source connected to layer used for showing results */
@@ -1039,17 +1043,17 @@ class oi extends Ke {
1039
1043
  /** Last marker the mouse was over, used to detech mouseover and mouseleave events on markers */
1040
1044
  #d;
1041
1045
  /** Flag whether to show reverse geocoding cursor */
1042
- #v = !1;
1043
- #x = {
1046
+ #y = !1;
1047
+ #v = {
1044
1048
  reversetoggle: (e) => {
1045
- this.#v = e.detail.reverse, this.#i("reversetoggle", e.detail);
1049
+ this.#y = e.detail.reverse, this.#i("reversetoggle", e.detail);
1046
1050
  },
1047
1051
  querychange: (e) => {
1048
1052
  const i = e.detail.reverseCoords;
1049
- this.#$(i ? [i.decimalLongitude, i.decimalLatitude] : void 0), this.#i("querychange", e.detail);
1053
+ this.#_(i ? [i.decimalLongitude, i.decimalLatitude] : void 0), this.#i("querychange", e.detail);
1050
1054
  },
1051
1055
  queryclear: () => {
1052
- this.#$(void 0), this.#i("queryclear");
1056
+ this.#_(void 0), this.#i("queryclear");
1053
1057
  },
1054
1058
  request: (e) => {
1055
1059
  this.#i("request", e.detail);
@@ -1059,11 +1063,11 @@ class oi extends Ke {
1059
1063
  },
1060
1064
  select: (e) => {
1061
1065
  const i = e.detail.feature;
1062
- i && this.#m && this.#t.flyToSelected && this.#k(i.center, this.#p(i)), this.#a && i && this.#C(i), this.#i("select", e.detail);
1066
+ i && this.#m && this.#t.flyToSelected && this.#w(i.center, this.#p(i)), this.#a && i && this.#C(i), this.#i("select", e.detail);
1063
1067
  },
1064
1068
  pick: (e) => {
1065
1069
  const i = e.detail.feature;
1066
- i && i.id !== this.#y && this.#m && (this.#M(i), this.#u(this.#a, i)), this.#y = i?.id, this.#i("pick", e.detail);
1070
+ i && i.id !== this.#g && this.#m && (this.#M(i), this.#u(this.#a, i)), this.#g = i?.id, this.#i("pick", e.detail);
1067
1071
  },
1068
1072
  featuresshow: () => {
1069
1073
  this.#i("featuresshow");
@@ -1085,13 +1089,13 @@ class oi extends Ke {
1085
1089
  this.#i("focusout");
1086
1090
  }
1087
1091
  };
1088
- #b = {
1092
+ #x = {
1089
1093
  postrender: () => {
1090
1094
  const e = this.#e?.getView().getZoom(), i = this.#e?.getView().getCenter();
1091
- console.log("PRR", e, i, [e, ...this.#g(i)]), this.#r.handleMapChange(e && i ? [e, ...this.#g(i)] : void 0);
1095
+ this.#r.handleMapChange(e && i ? [e, ...this.#$(i)] : void 0);
1092
1096
  },
1093
1097
  click: (e) => {
1094
- this.#r.handleMapClick(this.#g(e.coordinate)), this.#e?.forEachFeatureAtPixel(e.pixel, (i) => {
1098
+ this.#r.handleMapClick(this.#$(e.coordinate)), this.#e?.forEachFeatureAtPixel(e.pixel, (i) => {
1095
1099
  const o = i.getId(), r = this.#a?.find((s) => s.id === o);
1096
1100
  if (!(!o || !r))
1097
1101
  return e.stopPropagation(), this.#i("markerclick", { feature: r, marker: i }), !0;
@@ -1100,7 +1104,7 @@ class oi extends Ke {
1100
1104
  pointermove: (e) => {
1101
1105
  if (!this.#e) return;
1102
1106
  const i = this.#e.forEachFeatureAtPixel(e.pixel, (r) => r.getId() ? r : void 0);
1103
- this.#e.getTargetElement().style.cursor = i ? "pointer" : this.#v ? "crosshair" : "";
1107
+ this.#e.getTargetElement().style.cursor = i ? "pointer" : this.#y ? "crosshair" : "";
1104
1108
  const o = i?.getId();
1105
1109
  if (this.#d !== o) {
1106
1110
  if (this.#d) {
@@ -1115,30 +1119,30 @@ class oi extends Ke {
1115
1119
  }
1116
1120
  }
1117
1121
  };
1118
- #w() {
1122
+ #b() {
1119
1123
  this.#r.setOptions(this.#t), this.#r.fetchFullGeometryOnPick = this.#t.pickedResultStyle !== "marker-only";
1120
1124
  }
1121
1125
  #L() {
1122
1126
  if (this.#e) {
1123
- for (const [e, i] of Object.entries(this.#x))
1127
+ for (const [e, i] of Object.entries(this.#v))
1124
1128
  this.#r.addEventListener(e, i);
1125
- for (const [e, i] of Object.entries(this.#b))
1129
+ for (const [e, i] of Object.entries(this.#x))
1126
1130
  this.#e.on([e], i);
1127
1131
  }
1128
1132
  }
1129
1133
  #I() {
1130
1134
  if (this.#e) {
1131
- for (const [e, i] of Object.entries(this.#x))
1135
+ for (const [e, i] of Object.entries(this.#v))
1132
1136
  this.#r.removeEventListener(e, i);
1133
- for (const [e, i] of Object.entries(this.#b))
1137
+ for (const [e, i] of Object.entries(this.#x))
1134
1138
  this.#e.un([e], i);
1135
1139
  }
1136
1140
  }
1137
1141
  #i(e, i) {
1138
- this.dispatchEvent({ type: e, ...i ?? {} });
1142
+ this.dispatchEvent(Object.assign(new Ye(e), i));
1139
1143
  }
1140
1144
  #M(e) {
1141
- e.bbox[0] === e.bbox[2] && e.bbox[1] === e.bbox[3] ? this.#k(e.center, this.#p(e)) : this.#_(Z(e.bbox), 50, this.#p(e));
1145
+ e.bbox[0] === e.bbox[2] && e.bbox[1] === e.bbox[3] ? this.#w(e.center, this.#p(e)) : this.#k(Z(e.bbox), 50, this.#p(e));
1142
1146
  }
1143
1147
  #S(e) {
1144
1148
  if (!e || e.length === 0 || !this.#m) return;
@@ -1146,12 +1150,12 @@ class oi extends Ke {
1146
1150
  (s, a) => i || !a.matching_text ? [Math.min(s[0], a.bbox[0]), Math.min(s[1], a.bbox[1]), Math.max(s[2], a.bbox[2]), Math.max(s[3], a.bbox[3])] : s,
1147
1151
  [180, 90, -180, -90]
1148
1152
  ), r = e.map((s) => this.#p(s)).filter((s) => s !== void 0).reduce((s, a) => s === void 0 ? a : Math.max(s, a), void 0);
1149
- this.#_(Z(o), 50, r);
1153
+ this.#k(Z(o), 50, r);
1150
1154
  }
1151
1155
  #p(e) {
1152
1156
  if (e.bbox[0] !== e.bbox[2] || e.bbox[1] !== e.bbox[3])
1153
1157
  return;
1154
- const i = e.id.replace(/\..*/, ""), o = this.#t.zoom ?? Et;
1158
+ const i = e.id.replace(/\..*/, ""), o = this.#t.zoom ?? Ut;
1155
1159
  return (Array.isArray(e.properties?.categories) ? e.properties.categories.reduce((r, s) => {
1156
1160
  const a = o[i + "." + s];
1157
1161
  return r === void 0 ? a : a === void 0 ? r : Math.max(r, a);
@@ -1160,29 +1164,29 @@ class oi extends Ke {
1160
1164
  get #m() {
1161
1165
  return !!this.#t.flyTo || this.#t.flyTo === void 0;
1162
1166
  }
1163
- get #F() {
1167
+ get #O() {
1164
1168
  return typeof this.#t.flyTo == "boolean" ? {} : this.#t.flyTo;
1165
1169
  }
1166
- get #O() {
1170
+ get #F() {
1167
1171
  return typeof this.#t.flyTo == "boolean" ? {} : this.#t.flyTo;
1168
1172
  }
1169
- #k(e, i) {
1173
+ #w(e, i) {
1170
1174
  this.#e?.getView().animate({
1171
1175
  center: this.#f(e),
1172
1176
  ...i ? { zoom: i } : {},
1173
1177
  duration: 2e3,
1174
- ...this.#F
1178
+ ...this.#O
1175
1179
  });
1176
1180
  }
1177
- #_(e, i, o) {
1178
- this.#e?.getView().fit(Je(e, O, this.#n()), {
1181
+ #k(e, i, o) {
1182
+ this.#e?.getView().fit(Xe(e, F, this.#n()), {
1179
1183
  padding: [i, i, i, i],
1180
1184
  ...o ? { maxZoom: o } : {},
1181
1185
  duration: 2e3,
1182
- ...this.#O
1186
+ ...this.#F
1183
1187
  });
1184
1188
  }
1185
- #$(e) {
1189
+ #_(e) {
1186
1190
  if (this.#t.marker === !1 || !this.#e || !this.#s)
1187
1191
  return;
1188
1192
  if (!e) {
@@ -1208,24 +1212,24 @@ class oi extends Ke {
1208
1212
  if (i?.geometry.type === "GeometryCollection") {
1209
1213
  const r = i.geometry.geometries.map((s) => s.type === "Polygon" ? new be(s.coordinates) : s.type === "MultiPolygon" ? new we(s.coordinates) : null).filter((s) => !!s);
1210
1214
  if (r.length > 0)
1211
- this.#s.addFeature(new $(new Ye(r).transform(O, this.#n())));
1215
+ this.#s.addFeature(new $(new He(r).transform(F, this.#n())));
1212
1216
  else
1213
1217
  for (const s of i.geometry.geometries)
1214
- s.type === "LineString" ? this.#s.addFeature(new $(new ke(s.coordinates).transform(O, this.#n()))) : s.type === "MultiLineString" && this.#s.addFeature(new $(new _e(s.coordinates).transform(O, this.#n())));
1218
+ s.type === "LineString" ? this.#s.addFeature(new $(new ke(s.coordinates).transform(F, this.#n()))) : s.type === "MultiLineString" && this.#s.addFeature(new $(new _e(s.coordinates).transform(F, this.#n())));
1215
1219
  } else if (i?.geometry.type.endsWith("Polygon")) {
1216
- const r = Pt(i);
1220
+ const r = Et(i);
1217
1221
  if (r)
1218
1222
  for (const s of r.features) {
1219
1223
  const a = s.geometry.type === "Polygon" ? new be(s.geometry.coordinates) : new we(s.geometry.coordinates);
1220
1224
  this.#s.addFeature(
1221
1225
  new $({
1222
1226
  isMask: !!s.properties?.isMask,
1223
- geometry: a.transform(O, this.#n())
1227
+ geometry: a.transform(F, this.#n())
1224
1228
  })
1225
1229
  );
1226
1230
  }
1227
1231
  this.#t.pickedResultStyle === "full-geometry-including-polygon-center-marker" && o();
1228
- } else i?.geometry.type === "LineString" ? this.#s.addFeature(new $(new ke(i.geometry.coordinates).transform(O, this.#n()))) : i?.geometry.type === "MultiLineString" ? this.#s.addFeature(new $(new _e(i.geometry.coordinates).transform(O, this.#n()))) : i?.geometry.type.endsWith("Point") && o();
1232
+ } else i?.geometry.type === "LineString" ? this.#s.addFeature(new $(new ke(i.geometry.coordinates).transform(F, this.#n()))) : i?.geometry.type === "MultiLineString" ? this.#s.addFeature(new $(new _e(i.geometry.coordinates).transform(F, this.#n()))) : i?.geometry.type.endsWith("Point") && o();
1229
1233
  if (this.#t.showResultMarkers !== !1)
1230
1234
  for (const r of e ?? []) {
1231
1235
  if (r.id === i?.id || r.place_type.includes("reverse"))
@@ -1241,7 +1245,7 @@ class oi extends Ke {
1241
1245
  this.#h?.set("isSelected", !1), this.#h = void 0, this.#t.markerOnSelected !== !1 && (this.#h = this.#c.get(e), this.#h?.setProperties({ isSelected: !0 }));
1242
1246
  }
1243
1247
  #T() {
1244
- this.#e && (this.#s = new it({}), this.#l = new He({
1248
+ this.#e && (this.#s = new st({}), this.#l = new Je({
1245
1249
  updateWhileAnimating: !0
1246
1250
  }), this.#l.setSource(this.#s), this.#l.setStyle(this.#E()), this.#e.addLayer(this.#l));
1247
1251
  }
@@ -1249,24 +1253,24 @@ class oi extends Ke {
1249
1253
  !this.#e || !this.#l || (this.#e.removeLayer(this.#l), this.#l = void 0);
1250
1254
  }
1251
1255
  #n() {
1252
- return Xe() ?? this.#e?.getView().getProjection();
1256
+ return et() ?? this.#e?.getView().getProjection();
1253
1257
  }
1254
1258
  #f(e) {
1255
- return et(e, this.#n());
1256
- }
1257
- #g(e) {
1258
1259
  return tt(e, this.#n());
1259
1260
  }
1261
+ #$(e) {
1262
+ return it(e, this.#n());
1263
+ }
1260
1264
  #E() {
1261
1265
  const { fullGeometryStyle: e } = this.#t;
1262
- if (e === !0 || e === void 0) return Ut(this.#t);
1266
+ if (e === !0 || e === void 0) return Bt(this.#t);
1263
1267
  if (!(e === !1 || e === null))
1264
1268
  return e;
1265
1269
  }
1266
1270
  }
1267
1271
  export {
1268
- Ut as DEFAULT_GEOMETRY_STYLE,
1269
- oi as GeocodingControl,
1272
+ Bt as DEFAULT_GEOMETRY_STYLE,
1273
+ ni as GeocodingControl,
1270
1274
  te as MaptilerGeocodeClearIconElement,
1271
1275
  ie as MaptilerGeocodeFailIconElement,
1272
1276
  se as MaptilerGeocodeLoadingIconElement,
@@ -1274,7 +1278,7 @@ export {
1274
1278
  re as MaptilerGeocodeReverseGeocodingIconElement,
1275
1279
  oe as MaptilerGeocodeSearchIconElement,
1276
1280
  l as MaptilerGeocoderElement,
1277
- oi as OpenLayersGeocodingControl,
1278
- Et as ZOOM_DEFAULTS
1281
+ ni as OpenLayersGeocodingControl,
1282
+ Ut as ZOOM_DEFAULTS
1279
1283
  };
1280
1284
  //# sourceMappingURL=openlayers.public.js.map