@eox/drawtools 0.13.5 → 0.14.1-dev.1740731700.0
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/eox-drawtools.js +334 -323
- package/dist/eox-drawtools.umd.cjs +25 -21
- package/package.json +4 -4
- package/src/components/list.js +18 -2
- package/src/enums/draw.js +4 -1
- package/src/main.js +11 -2
- package/src/methods/draw/create-select-handler.js +4 -4
- package/src/methods/draw/emit-drawn-features.js +9 -2
- package/src/methods/draw/on-draw-end.js +12 -6
- package/src/methods/list/select-deselect-feature.js +8 -3
- package/types/drawtools/src/components/list.d.ts +17 -0
- package/types/drawtools/src/components/list.d.ts.map +1 -1
- package/types/drawtools/src/enums/draw.d.ts +1 -0
- package/types/drawtools/src/main.d.ts +10 -1
- package/types/drawtools/src/main.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/create-select-handler.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts +2 -1
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts +2 -1
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +1 -1
- package/types/drawtools/src/methods/list/select-deselect-feature.d.ts.map +1 -1
package/dist/eox-drawtools.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var vn = Object.defineProperty;
|
|
2
|
+
var Ue = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var R = (n, t, e) =>
|
|
7
|
-
var M = (n, t, e) => (Xe(n, t, "read from private field"), e ? e.call(n) : t.get(n)), F = (n, t, e) => t.has(n) ?
|
|
5
|
+
var Cn = (n, t, e) => t in n ? vn(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
6
|
+
var R = (n, t, e) => Cn(n, typeof t != "symbol" ? t + "" : t, e), Xe = (n, t, e) => t.has(n) || Ue("Cannot " + e);
|
|
7
|
+
var M = (n, t, e) => (Xe(n, t, "read from private field"), e ? e.call(n) : t.get(n)), F = (n, t, e) => t.has(n) ? Ue("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), $ = (n, t, e, i) => (Xe(n, t, "write to private field"), i ? i.call(n, e) : t.set(n, e), e);
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2019 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
14
|
-
let
|
|
13
|
+
const Lt = globalThis, fe = Lt.ShadowRoot && (Lt.ShadyCSS === void 0 || Lt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, bi = Symbol(), Ye = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
let wn = class {
|
|
15
15
|
constructor(t, e, i) {
|
|
16
16
|
if (this._$cssResult$ = !0, i !== bi) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
17
17
|
this.cssText = t, this.t = e;
|
|
@@ -29,26 +29,26 @@ let Cn = class {
|
|
|
29
29
|
return this.cssText;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const
|
|
32
|
+
const bn = (n) => new wn(typeof n == "string" ? n : n + "", void 0, bi), En = (n, t) => {
|
|
33
33
|
if (fe) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const i = document.createElement("style"), r =
|
|
35
|
+
const i = document.createElement("style"), r = Lt.litNonce;
|
|
36
36
|
r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, n.appendChild(i);
|
|
37
37
|
}
|
|
38
38
|
}, Be = fe ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const i of t.cssRules) e += i.cssText;
|
|
41
|
-
return
|
|
41
|
+
return bn(e);
|
|
42
42
|
})(n) : n;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: xn, defineProperty: Pn, getOwnPropertyDescriptor: Mn, getOwnPropertyNames: Sn, getOwnPropertySymbols: $n, getPrototypeOf: An } = Object, I = globalThis, Ve = I.trustedTypes, Fn = Ve ? Ve.emptyScript : "", Dt = I.reactiveElementPolyfillSupport, dt = (n, t) => n, se = { toAttribute(n, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
n = n ?
|
|
51
|
+
n = n ? Fn : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,8 +73,8 @@ const { is: En, defineProperty: xn, getOwnPropertyDescriptor: Pn, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} }, Ei = (n, t) => !
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
76
|
+
} }, Ei = (n, t) => !xn(n, t), ze = { attribute: !0, type: String, converter: se, reflect: !1, hasChanged: Ei };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), I.litPropertyMetadata ?? (I.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
class tt extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
@@ -85,11 +85,11 @@ class tt extends HTMLElement {
|
|
|
85
85
|
static createProperty(t, e = ze) {
|
|
86
86
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
87
|
const i = Symbol(), r = this.getPropertyDescriptor(t, i, e);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && Pn(this.prototype, t, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, i) {
|
|
92
|
-
const { get: r, set: s } =
|
|
92
|
+
const { get: r, set: s } = Mn(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
94
|
}, set(o) {
|
|
95
95
|
this[e] = o;
|
|
@@ -106,13 +106,13 @@ class tt extends HTMLElement {
|
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
108
|
if (this.hasOwnProperty(dt("elementProperties"))) return;
|
|
109
|
-
const t =
|
|
109
|
+
const t = An(this);
|
|
110
110
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
111
111
|
}
|
|
112
112
|
static finalize() {
|
|
113
113
|
if (this.hasOwnProperty(dt("finalized"))) return;
|
|
114
114
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(dt("properties"))) {
|
|
115
|
-
const e = this.properties, i = [...
|
|
115
|
+
const e = this.properties, i = [...Sn(e), ...$n(e)];
|
|
116
116
|
for (const r of i) this.createProperty(r, e[r]);
|
|
117
117
|
}
|
|
118
118
|
const t = this[Symbol.metadata];
|
|
@@ -161,7 +161,7 @@ class tt extends HTMLElement {
|
|
|
161
161
|
}
|
|
162
162
|
createRenderRoot() {
|
|
163
163
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
164
|
+
return En(t, this.constructor.elementStyles), t;
|
|
165
165
|
}
|
|
166
166
|
connectedCallback() {
|
|
167
167
|
var t;
|
|
@@ -273,20 +273,20 @@ class tt extends HTMLElement {
|
|
|
273
273
|
firstUpdated(t) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
tt.elementStyles = [], tt.shadowRootOptions = { mode: "open" }, tt[dt("elementProperties")] = /* @__PURE__ */ new Map(), tt[dt("finalized")] = /* @__PURE__ */ new Map(), Dt == null || Dt({ ReactiveElement: tt }), (
|
|
276
|
+
tt.elementStyles = [], tt.shadowRootOptions = { mode: "open" }, tt[dt("elementProperties")] = /* @__PURE__ */ new Map(), tt[dt("finalized")] = /* @__PURE__ */ new Map(), Dt == null || Dt({ ReactiveElement: tt }), (I.reactiveElementVersions ?? (I.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const gt = globalThis, Tt = gt.trustedTypes, Je = Tt ? Tt.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, xi = "$lit$", G = `lit$${Math.random().toFixed(9).slice(2)}$`, Pi = "?" + G,
|
|
282
|
+
const gt = globalThis, Tt = gt.trustedTypes, Je = Tt ? Tt.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, xi = "$lit$", G = `lit$${Math.random().toFixed(9).slice(2)}$`, Pi = "?" + G, Gn = `<${Pi}>`, Y = document, ft = () => Y.createComment(""), pt = (n) => n === null || typeof n != "object" && typeof n != "function", pe = Array.isArray, In = (n) => pe(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Qt = `[
|
|
283
283
|
\f\r]`, ut = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, We = /-->/g, qe = />/g, T = RegExp(`>|${Qt}(?:([^\\s"'>=/]+)(${Qt}*=${Qt}*(?:[^
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ze = /'/g, Ke = /"/g, Mi = /^(?:script|style|textarea|title)$/i, Ln = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }),
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ze = /'/g, Ke = /"/g, Mi = /^(?:script|style|textarea|title)$/i, Ln = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), H = Ln(1), ot = Symbol.for("lit-noChange"), C = Symbol.for("lit-nothing"), De = /* @__PURE__ */ new WeakMap(), O = Y.createTreeWalker(Y, 129);
|
|
285
285
|
function Si(n, t) {
|
|
286
286
|
if (!pe(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
287
|
return Je !== void 0 ? Je.createHTML(t) : t;
|
|
288
288
|
}
|
|
289
|
-
const
|
|
289
|
+
const Rn = (n, t) => {
|
|
290
290
|
const e = n.length - 1, i = [];
|
|
291
291
|
let r, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = ut;
|
|
292
292
|
for (let a = 0; a < e; a++) {
|
|
@@ -294,7 +294,7 @@ const In = (n, t) => {
|
|
|
294
294
|
let h, c, u = -1, d = 0;
|
|
295
295
|
for (; d < l.length && (o.lastIndex = d, c = o.exec(l), c !== null); ) d = o.lastIndex, o === ut ? c[1] === "!--" ? o = We : c[1] !== void 0 ? o = qe : c[2] !== void 0 ? (Mi.test(c[2]) && (r = RegExp("</" + c[2], "g")), o = T) : c[3] !== void 0 && (o = T) : o === T ? c[0] === ">" ? (o = r ?? ut, u = -1) : c[1] === void 0 ? u = -2 : (u = o.lastIndex - c[2].length, h = c[1], o = c[3] === void 0 ? T : c[3] === '"' ? Ke : Ze) : o === Ke || o === Ze ? o = T : o === We || o === qe ? o = ut : (o = T, r = void 0);
|
|
296
296
|
const g = o === T && n[a + 1].startsWith("/>") ? " " : "";
|
|
297
|
-
s += o === ut ? l +
|
|
297
|
+
s += o === ut ? l + Gn : u >= 0 ? (i.push(h), l.slice(0, u) + xi + l.slice(u) + G + g) : l + G + (u === -2 ? a : g);
|
|
298
298
|
}
|
|
299
299
|
return [Si(n, s + (n[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
300
300
|
};
|
|
@@ -303,7 +303,7 @@ class yt {
|
|
|
303
303
|
let r;
|
|
304
304
|
this.parts = [];
|
|
305
305
|
let s = 0, o = 0;
|
|
306
|
-
const a = t.length - 1, l = this.parts, [h, c] =
|
|
306
|
+
const a = t.length - 1, l = this.parts, [h, c] = Rn(t, e);
|
|
307
307
|
if (this.el = yt.createElement(h, i), O.currentNode = this.el.content, e === 2 || e === 3) {
|
|
308
308
|
const u = this.el.content.firstChild;
|
|
309
309
|
u.replaceWith(...u.childNodes);
|
|
@@ -312,7 +312,7 @@ class yt {
|
|
|
312
312
|
if (r.nodeType === 1) {
|
|
313
313
|
if (r.hasAttributes()) for (const u of r.getAttributeNames()) if (u.endsWith(xi)) {
|
|
314
314
|
const d = c[o++], g = r.getAttribute(u).split(G), f = /([.?@])?(.*)/.exec(d);
|
|
315
|
-
l.push({ type: 1, index: s, name: f[2], strings: g, ctor: f[1] === "." ?
|
|
315
|
+
l.push({ type: 1, index: s, name: f[2], strings: g, ctor: f[1] === "." ? Nn : f[1] === "?" ? On : f[1] === "@" ? kn : Xt }), r.removeAttribute(u);
|
|
316
316
|
} else u.startsWith(G) && (l.push({ type: 6, index: s }), r.removeAttribute(u));
|
|
317
317
|
if (Mi.test(r.tagName)) {
|
|
318
318
|
const u = r.textContent.split(G), d = u.length - 1;
|
|
@@ -342,7 +342,7 @@ function at(n, t, e = n, i) {
|
|
|
342
342
|
const s = pt(t) ? void 0 : t._$litDirective$;
|
|
343
343
|
return (r == null ? void 0 : r.constructor) !== s && ((a = r == null ? void 0 : r._$AO) == null || a.call(r, !1), s === void 0 ? r = void 0 : (r = new s(n), r._$AT(n, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t = at(n, r._$AS(n, t.values), r, i)), t;
|
|
344
344
|
}
|
|
345
|
-
let
|
|
345
|
+
let Tn = class {
|
|
346
346
|
constructor(t, e) {
|
|
347
347
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
348
348
|
}
|
|
@@ -359,7 +359,7 @@ let Rn = class {
|
|
|
359
359
|
for (; l !== void 0; ) {
|
|
360
360
|
if (o === l.index) {
|
|
361
361
|
let h;
|
|
362
|
-
l.type === 2 ? h = new ye(s, s.nextSibling, this, t) : l.type === 1 ? h = new l.ctor(s, l.name, l.strings, this, t) : l.type === 6 && (h = new
|
|
362
|
+
l.type === 2 ? h = new ye(s, s.nextSibling, this, t) : l.type === 1 ? h = new l.ctor(s, l.name, l.strings, this, t) : l.type === 6 && (h = new jn(s, this, t)), this._$AV.push(h), l = i[++a];
|
|
363
363
|
}
|
|
364
364
|
o !== (l == null ? void 0 : l.index) && (s = O.nextNode(), o++);
|
|
365
365
|
}
|
|
@@ -389,7 +389,7 @@ let Rn = class {
|
|
|
389
389
|
return this._$AB;
|
|
390
390
|
}
|
|
391
391
|
_$AI(t, e = this) {
|
|
392
|
-
t = at(this, t, e), pt(t) ? t === C || t == null || t === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : t !== this._$AH && t !== ot && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) :
|
|
392
|
+
t = at(this, t, e), pt(t) ? t === C || t == null || t === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : t !== this._$AH && t !== ot && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : In(t) ? this.k(t) : this._(t);
|
|
393
393
|
}
|
|
394
394
|
O(t) {
|
|
395
395
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -405,7 +405,7 @@ let Rn = class {
|
|
|
405
405
|
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = yt.createElement(Si(i.h, i.h[0]), this.options)), i);
|
|
406
406
|
if (((s = this._$AH) == null ? void 0 : s._$AD) === r) this._$AH.p(e);
|
|
407
407
|
else {
|
|
408
|
-
const o = new
|
|
408
|
+
const o = new Tn(r, this), a = o.u(this.options);
|
|
409
409
|
o.p(e), this.T(a), this._$AH = o;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
@@ -457,7 +457,7 @@ class Xt {
|
|
|
457
457
|
t === C ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
class
|
|
460
|
+
class Nn extends Xt {
|
|
461
461
|
constructor() {
|
|
462
462
|
super(...arguments), this.type = 3;
|
|
463
463
|
}
|
|
@@ -465,7 +465,7 @@ class Tn extends Xt {
|
|
|
465
465
|
this.element[this.name] = t === C ? void 0 : t;
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
class
|
|
468
|
+
class On extends Xt {
|
|
469
469
|
constructor() {
|
|
470
470
|
super(...arguments), this.type = 4;
|
|
471
471
|
}
|
|
@@ -473,7 +473,7 @@ class Nn extends Xt {
|
|
|
473
473
|
this.element.toggleAttribute(this.name, !!t && t !== C);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
class
|
|
476
|
+
class kn extends Xt {
|
|
477
477
|
constructor(t, e, i, r, s) {
|
|
478
478
|
super(t, e, i, r, s), this.type = 5;
|
|
479
479
|
}
|
|
@@ -487,7 +487,7 @@ class On extends Xt {
|
|
|
487
487
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
class
|
|
490
|
+
class jn {
|
|
491
491
|
constructor(t, e, i) {
|
|
492
492
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
493
493
|
}
|
|
@@ -514,7 +514,7 @@ const Hn = (n, t, e) => {
|
|
|
514
514
|
* Copyright 2017 Google LLC
|
|
515
515
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
516
516
|
*/
|
|
517
|
-
class
|
|
517
|
+
class U extends tt {
|
|
518
518
|
constructor() {
|
|
519
519
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
520
520
|
}
|
|
@@ -540,9 +540,9 @@ class j extends tt {
|
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
var wi;
|
|
543
|
-
|
|
543
|
+
U._$litElement$ = !0, U.finalized = !0, (wi = globalThis.litElementHydrateSupport) == null || wi.call(globalThis, { LitElement: U });
|
|
544
544
|
const ee = globalThis.litElementPolyfillSupport;
|
|
545
|
-
ee == null || ee({ LitElement:
|
|
545
|
+
ee == null || ee({ LitElement: U });
|
|
546
546
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
547
547
|
/**
|
|
548
548
|
* @license
|
|
@@ -550,7 +550,7 @@ ee == null || ee({ LitElement: j });
|
|
|
550
550
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
551
551
|
*/
|
|
552
552
|
const Un = (n) => (...t) => ({ _$litDirective$: n, values: t });
|
|
553
|
-
let
|
|
553
|
+
let Xn = class {
|
|
554
554
|
constructor(t) {
|
|
555
555
|
}
|
|
556
556
|
get _$AU() {
|
|
@@ -571,13 +571,13 @@ let jn = class {
|
|
|
571
571
|
* Copyright 2020 Google LLC
|
|
572
572
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
573
573
|
*/
|
|
574
|
-
const
|
|
574
|
+
const Yn = {}, Bn = (n, t = Yn) => n._$AH = t;
|
|
575
575
|
/**
|
|
576
576
|
* @license
|
|
577
577
|
* Copyright 2021 Google LLC
|
|
578
578
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
579
579
|
*/
|
|
580
|
-
const
|
|
580
|
+
const Vn = Un(class extends Xn {
|
|
581
581
|
constructor() {
|
|
582
582
|
super(...arguments), this.key = C;
|
|
583
583
|
}
|
|
@@ -585,9 +585,9 @@ const Bn = Un(class extends jn {
|
|
|
585
585
|
return this.key = n, t;
|
|
586
586
|
}
|
|
587
587
|
update(n, [t, e]) {
|
|
588
|
-
return t !== this.key && (
|
|
588
|
+
return t !== this.key && (Bn(n), this.key = t), e;
|
|
589
589
|
}
|
|
590
|
-
}),
|
|
590
|
+
}), zn = (n) => {
|
|
591
591
|
n.hoverInteraction = n.eoxMap.selectInteractions.selectHover, n.clickInteraction = n.eoxMap.selectInteractions.selectClick;
|
|
592
592
|
const t = () => {
|
|
593
593
|
n.requestUpdate();
|
|
@@ -599,29 +599,32 @@ const Bn = Un(class extends jn {
|
|
|
599
599
|
"change",
|
|
600
600
|
t
|
|
601
601
|
);
|
|
602
|
-
},
|
|
602
|
+
}, Jn = (n, t, e) => {
|
|
603
603
|
if (n.clickId === t) return;
|
|
604
604
|
const i = e ? [] : [t];
|
|
605
605
|
n.hoverInteraction.highlightById(i);
|
|
606
|
-
},
|
|
606
|
+
}, Wn = (n, t) => {
|
|
607
607
|
n.stopPropagation();
|
|
608
608
|
const e = Number(n.target.getAttribute("index")), i = t.drawnFeatures[e];
|
|
609
609
|
t.drawLayer.getSource().removeFeature(i), t.drawnFeatures.splice(e, 1), t.requestUpdate();
|
|
610
|
-
}, Qe = {
|
|
610
|
+
}, Qe = {
|
|
611
|
+
duration: 750,
|
|
612
|
+
padding: [20, 20, 20, 20]
|
|
613
|
+
}, ti = {
|
|
611
614
|
type: "FeatureCollection",
|
|
612
615
|
features: []
|
|
613
|
-
},
|
|
614
|
-
const
|
|
615
|
-
if (
|
|
616
|
-
const
|
|
617
|
-
|
|
616
|
+
}, qn = (n, t) => {
|
|
617
|
+
const { clickId: e, drawLayer: i, olMap: r, clickInteraction: s } = t, o = s.getId(n);
|
|
618
|
+
if (e === o) {
|
|
619
|
+
const l = i.getSource().getExtent();
|
|
620
|
+
r.getView().fit(l, Qe), s.highlightById([]);
|
|
618
621
|
} else {
|
|
619
|
-
const h = l.getExtent();
|
|
620
|
-
|
|
622
|
+
const l = t.eoxMap.projection || "EPSG:3857", h = t.eoxDrawTools.projection, c = n.clone().getGeometry().transform(h, l).getExtent();
|
|
623
|
+
s.highlightById([o]), r.getView().fit(c, Qe);
|
|
621
624
|
}
|
|
622
625
|
t.requestUpdate();
|
|
623
|
-
},
|
|
624
|
-
class Ai extends
|
|
626
|
+
}, Zn = "ul.list-wrap { padding: 0;}ul.list-wrap li:hover,ul.list-wrap li.selected { background: var(--secondary-bg-color-hover);}ul.list-wrap li { list-style: none; padding: 4px;}ul.list-wrap li { border-bottom: 1.2px solid var(--secondary-color);}ul.list-wrap li:first-child { border-top: 1.2px solid var(--secondary-color);}ul.list-wrap li .list { width: 100%; align-items: center; justify-content: space-between; display: flex; align-items: center; cursor: pointer; font-size: small; gap: 10px;}ul.list-wrap li .list span { display: flex; align-items: center; cursor: pointer; font-size: small; flex-grow: 1;}";
|
|
627
|
+
class Ai extends U {
|
|
625
628
|
constructor() {
|
|
626
629
|
super();
|
|
627
630
|
/**
|
|
@@ -640,7 +643,7 @@ class Ai extends j {
|
|
|
640
643
|
* @type string | number
|
|
641
644
|
*/
|
|
642
645
|
R(this, "clickId");
|
|
643
|
-
this.eoxMap = null, this.olMap = null, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.modify = null, this.unstyled = !1;
|
|
646
|
+
this.eoxDrawTools = null, this.eoxMap = null, this.olMap = null, this.draw = null, this.drawLayer = null, this.drawnFeatures = [], this.featureName = "Feature", this.modify = null, this.unstyled = !1;
|
|
644
647
|
}
|
|
645
648
|
/**
|
|
646
649
|
* Handles the deletion of an individual feature.
|
|
@@ -648,7 +651,7 @@ class Ai extends j {
|
|
|
648
651
|
* @param {Event & { target: HTMLButtonElement }} evt - Event object containing button target.
|
|
649
652
|
*/
|
|
650
653
|
_handleDelete(e) {
|
|
651
|
-
|
|
654
|
+
Wn(e, this), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
|
|
652
655
|
}
|
|
653
656
|
/**
|
|
654
657
|
* Handles the selection and deselection of a feature from the list.
|
|
@@ -656,7 +659,7 @@ class Ai extends j {
|
|
|
656
659
|
* @param {import("ol").Feature} feature - The selected feature.
|
|
657
660
|
*/
|
|
658
661
|
_handleFeatureSelectAndDeselect(e) {
|
|
659
|
-
|
|
662
|
+
qn(e, this);
|
|
660
663
|
}
|
|
661
664
|
/**
|
|
662
665
|
*
|
|
@@ -664,13 +667,13 @@ class Ai extends j {
|
|
|
664
667
|
* @param {Boolean} mouseOut - Flag indicating mouse out event.
|
|
665
668
|
*/
|
|
666
669
|
_handleHoverFeature(e, i = !1) {
|
|
667
|
-
|
|
670
|
+
Jn(this, e, i);
|
|
668
671
|
}
|
|
669
672
|
/**
|
|
670
673
|
* Initiates initial settings and event triggers upon the component's first update.
|
|
671
674
|
*/
|
|
672
675
|
firstUpdated() {
|
|
673
|
-
|
|
676
|
+
zn(this);
|
|
674
677
|
}
|
|
675
678
|
/**
|
|
676
679
|
* Overrides createRenderRoot to handle shadow DOM.
|
|
@@ -680,16 +683,18 @@ class Ai extends j {
|
|
|
680
683
|
}
|
|
681
684
|
render() {
|
|
682
685
|
var e, i;
|
|
683
|
-
return this.hoverId = (e = this.hoverInteraction) == null ? void 0 : e.selectedFids[0], this.clickId = (i = this.clickInteraction) == null ? void 0 : i.selectedFids[0],
|
|
686
|
+
return this.hoverId = (e = this.hoverInteraction) == null ? void 0 : e.selectedFids[0], this.clickId = (i = this.clickInteraction) == null ? void 0 : i.selectedFids[0], H`
|
|
684
687
|
<style>
|
|
685
|
-
${!this.unstyled &&
|
|
688
|
+
${!this.unstyled && Zn}
|
|
686
689
|
</style>
|
|
687
690
|
<ul class="list-wrap">
|
|
688
691
|
${this.drawnFeatures.map((r, s) => {
|
|
689
|
-
const o = s + 1, a =
|
|
690
|
-
|
|
692
|
+
const o = s + 1, a = Object.values(
|
|
693
|
+
this.eoxMap.selectInteractions
|
|
694
|
+
)[0].getId(r), l = this.hoverId === a, h = this.clickId === a;
|
|
695
|
+
return Vn(
|
|
691
696
|
o,
|
|
692
|
-
|
|
697
|
+
H`
|
|
693
698
|
<li
|
|
694
699
|
class="${l || h ? "selected" : C}"
|
|
695
700
|
@mouseover=${() => this._handleHoverFeature(a)}
|
|
@@ -699,7 +704,9 @@ class Ai extends j {
|
|
|
699
704
|
class="list"
|
|
700
705
|
@click="${() => this._handleFeatureSelectAndDeselect(r)}"
|
|
701
706
|
>
|
|
702
|
-
<span class="title"
|
|
707
|
+
<span class="title"
|
|
708
|
+
>${this.featureName} ${o}</span
|
|
709
|
+
>
|
|
703
710
|
<button
|
|
704
711
|
index=${s}
|
|
705
712
|
class="icon smallest discard"
|
|
@@ -717,20 +724,22 @@ class Ai extends j {
|
|
|
717
724
|
}
|
|
718
725
|
}
|
|
719
726
|
R(Ai, "properties", {
|
|
727
|
+
eoxDrawTools: { attribute: !1, state: !0 },
|
|
720
728
|
eoxMap: { attribute: !1, state: !0 },
|
|
721
729
|
olMap: { attribute: !1, state: !0 },
|
|
722
730
|
draw: { attribute: !1, state: !0 },
|
|
723
731
|
drawLayer: { attribute: !1, state: !0 },
|
|
724
732
|
drawnFeatures: { attribute: !1, state: !0, type: Array },
|
|
733
|
+
featureName: { attribute: !1, state: !0, type: String },
|
|
725
734
|
modify: { attribute: !1, state: !0 },
|
|
726
735
|
unstyled: { type: Boolean }
|
|
727
736
|
});
|
|
728
737
|
customElements.define("eox-drawtools-list", Ai);
|
|
729
|
-
const
|
|
738
|
+
const Kn = (n) => {
|
|
730
739
|
const { multipleFeatures: t, drawnFeatures: e, currentlyDrawing: i } = n, r = !t && (e == null ? void 0 : e.length) > 0 || i, s = !(e != null && e.length) && !i;
|
|
731
740
|
return { drawDisabled: r, discardDisabled: s };
|
|
732
|
-
},
|
|
733
|
-
function
|
|
741
|
+
}, Dn = "button,.button { /* TODO: why does this only work here and not from :root? */ --primary-color: #004170; --primary-color-hover: #004170cc; --error-color: #ff5252; display: inline-flex; position: relative; align-items: center; color: #fff; border-width: 0; outline: none; border-radius: 4px; padding: 16px; height: 36px; cursor: pointer; font-family: inherit; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1.25px; font-weight: 500; box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); transition-property: box-shadow, transform, opacity, background; transition-duration: 0.28s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);}button:hover:not([disabled]):not(.icon),.button:hover:not([disabled]):not(.icon) { box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); background: var(--primary-color-hover);}button,button:active,.button,.button:active { background: var(--primary-color);}button[disabled],.button[disabled] { opacity: 0.5; cursor: not-allowed;}button.block,.button.block { display: block;}button.outline,.button.outline { background: transparent; box-shadow: none; color: var(--primary-color); outline: 1px solid var(--primary-color);}button.outline:hover,.button.outline:hover { background: transparent;}button.icon,.button.icon { background: transparent; border: none; box-shadow: none; padding: 0; border-radius: 50%; width: 24px; height: 24px; text-indent: -9999px;}button.icon-text,.button.icon-text { text-indent: 26px;}button.icon-text.block,.button.icon-text.block { text-indent: 20px;}button.icon:before,button.icon-text:before,.button.icon:before,.button.icon-text:before { position: absolute; text-indent: 0; line-height: initial;}button.icon-text.block:before,.button.icon-text.block:before { text-indent: -54px;}button.icon:before,.button.icon:before { width: 24px; height: 24px; margin-right: 0;}button.icon-text:before,.button.icon-text:before { width: 18px; height: 18px;}button.small,.button.small { height: 28px; padding: 12.4px; font-size: 0.75rem;}button.smallest.icon,button.smallest.icon::before { height: 16px; width: 16px; padding: 0px;}", Qn = 'textarea { height: 90px; resize: none; border-radius: 4px; box-sizing: border-box !important; width: 100%; padding: 5px 7px; border: 1px solid var(--secondary-color); font-size: smaller; background: var(--background-color);}input,input[type="text"],input[type="url"],input[type="email"],input[type="password"],input[type="text"],input[type="number"],input[type="search"],input[type="tel"],select { box-sizing: border-box; width: 100%; margin-top: 0.5rem; margin-bottom: 0.5rem; padding: 5px 7px; border-radius: 4px; border: 1px solid #0004; background-color: var(--background-color);}';
|
|
742
|
+
function tr(n) {
|
|
734
743
|
navigator.clipboard.writeText(n).then(
|
|
735
744
|
function() {
|
|
736
745
|
},
|
|
@@ -739,7 +748,7 @@ function Qn(n) {
|
|
|
739
748
|
}
|
|
740
749
|
);
|
|
741
750
|
}
|
|
742
|
-
const
|
|
751
|
+
const er = {
|
|
743
752
|
/**
|
|
744
753
|
* Triggered when a property is changed.
|
|
745
754
|
* @event module:ol/Object.ObjectEvent#propertychange
|
|
@@ -754,7 +763,7 @@ const tr = {
|
|
|
754
763
|
*/
|
|
755
764
|
CHANGE: "change"
|
|
756
765
|
};
|
|
757
|
-
class
|
|
766
|
+
class ir {
|
|
758
767
|
constructor() {
|
|
759
768
|
this.disposed = !1;
|
|
760
769
|
}
|
|
@@ -771,7 +780,7 @@ class er {
|
|
|
771
780
|
disposeInternal() {
|
|
772
781
|
}
|
|
773
782
|
}
|
|
774
|
-
function
|
|
783
|
+
function nr(n, t, e) {
|
|
775
784
|
let i, r;
|
|
776
785
|
e = e || Fi;
|
|
777
786
|
let s = 0, o = n.length, a = !1;
|
|
@@ -787,7 +796,7 @@ function A(n, t) {
|
|
|
787
796
|
for (let r = 0; r < i; r++)
|
|
788
797
|
n[n.length] = e[r];
|
|
789
798
|
}
|
|
790
|
-
function
|
|
799
|
+
function rr(n, t) {
|
|
791
800
|
const e = n.length;
|
|
792
801
|
if (e !== t.length)
|
|
793
802
|
return !1;
|
|
@@ -802,14 +811,14 @@ function Gi(n) {
|
|
|
802
811
|
let t, e, i;
|
|
803
812
|
return function() {
|
|
804
813
|
const r = Array.prototype.slice.call(arguments);
|
|
805
|
-
return (!e || this !== i || !
|
|
814
|
+
return (!e || this !== i || !rr(r, e)) && (i = this, e = r, t = n.apply(this, arguments)), t;
|
|
806
815
|
};
|
|
807
816
|
}
|
|
808
|
-
function
|
|
817
|
+
function Ii(n) {
|
|
809
818
|
for (const t in n)
|
|
810
819
|
delete n[t];
|
|
811
820
|
}
|
|
812
|
-
function
|
|
821
|
+
function Li(n) {
|
|
813
822
|
let t;
|
|
814
823
|
for (t in n)
|
|
815
824
|
return !1;
|
|
@@ -838,7 +847,7 @@ class Ri {
|
|
|
838
847
|
this.propagationStopped = !0;
|
|
839
848
|
}
|
|
840
849
|
}
|
|
841
|
-
class
|
|
850
|
+
class sr extends ir {
|
|
842
851
|
/**
|
|
843
852
|
* @param {*} [target] Default event target for dispatched events.
|
|
844
853
|
*/
|
|
@@ -897,7 +906,7 @@ class rr extends er {
|
|
|
897
906
|
* @override
|
|
898
907
|
*/
|
|
899
908
|
disposeInternal() {
|
|
900
|
-
this.listeners_ &&
|
|
909
|
+
this.listeners_ && Ii(this.listeners_);
|
|
901
910
|
}
|
|
902
911
|
/**
|
|
903
912
|
* Get the listeners for a specified event type. Listeners are returned in the
|
|
@@ -949,9 +958,9 @@ function ii(n, t, e, i) {
|
|
|
949
958
|
return mt(n, t, e, i, !0);
|
|
950
959
|
}
|
|
951
960
|
function Nt(n) {
|
|
952
|
-
n && n.target && (n.target.removeEventListener(n.type, n.listener),
|
|
961
|
+
n && n.target && (n.target.removeEventListener(n.type, n.listener), Ii(n));
|
|
953
962
|
}
|
|
954
|
-
class Yt extends
|
|
963
|
+
class Yt extends sr {
|
|
955
964
|
constructor() {
|
|
956
965
|
super(), this.on = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
|
|
957
966
|
this.onInternal, this.once = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
|
|
@@ -1028,7 +1037,7 @@ class Yt extends rr {
|
|
|
1028
1037
|
e.ol_key
|
|
1029
1038
|
);
|
|
1030
1039
|
if (i)
|
|
1031
|
-
|
|
1040
|
+
or(i);
|
|
1032
1041
|
else if (Array.isArray(t))
|
|
1033
1042
|
for (let r = 0, s = t.length; r < s; ++r)
|
|
1034
1043
|
this.removeEventListener(t[r], e);
|
|
@@ -1039,7 +1048,7 @@ class Yt extends rr {
|
|
|
1039
1048
|
Yt.prototype.on;
|
|
1040
1049
|
Yt.prototype.once;
|
|
1041
1050
|
Yt.prototype.un;
|
|
1042
|
-
function
|
|
1051
|
+
function or(n) {
|
|
1043
1052
|
if (Array.isArray(n))
|
|
1044
1053
|
for (let t = 0, e = n.length; t < e; ++t)
|
|
1045
1054
|
Nt(n[t]);
|
|
@@ -1052,9 +1061,9 @@ function sr(n) {
|
|
|
1052
1061
|
function y() {
|
|
1053
1062
|
throw new Error("Unimplemented abstract method.");
|
|
1054
1063
|
}
|
|
1055
|
-
let
|
|
1056
|
-
function
|
|
1057
|
-
return n.ol_uid || (n.ol_uid = String(++
|
|
1064
|
+
let ar = 0;
|
|
1065
|
+
function lr(n) {
|
|
1066
|
+
return n.ol_uid || (n.ol_uid = String(++ar));
|
|
1058
1067
|
}
|
|
1059
1068
|
class ni extends Ri {
|
|
1060
1069
|
/**
|
|
@@ -1071,7 +1080,7 @@ class Ti extends Yt {
|
|
|
1071
1080
|
* @param {Object<string, *>} [values] An object with key-value pairs.
|
|
1072
1081
|
*/
|
|
1073
1082
|
constructor(t) {
|
|
1074
|
-
super(), this.on, this.once, this.un,
|
|
1083
|
+
super(), this.on, this.once, this.un, lr(this), this.values_ = null, t !== void 0 && this.setProperties(t);
|
|
1075
1084
|
}
|
|
1076
1085
|
/**
|
|
1077
1086
|
* Gets a value.
|
|
@@ -1118,7 +1127,7 @@ class Ti extends Yt {
|
|
|
1118
1127
|
*/
|
|
1119
1128
|
notify(t, e) {
|
|
1120
1129
|
let i;
|
|
1121
|
-
i = `change:${t}`, this.hasListener(i) && this.dispatchEvent(new ni(i, t, e)), i =
|
|
1130
|
+
i = `change:${t}`, this.hasListener(i) && this.dispatchEvent(new ni(i, t, e)), i = er.PROPERTYCHANGE, this.hasListener(i) && this.dispatchEvent(new ni(i, t, e));
|
|
1122
1131
|
}
|
|
1123
1132
|
/**
|
|
1124
1133
|
* @param {string} key Key name.
|
|
@@ -1178,11 +1187,11 @@ class Ti extends Yt {
|
|
|
1178
1187
|
unset(t, e) {
|
|
1179
1188
|
if (this.values_ && t in this.values_) {
|
|
1180
1189
|
const i = this.values_[t];
|
|
1181
|
-
delete this.values_[t],
|
|
1190
|
+
delete this.values_[t], Li(this.values_) && (this.values_ = null), e || this.notify(t, i);
|
|
1182
1191
|
}
|
|
1183
1192
|
}
|
|
1184
1193
|
}
|
|
1185
|
-
function
|
|
1194
|
+
function hr(n, t) {
|
|
1186
1195
|
if (!n)
|
|
1187
1196
|
throw new Error(t);
|
|
1188
1197
|
}
|
|
@@ -1318,7 +1327,7 @@ class lt extends Ti {
|
|
|
1318
1327
|
* @fires module:ol/events/Event~BaseEvent#event:change
|
|
1319
1328
|
*/
|
|
1320
1329
|
setStyle(t) {
|
|
1321
|
-
this.style_ = t, this.styleFunction_ = t ?
|
|
1330
|
+
this.style_ = t, this.styleFunction_ = t ? cr(t) : void 0, this.changed();
|
|
1322
1331
|
}
|
|
1323
1332
|
/**
|
|
1324
1333
|
* Set the feature id. The feature id is considered stable and may be used when
|
|
@@ -1343,11 +1352,11 @@ class lt extends Ti {
|
|
|
1343
1352
|
this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_), this.geometryName_ = t, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), this.handleGeometryChanged_();
|
|
1344
1353
|
}
|
|
1345
1354
|
}
|
|
1346
|
-
function
|
|
1355
|
+
function cr(n) {
|
|
1347
1356
|
if (typeof n == "function")
|
|
1348
1357
|
return n;
|
|
1349
1358
|
let t;
|
|
1350
|
-
return Array.isArray(n) ? t = n : (
|
|
1359
|
+
return Array.isArray(n) ? t = n : (hr(
|
|
1351
1360
|
typeof /** @type {?} */
|
|
1352
1361
|
n.getZIndex == "function",
|
|
1353
1362
|
"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"
|
|
@@ -1393,27 +1402,27 @@ function ki(n, t) {
|
|
|
1393
1402
|
}
|
|
1394
1403
|
function Ce(n, t, e, i, r) {
|
|
1395
1404
|
const s = ve(r);
|
|
1396
|
-
return
|
|
1405
|
+
return ji(s, n, t, e, i);
|
|
1397
1406
|
}
|
|
1398
|
-
function
|
|
1407
|
+
function ur(n, t) {
|
|
1399
1408
|
return t[0] < n[0] && (n[0] = t[0]), t[2] > n[2] && (n[2] = t[2]), t[1] < n[1] && (n[1] = t[1]), t[3] > n[3] && (n[3] = t[3]), n;
|
|
1400
1409
|
}
|
|
1401
|
-
function
|
|
1410
|
+
function ji(n, t, e, i, r) {
|
|
1402
1411
|
for (; e < i; e += r)
|
|
1403
|
-
|
|
1412
|
+
dr(n, t[e], t[e + 1]);
|
|
1404
1413
|
return n;
|
|
1405
1414
|
}
|
|
1406
|
-
function
|
|
1415
|
+
function dr(n, t, e) {
|
|
1407
1416
|
n[0] = Math.min(n[0], t), n[1] = Math.min(n[1], e), n[2] = Math.max(n[2], t), n[3] = Math.max(n[3], e);
|
|
1408
1417
|
}
|
|
1409
|
-
function
|
|
1418
|
+
function gr(n, t) {
|
|
1410
1419
|
let e;
|
|
1411
|
-
return e = t(
|
|
1420
|
+
return e = t(fr(n)), e || (e = t(pr(n)), e) || (e = t(mr(n)), e) || (e = t(yr(n)), e) ? e : !1;
|
|
1412
1421
|
}
|
|
1413
|
-
function
|
|
1422
|
+
function fr(n) {
|
|
1414
1423
|
return [n[0], n[1]];
|
|
1415
1424
|
}
|
|
1416
|
-
function
|
|
1425
|
+
function pr(n) {
|
|
1417
1426
|
return [n[2], n[1]];
|
|
1418
1427
|
}
|
|
1419
1428
|
function Bt(n) {
|
|
@@ -1422,19 +1431,19 @@ function Bt(n) {
|
|
|
1422
1431
|
function Ot(n) {
|
|
1423
1432
|
return n[3] - n[1];
|
|
1424
1433
|
}
|
|
1425
|
-
function
|
|
1434
|
+
function yr(n) {
|
|
1426
1435
|
return [n[0], n[3]];
|
|
1427
1436
|
}
|
|
1428
|
-
function
|
|
1437
|
+
function mr(n) {
|
|
1429
1438
|
return [n[2], n[3]];
|
|
1430
1439
|
}
|
|
1431
|
-
function
|
|
1440
|
+
function _r(n, t) {
|
|
1432
1441
|
return n[0] <= t[2] && n[2] >= t[0] && n[1] <= t[3] && n[3] >= t[1];
|
|
1433
1442
|
}
|
|
1434
|
-
function
|
|
1443
|
+
function vr(n, t) {
|
|
1435
1444
|
return t ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t) : n;
|
|
1436
1445
|
}
|
|
1437
|
-
function
|
|
1446
|
+
function Cr(n, t, e) {
|
|
1438
1447
|
let i = !1;
|
|
1439
1448
|
const r = ri(n, t), s = ri(n, e);
|
|
1440
1449
|
if (r === w.INTERSECTING || s === w.INTERSECTING)
|
|
@@ -1446,7 +1455,7 @@ function vr(n, t, e) {
|
|
|
1446
1455
|
}
|
|
1447
1456
|
return i;
|
|
1448
1457
|
}
|
|
1449
|
-
function
|
|
1458
|
+
function wr(n, t, e, i, r, s) {
|
|
1450
1459
|
const o = r - e, a = s - i;
|
|
1451
1460
|
if (o !== 0 || a !== 0) {
|
|
1452
1461
|
const l = ((n - e) * o + (t - i) * a) / (o * o + a * a);
|
|
@@ -1473,7 +1482,7 @@ function oe(n, t, e) {
|
|
|
1473
1482
|
const i = e - t;
|
|
1474
1483
|
return ((n - t) % i + i) % i + t;
|
|
1475
1484
|
}
|
|
1476
|
-
const
|
|
1485
|
+
const br = {
|
|
1477
1486
|
// use the radius of the Normal sphere
|
|
1478
1487
|
radians: 6370997 / (2 * Math.PI),
|
|
1479
1488
|
degrees: 2 * Math.PI * 6370997 / 360,
|
|
@@ -1527,7 +1536,7 @@ class be {
|
|
|
1527
1536
|
* @api
|
|
1528
1537
|
*/
|
|
1529
1538
|
getMetersPerUnit() {
|
|
1530
|
-
return this.metersPerUnit_ ||
|
|
1539
|
+
return this.metersPerUnit_ || br[this.units_];
|
|
1531
1540
|
}
|
|
1532
1541
|
/**
|
|
1533
1542
|
* Get the world extent for this projection.
|
|
@@ -1614,7 +1623,7 @@ class be {
|
|
|
1614
1623
|
return this.getPointResolutionFunc_;
|
|
1615
1624
|
}
|
|
1616
1625
|
}
|
|
1617
|
-
const St = 6378137, et = Math.PI * St,
|
|
1626
|
+
const St = 6378137, et = Math.PI * St, Er = [-et, -et, et, et], xr = [-180, -85, 180, 85], Ft = St * Math.log(Math.tan(Math.PI / 2));
|
|
1618
1627
|
class D extends be {
|
|
1619
1628
|
/**
|
|
1620
1629
|
* @param {string} code Code.
|
|
@@ -1623,9 +1632,9 @@ class D extends be {
|
|
|
1623
1632
|
super({
|
|
1624
1633
|
code: t,
|
|
1625
1634
|
units: "m",
|
|
1626
|
-
extent:
|
|
1635
|
+
extent: Er,
|
|
1627
1636
|
global: !0,
|
|
1628
|
-
worldExtent:
|
|
1637
|
+
worldExtent: xr,
|
|
1629
1638
|
getPointResolution: function(e, i) {
|
|
1630
1639
|
return e / Math.cosh(i[1] / St);
|
|
1631
1640
|
}
|
|
@@ -1640,7 +1649,7 @@ const oi = [
|
|
|
1640
1649
|
new D("http://www.opengis.net/def/crs/EPSG/0/3857"),
|
|
1641
1650
|
new D("http://www.opengis.net/gml/srs/epsg.xml#3857")
|
|
1642
1651
|
];
|
|
1643
|
-
function
|
|
1652
|
+
function Pr(n, t, e, i) {
|
|
1644
1653
|
const r = n.length;
|
|
1645
1654
|
e = e > 1 ? e : 2, i = i ?? e, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(r));
|
|
1646
1655
|
for (let s = 0; s < r; s += i) {
|
|
@@ -1650,14 +1659,14 @@ function xr(n, t, e, i) {
|
|
|
1650
1659
|
}
|
|
1651
1660
|
return t;
|
|
1652
1661
|
}
|
|
1653
|
-
function
|
|
1662
|
+
function Mr(n, t, e, i) {
|
|
1654
1663
|
const r = n.length;
|
|
1655
1664
|
e = e > 1 ? e : 2, i = i ?? e, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(r));
|
|
1656
1665
|
for (let s = 0; s < r; s += i)
|
|
1657
1666
|
t[s] = 180 * n[s] / et, t[s + 1] = 360 * Math.atan(Math.exp(n[s + 1] / St)) / Math.PI - 90;
|
|
1658
1667
|
return t;
|
|
1659
1668
|
}
|
|
1660
|
-
const
|
|
1669
|
+
const Sr = 6378137, ai = [-180, -90, 180, 90], $r = Math.PI * Sr / 180;
|
|
1661
1670
|
class N extends be {
|
|
1662
1671
|
/**
|
|
1663
1672
|
* @param {string} code Code.
|
|
@@ -1670,7 +1679,7 @@ class N extends be {
|
|
|
1670
1679
|
extent: ai,
|
|
1671
1680
|
axisOrientation: e,
|
|
1672
1681
|
global: !0,
|
|
1673
|
-
metersPerUnit:
|
|
1682
|
+
metersPerUnit: $r,
|
|
1674
1683
|
worldExtent: ai
|
|
1675
1684
|
});
|
|
1676
1685
|
}
|
|
@@ -1685,10 +1694,10 @@ const li = [
|
|
|
1685
1694
|
new N("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
|
|
1686
1695
|
];
|
|
1687
1696
|
let ae = {};
|
|
1688
|
-
function
|
|
1697
|
+
function Ar(n) {
|
|
1689
1698
|
return ae[n] || ae[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
|
|
1690
1699
|
}
|
|
1691
|
-
function
|
|
1700
|
+
function Fr(n, t) {
|
|
1692
1701
|
ae[n] = t;
|
|
1693
1702
|
}
|
|
1694
1703
|
let it = {};
|
|
@@ -1699,34 +1708,34 @@ function _t(n, t, e) {
|
|
|
1699
1708
|
function ie(n, t) {
|
|
1700
1709
|
return n in it && t in it[n] ? it[n][t] : null;
|
|
1701
1710
|
}
|
|
1702
|
-
const kt = 0.9996, P = 669438e-8, Vt = P * P, zt = Vt * P, k = P / (1 - P), hi = Math.sqrt(1 - P), ht = (1 - hi) / (1 + hi),
|
|
1703
|
-
function
|
|
1704
|
-
const i = n - 5e5, o = (e.north ? t : t - 1e7) / kt / (
|
|
1705
|
-
let Kt = (E - ct / 6 * (1 + 2 * d + v) +
|
|
1711
|
+
const kt = 0.9996, P = 669438e-8, Vt = P * P, zt = Vt * P, k = P / (1 - P), hi = Math.sqrt(1 - P), ht = (1 - hi) / (1 + hi), Hi = ht * ht, Ee = Hi * ht, xe = Ee * ht, Ui = xe * ht, Xi = 1 - P / 4 - 3 * Vt / 64 - 5 * zt / 256, Gr = 3 * P / 8 + 3 * Vt / 32 + 45 * zt / 1024, Ir = 15 * Vt / 256 + 45 * zt / 1024, Lr = 35 * zt / 3072, Rr = 3 / 2 * ht - 27 / 32 * Ee + 269 / 512 * Ui, Tr = 21 / 16 * Hi - 55 / 32 * xe, Nr = 151 / 96 * Ee - 417 / 128 * Ui, Or = 1097 / 512 * xe, jt = 6378137;
|
|
1712
|
+
function kr(n, t, e) {
|
|
1713
|
+
const i = n - 5e5, o = (e.north ? t : t - 1e7) / kt / (jt * Xi), a = o + Rr * Math.sin(2 * o) + Tr * Math.sin(4 * o) + Nr * Math.sin(6 * o) + Or * Math.sin(8 * o), l = Math.sin(a), h = l * l, c = Math.cos(a), u = l / c, d = u * u, g = d * d, f = 1 - P * h, p = Math.sqrt(1 - P * h), _ = jt / p, b = (1 - P) / f, v = k * c ** 2, S = v * v, E = i / (_ * kt), L = E * E, ct = L * E, je = ct * E, He = je * E, mn = He * E, _n = a - u / b * (L / 2 - je / 24 * (5 + 3 * d + 10 * v - 4 * S - 9 * k)) + mn / 720 * (61 + 90 * d + 298 * v + 45 * g - 252 * k - 3 * S);
|
|
1714
|
+
let Kt = (E - ct / 6 * (1 + 2 * d + v) + He / 120 * (5 - 2 * v + 28 * d - 3 * S + 8 * k + 24 * g)) / c;
|
|
1706
1715
|
return Kt = oe(
|
|
1707
1716
|
Kt + Rt(Yi(e.number)),
|
|
1708
1717
|
-Math.PI,
|
|
1709
1718
|
Math.PI
|
|
1710
|
-
), [si(Kt), si(
|
|
1719
|
+
), [si(Kt), si(_n)];
|
|
1711
1720
|
}
|
|
1712
|
-
const ci = -80, ui = 84,
|
|
1721
|
+
const ci = -80, ui = 84, jr = -180, Hr = 180;
|
|
1713
1722
|
function Ur(n, t, e) {
|
|
1714
|
-
n = oe(n,
|
|
1715
|
-
const i = Rt(t), r = Math.sin(i), s = Math.cos(i), o = r / s, a = o * o, l = a * a, h = Rt(n), c = Yi(e.number), u = Rt(c), d =
|
|
1723
|
+
n = oe(n, jr, Hr), t < ci ? t = ci : t > ui && (t = ui);
|
|
1724
|
+
const i = Rt(t), r = Math.sin(i), s = Math.cos(i), o = r / s, a = o * o, l = a * a, h = Rt(n), c = Yi(e.number), u = Rt(c), d = jt / Math.sqrt(1 - P * r ** 2), g = k * s ** 2, f = s * oe(h - u, -Math.PI, Math.PI), p = f * f, _ = p * f, b = _ * f, v = b * f, S = v * f, E = jt * (Xi * i - Gr * Math.sin(2 * i) + Ir * Math.sin(4 * i) - Lr * Math.sin(6 * i)), L = kt * d * (f + _ / 6 * (1 - a + g) + v / 120 * (5 - 18 * a + l + 72 * g - 58 * k)) + 5e5;
|
|
1716
1725
|
let ct = kt * (E + d * o * (p / 2 + b / 24 * (5 - a + 9 * g + 4 * g ** 2) + S / 720 * (61 - 58 * a + l + 600 * g - 330 * k)));
|
|
1717
|
-
return e.north || (ct += 1e7), [
|
|
1726
|
+
return e.north || (ct += 1e7), [L, ct];
|
|
1718
1727
|
}
|
|
1719
1728
|
function Yi(n) {
|
|
1720
1729
|
return (n - 1) * 6 - 180 + 3;
|
|
1721
1730
|
}
|
|
1722
|
-
const
|
|
1731
|
+
const Xr = [
|
|
1723
1732
|
/^EPSG:(\d+)$/,
|
|
1724
1733
|
/^urn:ogc:def:crs:EPSG::(\d+)$/,
|
|
1725
1734
|
/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/
|
|
1726
1735
|
];
|
|
1727
1736
|
function Bi(n) {
|
|
1728
1737
|
let t = 0;
|
|
1729
|
-
for (const r of
|
|
1738
|
+
for (const r of Xr) {
|
|
1730
1739
|
const s = n.match(r);
|
|
1731
1740
|
if (s) {
|
|
1732
1741
|
t = parseInt(s[1]);
|
|
@@ -1749,17 +1758,17 @@ function di(n, t) {
|
|
|
1749
1758
|
return i;
|
|
1750
1759
|
};
|
|
1751
1760
|
}
|
|
1752
|
-
function
|
|
1761
|
+
function Yr(n) {
|
|
1753
1762
|
return Bi(n) ? new be({ code: n, units: "m" }) : null;
|
|
1754
1763
|
}
|
|
1755
|
-
function
|
|
1764
|
+
function Br(n) {
|
|
1756
1765
|
const t = Bi(n.getCode());
|
|
1757
1766
|
return t ? {
|
|
1758
1767
|
forward: di(Ur, t),
|
|
1759
|
-
inverse: di(
|
|
1768
|
+
inverse: di(kr, t)
|
|
1760
1769
|
} : null;
|
|
1761
1770
|
}
|
|
1762
|
-
const
|
|
1771
|
+
const Vr = [Br], zr = [Yr];
|
|
1763
1772
|
function Pe(n, t) {
|
|
1764
1773
|
if (t !== void 0) {
|
|
1765
1774
|
for (let e = 0, i = n.length; e < i; ++e)
|
|
@@ -1770,18 +1779,18 @@ function Pe(n, t) {
|
|
|
1770
1779
|
return t;
|
|
1771
1780
|
}
|
|
1772
1781
|
function le(n) {
|
|
1773
|
-
|
|
1782
|
+
Fr(n.getCode(), n), _t(n, n, Pe);
|
|
1774
1783
|
}
|
|
1775
|
-
function
|
|
1784
|
+
function Jr(n) {
|
|
1776
1785
|
n.forEach(le);
|
|
1777
1786
|
}
|
|
1778
1787
|
function x(n) {
|
|
1779
1788
|
if (typeof n != "string")
|
|
1780
1789
|
return n;
|
|
1781
|
-
const t =
|
|
1790
|
+
const t = Ar(n);
|
|
1782
1791
|
if (t)
|
|
1783
1792
|
return t;
|
|
1784
|
-
for (const e of
|
|
1793
|
+
for (const e of zr) {
|
|
1785
1794
|
const i = e(n);
|
|
1786
1795
|
if (i)
|
|
1787
1796
|
return i;
|
|
@@ -1789,20 +1798,20 @@ function x(n) {
|
|
|
1789
1798
|
return null;
|
|
1790
1799
|
}
|
|
1791
1800
|
function gi(n) {
|
|
1792
|
-
|
|
1801
|
+
Jr(n), n.forEach(function(t) {
|
|
1793
1802
|
n.forEach(function(e) {
|
|
1794
1803
|
t !== e && _t(t, e, Pe);
|
|
1795
1804
|
});
|
|
1796
1805
|
});
|
|
1797
1806
|
}
|
|
1798
|
-
function
|
|
1807
|
+
function Wr(n, t, e, i) {
|
|
1799
1808
|
n.forEach(function(r) {
|
|
1800
1809
|
t.forEach(function(s) {
|
|
1801
1810
|
_t(r, s, e), _t(s, r, i);
|
|
1802
1811
|
});
|
|
1803
1812
|
});
|
|
1804
1813
|
}
|
|
1805
|
-
function
|
|
1814
|
+
function qr(n, t) {
|
|
1806
1815
|
if (n === t)
|
|
1807
1816
|
return !0;
|
|
1808
1817
|
const e = n.getUnits() === t.getUnits();
|
|
@@ -1814,7 +1823,7 @@ function Vi(n, t) {
|
|
|
1814
1823
|
if (r)
|
|
1815
1824
|
return r;
|
|
1816
1825
|
let s = null, o = null;
|
|
1817
|
-
for (const l of
|
|
1826
|
+
for (const l of Vr)
|
|
1818
1827
|
s || (s = l(n)), o || (o = l(t));
|
|
1819
1828
|
if (!s && !o)
|
|
1820
1829
|
return null;
|
|
@@ -1850,15 +1859,15 @@ function he(n, t) {
|
|
|
1850
1859
|
const e = x(n), i = x(t);
|
|
1851
1860
|
return Vi(e, i);
|
|
1852
1861
|
}
|
|
1853
|
-
function
|
|
1854
|
-
gi(oi), gi(li),
|
|
1862
|
+
function Zr() {
|
|
1863
|
+
gi(oi), gi(li), Wr(
|
|
1855
1864
|
li,
|
|
1856
1865
|
oi,
|
|
1857
|
-
|
|
1858
|
-
|
|
1866
|
+
Pr,
|
|
1867
|
+
Mr
|
|
1859
1868
|
);
|
|
1860
1869
|
}
|
|
1861
|
-
|
|
1870
|
+
Zr();
|
|
1862
1871
|
new Array(6);
|
|
1863
1872
|
function zi() {
|
|
1864
1873
|
return [1, 0, 0, 1, 0, 0];
|
|
@@ -1878,7 +1887,7 @@ function Wi(n, t, e, i, r, s, o) {
|
|
|
1878
1887
|
}
|
|
1879
1888
|
return s && s.length != a && (s.length = a), s;
|
|
1880
1889
|
}
|
|
1881
|
-
function
|
|
1890
|
+
function Kr(n, t, e, i, r, s, o) {
|
|
1882
1891
|
o = o || [];
|
|
1883
1892
|
const a = Math.cos(r), l = Math.sin(r), h = s[0], c = s[1];
|
|
1884
1893
|
let u = 0;
|
|
@@ -1890,7 +1899,7 @@ function Zr(n, t, e, i, r, s, o) {
|
|
|
1890
1899
|
}
|
|
1891
1900
|
return o && o.length != u && (o.length = u), o;
|
|
1892
1901
|
}
|
|
1893
|
-
function
|
|
1902
|
+
function Dr(n, t, e, i, r, s, o, a) {
|
|
1894
1903
|
a = a || [];
|
|
1895
1904
|
const l = o[0], h = o[1];
|
|
1896
1905
|
let c = 0;
|
|
@@ -1902,7 +1911,7 @@ function Kr(n, t, e, i, r, s, o, a) {
|
|
|
1902
1911
|
}
|
|
1903
1912
|
return a && a.length != c && (a.length = c), a;
|
|
1904
1913
|
}
|
|
1905
|
-
function
|
|
1914
|
+
function Qr(n, t, e, i, r, s, o) {
|
|
1906
1915
|
o = o || [];
|
|
1907
1916
|
let a = 0;
|
|
1908
1917
|
for (let l = t; l < e; l += i) {
|
|
@@ -1912,7 +1921,7 @@ function Dr(n, t, e, i, r, s, o) {
|
|
|
1912
1921
|
}
|
|
1913
1922
|
return o && o.length != a && (o.length = a), o;
|
|
1914
1923
|
}
|
|
1915
|
-
const fi = zi(),
|
|
1924
|
+
const fi = zi(), ts = [NaN, NaN];
|
|
1916
1925
|
class qi extends Ti {
|
|
1917
1926
|
constructor() {
|
|
1918
1927
|
super(), this.extent_ = _e(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Gi(
|
|
@@ -1963,7 +1972,7 @@ class qi extends Ti {
|
|
|
1963
1972
|
* @return {boolean} Contains (x, y).
|
|
1964
1973
|
*/
|
|
1965
1974
|
containsXY(t, e) {
|
|
1966
|
-
return this.closestPointXY(t, e,
|
|
1975
|
+
return this.closestPointXY(t, e, ts, Number.MIN_VALUE) === 0;
|
|
1967
1976
|
}
|
|
1968
1977
|
/**
|
|
1969
1978
|
* Return the closest point of the geometry to the passed point as
|
|
@@ -2006,7 +2015,7 @@ class qi extends Ti {
|
|
|
2006
2015
|
const e = this.computeExtent(this.extent_);
|
|
2007
2016
|
(isNaN(e[0]) || isNaN(e[1])) && ve(e), this.extentRevision_ = this.getRevision();
|
|
2008
2017
|
}
|
|
2009
|
-
return
|
|
2018
|
+
return vr(this.extent_, t);
|
|
2010
2019
|
}
|
|
2011
2020
|
/**
|
|
2012
2021
|
* Rotate the geometry around a given coordinate. This modifies the geometry
|
|
@@ -2288,7 +2297,7 @@ class Z extends qi {
|
|
|
2288
2297
|
const i = this.getFlatCoordinates();
|
|
2289
2298
|
if (i) {
|
|
2290
2299
|
const r = this.getStride();
|
|
2291
|
-
|
|
2300
|
+
Kr(
|
|
2292
2301
|
i,
|
|
2293
2302
|
0,
|
|
2294
2303
|
i.length,
|
|
@@ -2314,7 +2323,7 @@ class Z extends qi {
|
|
|
2314
2323
|
const r = this.getFlatCoordinates();
|
|
2315
2324
|
if (r) {
|
|
2316
2325
|
const s = this.getStride();
|
|
2317
|
-
|
|
2326
|
+
Dr(
|
|
2318
2327
|
r,
|
|
2319
2328
|
0,
|
|
2320
2329
|
r.length,
|
|
@@ -2338,7 +2347,7 @@ class Z extends qi {
|
|
|
2338
2347
|
const i = this.getFlatCoordinates();
|
|
2339
2348
|
if (i) {
|
|
2340
2349
|
const r = this.getStride();
|
|
2341
|
-
|
|
2350
|
+
Qr(
|
|
2342
2351
|
i,
|
|
2343
2352
|
0,
|
|
2344
2353
|
i.length,
|
|
@@ -2360,7 +2369,7 @@ function pi(n) {
|
|
|
2360
2369
|
return n == "XY" ? t = 2 : n == "XYZ" || n == "XYM" ? t = 3 : n == "XYZM" && (t = 4), /** @type {number} */
|
|
2361
2370
|
t;
|
|
2362
2371
|
}
|
|
2363
|
-
function
|
|
2372
|
+
function es(n, t, e, i) {
|
|
2364
2373
|
for (let r = 0, s = e.length; r < s; ++r)
|
|
2365
2374
|
n[t++] = e[r];
|
|
2366
2375
|
return t;
|
|
@@ -2416,15 +2425,15 @@ function Ki(n, t, e, i) {
|
|
|
2416
2425
|
}
|
|
2417
2426
|
return r;
|
|
2418
2427
|
}
|
|
2419
|
-
function
|
|
2420
|
-
return !
|
|
2428
|
+
function is(n, t, e, i, r) {
|
|
2429
|
+
return !gr(
|
|
2421
2430
|
r,
|
|
2422
2431
|
/**
|
|
2423
2432
|
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
|
|
2424
2433
|
* @return {boolean} Contains (x, y).
|
|
2425
2434
|
*/
|
|
2426
2435
|
function(o) {
|
|
2427
|
-
return !
|
|
2436
|
+
return !j(
|
|
2428
2437
|
n,
|
|
2429
2438
|
t,
|
|
2430
2439
|
e,
|
|
@@ -2435,7 +2444,7 @@ function es(n, t, e, i, r) {
|
|
|
2435
2444
|
}
|
|
2436
2445
|
);
|
|
2437
2446
|
}
|
|
2438
|
-
function
|
|
2447
|
+
function j(n, t, e, i, r, s) {
|
|
2439
2448
|
let o = 0, a = n[e - i], l = n[e - i + 1];
|
|
2440
2449
|
for (; t < e; t += i) {
|
|
2441
2450
|
const h = n[t], c = n[t + 1];
|
|
@@ -2444,14 +2453,14 @@ function H(n, t, e, i, r, s) {
|
|
|
2444
2453
|
return o !== 0;
|
|
2445
2454
|
}
|
|
2446
2455
|
function Me(n, t, e, i, r, s) {
|
|
2447
|
-
if (e.length === 0 || !
|
|
2456
|
+
if (e.length === 0 || !j(n, t, e[0], i, r, s))
|
|
2448
2457
|
return !1;
|
|
2449
2458
|
for (let o = 1, a = e.length; o < a; ++o)
|
|
2450
|
-
if (
|
|
2459
|
+
if (j(n, e[o - 1], e[o], i, r, s))
|
|
2451
2460
|
return !1;
|
|
2452
2461
|
return !0;
|
|
2453
2462
|
}
|
|
2454
|
-
function
|
|
2463
|
+
function ns(n, t, e, i, r, s) {
|
|
2455
2464
|
if (e.length === 0)
|
|
2456
2465
|
return !1;
|
|
2457
2466
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
@@ -2494,7 +2503,7 @@ function Di(n, t, e, i, r) {
|
|
|
2494
2503
|
}
|
|
2495
2504
|
return s;
|
|
2496
2505
|
}
|
|
2497
|
-
function
|
|
2506
|
+
function Ht(n, t, e, i, r, s, o) {
|
|
2498
2507
|
let a, l;
|
|
2499
2508
|
const h = (e - t) / i;
|
|
2500
2509
|
if (h === 1)
|
|
@@ -2508,7 +2517,7 @@ function Ut(n, t, e, i, r, s, o) {
|
|
|
2508
2517
|
const b = n[_], v = n[_ + 1];
|
|
2509
2518
|
d += Math.sqrt((b - c) * (b - c) + (v - u) * (v - u)), g.push(d), c = b, u = v;
|
|
2510
2519
|
}
|
|
2511
|
-
const f = r * d, p =
|
|
2520
|
+
const f = r * d, p = nr(g, f);
|
|
2512
2521
|
p < 0 ? (l = (f - g[-p - 2]) / (g[-p - 1] - g[-p - 2]), a = t + (-p - 2) * i) : a = t + p * i;
|
|
2513
2522
|
}
|
|
2514
2523
|
o = o > 1 ? o : 2, s = s || new Array(o);
|
|
@@ -2546,7 +2555,7 @@ function ce(n, t, e, i, r, s) {
|
|
|
2546
2555
|
);
|
|
2547
2556
|
return o.push(r), o;
|
|
2548
2557
|
}
|
|
2549
|
-
function
|
|
2558
|
+
function rs(n, t, e, i, r, s, o) {
|
|
2550
2559
|
if (o)
|
|
2551
2560
|
return ce(
|
|
2552
2561
|
n,
|
|
@@ -2580,7 +2589,7 @@ function ns(n, t, e, i, r, s, o) {
|
|
|
2580
2589
|
}
|
|
2581
2590
|
return null;
|
|
2582
2591
|
}
|
|
2583
|
-
function
|
|
2592
|
+
function ss(n, t, e, i) {
|
|
2584
2593
|
for (; t < e - i; ) {
|
|
2585
2594
|
for (let r = 0; r < i; ++r) {
|
|
2586
2595
|
const s = n[t + r];
|
|
@@ -2624,7 +2633,7 @@ function Qi(n, t, e, i, r) {
|
|
|
2624
2633
|
}
|
|
2625
2634
|
return !0;
|
|
2626
2635
|
}
|
|
2627
|
-
function
|
|
2636
|
+
function Ut(n, t, e, i, r) {
|
|
2628
2637
|
r = r !== void 0 ? r : !1;
|
|
2629
2638
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
2630
2639
|
const a = e[s], l = $e(
|
|
@@ -2633,13 +2642,13 @@ function jt(n, t, e, i, r) {
|
|
|
2633
2642
|
a,
|
|
2634
2643
|
i
|
|
2635
2644
|
);
|
|
2636
|
-
(s === 0 ? r && l || !r && !l : r && !l || !r && l) &&
|
|
2645
|
+
(s === 0 ? r && l || !r && !l : r && !l || !r && l) && ss(n, t, a, i), t = a;
|
|
2637
2646
|
}
|
|
2638
2647
|
return t;
|
|
2639
2648
|
}
|
|
2640
2649
|
function ue(n, t, e, i, r) {
|
|
2641
2650
|
for (let s = 0, o = e.length; s < o; ++s)
|
|
2642
|
-
t =
|
|
2651
|
+
t = Ut(
|
|
2643
2652
|
n,
|
|
2644
2653
|
t,
|
|
2645
2654
|
e[s],
|
|
@@ -2648,7 +2657,7 @@ function ue(n, t, e, i, r) {
|
|
|
2648
2657
|
);
|
|
2649
2658
|
return t;
|
|
2650
2659
|
}
|
|
2651
|
-
function
|
|
2660
|
+
function os(n, t) {
|
|
2652
2661
|
const e = [];
|
|
2653
2662
|
let i = 0, r = 0, s;
|
|
2654
2663
|
for (let o = 0, a = t.length; o < a; ++o) {
|
|
@@ -2680,8 +2689,8 @@ function Wt(n, t, e, i, r, s, o) {
|
|
|
2680
2689
|
let g = 0;
|
|
2681
2690
|
const f = n[d], p = n[d + 1], _ = n[u], b = n[u + 1];
|
|
2682
2691
|
for (let v = d + i; v < u; v += i) {
|
|
2683
|
-
const S = n[v], E = n[v + 1],
|
|
2684
|
-
|
|
2692
|
+
const S = n[v], E = n[v + 1], L = wr(S, E, f, p, _, b);
|
|
2693
|
+
L > g && (c = v, g = L);
|
|
2685
2694
|
}
|
|
2686
2695
|
g > r && (l[(c - t) / i] = 1, d + i < c && h.push(d, c), c + i < u && h.push(c, u));
|
|
2687
2696
|
}
|
|
@@ -2707,7 +2716,7 @@ function tn(n, t, e, i, r, s, o, a) {
|
|
|
2707
2716
|
function Q(n, t) {
|
|
2708
2717
|
return t * Math.round(n / t);
|
|
2709
2718
|
}
|
|
2710
|
-
function
|
|
2719
|
+
function as(n, t, e, i, r, s, o) {
|
|
2711
2720
|
if (t == e)
|
|
2712
2721
|
return o;
|
|
2713
2722
|
let a = Q(n[t], r), l = Q(n[t + 1], r);
|
|
@@ -2733,7 +2742,7 @@ function os(n, t, e, i, r, s, o) {
|
|
|
2733
2742
|
function Fe(n, t, e, i, r, s, o, a) {
|
|
2734
2743
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
2735
2744
|
const c = e[l];
|
|
2736
|
-
o =
|
|
2745
|
+
o = as(
|
|
2737
2746
|
n,
|
|
2738
2747
|
t,
|
|
2739
2748
|
c,
|
|
@@ -2745,7 +2754,7 @@ function Fe(n, t, e, i, r, s, o, a) {
|
|
|
2745
2754
|
}
|
|
2746
2755
|
return o;
|
|
2747
2756
|
}
|
|
2748
|
-
function
|
|
2757
|
+
function ls(n, t, e, i, r, s, o, a) {
|
|
2749
2758
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
2750
2759
|
const c = e[l], u = [];
|
|
2751
2760
|
o = Fe(
|
|
@@ -2840,7 +2849,7 @@ class B extends qi {
|
|
|
2840
2849
|
ve(t);
|
|
2841
2850
|
const e = this.geometries_;
|
|
2842
2851
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
2843
|
-
|
|
2852
|
+
ur(t, e[i].getExtent());
|
|
2844
2853
|
return t;
|
|
2845
2854
|
}
|
|
2846
2855
|
/**
|
|
@@ -3023,7 +3032,7 @@ function nn(n, t, e, i) {
|
|
|
3023
3032
|
}
|
|
3024
3033
|
return r;
|
|
3025
3034
|
}
|
|
3026
|
-
function
|
|
3035
|
+
function hs(n, t, e, i) {
|
|
3027
3036
|
let r = 0;
|
|
3028
3037
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3029
3038
|
const a = e[s];
|
|
@@ -3064,21 +3073,21 @@ function Ge(n, t, e, i, r) {
|
|
|
3064
3073
|
}
|
|
3065
3074
|
return r;
|
|
3066
3075
|
}
|
|
3067
|
-
function
|
|
3076
|
+
function Ie(n, t, e, i, r) {
|
|
3068
3077
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3069
3078
|
const a = e[s];
|
|
3070
3079
|
r = Ge(n, t, a, i, r), t = a;
|
|
3071
3080
|
}
|
|
3072
3081
|
return r;
|
|
3073
3082
|
}
|
|
3074
|
-
function
|
|
3083
|
+
function cs(n, t, e, i, r) {
|
|
3075
3084
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3076
3085
|
const a = e[s];
|
|
3077
|
-
r =
|
|
3086
|
+
r = Ie(n, t, a, i, r), t = a[a.length - 1];
|
|
3078
3087
|
}
|
|
3079
3088
|
return r;
|
|
3080
3089
|
}
|
|
3081
|
-
function
|
|
3090
|
+
function Le(n, t, e, i, r, s, o, a, l, h, c) {
|
|
3082
3091
|
if (t == e)
|
|
3083
3092
|
return h;
|
|
3084
3093
|
let u, d;
|
|
@@ -3134,7 +3143,7 @@ function Re(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3134
3143
|
c = c || [NaN, NaN];
|
|
3135
3144
|
for (let u = 0, d = e.length; u < d; ++u) {
|
|
3136
3145
|
const g = e[u];
|
|
3137
|
-
h =
|
|
3146
|
+
h = Le(
|
|
3138
3147
|
n,
|
|
3139
3148
|
t,
|
|
3140
3149
|
g,
|
|
@@ -3150,7 +3159,7 @@ function Re(n, t, e, i, r, s, o, a, l, h, c) {
|
|
|
3150
3159
|
}
|
|
3151
3160
|
return h;
|
|
3152
3161
|
}
|
|
3153
|
-
function
|
|
3162
|
+
function us(n, t, e, i, r, s, o, a, l, h, c) {
|
|
3154
3163
|
c = c || [NaN, NaN];
|
|
3155
3164
|
for (let u = 0, d = e.length; u < d; ++u) {
|
|
3156
3165
|
const g = e[u];
|
|
@@ -3192,7 +3201,7 @@ function Te(n, t, e, i, r) {
|
|
|
3192
3201
|
}
|
|
3193
3202
|
return r.length = s, r;
|
|
3194
3203
|
}
|
|
3195
|
-
function
|
|
3204
|
+
function ds(n, t, e, i, r) {
|
|
3196
3205
|
r = r !== void 0 ? r : [];
|
|
3197
3206
|
let s = 0;
|
|
3198
3207
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
@@ -3250,7 +3259,7 @@ class vt extends Z {
|
|
|
3250
3259
|
this.stride,
|
|
3251
3260
|
0
|
|
3252
3261
|
)
|
|
3253
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
3262
|
+
), this.maxDeltaRevision_ = this.getRevision()), Le(
|
|
3254
3263
|
this.flatCoordinates,
|
|
3255
3264
|
0,
|
|
3256
3265
|
this.flatCoordinates.length,
|
|
@@ -3354,7 +3363,7 @@ function rn(n, t, e, i, r) {
|
|
|
3354
3363
|
return !1;
|
|
3355
3364
|
}
|
|
3356
3365
|
function Zt(n, t, e, i, r, s) {
|
|
3357
|
-
return s = s ??
|
|
3366
|
+
return s = s ?? ji(_e(), n, t, e, i), _r(r, s) ? s[0] >= r[0] && s[2] <= r[2] || s[1] >= r[1] && s[3] <= r[3] ? !0 : rn(
|
|
3358
3367
|
n,
|
|
3359
3368
|
t,
|
|
3360
3369
|
e,
|
|
@@ -3366,11 +3375,11 @@ function Zt(n, t, e, i, r, s) {
|
|
|
3366
3375
|
* `false` otherwise.
|
|
3367
3376
|
*/
|
|
3368
3377
|
function(o, a) {
|
|
3369
|
-
return
|
|
3378
|
+
return Cr(r, o, a);
|
|
3370
3379
|
}
|
|
3371
3380
|
) : !1;
|
|
3372
3381
|
}
|
|
3373
|
-
function
|
|
3382
|
+
function gs(n, t, e, i, r) {
|
|
3374
3383
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3375
3384
|
if (Zt(n, t, e[s], i, r))
|
|
3376
3385
|
return !0;
|
|
@@ -3378,29 +3387,29 @@ function ds(n, t, e, i, r) {
|
|
|
3378
3387
|
}
|
|
3379
3388
|
return !1;
|
|
3380
3389
|
}
|
|
3381
|
-
function
|
|
3382
|
-
return !!(Zt(n, t, e, i, r) ||
|
|
3390
|
+
function fs(n, t, e, i, r) {
|
|
3391
|
+
return !!(Zt(n, t, e, i, r) || j(
|
|
3383
3392
|
n,
|
|
3384
3393
|
t,
|
|
3385
3394
|
e,
|
|
3386
3395
|
i,
|
|
3387
3396
|
r[0],
|
|
3388
3397
|
r[1]
|
|
3389
|
-
) ||
|
|
3398
|
+
) || j(
|
|
3390
3399
|
n,
|
|
3391
3400
|
t,
|
|
3392
3401
|
e,
|
|
3393
3402
|
i,
|
|
3394
3403
|
r[0],
|
|
3395
3404
|
r[3]
|
|
3396
|
-
) ||
|
|
3405
|
+
) || j(
|
|
3397
3406
|
n,
|
|
3398
3407
|
t,
|
|
3399
3408
|
e,
|
|
3400
3409
|
i,
|
|
3401
3410
|
r[2],
|
|
3402
3411
|
r[1]
|
|
3403
|
-
) ||
|
|
3412
|
+
) || j(
|
|
3404
3413
|
n,
|
|
3405
3414
|
t,
|
|
3406
3415
|
e,
|
|
@@ -3410,12 +3419,12 @@ function gs(n, t, e, i, r) {
|
|
|
3410
3419
|
));
|
|
3411
3420
|
}
|
|
3412
3421
|
function sn(n, t, e, i, r) {
|
|
3413
|
-
if (!
|
|
3422
|
+
if (!fs(n, t, e[0], i, r))
|
|
3414
3423
|
return !1;
|
|
3415
3424
|
if (e.length === 1)
|
|
3416
3425
|
return !0;
|
|
3417
3426
|
for (let s = 1, o = e.length; s < o; ++s)
|
|
3418
|
-
if (
|
|
3427
|
+
if (is(
|
|
3419
3428
|
n,
|
|
3420
3429
|
e[s - 1],
|
|
3421
3430
|
e[s],
|
|
@@ -3431,7 +3440,7 @@ function sn(n, t, e, i, r) {
|
|
|
3431
3440
|
return !1;
|
|
3432
3441
|
return !0;
|
|
3433
3442
|
}
|
|
3434
|
-
function
|
|
3443
|
+
function ps(n, t, e, i, r) {
|
|
3435
3444
|
for (let s = 0, o = e.length; s < o; ++s) {
|
|
3436
3445
|
const a = e[s];
|
|
3437
3446
|
if (sn(n, t, a, i, r))
|
|
@@ -3440,7 +3449,7 @@ function fs(n, t, e, i, r) {
|
|
|
3440
3449
|
}
|
|
3441
3450
|
return !1;
|
|
3442
3451
|
}
|
|
3443
|
-
function
|
|
3452
|
+
function ys(n, t, e, i) {
|
|
3444
3453
|
let r = n[t], s = n[t + 1], o = 0;
|
|
3445
3454
|
for (let a = t + i; a < e; a += i) {
|
|
3446
3455
|
const l = n[a], h = n[a + 1];
|
|
@@ -3503,7 +3512,7 @@ class V extends Z {
|
|
|
3503
3512
|
this.stride,
|
|
3504
3513
|
0
|
|
3505
3514
|
)
|
|
3506
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
3515
|
+
), this.maxDeltaRevision_ = this.getRevision()), Le(
|
|
3507
3516
|
this.flatCoordinates,
|
|
3508
3517
|
0,
|
|
3509
3518
|
this.flatCoordinates.length,
|
|
@@ -3585,7 +3594,7 @@ class V extends Z {
|
|
|
3585
3594
|
* @api
|
|
3586
3595
|
*/
|
|
3587
3596
|
getCoordinateAt(t, e) {
|
|
3588
|
-
return
|
|
3597
|
+
return Ht(
|
|
3589
3598
|
this.flatCoordinates,
|
|
3590
3599
|
0,
|
|
3591
3600
|
this.flatCoordinates.length,
|
|
@@ -3601,7 +3610,7 @@ class V extends Z {
|
|
|
3601
3610
|
* @api
|
|
3602
3611
|
*/
|
|
3603
3612
|
getLength() {
|
|
3604
|
-
return
|
|
3613
|
+
return ys(
|
|
3605
3614
|
this.flatCoordinates,
|
|
3606
3615
|
0,
|
|
3607
3616
|
this.flatCoordinates.length,
|
|
@@ -3744,7 +3753,7 @@ class Ct extends Z {
|
|
|
3744
3753
|
*/
|
|
3745
3754
|
closestPointXY(t, e, i, r) {
|
|
3746
3755
|
return r < q(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
3747
|
-
|
|
3756
|
+
Ie(
|
|
3748
3757
|
this.flatCoordinates,
|
|
3749
3758
|
0,
|
|
3750
3759
|
this.ends_,
|
|
@@ -3787,7 +3796,7 @@ class Ct extends Z {
|
|
|
3787
3796
|
* @api
|
|
3788
3797
|
*/
|
|
3789
3798
|
getCoordinateAtM(t, e, i) {
|
|
3790
|
-
return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, i = i !== void 0 ? i : !1,
|
|
3799
|
+
return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, i = i !== void 0 ? i : !1, rs(
|
|
3791
3800
|
this.flatCoordinates,
|
|
3792
3801
|
0,
|
|
3793
3802
|
this.ends_,
|
|
@@ -3857,7 +3866,7 @@ class Ct extends Z {
|
|
|
3857
3866
|
let i = 0;
|
|
3858
3867
|
const r = this.ends_, s = this.stride;
|
|
3859
3868
|
for (let o = 0, a = r.length; o < a; ++o) {
|
|
3860
|
-
const l = r[o], h =
|
|
3869
|
+
const l = r[o], h = Ht(
|
|
3861
3870
|
e,
|
|
3862
3871
|
i,
|
|
3863
3872
|
l,
|
|
@@ -3904,7 +3913,7 @@ class Ct extends Z {
|
|
|
3904
3913
|
* @override
|
|
3905
3914
|
*/
|
|
3906
3915
|
intersectsExtent(t) {
|
|
3907
|
-
return
|
|
3916
|
+
return gs(
|
|
3908
3917
|
this.flatCoordinates,
|
|
3909
3918
|
0,
|
|
3910
3919
|
this.ends_,
|
|
@@ -4016,7 +4025,7 @@ class z extends Z {
|
|
|
4016
4025
|
* @override
|
|
4017
4026
|
*/
|
|
4018
4027
|
setCoordinates(t, e) {
|
|
4019
|
-
this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
4028
|
+
this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = es(
|
|
4020
4029
|
this.flatCoordinates,
|
|
4021
4030
|
0,
|
|
4022
4031
|
t,
|
|
@@ -4229,7 +4238,7 @@ class J extends Z {
|
|
|
4229
4238
|
*/
|
|
4230
4239
|
closestPointXY(t, e, i, r) {
|
|
4231
4240
|
return r < q(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
4232
|
-
|
|
4241
|
+
Ie(
|
|
4233
4242
|
this.flatCoordinates,
|
|
4234
4243
|
0,
|
|
4235
4244
|
this.ends_,
|
|
@@ -4294,7 +4303,7 @@ class J extends Z {
|
|
|
4294
4303
|
*/
|
|
4295
4304
|
getCoordinates(t) {
|
|
4296
4305
|
let e;
|
|
4297
|
-
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(),
|
|
4306
|
+
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), Ut(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, Te(e, 0, this.ends_, this.stride);
|
|
4298
4307
|
}
|
|
4299
4308
|
/**
|
|
4300
4309
|
* @return {Array<number>} Ends.
|
|
@@ -4383,7 +4392,7 @@ class J extends Z {
|
|
|
4383
4392
|
getOrientedFlatCoordinates() {
|
|
4384
4393
|
if (this.orientedRevision_ != this.getRevision()) {
|
|
4385
4394
|
const t = this.flatCoordinates;
|
|
4386
|
-
Ae(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length =
|
|
4395
|
+
Ae(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = Ut(
|
|
4387
4396
|
this.orientedFlatCoordinates_,
|
|
4388
4397
|
0,
|
|
4389
4398
|
this.ends_,
|
|
@@ -4533,14 +4542,14 @@ class wt extends Z {
|
|
|
4533
4542
|
*/
|
|
4534
4543
|
closestPointXY(t, e, i, r) {
|
|
4535
4544
|
return r < q(this.getExtent(), t, e) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
4536
|
-
|
|
4545
|
+
cs(
|
|
4537
4546
|
this.flatCoordinates,
|
|
4538
4547
|
0,
|
|
4539
4548
|
this.endss_,
|
|
4540
4549
|
this.stride,
|
|
4541
4550
|
0
|
|
4542
4551
|
)
|
|
4543
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
4552
|
+
), this.maxDeltaRevision_ = this.getRevision()), us(
|
|
4544
4553
|
this.getOrientedFlatCoordinates(),
|
|
4545
4554
|
0,
|
|
4546
4555
|
this.endss_,
|
|
@@ -4560,7 +4569,7 @@ class wt extends Z {
|
|
|
4560
4569
|
* @override
|
|
4561
4570
|
*/
|
|
4562
4571
|
containsXY(t, e) {
|
|
4563
|
-
return
|
|
4572
|
+
return ns(
|
|
4564
4573
|
this.getOrientedFlatCoordinates(),
|
|
4565
4574
|
0,
|
|
4566
4575
|
this.endss_,
|
|
@@ -4575,7 +4584,7 @@ class wt extends Z {
|
|
|
4575
4584
|
* @api
|
|
4576
4585
|
*/
|
|
4577
4586
|
getArea() {
|
|
4578
|
-
return
|
|
4587
|
+
return hs(
|
|
4579
4588
|
this.getOrientedFlatCoordinates(),
|
|
4580
4589
|
0,
|
|
4581
4590
|
this.endss_,
|
|
@@ -4604,7 +4613,7 @@ class wt extends Z {
|
|
|
4604
4613
|
this.endss_,
|
|
4605
4614
|
this.stride,
|
|
4606
4615
|
t
|
|
4607
|
-
)) : e = this.flatCoordinates,
|
|
4616
|
+
)) : e = this.flatCoordinates, ds(
|
|
4608
4617
|
e,
|
|
4609
4618
|
0,
|
|
4610
4619
|
this.endss_,
|
|
@@ -4676,7 +4685,7 @@ class wt extends Z {
|
|
|
4676
4685
|
*/
|
|
4677
4686
|
getSimplifiedGeometryInternal(t) {
|
|
4678
4687
|
const e = [], i = [];
|
|
4679
|
-
return e.length =
|
|
4688
|
+
return e.length = ls(
|
|
4680
4689
|
this.flatCoordinates,
|
|
4681
4690
|
0,
|
|
4682
4691
|
this.endss_,
|
|
@@ -4752,7 +4761,7 @@ class wt extends Z {
|
|
|
4752
4761
|
* @override
|
|
4753
4762
|
*/
|
|
4754
4763
|
intersectsExtent(t) {
|
|
4755
|
-
return
|
|
4764
|
+
return ps(
|
|
4756
4765
|
this.getOrientedFlatCoordinates(),
|
|
4757
4766
|
0,
|
|
4758
4767
|
this.endss_,
|
|
@@ -4843,7 +4852,7 @@ class W {
|
|
|
4843
4852
|
*/
|
|
4844
4853
|
getFlatInteriorPoints() {
|
|
4845
4854
|
if (!this.flatInteriorPoints_) {
|
|
4846
|
-
const t =
|
|
4855
|
+
const t = os(this.flatCoordinates_, this.ends_), e = Ki(this.flatCoordinates_, 0, t, 2);
|
|
4847
4856
|
this.flatInteriorPoints_ = Di(
|
|
4848
4857
|
this.flatCoordinates_,
|
|
4849
4858
|
0,
|
|
@@ -4858,7 +4867,7 @@ class W {
|
|
|
4858
4867
|
* @return {Array<number>} Flat midpoint.
|
|
4859
4868
|
*/
|
|
4860
4869
|
getFlatMidpoint() {
|
|
4861
|
-
return this.flatMidpoints_ || (this.flatMidpoints_ =
|
|
4870
|
+
return this.flatMidpoints_ || (this.flatMidpoints_ = Ht(
|
|
4862
4871
|
this.flatCoordinates_,
|
|
4863
4872
|
0,
|
|
4864
4873
|
this.flatCoordinates_.length,
|
|
@@ -4879,7 +4888,7 @@ class W {
|
|
|
4879
4888
|
this.ends_
|
|
4880
4889
|
);
|
|
4881
4890
|
for (let r = 0, s = i.length; r < s; ++r) {
|
|
4882
|
-
const o = i[r], a =
|
|
4891
|
+
const o = i[r], a = Ht(t, e, o, 2, 0.5);
|
|
4883
4892
|
A(this.flatMidpoints_, a), e = o;
|
|
4884
4893
|
}
|
|
4885
4894
|
}
|
|
@@ -5208,7 +5217,7 @@ class on {
|
|
|
5208
5217
|
function bt(n, t, e) {
|
|
5209
5218
|
const i = e ? x(e.featureProjection) : null, r = e ? x(e.dataProjection) : null;
|
|
5210
5219
|
let s = n;
|
|
5211
|
-
if (i && r && !
|
|
5220
|
+
if (i && r && !qr(i, r)) {
|
|
5212
5221
|
t && (s = /** @type {T} */
|
|
5213
5222
|
n.clone());
|
|
5214
5223
|
const o = t ? i : r, a = t ? r : i;
|
|
@@ -5230,7 +5239,7 @@ function bt(n, t, e) {
|
|
|
5230
5239
|
}
|
|
5231
5240
|
return s;
|
|
5232
5241
|
}
|
|
5233
|
-
const
|
|
5242
|
+
const ms = {
|
|
5234
5243
|
Point: z,
|
|
5235
5244
|
LineString: V,
|
|
5236
5245
|
Polygon: J,
|
|
@@ -5238,8 +5247,8 @@ const ys = {
|
|
|
5238
5247
|
MultiLineString: Ct,
|
|
5239
5248
|
MultiPolygon: wt
|
|
5240
5249
|
};
|
|
5241
|
-
function
|
|
5242
|
-
return Array.isArray(t[0]) ? (Qi(n, 0, t, e) || (n = n.slice(), ue(n, 0, t, e)), n) : (Ae(n, 0, t, e) || (n = n.slice(),
|
|
5250
|
+
function _s(n, t, e) {
|
|
5251
|
+
return Array.isArray(t[0]) ? (Qi(n, 0, t, e) || (n = n.slice(), ue(n, 0, t, e)), n) : (Ae(n, 0, t, e) || (n = n.slice(), Ut(n, 0, t, e)), n);
|
|
5243
5252
|
}
|
|
5244
5253
|
function an(n, t) {
|
|
5245
5254
|
var s;
|
|
@@ -5255,7 +5264,7 @@ function an(n, t) {
|
|
|
5255
5264
|
return bt(
|
|
5256
5265
|
new W(
|
|
5257
5266
|
i,
|
|
5258
|
-
i === "Polygon" ?
|
|
5267
|
+
i === "Polygon" ? _s(e.flatCoordinates, e.ends, r) : e.flatCoordinates,
|
|
5259
5268
|
(s = e.ends) == null ? void 0 : s.flat(),
|
|
5260
5269
|
r,
|
|
5261
5270
|
n.properties || {},
|
|
@@ -5274,14 +5283,14 @@ function Ne(n, t) {
|
|
|
5274
5283
|
);
|
|
5275
5284
|
return new B(i);
|
|
5276
5285
|
}
|
|
5277
|
-
const e =
|
|
5286
|
+
const e = ms[n.type];
|
|
5278
5287
|
return bt(
|
|
5279
5288
|
new e(n.flatCoordinates, n.layout || "XY", n.ends),
|
|
5280
5289
|
!1,
|
|
5281
5290
|
t
|
|
5282
5291
|
);
|
|
5283
5292
|
}
|
|
5284
|
-
class
|
|
5293
|
+
class vs extends on {
|
|
5285
5294
|
constructor() {
|
|
5286
5295
|
super();
|
|
5287
5296
|
}
|
|
@@ -5460,7 +5469,7 @@ function Gt(n) {
|
|
|
5460
5469
|
}
|
|
5461
5470
|
return n !== null ? n : null;
|
|
5462
5471
|
}
|
|
5463
|
-
class
|
|
5472
|
+
class Cs extends vs {
|
|
5464
5473
|
/**
|
|
5465
5474
|
* @param {Options<FeatureType>} [options] Options.
|
|
5466
5475
|
*/
|
|
@@ -5549,7 +5558,7 @@ class vs extends _s {
|
|
|
5549
5558
|
* @override
|
|
5550
5559
|
*/
|
|
5551
5560
|
readGeometryFromObject(t, e) {
|
|
5552
|
-
return
|
|
5561
|
+
return ws(t, e);
|
|
5553
5562
|
}
|
|
5554
5563
|
/**
|
|
5555
5564
|
* @param {Object} object Object.
|
|
@@ -5593,7 +5602,7 @@ class vs extends _s {
|
|
|
5593
5602
|
if (r !== void 0 && (i.id = r), !t.hasProperties())
|
|
5594
5603
|
return i;
|
|
5595
5604
|
const s = t.getProperties(), o = t.getGeometry();
|
|
5596
|
-
return o && (i.geometry = de(o, e), delete s[t.getGeometryName()]),
|
|
5605
|
+
return o && (i.geometry = de(o, e), delete s[t.getGeometryName()]), Li(s) || (i.properties = s), i;
|
|
5597
5606
|
}
|
|
5598
5607
|
/**
|
|
5599
5608
|
* Encode an array of features as a GeoJSON object.
|
|
@@ -5633,49 +5642,49 @@ function Oe(n, t) {
|
|
|
5633
5642
|
let e;
|
|
5634
5643
|
switch (n.type) {
|
|
5635
5644
|
case "Point": {
|
|
5636
|
-
e =
|
|
5645
|
+
e = Es(
|
|
5637
5646
|
/** @type {GeoJSONPoint} */
|
|
5638
5647
|
n
|
|
5639
5648
|
);
|
|
5640
5649
|
break;
|
|
5641
5650
|
}
|
|
5642
5651
|
case "LineString": {
|
|
5643
|
-
e =
|
|
5652
|
+
e = xs(
|
|
5644
5653
|
/** @type {GeoJSONLineString} */
|
|
5645
5654
|
n
|
|
5646
5655
|
);
|
|
5647
5656
|
break;
|
|
5648
5657
|
}
|
|
5649
5658
|
case "Polygon": {
|
|
5650
|
-
e =
|
|
5659
|
+
e = $s(
|
|
5651
5660
|
/** @type {GeoJSONPolygon} */
|
|
5652
5661
|
n
|
|
5653
5662
|
);
|
|
5654
5663
|
break;
|
|
5655
5664
|
}
|
|
5656
5665
|
case "MultiPoint": {
|
|
5657
|
-
e =
|
|
5666
|
+
e = Ms(
|
|
5658
5667
|
/** @type {GeoJSONMultiPoint} */
|
|
5659
5668
|
n
|
|
5660
5669
|
);
|
|
5661
5670
|
break;
|
|
5662
5671
|
}
|
|
5663
5672
|
case "MultiLineString": {
|
|
5664
|
-
e =
|
|
5673
|
+
e = Ps(
|
|
5665
5674
|
/** @type {GeoJSONMultiLineString} */
|
|
5666
5675
|
n
|
|
5667
5676
|
);
|
|
5668
5677
|
break;
|
|
5669
5678
|
}
|
|
5670
5679
|
case "MultiPolygon": {
|
|
5671
|
-
e =
|
|
5680
|
+
e = Ss(
|
|
5672
5681
|
/** @type {GeoJSONMultiPolygon} */
|
|
5673
5682
|
n
|
|
5674
5683
|
);
|
|
5675
5684
|
break;
|
|
5676
5685
|
}
|
|
5677
5686
|
case "GeometryCollection": {
|
|
5678
|
-
e =
|
|
5687
|
+
e = bs(
|
|
5679
5688
|
/** @type {GeoJSONGeometryCollection} */
|
|
5680
5689
|
n
|
|
5681
5690
|
);
|
|
@@ -5686,11 +5695,11 @@ function Oe(n, t) {
|
|
|
5686
5695
|
}
|
|
5687
5696
|
return e;
|
|
5688
5697
|
}
|
|
5689
|
-
function
|
|
5698
|
+
function ws(n, t) {
|
|
5690
5699
|
const e = Oe(n);
|
|
5691
5700
|
return Ne(e, t);
|
|
5692
5701
|
}
|
|
5693
|
-
function
|
|
5702
|
+
function bs(n, t) {
|
|
5694
5703
|
return n.geometries.map(
|
|
5695
5704
|
/**
|
|
5696
5705
|
* @param {GeoJSONGeometry} geometry Geometry.
|
|
@@ -5701,7 +5710,7 @@ function ws(n, t) {
|
|
|
5701
5710
|
}
|
|
5702
5711
|
);
|
|
5703
5712
|
}
|
|
5704
|
-
function
|
|
5713
|
+
function Es(n) {
|
|
5705
5714
|
const t = n.coordinates;
|
|
5706
5715
|
return {
|
|
5707
5716
|
type: "Point",
|
|
@@ -5709,7 +5718,7 @@ function bs(n) {
|
|
|
5709
5718
|
layout: K(t.length)
|
|
5710
5719
|
};
|
|
5711
5720
|
}
|
|
5712
|
-
function
|
|
5721
|
+
function xs(n) {
|
|
5713
5722
|
var i;
|
|
5714
5723
|
const t = n.coordinates, e = t.flat();
|
|
5715
5724
|
return {
|
|
@@ -5719,7 +5728,7 @@ function Es(n) {
|
|
|
5719
5728
|
layout: K(((i = t[0]) == null ? void 0 : i.length) || 2)
|
|
5720
5729
|
};
|
|
5721
5730
|
}
|
|
5722
|
-
function
|
|
5731
|
+
function Ps(n) {
|
|
5723
5732
|
var s, o;
|
|
5724
5733
|
const t = n.coordinates, e = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o.length) || 2, i = [], r = $t(i, 0, t, e);
|
|
5725
5734
|
return {
|
|
@@ -5729,7 +5738,7 @@ function xs(n) {
|
|
|
5729
5738
|
layout: K(e)
|
|
5730
5739
|
};
|
|
5731
5740
|
}
|
|
5732
|
-
function
|
|
5741
|
+
function Ms(n) {
|
|
5733
5742
|
var e;
|
|
5734
5743
|
const t = n.coordinates;
|
|
5735
5744
|
return {
|
|
@@ -5738,7 +5747,7 @@ function Ps(n) {
|
|
|
5738
5747
|
layout: K(((e = t[0]) == null ? void 0 : e.length) || 2)
|
|
5739
5748
|
};
|
|
5740
5749
|
}
|
|
5741
|
-
function
|
|
5750
|
+
function Ss(n) {
|
|
5742
5751
|
var s, o;
|
|
5743
5752
|
const t = n.coordinates, e = [], i = ((o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o[0].length) || 2, r = Zi(
|
|
5744
5753
|
e,
|
|
@@ -5753,7 +5762,7 @@ function Ms(n) {
|
|
|
5753
5762
|
layout: K(i)
|
|
5754
5763
|
};
|
|
5755
5764
|
}
|
|
5756
|
-
function
|
|
5765
|
+
function $s(n) {
|
|
5757
5766
|
var s, o;
|
|
5758
5767
|
const t = n.coordinates, e = [], i = (o = (s = t[0]) == null ? void 0 : s[0]) == null ? void 0 : o.length, r = $t(e, 0, t, i);
|
|
5759
5768
|
return {
|
|
@@ -5769,21 +5778,21 @@ function de(n, t) {
|
|
|
5769
5778
|
let i;
|
|
5770
5779
|
switch (e) {
|
|
5771
5780
|
case "Point": {
|
|
5772
|
-
i =
|
|
5781
|
+
i = Rs(
|
|
5773
5782
|
/** @type {import("../geom/Point.js").default} */
|
|
5774
5783
|
n
|
|
5775
5784
|
);
|
|
5776
5785
|
break;
|
|
5777
5786
|
}
|
|
5778
5787
|
case "LineString": {
|
|
5779
|
-
i =
|
|
5788
|
+
i = Fs(
|
|
5780
5789
|
/** @type {import("../geom/LineString.js").default} */
|
|
5781
5790
|
n
|
|
5782
5791
|
);
|
|
5783
5792
|
break;
|
|
5784
5793
|
}
|
|
5785
5794
|
case "Polygon": {
|
|
5786
|
-
i =
|
|
5795
|
+
i = Ts(
|
|
5787
5796
|
/** @type {import("../geom/Polygon.js").default} */
|
|
5788
5797
|
n,
|
|
5789
5798
|
t
|
|
@@ -5791,14 +5800,14 @@ function de(n, t) {
|
|
|
5791
5800
|
break;
|
|
5792
5801
|
}
|
|
5793
5802
|
case "MultiPoint": {
|
|
5794
|
-
i =
|
|
5803
|
+
i = Is(
|
|
5795
5804
|
/** @type {import("../geom/MultiPoint.js").default} */
|
|
5796
5805
|
n
|
|
5797
5806
|
);
|
|
5798
5807
|
break;
|
|
5799
5808
|
}
|
|
5800
5809
|
case "MultiLineString": {
|
|
5801
|
-
i =
|
|
5810
|
+
i = Gs(
|
|
5802
5811
|
/** @type {import("../geom/MultiLineString.js").default} */
|
|
5803
5812
|
n
|
|
5804
5813
|
);
|
|
@@ -5813,7 +5822,7 @@ function de(n, t) {
|
|
|
5813
5822
|
break;
|
|
5814
5823
|
}
|
|
5815
5824
|
case "GeometryCollection": {
|
|
5816
|
-
i =
|
|
5825
|
+
i = As(
|
|
5817
5826
|
/** @type {import("../geom/GeometryCollection.js").default} */
|
|
5818
5827
|
n,
|
|
5819
5828
|
t
|
|
@@ -5832,7 +5841,7 @@ function de(n, t) {
|
|
|
5832
5841
|
}
|
|
5833
5842
|
return i;
|
|
5834
5843
|
}
|
|
5835
|
-
function
|
|
5844
|
+
function As(n, t) {
|
|
5836
5845
|
return t = Object.assign({}, t), delete t.featureProjection, {
|
|
5837
5846
|
type: "GeometryCollection",
|
|
5838
5847
|
geometries: n.getGeometriesArray().map(function(i) {
|
|
@@ -5840,19 +5849,19 @@ function $s(n, t) {
|
|
|
5840
5849
|
})
|
|
5841
5850
|
};
|
|
5842
5851
|
}
|
|
5843
|
-
function
|
|
5852
|
+
function Fs(n, t) {
|
|
5844
5853
|
return {
|
|
5845
5854
|
type: "LineString",
|
|
5846
5855
|
coordinates: n.getCoordinates()
|
|
5847
5856
|
};
|
|
5848
5857
|
}
|
|
5849
|
-
function
|
|
5858
|
+
function Gs(n, t) {
|
|
5850
5859
|
return {
|
|
5851
5860
|
type: "MultiLineString",
|
|
5852
5861
|
coordinates: n.getCoordinates()
|
|
5853
5862
|
};
|
|
5854
5863
|
}
|
|
5855
|
-
function
|
|
5864
|
+
function Is(n, t) {
|
|
5856
5865
|
return {
|
|
5857
5866
|
type: "MultiPoint",
|
|
5858
5867
|
coordinates: n.getCoordinates()
|
|
@@ -5865,21 +5874,21 @@ function Ls(n, t) {
|
|
|
5865
5874
|
coordinates: n.getCoordinates(e)
|
|
5866
5875
|
};
|
|
5867
5876
|
}
|
|
5868
|
-
function
|
|
5877
|
+
function Rs(n, t) {
|
|
5869
5878
|
return {
|
|
5870
5879
|
type: "Point",
|
|
5871
5880
|
coordinates: n.getCoordinates()
|
|
5872
5881
|
};
|
|
5873
5882
|
}
|
|
5874
|
-
function
|
|
5883
|
+
function Ts(n, t) {
|
|
5875
5884
|
let e;
|
|
5876
5885
|
return t && (e = t.rightHanded), {
|
|
5877
5886
|
type: "Polygon",
|
|
5878
5887
|
coordinates: n.getCoordinates(e)
|
|
5879
5888
|
};
|
|
5880
5889
|
}
|
|
5881
|
-
const
|
|
5882
|
-
class
|
|
5890
|
+
const Ns = (n, t) => new Cs().writeFeaturesObject(n, t);
|
|
5891
|
+
class Os extends on {
|
|
5883
5892
|
constructor() {
|
|
5884
5893
|
super();
|
|
5885
5894
|
}
|
|
@@ -5901,7 +5910,7 @@ class Ns extends on {
|
|
|
5901
5910
|
*/
|
|
5902
5911
|
readFeature(t, e) {
|
|
5903
5912
|
return this.readFeatureFromText(
|
|
5904
|
-
|
|
5913
|
+
It(t),
|
|
5905
5914
|
this.adaptOptions(e)
|
|
5906
5915
|
);
|
|
5907
5916
|
}
|
|
@@ -5926,7 +5935,7 @@ class Ns extends on {
|
|
|
5926
5935
|
*/
|
|
5927
5936
|
readFeatures(t, e) {
|
|
5928
5937
|
return this.readFeaturesFromText(
|
|
5929
|
-
|
|
5938
|
+
It(t),
|
|
5930
5939
|
this.adaptOptions(e)
|
|
5931
5940
|
);
|
|
5932
5941
|
}
|
|
@@ -5951,7 +5960,7 @@ class Ns extends on {
|
|
|
5951
5960
|
*/
|
|
5952
5961
|
readGeometry(t, e) {
|
|
5953
5962
|
return this.readGeometryFromText(
|
|
5954
|
-
|
|
5963
|
+
It(t),
|
|
5955
5964
|
this.adaptOptions(e)
|
|
5956
5965
|
);
|
|
5957
5966
|
}
|
|
@@ -5974,7 +5983,7 @@ class Ns extends on {
|
|
|
5974
5983
|
* @override
|
|
5975
5984
|
*/
|
|
5976
5985
|
readProjection(t) {
|
|
5977
|
-
return this.readProjectionFromText(
|
|
5986
|
+
return this.readProjectionFromText(It(t));
|
|
5978
5987
|
}
|
|
5979
5988
|
/**
|
|
5980
5989
|
* @param {string} text Text.
|
|
@@ -6051,17 +6060,17 @@ class Ns extends on {
|
|
|
6051
6060
|
return y();
|
|
6052
6061
|
}
|
|
6053
6062
|
}
|
|
6054
|
-
function
|
|
6063
|
+
function It(n) {
|
|
6055
6064
|
return typeof n == "string" ? n : "";
|
|
6056
6065
|
}
|
|
6057
|
-
const
|
|
6066
|
+
const ks = {
|
|
6058
6067
|
POINT: z,
|
|
6059
6068
|
LINESTRING: V,
|
|
6060
6069
|
POLYGON: J,
|
|
6061
6070
|
MULTIPOINT: At,
|
|
6062
6071
|
MULTILINESTRING: Ct,
|
|
6063
6072
|
MULTIPOLYGON: wt
|
|
6064
|
-
}, ln = "EMPTY", hn = "Z", cn = "M",
|
|
6073
|
+
}, ln = "EMPTY", hn = "Z", cn = "M", js = "ZM", m = {
|
|
6065
6074
|
START: 0,
|
|
6066
6075
|
TEXT: 1,
|
|
6067
6076
|
LEFT_PAREN: 2,
|
|
@@ -6177,7 +6186,7 @@ class Us {
|
|
|
6177
6186
|
return this.wkt.substring(e, this.index_--).toUpperCase();
|
|
6178
6187
|
}
|
|
6179
6188
|
}
|
|
6180
|
-
class
|
|
6189
|
+
class Xs {
|
|
6181
6190
|
/**
|
|
6182
6191
|
* @param {Lexer} lexer The lexer.
|
|
6183
6192
|
*/
|
|
@@ -6228,7 +6237,7 @@ class js {
|
|
|
6228
6237
|
const e = this.token_;
|
|
6229
6238
|
if (this.isTokenType(m.TEXT)) {
|
|
6230
6239
|
const i = e.value;
|
|
6231
|
-
i === hn ? t = "XYZ" : i === cn ? t = "XYM" : i ===
|
|
6240
|
+
i === hn ? t = "XYZ" : i === cn ? t = "XYM" : i === js && (t = "XYZM"), t !== "XY" && this.consume_();
|
|
6232
6241
|
}
|
|
6233
6242
|
return t;
|
|
6234
6243
|
}
|
|
@@ -6415,7 +6424,7 @@ class js {
|
|
|
6415
6424
|
const o = this.parseGeometryCollectionText_();
|
|
6416
6425
|
return new B(o);
|
|
6417
6426
|
}
|
|
6418
|
-
const r =
|
|
6427
|
+
const r = ks[e];
|
|
6419
6428
|
if (!r)
|
|
6420
6429
|
throw new Error("Invalid geometry type: " + e);
|
|
6421
6430
|
let s;
|
|
@@ -6453,7 +6462,7 @@ class js {
|
|
|
6453
6462
|
throw new Error(this.formatErrorMessage_());
|
|
6454
6463
|
}
|
|
6455
6464
|
}
|
|
6456
|
-
class
|
|
6465
|
+
class Ys extends Os {
|
|
6457
6466
|
/**
|
|
6458
6467
|
* @param {Options} [options] Options.
|
|
6459
6468
|
*/
|
|
@@ -6469,7 +6478,7 @@ class Xs extends Ns {
|
|
|
6469
6478
|
*/
|
|
6470
6479
|
parse_(t) {
|
|
6471
6480
|
const e = new Us(t);
|
|
6472
|
-
return new
|
|
6481
|
+
return new Xs(e).parse();
|
|
6473
6482
|
}
|
|
6474
6483
|
/**
|
|
6475
6484
|
* @protected
|
|
@@ -6554,13 +6563,13 @@ function un(n) {
|
|
|
6554
6563
|
const t = n.getCoordinates();
|
|
6555
6564
|
return t.length === 0 ? "" : t.join(" ");
|
|
6556
6565
|
}
|
|
6557
|
-
function
|
|
6566
|
+
function Bs(n) {
|
|
6558
6567
|
const t = [], e = n.getPoints();
|
|
6559
6568
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6560
6569
|
t.push("(" + un(e[i]) + ")");
|
|
6561
6570
|
return t.join(",");
|
|
6562
6571
|
}
|
|
6563
|
-
function
|
|
6572
|
+
function Vs(n) {
|
|
6564
6573
|
const t = [], e = n.getGeometries();
|
|
6565
6574
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6566
6575
|
t.push(gn(e[i]));
|
|
@@ -6572,7 +6581,7 @@ function ke(n) {
|
|
|
6572
6581
|
e.push(t[i].join(" "));
|
|
6573
6582
|
return e.join(",");
|
|
6574
6583
|
}
|
|
6575
|
-
function
|
|
6584
|
+
function zs(n) {
|
|
6576
6585
|
const t = [], e = n.getLineStrings();
|
|
6577
6586
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6578
6587
|
t.push("(" + ke(e[i]) + ")");
|
|
@@ -6584,32 +6593,32 @@ function dn(n) {
|
|
|
6584
6593
|
t.push("(" + ke(e[i]) + ")");
|
|
6585
6594
|
return t.join(",");
|
|
6586
6595
|
}
|
|
6587
|
-
function
|
|
6596
|
+
function Js(n) {
|
|
6588
6597
|
const t = [], e = n.getPolygons();
|
|
6589
6598
|
for (let i = 0, r = e.length; i < r; ++i)
|
|
6590
6599
|
t.push("(" + dn(e[i]) + ")");
|
|
6591
6600
|
return t.join(",");
|
|
6592
6601
|
}
|
|
6593
|
-
function
|
|
6602
|
+
function Ws(n) {
|
|
6594
6603
|
const t = n.getLayout();
|
|
6595
6604
|
let e = "";
|
|
6596
6605
|
return (t === "XYZ" || t === "XYZM") && (e += hn), (t === "XYM" || t === "XYZM") && (e += cn), e;
|
|
6597
6606
|
}
|
|
6598
|
-
const
|
|
6607
|
+
const qs = {
|
|
6599
6608
|
Point: un,
|
|
6600
6609
|
LineString: ke,
|
|
6601
6610
|
Polygon: dn,
|
|
6602
|
-
MultiPoint:
|
|
6603
|
-
MultiLineString:
|
|
6604
|
-
MultiPolygon:
|
|
6605
|
-
GeometryCollection:
|
|
6611
|
+
MultiPoint: Bs,
|
|
6612
|
+
MultiLineString: zs,
|
|
6613
|
+
MultiPolygon: Js,
|
|
6614
|
+
GeometryCollection: Vs
|
|
6606
6615
|
};
|
|
6607
6616
|
function gn(n) {
|
|
6608
|
-
const t = n.getType(), e =
|
|
6617
|
+
const t = n.getType(), e = qs[t], i = e(n);
|
|
6609
6618
|
let r = Hs[t];
|
|
6610
6619
|
if (typeof /** @type {?} */
|
|
6611
6620
|
n.getFlatCoordinates == "function") {
|
|
6612
|
-
const s =
|
|
6621
|
+
const s = Ws(
|
|
6613
6622
|
/** @type {import("../geom/SimpleGeometry.js").default} */
|
|
6614
6623
|
n
|
|
6615
6624
|
);
|
|
@@ -6617,7 +6626,7 @@ function gn(n) {
|
|
|
6617
6626
|
}
|
|
6618
6627
|
return i.length === 0 ? r + " " + ln : r + "(" + i + ")";
|
|
6619
6628
|
}
|
|
6620
|
-
const
|
|
6629
|
+
const Zs = (n, t) => new Ys().writeFeatures(n, t);
|
|
6621
6630
|
/**
|
|
6622
6631
|
* @license
|
|
6623
6632
|
* Copyright 2021 Google LLC
|
|
@@ -6627,7 +6636,7 @@ function _i(n, t, e) {
|
|
|
6627
6636
|
return n ? t(n) : e == null ? void 0 : e(n);
|
|
6628
6637
|
}
|
|
6629
6638
|
var Et, xt;
|
|
6630
|
-
class fn extends
|
|
6639
|
+
class fn extends U {
|
|
6631
6640
|
constructor() {
|
|
6632
6641
|
super();
|
|
6633
6642
|
/**
|
|
@@ -6644,7 +6653,7 @@ class fn extends j {
|
|
|
6644
6653
|
* Updates button states based on conditions
|
|
6645
6654
|
*/
|
|
6646
6655
|
updateButtonStates() {
|
|
6647
|
-
const { drawDisabled: e, discardDisabled: i } =
|
|
6656
|
+
const { drawDisabled: e, discardDisabled: i } = Kn(this);
|
|
6648
6657
|
$(this, Et, e), $(this, xt, i);
|
|
6649
6658
|
}
|
|
6650
6659
|
/**
|
|
@@ -6656,10 +6665,10 @@ class fn extends j {
|
|
|
6656
6665
|
render() {
|
|
6657
6666
|
this.updateButtonStates();
|
|
6658
6667
|
const e = this.currentlyDrawing ? "drawing" : "draw";
|
|
6659
|
-
return
|
|
6668
|
+
return H`
|
|
6660
6669
|
<style>
|
|
6661
|
-
${!this.unstyled && Kn}
|
|
6662
6670
|
${!this.unstyled && Dn}
|
|
6671
|
+
${!this.unstyled && Qn}
|
|
6663
6672
|
</style>
|
|
6664
6673
|
<div class="wrap-btn">
|
|
6665
6674
|
<slot></slot>
|
|
@@ -6688,7 +6697,7 @@ class fn extends j {
|
|
|
6688
6697
|
<!-- Import Button -->
|
|
6689
6698
|
${_i(
|
|
6690
6699
|
this.importFeatures,
|
|
6691
|
-
() =>
|
|
6700
|
+
() => H`
|
|
6692
6701
|
<!-- Import Input Field : Hidden -->
|
|
6693
6702
|
<input
|
|
6694
6703
|
type="file"
|
|
@@ -6715,7 +6724,7 @@ class fn extends j {
|
|
|
6715
6724
|
<!-- Geo JSON Wrapper -->
|
|
6716
6725
|
${_i(
|
|
6717
6726
|
this.showEditor,
|
|
6718
|
-
() =>
|
|
6727
|
+
() => H`
|
|
6719
6728
|
<div class="json-wrapper">
|
|
6720
6729
|
<!-- Geo JSON Editor -->
|
|
6721
6730
|
<textarea
|
|
@@ -6728,7 +6737,7 @@ class fn extends j {
|
|
|
6728
6737
|
<button
|
|
6729
6738
|
data-cy="copyBtn"
|
|
6730
6739
|
class="icon-copy"
|
|
6731
|
-
@click=${() =>
|
|
6740
|
+
@click=${() => tr(this.geoJSON)}
|
|
6732
6741
|
>
|
|
6733
6742
|
${this.unstyled ? "copy" : C}
|
|
6734
6743
|
</button>
|
|
@@ -6751,7 +6760,7 @@ R(fn, "properties", {
|
|
|
6751
6760
|
unstyled: { type: Boolean }
|
|
6752
6761
|
});
|
|
6753
6762
|
customElements.define("eox-drawtools-controller", fn);
|
|
6754
|
-
const
|
|
6763
|
+
const Ks = `
|
|
6755
6764
|
button.discard:before {
|
|
6756
6765
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23FF5252' viewBox='0 0 24 24'%3E%3Ctitle%3Etrash-can-outline%3C/title%3E%3Cpath d='M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z' /%3E%3C/svg%3E")
|
|
6757
6766
|
}
|
|
@@ -6796,16 +6805,16 @@ const Zs = `
|
|
|
6796
6805
|
color: white;
|
|
6797
6806
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Econtent-copy%3C/title%3E%3Cpath d='M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z' fill='white' /%3E%3C/svg%3E")
|
|
6798
6807
|
}
|
|
6799
|
-
`,
|
|
6808
|
+
`, pn = (n, t) => {
|
|
6800
6809
|
(() => {
|
|
6801
|
-
if (n.emitDrawnFeatures(), !n.multipleFeatures)
|
|
6810
|
+
if (n.emitDrawnFeatures(t), !n.multipleFeatures)
|
|
6802
6811
|
n.draw.setActive(!1), n.selectionEvents.removeSelectionEvent(), n.currentlyDrawing = !1;
|
|
6803
6812
|
else if (n.continuous)
|
|
6804
6813
|
if (!n.layerId)
|
|
6805
6814
|
n.drawLayer.getSource().clear(!0), n.drawnFeatures = [];
|
|
6806
6815
|
else {
|
|
6807
|
-
|
|
6808
|
-
n.drawLayer.getSource().clear(!0), n.drawLayer.getSource().addFeature(i), n.drawnFeatures = [i];
|
|
6816
|
+
let i;
|
|
6817
|
+
t ? i = n.drawnFeatures.at(-1) : (i = n.drawLayer.getSource().getFeatures().at(-1), n.drawLayer.getSource().clear(!0), n.drawLayer.getSource().addFeature(i)), n.drawnFeatures = [i];
|
|
6809
6818
|
}
|
|
6810
6819
|
})(), n.requestUpdate();
|
|
6811
6820
|
}, Ds = (n) => {
|
|
@@ -6878,7 +6887,7 @@ const Zs = `
|
|
|
6878
6887
|
/** @type {unknown} */
|
|
6879
6888
|
i.interactions.drawInteraction, n.modify = /** @type {import("ol/interaction").Modify} */
|
|
6880
6889
|
/** @type {unknown} */
|
|
6881
|
-
i.interactions.drawInteractionmodify, ge(n, i, n.layerId), (h = n.modify) == null || h.on("modifyend", () => n.onModifyEnd()), i.addEventListener("addfeatures", () =>
|
|
6890
|
+
i.interactions.drawInteractionmodify, ge(n, i, n.layerId), (h = n.modify) == null || h.on("modifyend", () => n.onModifyEnd()), i.addEventListener("addfeatures", () => pn(n)), { EoxMap: i, OlMap: r };
|
|
6882
6891
|
}, to = (n) => {
|
|
6883
6892
|
const t = () => {
|
|
6884
6893
|
n.drawnFeatures = [], n.draw.setActive(!1), n.selectionEvents.removeSelectionEvent(), n.drawLayer.getSource().clear(), n.geoJSON = null;
|
|
@@ -6886,36 +6895,34 @@ const Zs = `
|
|
|
6886
6895
|
n.emitDrawnFeatures(), n.currentlyDrawing = !1, n.requestUpdate();
|
|
6887
6896
|
};
|
|
6888
6897
|
t(), e();
|
|
6889
|
-
}, eo = (n, t) => {
|
|
6898
|
+
}, eo = (n, t, e) => {
|
|
6890
6899
|
setTimeout(() => {
|
|
6891
|
-
const
|
|
6892
|
-
n.drawnFeatures =
|
|
6893
|
-
|
|
6894
|
-
const
|
|
6895
|
-
return
|
|
6896
|
-
}) :
|
|
6897
|
-
let
|
|
6900
|
+
const r = e ? n.drawnFeatures : n.drawLayer.getSource().getFeatures(), s = n.eoxMap.projection || "EPSG:3857", o = n.projection;
|
|
6901
|
+
n.drawnFeatures = o ? r.map((l) => {
|
|
6902
|
+
l = l.clone();
|
|
6903
|
+
const h = l.getGeometry().transform(s, o);
|
|
6904
|
+
return l.setGeometry(h), l;
|
|
6905
|
+
}) : r;
|
|
6906
|
+
let a;
|
|
6898
6907
|
switch (n.format) {
|
|
6899
6908
|
case "geojson":
|
|
6900
|
-
|
|
6909
|
+
a = Ns(n.drawnFeatures);
|
|
6901
6910
|
break;
|
|
6902
6911
|
case "wkt":
|
|
6903
|
-
|
|
6912
|
+
a = Zs(n.drawnFeatures);
|
|
6904
6913
|
break;
|
|
6905
6914
|
case "feature":
|
|
6906
|
-
|
|
6915
|
+
a = n.drawnFeatures;
|
|
6907
6916
|
break;
|
|
6908
6917
|
default:
|
|
6909
|
-
|
|
6918
|
+
a = n.drawnFeatures;
|
|
6910
6919
|
break;
|
|
6911
6920
|
}
|
|
6912
|
-
n.updateGeoJSON(), n.requestUpdate(), t(
|
|
6921
|
+
n.updateGeoJSON(), n.requestUpdate(), t(a);
|
|
6913
6922
|
}, 0);
|
|
6914
6923
|
}, io = (n) => {
|
|
6915
6924
|
const t = (r) => {
|
|
6916
|
-
(r == null ? void 0 : r.detail.id) !== "SelectLayerClickInteraction" || !r.detail.feature || (n.
|
|
6917
|
-
new CustomEvent("addfeatures", { detail: r.detail })
|
|
6918
|
-
));
|
|
6925
|
+
(r == null ? void 0 : r.detail.id) !== "SelectLayerClickInteraction" || !r.detail.feature || (n.drawnFeatures.push(r.detail.feature), pn(n, r.detail.feature));
|
|
6919
6926
|
};
|
|
6920
6927
|
return { addSelectionEvent: () => {
|
|
6921
6928
|
n.layerId && (n.eoxMap.selectInteractions.SelectLayerHoverInteraction.setActive(!0), n.eoxMap.addEventListener("select", t));
|
|
@@ -6997,12 +7004,12 @@ function so(n, t) {
|
|
|
6997
7004
|
}
|
|
6998
7005
|
["dragenter", "dragover", "dragleave", "drop"].forEach((s) => {
|
|
6999
7006
|
t.addEventListener(s, e, !1), ["dragenter", "dragover"].includes(s) ? t.addEventListener(s, i, !1) : t.addEventListener(s, r, !1);
|
|
7000
|
-
}), t.addEventListener("drop", (s) =>
|
|
7007
|
+
}), t.addEventListener("drop", (s) => yn(s, n), !1);
|
|
7001
7008
|
}
|
|
7002
7009
|
function oo(n) {
|
|
7003
7010
|
n.preventDefault(), n.stopPropagation();
|
|
7004
7011
|
}
|
|
7005
|
-
function
|
|
7012
|
+
function yn(n, t) {
|
|
7006
7013
|
oo(n);
|
|
7007
7014
|
const e = n.dataTransfer ? n.dataTransfer.files : (
|
|
7008
7015
|
/**@type {HTMLInputElement}*/
|
|
@@ -7017,7 +7024,7 @@ function ao(n, t) {
|
|
|
7017
7024
|
};
|
|
7018
7025
|
}
|
|
7019
7026
|
var nt, rt, Pt, st, Mt;
|
|
7020
|
-
class lo extends
|
|
7027
|
+
class lo extends U {
|
|
7021
7028
|
constructor() {
|
|
7022
7029
|
super();
|
|
7023
7030
|
/**
|
|
@@ -7040,7 +7047,7 @@ class lo extends j {
|
|
|
7040
7047
|
* @type boolean
|
|
7041
7048
|
*/
|
|
7042
7049
|
F(this, Mt);
|
|
7043
|
-
this.allowModify = !1, this.for = "eox-map", this.currentlyDrawing = !1, this.draw = null, this.drawLayer = null, this.layerId = "", this.drawnFeatures = [], this.featureStyles = null, this.modify = null, this.multipleFeatures = !1, this.importFeatures = !1, this.showEditor = !1, this.showList = !1, this.projection = "EPSG:4326", this.type = "Polygon", this.selectionEvents = null, this.format = "feature", this.unstyled = !1, this.noShadow = !1;
|
|
7050
|
+
this.allowModify = !1, this.for = "eox-map", this.currentlyDrawing = !1, this.draw = null, this.drawLayer = null, this.layerId = "", this.drawnFeatures = [], this.featureName = "Feature", this.featureStyles = null, this.modify = null, this.multipleFeatures = !1, this.importFeatures = !1, this.showEditor = !1, this.showList = !1, this.projection = "EPSG:4326", this.type = "Polygon", this.selectionEvents = null, this.format = "feature", this.unstyled = !1, this.noShadow = !1;
|
|
7044
7051
|
}
|
|
7045
7052
|
// Define properties with defaults and types
|
|
7046
7053
|
static get properties() {
|
|
@@ -7052,6 +7059,7 @@ class lo extends j {
|
|
|
7052
7059
|
draw: { attribute: !1, state: !0 },
|
|
7053
7060
|
drawLayer: { attribute: !1, state: !0 },
|
|
7054
7061
|
drawnFeatures: { attribute: !1, state: !0, type: Array },
|
|
7062
|
+
featureName: { attribute: "feature-name", type: String },
|
|
7055
7063
|
layerId: { attribute: "layer-id", type: String },
|
|
7056
7064
|
featureStyles: { attribute: !1 },
|
|
7057
7065
|
modify: { attribute: !1, state: !0 },
|
|
@@ -7116,7 +7124,7 @@ class lo extends j {
|
|
|
7116
7124
|
* @param {DragEvent} evt - The event object from the file input interaction.
|
|
7117
7125
|
*/
|
|
7118
7126
|
handleFilesChange(e) {
|
|
7119
|
-
|
|
7127
|
+
yn(e, this);
|
|
7120
7128
|
}
|
|
7121
7129
|
/**
|
|
7122
7130
|
* @event onModifyEnd triggered when the modification of a shape is completed.
|
|
@@ -7136,11 +7144,12 @@ class lo extends j {
|
|
|
7136
7144
|
}
|
|
7137
7145
|
/**
|
|
7138
7146
|
* Triggers different events when the drawing of a shape is completed.
|
|
7147
|
+
* @param {import("ol/Feature").default} [selectedFeature] - The feature that was selected by the user.
|
|
7139
7148
|
*/
|
|
7140
|
-
emitDrawnFeatures() {
|
|
7141
|
-
eo(this, (
|
|
7142
|
-
this.dispatchEvent(new CustomEvent("drawupdate", { detail:
|
|
7143
|
-
});
|
|
7149
|
+
emitDrawnFeatures(e) {
|
|
7150
|
+
eo(this, (r) => {
|
|
7151
|
+
this.dispatchEvent(new CustomEvent("drawupdate", { detail: r }));
|
|
7152
|
+
}, e);
|
|
7144
7153
|
}
|
|
7145
7154
|
/**
|
|
7146
7155
|
* Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
|
|
@@ -7177,11 +7186,11 @@ class lo extends j {
|
|
|
7177
7186
|
// Render method for UI display
|
|
7178
7187
|
render() {
|
|
7179
7188
|
var e;
|
|
7180
|
-
return
|
|
7189
|
+
return H`
|
|
7181
7190
|
<style>
|
|
7182
7191
|
:host { display: block; }
|
|
7183
7192
|
${!this.unstyled && ro}
|
|
7184
|
-
${!this.unstyled &&
|
|
7193
|
+
${!this.unstyled && Ks}
|
|
7185
7194
|
</style>
|
|
7186
7195
|
|
|
7187
7196
|
<!-- Controller Component -->
|
|
@@ -7203,12 +7212,14 @@ class lo extends j {
|
|
|
7203
7212
|
></eox-drawtools-controller>
|
|
7204
7213
|
|
|
7205
7214
|
<!-- List Component -->
|
|
7206
|
-
${this.showList && ((e = this.drawnFeatures) != null && e.length) ?
|
|
7215
|
+
${this.showList && ((e = this.drawnFeatures) != null && e.length) ? H`<eox-drawtools-list
|
|
7216
|
+
.eoxDrawTools=${this}
|
|
7207
7217
|
.eoxMap=${this.eoxMap}
|
|
7208
7218
|
.olMap=${M(this, rt)}
|
|
7209
7219
|
.draw=${this.draw}
|
|
7210
7220
|
.drawLayer=${this.drawLayer}
|
|
7211
7221
|
.drawnFeatures=${this.drawnFeatures}
|
|
7222
|
+
.featureName=${this.featureName}
|
|
7212
7223
|
.modify=${this.modify}
|
|
7213
7224
|
.unstyled=${this.unstyled}
|
|
7214
7225
|
@changed=${() => {
|