leaflet-html 0.13.0 → 0.13.3
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.
- package/dist/leaflet-html.js +146 -134
- package/dist/leaflet-html.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/leaflet-html.js
CHANGED
|
@@ -7,10 +7,10 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
7
7
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
8
8
|
*/
|
|
9
9
|
(function(g, d) {
|
|
10
|
-
(function(c,
|
|
11
|
-
|
|
10
|
+
(function(c, y) {
|
|
11
|
+
y(d);
|
|
12
12
|
})(jn, function(c) {
|
|
13
|
-
var
|
|
13
|
+
var y = "1.9.4";
|
|
14
14
|
function x(t) {
|
|
15
15
|
var e, i, n, o;
|
|
16
16
|
for (i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -61,11 +61,11 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
61
61
|
var i = Math.pow(10, e === void 0 ? 6 : e);
|
|
62
62
|
return Math.round(t * i) / i;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function w(t) {
|
|
65
65
|
return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
|
|
66
66
|
}
|
|
67
67
|
function M(t) {
|
|
68
|
-
return
|
|
68
|
+
return w(t).split(/\s+/);
|
|
69
69
|
}
|
|
70
70
|
function C(t, e) {
|
|
71
71
|
Object.prototype.hasOwnProperty.call(t, "options") || (t.options = t.options ? s(t.options) : {});
|
|
@@ -131,7 +131,7 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
131
131
|
wrapNum: v,
|
|
132
132
|
falseFn: _,
|
|
133
133
|
formatNum: b,
|
|
134
|
-
trim:
|
|
134
|
+
trim: w,
|
|
135
135
|
splitWords: M,
|
|
136
136
|
setOptions: C,
|
|
137
137
|
getParamString: H,
|
|
@@ -1102,7 +1102,7 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
1104
|
function j(t, e) {
|
|
1105
|
-
t.classList !== void 0 ? t.classList.remove(e) : Ke(t,
|
|
1105
|
+
t.classList !== void 0 ? t.classList.remove(e) : Ke(t, w((" " + fe(t) + " ").replace(" " + e + " ", " ")));
|
|
1106
1106
|
}
|
|
1107
1107
|
function Ke(t, e) {
|
|
1108
1108
|
t.className.baseVal === void 0 ? t.className = e : t.className.baseVal = e;
|
|
@@ -6306,7 +6306,7 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
6306
6306
|
this._zooming = !1, lt(this._animRequest), F(document, "touchmove", this._onTouchMove, this), F(document, "touchend touchcancel", this._onTouchEnd, this), this._map.options.zoomAnimation ? this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), !0, this._map.options.zoomSnap) : this._map._resetView(this._center, this._map._limitZoom(this._zoom));
|
|
6307
6307
|
}
|
|
6308
6308
|
});
|
|
6309
|
-
N.addInitHook("addHandler", "touchZoom", Rn), N.BoxZoom = zn, N.DoubleClickZoom = Zn, N.Drag = An, N.Keyboard = In, N.ScrollWheelZoom = Bn, N.TapHold = Nn, N.TouchZoom = Rn, c.Bounds = V, c.Browser = S, c.CRS = xt, c.Canvas = Sn, c.Circle = fi, c.CircleMarker = ye, c.Class = Pt, c.Control = _t, c.DivIcon = Cn, c.DivOverlay = yt, c.DomEvent = Do, c.DomUtil = No, c.Draggable = Et, c.Evented = Jt, c.FeatureGroup = Ct, c.GeoJSON = Mt, c.GridLayer = re, c.Handler = vt, c.Icon = Gt, c.ImageOverlay = xe, c.LatLng = D, c.LatLngBounds = st, c.Layer = pt, c.LayerGroup = Ft, c.LineUtil = $o, c.Map = N, c.Marker = ve, c.Mixin = qo, c.Path = Ot, c.Point = O, c.PolyUtil = jo, c.Polygon = Ut, c.Polyline = Tt, c.Popup = Ce, c.PosAnimation = an, c.Projection = Qo, c.Rectangle = On, c.Renderer = St, c.SVG = he, c.SVGOverlay = xn, c.TileLayer = Vt, c.Tooltip = Te, c.Transformation = De, c.Util = oo, c.VideoOverlay = Pn, c.bind = a, c.bounds = ot, c.canvas = kn, c.circle = as, c.circleMarker = rs, c.control = ne, c.divIcon = ms, c.extend = x, c.featureGroup = ns, c.geoJSON = bn, c.geoJson = ls, c.gridLayer = gs, c.icon = os, c.imageOverlay = cs, c.latLng = B, c.latLngBounds = J, c.layerGroup = is, c.map = Ho, c.marker = ss, c.point = E, c.polygon = us, c.polyline = hs, c.popup = _s, c.rectangle = Ls, c.setOptions = C, c.stamp = l, c.svg = En, c.svgOverlay = fs, c.tileLayer = Tn, c.tooltip = ps, c.transformation = Kt, c.version =
|
|
6309
|
+
N.addInitHook("addHandler", "touchZoom", Rn), N.BoxZoom = zn, N.DoubleClickZoom = Zn, N.Drag = An, N.Keyboard = In, N.ScrollWheelZoom = Bn, N.TapHold = Nn, N.TouchZoom = Rn, c.Bounds = V, c.Browser = S, c.CRS = xt, c.Canvas = Sn, c.Circle = fi, c.CircleMarker = ye, c.Class = Pt, c.Control = _t, c.DivIcon = Cn, c.DivOverlay = yt, c.DomEvent = Do, c.DomUtil = No, c.Draggable = Et, c.Evented = Jt, c.FeatureGroup = Ct, c.GeoJSON = Mt, c.GridLayer = re, c.Handler = vt, c.Icon = Gt, c.ImageOverlay = xe, c.LatLng = D, c.LatLngBounds = st, c.Layer = pt, c.LayerGroup = Ft, c.LineUtil = $o, c.Map = N, c.Marker = ve, c.Mixin = qo, c.Path = Ot, c.Point = O, c.PolyUtil = jo, c.Polygon = Ut, c.Polyline = Tt, c.Popup = Ce, c.PosAnimation = an, c.Projection = Qo, c.Rectangle = On, c.Renderer = St, c.SVG = he, c.SVGOverlay = xn, c.TileLayer = Vt, c.Tooltip = Te, c.Transformation = De, c.Util = oo, c.VideoOverlay = Pn, c.bind = a, c.bounds = ot, c.canvas = kn, c.circle = as, c.circleMarker = rs, c.control = ne, c.divIcon = ms, c.extend = x, c.featureGroup = ns, c.geoJSON = bn, c.geoJson = ls, c.gridLayer = gs, c.icon = os, c.imageOverlay = cs, c.latLng = B, c.latLngBounds = J, c.layerGroup = is, c.map = Ho, c.marker = ss, c.point = E, c.polygon = us, c.polyline = hs, c.popup = _s, c.rectangle = Ls, c.setOptions = C, c.stamp = l, c.svg = En, c.svgOverlay = fs, c.tileLayer = Tn, c.tooltip = ps, c.transformation = Kt, c.version = y, c.videoOverlay = ds;
|
|
6310
6310
|
var bs = window.L;
|
|
6311
6311
|
c.noConflict = function() {
|
|
6312
6312
|
return window.L = bs, this;
|
|
@@ -6316,8 +6316,8 @@ var jn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
6316
6316
|
var G = yi.exports;
|
|
6317
6317
|
const et = "l:layer:connected", Jn = "l:popup:connected", Oe = "l:icon:connected", Gn = "l:layer:removed", Kn = "l:latlngbounds:connected", Yn = "l:latlngbounds:changed", xi = "l:tooltip:connected", Xn = "l:pane:connected", $n = (g, d, c = !0) => {
|
|
6318
6318
|
if (g.hasAttribute("on")) {
|
|
6319
|
-
const
|
|
6320
|
-
|
|
6319
|
+
const y = g.getAttribute("on");
|
|
6320
|
+
y !== null && y.split(/\s+/).forEach((x) => {
|
|
6321
6321
|
d !== null && d.on(x, (s) => {
|
|
6322
6322
|
g.dispatchEvent(
|
|
6323
6323
|
new CustomEvent(x, { bubbles: c, detail: s })
|
|
@@ -6341,16 +6341,16 @@ class As extends HTMLElement {
|
|
|
6341
6341
|
super();
|
|
6342
6342
|
}
|
|
6343
6343
|
connectedCallback() {
|
|
6344
|
-
const d = {}, c = {},
|
|
6344
|
+
const d = {}, c = {}, y = G.control.layers(d, c);
|
|
6345
6345
|
this.addEventListener(et, (s) => {
|
|
6346
6346
|
const { type: a, name: h, layer: l } = s.detail;
|
|
6347
|
-
a === "overlay" ?
|
|
6347
|
+
a === "overlay" ? y.addOverlay(l, h) : a === "base" && y.addBaseLayer(l, h), s.preventDefault();
|
|
6348
6348
|
});
|
|
6349
6349
|
const x = new CustomEvent(et, {
|
|
6350
6350
|
cancelable: !0,
|
|
6351
6351
|
bubbles: !0,
|
|
6352
6352
|
detail: {
|
|
6353
|
-
layer:
|
|
6353
|
+
layer: y
|
|
6354
6354
|
}
|
|
6355
6355
|
});
|
|
6356
6356
|
this.dispatchEvent(x);
|
|
@@ -6372,7 +6372,7 @@ class Is extends zt {
|
|
|
6372
6372
|
connectedCallback() {
|
|
6373
6373
|
const d = this.getAttribute("name"), c = G.layerGroup();
|
|
6374
6374
|
this.layer = c;
|
|
6375
|
-
const
|
|
6375
|
+
const y = new CustomEvent(et, {
|
|
6376
6376
|
cancelable: !0,
|
|
6377
6377
|
bubbles: !0,
|
|
6378
6378
|
detail: {
|
|
@@ -6380,7 +6380,7 @@ class Is extends zt {
|
|
|
6380
6380
|
name: d
|
|
6381
6381
|
}
|
|
6382
6382
|
});
|
|
6383
|
-
this.dispatchEvent(
|
|
6383
|
+
this.dispatchEvent(y), this.addEventListener(et, (s) => {
|
|
6384
6384
|
s.stopPropagation(), c.addLayer(s.detail.layer);
|
|
6385
6385
|
}), new MutationObserver(function(s) {
|
|
6386
6386
|
s.forEach((a) => {
|
|
@@ -6421,21 +6421,21 @@ const Ns = (g) => ({
|
|
|
6421
6421
|
throw new Bs(c.issues);
|
|
6422
6422
|
return Rs(c);
|
|
6423
6423
|
}, Ds = (g) => (d) => {
|
|
6424
|
-
let { status: c, issues:
|
|
6424
|
+
let { status: c, issues: y } = d;
|
|
6425
6425
|
const x = {};
|
|
6426
6426
|
for (const s of Object.keys(g)) {
|
|
6427
6427
|
let a = g[s](d);
|
|
6428
|
-
a.status === "abort" && (c = "abort",
|
|
6428
|
+
a.status === "abort" && (c = "abort", y = [...y, ...a.issues]), x[s] = a.value;
|
|
6429
6429
|
}
|
|
6430
|
-
return { status: c, issues:
|
|
6430
|
+
return { status: c, issues: y, value: x };
|
|
6431
6431
|
}, Be = (g) => (d) => {
|
|
6432
|
-
let { issues: c } = d,
|
|
6432
|
+
let { issues: c } = d, y = "clean";
|
|
6433
6433
|
const x = {};
|
|
6434
6434
|
for (const s of Object.keys(g)) {
|
|
6435
6435
|
let a = g[s](d);
|
|
6436
|
-
a.status !== "clean" && (
|
|
6436
|
+
a.status !== "clean" && (y = a.status), !(a.value === null && a.status === "clean") && (c = [...c, ...a.issues], x[s] = a.value);
|
|
6437
6437
|
}
|
|
6438
|
-
return { status:
|
|
6438
|
+
return { status: y, issues: c, value: x };
|
|
6439
6439
|
}, Hs = (...g) => (d) => {
|
|
6440
6440
|
for (let c = 0; c < g.length && (d = g[c](d), d.status !== "abort"); c++)
|
|
6441
6441
|
;
|
|
@@ -6446,12 +6446,12 @@ const Ns = (g) => ({
|
|
|
6446
6446
|
return d;
|
|
6447
6447
|
}, wi = (g) => (d) => d.value === null ? d : g(d), ut = (g) => (d) => (d = g(d), d.value === null ? { status: "clean", issues: [], value: null } : d), Q = (g) => (d) => {
|
|
6448
6448
|
const c = d.value;
|
|
6449
|
-
let
|
|
6450
|
-
return
|
|
6449
|
+
let y = c.getAttribute(g);
|
|
6450
|
+
return y === null ? {
|
|
6451
6451
|
status: "abort",
|
|
6452
6452
|
issues: [...d.issues, js(c, g)],
|
|
6453
6453
|
value: null
|
|
6454
|
-
} : { ...d, value:
|
|
6454
|
+
} : { ...d, value: y };
|
|
6455
6455
|
}, Fs = () => (g) => {
|
|
6456
6456
|
let d = parseInt(g.value);
|
|
6457
6457
|
return isNaN(d) ? {
|
|
@@ -6493,15 +6493,15 @@ const Ns = (g) => ({
|
|
|
6493
6493
|
}), Ae = class Ae extends HTMLElement {
|
|
6494
6494
|
constructor() {
|
|
6495
6495
|
super(), this.map = null;
|
|
6496
|
-
const d = (
|
|
6497
|
-
const { bounds: x, method: s } =
|
|
6496
|
+
const d = (y) => {
|
|
6497
|
+
const { bounds: x, method: s } = y.detail;
|
|
6498
6498
|
this.map !== null && this.map[s](x);
|
|
6499
6499
|
};
|
|
6500
|
-
this.addEventListener(Kn, d), this.addEventListener(Yn, d), this.addEventListener(Xn, (
|
|
6501
|
-
const { name: x } =
|
|
6500
|
+
this.addEventListener(Kn, d), this.addEventListener(Yn, d), this.addEventListener(Xn, (y) => {
|
|
6501
|
+
const { name: x } = y.detail;
|
|
6502
6502
|
this.map.createPane(x);
|
|
6503
|
-
}), new MutationObserver(function(
|
|
6504
|
-
|
|
6503
|
+
}), new MutationObserver(function(y) {
|
|
6504
|
+
y.forEach((x) => {
|
|
6505
6505
|
if (x.target instanceof Ae) {
|
|
6506
6506
|
const s = x.target;
|
|
6507
6507
|
x.removedNodes.forEach((a) => {
|
|
@@ -6531,8 +6531,8 @@ const Ns = (g) => ({
|
|
|
6531
6531
|
const d = Ds({
|
|
6532
6532
|
zoom: Ee("zoom", Fs()),
|
|
6533
6533
|
center: Ee("center", ze())
|
|
6534
|
-
}), { zoom: c, center:
|
|
6535
|
-
this.map.setView(
|
|
6534
|
+
}), { zoom: c, center: y } = wt(d, this);
|
|
6535
|
+
this.map.setView(y, c);
|
|
6536
6536
|
}
|
|
6537
6537
|
if (this.hasAttribute("locate")) {
|
|
6538
6538
|
const d = Ee("locate", ze());
|
|
@@ -6545,8 +6545,8 @@ const Ns = (g) => ({
|
|
|
6545
6545
|
this.map !== null && this.map.removeLayer(d.detail.layer);
|
|
6546
6546
|
});
|
|
6547
6547
|
}
|
|
6548
|
-
attributeChangedCallback(d, c,
|
|
6549
|
-
this.map !== null && (d === "zoom" ? this.map.setZoom(parseInt(
|
|
6548
|
+
attributeChangedCallback(d, c, y) {
|
|
6549
|
+
this.map !== null && (d === "zoom" ? this.map.setZoom(parseInt(y)) : d === "center" && this.map.setView(JSON.parse(y)));
|
|
6550
6550
|
}
|
|
6551
6551
|
};
|
|
6552
6552
|
Lt(Ae, "observedAttributes", ["zoom", "center", "zoom-control"]);
|
|
@@ -6565,8 +6565,8 @@ class Qn extends zt {
|
|
|
6565
6565
|
opacity: Li(ut(Q("opacity")), wi(Gs()))
|
|
6566
6566
|
}),
|
|
6567
6567
|
this
|
|
6568
|
-
),
|
|
6569
|
-
if (
|
|
6568
|
+
), y = this.closest("l-pane");
|
|
6569
|
+
if (y !== null && (c.pane = y.getAttribute("name")), this.layer = G.marker(d, c), this.hasAttribute("icon")) {
|
|
6570
6570
|
const s = G.icon(JSON.parse(this.getAttribute("icon")));
|
|
6571
6571
|
this.layer.setIcon(s);
|
|
6572
6572
|
}
|
|
@@ -6583,8 +6583,8 @@ class Qn extends zt {
|
|
|
6583
6583
|
});
|
|
6584
6584
|
this.dispatchEvent(x);
|
|
6585
6585
|
}
|
|
6586
|
-
attributeChangedCallback(d, c,
|
|
6587
|
-
this.layer !== null && (d === "lat-lng" && this.layer.setLatLng(JSON.parse(
|
|
6586
|
+
attributeChangedCallback(d, c, y) {
|
|
6587
|
+
this.layer !== null && (d === "lat-lng" && this.layer.setLatLng(JSON.parse(y)), d === "opacity" && this.layer.setOpacity(parseFloat(y)), d === "icon" && this.layer.setIcon(G.icon(JSON.parse(y))));
|
|
6588
6588
|
}
|
|
6589
6589
|
}
|
|
6590
6590
|
Lt(Qn, "observedAttributes", ["lat-lng", "opacity", "icon"]);
|
|
@@ -6605,8 +6605,8 @@ class Ks extends HTMLElement {
|
|
|
6605
6605
|
connectedCallback() {
|
|
6606
6606
|
const d = this.getAttribute("content");
|
|
6607
6607
|
let c = !1;
|
|
6608
|
-
const
|
|
6609
|
-
|
|
6608
|
+
const y = this.getAttribute("open-popup");
|
|
6609
|
+
y !== null && (c = y !== "false");
|
|
6610
6610
|
const x = new CustomEvent(Jn, {
|
|
6611
6611
|
cancelable: !0,
|
|
6612
6612
|
bubbles: !0,
|
|
@@ -6623,10 +6623,10 @@ class Ci extends zt {
|
|
|
6623
6623
|
super(), this.layer = null;
|
|
6624
6624
|
}
|
|
6625
6625
|
connectedCallback() {
|
|
6626
|
-
const d = wt(Q("url-template"), this), c = Ci.parseTemplateAttributes(d),
|
|
6626
|
+
const d = wt(Q("url-template"), this), c = Ci.parseTemplateAttributes(d), y = {};
|
|
6627
6627
|
for (const p of c) {
|
|
6628
6628
|
const v = this.getAttribute(p);
|
|
6629
|
-
v !== null && (
|
|
6629
|
+
v !== null && (y[p] = v);
|
|
6630
6630
|
}
|
|
6631
6631
|
const x = {};
|
|
6632
6632
|
this.parentElement.tagName.toLowerCase() === "l-pane" && (x.pane = this.parentElement.getAttribute("name"));
|
|
@@ -6634,7 +6634,7 @@ class Ci extends zt {
|
|
|
6634
6634
|
attribution: ut(Q("attribution")),
|
|
6635
6635
|
errorTileUrl: ut(Q("error-tile-url"))
|
|
6636
6636
|
}), h = wt(a, this);
|
|
6637
|
-
this.layer = G.tileLayer(d, { ...
|
|
6637
|
+
this.layer = G.tileLayer(d, { ...y, ...x, ...h });
|
|
6638
6638
|
const l = new CustomEvent(et, {
|
|
6639
6639
|
detail: { name: s, layer: this.layer },
|
|
6640
6640
|
bubbles: !0
|
|
@@ -6647,15 +6647,24 @@ class Ci extends zt {
|
|
|
6647
6647
|
*/
|
|
6648
6648
|
static parseTemplateAttributes(d) {
|
|
6649
6649
|
const c = /{(.*?)}/g;
|
|
6650
|
-
return [...d.matchAll(c)].map((
|
|
6650
|
+
return [...d.matchAll(c)].map((y) => y[1]);
|
|
6651
6651
|
}
|
|
6652
6652
|
}
|
|
6653
6653
|
class Ys extends zt {
|
|
6654
|
+
static get observedAttributes() {
|
|
6655
|
+
return ["options"];
|
|
6656
|
+
}
|
|
6654
6657
|
constructor() {
|
|
6655
6658
|
super(), this.layer = null;
|
|
6656
6659
|
}
|
|
6657
6660
|
connectedCallback() {
|
|
6658
|
-
|
|
6661
|
+
this.initLayer();
|
|
6662
|
+
}
|
|
6663
|
+
attributeChangedCallback(d, c, y) {
|
|
6664
|
+
d === "options" && c !== y && this.isConnected && this.reloadLayer();
|
|
6665
|
+
}
|
|
6666
|
+
initLayer() {
|
|
6667
|
+
const d = wt(Q("url-template"), this), c = this.getAttribute("name"), y = Be({
|
|
6659
6668
|
// Leaflet.tileLayer default options: https://leafletjs.com/reference.html#tilelayer-wms-layers
|
|
6660
6669
|
layers: Q("layers"),
|
|
6661
6670
|
styles: ut(Q("styles")),
|
|
@@ -6666,7 +6675,7 @@ class Ys extends zt {
|
|
|
6666
6675
|
uppercase: ut(Q("uppercase")),
|
|
6667
6676
|
// Inherited option from Layer: https://leafletjs.com/reference.html#tilelayer-wms-attribution
|
|
6668
6677
|
attribution: ut(Q("attribution"))
|
|
6669
|
-
}), x = wt(
|
|
6678
|
+
}), x = wt(y, this), s = this.getAttribute("options"), a = () => {
|
|
6670
6679
|
if (s)
|
|
6671
6680
|
try {
|
|
6672
6681
|
return JSON.parse(s);
|
|
@@ -6690,6 +6699,9 @@ class Ys extends zt {
|
|
|
6690
6699
|
});
|
|
6691
6700
|
this.dispatchEvent(l);
|
|
6692
6701
|
}
|
|
6702
|
+
reloadLayer() {
|
|
6703
|
+
this.layer && this.layer.remove(), this.initLayer();
|
|
6704
|
+
}
|
|
6693
6705
|
}
|
|
6694
6706
|
class to extends HTMLElement {
|
|
6695
6707
|
constructor() {
|
|
@@ -6699,8 +6711,8 @@ class to extends HTMLElement {
|
|
|
6699
6711
|
let d = this.getAttribute("bounds");
|
|
6700
6712
|
d !== null && this.dispatchEvent(this.getEvent(Kn, JSON.parse(d)));
|
|
6701
6713
|
}
|
|
6702
|
-
attributeChangedCallback(d, c,
|
|
6703
|
-
this.dispatchEvent(this.getEvent(Yn, JSON.parse(
|
|
6714
|
+
attributeChangedCallback(d, c, y) {
|
|
6715
|
+
this.dispatchEvent(this.getEvent(Yn, JSON.parse(y)));
|
|
6704
6716
|
}
|
|
6705
6717
|
/**
|
|
6706
6718
|
* @param {LatLngBounds} bounds
|
|
@@ -6731,11 +6743,11 @@ class eo extends zt {
|
|
|
6731
6743
|
console.warn("attribute 'bounds' not set");
|
|
6732
6744
|
return;
|
|
6733
6745
|
}
|
|
6734
|
-
const
|
|
6746
|
+
const y = {
|
|
6735
6747
|
opacity: parseFloat(this.getAttribute("opacity") || "1.0"),
|
|
6736
6748
|
alt: this.getAttribute("alt") || ""
|
|
6737
6749
|
}, x = this.closest("l-pane");
|
|
6738
|
-
x !== null && (
|
|
6750
|
+
x !== null && (y.pane = x.getAttribute("name")), this.layer = G.imageOverlay(d, JSON.parse(c), y), this.dispatchEvent(
|
|
6739
6751
|
new CustomEvent(et, {
|
|
6740
6752
|
cancelable: !0,
|
|
6741
6753
|
bubbles: !0,
|
|
@@ -6745,8 +6757,8 @@ class eo extends zt {
|
|
|
6745
6757
|
})
|
|
6746
6758
|
);
|
|
6747
6759
|
}
|
|
6748
|
-
attributeChangedCallback(d, c,
|
|
6749
|
-
this.layer !== null && (d === "url" ? this.layer.setUrl(
|
|
6760
|
+
attributeChangedCallback(d, c, y) {
|
|
6761
|
+
this.layer !== null && (d === "url" ? this.layer.setUrl(y) : d === "bounds" ? this.layer.setBounds(JSON.parse(y)) : d === "opacity" && this.layer.setOpacity(parseFloat(y)));
|
|
6750
6762
|
}
|
|
6751
6763
|
}
|
|
6752
6764
|
Lt(eo, "observedAttributes", ["url", "bounds", "opacity"]);
|
|
@@ -6755,13 +6767,13 @@ class Xs extends zt {
|
|
|
6755
6767
|
super();
|
|
6756
6768
|
}
|
|
6757
6769
|
connectedCallback() {
|
|
6758
|
-
const d = JSON.parse(this.getAttribute("url")), c = JSON.parse(this.getAttribute("bounds")),
|
|
6770
|
+
const d = JSON.parse(this.getAttribute("url")), c = JSON.parse(this.getAttribute("bounds")), y = {
|
|
6759
6771
|
opacity: parseFloat(this.getAttribute("opacity") || "1.0"),
|
|
6760
6772
|
alt: this.getAttribute("alt") || "",
|
|
6761
6773
|
autoplay: !0,
|
|
6762
6774
|
muted: !0,
|
|
6763
6775
|
playsInline: !0
|
|
6764
|
-
}, x = G.videoOverlay(d, c,
|
|
6776
|
+
}, x = G.videoOverlay(d, c, y);
|
|
6765
6777
|
this.dispatchEvent(
|
|
6766
6778
|
new CustomEvent(et, {
|
|
6767
6779
|
cancelable: !0,
|
|
@@ -6778,8 +6790,8 @@ class $s extends HTMLElement {
|
|
|
6778
6790
|
super(), this.layer = null;
|
|
6779
6791
|
}
|
|
6780
6792
|
connectedCallback() {
|
|
6781
|
-
const d = this.getAttribute("geojson"), c = {},
|
|
6782
|
-
|
|
6793
|
+
const d = this.getAttribute("geojson"), c = {}, y = this.closest("l-pane");
|
|
6794
|
+
y !== null && (c.pane = y.getAttribute("name")), d !== null && (this.layer = G.geoJSON(JSON.parse(d), c), this.dispatchEvent(
|
|
6783
6795
|
new CustomEvent(et, {
|
|
6784
6796
|
bubbles: !0,
|
|
6785
6797
|
cancelable: !0,
|
|
@@ -6823,10 +6835,10 @@ const ue = (g) => g.replace(/-./g, (d) => d[1].toUpperCase()), Qs = (g) => g.spl
|
|
|
6823
6835
|
* @param {string} _
|
|
6824
6836
|
* @param {string} newValue
|
|
6825
6837
|
*/
|
|
6826
|
-
attributeChangedCallback(d, c,
|
|
6838
|
+
attributeChangedCallback(d, c, y) {
|
|
6827
6839
|
if (Ie.observedAttributes.indexOf(d) !== -1 && this.icon !== null) {
|
|
6828
6840
|
let x = {};
|
|
6829
|
-
vi.indexOf(d) !== -1 ? x[ue(d)] =
|
|
6841
|
+
vi.indexOf(d) !== -1 ? x[ue(d)] = y : Wn.indexOf(d) !== -1 ? x[ue(d)] = y.toLowerCase() === "true" : x[ue(d)] = JSON.parse(y), this.icon = G.icon({
|
|
6830
6842
|
...this.icon.options,
|
|
6831
6843
|
...x
|
|
6832
6844
|
});
|
|
@@ -6845,11 +6857,11 @@ const ue = (g) => g.replace(/-./g, (d) => d[1].toUpperCase()), Qs = (g) => g.spl
|
|
|
6845
6857
|
*/
|
|
6846
6858
|
_parseOptions() {
|
|
6847
6859
|
const d = {};
|
|
6848
|
-
vi.forEach((
|
|
6849
|
-
d[ue(
|
|
6850
|
-
}), Un.forEach((
|
|
6851
|
-
d[ue(
|
|
6852
|
-
ut(Q(
|
|
6860
|
+
vi.forEach((y) => {
|
|
6861
|
+
d[ue(y)] = ut(Q(y));
|
|
6862
|
+
}), Un.forEach((y) => {
|
|
6863
|
+
d[ue(y)] = Li(
|
|
6864
|
+
ut(Q(y)),
|
|
6853
6865
|
wi(ze())
|
|
6854
6866
|
);
|
|
6855
6867
|
}), d.crossOrigin = Li(
|
|
@@ -6907,8 +6919,8 @@ class io extends HTMLElement {
|
|
|
6907
6919
|
* @param {string} attName
|
|
6908
6920
|
* @param {string} newValue
|
|
6909
6921
|
*/
|
|
6910
|
-
attributeChangedCallback(d, c,
|
|
6911
|
-
this.tooltip && (d === "content" ? this.tooltip.setContent(
|
|
6922
|
+
attributeChangedCallback(d, c, y) {
|
|
6923
|
+
this.tooltip && (d === "content" ? this.tooltip.setContent(y) : d === "permanent" ? this.tooltip.options.permanent = this.hasAttribute("permanent") : d === "interactive" ? this.tooltip.options.interactive = this.hasAttribute("interactive") : d === "direction" && (this.tooltip.options.direction = y));
|
|
6912
6924
|
}
|
|
6913
6925
|
}
|
|
6914
6926
|
Lt(io, "observedAttributes", ["content", "permanent", "interactive", "direction"]);
|
|
@@ -6993,60 +7005,60 @@ const Ti = (g) => {
|
|
|
6993
7005
|
}, nr = (g) => {
|
|
6994
7006
|
let d = g, c = [g];
|
|
6995
7007
|
for (; Vn[d].length > 0; ) {
|
|
6996
|
-
let
|
|
6997
|
-
c.push(
|
|
7008
|
+
let y = Vn[d][0];
|
|
7009
|
+
c.push(y), d = y;
|
|
6998
7010
|
}
|
|
6999
7011
|
return c;
|
|
7000
|
-
}, or = (g, d, c,
|
|
7012
|
+
}, or = (g, d, c, y) => {
|
|
7001
7013
|
let s = [
|
|
7002
7014
|
...Ti(d),
|
|
7003
7015
|
...Ze(d)
|
|
7004
7016
|
].find((l) => l.kebab === c);
|
|
7005
7017
|
if (typeof s > "u")
|
|
7006
7018
|
return;
|
|
7007
|
-
const a = s.parser(
|
|
7019
|
+
const a = s.parser(y);
|
|
7008
7020
|
if (g instanceof G.Circle)
|
|
7009
7021
|
switch (c) {
|
|
7010
7022
|
case "lat-lng":
|
|
7011
|
-
g.setLatLng(JSON.parse(
|
|
7023
|
+
g.setLatLng(JSON.parse(y));
|
|
7012
7024
|
break;
|
|
7013
7025
|
case "radius":
|
|
7014
|
-
g.setRadius(parseFloat(
|
|
7026
|
+
g.setRadius(parseFloat(y));
|
|
7015
7027
|
break;
|
|
7016
7028
|
}
|
|
7017
7029
|
else if (g instanceof G.Rectangle)
|
|
7018
7030
|
switch (c) {
|
|
7019
7031
|
case "lat-lngs":
|
|
7020
|
-
g.setLatLngs(JSON.parse(
|
|
7032
|
+
g.setLatLngs(JSON.parse(y));
|
|
7021
7033
|
break;
|
|
7022
7034
|
case "lat-lng-bounds":
|
|
7023
|
-
g.setBounds(JSON.parse(
|
|
7035
|
+
g.setBounds(JSON.parse(y));
|
|
7024
7036
|
break;
|
|
7025
7037
|
}
|
|
7026
7038
|
else if (g instanceof G.Polygon)
|
|
7027
7039
|
switch (c) {
|
|
7028
7040
|
case "lat-lngs":
|
|
7029
|
-
g.setLatLngs(JSON.parse(
|
|
7041
|
+
g.setLatLngs(JSON.parse(y));
|
|
7030
7042
|
break;
|
|
7031
7043
|
}
|
|
7032
7044
|
else if (g instanceof G.Polyline)
|
|
7033
7045
|
switch (c) {
|
|
7034
7046
|
case "lat-lngs":
|
|
7035
|
-
g.setLatLngs(JSON.parse(
|
|
7047
|
+
g.setLatLngs(JSON.parse(y));
|
|
7036
7048
|
break;
|
|
7037
7049
|
}
|
|
7038
7050
|
let h = Ze("polyline").find((l) => l.kebab === c);
|
|
7039
7051
|
typeof h < "u" && g.setStyle({ [h.camel]: a });
|
|
7040
7052
|
}, sr = (g) => {
|
|
7041
|
-
let d = Ti(g).map((
|
|
7053
|
+
let d = Ti(g).map((y) => y.kebab), c = Ze(g).map((y) => y.kebab);
|
|
7042
7054
|
return [...d, ...c];
|
|
7043
7055
|
}, rr = (g, d) => {
|
|
7044
7056
|
let c = {};
|
|
7045
|
-
return Ze(d).forEach((
|
|
7046
|
-
g.hasAttribute(
|
|
7057
|
+
return Ze(d).forEach((y) => {
|
|
7058
|
+
g.hasAttribute(y.kebab) && (c[y.camel] = y.parser(g.getAttribute(y.kebab)));
|
|
7047
7059
|
}), c;
|
|
7048
7060
|
}, ar = (g, d) => Ti(d).map((c) => {
|
|
7049
|
-
const
|
|
7061
|
+
const y = Q(c.kebab), x = wt(y, g);
|
|
7050
7062
|
return c.parser(x);
|
|
7051
7063
|
}), ke = (g, d) => {
|
|
7052
7064
|
class c extends HTMLElement {
|
|
@@ -7079,10 +7091,10 @@ const Ti = (g) => {
|
|
|
7079
7091
|
};
|
|
7080
7092
|
var qn = { exports: {} };
|
|
7081
7093
|
(function(g, d) {
|
|
7082
|
-
(function(c,
|
|
7083
|
-
|
|
7094
|
+
(function(c, y) {
|
|
7095
|
+
y(d);
|
|
7084
7096
|
})(jn, function(c) {
|
|
7085
|
-
var
|
|
7097
|
+
var y = L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|
7086
7098
|
options: {
|
|
7087
7099
|
maxClusterRadius: 80,
|
|
7088
7100
|
//A cluster will cover at most this many pixels from its center
|
|
@@ -7153,17 +7165,17 @@ var qn = { exports: {} };
|
|
|
7153
7165
|
addLayers: function(s, a) {
|
|
7154
7166
|
if (!L.Util.isArray(s))
|
|
7155
7167
|
return this.addLayer(s);
|
|
7156
|
-
var h = this._featureGroup, l = this._nonPointGroup, p = this.options.chunkedLoading, v = this.options.chunkInterval, _ = this.options.chunkProgress, b = s.length,
|
|
7168
|
+
var h = this._featureGroup, l = this._nonPointGroup, p = this.options.chunkedLoading, v = this.options.chunkInterval, _ = this.options.chunkProgress, b = s.length, w = 0, M = !0, C;
|
|
7157
7169
|
if (this._map) {
|
|
7158
7170
|
var H = (/* @__PURE__ */ new Date()).getTime(), Z = L.bind(function() {
|
|
7159
7171
|
var W = (/* @__PURE__ */ new Date()).getTime();
|
|
7160
|
-
for (this._map && this._unspiderfy && this._unspiderfy();
|
|
7161
|
-
if (p &&
|
|
7172
|
+
for (this._map && this._unspiderfy && this._unspiderfy(); w < b; w++) {
|
|
7173
|
+
if (p && w % 200 === 0) {
|
|
7162
7174
|
var bt = (/* @__PURE__ */ new Date()).getTime() - W;
|
|
7163
7175
|
if (bt > v)
|
|
7164
7176
|
break;
|
|
7165
7177
|
}
|
|
7166
|
-
if (C = s[
|
|
7178
|
+
if (C = s[w], C instanceof L.LayerGroup) {
|
|
7167
7179
|
M && (s = s.slice(), M = !1), this._extractNonGroupLayers(C, s), b = s.length;
|
|
7168
7180
|
continue;
|
|
7169
7181
|
}
|
|
@@ -7176,12 +7188,12 @@ var qn = { exports: {} };
|
|
|
7176
7188
|
h.removeLayer(jt);
|
|
7177
7189
|
}
|
|
7178
7190
|
}
|
|
7179
|
-
_ && _(
|
|
7191
|
+
_ && _(w, b, (/* @__PURE__ */ new Date()).getTime() - H), w === b ? (this._topClusterLevel._recalculateBounds(), this._refreshClustersIcons(), this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds)) : setTimeout(Z, this.options.chunkDelay);
|
|
7180
7192
|
}, this);
|
|
7181
7193
|
Z();
|
|
7182
7194
|
} else
|
|
7183
|
-
for (var U = this._needsClustering;
|
|
7184
|
-
if (C = s[
|
|
7195
|
+
for (var U = this._needsClustering; w < b; w++) {
|
|
7196
|
+
if (C = s[w], C instanceof L.LayerGroup) {
|
|
7185
7197
|
M && (s = s.slice(), M = !1), this._extractNonGroupLayers(C, s), b = s.length;
|
|
7186
7198
|
continue;
|
|
7187
7199
|
}
|
|
@@ -7208,10 +7220,10 @@ var qn = { exports: {} };
|
|
|
7208
7220
|
}
|
|
7209
7221
|
if (this._unspiderfy) {
|
|
7210
7222
|
this._unspiderfy();
|
|
7211
|
-
var b = s.slice(),
|
|
7212
|
-
for (a = 0; a <
|
|
7223
|
+
var b = s.slice(), w = l;
|
|
7224
|
+
for (a = 0; a < w; a++) {
|
|
7213
7225
|
if (h = b[a], h instanceof L.LayerGroup) {
|
|
7214
|
-
this._extractNonGroupLayers(h, b),
|
|
7226
|
+
this._extractNonGroupLayers(h, b), w = b.length;
|
|
7215
7227
|
continue;
|
|
7216
7228
|
}
|
|
7217
7229
|
this._unspiderfyLayer(h);
|
|
@@ -7352,9 +7364,9 @@ var qn = { exports: {} };
|
|
|
7352
7364
|
_removeLayer: function(s, a, h) {
|
|
7353
7365
|
var l = this._gridClusters, p = this._gridUnclustered, v = this._featureGroup, _ = this._map, b = Math.floor(this._map.getMinZoom());
|
|
7354
7366
|
a && this._removeFromGridUnclustered(s, this._maxZoom);
|
|
7355
|
-
var
|
|
7356
|
-
for (this._arraySplice(M, s);
|
|
7357
|
-
a &&
|
|
7367
|
+
var w = s.__parent, M = w._markers, C;
|
|
7368
|
+
for (this._arraySplice(M, s); w && (w._childCount--, w._boundsNeedUpdate = !0, !(w._zoom < b)); )
|
|
7369
|
+
a && w._childCount <= 1 ? (C = w._markers[0] === s ? w._markers[1] : w._markers[0], l[w._zoom].removeObject(w, _.project(w._cLatLng, w._zoom)), p[w._zoom].addObject(C, _.project(C.getLatLng(), w._zoom)), this._arraySplice(w.__parent._childClusters, w), w.__parent._markers.push(C), C.__parent = w.__parent, w._icon && (v.removeLayer(w), h || v.addLayer(C))) : w._iconNeedsUpdate = !0, w = w.__parent;
|
|
7358
7370
|
delete s.__parent;
|
|
7359
7371
|
},
|
|
7360
7372
|
_isOrIsParent: function(s, a) {
|
|
@@ -7435,14 +7447,14 @@ var qn = { exports: {} };
|
|
|
7435
7447
|
return;
|
|
7436
7448
|
}
|
|
7437
7449
|
if (b = l[a].getNearObject(v), b) {
|
|
7438
|
-
var
|
|
7439
|
-
|
|
7450
|
+
var w = b.__parent;
|
|
7451
|
+
w && this._removeLayer(b, !1);
|
|
7440
7452
|
var M = new this._markerCluster(this, a, b, s);
|
|
7441
7453
|
h[a].addObject(M, this._map.project(M._cLatLng, a)), b.__parent = M, s.__parent = M;
|
|
7442
7454
|
var C = M;
|
|
7443
|
-
for (_ = a - 1; _ >
|
|
7455
|
+
for (_ = a - 1; _ > w._zoom; _--)
|
|
7444
7456
|
C = new this._markerCluster(this, _, C), h[_].addObject(C, this._map.project(b.getLatLng(), _));
|
|
7445
|
-
|
|
7457
|
+
w._addChild(C), this._removeFromGridUnclustered(b, a);
|
|
7446
7458
|
return;
|
|
7447
7459
|
}
|
|
7448
7460
|
l[a].addObject(s, v);
|
|
@@ -7567,9 +7579,9 @@ var qn = { exports: {} };
|
|
|
7567
7579
|
_animationZoomIn: function(s, a) {
|
|
7568
7580
|
var h = this._getExpandedVisibleBounds(), l = this._featureGroup, p = Math.floor(this._map.getMinZoom()), v;
|
|
7569
7581
|
this._ignoreMove = !0, this._topClusterLevel._recursively(h, s, p, function(_) {
|
|
7570
|
-
var b = _._latlng,
|
|
7571
|
-
for (h.contains(b) || (b = null), _._isSingleParent() && s + 1 === a ? (l.removeLayer(_), _._recursivelyAddChildrenToMap(null, a, h)) : (_.clusterHide(), _._recursivelyAddChildrenToMap(b, a, h)), v =
|
|
7572
|
-
M =
|
|
7582
|
+
var b = _._latlng, w = _._markers, M;
|
|
7583
|
+
for (h.contains(b) || (b = null), _._isSingleParent() && s + 1 === a ? (l.removeLayer(_), _._recursivelyAddChildrenToMap(null, a, h)) : (_.clusterHide(), _._recursivelyAddChildrenToMap(b, a, h)), v = w.length - 1; v >= 0; v--)
|
|
7584
|
+
M = w[v], h.contains(M._latlng) || l.removeLayer(M);
|
|
7573
7585
|
}), this._forceLayout(), this._topClusterLevel._recursivelyBecomeVisible(h, a), l.eachLayer(function(_) {
|
|
7574
7586
|
!(_ instanceof L.MarkerCluster) && _._icon && _.clusterShow();
|
|
7575
7587
|
}), this._topClusterLevel._recursively(h, s, a, function(_) {
|
|
@@ -7686,12 +7698,12 @@ var qn = { exports: {} };
|
|
|
7686
7698
|
s._southWest && (s._southWest.lat = 1 / 0, s._southWest.lng = 1 / 0), s._northEast && (s._northEast.lat = -1 / 0, s._northEast.lng = -1 / 0);
|
|
7687
7699
|
},
|
|
7688
7700
|
_recalculateBounds: function() {
|
|
7689
|
-
var s = this._markers, a = this._childClusters, h = 0, l = 0, p = this._childCount, v, _, b,
|
|
7701
|
+
var s = this._markers, a = this._childClusters, h = 0, l = 0, p = this._childCount, v, _, b, w;
|
|
7690
7702
|
if (p !== 0) {
|
|
7691
7703
|
for (this._resetBounds(), v = 0; v < s.length; v++)
|
|
7692
7704
|
b = s[v]._latlng, this._bounds.extend(b), h += b.lat, l += b.lng;
|
|
7693
7705
|
for (v = 0; v < a.length; v++)
|
|
7694
|
-
_ = a[v], _._boundsNeedUpdate && _._recalculateBounds(), this._bounds.extend(_._bounds), b = _._wLatLng,
|
|
7706
|
+
_ = a[v], _._boundsNeedUpdate && _._recalculateBounds(), this._bounds.extend(_._bounds), b = _._wLatLng, w = _._childCount, h += b.lat * w, l += b.lng * w;
|
|
7695
7707
|
this._latlng = this._wLatLng = new L.LatLng(h / p, l / p), this._boundsNeedUpdate = !1;
|
|
7696
7708
|
}
|
|
7697
7709
|
},
|
|
@@ -7787,10 +7799,10 @@ var qn = { exports: {} };
|
|
|
7787
7799
|
// runAtEveryLevel: function that takes an L.MarkerCluster as an argument that should be applied on every level
|
|
7788
7800
|
// runAtBottomLevel: function that takes an L.MarkerCluster as an argument that should be applied at only the bottom level
|
|
7789
7801
|
_recursively: function(s, a, h, l, p) {
|
|
7790
|
-
var v = this._childClusters, _ = this._zoom, b,
|
|
7802
|
+
var v = this._childClusters, _ = this._zoom, b, w;
|
|
7791
7803
|
if (a <= _ && (l && l(this), p && _ === h && p(this)), _ < a || _ < h)
|
|
7792
7804
|
for (b = v.length - 1; b >= 0; b--)
|
|
7793
|
-
|
|
7805
|
+
w = v[b], w._boundsNeedUpdate && w._recalculateBounds(), s.intersects(w._bounds) && w._recursively(s, a, h, l, p);
|
|
7794
7806
|
},
|
|
7795
7807
|
//Returns true if we are the parent of only one cluster and that cluster is the same as us
|
|
7796
7808
|
_isSingleParent: function() {
|
|
@@ -7817,27 +7829,27 @@ var qn = { exports: {} };
|
|
|
7817
7829
|
},
|
|
7818
7830
|
//Returns true if the object was found
|
|
7819
7831
|
removeObject: function(s, a) {
|
|
7820
|
-
var h = this._getCoord(a.x), l = this._getCoord(a.y), p = this._grid, v = p[l] = p[l] || {}, _ = v[h] = v[h] || [], b,
|
|
7821
|
-
for (delete this._objectPoint[L.Util.stamp(s)], b = 0,
|
|
7832
|
+
var h = this._getCoord(a.x), l = this._getCoord(a.y), p = this._grid, v = p[l] = p[l] || {}, _ = v[h] = v[h] || [], b, w;
|
|
7833
|
+
for (delete this._objectPoint[L.Util.stamp(s)], b = 0, w = _.length; b < w; b++)
|
|
7822
7834
|
if (_[b] === s)
|
|
7823
|
-
return _.splice(b, 1),
|
|
7835
|
+
return _.splice(b, 1), w === 1 && delete v[h], !0;
|
|
7824
7836
|
},
|
|
7825
7837
|
eachObject: function(s, a) {
|
|
7826
|
-
var h, l, p, v, _, b,
|
|
7838
|
+
var h, l, p, v, _, b, w, M = this._grid;
|
|
7827
7839
|
for (h in M) {
|
|
7828
7840
|
_ = M[h];
|
|
7829
7841
|
for (l in _)
|
|
7830
7842
|
for (b = _[l], p = 0, v = b.length; p < v; p++)
|
|
7831
|
-
|
|
7843
|
+
w = s.call(a, b[p]), w && (p--, v--);
|
|
7832
7844
|
}
|
|
7833
7845
|
},
|
|
7834
7846
|
getNearObject: function(s) {
|
|
7835
|
-
var a = this._getCoord(s.x), h = this._getCoord(s.y), l, p, v, _, b,
|
|
7847
|
+
var a = this._getCoord(s.x), h = this._getCoord(s.y), l, p, v, _, b, w, M, C, H = this._objectPoint, Z = this._sqCellSize, U = null;
|
|
7836
7848
|
for (l = h - 1; l <= h + 1; l++)
|
|
7837
7849
|
if (_ = this._grid[l], _) {
|
|
7838
7850
|
for (p = a - 1; p <= a + 1; p++)
|
|
7839
7851
|
if (b = _[p], b)
|
|
7840
|
-
for (v = 0,
|
|
7852
|
+
for (v = 0, w = b.length; v < w; v++)
|
|
7841
7853
|
M = b[v], C = this._sqDist(H[L.Util.stamp(M)], s), (C < Z || C <= Z && U === null) && (Z = C, U = M);
|
|
7842
7854
|
}
|
|
7843
7855
|
return U;
|
|
@@ -7903,12 +7915,12 @@ var qn = { exports: {} };
|
|
|
7903
7915
|
* @returns {Array}
|
|
7904
7916
|
*/
|
|
7905
7917
|
getConvexHull: function(s) {
|
|
7906
|
-
var a = !1, h = !1, l = !1, p = !1, v = null, _ = null, b = null,
|
|
7918
|
+
var a = !1, h = !1, l = !1, p = !1, v = null, _ = null, b = null, w = null, M = null, C = null, H;
|
|
7907
7919
|
for (H = s.length - 1; H >= 0; H--) {
|
|
7908
7920
|
var Z = s[H];
|
|
7909
|
-
(a === !1 || Z.lat > a) && (v = Z, a = Z.lat), (h === !1 || Z.lat < h) && (_ = Z, h = Z.lat), (l === !1 || Z.lng > l) && (b = Z, l = Z.lng), (p === !1 || Z.lng < p) && (
|
|
7921
|
+
(a === !1 || Z.lat > a) && (v = Z, a = Z.lat), (h === !1 || Z.lat < h) && (_ = Z, h = Z.lat), (l === !1 || Z.lng > l) && (b = Z, l = Z.lng), (p === !1 || Z.lng < p) && (w = Z, p = Z.lng);
|
|
7910
7922
|
}
|
|
7911
|
-
h !== a ? (C = _, M = v) : (C =
|
|
7923
|
+
h !== a ? (C = _, M = v) : (C = w, M = b);
|
|
7912
7924
|
var U = [].concat(
|
|
7913
7925
|
this.buildConvexHull([C, M], s),
|
|
7914
7926
|
this.buildConvexHull([M, C], s)
|
|
@@ -7951,9 +7963,9 @@ var qn = { exports: {} };
|
|
|
7951
7963
|
return v;
|
|
7952
7964
|
},
|
|
7953
7965
|
_generatePointsSpiral: function(s, a) {
|
|
7954
|
-
var h = this._group.options.spiderfyDistanceMultiplier, l = h * this._spiralLengthStart, p = h * this._spiralFootSeparation, v = h * this._spiralLengthFactor * this._2PI, _ = 0, b = [],
|
|
7955
|
-
for (b.length = s,
|
|
7956
|
-
|
|
7966
|
+
var h = this._group.options.spiderfyDistanceMultiplier, l = h * this._spiralLengthStart, p = h * this._spiralFootSeparation, v = h * this._spiralLengthFactor * this._2PI, _ = 0, b = [], w;
|
|
7967
|
+
for (b.length = s, w = s; w >= 0; w--)
|
|
7968
|
+
w < s && (b[w] = new L.Point(a.x + l * Math.cos(_), a.y + l * Math.sin(_))._round()), _ += p / l + w * 5e-4, l += v / _;
|
|
7957
7969
|
return b;
|
|
7958
7970
|
},
|
|
7959
7971
|
_noanimationUnspiderfy: function() {
|
|
@@ -7967,9 +7979,9 @@ var qn = { exports: {} };
|
|
|
7967
7979
|
}
|
|
7968
7980
|
}), L.MarkerClusterNonAnimated = L.MarkerCluster.extend({
|
|
7969
7981
|
_animationSpiderfy: function(s, a) {
|
|
7970
|
-
var h = this._group, l = h._map, p = h._featureGroup, v = this._group.options.spiderLegPolylineOptions, _, b,
|
|
7982
|
+
var h = this._group, l = h._map, p = h._featureGroup, v = this._group.options.spiderLegPolylineOptions, _, b, w, M;
|
|
7971
7983
|
for (h._ignoreMove = !0, _ = 0; _ < s.length; _++)
|
|
7972
|
-
M = l.layerPointToLatLng(a[_]), b = s[_],
|
|
7984
|
+
M = l.layerPointToLatLng(a[_]), b = s[_], w = new L.Polyline([this._latlng, M], v), l.addLayer(w), b._spiderLeg = w, b._preSpiderfyLatlng = b._latlng, b.setLatLng(M), b.setZIndexOffset && b.setZIndexOffset(1e6), p.addLayer(b);
|
|
7973
7985
|
this.setOpacity(0.3), h._ignoreMove = !1, h.fire("spiderfied", {
|
|
7974
7986
|
cluster: this,
|
|
7975
7987
|
markers: s
|
|
@@ -7980,11 +7992,11 @@ var qn = { exports: {} };
|
|
|
7980
7992
|
}
|
|
7981
7993
|
}), L.MarkerCluster.include({
|
|
7982
7994
|
_animationSpiderfy: function(s, a) {
|
|
7983
|
-
var h = this, l = this._group, p = l._map, v = l._featureGroup, _ = this._latlng, b = p.latLngToLayerPoint(_),
|
|
7984
|
-
for (C === void 0 && (C = L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),
|
|
7985
|
-
Z = s[H], at = p.layerPointToLatLng(a[H]), U = new L.Polyline([_, at], M), p.addLayer(U), Z._spiderLeg = U,
|
|
7995
|
+
var h = this, l = this._group, p = l._map, v = l._featureGroup, _ = this._latlng, b = p.latLngToLayerPoint(_), w = L.Path.SVG, M = L.extend({}, this._group.options.spiderLegPolylineOptions), C = M.opacity, H, Z, U, W, bt, at;
|
|
7996
|
+
for (C === void 0 && (C = L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity), w ? (M.opacity = 0, M.className = (M.className || "") + " leaflet-cluster-spider-leg") : M.opacity = C, l._ignoreMove = !0, H = 0; H < s.length; H++)
|
|
7997
|
+
Z = s[H], at = p.layerPointToLatLng(a[H]), U = new L.Polyline([_, at], M), p.addLayer(U), Z._spiderLeg = U, w && (W = U._path, bt = W.getTotalLength() + 0.1, W.style.strokeDasharray = bt, W.style.strokeDashoffset = bt), Z.setZIndexOffset && Z.setZIndexOffset(1e6), Z.clusterHide && Z.clusterHide(), v.addLayer(Z), Z._setPos && Z._setPos(b);
|
|
7986
7998
|
for (l._forceLayout(), l._animationStart(), H = s.length - 1; H >= 0; H--)
|
|
7987
|
-
at = p.layerPointToLatLng(a[H]), Z = s[H], Z._preSpiderfyLatlng = Z._latlng, Z.setLatLng(at), Z.clusterShow && Z.clusterShow(),
|
|
7999
|
+
at = p.layerPointToLatLng(a[H]), Z = s[H], Z._preSpiderfyLatlng = Z._latlng, Z.setLatLng(at), Z.clusterShow && Z.clusterShow(), w && (U = Z._spiderLeg, W = U._path, W.style.strokeDashoffset = 0, U.setStyle({ opacity: C }));
|
|
7988
8000
|
this.setOpacity(0.3), l._ignoreMove = !1, setTimeout(function() {
|
|
7989
8001
|
l._animationEnd(), l.fire("spiderfied", {
|
|
7990
8002
|
cluster: h,
|
|
@@ -7993,15 +8005,15 @@ var qn = { exports: {} };
|
|
|
7993
8005
|
}, 200);
|
|
7994
8006
|
},
|
|
7995
8007
|
_animationUnspiderfy: function(s) {
|
|
7996
|
-
var a = this, h = this._group, l = h._map, p = h._featureGroup, v = s ? l._latLngToNewLayerPoint(this._latlng, s.zoom, s.center) : l.latLngToLayerPoint(this._latlng), _ = this.getAllChildMarkers(null, !0), b = L.Path.SVG,
|
|
8008
|
+
var a = this, h = this._group, l = h._map, p = h._featureGroup, v = s ? l._latLngToNewLayerPoint(this._latlng, s.zoom, s.center) : l.latLngToLayerPoint(this._latlng), _ = this.getAllChildMarkers(null, !0), b = L.Path.SVG, w, M, C, H, Z, U;
|
|
7997
8009
|
for (h._ignoreMove = !0, h._animationStart(), this.setOpacity(1), M = _.length - 1; M >= 0; M--)
|
|
7998
|
-
|
|
8010
|
+
w = _[M], w._preSpiderfyLatlng && (w.closePopup(), w.setLatLng(w._preSpiderfyLatlng), delete w._preSpiderfyLatlng, U = !0, w._setPos && (w._setPos(v), U = !1), w.clusterHide && (w.clusterHide(), U = !1), U && p.removeLayer(w), b && (C = w._spiderLeg, H = C._path, Z = H.getTotalLength() + 0.1, H.style.strokeDashoffset = Z, C.setStyle({ opacity: 0 })));
|
|
7999
8011
|
h._ignoreMove = !1, setTimeout(function() {
|
|
8000
8012
|
var W = 0;
|
|
8001
8013
|
for (M = _.length - 1; M >= 0; M--)
|
|
8002
|
-
|
|
8014
|
+
w = _[M], w._spiderLeg && W++;
|
|
8003
8015
|
for (M = _.length - 1; M >= 0; M--)
|
|
8004
|
-
|
|
8016
|
+
w = _[M], w._spiderLeg && (w.clusterShow && w.clusterShow(), w.setZIndexOffset && w.setZIndexOffset(0), W > 1 && p.removeLayer(w), l.removeLayer(w._spiderLeg), delete w._spiderLeg);
|
|
8005
8017
|
h._animationEnd(), h.fire("unspiderfied", {
|
|
8006
8018
|
cluster: a,
|
|
8007
8019
|
markers: _
|
|
@@ -8087,7 +8099,7 @@ var qn = { exports: {} };
|
|
|
8087
8099
|
var h = this.options.icon;
|
|
8088
8100
|
return L.setOptions(h, s), this.setIcon(h), a && this.__parent && this.__parent._group.refreshClusters(this), this;
|
|
8089
8101
|
}
|
|
8090
|
-
}), c.MarkerClusterGroup =
|
|
8102
|
+
}), c.MarkerClusterGroup = y, c.MarkerCluster = x, Object.defineProperty(c, "__esModule", { value: !0 });
|
|
8091
8103
|
});
|
|
8092
8104
|
})(qn, qn.exports);
|
|
8093
8105
|
class no extends zt {
|
|
@@ -8100,7 +8112,7 @@ class no extends zt {
|
|
|
8100
8112
|
showCoverageOnHover: this.hasAttribute("show-coverage-on-hover"),
|
|
8101
8113
|
iconCreateFunction: this._createIconCreateFunction(c)
|
|
8102
8114
|
});
|
|
8103
|
-
const
|
|
8115
|
+
const y = new CustomEvent(et, {
|
|
8104
8116
|
cancelable: !0,
|
|
8105
8117
|
bubbles: !0,
|
|
8106
8118
|
detail: {
|
|
@@ -8108,15 +8120,15 @@ class no extends zt {
|
|
|
8108
8120
|
name: d
|
|
8109
8121
|
}
|
|
8110
8122
|
});
|
|
8111
|
-
this.dispatchEvent(
|
|
8123
|
+
this.dispatchEvent(y), this.addEventListener(et, (x) => {
|
|
8112
8124
|
x.stopPropagation(), this.layer.addLayer(x.detail.layer);
|
|
8113
8125
|
});
|
|
8114
8126
|
}
|
|
8115
8127
|
_createIconCreateFunction(d) {
|
|
8116
8128
|
if (d) {
|
|
8117
|
-
let { size: c, content:
|
|
8129
|
+
let { size: c, content: y, className: x } = JSON.parse(d);
|
|
8118
8130
|
return (s) => {
|
|
8119
|
-
const a = this._callClusterFunction(s, c), h = this._callClusterFunction(s,
|
|
8131
|
+
const a = this._callClusterFunction(s, c), h = this._callClusterFunction(s, y);
|
|
8120
8132
|
return L.divIcon({
|
|
8121
8133
|
html: h,
|
|
8122
8134
|
className: x,
|