@maptiler/geocoding-control 0.0.32 → 0.0.37

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,952 +1,2365 @@
1
- var Ve = (t, e, n) => {
2
- if (!e.has(t))
3
- throw TypeError("Cannot " + n);
1
+ var ht = (n, t, e) => {
2
+ if (!t.has(n))
3
+ throw TypeError("Cannot " + e);
4
4
  };
5
- var Z = (t, e, n) => (Ve(t, e, "read from private field"), n ? n.call(t) : e.get(t)), Ie = (t, e, n) => {
6
- if (e.has(t))
5
+ var J = (n, t, e) => (ht(n, t, "read from private field"), e ? e.call(n) : t.get(n)), We = (n, t, e) => {
6
+ if (t.has(n))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- e instanceof WeakSet ? e.add(t) : e.set(t, n);
9
- }, ke = (t, e, n, l) => (Ve(t, e, "write to private field"), l ? l.call(t, n) : e.set(t, n), n);
10
- import { Evented as pt } from "maplibre-gl";
11
- function v() {
8
+ t instanceof WeakSet ? t.add(n) : t.set(n, e);
9
+ }, Ne = (n, t, e, r) => (ht(n, t, "write to private field"), r ? r.call(n, e) : t.set(n, e), e);
10
+ import { Evented as ur } from "maplibre-gl";
11
+ function T() {
12
12
  }
13
- function vt(t, e) {
14
- for (const n in e)
15
- t[n] = e[n];
16
- return t;
13
+ function fr(n, t) {
14
+ for (const e in t)
15
+ n[e] = t[e];
16
+ return n;
17
17
  }
18
- function Fe(t) {
19
- return t();
18
+ function At(n) {
19
+ return n();
20
20
  }
21
- function Ue() {
21
+ function gt() {
22
22
  return /* @__PURE__ */ Object.create(null);
23
23
  }
24
- function te(t) {
25
- t.forEach(Fe);
24
+ function ce(n) {
25
+ n.forEach(At);
26
26
  }
27
- function $e(t) {
28
- return typeof t == "function";
27
+ function Nt(n) {
28
+ return typeof n == "function";
29
29
  }
30
- function de(t, e) {
31
- return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
30
+ function Ee(n, t) {
31
+ return n != n ? t == t : n !== t || n && typeof n == "object" || typeof n == "function";
32
32
  }
33
- function wt(t) {
34
- return Object.keys(t).length === 0;
33
+ function ar(n) {
34
+ return Object.keys(n).length === 0;
35
35
  }
36
- function kt(t, e, n, l) {
37
- if (t) {
38
- const r = et(t, e, n, l);
39
- return t[0](r);
36
+ function cr(n, t, e, r) {
37
+ if (n) {
38
+ const i = Bt(n, t, e, r);
39
+ return n[0](i);
40
40
  }
41
41
  }
42
- function et(t, e, n, l) {
43
- return t[1] && l ? vt(n.ctx.slice(), t[1](l(e))) : n.ctx;
44
- }
45
- function Mt(t, e, n, l) {
46
- if (t[2] && l) {
47
- const r = t[2](l(n));
48
- if (e.dirty === void 0)
49
- return r;
50
- if (typeof r == "object") {
51
- const u = [], o = Math.max(e.dirty.length, r.length);
52
- for (let i = 0; i < o; i += 1)
53
- u[i] = e.dirty[i] | r[i];
54
- return u;
42
+ function Bt(n, t, e, r) {
43
+ return n[1] && r ? fr(e.ctx.slice(), n[1](r(t))) : e.ctx;
44
+ }
45
+ function hr(n, t, e, r) {
46
+ if (n[2] && r) {
47
+ const i = n[2](r(e));
48
+ if (t.dirty === void 0)
49
+ return i;
50
+ if (typeof i == "object") {
51
+ const o = [], l = Math.max(t.dirty.length, i.length);
52
+ for (let s = 0; s < l; s += 1)
53
+ o[s] = t.dirty[s] | i[s];
54
+ return o;
55
55
  }
56
- return e.dirty | r;
56
+ return t.dirty | i;
57
57
  }
58
- return e.dirty;
58
+ return t.dirty;
59
59
  }
60
- function Ct(t, e, n, l, r, u) {
61
- if (r) {
62
- const o = et(e, n, l, u);
63
- t.p(o, r);
60
+ function gr(n, t, e, r, i, o) {
61
+ if (i) {
62
+ const l = Bt(t, e, r, o);
63
+ n.p(l, i);
64
64
  }
65
65
  }
66
- function Tt(t) {
67
- if (t.ctx.length > 32) {
68
- const e = [], n = t.ctx.length / 32;
69
- for (let l = 0; l < n; l++)
70
- e[l] = -1;
71
- return e;
66
+ function vr(n) {
67
+ if (n.ctx.length > 32) {
68
+ const t = [], e = n.ctx.length / 32;
69
+ for (let r = 0; r < e; r++)
70
+ t[r] = -1;
71
+ return t;
72
72
  }
73
73
  return -1;
74
74
  }
75
- function We(t) {
76
- return t == null ? "" : t;
75
+ function vt(n) {
76
+ return n == null ? "" : n;
77
77
  }
78
- function y(t, e) {
79
- t.appendChild(e);
78
+ function R(n, t) {
79
+ n.appendChild(t);
80
80
  }
81
- function U(t, e, n) {
82
- t.insertBefore(e, n || null);
81
+ function X(n, t, e) {
82
+ n.insertBefore(t, e || null);
83
83
  }
84
- function K(t) {
85
- t.parentNode.removeChild(t);
84
+ function Y(n) {
85
+ n.parentNode.removeChild(n);
86
86
  }
87
- function Lt(t, e) {
88
- for (let n = 0; n < t.length; n += 1)
89
- t[n] && t[n].d(e);
87
+ function yr(n, t) {
88
+ for (let e = 0; e < n.length; e += 1)
89
+ n[e] && n[e].d(t);
90
90
  }
91
- function z(t) {
92
- return document.createElement(t);
91
+ function B(n) {
92
+ return document.createElement(n);
93
93
  }
94
- function ee(t) {
95
- return document.createElementNS("http://www.w3.org/2000/svg", t);
94
+ function fe(n) {
95
+ return document.createElementNS("http://www.w3.org/2000/svg", n);
96
96
  }
97
- function ie(t) {
98
- return document.createTextNode(t);
97
+ function de(n) {
98
+ return document.createTextNode(n);
99
99
  }
100
- function x() {
101
- return ie(" ");
100
+ function ee() {
101
+ return de(" ");
102
102
  }
103
- function V(t, e, n, l) {
104
- return t.addEventListener(e, n, l), () => t.removeEventListener(e, n, l);
103
+ function Z(n, t, e, r) {
104
+ return n.addEventListener(t, e, r), () => n.removeEventListener(t, e, r);
105
105
  }
106
- function Et(t) {
107
- return function(e) {
108
- return e.preventDefault(), t.call(this, e);
106
+ function dr(n) {
107
+ return function(t) {
108
+ return t.preventDefault(), n.call(this, t);
109
109
  };
110
110
  }
111
- function c(t, e, n) {
112
- n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n);
111
+ function y(n, t, e) {
112
+ e == null ? n.removeAttribute(t) : n.getAttribute(t) !== e && n.setAttribute(t, e);
113
113
  }
114
- function Rt(t) {
115
- return Array.from(t.childNodes);
114
+ function mr(n) {
115
+ return Array.from(n.childNodes);
116
116
  }
117
- function pe(t, e) {
118
- e = "" + e, t.wholeText !== e && (t.data = e);
117
+ function Oe(n, t) {
118
+ t = "" + t, n.wholeText !== t && (n.data = t);
119
119
  }
120
- function Ge(t, e) {
121
- t.value = e == null ? "" : e;
120
+ function yt(n, t) {
121
+ n.value = t == null ? "" : t;
122
122
  }
123
- function N(t, e, n) {
124
- t.classList[n ? "add" : "remove"](e);
123
+ function F(n, t, e) {
124
+ n.classList[e ? "add" : "remove"](t);
125
125
  }
126
- function St(t, e, { bubbles: n = !1, cancelable: l = !1 } = {}) {
127
- const r = document.createEvent("CustomEvent");
128
- return r.initCustomEvent(t, n, l, e), r;
126
+ function pr(n, t, { bubbles: e = !1, cancelable: r = !1 } = {}) {
127
+ const i = document.createEvent("CustomEvent");
128
+ return i.initCustomEvent(n, e, r, t), i;
129
129
  }
130
- let ve;
131
- function be(t) {
132
- ve = t;
130
+ let Te;
131
+ function Ie(n) {
132
+ Te = n;
133
133
  }
134
- function tt() {
135
- if (!ve)
134
+ function Gt() {
135
+ if (!Te)
136
136
  throw new Error("Function called outside component initialization");
137
- return ve;
138
- }
139
- function It(t) {
140
- tt().$$.on_destroy.push(t);
141
- }
142
- function Bt() {
143
- const t = tt();
144
- return (e, n, { cancelable: l = !1 } = {}) => {
145
- const r = t.$$.callbacks[e];
146
- if (r) {
147
- const u = St(e, n, { cancelable: l });
148
- return r.slice().forEach((o) => {
149
- o.call(t, u);
150
- }), !u.defaultPrevented;
137
+ return Te;
138
+ }
139
+ function _r(n) {
140
+ Gt().$$.on_destroy.push(n);
141
+ }
142
+ function xr() {
143
+ const n = Gt();
144
+ return (t, e, { cancelable: r = !1 } = {}) => {
145
+ const i = n.$$.callbacks[t];
146
+ if (i) {
147
+ const o = pr(t, e, { cancelable: r });
148
+ return i.slice().forEach((l) => {
149
+ l.call(n, o);
150
+ }), !o.defaultPrevented;
151
151
  }
152
152
  return !0;
153
153
  };
154
154
  }
155
- const ye = [], Ae = [], Ce = [], He = [], At = Promise.resolve();
156
- let Pe = !1;
157
- function Pt() {
158
- Pe || (Pe = !0, At.then(nt));
155
+ const Re = [], Ke = [], Ge = [], dt = [], br = Promise.resolve();
156
+ let Je = !1;
157
+ function wr() {
158
+ Je || (Je = !0, br.then(qt));
159
159
  }
160
- function ze(t) {
161
- Ce.push(t);
160
+ function $e(n) {
161
+ Ge.push(n);
162
162
  }
163
- const Be = /* @__PURE__ */ new Set();
164
- let Me = 0;
165
- function nt() {
166
- const t = ve;
163
+ const je = /* @__PURE__ */ new Set();
164
+ let Be = 0;
165
+ function qt() {
166
+ const n = Te;
167
167
  do {
168
- for (; Me < ye.length; ) {
169
- const e = ye[Me];
170
- Me++, be(e), zt(e.$$);
171
- }
172
- for (be(null), ye.length = 0, Me = 0; Ae.length; )
173
- Ae.pop()();
174
- for (let e = 0; e < Ce.length; e += 1) {
175
- const n = Ce[e];
176
- Be.has(n) || (Be.add(n), n());
177
- }
178
- Ce.length = 0;
179
- } while (ye.length);
180
- for (; He.length; )
181
- He.pop()();
182
- Pe = !1, Be.clear(), be(t);
183
- }
184
- function zt(t) {
185
- if (t.fragment !== null) {
186
- t.update(), te(t.before_update);
187
- const e = t.dirty;
188
- t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(ze);
189
- }
190
- }
191
- const Te = /* @__PURE__ */ new Set();
192
- let se;
193
- function Le() {
194
- se = {
168
+ for (; Be < Re.length; ) {
169
+ const t = Re[Be];
170
+ Be++, Ie(t), Er(t.$$);
171
+ }
172
+ for (Ie(null), Re.length = 0, Be = 0; Ke.length; )
173
+ Ke.pop()();
174
+ for (let t = 0; t < Ge.length; t += 1) {
175
+ const e = Ge[t];
176
+ je.has(e) || (je.add(e), e());
177
+ }
178
+ Ge.length = 0;
179
+ } while (Re.length);
180
+ for (; dt.length; )
181
+ dt.pop()();
182
+ Je = !1, je.clear(), Ie(n);
183
+ }
184
+ function Er(n) {
185
+ if (n.fragment !== null) {
186
+ n.update(), ce(n.before_update);
187
+ const t = n.dirty;
188
+ n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, t), n.after_update.forEach($e);
189
+ }
190
+ }
191
+ const qe = /* @__PURE__ */ new Set();
192
+ let ve;
193
+ function Fe() {
194
+ ve = {
195
195
  r: 0,
196
196
  c: [],
197
- p: se
197
+ p: ve
198
198
  };
199
199
  }
200
- function Ee() {
201
- se.r || te(se.c), se = se.p;
200
+ function Qe() {
201
+ ve.r || ce(ve.c), ve = ve.p;
202
202
  }
203
- function P(t, e) {
204
- t && t.i && (Te.delete(t), t.i(e));
203
+ function N(n, t) {
204
+ n && n.i && (qe.delete(n), n.i(t));
205
205
  }
206
- function q(t, e, n, l) {
207
- if (t && t.o) {
208
- if (Te.has(t))
206
+ function V(n, t, e, r) {
207
+ if (n && n.o) {
208
+ if (qe.has(n))
209
209
  return;
210
- Te.add(t), se.c.push(() => {
211
- Te.delete(t), l && (n && t.d(1), l());
212
- }), t.o(e);
210
+ qe.add(n), ve.c.push(() => {
211
+ qe.delete(n), r && (e && n.d(1), r());
212
+ }), n.o(t);
213
213
  } else
214
- l && l();
214
+ r && r();
215
215
  }
216
- function we(t) {
217
- t && t.c();
216
+ function Ce(n) {
217
+ n && n.c();
218
218
  }
219
- function ue(t, e, n, l) {
220
- const { fragment: r, after_update: u } = t.$$;
221
- r && r.m(e, n), l || ze(() => {
222
- const o = t.$$.on_mount.map(Fe).filter($e);
223
- t.$$.on_destroy ? t.$$.on_destroy.push(...o) : te(o), t.$$.on_mount = [];
224
- }), u.forEach(ze);
219
+ function be(n, t, e, r) {
220
+ const { fragment: i, after_update: o } = n.$$;
221
+ i && i.m(t, e), r || $e(() => {
222
+ const l = n.$$.on_mount.map(At).filter(Nt);
223
+ n.$$.on_destroy ? n.$$.on_destroy.push(...l) : ce(l), n.$$.on_mount = [];
224
+ }), o.forEach($e);
225
225
  }
226
- function ae(t, e) {
227
- const n = t.$$;
228
- n.fragment !== null && (te(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
226
+ function we(n, t) {
227
+ const e = n.$$;
228
+ e.fragment !== null && (ce(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
229
229
  }
230
- function jt(t, e) {
231
- t.$$.dirty[0] === -1 && (ye.push(t), Pt(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
230
+ function Sr(n, t) {
231
+ n.$$.dirty[0] === -1 && (Re.push(n), wr(), n.$$.dirty.fill(0)), n.$$.dirty[t / 31 | 0] |= 1 << t % 31;
232
232
  }
233
- function he(t, e, n, l, r, u, o, i = [-1]) {
234
- const f = ve;
235
- be(t);
236
- const a = t.$$ = {
233
+ function Se(n, t, e, r, i, o, l, s = [-1]) {
234
+ const u = Te;
235
+ Ie(n);
236
+ const f = n.$$ = {
237
237
  fragment: null,
238
238
  ctx: [],
239
- props: u,
240
- update: v,
241
- not_equal: r,
242
- bound: Ue(),
239
+ props: o,
240
+ update: T,
241
+ not_equal: i,
242
+ bound: gt(),
243
243
  on_mount: [],
244
244
  on_destroy: [],
245
245
  on_disconnect: [],
246
246
  before_update: [],
247
247
  after_update: [],
248
- context: new Map(e.context || (f ? f.$$.context : [])),
249
- callbacks: Ue(),
250
- dirty: i,
248
+ context: new Map(t.context || (u ? u.$$.context : [])),
249
+ callbacks: gt(),
250
+ dirty: s,
251
251
  skip_bound: !1,
252
- root: e.target || f.$$.root
252
+ root: t.target || u.$$.root
253
253
  };
254
- o && o(a.root);
255
- let d = !1;
256
- if (a.ctx = n ? n(t, e.props || {}, (b, E, ...R) => {
257
- const h = R.length ? R[0] : E;
258
- return a.ctx && r(a.ctx[b], a.ctx[b] = h) && (!a.skip_bound && a.bound[b] && a.bound[b](h), d && jt(t, b)), E;
259
- }) : [], a.update(), d = !0, te(a.before_update), a.fragment = l ? l(a.ctx) : !1, e.target) {
260
- if (e.hydrate) {
261
- const b = Rt(e.target);
262
- a.fragment && a.fragment.l(b), b.forEach(K);
254
+ l && l(f.root);
255
+ let a = !1;
256
+ if (f.ctx = e ? e(n, t.props || {}, (g, m, ...v) => {
257
+ const b = v.length ? v[0] : m;
258
+ return f.ctx && i(f.ctx[g], f.ctx[g] = b) && (!f.skip_bound && f.bound[g] && f.bound[g](b), a && Sr(n, g)), m;
259
+ }) : [], f.update(), a = !0, ce(f.before_update), f.fragment = r ? r(f.ctx) : !1, t.target) {
260
+ if (t.hydrate) {
261
+ const g = mr(t.target);
262
+ f.fragment && f.fragment.l(g), g.forEach(Y);
263
263
  } else
264
- a.fragment && a.fragment.c();
265
- e.intro && P(t.$$.fragment), ue(t, e.target, e.anchor, e.customElement), nt();
264
+ f.fragment && f.fragment.c();
265
+ t.intro && N(n.$$.fragment), be(n, t.target, t.anchor, t.customElement), qt();
266
266
  }
267
- be(f);
267
+ Ie(u);
268
268
  }
269
- class _e {
269
+ class ke {
270
270
  $destroy() {
271
- ae(this, 1), this.$destroy = v;
271
+ we(this, 1), this.$destroy = T;
272
272
  }
273
- $on(e, n) {
274
- if (!$e(n))
275
- return v;
276
- const l = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
277
- return l.push(n), () => {
278
- const r = l.indexOf(n);
279
- r !== -1 && l.splice(r, 1);
273
+ $on(t, e) {
274
+ if (!Nt(e))
275
+ return T;
276
+ const r = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
277
+ return r.push(e), () => {
278
+ const i = r.indexOf(e);
279
+ i !== -1 && r.splice(i, 1);
280
280
  };
281
281
  }
282
- $set(e) {
283
- this.$$set && !wt(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
282
+ $set(t) {
283
+ this.$$set && !ar(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
284
284
  }
285
285
  }
286
- function Ot(t) {
287
- let e, n;
286
+ function kr(n) {
287
+ let t, e;
288
288
  return {
289
289
  c() {
290
- e = ee("svg"), n = ee("path"), c(n, "d", "M500 115.1c212.2 0 384.9 172.6 384.9 384.9 0 212.2-172.7 384.9-384.9 384.9S115.1 712.2 115.1 500c0-212.4 172.5-384.9 384.9-384.9M500 10C229.4 10 10 229.4 10 500s219.4 490 490 490 490-219.4 490-490c-.2-270.6-219.5-490-490-490zm0 315c96.5 0 175 78.4 175 175 0 96.5-78.4 175-175 175-96.5 0-175-78.4-175-175 0-96.5 78.4-175 175-175m0-105c-154.7 0-279.9 125.4-279.9 279.9 0 154.7 125.4 279.9 279.9 279.9 154.5 0 279.9-125.4 279.9-279.9C779.9 345.3 654.5 220 500 220zm70 280c0 38.7-31.3 70-70 70s-70-31.3-70-70 31.3-70 70-70 70 31.3 70 70z"), c(e, "viewBox", "0 0 1000 1000"), c(e, "width", "18px"), c(e, "height", "18px"), c(e, "class", "svelte-en2qvf");
290
+ t = fe("svg"), e = fe("path"), y(e, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), y(t, "viewBox", "0 0 60.006 21.412"), y(t, "width", "14"), y(t, "height", "20"), y(t, "class", "svelte-en2qvf");
291
291
  },
292
- m(l, r) {
293
- U(l, e, r), y(e, n);
292
+ m(r, i) {
293
+ X(r, t, i), R(t, e);
294
294
  },
295
- p: v,
296
- i: v,
297
- o: v,
298
- d(l) {
299
- l && K(e);
295
+ p: T,
296
+ i: T,
297
+ o: T,
298
+ d(r) {
299
+ r && Y(t);
300
300
  }
301
301
  };
302
302
  }
303
- class Nt extends _e {
304
- constructor(e) {
305
- super(), he(this, e, null, Ot, de, {});
303
+ class Pr extends ke {
304
+ constructor(t) {
305
+ super(), Se(this, t, null, kr, Ee, {});
306
306
  }
307
307
  }
308
- function Dt(t) {
309
- let e, n;
308
+ function Rr(n) {
309
+ let t, e;
310
310
  return {
311
311
  c() {
312
- e = ee("svg"), n = ee("path"), c(n, "d", "M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"), c(e, "viewBox", "0 0 18 18"), c(e, "width", "16"), c(e, "height", "16"), c(e, "class", "svelte-en2qvf");
312
+ t = fe("svg"), e = fe("path"), y(e, "d", "M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"), y(t, "viewBox", "0 0 18 18"), y(t, "width", "16"), y(t, "height", "16"), y(t, "class", "svelte-en2qvf");
313
313
  },
314
- m(l, r) {
315
- U(l, e, r), y(e, n);
314
+ m(r, i) {
315
+ X(r, t, i), R(t, e);
316
316
  },
317
- p: v,
318
- i: v,
319
- o: v,
320
- d(l) {
321
- l && K(e);
317
+ p: T,
318
+ i: T,
319
+ o: T,
320
+ d(r) {
321
+ r && Y(t);
322
322
  }
323
323
  };
324
324
  }
325
- class qt extends _e {
326
- constructor(e) {
327
- super(), he(this, e, null, Dt, de, {});
325
+ class Ir extends ke {
326
+ constructor(t) {
327
+ super(), Se(this, t, null, Rr, Ee, {});
328
328
  }
329
329
  }
330
- function Kt(t) {
331
- let e;
330
+ function Lr(n) {
331
+ let t;
332
332
  return {
333
333
  c() {
334
- e = z("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', c(e, "class", "svelte-7cmwmc");
334
+ t = B("div"), t.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', y(t, "class", "svelte-7cmwmc");
335
335
  },
336
- m(n, l) {
337
- U(n, e, l);
336
+ m(e, r) {
337
+ X(e, t, r);
338
338
  },
339
- p: v,
340
- i: v,
341
- o: v,
342
- d(n) {
343
- n && K(e);
339
+ p: T,
340
+ i: T,
341
+ o: T,
342
+ d(e) {
343
+ e && Y(t);
344
344
  }
345
345
  };
346
346
  }
347
- class Qt extends _e {
348
- constructor(e) {
349
- super(), he(this, e, null, Kt, de, {});
347
+ class Mr extends ke {
348
+ constructor(t) {
349
+ super(), Se(this, t, null, Lr, Ee, {});
350
350
  }
351
351
  }
352
- function Vt(t) {
353
- let e, n, l;
352
+ function Or(n) {
353
+ let t, e, r;
354
354
  return {
355
355
  c() {
356
- e = ee("svg"), n = ee("path"), c(n, "stroke-width", "4"), c(n, "fill-rule", "evenodd"), c(n, "clip-rule", "evenodd"), c(n, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), c(n, "class", "svelte-656hh2"), c(e, "width", l = t[0] !== "list" ? void 0 : "20"), c(e, "viewBox", "0 0 70 85"), c(e, "fill", "none"), c(e, "class", "svelte-656hh2"), N(e, "in-map", t[0] !== "list"), N(e, "for-maplibre", t[0] === "maplibre"), N(e, "for-leaflet", t[0] === "leaflet"), N(e, "list-icon", t[0] === "list");
356
+ t = fe("svg"), e = fe("path"), y(e, "stroke-width", "4"), y(e, "fill-rule", "evenodd"), y(e, "clip-rule", "evenodd"), y(e, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), y(e, "class", "svelte-656hh2"), y(t, "width", r = n[0] !== "list" ? void 0 : "20"), y(t, "viewBox", "0 0 70 85"), y(t, "fill", "none"), y(t, "class", "svelte-656hh2"), F(t, "in-map", n[0] !== "list"), F(t, "for-maplibre", n[0] === "maplibre"), F(t, "for-leaflet", n[0] === "leaflet"), F(t, "list-icon", n[0] === "list");
357
357
  },
358
- m(r, u) {
359
- U(r, e, u), y(e, n);
358
+ m(i, o) {
359
+ X(i, t, o), R(t, e);
360
360
  },
361
- p(r, [u]) {
362
- u & 1 && l !== (l = r[0] !== "list" ? void 0 : "20") && c(e, "width", l), u & 1 && N(e, "in-map", r[0] !== "list"), u & 1 && N(e, "for-maplibre", r[0] === "maplibre"), u & 1 && N(e, "for-leaflet", r[0] === "leaflet"), u & 1 && N(e, "list-icon", r[0] === "list");
361
+ p(i, [o]) {
362
+ o & 1 && r !== (r = i[0] !== "list" ? void 0 : "20") && y(t, "width", r), o & 1 && F(t, "in-map", i[0] !== "list"), o & 1 && F(t, "for-maplibre", i[0] === "maplibre"), o & 1 && F(t, "for-leaflet", i[0] === "leaflet"), o & 1 && F(t, "list-icon", i[0] === "list");
363
363
  },
364
- i: v,
365
- o: v,
366
- d(r) {
367
- r && K(e);
364
+ i: T,
365
+ o: T,
366
+ d(i) {
367
+ i && Y(t);
368
368
  }
369
369
  };
370
370
  }
371
- function Ut(t, e, n) {
372
- let { displayIn: l } = e;
373
- return t.$$set = (r) => {
374
- "displayIn" in r && n(0, l = r.displayIn);
375
- }, [l];
371
+ function Tr(n, t, e) {
372
+ let { displayIn: r } = t;
373
+ return n.$$set = (i) => {
374
+ "displayIn" in i && e(0, r = i.displayIn);
375
+ }, [r];
376
376
  }
377
- class lt extends _e {
378
- constructor(e) {
379
- super(), he(this, e, Ut, Vt, de, { displayIn: 0 });
377
+ class Ft extends ke {
378
+ constructor(t) {
379
+ super(), Se(this, t, Tr, Or, Ee, { displayIn: 0 });
380
380
  }
381
381
  }
382
- function Wt(t) {
383
- let e, n;
382
+ function Cr(n) {
383
+ let t, e;
384
384
  return {
385
385
  c() {
386
- e = ee("svg"), n = ee("path"), c(n, "d", "M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"), c(e, "viewBox", "0 0 18 18"), c(e, "xml:space", "preserve"), c(e, "width", "20"), c(e, "class", "svelte-en2qvf");
386
+ t = fe("svg"), e = fe("path"), y(e, "d", "M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"), y(t, "viewBox", "0 0 18 18"), y(t, "xml:space", "preserve"), y(t, "width", "20"), y(t, "class", "svelte-en2qvf");
387
387
  },
388
- m(l, r) {
389
- U(l, e, r), y(e, n);
388
+ m(r, i) {
389
+ X(r, t, i), R(t, e);
390
390
  },
391
- p: v,
392
- i: v,
393
- o: v,
394
- d(l) {
395
- l && K(e);
391
+ p: T,
392
+ i: T,
393
+ o: T,
394
+ d(r) {
395
+ r && Y(t);
396
396
  }
397
397
  };
398
398
  }
399
- class Gt extends _e {
400
- constructor(e) {
401
- super(), he(this, e, null, Wt, de, {});
399
+ class zr extends ke {
400
+ constructor(t) {
401
+ super(), Se(this, t, null, Cr, Ee, {});
402
402
  }
403
403
  }
404
- function Ze(t, e, n) {
405
- const l = t.slice();
406
- return l[59] = e[n], l[61] = n, l;
404
+ function mt(n, t, e) {
405
+ const r = n.slice();
406
+ return r[63] = t[e], r[65] = e, r;
407
407
  }
408
- function xe(t) {
409
- let e, n;
410
- return e = new Qt({}), {
408
+ function pt(n) {
409
+ let t, e;
410
+ return t = new Mr({}), {
411
411
  c() {
412
- we(e.$$.fragment);
412
+ Ce(t.$$.fragment);
413
413
  },
414
- m(l, r) {
415
- ue(e, l, r), n = !0;
414
+ m(r, i) {
415
+ be(t, r, i), e = !0;
416
416
  },
417
- i(l) {
418
- n || (P(e.$$.fragment, l), n = !0);
417
+ i(r) {
418
+ e || (N(t.$$.fragment, r), e = !0);
419
419
  },
420
- o(l) {
421
- q(e.$$.fragment, l), n = !1;
420
+ o(r) {
421
+ V(t.$$.fragment, r), e = !1;
422
422
  },
423
- d(l) {
424
- ae(e, l);
423
+ d(r) {
424
+ we(t, r);
425
425
  }
426
426
  };
427
427
  }
428
- function Je(t) {
429
- let e, n, l, r, u, o;
430
- return n = new Nt({}), {
428
+ function _t(n) {
429
+ let t, e, r, i, o;
430
+ return e = new Pr({}), {
431
431
  c() {
432
- e = z("button"), we(n.$$.fragment), c(e, "type", "button"), c(e, "title", l = t[7] === !0 ? "toggle reverse geocoding" : t[7]), c(e, "class", "svelte-16s24r9"), N(e, "active", t[1]);
432
+ t = B("button"), Ce(e.$$.fragment), y(t, "type", "button"), y(t, "title", n[8]), y(t, "class", "svelte-1h1zm6d"), F(t, "active", n[1]);
433
433
  },
434
- m(i, f) {
435
- U(i, e, f), ue(n, e, null), r = !0, u || (o = V(e, "click", t[47]), u = !0);
434
+ m(l, s) {
435
+ X(l, t, s), be(e, t, null), r = !0, i || (o = Z(t, "click", n[50]), i = !0);
436
436
  },
437
- p(i, f) {
438
- (!r || f[0] & 128 && l !== (l = i[7] === !0 ? "toggle reverse geocoding" : i[7])) && c(e, "title", l), (!r || f[0] & 2) && N(e, "active", i[1]);
437
+ p(l, s) {
438
+ (!r || s[0] & 256) && y(t, "title", l[8]), (!r || s[0] & 2) && F(t, "active", l[1]);
439
439
  },
440
- i(i) {
441
- r || (P(n.$$.fragment, i), r = !0);
440
+ i(l) {
441
+ r || (N(e.$$.fragment, l), r = !0);
442
442
  },
443
- o(i) {
444
- q(n.$$.fragment, i), r = !1;
443
+ o(l) {
444
+ V(e.$$.fragment, l), r = !1;
445
445
  },
446
- d(i) {
447
- i && K(e), ae(n), u = !1, o();
446
+ d(l) {
447
+ l && Y(t), we(e), i = !1, o();
448
448
  }
449
449
  };
450
450
  }
451
- function Ht(t) {
452
- let e, n, l, r, u = t[10], o = [];
453
- for (let f = 0; f < u.length; f += 1)
454
- o[f] = Ye(Ze(t, u, f));
455
- const i = (f) => q(o[f], 1, 1, () => {
456
- o[f] = null;
451
+ function Ar(n) {
452
+ let t, e, r, i, o = n[12], l = [];
453
+ for (let u = 0; u < o.length; u += 1)
454
+ l[u] = bt(mt(n, o, u));
455
+ const s = (u) => V(l[u], 1, 1, () => {
456
+ l[u] = null;
457
457
  });
458
458
  return {
459
459
  c() {
460
- e = z("ul");
461
- for (let f = 0; f < o.length; f += 1)
462
- o[f].c();
463
- c(e, "class", "svelte-16s24r9");
464
- },
465
- m(f, a) {
466
- U(f, e, a);
467
- for (let d = 0; d < o.length; d += 1)
468
- o[d].m(e, null);
469
- n = !0, l || (r = [
470
- V(e, "mouseout", t[50]),
471
- V(e, "blur", t[51])
472
- ], l = !0);
473
- },
474
- p(f, a) {
475
- if (a[0] & 7425) {
476
- u = f[10];
477
- let d;
478
- for (d = 0; d < u.length; d += 1) {
479
- const b = Ze(f, u, d);
480
- o[d] ? (o[d].p(b, a), P(o[d], 1)) : (o[d] = Ye(b), o[d].c(), P(o[d], 1), o[d].m(e, null));
460
+ t = B("ul");
461
+ for (let u = 0; u < l.length; u += 1)
462
+ l[u].c();
463
+ y(t, "class", "svelte-1h1zm6d");
464
+ },
465
+ m(u, f) {
466
+ X(u, t, f);
467
+ for (let a = 0; a < l.length; a += 1)
468
+ l[a].m(t, null);
469
+ e = !0, r || (i = [
470
+ Z(t, "mouseout", n[53]),
471
+ Z(t, "blur", n[54])
472
+ ], r = !0);
473
+ },
474
+ p(u, f) {
475
+ if (f[0] & 29697) {
476
+ o = u[12];
477
+ let a;
478
+ for (a = 0; a < o.length; a += 1) {
479
+ const g = mt(u, o, a);
480
+ l[a] ? (l[a].p(g, f), N(l[a], 1)) : (l[a] = bt(g), l[a].c(), N(l[a], 1), l[a].m(t, null));
481
481
  }
482
- for (Le(), d = u.length; d < o.length; d += 1)
483
- i(d);
484
- Ee();
482
+ for (Fe(), a = o.length; a < l.length; a += 1)
483
+ s(a);
484
+ Qe();
485
485
  }
486
486
  },
487
- i(f) {
488
- if (!n) {
489
- for (let a = 0; a < u.length; a += 1)
490
- P(o[a]);
491
- n = !0;
487
+ i(u) {
488
+ if (!e) {
489
+ for (let f = 0; f < o.length; f += 1)
490
+ N(l[f]);
491
+ e = !0;
492
492
  }
493
493
  },
494
- o(f) {
495
- o = o.filter(Boolean);
496
- for (let a = 0; a < o.length; a += 1)
497
- q(o[a]);
498
- n = !1;
494
+ o(u) {
495
+ l = l.filter(Boolean);
496
+ for (let f = 0; f < l.length; f += 1)
497
+ V(l[f]);
498
+ e = !1;
499
499
  },
500
- d(f) {
501
- f && K(e), Lt(o, f), l = !1, te(r);
500
+ d(u) {
501
+ u && Y(t), yr(l, u), r = !1, ce(i);
502
502
  }
503
503
  };
504
504
  }
505
- function Zt(t) {
506
- let e, n;
505
+ function Nr(n) {
506
+ let t, e;
507
507
  return {
508
508
  c() {
509
- e = z("div"), n = ie(t[5]), c(e, "class", "no-results svelte-16s24r9");
509
+ t = B("div"), e = de(n[5]), y(t, "class", "no-results svelte-1h1zm6d");
510
510
  },
511
- m(l, r) {
512
- U(l, e, r), y(e, n);
511
+ m(r, i) {
512
+ X(r, t, i), R(t, e);
513
513
  },
514
- p(l, r) {
515
- r[0] & 32 && pe(n, l[5]);
514
+ p(r, i) {
515
+ i[0] & 32 && Oe(e, r[5]);
516
516
  },
517
- i: v,
518
- o: v,
519
- d(l) {
520
- l && K(e);
517
+ i: T,
518
+ o: T,
519
+ d(r) {
520
+ r && Y(t);
521
521
  }
522
522
  };
523
523
  }
524
- function xt(t) {
525
- let e, n;
524
+ function Br(n) {
525
+ let t, e;
526
526
  return {
527
527
  c() {
528
- e = z("div"), n = ie(t[4]), c(e, "class", "error svelte-16s24r9");
528
+ t = B("div"), e = de(n[4]), y(t, "class", "error svelte-1h1zm6d");
529
529
  },
530
- m(l, r) {
531
- U(l, e, r), y(e, n);
530
+ m(r, i) {
531
+ X(r, t, i), R(t, e);
532
532
  },
533
- p(l, r) {
534
- r[0] & 16 && pe(n, l[4]);
533
+ p(r, i) {
534
+ i[0] & 16 && Oe(e, r[4]);
535
535
  },
536
- i: v,
537
- o: v,
538
- d(l) {
539
- l && K(e);
536
+ i: T,
537
+ o: T,
538
+ d(r) {
539
+ r && Y(t);
540
540
  }
541
541
  };
542
542
  }
543
- function Jt(t) {
544
- let e = "", n;
543
+ function Gr(n) {
544
+ let t = "", e;
545
545
  return {
546
546
  c() {
547
- n = ie(e);
547
+ e = de(t);
548
548
  },
549
- m(l, r) {
550
- U(l, n, r);
549
+ m(r, i) {
550
+ X(r, e, i);
551
551
  },
552
- p: v,
553
- i: v,
554
- o: v,
555
- d(l) {
556
- l && K(n);
552
+ p: T,
553
+ i: T,
554
+ o: T,
555
+ d(r) {
556
+ r && Y(e);
557
557
  }
558
558
  };
559
559
  }
560
- function Xe(t) {
561
- let e, n = t[59].place_type + "", l;
560
+ function xt(n) {
561
+ let t, e = n[63].place_type + "", r;
562
562
  return {
563
563
  c() {
564
- e = z("span"), l = ie(n), c(e, "class", "svelte-16s24r9");
564
+ t = B("span"), r = de(e), y(t, "class", "svelte-1h1zm6d");
565
565
  },
566
- m(r, u) {
567
- U(r, e, u), y(e, l);
566
+ m(i, o) {
567
+ X(i, t, o), R(t, r);
568
568
  },
569
- p(r, u) {
570
- u[0] & 1024 && n !== (n = r[59].place_type + "") && pe(l, n);
569
+ p(i, o) {
570
+ o[0] & 4096 && e !== (e = i[63].place_type + "") && Oe(r, e);
571
571
  },
572
- d(r) {
573
- r && K(e);
572
+ d(i) {
573
+ i && Y(t);
574
574
  }
575
575
  };
576
576
  }
577
- function Ye(t) {
578
- let e, n, l, r, u, o, i = t[59].place_name.replace(/,.*/, "") + "", f, a, d, b, E, R = t[59].place_name.replace(/[^,]*,?\s*/, "") + "", h, g, m, w, M, W;
579
- n = new lt({ props: { displayIn: "list" } });
580
- let C = t[8] && Xe(t);
581
- function T() {
582
- return t[48](t[61]);
577
+ function bt(n) {
578
+ let t, e, r, i, o, l, s = n[63].place_name.replace(/,.*/, "") + "", u, f, a, g, m, v = n[63].place_name.replace(/[^,]*,?\s*/, "") + "", b, p, h, d, w, I;
579
+ e = new Ft({ props: { displayIn: "list" } });
580
+ let _ = n[10] && xt(n);
581
+ function S() {
582
+ return n[51](n[65]);
583
583
  }
584
- function p() {
585
- return t[49](t[59]);
584
+ function E() {
585
+ return n[52](n[63]);
586
586
  }
587
587
  return {
588
588
  c() {
589
- e = z("li"), we(n.$$.fragment), l = x(), r = z("span"), u = z("span"), o = z("span"), f = ie(i), a = x(), C && C.c(), d = x(), b = z("span"), E = z("span"), h = ie(R), g = x(), c(o, "class", "svelte-16s24r9"), c(u, "class", "svelte-16s24r9"), c(r, "class", "svelte-16s24r9"), c(E, "class", "svelte-16s24r9"), c(b, "class", "svelte-16s24r9"), c(e, "tabindex", "0"), c(e, "data-selected", m = t[12] === t[61]), c(e, "class", "svelte-16s24r9"), N(e, "selected", t[12] === t[61]);
589
+ t = B("li"), Ce(e.$$.fragment), r = ee(), i = B("span"), o = B("span"), l = B("span"), u = de(s), f = ee(), _ && _.c(), a = ee(), g = B("span"), m = B("span"), b = de(v), p = ee(), y(l, "class", "svelte-1h1zm6d"), y(o, "class", "svelte-1h1zm6d"), y(i, "class", "svelte-1h1zm6d"), y(m, "class", "svelte-1h1zm6d"), y(g, "class", "svelte-1h1zm6d"), y(t, "tabindex", "0"), y(t, "data-selected", h = n[14] === n[65]), y(t, "class", "svelte-1h1zm6d"), F(t, "selected", n[14] === n[65]);
590
590
  },
591
- m(O, k) {
592
- U(O, e, k), ue(n, e, null), y(e, l), y(e, r), y(r, u), y(u, o), y(o, f), y(u, a), C && C.m(u, null), y(e, d), y(e, b), y(b, E), y(E, h), y(e, g), w = !0, M || (W = [
593
- V(e, "mouseover", T),
594
- V(e, "focus", p)
595
- ], M = !0);
591
+ m(k, P) {
592
+ X(k, t, P), be(e, t, null), R(t, r), R(t, i), R(i, o), R(o, l), R(l, u), R(o, f), _ && _.m(o, null), R(t, a), R(t, g), R(g, m), R(m, b), R(t, p), d = !0, w || (I = [
593
+ Z(t, "mouseover", S),
594
+ Z(t, "focus", E)
595
+ ], w = !0);
596
596
  },
597
- p(O, k) {
598
- t = O, (!w || k[0] & 1024) && i !== (i = t[59].place_name.replace(/,.*/, "") + "") && pe(f, i), t[8] ? C ? C.p(t, k) : (C = Xe(t), C.c(), C.m(u, null)) : C && (C.d(1), C = null), (!w || k[0] & 1024) && R !== (R = t[59].place_name.replace(/[^,]*,?\s*/, "") + "") && pe(h, R), (!w || k[0] & 4096 && m !== (m = t[12] === t[61])) && c(e, "data-selected", m), (!w || k[0] & 4096) && N(e, "selected", t[12] === t[61]);
597
+ p(k, P) {
598
+ n = k, (!d || P[0] & 4096) && s !== (s = n[63].place_name.replace(/,.*/, "") + "") && Oe(u, s), n[10] ? _ ? _.p(n, P) : (_ = xt(n), _.c(), _.m(o, null)) : _ && (_.d(1), _ = null), (!d || P[0] & 4096) && v !== (v = n[63].place_name.replace(/[^,]*,?\s*/, "") + "") && Oe(b, v), (!d || P[0] & 16384 && h !== (h = n[14] === n[65])) && y(t, "data-selected", h), (!d || P[0] & 16384) && F(t, "selected", n[14] === n[65]);
599
599
  },
600
- i(O) {
601
- w || (P(n.$$.fragment, O), w = !0);
600
+ i(k) {
601
+ d || (N(e.$$.fragment, k), d = !0);
602
602
  },
603
- o(O) {
604
- q(n.$$.fragment, O), w = !1;
603
+ o(k) {
604
+ V(e.$$.fragment, k), d = !1;
605
605
  },
606
- d(O) {
607
- O && K(e), ae(n), C && C.d(), M = !1, te(W);
606
+ d(k) {
607
+ k && Y(t), we(e), _ && _.d(), w = !1, ce(I);
608
608
  }
609
609
  };
610
610
  }
611
- function Xt(t) {
612
- let e, n, l, r, u, o, i, f, a, d, b, E, R, h, g, m, w, M, W, C;
613
- r = new Gt({}), d = new qt({});
614
- let T = t[16] && xe(), p = t[7] && Je(t);
615
- const O = t[39].default, k = kt(O, t, t[38], null), S = [Jt, xt, Zt, Ht], j = [];
616
- function ge(_, I) {
617
- var J, X;
618
- return _[13] ? _[15] ? 1 : ((J = _[10]) == null ? void 0 : J.length) === 0 ? 2 : _[13] && ((X = _[10]) == null ? void 0 : X.length) ? 3 : -1 : 0;
611
+ function qr(n) {
612
+ let t, e, r, i, o, l, s, u, f, a, g, m, v, b, p, h, d, w, I, _;
613
+ i = new zr({}), a = new Ir({});
614
+ let S = n[18] && pt(), E = n[7] === !0 && _t(n);
615
+ const k = n[42].default, P = cr(k, n, n[41], null), G = [Gr, Br, Nr, Ar], z = [];
616
+ function L(x, M) {
617
+ var q, re;
618
+ return x[15] ? x[17] ? 1 : ((q = x[12]) == null ? void 0 : q.length) === 0 ? 2 : x[15] && ((re = x[12]) == null ? void 0 : re.length) ? 3 : -1 : 0;
619
619
  }
620
- return ~(g = ge(t)) && (m = j[g] = S[g](t)), {
620
+ return ~(p = L(n)) && (h = z[p] = G[p](n)), {
621
621
  c() {
622
- e = z("form"), n = z("div"), l = z("button"), we(r.$$.fragment), u = x(), o = z("input"), i = x(), f = z("div"), a = z("button"), we(d.$$.fragment), b = x(), T && T.c(), E = x(), p && p.c(), R = x(), k && k.c(), h = x(), m && m.c(), c(l, "type", "button"), c(l, "class", "svelte-16s24r9"), c(o, "placeholder", t[3]), c(o, "aria-label", t[3]), c(o, "class", "svelte-16s24r9"), c(a, "type", "button"), c(a, "class", "svelte-16s24r9"), N(a, "displayable", t[0] !== ""), c(f, "class", "clear-button-container svelte-16s24r9"), c(n, "class", "input-group svelte-16s24r9"), c(e, "tabindex", "0"), c(e, "class", w = We(t[2]) + " svelte-16s24r9"), N(e, "can-collapse", t[6] && t[0] === "");
623
- },
624
- m(_, I) {
625
- U(_, e, I), y(e, n), y(n, l), ue(r, l, null), y(n, u), y(n, o), t[41](o), Ge(o, t[0]), y(n, i), y(n, f), y(f, a), ue(d, a, null), y(f, b), T && T.m(f, null), y(n, E), p && p.m(n, null), y(n, R), k && k.m(n, null), y(e, h), ~g && j[g].m(e, null), M = !0, W || (C = [
626
- V(l, "click", t[40]),
627
- V(o, "input", t[42]),
628
- V(o, "focus", t[43]),
629
- V(o, "blur", t[44]),
630
- V(o, "keydown", t[18]),
631
- V(o, "input", t[45]),
632
- V(a, "click", t[46]),
633
- V(e, "submit", Et(t[17]))
634
- ], W = !0);
635
- },
636
- p(_, I) {
637
- (!M || I[0] & 8) && c(o, "placeholder", _[3]), (!M || I[0] & 8) && c(o, "aria-label", _[3]), I[0] & 1 && o.value !== _[0] && Ge(o, _[0]), (!M || I[0] & 1) && N(a, "displayable", _[0] !== ""), _[16] ? T ? I[0] & 65536 && P(T, 1) : (T = xe(), T.c(), P(T, 1), T.m(f, null)) : T && (Le(), q(T, 1, 1, () => {
638
- T = null;
639
- }), Ee()), _[7] ? p ? (p.p(_, I), I[0] & 128 && P(p, 1)) : (p = Je(_), p.c(), P(p, 1), p.m(n, R)) : p && (Le(), q(p, 1, 1, () => {
640
- p = null;
641
- }), Ee()), k && k.p && (!M || I[1] & 128) && Ct(
622
+ t = B("form"), e = B("div"), r = B("button"), Ce(i.$$.fragment), o = ee(), l = B("input"), s = ee(), u = B("div"), f = B("button"), Ce(a.$$.fragment), g = ee(), S && S.c(), m = ee(), E && E.c(), v = ee(), P && P.c(), b = ee(), h && h.c(), y(r, "type", "button"), y(r, "class", "svelte-1h1zm6d"), y(l, "placeholder", n[3]), y(l, "aria-label", n[3]), y(l, "class", "svelte-1h1zm6d"), y(f, "type", "button"), y(f, "title", n[9]), y(f, "class", "svelte-1h1zm6d"), F(f, "displayable", n[0] !== ""), y(u, "class", "clear-button-container svelte-1h1zm6d"), y(e, "class", "input-group svelte-1h1zm6d"), y(t, "tabindex", "0"), y(t, "class", d = vt(n[2]) + " svelte-1h1zm6d"), F(t, "can-collapse", n[6] && n[0] === "");
623
+ },
624
+ m(x, M) {
625
+ X(x, t, M), R(t, e), R(e, r), be(i, r, null), R(e, o), R(e, l), n[44](l), yt(l, n[0]), R(e, s), R(e, u), R(u, f), be(a, f, null), R(u, g), S && S.m(u, null), R(e, m), E && E.m(e, null), R(e, v), P && P.m(e, null), R(t, b), ~p && z[p].m(t, null), w = !0, I || (_ = [
626
+ Z(r, "click", n[43]),
627
+ Z(l, "input", n[45]),
628
+ Z(l, "focus", n[46]),
629
+ Z(l, "blur", n[47]),
630
+ Z(l, "keydown", n[20]),
631
+ Z(l, "input", n[48]),
632
+ Z(f, "click", n[49]),
633
+ Z(t, "submit", dr(n[19]))
634
+ ], I = !0);
635
+ },
636
+ p(x, M) {
637
+ (!w || M[0] & 8) && y(l, "placeholder", x[3]), (!w || M[0] & 8) && y(l, "aria-label", x[3]), M[0] & 1 && l.value !== x[0] && yt(l, x[0]), (!w || M[0] & 512) && y(f, "title", x[9]), (!w || M[0] & 1) && F(f, "displayable", x[0] !== ""), x[18] ? S ? M[0] & 262144 && N(S, 1) : (S = pt(), S.c(), N(S, 1), S.m(u, null)) : S && (Fe(), V(S, 1, 1, () => {
638
+ S = null;
639
+ }), Qe()), x[7] === !0 ? E ? (E.p(x, M), M[0] & 128 && N(E, 1)) : (E = _t(x), E.c(), N(E, 1), E.m(e, v)) : E && (Fe(), V(E, 1, 1, () => {
640
+ E = null;
641
+ }), Qe()), P && P.p && (!w || M[1] & 1024) && gr(
642
+ P,
642
643
  k,
643
- O,
644
- _,
645
- _[38],
646
- M ? Mt(O, _[38], I, null) : Tt(_[38]),
644
+ x,
645
+ x[41],
646
+ w ? hr(k, x[41], M, null) : vr(x[41]),
647
647
  null
648
648
  );
649
- let J = g;
650
- g = ge(_), g === J ? ~g && j[g].p(_, I) : (m && (Le(), q(j[J], 1, 1, () => {
651
- j[J] = null;
652
- }), Ee()), ~g ? (m = j[g], m ? m.p(_, I) : (m = j[g] = S[g](_), m.c()), P(m, 1), m.m(e, null)) : m = null), (!M || I[0] & 4 && w !== (w = We(_[2]) + " svelte-16s24r9")) && c(e, "class", w), (!M || I[0] & 69) && N(e, "can-collapse", _[6] && _[0] === "");
649
+ let q = p;
650
+ p = L(x), p === q ? ~p && z[p].p(x, M) : (h && (Fe(), V(z[q], 1, 1, () => {
651
+ z[q] = null;
652
+ }), Qe()), ~p ? (h = z[p], h ? h.p(x, M) : (h = z[p] = G[p](x), h.c()), N(h, 1), h.m(t, null)) : h = null), (!w || M[0] & 4 && d !== (d = vt(x[2]) + " svelte-1h1zm6d")) && y(t, "class", d), (!w || M[0] & 69) && F(t, "can-collapse", x[6] && x[0] === "");
653
653
  },
654
- i(_) {
655
- M || (P(r.$$.fragment, _), P(d.$$.fragment, _), P(T), P(p), P(k, _), P(m), M = !0);
654
+ i(x) {
655
+ w || (N(i.$$.fragment, x), N(a.$$.fragment, x), N(S), N(E), N(P, x), N(h), w = !0);
656
656
  },
657
- o(_) {
658
- q(r.$$.fragment, _), q(d.$$.fragment, _), q(T), q(p), q(k, _), q(m), M = !1;
657
+ o(x) {
658
+ V(i.$$.fragment, x), V(a.$$.fragment, x), V(S), V(E), V(P, x), V(h), w = !1;
659
659
  },
660
- d(_) {
661
- _ && K(e), ae(r), t[41](null), ae(d), T && T.d(), p && p.d(), k && k.d(_), ~g && j[g].d(), W = !1, te(C);
660
+ d(x) {
661
+ x && Y(t), we(i), n[44](null), we(a), S && S.d(), E && E.d(), P && P.d(x), ~p && z[p].d(), I = !1, ce(_);
662
662
  }
663
663
  };
664
664
  }
665
- function Yt(t, e, n) {
666
- let l, { $$slots: r = {}, $$scope: u } = e, { class: o = void 0 } = e, { mapController: i = void 0 } = e, { apiKey: f } = e, { debounceSearch: a = 200 } = e, { placeholder: d = "Search" } = e, { errorMessage: b = "Searching failed" } = e, { noResultsMessage: E = "No results found" } = e, { proximity: R = void 0 } = e, { bbox: h = void 0 } = e, { trackProximity: g = !0 } = e, { minLength: m = 2 } = e, { language: w = void 0 } = e, { showResultsWhileTyping: M = !0 } = e, { zoom: W = 16 } = e, { flyTo: C = !0 } = e, { collapsed: T = !1 } = e, { clearOnBlur: p = !1 } = e, { enableReverse: O = !1 } = e, { filter: k = () => !0 } = e, { searchValue: S = "" } = e, { reverseActive: j = !1 } = e, { showPlaceType: ge = !1 } = e;
667
- function _() {
668
- Y.focus();
665
+ function Fr(n, t, e) {
666
+ let r, { $$slots: i = {}, $$scope: o } = t, { class: l = void 0 } = t, { mapController: s = void 0 } = t, { apiKey: u } = t, { debounceSearch: f = 200 } = t, { placeholder: a = "Search" } = t, { errorMessage: g = "Searching failed" } = t, { noResultsMessage: m = "No results found" } = t, { proximity: v = void 0 } = t, { bbox: b = void 0 } = t, { trackProximity: p = !0 } = t, { minLength: h = 2 } = t, { language: d = void 0 } = t, { showResultsWhileTyping: w = !0 } = t, { zoom: I = 16 } = t, { flyTo: _ = !0 } = t, { collapsed: S = !1 } = t, { clearOnBlur: E = !1 } = t, { enableReverse: k = !1 } = t, { reverseButtonTitle: P = "toggle reverse geocoding" } = t, { clearButtonTitle: G = "clear" } = t, { filter: z = () => !0 } = t, { searchValue: L = "" } = t, { reverseActive: x = k === "always" } = t, { showPlaceType: M = !1 } = t, { showFullGeometry: q = !0 } = t;
667
+ function re() {
668
+ K.focus();
669
669
  }
670
- function I() {
671
- Y.blur();
670
+ function Zt() {
671
+ K.blur();
672
672
  }
673
- function J(s, Q = !0) {
674
- n(0, S = s), Q && (n(12, A = -1), Ne());
673
+ function st(c, Q = !0) {
674
+ e(0, L = c), Q ? (e(14, A = -1), ft()) : (Xe(), setTimeout(() => {
675
+ K.focus(), K.select();
676
+ }));
675
677
  }
676
- let X = !1, L, D, B, je = "", Y, A = -1, ne, Oe = [], le, Re, Se;
677
- const F = Bt();
678
- It(() => {
679
- i && (i.setProximityChangeHandler(void 0), i.setMapClickHandler(void 0), i.indicateReverse(!1), i.setSelectedMarker(-1), i.setMarkers(void 0, void 0));
678
+ let me = !1, C, U, O, ut = "", K, A = -1, ne, Ae = [], he, Ve, Ye;
679
+ const ie = xr();
680
+ _r(() => {
681
+ s && (s.setProximityChangeHandler(void 0), s.setMapClickHandler(void 0), s.indicateReverse(!1), s.setSelectedMarker(-1), s.setMarkers(void 0, void 0));
680
682
  });
681
- function Ne() {
682
- A > -1 && L ? (n(11, B = L[A]), n(0, S = B.place_name.replace(/,.*/, "")), n(15, ne = void 0), n(36, D = void 0), n(12, A = -1)) : S && De(S).then(() => {
683
- n(36, D = L), n(11, B = void 0), rt();
684
- }).catch((s) => n(15, ne = s));
685
- }
686
- async function De(s) {
687
- n(15, ne = void 0);
688
- const Q = /^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(s), H = new URLSearchParams();
689
- H.set("key", f), w && H.set("language", String(w)), Q || (h && H.set("bbox", h.join(",")), R && H.set("proximity", R.join(",")));
690
- const re = "https://api.maptiler.com/geocoding/" + encodeURIComponent(s) + ".json?" + H.toString();
691
- if (re === je) {
692
- n(10, L = Oe);
683
+ function ft(c) {
684
+ if (A > -1 && C)
685
+ e(13, O = C[A]), e(0, L = O.place_name.replace(/,.*/, "")), e(17, ne = void 0), e(39, U = void 0), e(14, A = -1);
686
+ else if (L) {
687
+ const Q = c || !at();
688
+ Ze(L).then(() => {
689
+ e(39, U = C), e(13, O = void 0), Q && Xt();
690
+ }).catch((te) => e(17, ne = te));
691
+ }
692
+ }
693
+ function at() {
694
+ return /^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(L);
695
+ }
696
+ async function Ze(c, Q = !1) {
697
+ e(17, ne = void 0);
698
+ const te = at(), oe = new URLSearchParams();
699
+ oe.set("key", u), d && oe.set("language", String(d)), te || (b && oe.set("bbox", b.join(",")), v && oe.set("proximity", v.join(",")));
700
+ const ge = "https://api.maptiler.com/geocoding/" + encodeURIComponent(c) + ".json?" + oe.toString();
701
+ if (ge === ut) {
702
+ Q ? (e(12, C = void 0), e(13, O = Ae[0])) : e(12, C = Ae);
693
703
  return;
694
704
  }
695
- je = re, le == null || le.abort(), n(16, le = new AbortController());
696
- let ce;
705
+ ut = ge, he == null || he.abort(), e(18, he = new AbortController());
706
+ let pe;
697
707
  try {
698
- ce = await fetch(re, { signal: le.signal }).finally(() => {
699
- n(16, le = void 0);
708
+ pe = await fetch(ge, { signal: he.signal }).finally(() => {
709
+ e(18, he = void 0);
700
710
  });
701
- } catch (fe) {
702
- if (fe && typeof fe == "object" && fe.name === "AbortError")
711
+ } catch (xe) {
712
+ if (xe && typeof xe == "object" && xe.name === "AbortError")
703
713
  return;
704
714
  throw new Error();
705
715
  }
706
- if (!ce.ok)
716
+ if (!pe.ok)
707
717
  throw new Error();
708
- const me = await ce.json();
709
- F("response", { url: re, featureCollection: me }), n(10, L = me.features.filter(k)), Oe = L, Q && Y.focus();
718
+ const _e = await pe.json();
719
+ ie("response", { url: ge, featureCollection: _e }), Q ? (e(12, C = void 0), e(13, O = _e.features[0]), Ae = [O]) : (e(12, C = _e.features.filter(z)), Ae = C, te && K.focus());
710
720
  }
711
- function rt() {
712
- var Q, H, re, ce, me, fe, Ke, Qe;
713
- if (!(D != null && D.length) || !C)
721
+ function Xt() {
722
+ var Q, te, oe, ge, pe, _e, xe, ct;
723
+ if (!(U != null && U.length) || !_)
714
724
  return;
715
- const s = [180, 90, -180, -90];
716
- for (const $ of D)
717
- s[0] = Math.min(s[0], (H = (Q = $.bbox) == null ? void 0 : Q[0]) != null ? H : $.center[0]), s[1] = Math.min(s[1], (ce = (re = $.bbox) == null ? void 0 : re[1]) != null ? ce : $.center[1]), s[2] = Math.max(s[2], (fe = (me = $.bbox) == null ? void 0 : me[2]) != null ? fe : $.center[0]), s[3] = Math.max(s[3], (Qe = (Ke = $.bbox) == null ? void 0 : Ke[3]) != null ? Qe : $.center[1]);
718
- i && D.length > 0 && (B && s[0] === s[2] && s[1] === s[3] ? i.flyTo(B.center, W) : i.fitBounds(s, 50));
725
+ const c = [180, 90, -180, -90];
726
+ for (const le of U)
727
+ c[0] = Math.min(c[0], (te = (Q = le.bbox) == null ? void 0 : Q[0]) != null ? te : le.center[0]), c[1] = Math.min(c[1], (ge = (oe = le.bbox) == null ? void 0 : oe[1]) != null ? ge : le.center[1]), c[2] = Math.max(c[2], (_e = (pe = le.bbox) == null ? void 0 : pe[2]) != null ? _e : le.center[0]), c[3] = Math.max(c[3], (ct = (xe = le.bbox) == null ? void 0 : xe[3]) != null ? ct : le.center[1]);
728
+ s && U.length > 0 && (O && c[0] === c[2] && c[1] === c[3] ? s.flyTo(O.center, I) : s.fitBounds(c, 50));
719
729
  }
720
- function st(s) {
721
- n(1, j = !1), J(s[0].toFixed(6) + "," + s[1].toFixed(6));
730
+ function Wt(c) {
731
+ e(1, x = k === "always"), st(c[0].toFixed(6) + "," + c[1].toFixed(6));
722
732
  }
723
- function ot(s) {
724
- if (!L)
733
+ function jt(c) {
734
+ if (!C)
725
735
  return;
726
- let Q = s.key === "ArrowDown" ? 1 : s.key === "ArrowUp" ? -1 : 0;
727
- Q ? (A === -1 && Q === -1 && n(12, A = L.length), n(12, A += Q), A >= L.length && n(12, A = -1), s.preventDefault()) : ["ArrowLeft", "ArrowRight", "Home", "End"].includes(s.key) && n(12, A = -1);
728
- }
729
- function qe(s = !0) {
730
- if (M && S.length > m) {
731
- Re && clearTimeout(Re);
732
- const Q = S;
733
- Re = window.setTimeout(
736
+ let Q = c.key === "ArrowDown" ? 1 : c.key === "ArrowUp" ? -1 : 0;
737
+ Q ? (A === -1 && Q === -1 && e(14, A = C.length), e(14, A += Q), A >= C.length && e(14, A = -1), c.preventDefault()) : ["ArrowLeft", "ArrowRight", "Home", "End"].includes(c.key) && e(14, A = -1);
738
+ }
739
+ function Xe(c = !0) {
740
+ if (w && L.length > h) {
741
+ Ve && clearTimeout(Ve);
742
+ const Q = L;
743
+ Ve = window.setTimeout(
734
744
  () => {
735
- De(Q).catch((H) => n(15, ne = H));
745
+ Ze(Q).catch((te) => e(17, ne = te));
736
746
  },
737
- s ? a : 0
747
+ c ? f : 0
738
748
  );
739
749
  } else
740
- n(10, L = void 0), n(15, ne = void 0);
750
+ e(12, C = void 0), e(17, ne = void 0);
741
751
  }
742
- const it = () => Y.focus();
743
- function ct(s) {
744
- Ae[s ? "unshift" : "push"](() => {
745
- Y = s, n(14, Y);
752
+ const Ht = () => K.focus();
753
+ function Kt(c) {
754
+ Ke[c ? "unshift" : "push"](() => {
755
+ K = c, e(16, K);
746
756
  });
747
757
  }
748
- function ft() {
749
- S = this.value, n(0, S), n(9, X), n(31, p);
758
+ function Jt() {
759
+ L = this.value, e(0, L), e(11, me), e(33, E);
750
760
  }
751
- const ut = () => n(9, X = !0), at = () => n(9, X = !1), dt = () => qe(), ht = () => {
752
- n(0, S = ""), Y.focus();
753
- }, _t = () => n(1, j = !j), gt = (s) => n(12, A = s), mt = (s) => {
754
- n(11, B = s), n(0, S = s.place_name.replace(/,.*/, "")), n(12, A = -1);
755
- }, yt = () => n(12, A = -1), bt = () => {
761
+ const $t = () => e(11, me = !0), er = () => e(11, me = !1), tr = () => Xe(), rr = () => {
762
+ e(0, L = ""), K.focus();
763
+ }, nr = () => e(1, x = !x), ir = (c) => e(14, A = c), or = (c) => {
764
+ e(13, O = c), e(0, L = c.place_name.replace(/,.*/, "")), e(14, A = -1);
765
+ }, lr = () => e(14, A = -1), sr = () => {
756
766
  };
757
- return t.$$set = (s) => {
758
- "class" in s && n(2, o = s.class), "mapController" in s && n(21, i = s.mapController), "apiKey" in s && n(22, f = s.apiKey), "debounceSearch" in s && n(23, a = s.debounceSearch), "placeholder" in s && n(3, d = s.placeholder), "errorMessage" in s && n(4, b = s.errorMessage), "noResultsMessage" in s && n(5, E = s.noResultsMessage), "proximity" in s && n(20, R = s.proximity), "bbox" in s && n(24, h = s.bbox), "trackProximity" in s && n(25, g = s.trackProximity), "minLength" in s && n(26, m = s.minLength), "language" in s && n(27, w = s.language), "showResultsWhileTyping" in s && n(28, M = s.showResultsWhileTyping), "zoom" in s && n(29, W = s.zoom), "flyTo" in s && n(30, C = s.flyTo), "collapsed" in s && n(6, T = s.collapsed), "clearOnBlur" in s && n(31, p = s.clearOnBlur), "enableReverse" in s && n(7, O = s.enableReverse), "filter" in s && n(32, k = s.filter), "searchValue" in s && n(0, S = s.searchValue), "reverseActive" in s && n(1, j = s.reverseActive), "showPlaceType" in s && n(8, ge = s.showPlaceType), "$$scope" in s && n(38, u = s.$$scope);
759
- }, t.$$.update = () => {
760
- t.$$.dirty[0] & 35651584 && i && i.setProximityChangeHandler(g ? (s) => {
761
- n(20, R = s);
762
- } : void 0), t.$$.dirty[0] & 33554432 && (g || n(20, R = void 0)), t.$$.dirty[0] & 512 | t.$$.dirty[1] & 1 && setTimeout(() => {
763
- n(13, Se = X), p && !X && n(0, S = "");
764
- }), t.$$.dirty[0] & 1025 && (S || (n(11, B = void 0), n(10, L = void 0), n(15, ne = void 0), n(36, D = L))), t.$$.dirty[0] & 1612711936 && i && B && C && (!B.bbox || B.bbox[0] === B.bbox[2] && B.bbox[1] === B.bbox[3] ? i.flyTo(B.center, W) : i.fitBounds(B.bbox, 0), n(10, L = void 0), n(36, D = void 0), n(12, A = -1)), t.$$.dirty[0] & 1024 | t.$$.dirty[1] & 32 && D !== L && n(36, D = void 0), t.$$.dirty[0] & 2099200 | t.$$.dirty[1] & 32 && i && i.setMarkers(D, B), t.$$.dirty[0] & 1 && n(12, A = -1), t.$$.dirty[0] & 2101248 && (i == null || i.setSelectedMarker(A)), t.$$.dirty[0] & 5120 && n(37, l = L == null ? void 0 : L[A]), t.$$.dirty[1] & 64 && F("select", l), t.$$.dirty[0] & 2048 && F("pick", B), t.$$.dirty[0] & 9216 && F("optionsVisibilityChange", Se && !!L), t.$$.dirty[0] & 1024 && F("featuresListed", L), t.$$.dirty[1] & 32 && F("featuresMarked", D), t.$$.dirty[0] & 2 && F("reverseToggle", j), t.$$.dirty[0] & 1 && F("queryChange", S), t.$$.dirty[0] & 2097154 && i && i.indicateReverse(j), t.$$.dirty[0] & 2097154 && i && i.setMapClickHandler(j ? st : void 0);
767
+ return n.$$set = (c) => {
768
+ "class" in c && e(2, l = c.class), "mapController" in c && e(23, s = c.mapController), "apiKey" in c && e(24, u = c.apiKey), "debounceSearch" in c && e(25, f = c.debounceSearch), "placeholder" in c && e(3, a = c.placeholder), "errorMessage" in c && e(4, g = c.errorMessage), "noResultsMessage" in c && e(5, m = c.noResultsMessage), "proximity" in c && e(22, v = c.proximity), "bbox" in c && e(26, b = c.bbox), "trackProximity" in c && e(27, p = c.trackProximity), "minLength" in c && e(28, h = c.minLength), "language" in c && e(29, d = c.language), "showResultsWhileTyping" in c && e(30, w = c.showResultsWhileTyping), "zoom" in c && e(31, I = c.zoom), "flyTo" in c && e(32, _ = c.flyTo), "collapsed" in c && e(6, S = c.collapsed), "clearOnBlur" in c && e(33, E = c.clearOnBlur), "enableReverse" in c && e(7, k = c.enableReverse), "reverseButtonTitle" in c && e(8, P = c.reverseButtonTitle), "clearButtonTitle" in c && e(9, G = c.clearButtonTitle), "filter" in c && e(34, z = c.filter), "searchValue" in c && e(0, L = c.searchValue), "reverseActive" in c && e(1, x = c.reverseActive), "showPlaceType" in c && e(10, M = c.showPlaceType), "showFullGeometry" in c && e(35, q = c.showFullGeometry), "$$scope" in c && e(41, o = c.$$scope);
769
+ }, n.$$.update = () => {
770
+ n.$$.dirty[0] & 142606336 && s && s.setProximityChangeHandler(p ? (c) => {
771
+ e(22, v = c);
772
+ } : void 0), n.$$.dirty[0] & 134217728 && (p || e(22, v = void 0)), n.$$.dirty[0] & 2048 | n.$$.dirty[1] & 4 && setTimeout(() => {
773
+ e(15, Ye = me), E && !me && e(0, L = "");
774
+ }), n.$$.dirty[0] & 4097 && (L || (e(13, O = void 0), e(12, C = void 0), e(17, ne = void 0), e(39, U = C))), n.$$.dirty[0] & 8192 | n.$$.dirty[1] & 16 && q && O && !O.address && O.geometry.type === "Point" && Ze(O.id, !0).catch((c) => e(17, ne = c)), n.$$.dirty[0] & 8396800 | n.$$.dirty[1] & 3 && s && O && _ && (!O.bbox || O.bbox[0] === O.bbox[2] && O.bbox[1] === O.bbox[3] ? s.flyTo(O.center, I) : s.fitBounds(O.bbox, 50), e(12, C = void 0), e(39, U = void 0), e(14, A = -1)), n.$$.dirty[0] & 4096 | n.$$.dirty[1] & 256 && U !== C && e(39, U = void 0), n.$$.dirty[0] & 8396800 | n.$$.dirty[1] & 256 && s && s.setMarkers(U, O), n.$$.dirty[0] & 1 && e(14, A = -1), n.$$.dirty[0] & 8404992 && (s == null || s.setSelectedMarker(A)), n.$$.dirty[0] & 20480 && e(40, r = C == null ? void 0 : C[A]), n.$$.dirty[1] & 512 && ie("select", r), n.$$.dirty[0] & 8192 && ie("pick", O), n.$$.dirty[0] & 36864 && ie("optionsVisibilityChange", Ye && !!C), n.$$.dirty[0] & 4096 && ie("featuresListed", C), n.$$.dirty[1] & 256 && ie("featuresMarked", U), n.$$.dirty[0] & 2 && ie("reverseToggle", x), n.$$.dirty[0] & 1 && ie("queryChange", L), n.$$.dirty[0] & 8388610 && s && s.indicateReverse(x), n.$$.dirty[0] & 8388610 && s && s.setMapClickHandler(x ? Wt : void 0);
765
775
  }, [
766
- S,
767
- j,
768
- o,
769
- d,
770
- b,
771
- E,
772
- T,
773
- O,
774
- ge,
775
- X,
776
776
  L,
777
- B,
778
- A,
779
- Se,
780
- Y,
781
- ne,
782
- le,
783
- Ne,
784
- ot,
785
- qe,
786
- R,
787
- i,
788
- f,
777
+ x,
778
+ l,
789
779
  a,
790
- h,
791
780
  g,
792
781
  m,
793
- w,
782
+ S,
783
+ k,
784
+ P,
785
+ G,
794
786
  M,
795
- W,
787
+ me,
796
788
  C,
789
+ O,
790
+ A,
791
+ Ye,
792
+ K,
793
+ ne,
794
+ he,
795
+ ft,
796
+ jt,
797
+ Xe,
798
+ v,
799
+ s,
800
+ u,
801
+ f,
802
+ b,
797
803
  p,
798
- k,
799
- _,
804
+ h,
805
+ d,
806
+ w,
800
807
  I,
801
- J,
802
- D,
803
- l,
804
- u,
808
+ _,
809
+ E,
810
+ z,
811
+ q,
812
+ re,
813
+ Zt,
814
+ st,
815
+ U,
805
816
  r,
806
- it,
807
- ct,
808
- ft,
809
- ut,
810
- at,
811
- dt,
812
- ht,
813
- _t,
814
- gt,
815
- mt,
816
- yt,
817
- bt
817
+ o,
818
+ i,
819
+ Ht,
820
+ Kt,
821
+ Jt,
822
+ $t,
823
+ er,
824
+ tr,
825
+ rr,
826
+ nr,
827
+ ir,
828
+ or,
829
+ lr,
830
+ sr
818
831
  ];
819
832
  }
820
- class Ft extends _e {
821
- constructor(e) {
822
- super(), he(
833
+ class Qr extends ke {
834
+ constructor(t) {
835
+ super(), Se(
823
836
  this,
824
- e,
825
- Yt,
826
- Xt,
827
- de,
837
+ t,
838
+ Fr,
839
+ qr,
840
+ Ee,
828
841
  {
829
842
  class: 2,
830
- mapController: 21,
831
- apiKey: 22,
832
- debounceSearch: 23,
843
+ mapController: 23,
844
+ apiKey: 24,
845
+ debounceSearch: 25,
833
846
  placeholder: 3,
834
847
  errorMessage: 4,
835
848
  noResultsMessage: 5,
836
- proximity: 20,
837
- bbox: 24,
838
- trackProximity: 25,
839
- minLength: 26,
840
- language: 27,
841
- showResultsWhileTyping: 28,
842
- zoom: 29,
843
- flyTo: 30,
849
+ proximity: 22,
850
+ bbox: 26,
851
+ trackProximity: 27,
852
+ minLength: 28,
853
+ language: 29,
854
+ showResultsWhileTyping: 30,
855
+ zoom: 31,
856
+ flyTo: 32,
844
857
  collapsed: 6,
845
- clearOnBlur: 31,
858
+ clearOnBlur: 33,
846
859
  enableReverse: 7,
847
- filter: 32,
860
+ reverseButtonTitle: 8,
861
+ clearButtonTitle: 9,
862
+ filter: 34,
848
863
  searchValue: 0,
849
864
  reverseActive: 1,
850
- showPlaceType: 8,
851
- focus: 33,
852
- blur: 34,
853
- setQuery: 35
865
+ showPlaceType: 10,
866
+ showFullGeometry: 35,
867
+ focus: 36,
868
+ blur: 37,
869
+ setQuery: 38
854
870
  },
855
871
  null,
856
- [-1, -1]
872
+ [-1, -1, -1]
857
873
  );
858
874
  }
859
875
  get focus() {
860
- return this.$$.ctx[33];
876
+ return this.$$.ctx[36];
861
877
  }
862
878
  get blur() {
863
- return this.$$.ctx[34];
879
+ return this.$$.ctx[37];
864
880
  }
865
881
  get setQuery() {
866
- return this.$$.ctx[35];
882
+ return this.$$.ctx[38];
883
+ }
884
+ }
885
+ function Qt(n, t, e) {
886
+ e === void 0 && (e = {});
887
+ var r = { type: "Feature" };
888
+ return (e.id === 0 || e.id) && (r.id = e.id), e.bbox && (r.bbox = e.bbox), r.properties = t || {}, r.geometry = n, r;
889
+ }
890
+ function Dt(n, t, e) {
891
+ e === void 0 && (e = {});
892
+ for (var r = 0, i = n; r < i.length; r++) {
893
+ var o = i[r];
894
+ if (o.length < 4)
895
+ throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
896
+ for (var l = 0; l < o[o.length - 1].length; l++)
897
+ if (o[o.length - 1][l] !== o[0][l])
898
+ throw new Error("First and last Position are not equivalent.");
899
+ }
900
+ var s = {
901
+ type: "Polygon",
902
+ coordinates: n
903
+ };
904
+ return Qt(s, t, e);
905
+ }
906
+ function Ut(n, t, e) {
907
+ e === void 0 && (e = {});
908
+ var r = {
909
+ type: "MultiPolygon",
910
+ coordinates: n
911
+ };
912
+ return Qt(r, t, e);
913
+ }
914
+ /**
915
+ * splaytree v3.1.1
916
+ * Fast Splay tree for Node and browser
917
+ *
918
+ * @author Alexander Milevski <info@w8r.name>
919
+ * @license MIT
920
+ * @preserve
921
+ */
922
+ /*! *****************************************************************************
923
+ Copyright (c) Microsoft Corporation. All rights reserved.
924
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
925
+ this file except in compliance with the License. You may obtain a copy of the
926
+ License at http://www.apache.org/licenses/LICENSE-2.0
927
+
928
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
929
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
930
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
931
+ MERCHANTABLITY OR NON-INFRINGEMENT.
932
+
933
+ See the Apache Version 2.0 License for specific language governing permissions
934
+ and limitations under the License.
935
+ ***************************************************************************** */
936
+ function Dr(n, t) {
937
+ var e = { label: 0, sent: function() {
938
+ if (o[0] & 1)
939
+ throw o[1];
940
+ return o[1];
941
+ }, trys: [], ops: [] }, r, i, o, l;
942
+ return l = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
943
+ return this;
944
+ }), l;
945
+ function s(f) {
946
+ return function(a) {
947
+ return u([f, a]);
948
+ };
949
+ }
950
+ function u(f) {
951
+ if (r)
952
+ throw new TypeError("Generator is already executing.");
953
+ for (; e; )
954
+ try {
955
+ if (r = 1, i && (o = f[0] & 2 ? i.return : f[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, f[1])).done)
956
+ return o;
957
+ switch (i = 0, o && (f = [f[0] & 2, o.value]), f[0]) {
958
+ case 0:
959
+ case 1:
960
+ o = f;
961
+ break;
962
+ case 4:
963
+ return e.label++, { value: f[1], done: !1 };
964
+ case 5:
965
+ e.label++, i = f[1], f = [0];
966
+ continue;
967
+ case 7:
968
+ f = e.ops.pop(), e.trys.pop();
969
+ continue;
970
+ default:
971
+ if (o = e.trys, !(o = o.length > 0 && o[o.length - 1]) && (f[0] === 6 || f[0] === 2)) {
972
+ e = 0;
973
+ continue;
974
+ }
975
+ if (f[0] === 3 && (!o || f[1] > o[0] && f[1] < o[3])) {
976
+ e.label = f[1];
977
+ break;
978
+ }
979
+ if (f[0] === 6 && e.label < o[1]) {
980
+ e.label = o[1], o = f;
981
+ break;
982
+ }
983
+ if (o && e.label < o[2]) {
984
+ e.label = o[2], e.ops.push(f);
985
+ break;
986
+ }
987
+ o[2] && e.ops.pop(), e.trys.pop();
988
+ continue;
989
+ }
990
+ f = t.call(n, e);
991
+ } catch (a) {
992
+ f = [6, a], i = 0;
993
+ } finally {
994
+ r = o = 0;
995
+ }
996
+ if (f[0] & 5)
997
+ throw f[1];
998
+ return { value: f[0] ? f[1] : void 0, done: !0 };
999
+ }
1000
+ }
1001
+ var ae = function() {
1002
+ function n(t, e) {
1003
+ this.next = null, this.key = t, this.data = e, this.left = null, this.right = null;
1004
+ }
1005
+ return n;
1006
+ }();
1007
+ function Ur(n, t) {
1008
+ return n > t ? 1 : n < t ? -1 : 0;
1009
+ }
1010
+ function se(n, t, e) {
1011
+ for (var r = new ae(null, null), i = r, o = r; ; ) {
1012
+ var l = e(n, t.key);
1013
+ if (l < 0) {
1014
+ if (t.left === null)
1015
+ break;
1016
+ if (e(n, t.left.key) < 0) {
1017
+ var s = t.left;
1018
+ if (t.left = s.right, s.right = t, t = s, t.left === null)
1019
+ break;
1020
+ }
1021
+ o.left = t, o = t, t = t.left;
1022
+ } else if (l > 0) {
1023
+ if (t.right === null)
1024
+ break;
1025
+ if (e(n, t.right.key) > 0) {
1026
+ var s = t.right;
1027
+ if (t.right = s.left, s.left = t, t = s, t.right === null)
1028
+ break;
1029
+ }
1030
+ i.right = t, i = t, t = t.right;
1031
+ } else
1032
+ break;
1033
+ }
1034
+ return i.right = t.left, o.left = t.right, t.left = r.right, t.right = r.left, t;
1035
+ }
1036
+ function He(n, t, e, r) {
1037
+ var i = new ae(n, t);
1038
+ if (e === null)
1039
+ return i.left = i.right = null, i;
1040
+ e = se(n, e, r);
1041
+ var o = r(n, e.key);
1042
+ return o < 0 ? (i.left = e.left, i.right = e, e.left = null) : o >= 0 && (i.right = e.right, i.left = e, e.right = null), i;
1043
+ }
1044
+ function wt(n, t, e) {
1045
+ var r = null, i = null;
1046
+ if (t) {
1047
+ t = se(n, t, e);
1048
+ var o = e(t.key, n);
1049
+ o === 0 ? (r = t.left, i = t.right) : o < 0 ? (i = t.right, t.right = null, r = t) : (r = t.left, t.left = null, i = t);
1050
+ }
1051
+ return { left: r, right: i };
1052
+ }
1053
+ function Vr(n, t, e) {
1054
+ return t === null ? n : (n === null || (t = se(n.key, t, e), t.left = n), t);
1055
+ }
1056
+ function et(n, t, e, r, i) {
1057
+ if (n) {
1058
+ r("" + t + (e ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ") + i(n) + `
1059
+ `);
1060
+ var o = t + (e ? " " : "\u2502 ");
1061
+ n.left && et(n.left, o, !1, r, i), n.right && et(n.right, o, !0, r, i);
867
1062
  }
868
1063
  }
869
- function $t(t, e, n = !0, l = !0, r = {}, u = {}) {
870
- let o, i, f, a = [], d;
871
- const b = (h) => {
872
- i == null || i([h.lngLat.lng, h.lngLat.lat]);
873
- }, E = () => {
1064
+ var lt = function() {
1065
+ function n(t) {
1066
+ t === void 0 && (t = Ur), this._root = null, this._size = 0, this._comparator = t;
1067
+ }
1068
+ return n.prototype.insert = function(t, e) {
1069
+ return this._size++, this._root = He(t, e, this._root, this._comparator);
1070
+ }, n.prototype.add = function(t, e) {
1071
+ var r = new ae(t, e);
1072
+ this._root === null && (r.left = r.right = null, this._size++, this._root = r);
1073
+ var i = this._comparator, o = se(t, this._root, i), l = i(t, o.key);
1074
+ return l === 0 ? this._root = o : (l < 0 ? (r.left = o.left, r.right = o, o.left = null) : l > 0 && (r.right = o.right, r.left = o, o.right = null), this._size++, this._root = r), this._root;
1075
+ }, n.prototype.remove = function(t) {
1076
+ this._root = this._remove(t, this._root, this._comparator);
1077
+ }, n.prototype._remove = function(t, e, r) {
1078
+ var i;
1079
+ if (e === null)
1080
+ return null;
1081
+ e = se(t, e, r);
1082
+ var o = r(t, e.key);
1083
+ return o === 0 ? (e.left === null ? i = e.right : (i = se(t, e.left, r), i.right = e.right), this._size--, i) : e;
1084
+ }, n.prototype.pop = function() {
1085
+ var t = this._root;
1086
+ if (t) {
1087
+ for (; t.left; )
1088
+ t = t.left;
1089
+ return this._root = se(t.key, this._root, this._comparator), this._root = this._remove(t.key, this._root, this._comparator), { key: t.key, data: t.data };
1090
+ }
1091
+ return null;
1092
+ }, n.prototype.findStatic = function(t) {
1093
+ for (var e = this._root, r = this._comparator; e; ) {
1094
+ var i = r(t, e.key);
1095
+ if (i === 0)
1096
+ return e;
1097
+ i < 0 ? e = e.left : e = e.right;
1098
+ }
1099
+ return null;
1100
+ }, n.prototype.find = function(t) {
1101
+ return this._root && (this._root = se(t, this._root, this._comparator), this._comparator(t, this._root.key) !== 0) ? null : this._root;
1102
+ }, n.prototype.contains = function(t) {
1103
+ for (var e = this._root, r = this._comparator; e; ) {
1104
+ var i = r(t, e.key);
1105
+ if (i === 0)
1106
+ return !0;
1107
+ i < 0 ? e = e.left : e = e.right;
1108
+ }
1109
+ return !1;
1110
+ }, n.prototype.forEach = function(t, e) {
1111
+ for (var r = this._root, i = [], o = !1; !o; )
1112
+ r !== null ? (i.push(r), r = r.left) : i.length !== 0 ? (r = i.pop(), t.call(e, r), r = r.right) : o = !0;
1113
+ return this;
1114
+ }, n.prototype.range = function(t, e, r, i) {
1115
+ for (var o = [], l = this._comparator, s = this._root, u; o.length !== 0 || s; )
1116
+ if (s)
1117
+ o.push(s), s = s.left;
1118
+ else {
1119
+ if (s = o.pop(), u = l(s.key, e), u > 0)
1120
+ break;
1121
+ if (l(s.key, t) >= 0 && r.call(i, s))
1122
+ return this;
1123
+ s = s.right;
1124
+ }
1125
+ return this;
1126
+ }, n.prototype.keys = function() {
1127
+ var t = [];
1128
+ return this.forEach(function(e) {
1129
+ var r = e.key;
1130
+ return t.push(r);
1131
+ }), t;
1132
+ }, n.prototype.values = function() {
1133
+ var t = [];
1134
+ return this.forEach(function(e) {
1135
+ var r = e.data;
1136
+ return t.push(r);
1137
+ }), t;
1138
+ }, n.prototype.min = function() {
1139
+ return this._root ? this.minNode(this._root).key : null;
1140
+ }, n.prototype.max = function() {
1141
+ return this._root ? this.maxNode(this._root).key : null;
1142
+ }, n.prototype.minNode = function(t) {
1143
+ if (t === void 0 && (t = this._root), t)
1144
+ for (; t.left; )
1145
+ t = t.left;
1146
+ return t;
1147
+ }, n.prototype.maxNode = function(t) {
1148
+ if (t === void 0 && (t = this._root), t)
1149
+ for (; t.right; )
1150
+ t = t.right;
1151
+ return t;
1152
+ }, n.prototype.at = function(t) {
1153
+ for (var e = this._root, r = !1, i = 0, o = []; !r; )
1154
+ if (e)
1155
+ o.push(e), e = e.left;
1156
+ else if (o.length > 0) {
1157
+ if (e = o.pop(), i === t)
1158
+ return e;
1159
+ i++, e = e.right;
1160
+ } else
1161
+ r = !0;
1162
+ return null;
1163
+ }, n.prototype.next = function(t) {
1164
+ var e = this._root, r = null;
1165
+ if (t.right) {
1166
+ for (r = t.right; r.left; )
1167
+ r = r.left;
1168
+ return r;
1169
+ }
1170
+ for (var i = this._comparator; e; ) {
1171
+ var o = i(t.key, e.key);
1172
+ if (o === 0)
1173
+ break;
1174
+ o < 0 ? (r = e, e = e.left) : e = e.right;
1175
+ }
1176
+ return r;
1177
+ }, n.prototype.prev = function(t) {
1178
+ var e = this._root, r = null;
1179
+ if (t.left !== null) {
1180
+ for (r = t.left; r.right; )
1181
+ r = r.right;
1182
+ return r;
1183
+ }
1184
+ for (var i = this._comparator; e; ) {
1185
+ var o = i(t.key, e.key);
1186
+ if (o === 0)
1187
+ break;
1188
+ o < 0 ? e = e.left : (r = e, e = e.right);
1189
+ }
1190
+ return r;
1191
+ }, n.prototype.clear = function() {
1192
+ return this._root = null, this._size = 0, this;
1193
+ }, n.prototype.toList = function() {
1194
+ return Zr(this._root);
1195
+ }, n.prototype.load = function(t, e, r) {
1196
+ e === void 0 && (e = []), r === void 0 && (r = !1);
1197
+ var i = t.length, o = this._comparator;
1198
+ if (r && nt(t, e, 0, i - 1, o), this._root === null)
1199
+ this._root = tt(t, e, 0, i), this._size = i;
1200
+ else {
1201
+ var l = Xr(this.toList(), Yr(t, e), o);
1202
+ i = this._size + i, this._root = rt({ head: l }, 0, i);
1203
+ }
1204
+ return this;
1205
+ }, n.prototype.isEmpty = function() {
1206
+ return this._root === null;
1207
+ }, Object.defineProperty(n.prototype, "size", {
1208
+ get: function() {
1209
+ return this._size;
1210
+ },
1211
+ enumerable: !0,
1212
+ configurable: !0
1213
+ }), Object.defineProperty(n.prototype, "root", {
1214
+ get: function() {
1215
+ return this._root;
1216
+ },
1217
+ enumerable: !0,
1218
+ configurable: !0
1219
+ }), n.prototype.toString = function(t) {
1220
+ t === void 0 && (t = function(r) {
1221
+ return String(r.key);
1222
+ });
1223
+ var e = [];
1224
+ return et(this._root, "", !0, function(r) {
1225
+ return e.push(r);
1226
+ }, t), e.join("");
1227
+ }, n.prototype.update = function(t, e, r) {
1228
+ var i = this._comparator, o = wt(t, this._root, i), l = o.left, s = o.right;
1229
+ i(t, e) < 0 ? s = He(e, r, s, i) : l = He(e, r, l, i), this._root = Vr(l, s, i);
1230
+ }, n.prototype.split = function(t) {
1231
+ return wt(t, this._root, this._comparator);
1232
+ }, n.prototype[Symbol.iterator] = function() {
1233
+ var t;
1234
+ return Dr(this, function(e) {
1235
+ switch (e.label) {
1236
+ case 0:
1237
+ t = this.minNode(), e.label = 1;
1238
+ case 1:
1239
+ return t ? [4, t] : [3, 3];
1240
+ case 2:
1241
+ return e.sent(), t = this.next(t), [3, 1];
1242
+ case 3:
1243
+ return [2];
1244
+ }
1245
+ });
1246
+ }, n;
1247
+ }();
1248
+ function tt(n, t, e, r) {
1249
+ var i = r - e;
1250
+ if (i > 0) {
1251
+ var o = e + Math.floor(i / 2), l = n[o], s = t[o], u = new ae(l, s);
1252
+ return u.left = tt(n, t, e, o), u.right = tt(n, t, o + 1, r), u;
1253
+ }
1254
+ return null;
1255
+ }
1256
+ function Yr(n, t) {
1257
+ for (var e = new ae(null, null), r = e, i = 0; i < n.length; i++)
1258
+ r = r.next = new ae(n[i], t[i]);
1259
+ return r.next = null, e.next;
1260
+ }
1261
+ function Zr(n) {
1262
+ for (var t = n, e = [], r = !1, i = new ae(null, null), o = i; !r; )
1263
+ t ? (e.push(t), t = t.left) : e.length > 0 ? (t = o = o.next = e.pop(), t = t.right) : r = !0;
1264
+ return o.next = null, i.next;
1265
+ }
1266
+ function rt(n, t, e) {
1267
+ var r = e - t;
1268
+ if (r > 0) {
1269
+ var i = t + Math.floor(r / 2), o = rt(n, t, i), l = n.head;
1270
+ return l.left = o, n.head = n.head.next, l.right = rt(n, i + 1, e), l;
1271
+ }
1272
+ return null;
1273
+ }
1274
+ function Xr(n, t, e) {
1275
+ for (var r = new ae(null, null), i = r, o = n, l = t; o !== null && l !== null; )
1276
+ e(o.key, l.key) < 0 ? (i.next = o, o = o.next) : (i.next = l, l = l.next), i = i.next;
1277
+ return o !== null ? i.next = o : l !== null && (i.next = l), r.next;
1278
+ }
1279
+ function nt(n, t, e, r, i) {
1280
+ if (!(e >= r)) {
1281
+ for (var o = n[e + r >> 1], l = e - 1, s = r + 1; ; ) {
1282
+ do
1283
+ l++;
1284
+ while (i(n[l], o) < 0);
1285
+ do
1286
+ s--;
1287
+ while (i(n[s], o) > 0);
1288
+ if (l >= s)
1289
+ break;
1290
+ var u = n[l];
1291
+ n[l] = n[s], n[s] = u, u = t[l], t[l] = t[s], t[s] = u;
1292
+ }
1293
+ nt(n, t, e, s, i), nt(n, t, s + 1, r, i);
1294
+ }
1295
+ }
1296
+ function W(n, t) {
1297
+ if (!(n instanceof t))
1298
+ throw new TypeError("Cannot call a class as a function");
1299
+ }
1300
+ function Et(n, t) {
1301
+ for (var e = 0; e < t.length; e++) {
1302
+ var r = t[e];
1303
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, r.key, r);
1304
+ }
1305
+ }
1306
+ function D(n, t, e) {
1307
+ return t && Et(n.prototype, t), e && Et(n, e), n;
1308
+ }
1309
+ var Pe = function(t, e) {
1310
+ return t.ll.x <= e.x && e.x <= t.ur.x && t.ll.y <= e.y && e.y <= t.ur.y;
1311
+ }, it = function(t, e) {
1312
+ if (e.ur.x < t.ll.x || t.ur.x < e.ll.x || e.ur.y < t.ll.y || t.ur.y < e.ll.y)
1313
+ return null;
1314
+ var r = t.ll.x < e.ll.x ? e.ll.x : t.ll.x, i = t.ur.x < e.ur.x ? t.ur.x : e.ur.x, o = t.ll.y < e.ll.y ? e.ll.y : t.ll.y, l = t.ur.y < e.ur.y ? t.ur.y : e.ur.y;
1315
+ return {
1316
+ ll: {
1317
+ x: r,
1318
+ y: o
1319
+ },
1320
+ ur: {
1321
+ x: i,
1322
+ y: l
1323
+ }
1324
+ };
1325
+ }, ue = Number.EPSILON;
1326
+ ue === void 0 && (ue = Math.pow(2, -52));
1327
+ var Wr = ue * ue, ot = function(t, e) {
1328
+ if (-ue < t && t < ue && -ue < e && e < ue)
1329
+ return 0;
1330
+ var r = t - e;
1331
+ return r * r < Wr * t * e ? 0 : t < e ? -1 : 1;
1332
+ }, jr = /* @__PURE__ */ function() {
1333
+ function n() {
1334
+ W(this, n), this.reset();
1335
+ }
1336
+ return D(n, [{
1337
+ key: "reset",
1338
+ value: function() {
1339
+ this.xRounder = new St(), this.yRounder = new St();
1340
+ }
1341
+ }, {
1342
+ key: "round",
1343
+ value: function(e, r) {
1344
+ return {
1345
+ x: this.xRounder.round(e),
1346
+ y: this.yRounder.round(r)
1347
+ };
1348
+ }
1349
+ }]), n;
1350
+ }(), St = /* @__PURE__ */ function() {
1351
+ function n() {
1352
+ W(this, n), this.tree = new lt(), this.round(0);
1353
+ }
1354
+ return D(n, [{
1355
+ key: "round",
1356
+ value: function(e) {
1357
+ var r = this.tree.add(e), i = this.tree.prev(r);
1358
+ if (i !== null && ot(r.key, i.key) === 0)
1359
+ return this.tree.remove(e), i.key;
1360
+ var o = this.tree.next(r);
1361
+ return o !== null && ot(r.key, o.key) === 0 ? (this.tree.remove(e), o.key) : e;
1362
+ }
1363
+ }]), n;
1364
+ }(), ze = new jr(), Le = function(t, e) {
1365
+ return t.x * e.y - t.y * e.x;
1366
+ }, Vt = function(t, e) {
1367
+ return t.x * e.x + t.y * e.y;
1368
+ }, kt = function(t, e, r) {
1369
+ var i = {
1370
+ x: e.x - t.x,
1371
+ y: e.y - t.y
1372
+ }, o = {
1373
+ x: r.x - t.x,
1374
+ y: r.y - t.y
1375
+ }, l = Le(i, o);
1376
+ return ot(l, 0);
1377
+ }, De = function(t) {
1378
+ return Math.sqrt(Vt(t, t));
1379
+ }, Hr = function(t, e, r) {
1380
+ var i = {
1381
+ x: e.x - t.x,
1382
+ y: e.y - t.y
1383
+ }, o = {
1384
+ x: r.x - t.x,
1385
+ y: r.y - t.y
1386
+ };
1387
+ return Le(o, i) / De(o) / De(i);
1388
+ }, Kr = function(t, e, r) {
1389
+ var i = {
1390
+ x: e.x - t.x,
1391
+ y: e.y - t.y
1392
+ }, o = {
1393
+ x: r.x - t.x,
1394
+ y: r.y - t.y
1395
+ };
1396
+ return Vt(o, i) / De(o) / De(i);
1397
+ }, Pt = function(t, e, r) {
1398
+ return e.y === 0 ? null : {
1399
+ x: t.x + e.x / e.y * (r - t.y),
1400
+ y: r
1401
+ };
1402
+ }, Rt = function(t, e, r) {
1403
+ return e.x === 0 ? null : {
1404
+ x: r,
1405
+ y: t.y + e.y / e.x * (r - t.x)
1406
+ };
1407
+ }, Jr = function(t, e, r, i) {
1408
+ if (e.x === 0)
1409
+ return Rt(r, i, t.x);
1410
+ if (i.x === 0)
1411
+ return Rt(t, e, r.x);
1412
+ if (e.y === 0)
1413
+ return Pt(r, i, t.y);
1414
+ if (i.y === 0)
1415
+ return Pt(t, e, r.y);
1416
+ var o = Le(e, i);
1417
+ if (o == 0)
1418
+ return null;
1419
+ var l = {
1420
+ x: r.x - t.x,
1421
+ y: r.y - t.y
1422
+ }, s = Le(l, e) / o, u = Le(l, i) / o, f = t.x + u * e.x, a = r.x + s * i.x, g = t.y + u * e.y, m = r.y + s * i.y, v = (f + a) / 2, b = (g + m) / 2;
1423
+ return {
1424
+ x: v,
1425
+ y: b
1426
+ };
1427
+ }, $ = /* @__PURE__ */ function() {
1428
+ D(n, null, [{
1429
+ key: "compare",
1430
+ value: function(e, r) {
1431
+ var i = n.comparePoints(e.point, r.point);
1432
+ return i !== 0 ? i : (e.point !== r.point && e.link(r), e.isLeft !== r.isLeft ? e.isLeft ? 1 : -1 : Ue.compare(e.segment, r.segment));
1433
+ }
1434
+ }, {
1435
+ key: "comparePoints",
1436
+ value: function(e, r) {
1437
+ return e.x < r.x ? -1 : e.x > r.x ? 1 : e.y < r.y ? -1 : e.y > r.y ? 1 : 0;
1438
+ }
1439
+ }]);
1440
+ function n(t, e) {
1441
+ W(this, n), t.events === void 0 ? t.events = [this] : t.events.push(this), this.point = t, this.isLeft = e;
1442
+ }
1443
+ return D(n, [{
1444
+ key: "link",
1445
+ value: function(e) {
1446
+ if (e.point === this.point)
1447
+ throw new Error("Tried to link already linked events");
1448
+ for (var r = e.point.events, i = 0, o = r.length; i < o; i++) {
1449
+ var l = r[i];
1450
+ this.point.events.push(l), l.point = this.point;
1451
+ }
1452
+ this.checkForConsuming();
1453
+ }
1454
+ }, {
1455
+ key: "checkForConsuming",
1456
+ value: function() {
1457
+ for (var e = this.point.events.length, r = 0; r < e; r++) {
1458
+ var i = this.point.events[r];
1459
+ if (i.segment.consumedBy === void 0)
1460
+ for (var o = r + 1; o < e; o++) {
1461
+ var l = this.point.events[o];
1462
+ l.consumedBy === void 0 && i.otherSE.point.events === l.otherSE.point.events && i.segment.consume(l.segment);
1463
+ }
1464
+ }
1465
+ }
1466
+ }, {
1467
+ key: "getAvailableLinkedEvents",
1468
+ value: function() {
1469
+ for (var e = [], r = 0, i = this.point.events.length; r < i; r++) {
1470
+ var o = this.point.events[r];
1471
+ o !== this && !o.segment.ringOut && o.segment.isInResult() && e.push(o);
1472
+ }
1473
+ return e;
1474
+ }
1475
+ }, {
1476
+ key: "getLeftmostComparator",
1477
+ value: function(e) {
1478
+ var r = this, i = /* @__PURE__ */ new Map(), o = function(s) {
1479
+ var u = s.otherSE;
1480
+ i.set(s, {
1481
+ sine: Hr(r.point, e.point, u.point),
1482
+ cosine: Kr(r.point, e.point, u.point)
1483
+ });
1484
+ };
1485
+ return function(l, s) {
1486
+ i.has(l) || o(l), i.has(s) || o(s);
1487
+ var u = i.get(l), f = u.sine, a = u.cosine, g = i.get(s), m = g.sine, v = g.cosine;
1488
+ return f >= 0 && m >= 0 ? a < v ? 1 : a > v ? -1 : 0 : f < 0 && m < 0 ? a < v ? -1 : a > v ? 1 : 0 : m < f ? -1 : m > f ? 1 : 0;
1489
+ };
1490
+ }
1491
+ }]), n;
1492
+ }(), $r = 0, Ue = /* @__PURE__ */ function() {
1493
+ D(n, null, [{
1494
+ key: "compare",
1495
+ value: function(e, r) {
1496
+ var i = e.leftSE.point.x, o = r.leftSE.point.x, l = e.rightSE.point.x, s = r.rightSE.point.x;
1497
+ if (s < i)
1498
+ return 1;
1499
+ if (l < o)
1500
+ return -1;
1501
+ var u = e.leftSE.point.y, f = r.leftSE.point.y, a = e.rightSE.point.y, g = r.rightSE.point.y;
1502
+ if (i < o) {
1503
+ if (f < u && f < a)
1504
+ return 1;
1505
+ if (f > u && f > a)
1506
+ return -1;
1507
+ var m = e.comparePoint(r.leftSE.point);
1508
+ if (m < 0)
1509
+ return 1;
1510
+ if (m > 0)
1511
+ return -1;
1512
+ var v = r.comparePoint(e.rightSE.point);
1513
+ return v !== 0 ? v : -1;
1514
+ }
1515
+ if (i > o) {
1516
+ if (u < f && u < g)
1517
+ return -1;
1518
+ if (u > f && u > g)
1519
+ return 1;
1520
+ var b = r.comparePoint(e.leftSE.point);
1521
+ if (b !== 0)
1522
+ return b;
1523
+ var p = e.comparePoint(r.rightSE.point);
1524
+ return p < 0 ? 1 : p > 0 ? -1 : 1;
1525
+ }
1526
+ if (u < f)
1527
+ return -1;
1528
+ if (u > f)
1529
+ return 1;
1530
+ if (l < s) {
1531
+ var h = r.comparePoint(e.rightSE.point);
1532
+ if (h !== 0)
1533
+ return h;
1534
+ }
1535
+ if (l > s) {
1536
+ var d = e.comparePoint(r.rightSE.point);
1537
+ if (d < 0)
1538
+ return 1;
1539
+ if (d > 0)
1540
+ return -1;
1541
+ }
1542
+ if (l !== s) {
1543
+ var w = a - u, I = l - i, _ = g - f, S = s - o;
1544
+ if (w > I && _ < S)
1545
+ return 1;
1546
+ if (w < I && _ > S)
1547
+ return -1;
1548
+ }
1549
+ return l > s ? 1 : l < s || a < g ? -1 : a > g ? 1 : e.id < r.id ? -1 : e.id > r.id ? 1 : 0;
1550
+ }
1551
+ }]);
1552
+ function n(t, e, r, i) {
1553
+ W(this, n), this.id = ++$r, this.leftSE = t, t.segment = this, t.otherSE = e, this.rightSE = e, e.segment = this, e.otherSE = t, this.rings = r, this.windings = i;
1554
+ }
1555
+ return D(n, [{
1556
+ key: "replaceRightSE",
1557
+ value: function(e) {
1558
+ this.rightSE = e, this.rightSE.segment = this, this.rightSE.otherSE = this.leftSE, this.leftSE.otherSE = this.rightSE;
1559
+ }
1560
+ }, {
1561
+ key: "bbox",
1562
+ value: function() {
1563
+ var e = this.leftSE.point.y, r = this.rightSE.point.y;
1564
+ return {
1565
+ ll: {
1566
+ x: this.leftSE.point.x,
1567
+ y: e < r ? e : r
1568
+ },
1569
+ ur: {
1570
+ x: this.rightSE.point.x,
1571
+ y: e > r ? e : r
1572
+ }
1573
+ };
1574
+ }
1575
+ }, {
1576
+ key: "vector",
1577
+ value: function() {
1578
+ return {
1579
+ x: this.rightSE.point.x - this.leftSE.point.x,
1580
+ y: this.rightSE.point.y - this.leftSE.point.y
1581
+ };
1582
+ }
1583
+ }, {
1584
+ key: "isAnEndpoint",
1585
+ value: function(e) {
1586
+ return e.x === this.leftSE.point.x && e.y === this.leftSE.point.y || e.x === this.rightSE.point.x && e.y === this.rightSE.point.y;
1587
+ }
1588
+ }, {
1589
+ key: "comparePoint",
1590
+ value: function(e) {
1591
+ if (this.isAnEndpoint(e))
1592
+ return 0;
1593
+ var r = this.leftSE.point, i = this.rightSE.point, o = this.vector();
1594
+ if (r.x === i.x)
1595
+ return e.x === r.x ? 0 : e.x < r.x ? 1 : -1;
1596
+ var l = (e.y - r.y) / o.y, s = r.x + l * o.x;
1597
+ if (e.x === s)
1598
+ return 0;
1599
+ var u = (e.x - r.x) / o.x, f = r.y + u * o.y;
1600
+ return e.y === f ? 0 : e.y < f ? -1 : 1;
1601
+ }
1602
+ }, {
1603
+ key: "getIntersection",
1604
+ value: function(e) {
1605
+ var r = this.bbox(), i = e.bbox(), o = it(r, i);
1606
+ if (o === null)
1607
+ return null;
1608
+ var l = this.leftSE.point, s = this.rightSE.point, u = e.leftSE.point, f = e.rightSE.point, a = Pe(r, u) && this.comparePoint(u) === 0, g = Pe(i, l) && e.comparePoint(l) === 0, m = Pe(r, f) && this.comparePoint(f) === 0, v = Pe(i, s) && e.comparePoint(s) === 0;
1609
+ if (g && a)
1610
+ return v && !m ? s : !v && m ? f : null;
1611
+ if (g)
1612
+ return m && l.x === f.x && l.y === f.y ? null : l;
1613
+ if (a)
1614
+ return v && s.x === u.x && s.y === u.y ? null : u;
1615
+ if (v && m)
1616
+ return null;
1617
+ if (v)
1618
+ return s;
1619
+ if (m)
1620
+ return f;
1621
+ var b = Jr(l, this.vector(), u, e.vector());
1622
+ return b === null || !Pe(o, b) ? null : ze.round(b.x, b.y);
1623
+ }
1624
+ }, {
1625
+ key: "split",
1626
+ value: function(e) {
1627
+ var r = [], i = e.events !== void 0, o = new $(e, !0), l = new $(e, !1), s = this.rightSE;
1628
+ this.replaceRightSE(l), r.push(l), r.push(o);
1629
+ var u = new n(o, s, this.rings.slice(), this.windings.slice());
1630
+ return $.comparePoints(u.leftSE.point, u.rightSE.point) > 0 && u.swapEvents(), $.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (o.checkForConsuming(), l.checkForConsuming()), r;
1631
+ }
1632
+ }, {
1633
+ key: "swapEvents",
1634
+ value: function() {
1635
+ var e = this.rightSE;
1636
+ this.rightSE = this.leftSE, this.leftSE = e, this.leftSE.isLeft = !0, this.rightSE.isLeft = !1;
1637
+ for (var r = 0, i = this.windings.length; r < i; r++)
1638
+ this.windings[r] *= -1;
1639
+ }
1640
+ }, {
1641
+ key: "consume",
1642
+ value: function(e) {
1643
+ for (var r = this, i = e; r.consumedBy; )
1644
+ r = r.consumedBy;
1645
+ for (; i.consumedBy; )
1646
+ i = i.consumedBy;
1647
+ var o = n.compare(r, i);
1648
+ if (o !== 0) {
1649
+ if (o > 0) {
1650
+ var l = r;
1651
+ r = i, i = l;
1652
+ }
1653
+ if (r.prev === i) {
1654
+ var s = r;
1655
+ r = i, i = s;
1656
+ }
1657
+ for (var u = 0, f = i.rings.length; u < f; u++) {
1658
+ var a = i.rings[u], g = i.windings[u], m = r.rings.indexOf(a);
1659
+ m === -1 ? (r.rings.push(a), r.windings.push(g)) : r.windings[m] += g;
1660
+ }
1661
+ i.rings = null, i.windings = null, i.consumedBy = r, i.leftSE.consumedBy = r.leftSE, i.rightSE.consumedBy = r.rightSE;
1662
+ }
1663
+ }
1664
+ }, {
1665
+ key: "prevInResult",
1666
+ value: function() {
1667
+ return this._prevInResult !== void 0 ? this._prevInResult : (this.prev ? this.prev.isInResult() ? this._prevInResult = this.prev : this._prevInResult = this.prev.prevInResult() : this._prevInResult = null, this._prevInResult);
1668
+ }
1669
+ }, {
1670
+ key: "beforeState",
1671
+ value: function() {
1672
+ if (this._beforeState !== void 0)
1673
+ return this._beforeState;
1674
+ if (!this.prev)
1675
+ this._beforeState = {
1676
+ rings: [],
1677
+ windings: [],
1678
+ multiPolys: []
1679
+ };
1680
+ else {
1681
+ var e = this.prev.consumedBy || this.prev;
1682
+ this._beforeState = e.afterState();
1683
+ }
1684
+ return this._beforeState;
1685
+ }
1686
+ }, {
1687
+ key: "afterState",
1688
+ value: function() {
1689
+ if (this._afterState !== void 0)
1690
+ return this._afterState;
1691
+ var e = this.beforeState();
1692
+ this._afterState = {
1693
+ rings: e.rings.slice(0),
1694
+ windings: e.windings.slice(0),
1695
+ multiPolys: []
1696
+ };
1697
+ for (var r = this._afterState.rings, i = this._afterState.windings, o = this._afterState.multiPolys, l = 0, s = this.rings.length; l < s; l++) {
1698
+ var u = this.rings[l], f = this.windings[l], a = r.indexOf(u);
1699
+ a === -1 ? (r.push(u), i.push(f)) : i[a] += f;
1700
+ }
1701
+ for (var g = [], m = [], v = 0, b = r.length; v < b; v++)
1702
+ if (i[v] !== 0) {
1703
+ var p = r[v], h = p.poly;
1704
+ if (m.indexOf(h) === -1)
1705
+ if (p.isExterior)
1706
+ g.push(h);
1707
+ else {
1708
+ m.indexOf(h) === -1 && m.push(h);
1709
+ var d = g.indexOf(p.poly);
1710
+ d !== -1 && g.splice(d, 1);
1711
+ }
1712
+ }
1713
+ for (var w = 0, I = g.length; w < I; w++) {
1714
+ var _ = g[w].multiPoly;
1715
+ o.indexOf(_) === -1 && o.push(_);
1716
+ }
1717
+ return this._afterState;
1718
+ }
1719
+ }, {
1720
+ key: "isInResult",
1721
+ value: function() {
1722
+ if (this.consumedBy)
1723
+ return !1;
1724
+ if (this._isInResult !== void 0)
1725
+ return this._isInResult;
1726
+ var e = this.beforeState().multiPolys, r = this.afterState().multiPolys;
1727
+ switch (H.type) {
1728
+ case "union": {
1729
+ var i = e.length === 0, o = r.length === 0;
1730
+ this._isInResult = i !== o;
1731
+ break;
1732
+ }
1733
+ case "intersection": {
1734
+ var l, s;
1735
+ e.length < r.length ? (l = e.length, s = r.length) : (l = r.length, s = e.length), this._isInResult = s === H.numMultiPolys && l < s;
1736
+ break;
1737
+ }
1738
+ case "xor": {
1739
+ var u = Math.abs(e.length - r.length);
1740
+ this._isInResult = u % 2 === 1;
1741
+ break;
1742
+ }
1743
+ case "difference": {
1744
+ var f = function(g) {
1745
+ return g.length === 1 && g[0].isSubject;
1746
+ };
1747
+ this._isInResult = f(e) !== f(r);
1748
+ break;
1749
+ }
1750
+ default:
1751
+ throw new Error("Unrecognized operation type found ".concat(H.type));
1752
+ }
1753
+ return this._isInResult;
1754
+ }
1755
+ }], [{
1756
+ key: "fromRing",
1757
+ value: function(e, r, i) {
1758
+ var o, l, s, u = $.comparePoints(e, r);
1759
+ if (u < 0)
1760
+ o = e, l = r, s = 1;
1761
+ else if (u > 0)
1762
+ o = r, l = e, s = -1;
1763
+ else
1764
+ throw new Error("Tried to create degenerate segment at [".concat(e.x, ", ").concat(e.y, "]"));
1765
+ var f = new $(o, !0), a = new $(l, !1);
1766
+ return new n(f, a, [i], [s]);
1767
+ }
1768
+ }]), n;
1769
+ }(), It = /* @__PURE__ */ function() {
1770
+ function n(t, e, r) {
1771
+ if (W(this, n), !Array.isArray(t) || t.length === 0)
1772
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1773
+ if (this.poly = e, this.isExterior = r, this.segments = [], typeof t[0][0] != "number" || typeof t[0][1] != "number")
1774
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1775
+ var i = ze.round(t[0][0], t[0][1]);
1776
+ this.bbox = {
1777
+ ll: {
1778
+ x: i.x,
1779
+ y: i.y
1780
+ },
1781
+ ur: {
1782
+ x: i.x,
1783
+ y: i.y
1784
+ }
1785
+ };
1786
+ for (var o = i, l = 1, s = t.length; l < s; l++) {
1787
+ if (typeof t[l][0] != "number" || typeof t[l][1] != "number")
1788
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1789
+ var u = ze.round(t[l][0], t[l][1]);
1790
+ u.x === o.x && u.y === o.y || (this.segments.push(Ue.fromRing(o, u, this)), u.x < this.bbox.ll.x && (this.bbox.ll.x = u.x), u.y < this.bbox.ll.y && (this.bbox.ll.y = u.y), u.x > this.bbox.ur.x && (this.bbox.ur.x = u.x), u.y > this.bbox.ur.y && (this.bbox.ur.y = u.y), o = u);
1791
+ }
1792
+ (i.x !== o.x || i.y !== o.y) && this.segments.push(Ue.fromRing(o, i, this));
1793
+ }
1794
+ return D(n, [{
1795
+ key: "getSweepEvents",
1796
+ value: function() {
1797
+ for (var e = [], r = 0, i = this.segments.length; r < i; r++) {
1798
+ var o = this.segments[r];
1799
+ e.push(o.leftSE), e.push(o.rightSE);
1800
+ }
1801
+ return e;
1802
+ }
1803
+ }]), n;
1804
+ }(), en = /* @__PURE__ */ function() {
1805
+ function n(t, e) {
1806
+ if (W(this, n), !Array.isArray(t))
1807
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1808
+ this.exteriorRing = new It(t[0], this, !0), this.bbox = {
1809
+ ll: {
1810
+ x: this.exteriorRing.bbox.ll.x,
1811
+ y: this.exteriorRing.bbox.ll.y
1812
+ },
1813
+ ur: {
1814
+ x: this.exteriorRing.bbox.ur.x,
1815
+ y: this.exteriorRing.bbox.ur.y
1816
+ }
1817
+ }, this.interiorRings = [];
1818
+ for (var r = 1, i = t.length; r < i; r++) {
1819
+ var o = new It(t[r], this, !1);
1820
+ o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.interiorRings.push(o);
1821
+ }
1822
+ this.multiPoly = e;
1823
+ }
1824
+ return D(n, [{
1825
+ key: "getSweepEvents",
1826
+ value: function() {
1827
+ for (var e = this.exteriorRing.getSweepEvents(), r = 0, i = this.interiorRings.length; r < i; r++)
1828
+ for (var o = this.interiorRings[r].getSweepEvents(), l = 0, s = o.length; l < s; l++)
1829
+ e.push(o[l]);
1830
+ return e;
1831
+ }
1832
+ }]), n;
1833
+ }(), Lt = /* @__PURE__ */ function() {
1834
+ function n(t, e) {
1835
+ if (W(this, n), !Array.isArray(t))
1836
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1837
+ try {
1838
+ typeof t[0][0][0] == "number" && (t = [t]);
1839
+ } catch {
1840
+ }
1841
+ this.polys = [], this.bbox = {
1842
+ ll: {
1843
+ x: Number.POSITIVE_INFINITY,
1844
+ y: Number.POSITIVE_INFINITY
1845
+ },
1846
+ ur: {
1847
+ x: Number.NEGATIVE_INFINITY,
1848
+ y: Number.NEGATIVE_INFINITY
1849
+ }
1850
+ };
1851
+ for (var r = 0, i = t.length; r < i; r++) {
1852
+ var o = new en(t[r], this);
1853
+ o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.polys.push(o);
1854
+ }
1855
+ this.isSubject = e;
1856
+ }
1857
+ return D(n, [{
1858
+ key: "getSweepEvents",
1859
+ value: function() {
1860
+ for (var e = [], r = 0, i = this.polys.length; r < i; r++)
1861
+ for (var o = this.polys[r].getSweepEvents(), l = 0, s = o.length; l < s; l++)
1862
+ e.push(o[l]);
1863
+ return e;
1864
+ }
1865
+ }]), n;
1866
+ }(), tn = /* @__PURE__ */ function() {
1867
+ D(n, null, [{
1868
+ key: "factory",
1869
+ value: function(e) {
1870
+ for (var r = [], i = 0, o = e.length; i < o; i++) {
1871
+ var l = e[i];
1872
+ if (!(!l.isInResult() || l.ringOut)) {
1873
+ for (var s = null, u = l.leftSE, f = l.rightSE, a = [u], g = u.point, m = []; s = u, u = f, a.push(u), u.point !== g; )
1874
+ for (; ; ) {
1875
+ var v = u.getAvailableLinkedEvents();
1876
+ if (v.length === 0) {
1877
+ var b = a[0].point, p = a[a.length - 1].point;
1878
+ throw new Error("Unable to complete output ring starting at [".concat(b.x, ",") + " ".concat(b.y, "]. Last matching segment found ends at") + " [".concat(p.x, ", ").concat(p.y, "]."));
1879
+ }
1880
+ if (v.length === 1) {
1881
+ f = v[0].otherSE;
1882
+ break;
1883
+ }
1884
+ for (var h = null, d = 0, w = m.length; d < w; d++)
1885
+ if (m[d].point === u.point) {
1886
+ h = d;
1887
+ break;
1888
+ }
1889
+ if (h !== null) {
1890
+ var I = m.splice(h)[0], _ = a.splice(I.index);
1891
+ _.unshift(_[0].otherSE), r.push(new n(_.reverse()));
1892
+ continue;
1893
+ }
1894
+ m.push({
1895
+ index: a.length,
1896
+ point: u.point
1897
+ });
1898
+ var S = u.getLeftmostComparator(s);
1899
+ f = v.sort(S)[0].otherSE;
1900
+ break;
1901
+ }
1902
+ r.push(new n(a));
1903
+ }
1904
+ }
1905
+ return r;
1906
+ }
1907
+ }]);
1908
+ function n(t) {
1909
+ W(this, n), this.events = t;
1910
+ for (var e = 0, r = t.length; e < r; e++)
1911
+ t[e].segment.ringOut = this;
1912
+ this.poly = null;
1913
+ }
1914
+ return D(n, [{
1915
+ key: "getGeom",
1916
+ value: function() {
1917
+ for (var e = this.events[0].point, r = [e], i = 1, o = this.events.length - 1; i < o; i++) {
1918
+ var l = this.events[i].point, s = this.events[i + 1].point;
1919
+ kt(l, e, s) !== 0 && (r.push(l), e = l);
1920
+ }
1921
+ if (r.length === 1)
1922
+ return null;
1923
+ var u = r[0], f = r[1];
1924
+ kt(u, e, f) === 0 && r.shift(), r.push(r[0]);
1925
+ for (var a = this.isExteriorRing() ? 1 : -1, g = this.isExteriorRing() ? 0 : r.length - 1, m = this.isExteriorRing() ? r.length : -1, v = [], b = g; b != m; b += a)
1926
+ v.push([r[b].x, r[b].y]);
1927
+ return v;
1928
+ }
1929
+ }, {
1930
+ key: "isExteriorRing",
1931
+ value: function() {
1932
+ if (this._isExteriorRing === void 0) {
1933
+ var e = this.enclosingRing();
1934
+ this._isExteriorRing = e ? !e.isExteriorRing() : !0;
1935
+ }
1936
+ return this._isExteriorRing;
1937
+ }
1938
+ }, {
1939
+ key: "enclosingRing",
1940
+ value: function() {
1941
+ return this._enclosingRing === void 0 && (this._enclosingRing = this._calcEnclosingRing()), this._enclosingRing;
1942
+ }
1943
+ }, {
1944
+ key: "_calcEnclosingRing",
1945
+ value: function() {
1946
+ for (var e = this.events[0], r = 1, i = this.events.length; r < i; r++) {
1947
+ var o = this.events[r];
1948
+ $.compare(e, o) > 0 && (e = o);
1949
+ }
1950
+ for (var l = e.segment.prevInResult(), s = l ? l.prevInResult() : null; ; ) {
1951
+ if (!l)
1952
+ return null;
1953
+ if (!s)
1954
+ return l.ringOut;
1955
+ if (s.ringOut !== l.ringOut)
1956
+ return s.ringOut.enclosingRing() !== l.ringOut ? l.ringOut : l.ringOut.enclosingRing();
1957
+ l = s.prevInResult(), s = l ? l.prevInResult() : null;
1958
+ }
1959
+ }
1960
+ }]), n;
1961
+ }(), Mt = /* @__PURE__ */ function() {
1962
+ function n(t) {
1963
+ W(this, n), this.exteriorRing = t, t.poly = this, this.interiorRings = [];
1964
+ }
1965
+ return D(n, [{
1966
+ key: "addInterior",
1967
+ value: function(e) {
1968
+ this.interiorRings.push(e), e.poly = this;
1969
+ }
1970
+ }, {
1971
+ key: "getGeom",
1972
+ value: function() {
1973
+ var e = [this.exteriorRing.getGeom()];
1974
+ if (e[0] === null)
1975
+ return null;
1976
+ for (var r = 0, i = this.interiorRings.length; r < i; r++) {
1977
+ var o = this.interiorRings[r].getGeom();
1978
+ o !== null && e.push(o);
1979
+ }
1980
+ return e;
1981
+ }
1982
+ }]), n;
1983
+ }(), rn = /* @__PURE__ */ function() {
1984
+ function n(t) {
1985
+ W(this, n), this.rings = t, this.polys = this._composePolys(t);
1986
+ }
1987
+ return D(n, [{
1988
+ key: "getGeom",
1989
+ value: function() {
1990
+ for (var e = [], r = 0, i = this.polys.length; r < i; r++) {
1991
+ var o = this.polys[r].getGeom();
1992
+ o !== null && e.push(o);
1993
+ }
1994
+ return e;
1995
+ }
1996
+ }, {
1997
+ key: "_composePolys",
1998
+ value: function(e) {
1999
+ for (var r = [], i = 0, o = e.length; i < o; i++) {
2000
+ var l = e[i];
2001
+ if (!l.poly)
2002
+ if (l.isExteriorRing())
2003
+ r.push(new Mt(l));
2004
+ else {
2005
+ var s = l.enclosingRing();
2006
+ s.poly || r.push(new Mt(s)), s.poly.addInterior(l);
2007
+ }
2008
+ }
2009
+ return r;
2010
+ }
2011
+ }]), n;
2012
+ }(), nn = /* @__PURE__ */ function() {
2013
+ function n(t) {
2014
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ue.compare;
2015
+ W(this, n), this.queue = t, this.tree = new lt(e), this.segments = [];
2016
+ }
2017
+ return D(n, [{
2018
+ key: "process",
2019
+ value: function(e) {
2020
+ var r = e.segment, i = [];
2021
+ if (e.consumedBy)
2022
+ return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(r), i;
2023
+ var o = e.isLeft ? this.tree.insert(r) : this.tree.find(r);
2024
+ if (!o)
2025
+ throw new Error("Unable to find segment #".concat(r.id, " ") + "[".concat(r.leftSE.point.x, ", ").concat(r.leftSE.point.y, "] -> ") + "[".concat(r.rightSE.point.x, ", ").concat(r.rightSE.point.y, "] ") + "in SweepLine tree. Please submit a bug report.");
2026
+ for (var l = o, s = o, u = void 0, f = void 0; u === void 0; )
2027
+ l = this.tree.prev(l), l === null ? u = null : l.key.consumedBy === void 0 && (u = l.key);
2028
+ for (; f === void 0; )
2029
+ s = this.tree.next(s), s === null ? f = null : s.key.consumedBy === void 0 && (f = s.key);
2030
+ if (e.isLeft) {
2031
+ var a = null;
2032
+ if (u) {
2033
+ var g = u.getIntersection(r);
2034
+ if (g !== null && (r.isAnEndpoint(g) || (a = g), !u.isAnEndpoint(g)))
2035
+ for (var m = this._splitSafely(u, g), v = 0, b = m.length; v < b; v++)
2036
+ i.push(m[v]);
2037
+ }
2038
+ var p = null;
2039
+ if (f) {
2040
+ var h = f.getIntersection(r);
2041
+ if (h !== null && (r.isAnEndpoint(h) || (p = h), !f.isAnEndpoint(h)))
2042
+ for (var d = this._splitSafely(f, h), w = 0, I = d.length; w < I; w++)
2043
+ i.push(d[w]);
2044
+ }
2045
+ if (a !== null || p !== null) {
2046
+ var _ = null;
2047
+ if (a === null)
2048
+ _ = p;
2049
+ else if (p === null)
2050
+ _ = a;
2051
+ else {
2052
+ var S = $.comparePoints(a, p);
2053
+ _ = S <= 0 ? a : p;
2054
+ }
2055
+ this.queue.remove(r.rightSE), i.push(r.rightSE);
2056
+ for (var E = r.split(_), k = 0, P = E.length; k < P; k++)
2057
+ i.push(E[k]);
2058
+ }
2059
+ i.length > 0 ? (this.tree.remove(r), i.push(e)) : (this.segments.push(r), r.prev = u);
2060
+ } else {
2061
+ if (u && f) {
2062
+ var G = u.getIntersection(f);
2063
+ if (G !== null) {
2064
+ if (!u.isAnEndpoint(G))
2065
+ for (var z = this._splitSafely(u, G), L = 0, x = z.length; L < x; L++)
2066
+ i.push(z[L]);
2067
+ if (!f.isAnEndpoint(G))
2068
+ for (var M = this._splitSafely(f, G), q = 0, re = M.length; q < re; q++)
2069
+ i.push(M[q]);
2070
+ }
2071
+ }
2072
+ this.tree.remove(r);
2073
+ }
2074
+ return i;
2075
+ }
2076
+ }, {
2077
+ key: "_splitSafely",
2078
+ value: function(e, r) {
2079
+ this.tree.remove(e);
2080
+ var i = e.rightSE;
2081
+ this.queue.remove(i);
2082
+ var o = e.split(r);
2083
+ return o.push(i), e.consumedBy === void 0 && this.tree.insert(e), o;
2084
+ }
2085
+ }]), n;
2086
+ }(), Ot = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, on = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6, ln = /* @__PURE__ */ function() {
2087
+ function n() {
2088
+ W(this, n);
2089
+ }
2090
+ return D(n, [{
2091
+ key: "run",
2092
+ value: function(e, r, i) {
2093
+ H.type = e, ze.reset();
2094
+ for (var o = [new Lt(r, !0)], l = 0, s = i.length; l < s; l++)
2095
+ o.push(new Lt(i[l], !1));
2096
+ if (H.numMultiPolys = o.length, H.type === "difference")
2097
+ for (var u = o[0], f = 1; f < o.length; )
2098
+ it(o[f].bbox, u.bbox) !== null ? f++ : o.splice(f, 1);
2099
+ if (H.type === "intersection") {
2100
+ for (var a = 0, g = o.length; a < g; a++)
2101
+ for (var m = o[a], v = a + 1, b = o.length; v < b; v++)
2102
+ if (it(m.bbox, o[v].bbox) === null)
2103
+ return [];
2104
+ }
2105
+ for (var p = new lt($.compare), h = 0, d = o.length; h < d; h++)
2106
+ for (var w = o[h].getSweepEvents(), I = 0, _ = w.length; I < _; I++)
2107
+ if (p.insert(w[I]), p.size > Ot)
2108
+ throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");
2109
+ for (var S = new nn(p), E = p.size, k = p.pop(); k; ) {
2110
+ var P = k.key;
2111
+ if (p.size === E) {
2112
+ var G = P.segment;
2113
+ throw new Error("Unable to pop() ".concat(P.isLeft ? "left" : "right", " SweepEvent ") + "[".concat(P.point.x, ", ").concat(P.point.y, "] from segment #").concat(G.id, " ") + "[".concat(G.leftSE.point.x, ", ").concat(G.leftSE.point.y, "] -> ") + "[".concat(G.rightSE.point.x, ", ").concat(G.rightSE.point.y, "] from queue. ") + "Please file a bug report.");
2114
+ }
2115
+ if (p.size > Ot)
2116
+ throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");
2117
+ if (S.segments.length > on)
2118
+ throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");
2119
+ for (var z = S.process(P), L = 0, x = z.length; L < x; L++) {
2120
+ var M = z[L];
2121
+ M.consumedBy === void 0 && p.insert(M);
2122
+ }
2123
+ E = p.size, k = p.pop();
2124
+ }
2125
+ ze.reset();
2126
+ var q = tn.factory(S.segments), re = new rn(q);
2127
+ return re.getGeom();
2128
+ }
2129
+ }]), n;
2130
+ }(), H = new ln(), sn = function(t) {
2131
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2132
+ r[i - 1] = arguments[i];
2133
+ return H.run("union", t, r);
2134
+ }, un = function(t) {
2135
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2136
+ r[i - 1] = arguments[i];
2137
+ return H.run("intersection", t, r);
2138
+ }, fn = function(t) {
2139
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2140
+ r[i - 1] = arguments[i];
2141
+ return H.run("xor", t, r);
2142
+ }, an = function(t) {
2143
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2144
+ r[i - 1] = arguments[i];
2145
+ return H.run("difference", t, r);
2146
+ }, Me = {
2147
+ union: sn,
2148
+ intersection: un,
2149
+ xor: fn,
2150
+ difference: an
2151
+ };
2152
+ function Tt(n, t) {
2153
+ var e = hn(t), r = null;
2154
+ return n.type === "FeatureCollection" ? r = cn(n) : r = Yt(
2155
+ Me.union(n.geometry.coordinates)
2156
+ ), r.geometry.coordinates.forEach(function(i) {
2157
+ e.geometry.coordinates.push(i[0]);
2158
+ }), e;
2159
+ }
2160
+ function cn(n) {
2161
+ var t = n.features.length === 2 ? Me.union(
2162
+ n.features[0].geometry.coordinates,
2163
+ n.features[1].geometry.coordinates
2164
+ ) : Me.union.apply(
2165
+ Me,
2166
+ n.features.map(function(e) {
2167
+ return e.geometry.coordinates;
2168
+ })
2169
+ );
2170
+ return Yt(t);
2171
+ }
2172
+ function Yt(n) {
2173
+ return Ut(n);
2174
+ }
2175
+ function hn(n) {
2176
+ var t = [
2177
+ [
2178
+ [180, 90],
2179
+ [-180, 90],
2180
+ [-180, -90],
2181
+ [180, -90],
2182
+ [180, 90]
2183
+ ]
2184
+ ], e = n && n.geometry.coordinates || t;
2185
+ return Dt(e);
2186
+ }
2187
+ function Ct(n) {
2188
+ return n.type === "Feature" ? n.geometry : n;
2189
+ }
2190
+ function gn(n, t, e) {
2191
+ e === void 0 && (e = {});
2192
+ var r = Ct(n), i = Ct(t), o = Me.union(r.coordinates, i.coordinates);
2193
+ return o.length === 0 ? null : o.length === 1 ? Dt(o[0], e.properties) : Ut(o, e.properties);
2194
+ }
2195
+ let zt = {
2196
+ type: "FeatureCollection",
2197
+ features: []
2198
+ };
2199
+ function vn(n, t, e = !0, r = !0, i = {}, o = {}, l = {
2200
+ fill: {
2201
+ layout: {},
2202
+ paint: {
2203
+ "fill-color": "#000",
2204
+ "fill-opacity": 0.1
2205
+ }
2206
+ },
2207
+ line: {
2208
+ layout: {
2209
+ "line-cap": "square"
2210
+ },
2211
+ paint: {
2212
+ "line-width": ["case", ["==", ["geometry-type"], "Polygon"], 2, 3],
2213
+ "line-dasharray": [1, 1],
2214
+ "line-color": "#3170fe"
2215
+ }
2216
+ }
2217
+ }) {
2218
+ let s, u, f, a = [], g;
2219
+ function m() {
2220
+ n.addSource("full-geom", {
2221
+ type: "geojson",
2222
+ data: zt
2223
+ }), n.addLayer({
2224
+ ...l.fill,
2225
+ id: "full-geom-fill",
2226
+ type: "fill",
2227
+ source: "full-geom",
2228
+ filter: ["==", ["geometry-type"], "Polygon"]
2229
+ }), n.addLayer({
2230
+ ...l.line,
2231
+ id: "full-geom-line",
2232
+ type: "line",
2233
+ source: "full-geom"
2234
+ });
2235
+ }
2236
+ n.loaded() ? m() : n.once("load", () => {
2237
+ m();
2238
+ });
2239
+ const v = (h) => {
2240
+ u == null || u([h.lngLat.lng, h.lngLat.lat]);
2241
+ }, b = () => {
874
2242
  let h;
875
- const g = t.getZoom() > 9 ? [(h = t.getCenter().wrap()).lng, h.lat] : void 0;
876
- f !== g && (f = g, o == null || o(g));
2243
+ const d = n.getZoom() > 9 ? [(h = n.getCenter().wrap()).lng, h.lat] : void 0;
2244
+ f !== d && (f = d, s == null || s(d));
877
2245
  };
878
2246
  return {
879
2247
  setProximityChangeHandler(h) {
880
- h ? (o = h, t.on("moveend", E), E()) : (t.off("moveend", E), o == null || o(void 0), o = void 0);
2248
+ h ? (s = h, n.on("moveend", b), b()) : (n.off("moveend", b), s == null || s(void 0), s = void 0);
881
2249
  },
882
2250
  setMapClickHandler(h) {
883
- i = h, i ? t.on("click", b) : t.off("click", b);
2251
+ u = h, u ? n.on("click", v) : n.off("click", v);
884
2252
  },
885
- flyTo(h, g) {
886
- t.flyTo({ center: h, zoom: g, ...r });
2253
+ flyTo(h, d) {
2254
+ n.flyTo({ center: h, zoom: d, ...i });
887
2255
  },
888
- fitBounds(h, g) {
889
- t.fitBounds(
2256
+ fitBounds(h, d) {
2257
+ n.fitBounds(
890
2258
  [
891
2259
  [h[0], h[1]],
892
2260
  [h[2], h[3]]
893
2261
  ],
894
- { ...u, padding: g }
2262
+ { padding: d, ...o }
895
2263
  );
896
2264
  },
897
2265
  indicateReverse(h) {
898
- t.getCanvas().style.cursor = h ? "crosshair" : "";
899
- },
900
- setMarkers(h, g) {
901
- for (const m of a)
902
- m.remove();
903
- if (a.length = 0, !!e)
904
- for (const m of g ? [...h != null ? h : [], g] : h != null ? h : []) {
905
- let w;
906
- if (m === g && typeof n == "object")
907
- w = new e.Marker(n);
908
- else if (m !== g && typeof l == "object")
909
- w = new e.Marker(l);
910
- else {
911
- const M = document.createElement("div");
912
- new lt({ props: { displayIn: "maplibre" }, target: M }), w = new e.Marker({ element: M });
2266
+ n.getCanvas().style.cursor = h ? "crosshair" : "";
2267
+ },
2268
+ setMarkers(h, d) {
2269
+ function w(_) {
2270
+ var S;
2271
+ (S = n.getSource("full-geom")) == null || S.setData(_);
2272
+ }
2273
+ for (const _ of a)
2274
+ _.remove();
2275
+ if (a.length = 0, w(zt), !t)
2276
+ return;
2277
+ const I = () => {
2278
+ const _ = document.createElement("div");
2279
+ return new Ft({
2280
+ props: { displayIn: "maplibre" },
2281
+ target: _
2282
+ }), new t.Marker({ element: _ });
2283
+ };
2284
+ if (d) {
2285
+ let _ = !1;
2286
+ if (d.geometry.type === "GeometryCollection") {
2287
+ const S = d.geometry.geometries.filter(
2288
+ (E) => E.type === "Polygon" || E.type === "MultiPolygon"
2289
+ );
2290
+ if (S.length > 0) {
2291
+ let E = S.pop();
2292
+ for (const k of S)
2293
+ E = gn(E, k);
2294
+ w(Tt({ ...d, geometry: E })), _ = !0;
2295
+ } else {
2296
+ const E = d.geometry.geometries.filter(
2297
+ (k) => k.type === "LineString" || k.type === "MultiLineString"
2298
+ );
2299
+ E.length > 0 && (w({
2300
+ ...d,
2301
+ geometry: { type: "GeometryCollection", geometries: E }
2302
+ }), _ = !0);
913
2303
  }
914
- a.push(w.setLngLat(m.center).addTo(t));
915
2304
  }
2305
+ if (!_) {
2306
+ if (d.geometry.type === "Polygon" || d.geometry.type === "MultiPolygon")
2307
+ w(Tt(d));
2308
+ else if (d.geometry.type === "LineString" || d.geometry.type === "MultiLineString") {
2309
+ w(d);
2310
+ return;
2311
+ }
2312
+ }
2313
+ a.push(
2314
+ (typeof e == "object" ? new t.Marker(e) : I()).setLngLat(d.center).addTo(n)
2315
+ );
2316
+ }
2317
+ for (const _ of h != null ? h : [])
2318
+ _ !== d && a.push(
2319
+ (typeof r == "object" ? new t.Marker(r) : I()).setLngLat(_.center).addTo(n)
2320
+ );
916
2321
  },
917
2322
  setSelectedMarker(h) {
918
- d && d.getElement().classList.toggle("marker-selected", !1), d = h > -1 ? a[h] : void 0, d == null || d.getElement().classList.toggle("marker-selected", !0);
2323
+ g && g.getElement().classList.toggle("marker-selected", !1), g = h > -1 ? a[h] : void 0, g == null || g.getElement().classList.toggle("marker-selected", !0);
919
2324
  }
920
2325
  };
921
2326
  }
922
- var G, oe;
923
- class nn extends pt {
924
- constructor(n) {
2327
+ var j, ye;
2328
+ class mn extends ur {
2329
+ constructor(e) {
925
2330
  super();
926
- Ie(this, G, void 0);
927
- Ie(this, oe, void 0);
928
- ke(this, oe, n);
929
- }
930
- onAdd(n) {
931
- const l = document.createElement("div");
932
- l.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";
933
- const { maplibregl: r, marker: u, showResultMarkers: o, flyTo: i, ...f } = Z(this, oe), a = typeof i == "boolean" ? {} : i, d = $t(
934
- n,
935
- r,
936
- u,
2331
+ We(this, j, void 0);
2332
+ We(this, ye, void 0);
2333
+ Ne(this, ye, e);
2334
+ }
2335
+ onAdd(e) {
2336
+ const r = document.createElement("div");
2337
+ r.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";
2338
+ const {
2339
+ maplibregl: i,
2340
+ marker: o,
2341
+ showResultMarkers: l,
2342
+ flyTo: s,
2343
+ fullGeometryStyle: u,
2344
+ ...f
2345
+ } = J(this, ye), a = typeof s == "boolean" ? {} : s, g = vn(
2346
+ e,
2347
+ i,
937
2348
  o,
2349
+ l,
2350
+ a,
938
2351
  a,
939
- a
2352
+ u
940
2353
  );
941
- ke(this, G, new Ft({
942
- target: l,
2354
+ Ne(this, j, new Qr({
2355
+ target: r,
943
2356
  props: {
944
- mapController: d,
945
- flyTo: i === void 0 ? !0 : !!i,
2357
+ mapController: g,
2358
+ flyTo: s === void 0 ? !0 : !!s,
946
2359
  ...f
947
2360
  }
948
2361
  }));
949
- for (const b of [
2362
+ for (const m of [
950
2363
  "select",
951
2364
  "pick",
952
2365
  "featuresListed",
@@ -956,40 +2369,48 @@ class nn extends pt {
956
2369
  "reverseToggle",
957
2370
  "queryChange"
958
2371
  ])
959
- Z(this, G).$on(
960
- b,
961
- (E) => this.fire(b.toLowerCase(), E.detail)
2372
+ J(this, j).$on(
2373
+ m,
2374
+ (v) => this.fire(m.toLowerCase(), v.detail)
962
2375
  );
963
- return l;
2376
+ return r;
964
2377
  }
965
- setOptions(n) {
2378
+ setOptions(e) {
966
2379
  var f;
967
- ke(this, oe, n);
968
- const { maplibregl: l, marker: r, showResultMarkers: u, flyTo: o, ...i } = Z(this, oe);
969
- (f = Z(this, G)) == null || f.$set(i);
2380
+ Ne(this, ye, e);
2381
+ const {
2382
+ maplibregl: r,
2383
+ marker: i,
2384
+ showResultMarkers: o,
2385
+ flyTo: l,
2386
+ fullGeometryStyle: s,
2387
+ ...u
2388
+ } = J(this, ye);
2389
+ (f = J(this, j)) == null || f.$set(u);
970
2390
  }
971
- setQuery(n, l = !0) {
972
- var r;
973
- (r = Z(this, G)) == null || r.setQuery(n, l);
2391
+ setQuery(e, r = !0) {
2392
+ var i;
2393
+ (i = J(this, j)) == null || i.setQuery(e, r);
974
2394
  }
975
- setReverseMode(n) {
976
- var l;
977
- (l = Z(this, G)) == null || l.$set({ reverseActive: n });
2395
+ setReverseMode(e) {
2396
+ var r;
2397
+ (r = J(this, j)) == null || r.$set({ reverseActive: e });
978
2398
  }
979
2399
  focus() {
980
- var n;
981
- (n = Z(this, G)) == null || n.focus();
2400
+ var e;
2401
+ (e = J(this, j)) == null || e.focus();
982
2402
  }
983
2403
  blur() {
984
- var n;
985
- (n = Z(this, G)) == null || n.blur();
2404
+ var e;
2405
+ (e = J(this, j)) == null || e.blur();
986
2406
  }
987
2407
  onRemove() {
988
- var n;
989
- (n = Z(this, G)) == null || n.$destroy();
2408
+ var e;
2409
+ (e = J(this, j)) == null || e.$destroy();
990
2410
  }
991
2411
  }
992
- G = new WeakMap(), oe = new WeakMap();
2412
+ j = new WeakMap(), ye = new WeakMap();
993
2413
  export {
994
- nn as GeocodingControl
2414
+ mn as GeocodingControl,
2415
+ vn as createMaplibreglMapController
995
2416
  };