@mapcreator/sdk 0.0.0-video.17 → 0.0.0-video.19
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/mapcreator-sdk.js +1004 -995
- package/dist/mapcreator-sdk.umd.cjs +52 -52
- package/dist/report.html +1 -1
- package/package.json +1 -1
package/dist/mapcreator-sdk.js
CHANGED
|
@@ -7762,25 +7762,25 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
7762
7762
|
function ca(e) {
|
|
7763
7763
|
return e && typeof ArrayBuffer < "u" && (e instanceof ArrayBuffer || e.constructor && e.constructor.name === "ArrayBuffer");
|
|
7764
7764
|
}
|
|
7765
|
-
function
|
|
7765
|
+
function la(e) {
|
|
7766
7766
|
return e.$name || e.constructor._classRegistryKey;
|
|
7767
7767
|
}
|
|
7768
|
-
function
|
|
7768
|
+
function ua(e) {
|
|
7769
7769
|
return !function(e) {
|
|
7770
7770
|
if (typeof e != "object" || !e) return !1;
|
|
7771
|
-
let t =
|
|
7771
|
+
let t = la(e);
|
|
7772
7772
|
return !(!t || t === "Object");
|
|
7773
7773
|
}(e) && (e == null || typeof e == "boolean" || typeof e == "number" || typeof e == "string" || e instanceof Boolean || e instanceof Number || e instanceof String || e instanceof Date || e instanceof RegExp || e instanceof Blob || e instanceof Error || ca(e) || ue(e) || ArrayBuffer.isView(e) || e instanceof ImageData);
|
|
7774
7774
|
}
|
|
7775
|
-
function
|
|
7776
|
-
if (
|
|
7775
|
+
function X(e, t) {
|
|
7776
|
+
if (ua(e)) return (ca(e) || ue(e)) && t && t.push(e), ArrayBuffer.isView(e) && t && t.push(e.buffer), e instanceof ImageData && t && t.push(e.data.buffer), e;
|
|
7777
7777
|
if (Array.isArray(e)) {
|
|
7778
7778
|
let n = [];
|
|
7779
|
-
for (let r of e) n.push(
|
|
7779
|
+
for (let r of e) n.push(X(r, t));
|
|
7780
7780
|
return n;
|
|
7781
7781
|
}
|
|
7782
7782
|
if (typeof e != "object") throw Error("can't serialize object of type " + typeof e);
|
|
7783
|
-
let n =
|
|
7783
|
+
let n = la(e);
|
|
7784
7784
|
if (!n) throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);
|
|
7785
7785
|
if (!sa[n]) throw Error(`${n} is not registered.`);
|
|
7786
7786
|
let { klass: r } = sa[n], i = r.serialize ? r.serialize(e, t) : {};
|
|
@@ -7790,7 +7790,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
7790
7790
|
for (let r in e) {
|
|
7791
7791
|
if (!e.hasOwnProperty(r) || sa[n].omit.indexOf(r) >= 0) continue;
|
|
7792
7792
|
let a = e[r];
|
|
7793
|
-
i[r] = sa[n].shallow.indexOf(r) >= 0 ? a :
|
|
7793
|
+
i[r] = sa[n].shallow.indexOf(r) >= 0 ? a : X(a, t);
|
|
7794
7794
|
}
|
|
7795
7795
|
e instanceof Error && (i.message = e.message);
|
|
7796
7796
|
}
|
|
@@ -7798,10 +7798,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
7798
7798
|
return n !== "Object" && (i.$name = n), i;
|
|
7799
7799
|
}
|
|
7800
7800
|
function da(e) {
|
|
7801
|
-
if (
|
|
7801
|
+
if (ua(e)) return e;
|
|
7802
7802
|
if (Array.isArray(e)) return e.map(da);
|
|
7803
7803
|
if (typeof e != "object") throw Error("can't deserialize object of type " + typeof e);
|
|
7804
|
-
let t =
|
|
7804
|
+
let t = la(e) || "Object";
|
|
7805
7805
|
if (!sa[t]) throw Error(`can't deserialize unregistered class ${t}`);
|
|
7806
7806
|
let { klass: n } = sa[t];
|
|
7807
7807
|
if (!n) throw Error(`can't deserialize unregistered class ${t}`);
|
|
@@ -14532,7 +14532,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
14532
14532
|
id: i,
|
|
14533
14533
|
sourceMapId: this.mapId,
|
|
14534
14534
|
origin: location.origin,
|
|
14535
|
-
data:
|
|
14535
|
+
data: X(e.data, o)
|
|
14536
14536
|
});
|
|
14537
14537
|
this.target.postMessage(s, { transfer: o });
|
|
14538
14538
|
}));
|
|
@@ -14582,8 +14582,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
14582
14582
|
type: "<response>",
|
|
14583
14583
|
sourceMapId: this.mapId,
|
|
14584
14584
|
origin: location.origin,
|
|
14585
|
-
error: t ?
|
|
14586
|
-
data:
|
|
14585
|
+
error: t ? X(t) : null,
|
|
14586
|
+
data: X(n, r)
|
|
14587
14587
|
};
|
|
14588
14588
|
this.target.postMessage(i, { transfer: r });
|
|
14589
14589
|
}
|
|
@@ -27180,7 +27180,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
27180
27180
|
function ca(e, t) {
|
|
27181
27181
|
return Math.log(e / t) / Math.LN2;
|
|
27182
27182
|
}
|
|
27183
|
-
class
|
|
27183
|
+
class la extends sa {
|
|
27184
27184
|
reset() {
|
|
27185
27185
|
super.reset(), delete this._distance, delete this._startDistance;
|
|
27186
27186
|
}
|
|
@@ -27195,10 +27195,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
27195
27195
|
};
|
|
27196
27196
|
}
|
|
27197
27197
|
}
|
|
27198
|
-
function
|
|
27198
|
+
function ua(e, t) {
|
|
27199
27199
|
return 180 * e.angleWith(t) / Math.PI;
|
|
27200
27200
|
}
|
|
27201
|
-
class
|
|
27201
|
+
class X extends sa {
|
|
27202
27202
|
reset() {
|
|
27203
27203
|
super.reset(), delete this._minDiameter, delete this._startVector, delete this._vector;
|
|
27204
27204
|
}
|
|
@@ -27208,13 +27208,13 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
27208
27208
|
_move(e, t, n) {
|
|
27209
27209
|
let r = this._vector;
|
|
27210
27210
|
if (this._vector = e[0].sub(e[1]), this._active || !this._isBelowThreshold(this._vector)) return this._active = !0, {
|
|
27211
|
-
bearingDelta:
|
|
27211
|
+
bearingDelta: ua(this._vector, r),
|
|
27212
27212
|
pinchAround: t
|
|
27213
27213
|
};
|
|
27214
27214
|
}
|
|
27215
27215
|
_isBelowThreshold(e) {
|
|
27216
27216
|
this._minDiameter = Math.min(this._minDiameter, e.mag());
|
|
27217
|
-
let t = 25 / (Math.PI * this._minDiameter) * 360, n =
|
|
27217
|
+
let t = 25 / (Math.PI * this._minDiameter) * 360, n = ua(e, this._startVector);
|
|
27218
27218
|
return Math.abs(n) < t;
|
|
27219
27219
|
}
|
|
27220
27220
|
}
|
|
@@ -27806,7 +27806,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
27806
27806
|
});
|
|
27807
27807
|
}(e), g = new oa(e, n);
|
|
27808
27808
|
n.dragPan = new ba(r, h, g), this._add("mousePan", h), this._add("touchPan", g, ["touchZoom", "touchRotate"]), e.interactive && e.dragPan && n.dragPan.enable(e.dragPan);
|
|
27809
|
-
let _ = new
|
|
27809
|
+
let _ = new X(), v = new la();
|
|
27810
27810
|
n.touchZoomRotate = new Sa(r, v, _, l), this._add("touchRotate", _, ["touchPan", "touchZoom"]), this._add("touchZoom", v, ["touchPan", "touchRotate"]), e.interactive && e.touchZoomRotate && n.touchZoomRotate.enable(e.touchZoomRotate);
|
|
27811
27811
|
let y = n.scrollZoom = new ga(n, (() => this._triggerRenderFrame()));
|
|
27812
27812
|
this._add("scrollZoom", y, ["mousePan"]), e.interactive && e.scrollZoom && n.scrollZoom.enable(e.scrollZoom);
|
|
@@ -30317,7 +30317,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
30317
30317
|
onRemove() {
|
|
30318
30318
|
s.remove(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
|
|
30319
30319
|
}
|
|
30320
|
-
}, e.TwoFingersTouchPitchHandler = fa, e.TwoFingersTouchRotateHandler =
|
|
30320
|
+
}, e.TwoFingersTouchPitchHandler = fa, e.TwoFingersTouchRotateHandler = X, e.TwoFingersTouchZoomHandler = la, e.TwoFingersTouchZoomRotateHandler = Sa, e.VectorTileSource = Fe, e.VideoSource = Be, e.addSourceType = (e, n) => t._(void 0, void 0, void 0, (function* () {
|
|
30321
30321
|
if (Ue(e)) throw Error(`A source type called "${e}" already exists.`);
|
|
30322
30322
|
((e, t) => {
|
|
30323
30323
|
He[e] = t;
|
|
@@ -32252,6 +32252,14 @@ function Sr(e, t) {
|
|
|
32252
32252
|
return n !== void 0 && n !== "color";
|
|
32253
32253
|
}
|
|
32254
32254
|
//#endregion
|
|
32255
|
+
//#region src/utils/browser.ts
|
|
32256
|
+
function Cr() {
|
|
32257
|
+
return navigator.userAgent.toLowerCase().indexOf("mobile") >= 0;
|
|
32258
|
+
}
|
|
32259
|
+
function wr() {
|
|
32260
|
+
return window.InstallTrigger !== void 0;
|
|
32261
|
+
}
|
|
32262
|
+
//#endregion
|
|
32255
32263
|
//#region node_modules/path-data-polyfill/path-data-polyfill.js
|
|
32256
32264
|
(function() {
|
|
32257
32265
|
var e = function(e) {
|
|
@@ -32984,22 +32992,31 @@ function Sr(e, t) {
|
|
|
32984
32992
|
})();
|
|
32985
32993
|
//#endregion
|
|
32986
32994
|
//#region src/utils/svgHelpers.ts
|
|
32987
|
-
function
|
|
32995
|
+
function Tr(e) {
|
|
32988
32996
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
32989
32997
|
}
|
|
32990
|
-
async function
|
|
32998
|
+
async function Er(e, t, n) {
|
|
32991
32999
|
for (let r of e) try {
|
|
32992
33000
|
let e = await fetch(`${t}/fonts/${r}.woff2?access_token=${n}`).then((e) => e.arrayBuffer());
|
|
32993
33001
|
document.fonts.add(new FontFace(r, e));
|
|
32994
33002
|
} catch {}
|
|
32995
33003
|
}
|
|
32996
|
-
function
|
|
33004
|
+
function Dr(e, t, n = 1e-4) {
|
|
32997
33005
|
return Math.abs(e - t) < n;
|
|
32998
33006
|
}
|
|
32999
|
-
function
|
|
33000
|
-
|
|
33007
|
+
async function Or(e, t, n) {
|
|
33008
|
+
if (wr() || e.length < 2e6) try {
|
|
33009
|
+
return await kr(e, t, n);
|
|
33010
|
+
} catch {}
|
|
33011
|
+
return await Ar(new Blob([e], { type: "image/svg+xml" }), t, n);
|
|
33012
|
+
}
|
|
33013
|
+
function kr(e, t, n) {
|
|
33014
|
+
let r = new Image();
|
|
33015
|
+
return r.width = t, r.height = n, new Promise((t, n) => {
|
|
33016
|
+
r.onload = () => t(r), r.onerror = () => n(/* @__PURE__ */ Error("Failed to quickly generate image from svg")), r.src = `data:image/svg+xml;base64,${btoa(e)}`;
|
|
33017
|
+
});
|
|
33001
33018
|
}
|
|
33002
|
-
async function
|
|
33019
|
+
async function Ar(e, t, n) {
|
|
33003
33020
|
let r = new Image();
|
|
33004
33021
|
r.width = t, r.height = n;
|
|
33005
33022
|
let i = URL.createObjectURL(e);
|
|
@@ -33012,16 +33029,16 @@ async function Dr(e, t, n) {
|
|
|
33012
33029
|
}
|
|
33013
33030
|
return r;
|
|
33014
33031
|
}
|
|
33015
|
-
var
|
|
33016
|
-
function
|
|
33017
|
-
let t =
|
|
33018
|
-
return t || (t =
|
|
33032
|
+
var jr = /\$\{([^}]+)}/g, Mr = new DOMParser(), Nr = new XMLSerializer(), Pr = /* @__PURE__ */ new Map();
|
|
33033
|
+
function Fr(e) {
|
|
33034
|
+
let t = Pr.get(e);
|
|
33035
|
+
return t || (t = Mr.parseFromString(e, "image/svg+xml").documentElement, Pr.set(e, t)), t;
|
|
33019
33036
|
}
|
|
33020
|
-
function
|
|
33021
|
-
let t =
|
|
33022
|
-
return
|
|
33037
|
+
function Ir(e) {
|
|
33038
|
+
let t = Nr.serializeToString(e);
|
|
33039
|
+
return Pr.has(t) || Pr.set(t, e), t;
|
|
33023
33040
|
}
|
|
33024
|
-
var
|
|
33041
|
+
var Lr = class {
|
|
33025
33042
|
_seen = [];
|
|
33026
33043
|
_svg = null;
|
|
33027
33044
|
_element = null;
|
|
@@ -33029,23 +33046,23 @@ var Pr = class {
|
|
|
33029
33046
|
this._svg = e;
|
|
33030
33047
|
}
|
|
33031
33048
|
setElement() {
|
|
33032
|
-
return this._element =
|
|
33049
|
+
return this._element = Fr(this._svg).cloneNode(!0), this._svg = null, this._element;
|
|
33033
33050
|
}
|
|
33034
33051
|
getSvgString() {
|
|
33035
|
-
return this._svg ??
|
|
33052
|
+
return this._svg ?? Ir(this._element);
|
|
33036
33053
|
}
|
|
33037
33054
|
getSvgSize() {
|
|
33038
|
-
let e = this._element ??
|
|
33055
|
+
let e = this._element ?? Fr(this._svg);
|
|
33039
33056
|
return [e.width.baseVal.value, e.height.baseVal.value];
|
|
33040
33057
|
}
|
|
33041
33058
|
getSvgColors() {
|
|
33042
|
-
let e = [], t = [], n = (this._element ??
|
|
33059
|
+
let e = [], t = [], n = (this._element ?? Fr(this._svg)).querySelectorAll("[mol_edit_style=true]");
|
|
33043
33060
|
for (let r = 0; r < n.length; ++r) {
|
|
33044
33061
|
let i = n[r], a = i.id;
|
|
33045
33062
|
if (a && t.every((e) => e.id !== a)) {
|
|
33046
33063
|
let n = i.getAttribute("fill")?.trim();
|
|
33047
33064
|
if (n) {
|
|
33048
|
-
let r = new
|
|
33065
|
+
let r = new Kr(n);
|
|
33049
33066
|
if (r.badValue) e.push({
|
|
33050
33067
|
name: `fill#${a}`,
|
|
33051
33068
|
color: n
|
|
@@ -33054,14 +33071,14 @@ var Pr = class {
|
|
|
33054
33071
|
let { rgba: t } = r, n = i.getAttribute("fill-opacity");
|
|
33055
33072
|
t[3] *= n ? j(Number(n), 0, 1) : 1, e.push({
|
|
33056
33073
|
name: `fill#${a}`,
|
|
33057
|
-
color:
|
|
33074
|
+
color: Kr.fromRGB(t)
|
|
33058
33075
|
});
|
|
33059
33076
|
}
|
|
33060
33077
|
t.push(i);
|
|
33061
33078
|
}
|
|
33062
33079
|
let r = i.getAttribute("stroke")?.trim();
|
|
33063
33080
|
if (r) {
|
|
33064
|
-
let n = new
|
|
33081
|
+
let n = new Kr(r);
|
|
33065
33082
|
if (n.badValue) e.push({
|
|
33066
33083
|
name: `stroke#${a}`,
|
|
33067
33084
|
color: r
|
|
@@ -33070,7 +33087,7 @@ var Pr = class {
|
|
|
33070
33087
|
let { rgba: t } = n, r = i.getAttribute("stroke-opacity");
|
|
33071
33088
|
t[3] *= r ? j(Number(r), 0, 1) : 1, e.push({
|
|
33072
33089
|
name: `stroke#${a}`,
|
|
33073
|
-
color:
|
|
33090
|
+
color: Kr.fromRGB(t)
|
|
33074
33091
|
});
|
|
33075
33092
|
}
|
|
33076
33093
|
t.push(i);
|
|
@@ -33100,7 +33117,7 @@ var Pr = class {
|
|
|
33100
33117
|
return this;
|
|
33101
33118
|
}
|
|
33102
33119
|
getSvgTexts() {
|
|
33103
|
-
let e = [], t = (this._element ??
|
|
33120
|
+
let e = [], t = (this._element ?? Fr(this._svg)).querySelectorAll("[mol_edit_text=true]");
|
|
33104
33121
|
for (let n = 0; n < t.length; ++n) {
|
|
33105
33122
|
let r = t[n], i = r.id;
|
|
33106
33123
|
i && e.every((e) => e.name !== i) && e.push({
|
|
@@ -33167,30 +33184,30 @@ var Pr = class {
|
|
|
33167
33184
|
e[3]
|
|
33168
33185
|
];
|
|
33169
33186
|
}
|
|
33170
|
-
|
|
33187
|
+
Dr(e.attributes.x.value, t.x - r[0]) && Dr(e.attributes.y.value, t.y - r[2]) && Dr(e.attributes.width.value, t.width + r[0] + r[1]) && Dr(e.attributes.height.value, t.height + r[2] + r[3]) || (e.attributes.x.value = t.x - r[0], e.attributes.y.value = t.y - r[2], e.attributes.width.value = t.width + r[0] + r[1], e.attributes.height.value = t.height + r[2] + r[3], this.nodeChanged(e));
|
|
33171
33188
|
}
|
|
33172
33189
|
sameWidth(e, t) {
|
|
33173
33190
|
let n = t.width + 2 * parseFloat(e.attributes.mol_samewidth.value.split(" ")[1]);
|
|
33174
|
-
|
|
33191
|
+
Dr(e.attributes.width.value, n) || (e.attributes.width.value = n, this.nodeChanged(e));
|
|
33175
33192
|
}
|
|
33176
33193
|
sameHeight(e, t) {
|
|
33177
33194
|
let n = t.height + 2 * parseFloat(e.attributes.mol_sameheight.value.split(" ")[1]);
|
|
33178
|
-
|
|
33195
|
+
Dr(e.attributes.height.value, n) || (this._seen.push(e), e.attributes.height.value = n, this.nodeChanged(e));
|
|
33179
33196
|
}
|
|
33180
33197
|
stack(e, t) {
|
|
33181
33198
|
let n = !1;
|
|
33182
33199
|
switch (e.attributes.mol_stack.value.split(" ")[0]) {
|
|
33183
33200
|
case "top":
|
|
33184
|
-
n = !(
|
|
33201
|
+
n = !(Dr(e.attributes.width.value, t.width) && Dr(e.attributes.x.value, t.x) && Dr(e.attributes.y.value, t.y - e.attributes.height.value)), n && (e.attributes.width.value = t.width, e.attributes.x.value = t.x, e.attributes.y.value = t.y - e.attributes.height.value);
|
|
33185
33202
|
break;
|
|
33186
33203
|
case "bottom":
|
|
33187
|
-
n = !(
|
|
33204
|
+
n = !(Dr(e.attributes.width.value, t.width) && Dr(e.attributes.x.value, t.x) && Dr(e.attributes.y.value, t.y + t.height)), n && (e.attributes.width.value = t.width, e.attributes.x.value = t.x, e.attributes.y.value = t.y + t.height);
|
|
33188
33205
|
break;
|
|
33189
33206
|
case "left":
|
|
33190
|
-
n = !(
|
|
33207
|
+
n = !(Dr(e.attributes.height.value, t.height) && Dr(e.attributes.x.value, t.x - e.attributes.width.value) && Dr(e.attributes.y.value, t.y)), n && (e.attributes.height.value = t.height, e.attributes.x.value = t.x - e.attributes.width.value, e.attributes.y.value = t.y);
|
|
33191
33208
|
break;
|
|
33192
33209
|
case "right":
|
|
33193
|
-
n = !(
|
|
33210
|
+
n = !(Dr(e.attributes.height.value, t.height) && Dr(e.attributes.x.value, t.x + t.width) && Dr(e.attributes.y.value, t.y)), n && (e.attributes.height.value = t.height, e.attributes.x.value = t.x + t.width, e.attributes.y.value = t.y);
|
|
33194
33211
|
break;
|
|
33195
33212
|
}
|
|
33196
33213
|
n && this.nodeChanged(e);
|
|
@@ -33239,22 +33256,22 @@ var Pr = class {
|
|
|
33239
33256
|
break;
|
|
33240
33257
|
}
|
|
33241
33258
|
let o = this.getCoordinate(e, 0, 0);
|
|
33242
|
-
o && !(
|
|
33259
|
+
o && !(Dr(o.x, a.x) && Dr(o.y, a.y)) && (this.moveElement(e, a), this.nodeChanged(e));
|
|
33243
33260
|
}
|
|
33244
33261
|
pathPosition(e, t) {
|
|
33245
33262
|
let n = e.attributes.mol_pathposition.value.split(" ").map((e) => parseFloat(e)), r = this.getCoordinate(e, 0, 0), i = this.getCoordinate(t, n[1], n[2]);
|
|
33246
|
-
i && r && !(
|
|
33263
|
+
i && r && !(Dr(i.x, r.x) && Dr(i.y, r.y)) && (this.moveElement(e, i), this.nodeChanged(e));
|
|
33247
33264
|
}
|
|
33248
33265
|
copyPosition(e, t) {
|
|
33249
33266
|
let n = e.attributes.mol_copyposition.value.split(" ").map((e) => parseFloat(e)), r = this.getCoordinate(e, n[0], n[1]), i = this.getCoordinate(t, n[3], n[4]);
|
|
33250
|
-
i && r && !(
|
|
33267
|
+
i && r && !(Dr(i.x, r.x) && Dr(i.y, r.y)) && (this.setCoordinate(e, i, n[0], n[1]), this.nodeChanged(e));
|
|
33251
33268
|
}
|
|
33252
33269
|
resetSize(e) {
|
|
33253
33270
|
let t = this._element ?? this.setElement(), n = this.getBBox(t);
|
|
33254
33271
|
n.x -= .1 * n.width, n.y -= .1 * n.height, n.width *= 1.2, n.height *= 1.2, t.setAttribute("viewBox", `${n.x} ${n.y} ${n.width} ${n.height}`), t.setAttribute("width", `${n.width * e}`), t.setAttribute("height", `${n.height * e}`);
|
|
33255
33272
|
}
|
|
33256
33273
|
resetAnchor() {
|
|
33257
|
-
let e = (this._element ??
|
|
33274
|
+
let e = (this._element ?? Fr(this._svg)).querySelector("[mol_edit_anchor]");
|
|
33258
33275
|
if (e) {
|
|
33259
33276
|
let t = e.getAttribute("mol_edit_anchor").split(" ").map((e) => parseFloat(e)), n = this.getCoordinate(e, t[0], t[1]), r = this._element ?? this.setElement(), i = r.getElementById("scale");
|
|
33260
33277
|
if (i) {
|
|
@@ -33399,14 +33416,14 @@ var Pr = class {
|
|
|
33399
33416
|
case "rect":
|
|
33400
33417
|
case "circle":
|
|
33401
33418
|
case "ellipse":
|
|
33402
|
-
n = this.getCoordinate(e, 0, 0), a = !
|
|
33419
|
+
n = this.getCoordinate(e, 0, 0), a = !Dr(n.x, t.x) || !Dr(n.y, t.y), a && this.setCoordinate(e, t, 0, 0);
|
|
33403
33420
|
break;
|
|
33404
33421
|
case "polyline":
|
|
33405
33422
|
case "polygon":
|
|
33406
|
-
if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !
|
|
33423
|
+
if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !Dr(r.x, 0) || !Dr(r.y, 0), a) for (this.setCoordinate(e, t, 0, 0), i = 1, n = this.getCoordinate(e, i, 0); n !== null;) n.x += r.x, n.y += r.y, this.setCoordinate(n, i, 0, void 0), i++, n = this.getCoordinate(e, i, 0);
|
|
33407
33424
|
break;
|
|
33408
33425
|
case "path":
|
|
33409
|
-
if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !
|
|
33426
|
+
if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !Dr(r.x, 0) || !Dr(r.y, 0), a) {
|
|
33410
33427
|
o = e.getPathData({ normalize: !0 });
|
|
33411
33428
|
for (let e = 0; e < o.length; ++e) {
|
|
33412
33429
|
let t = o[e];
|
|
@@ -33446,7 +33463,7 @@ var Pr = class {
|
|
|
33446
33463
|
for (u = document.createElementNS(h, "tspan"), u.setAttributeNS(null, "x", String(w)), u.setAttributeNS(null, "y", String(A + o)), d = p + f.toString(), u.setAttribute("id", d), f++, s = "", i = 0, l = document.createTextNode(s), u.appendChild(l), t.appendChild(u), o += O, a = 0; a < r.length;) c = s + r[a], i++, l.nodeValue = c, m = e.querySelector(`#${d}`).getComputedTextLength(), m < D ? (s = c, s.length > 0 && s[s.length - 1] === "\n" && a < r.length - 1 && (l.nodeValue = s, u = document.createElementNS(h, "tspan"), u.setAttributeNS(null, "x", String(w)), u.setAttributeNS(null, "y", String(A + o)), d = p + f.toString(), u.setAttribute("id", d), o += O + S, f++, s = "", i = 0, l = document.createTextNode(s), u.appendChild(l), t.appendChild(u)), a++) : (i > 1 ? l.nodeValue = s : (s = c, a++), s.length > 0 && s[s.length - 1] === "\n" && (s = s.substr(0, s.length - 1), l.nodeValue = s), u = document.createElementNS(h, "tspan"), u.setAttributeNS(null, "x", String(w)), u.setAttributeNS(null, "y", String(A + o)), d = p + f.toString(), u.setAttribute("id", d), o += O + S, f++, s = "", i = 0, l = document.createTextNode(s), u.appendChild(l), t.appendChild(u));
|
|
33447
33464
|
return t.childElementCount === 1 && t.firstElementChild.replaceWith(t.firstElementChild.textContent), o;
|
|
33448
33465
|
}
|
|
33449
|
-
},
|
|
33466
|
+
}, Rr = class {
|
|
33450
33467
|
map;
|
|
33451
33468
|
keyCache = /* @__PURE__ */ new Map();
|
|
33452
33469
|
constructor(e) {
|
|
@@ -33457,18 +33474,18 @@ var Pr = class {
|
|
|
33457
33474
|
n || (n = /* @__PURE__ */ new Map(), this.keyCache.set(t, n));
|
|
33458
33475
|
let r = n.get(e);
|
|
33459
33476
|
if (!r) {
|
|
33460
|
-
let i = e + t, a = new
|
|
33461
|
-
r = `mc-image-${M(i)}`,
|
|
33477
|
+
let i = e + t, a = new Lr(e).getSvgSize(), o = Math.max(a[0] * t, 1), s = Math.max(a[1] * t, 1);
|
|
33478
|
+
r = `mc-image-${M(i)}`, Or(e, o, s).then((e) => this.map.addImage(r, e, { pixelRatio: t })).catch((e) => console.log(e)), n.set(e, r);
|
|
33462
33479
|
}
|
|
33463
33480
|
return r;
|
|
33464
33481
|
}
|
|
33465
|
-
},
|
|
33466
|
-
function
|
|
33482
|
+
}, zr = 0, Br = "", Vr = document.createElement("canvas").getContext("2d");
|
|
33483
|
+
function Hr(e, t, n) {
|
|
33467
33484
|
let r = 0, i = 0, a = 0, o = 0;
|
|
33468
|
-
if (
|
|
33469
|
-
(
|
|
33485
|
+
if (Vr) {
|
|
33486
|
+
(zr !== n || Br !== t) && (Vr.font = `${n}px ${t}`, Br = t, zr = n), {actualBoundingBoxAscent: a, actualBoundingBoxDescent: o} = Vr.measureText("█");
|
|
33470
33487
|
for (let t = 0; t < e.length; ++t) {
|
|
33471
|
-
let { actualBoundingBoxLeft: n, actualBoundingBoxRight: i } =
|
|
33488
|
+
let { actualBoundingBoxLeft: n, actualBoundingBoxRight: i } = Vr.measureText(e[t]);
|
|
33472
33489
|
n + i > r && (r = n + i);
|
|
33473
33490
|
}
|
|
33474
33491
|
i = (a + o) * e.length;
|
|
@@ -33480,28 +33497,28 @@ function zr(e, t, n) {
|
|
|
33480
33497
|
descent: o
|
|
33481
33498
|
};
|
|
33482
33499
|
}
|
|
33483
|
-
function
|
|
33500
|
+
function Ur(e, t, n, r, i) {
|
|
33484
33501
|
let a = n ?? t, o = !r, s = a?.match(/\$\{([^}]+)}/)?.[1], c = s ? o ? w(e[s]) : T(e[s]) : null, l = s ? o ? c : typeof c != "boolean" && c !== null && c !== "" ? r(c) : i : a;
|
|
33485
|
-
return l && !new
|
|
33502
|
+
return l && !new Kr(l).badValue ? l : "#000000";
|
|
33486
33503
|
}
|
|
33487
|
-
function
|
|
33488
|
-
return (n ?? t)?.split(
|
|
33504
|
+
function Wr(e, t, n) {
|
|
33505
|
+
return (n ?? t)?.split(jr).map((t, n) => n & 1 ? w(e[t]) : t).join("") || void 0;
|
|
33489
33506
|
}
|
|
33490
|
-
function
|
|
33507
|
+
function Gr(e, t, n) {
|
|
33491
33508
|
let r = t;
|
|
33492
33509
|
if (t) {
|
|
33493
|
-
let i = new
|
|
33510
|
+
let i = new Lr(t), a = i.getSvgColors(), o = i.getSvgTexts(), s = n ? new Map(new Lr(n).getSvgColors().map(({ name: e, color: t }) => [e, t])) : /* @__PURE__ */ new Map(), c = n ? new Map(new Lr(n).getSvgTexts().map(({ name: e, text: t }) => [e, t])) : /* @__PURE__ */ new Map(), l = a.map(({ name: t, color: n }) => ({
|
|
33494
33511
|
name: t,
|
|
33495
|
-
color: new Ur(
|
|
33512
|
+
color: new Kr(Ur(e, n?.toString(), s.get(t)?.toString()))
|
|
33496
33513
|
})).filter((e, t) => typeof a[t].color == "string" || !e.color.sameColor(a[t].color)), u = o.map(({ name: t, text: n }) => ({
|
|
33497
33514
|
name: t,
|
|
33498
|
-
text:
|
|
33515
|
+
text: Wr(e, n, c.get(t))
|
|
33499
33516
|
})).filter((e, t) => e.text !== o[t].text);
|
|
33500
33517
|
l.length && i.setSvgColors(l), u.length && i.setSvgTexts(u), (l.length || u.length) && (r = i.getSvgString());
|
|
33501
33518
|
}
|
|
33502
33519
|
return r;
|
|
33503
33520
|
}
|
|
33504
|
-
var
|
|
33521
|
+
var Kr = class e {
|
|
33505
33522
|
_error = !1;
|
|
33506
33523
|
_rgba;
|
|
33507
33524
|
static fromRGB(t) {
|
|
@@ -33519,12 +33536,12 @@ var Ur = class e {
|
|
|
33519
33536
|
if (n === 0) this._error = !0;
|
|
33520
33537
|
else if (e === "transparent" || e === "none") t[3] = 0;
|
|
33521
33538
|
else if (e[0] === "#") n < 6 ? (t[0] = parseInt(e[1] + e[1], 16) || 0, t[1] = parseInt(e[2] + e[2], 16) || 0, t[2] = parseInt(e[3] + e[3], 16) || 0, n === 5 && (t[3] = parseInt(e[4] + e[4], 16) / 255)) : (t[0] = parseInt(e[1] + e[2], 16) || 0, t[1] = parseInt(e[3] + e[4], 16) || 0, t[2] = parseInt(e[5] + e[6], 16) || 0, n > 8 && (t[3] = parseInt(e[7] + e[8], 16) / 255));
|
|
33522
|
-
else if (e in
|
|
33523
|
-
let n =
|
|
33539
|
+
else if (e in Zr) {
|
|
33540
|
+
let n = Zr[e];
|
|
33524
33541
|
t[0] = n[0], t[1] = n[1], t[2] = n[2];
|
|
33525
33542
|
} else if (r = /^(rgba?|hs[lv]a?)\s*\(([^)]*)\)/.exec(e)) {
|
|
33526
|
-
let e = r[1].replace(/a$/, ""), n = r[2].trim().split(/\s*[,/]\s*|\s+/).map(
|
|
33527
|
-
e === "rgb" ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], n.length > 3 && (t[3] = n[3])) : e === "hsl" ?
|
|
33543
|
+
let e = r[1].replace(/a$/, ""), n = r[2].trim().split(/\s*[,/]\s*|\s+/).map(J, { space: e });
|
|
33544
|
+
e === "rgb" ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], n.length > 3 && (t[3] = n[3])) : e === "hsl" ? Yr(n, t) : e === "hsv" && Xr(n, t);
|
|
33528
33545
|
} else this._error = !0;
|
|
33529
33546
|
}
|
|
33530
33547
|
get badValue() {
|
|
@@ -33540,13 +33557,13 @@ var Ur = class e {
|
|
|
33540
33557
|
return this._rgba.slice();
|
|
33541
33558
|
}
|
|
33542
33559
|
sameColor(e) {
|
|
33543
|
-
return
|
|
33560
|
+
return Dr(this._rgba[0], e._rgba[0]) && Dr(this._rgba[1], e._rgba[1]) && Dr(this._rgba[2], e._rgba[2]) && Dr(this._rgba[3], e._rgba[3]);
|
|
33544
33561
|
}
|
|
33545
33562
|
toString() {
|
|
33546
33563
|
let [e, t, n, r] = this._rgba;
|
|
33547
33564
|
return r === 1 ? this.hex : `rgba(${Math.round(e)}, ${Math.round(t)}, ${Math.round(n)}, ${r})`;
|
|
33548
33565
|
}
|
|
33549
|
-
},
|
|
33566
|
+
}, qr = {
|
|
33550
33567
|
red: 0,
|
|
33551
33568
|
orange: 60,
|
|
33552
33569
|
yellow: 120,
|
|
@@ -33554,14 +33571,14 @@ var Ur = class e {
|
|
|
33554
33571
|
blue: 240,
|
|
33555
33572
|
purple: 300
|
|
33556
33573
|
};
|
|
33557
|
-
function
|
|
33574
|
+
function J(e, t) {
|
|
33558
33575
|
let { space: n } = this;
|
|
33559
33576
|
if (e[e.length - 1] === "%") {
|
|
33560
33577
|
let r = parseFloat(e), i = t < 3 && n === "rgb" ? 255 : 1, a = t > 0 && t < 3 && n[0] === "h" ? 1 : 100;
|
|
33561
33578
|
return (r < 0 ? 0 : r > 100 ? 100 : r) / a * i;
|
|
33562
33579
|
}
|
|
33563
33580
|
if (n[t] === "h" || t === 2 && n[n.length - 1] === "h") {
|
|
33564
|
-
if (e in
|
|
33581
|
+
if (e in qr) return qr[e];
|
|
33565
33582
|
let t = parseFloat(e);
|
|
33566
33583
|
switch (!0) {
|
|
33567
33584
|
case e.endsWith("turn"):
|
|
@@ -33582,10 +33599,10 @@ function Gr(e, t) {
|
|
|
33582
33599
|
return r < 0 ? 0 : r > i ? i : r;
|
|
33583
33600
|
}
|
|
33584
33601
|
}
|
|
33585
|
-
function
|
|
33602
|
+
function Jr(e, t, n) {
|
|
33586
33603
|
return n < 0 && (n += 1), n > 1 && --n, (n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e) * 255;
|
|
33587
33604
|
}
|
|
33588
|
-
function
|
|
33605
|
+
function Yr(e, t = [
|
|
33589
33606
|
0,
|
|
33590
33607
|
0,
|
|
33591
33608
|
0,
|
|
@@ -33595,11 +33612,11 @@ function qr(e, t = [
|
|
|
33595
33612
|
if (r === 0) t[2] = t[1] = t[0] = i * 255;
|
|
33596
33613
|
else {
|
|
33597
33614
|
let e = i < .5 ? i * (1 + r) : i + r - i * r, a = 2 * i - e;
|
|
33598
|
-
t[0] =
|
|
33615
|
+
t[0] = Jr(a, e, n + 1 / 3), t[1] = Jr(a, e, n), t[2] = Jr(a, e, n - 1 / 3);
|
|
33599
33616
|
}
|
|
33600
33617
|
return e.length > 3 && (t[3] = e[3]), t;
|
|
33601
33618
|
}
|
|
33602
|
-
function
|
|
33619
|
+
function Xr(e, t = [
|
|
33603
33620
|
0,
|
|
33604
33621
|
0,
|
|
33605
33622
|
0,
|
|
@@ -33628,7 +33645,7 @@ function J(e, t = [
|
|
|
33628
33645
|
}
|
|
33629
33646
|
return e.length > 3 && (t[3] = e[3]), t;
|
|
33630
33647
|
}
|
|
33631
|
-
var
|
|
33648
|
+
var Zr = {
|
|
33632
33649
|
aliceblue: [
|
|
33633
33650
|
240,
|
|
33634
33651
|
248,
|
|
@@ -34372,8 +34389,8 @@ var Jr = {
|
|
|
34372
34389
|
};
|
|
34373
34390
|
//#endregion
|
|
34374
34391
|
//#region src/adornments/categoricalLegend.ts
|
|
34375
|
-
function
|
|
34376
|
-
let { title: r = "", titleFontColor: i = "#000000", titleFont: a = t, titleFontSize: o = 24, entries: s, entryFontColor: c = "#000000", entryFont: l = t, entryFontSize: u = 13, entryShape: d = "rectangle", layout: f = "vertical", background: p = "#ffffff", showBackground: m = !1 } = e, h =
|
|
34392
|
+
function Qr(e, t, n) {
|
|
34393
|
+
let { title: r = "", titleFontColor: i = "#000000", titleFont: a = t, titleFontSize: o = 24, entries: s, entryFontColor: c = "#000000", entryFont: l = t, entryFontSize: u = 13, entryShape: d = "rectangle", layout: f = "vertical", background: p = "#ffffff", showBackground: m = !1 } = e, h = Hr([r], a, o), g = s.map((e) => Hr([e.label], l, u)), _ = r.trim().length > 0, v, y;
|
|
34377
34394
|
f === "vertical" ? (v = Math.max(h.width, ...g.map((e) => e.width + 15 + 10)) + 30, y = 30 + (_ ? h.height + 20 : 0) + g.reduce((e, t) => e + t.height, 0) + Math.max(g.length - 1, 0) * 20) : (v = Math.max(h.width + 30, 30 + g.reduce((e, t) => e + t.width + 15 + 10, 0) + Math.max(g.length - 1, 0) * 20), y = 30 + (_ ? h.height + 20 : 0) + Math.max(0, ...g.map((e) => e.height)));
|
|
34378
34395
|
let b = [];
|
|
34379
34396
|
m && b.push(`
|
|
@@ -34396,7 +34413,7 @@ function Yr(e, t, n) {
|
|
|
34396
34413
|
font-size="${o}"
|
|
34397
34414
|
fill="${i}"
|
|
34398
34415
|
>
|
|
34399
|
-
${
|
|
34416
|
+
${Tr(r)}
|
|
34400
34417
|
</text>
|
|
34401
34418
|
`), S += h.height + 20);
|
|
34402
34419
|
for (let e = 0; e < s.length; e++) {
|
|
@@ -34443,7 +34460,7 @@ function Yr(e, t, n) {
|
|
|
34443
34460
|
font-size="${u}"
|
|
34444
34461
|
fill="${c}"
|
|
34445
34462
|
>
|
|
34446
|
-
${
|
|
34463
|
+
${Tr(t.label)}
|
|
34447
34464
|
</text>
|
|
34448
34465
|
`), f === "vertical" ? S += n.height + 20 : x += n.width + 15 + 10 + 20;
|
|
34449
34466
|
}
|
|
@@ -34461,24 +34478,24 @@ function Yr(e, t, n) {
|
|
|
34461
34478
|
}
|
|
34462
34479
|
//#endregion
|
|
34463
34480
|
//#region src/adornments/connectedLegend.ts
|
|
34464
|
-
var
|
|
34465
|
-
function
|
|
34481
|
+
var $r = "ArialMT", ei = 15;
|
|
34482
|
+
function ti(e, t, n, r, i, a) {
|
|
34466
34483
|
let o = document.createElement("div");
|
|
34467
34484
|
o.className = "adornment", e.showBackground && (o.style.boxShadow = "0 0 7px 0 rgba(33, 37, 41, 0.25)", o.style.borderRadius = "10px");
|
|
34468
|
-
let s = [e.titleFont ??
|
|
34469
|
-
return
|
|
34485
|
+
let s = [e.titleFont ?? $r, e.labelFont ?? $r];
|
|
34486
|
+
return Er(Array.from(new Set(s)), r, i).then(() => o.innerHTML = ni(e, t, n, a)), o;
|
|
34470
34487
|
}
|
|
34471
|
-
function
|
|
34488
|
+
function ni(e, t, n, r) {
|
|
34472
34489
|
let { target: i } = e, a = t.registry?.models?.[i.modelType]?.find((e) => e.id === i.groupId), o = a?.models ?? [], s = a?.choropleth, c = br(a?.fillColor);
|
|
34473
|
-
return !s || !c || a.models.every((e) => !(e.visible ?? !0)) || !Sr(o, c) ?
|
|
34490
|
+
return !s || !c || a.models.every((e) => !(e.visible ?? !0)) || !Sr(o, c) ? ri() : s.colorMode === "categorical" ? oi(e, s, c, r) : s.colorMode === "linear" ? ii(e, a, n, r) : s.colorMode === "quantile" || s.colorMode === "quantize" ? ai(e, a, n, r) : ri();
|
|
34474
34491
|
}
|
|
34475
|
-
function
|
|
34492
|
+
function ri() {
|
|
34476
34493
|
return "\n <svg\n class=\"adornment-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"0\"\n height=\"0\"\n viewBox=\"0 0 0 0\"\n >\n </svg>\n ";
|
|
34477
34494
|
}
|
|
34478
|
-
function
|
|
34479
|
-
let i = 15 / 2, { id: a, layout: o = "vertical", labelFont: s =
|
|
34480
|
-
if (y === void 0) return
|
|
34481
|
-
let b = [], [x, S] = At(y.domain()), C = zt(x, S, 4), w =
|
|
34495
|
+
function ii(e, t, n, r) {
|
|
34496
|
+
let i = 15 / 2, { id: a, layout: o = "vertical", labelFont: s = $r, labelFontSize: c = 13, labelFontColor: l = "#000000", numberFormat: u = ".2~s", title: d = "", titleFont: f = $r, titleFontSize: p = 14, titleFontColor: m = "#000000", showBackground: h = !1, background: g = "#ffffff" } = e, _ = `gradient-${a}`, v = o === "horizontal", y = gr(t);
|
|
34497
|
+
if (y === void 0) return ri();
|
|
34498
|
+
let b = [], [x, S] = At(y.domain()), C = zt(x, S, 4), w = si(u), T = C.map((e) => w(e)), E = T.map((e) => Hr([e], s, c)), D = [];
|
|
34482
34499
|
for (let e = 0; e < 32; e++) {
|
|
34483
34500
|
let t = e / 31;
|
|
34484
34501
|
D.push(`<stop offset="${t * 100}%" stop-color="${y(x + t * (S - x))}" />`);
|
|
@@ -34491,11 +34508,11 @@ function ti(e, t, n, r) {
|
|
|
34491
34508
|
</linearGradient>
|
|
34492
34509
|
</defs>
|
|
34493
34510
|
`);
|
|
34494
|
-
let M =
|
|
34511
|
+
let M = Hr([d], f, p), N = d.trim().length > 0, P = {
|
|
34495
34512
|
width: Math.max(0, ...E.map((e) => e.width)),
|
|
34496
34513
|
height: Math.max(0, ...E.map((e) => e.height)),
|
|
34497
34514
|
ascent: Math.max(0, ...E.map((e) => e.ascent))
|
|
34498
|
-
}, F = N ? M.height + 10 : 0, ee = N ? M.width : 0, I = C.length - 1, te = j(45 * I, Math.ceil(v ? (P.width + 10) * I : (P.height + 10) * I), Math.floor(v ? n.getContainer().clientWidth - 10 -
|
|
34515
|
+
}, F = N ? M.height + 10 : 0, ee = N ? M.width : 0, I = C.length - 1, te = j(45 * I, Math.ceil(v ? (P.width + 10) * I : (P.height + 10) * I), Math.floor(v ? n.getContainer().clientWidth - 10 - ei * 2 : n.getContainer().clientHeight - 10 - ei * 2 - F)), ne = Math.ceil(v ? ei * 2 + Math.max(ee, te) : ei * 2 + Math.max(ee, 25 + P.width)), re = Math.ceil(v ? ei * 2 + F + 20 + 5 + P.ascent : ei * 2 + F + te);
|
|
34499
34516
|
h && b.push(`
|
|
34500
34517
|
<rect
|
|
34501
34518
|
x="0"
|
|
@@ -34507,7 +34524,7 @@ function ti(e, t, n, r) {
|
|
|
34507
34524
|
fill="${g}"
|
|
34508
34525
|
/>
|
|
34509
34526
|
`);
|
|
34510
|
-
let ie =
|
|
34527
|
+
let ie = ei, ae = ei;
|
|
34511
34528
|
N && (b.push(`
|
|
34512
34529
|
<text
|
|
34513
34530
|
x="${ie}"
|
|
@@ -34516,7 +34533,7 @@ function ti(e, t, n, r) {
|
|
|
34516
34533
|
font-size="${p}"
|
|
34517
34534
|
fill="${m}"
|
|
34518
34535
|
>
|
|
34519
|
-
${
|
|
34536
|
+
${Tr(d)}
|
|
34520
34537
|
</text>
|
|
34521
34538
|
`), ae += M.height + 10), b.push(`
|
|
34522
34539
|
<rect
|
|
@@ -34548,7 +34565,7 @@ function ti(e, t, n, r) {
|
|
|
34548
34565
|
fill="${l}"
|
|
34549
34566
|
text-anchor="${v ? "middle" : "start"}"
|
|
34550
34567
|
>
|
|
34551
|
-
${
|
|
34568
|
+
${Tr(n)}
|
|
34552
34569
|
</text>
|
|
34553
34570
|
`);
|
|
34554
34571
|
}
|
|
@@ -34564,15 +34581,15 @@ function ti(e, t, n, r) {
|
|
|
34564
34581
|
</svg>
|
|
34565
34582
|
`;
|
|
34566
34583
|
}
|
|
34567
|
-
function
|
|
34584
|
+
function ai(e, t, n, r) {
|
|
34568
34585
|
let i = gr(t), a = i?.range(), o = [], s = 0, c = 0;
|
|
34569
34586
|
if (i && a && a.length > 1) {
|
|
34570
|
-
let { layout: t = "vertical", labelFont: r =
|
|
34587
|
+
let { layout: t = "vertical", labelFont: r = $r, labelFontSize: l = 13, labelFontColor: u = "#000000", labelStyle: d = "range", numberFormat: f = ".2~s", title: p = "", titleFont: m = $r, titleFontSize: h = 14, titleFontColor: g = "#000000", showBackground: _ = !1, background: v = "#ffffff" } = e, y = t === "vertical", b = d === "range", x = si(f), S = b ? a.map((e) => i.invertExtent(e)).map((e, t, n) => t === 0 ? `< ${x(e[1])}` : t === n.length - 1 ? `> ${x(e[0])}` : `${x(e[0])} – ${x(e[1])}`) : a.map((e) => i.invertExtent(e)).reduce((e, t, n) => (n && e.push(x(t[0])), e), []), C = S.map((e) => Hr([e], r, l)), w = Hr([p], m, h), T = p.trim().length > 0, E = {
|
|
34571
34588
|
width: Math.max(0, ...C.map((e) => e.width)),
|
|
34572
34589
|
height: Math.max(0, ...C.map((e) => e.height)),
|
|
34573
34590
|
ascent: Math.max(0, ...C.map((e) => e.ascent))
|
|
34574
34591
|
}, D = T ? w.height + 10 : 0, O = T ? w.width : 0, k = a.length, A = 45, M = 15 / 2;
|
|
34575
|
-
y ? (A = j(A, Math.ceil(E.height) + 10, Math.floor((n.getContainer().clientHeight - 10 -
|
|
34592
|
+
y ? (A = j(A, Math.ceil(E.height) + 10, Math.floor((n.getContainer().clientHeight - 10 - ei * 2 - D) / k)), s = Math.ceil(ei * 2 + D + k * A), c = Math.ceil(ei * 2 + Math.max(O, 25 + E.width))) : (A = j(A, Math.ceil(E.width) + 10, Math.floor((n.getContainer().clientWidth - 10 - ei * 2) / k)), c = Math.ceil(ei * 2 + Math.max(O, k * A)), s = Math.ceil(ei * 2 + D + 15 + 10 + E.ascent)), _ && o.push(`
|
|
34576
34593
|
<rect
|
|
34577
34594
|
x="0"
|
|
34578
34595
|
y="0"
|
|
@@ -34583,7 +34600,7 @@ function ni(e, t, n, r) {
|
|
|
34583
34600
|
fill="${v}"
|
|
34584
34601
|
/>
|
|
34585
34602
|
`);
|
|
34586
|
-
let N =
|
|
34603
|
+
let N = ei, P = ei;
|
|
34587
34604
|
T && (o.push(`
|
|
34588
34605
|
<text
|
|
34589
34606
|
x="${N}"
|
|
@@ -34592,7 +34609,7 @@ function ni(e, t, n, r) {
|
|
|
34592
34609
|
font-size="${h}"
|
|
34593
34610
|
fill="${g}"
|
|
34594
34611
|
>
|
|
34595
|
-
${
|
|
34612
|
+
${Tr(p)}
|
|
34596
34613
|
</text>
|
|
34597
34614
|
`), P += D);
|
|
34598
34615
|
let F = y ? 15 : A, ee = y ? A : 15, I = y ? 0 : A, te = y ? A : 0, ne = b ? 15 : 20, re = y ? `M ${N} ${P + M} v ${A - M} h 15 v ${-(A - M)} a ${M} ${M} 0 0 0 -15 0 z` : `M ${N + M} ${P} h ${A - M} v 15 h ${-(A - M)} a ${M} ${M} 0 0 1 0 -15 z`;
|
|
@@ -34623,7 +34640,7 @@ function ni(e, t, n, r) {
|
|
|
34623
34640
|
y2="${y ? P + .5 : P + ne}"
|
|
34624
34641
|
stroke="#ffffff"
|
|
34625
34642
|
/>
|
|
34626
|
-
`), N =
|
|
34643
|
+
`), N = ei, P = ei + D;
|
|
34627
34644
|
for (let e = 0; e < S.length; e++, N += I, P += te) o.push(`
|
|
34628
34645
|
<text
|
|
34629
34646
|
x="${y ? N + 15 + 10 : N + (b ? A / 2 : A)}"
|
|
@@ -34633,7 +34650,7 @@ function ni(e, t, n, r) {
|
|
|
34633
34650
|
font-size="${l}"
|
|
34634
34651
|
fill="${u}"
|
|
34635
34652
|
>
|
|
34636
|
-
${
|
|
34653
|
+
${Tr(S[e])}
|
|
34637
34654
|
</text>
|
|
34638
34655
|
`);
|
|
34639
34656
|
}
|
|
@@ -34649,9 +34666,9 @@ function ni(e, t, n, r) {
|
|
|
34649
34666
|
</svg>
|
|
34650
34667
|
`;
|
|
34651
34668
|
}
|
|
34652
|
-
function
|
|
34669
|
+
function oi(e, t, n, r) {
|
|
34653
34670
|
let i = t.categoricalColors[n];
|
|
34654
|
-
if (i === void 0) return
|
|
34671
|
+
if (i === void 0) return ri();
|
|
34655
34672
|
let a = xr(i.values), o = Object.entries(i.colors).map(([e, n]) => ({
|
|
34656
34673
|
color: e,
|
|
34657
34674
|
label: n.title ?? a[e] ?? t.defaultGroupName,
|
|
@@ -34659,7 +34676,7 @@ function ri(e, t, n, r) {
|
|
|
34659
34676
|
hidden: n.hidden,
|
|
34660
34677
|
svg: ""
|
|
34661
34678
|
})).filter((e) => !e.hidden).sort((e, t) => e.order - t.order);
|
|
34662
|
-
return
|
|
34679
|
+
return Qr({
|
|
34663
34680
|
type: "manualLegend",
|
|
34664
34681
|
id: e.id,
|
|
34665
34682
|
name: e.name,
|
|
@@ -34667,20 +34684,20 @@ function ri(e, t, n, r) {
|
|
|
34667
34684
|
stacking: e.stacking ?? "vertical",
|
|
34668
34685
|
layout: e.layout ?? "vertical",
|
|
34669
34686
|
title: e.title ?? "",
|
|
34670
|
-
titleFont: e.titleFont ??
|
|
34687
|
+
titleFont: e.titleFont ?? $r,
|
|
34671
34688
|
titleFontColor: e.titleFontColor ?? "#000000",
|
|
34672
34689
|
titleFontSize: e.titleFontSize ?? 14,
|
|
34673
|
-
entryFont: e.labelFont ??
|
|
34690
|
+
entryFont: e.labelFont ?? $r,
|
|
34674
34691
|
entryFontColor: e.labelFontColor ?? "#000000",
|
|
34675
34692
|
entryFontSize: e.labelFontSize ?? 13,
|
|
34676
34693
|
entryShape: "rectangle",
|
|
34677
34694
|
entries: o,
|
|
34678
34695
|
background: e.background ?? "#ffffff",
|
|
34679
34696
|
showBackground: e.showBackground ?? !1
|
|
34680
|
-
},
|
|
34697
|
+
}, $r, r);
|
|
34681
34698
|
}
|
|
34682
|
-
function
|
|
34683
|
-
let { decimal: t, group: n } =
|
|
34699
|
+
function si(e) {
|
|
34700
|
+
let { decimal: t, group: n } = ci();
|
|
34684
34701
|
return bn({
|
|
34685
34702
|
decimal: t,
|
|
34686
34703
|
thousands: n,
|
|
@@ -34688,7 +34705,7 @@ function ii(e) {
|
|
|
34688
34705
|
currency: ["", ""]
|
|
34689
34706
|
}).format(e);
|
|
34690
34707
|
}
|
|
34691
|
-
function
|
|
34708
|
+
function ci() {
|
|
34692
34709
|
let e = new Intl.NumberFormat(navigator.languages).formatToParts(1000.1), t = e.find((e) => e.type === "decimal")?.value, n = e.find((e) => e.type === "group")?.value;
|
|
34693
34710
|
return t !== void 0 && n !== void 0 ? {
|
|
34694
34711
|
decimal: t,
|
|
@@ -34700,23 +34717,23 @@ function ai() {
|
|
|
34700
34717
|
}
|
|
34701
34718
|
//#endregion
|
|
34702
34719
|
//#region src/adornments/manualLegend.ts
|
|
34703
|
-
function
|
|
34720
|
+
function li(e, t, n, r) {
|
|
34704
34721
|
let i = document.createElement("div");
|
|
34705
34722
|
i.className = "adornment", e.showBackground && (i.style.boxShadow = "0 0 7px 0 rgba(33, 37, 41, 0.25)", i.style.borderRadius = "10px");
|
|
34706
34723
|
let a = "ArialMT", o = [e.titleFont ?? a, e.entryFont ?? a];
|
|
34707
|
-
return
|
|
34724
|
+
return Er(Array.from(new Set(o)), t, n).then(() => i.innerHTML = Qr(e, a, r)), i;
|
|
34708
34725
|
}
|
|
34709
34726
|
//#endregion
|
|
34710
34727
|
//#region src/adornments/northArrow.ts
|
|
34711
|
-
function
|
|
34728
|
+
function ui(e, t, n) {
|
|
34712
34729
|
let r = document.createElement("div");
|
|
34713
34730
|
r.className = "adornment";
|
|
34714
34731
|
let i = (e.scale ?? 1) * 30, a = i * n;
|
|
34715
34732
|
return r.style.cssText = `width: ${a}px; height: ${a}px`, t.on("move", () => {
|
|
34716
|
-
r.innerHTML =
|
|
34717
|
-
}), r.innerHTML =
|
|
34733
|
+
r.innerHTML = di(t, i, n);
|
|
34734
|
+
}), r.innerHTML = di(t, i, n), r;
|
|
34718
34735
|
}
|
|
34719
|
-
function
|
|
34736
|
+
function di(e, t, n) {
|
|
34720
34737
|
let r = e.getBearing(), i = e.getPitch();
|
|
34721
34738
|
return `
|
|
34722
34739
|
<svg class="adornment-svg" width="${t * n}" height="${t * n}" viewBox="-5 -5 30 30" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -34729,64 +34746,59 @@ function ci(e, t, n) {
|
|
|
34729
34746
|
`;
|
|
34730
34747
|
}
|
|
34731
34748
|
//#endregion
|
|
34732
|
-
//#region src/utils/browser.ts
|
|
34733
|
-
function li() {
|
|
34734
|
-
return navigator.userAgent.toLowerCase().indexOf("mobile") >= 0;
|
|
34735
|
-
}
|
|
34736
|
-
//#endregion
|
|
34737
34749
|
//#region src/images/plus.svg?raw
|
|
34738
|
-
var
|
|
34750
|
+
var fi = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\"><path d=\"M5.5 1h1v10h-1z\"/><path d=\"M1 6.5v-1h10v1z\"/></svg>\n", pi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11 6.144H1v-1h10v1Z\"/></svg>\n";
|
|
34739
34751
|
//#endregion
|
|
34740
34752
|
//#region src/controls/controls.ts
|
|
34741
|
-
function
|
|
34753
|
+
function mi(e) {
|
|
34742
34754
|
let t = document.createElement("button");
|
|
34743
34755
|
return t.className = e.className, t.innerHTML = `${e.content}`, t.addEventListener("click", e.onClick), t;
|
|
34744
34756
|
}
|
|
34745
34757
|
//#endregion
|
|
34746
34758
|
//#region src/controls/zoomControls.ts
|
|
34747
|
-
function
|
|
34748
|
-
return
|
|
34759
|
+
function hi(e) {
|
|
34760
|
+
return mi({
|
|
34749
34761
|
type: "button",
|
|
34750
34762
|
className: "control-button zoom-in-button",
|
|
34751
|
-
content:
|
|
34763
|
+
content: fi,
|
|
34752
34764
|
onClick: () => e.zoomIn()
|
|
34753
34765
|
});
|
|
34754
34766
|
}
|
|
34755
|
-
function
|
|
34756
|
-
return
|
|
34767
|
+
function gi(e) {
|
|
34768
|
+
return mi({
|
|
34757
34769
|
type: "button",
|
|
34758
34770
|
className: "control-button zoom-out-button",
|
|
34759
|
-
content:
|
|
34771
|
+
content: pi,
|
|
34760
34772
|
onClick: () => e.zoomOut()
|
|
34761
34773
|
});
|
|
34762
34774
|
}
|
|
34763
34775
|
//#endregion
|
|
34764
34776
|
//#region src/images/full-screen.svg?raw
|
|
34765
|
-
var
|
|
34777
|
+
var _i = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4.774 6.44a.556.556 0 0 1 .832.734l-.047.052L2.897 9.89h1.436a.555.555 0 0 1 .065 1.107L4.333 11H1.556a.556.556 0 0 1-.552-.49L1 10.443V7.667a.556.556 0 0 1 1.107-.065l.004.065v1.436l2.663-2.662ZM10.444 1a.555.555 0 0 1 .552.49l.004.066v2.777a.556.556 0 0 1-1.107.065l-.004-.065V2.897L7.226 5.559a.556.556 0 0 1-.832-.733l.047-.052L9.103 2.11H7.667a.556.556 0 0 1-.065-1.107L7.667 1h2.777Z\"/></svg>\n";
|
|
34766
34778
|
//#endregion
|
|
34767
34779
|
//#region src/utils/fullscreen.ts
|
|
34768
|
-
function
|
|
34780
|
+
function vi() {
|
|
34769
34781
|
return !!(document.fullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled || document.webkitFullscreenEnabled);
|
|
34770
34782
|
}
|
|
34771
|
-
function
|
|
34783
|
+
function yi(e) {
|
|
34772
34784
|
return document.fullscreenElement === e || document.webkitFullscreenElement === e || document.mozFullScreenElement === e || document.msFullscreenElement === e;
|
|
34773
34785
|
}
|
|
34774
|
-
function
|
|
34786
|
+
function bi(e) {
|
|
34775
34787
|
e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.msRequestFullscreen ? e.msRequestFullscreen() : e.webkitRequestFullscreen && e.webkitRequestFullscreen();
|
|
34776
34788
|
}
|
|
34777
|
-
function
|
|
34789
|
+
function xi() {
|
|
34778
34790
|
document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.webkitCancelFullScreen && document.webkitCancelFullScreen();
|
|
34779
34791
|
}
|
|
34780
34792
|
//#endregion
|
|
34781
34793
|
//#region src/controls/fullscreenControls.ts
|
|
34782
|
-
function
|
|
34783
|
-
return
|
|
34794
|
+
function Si(e) {
|
|
34795
|
+
return mi({
|
|
34784
34796
|
type: "button",
|
|
34785
34797
|
className: "control-button fullscreen-control-button",
|
|
34786
|
-
content:
|
|
34798
|
+
content: _i,
|
|
34787
34799
|
onClick: () => {
|
|
34788
34800
|
let t = e.getContainer();
|
|
34789
|
-
if (
|
|
34801
|
+
if (vi()) yi(t) ? xi() : bi(t);
|
|
34790
34802
|
else {
|
|
34791
34803
|
let e = document.location.href;
|
|
34792
34804
|
e += e.includes("?") ? "&" : "?", e += "close-tab", window.open(e, "_blank");
|
|
@@ -34796,10 +34808,10 @@ function bi(e) {
|
|
|
34796
34808
|
}
|
|
34797
34809
|
//#endregion
|
|
34798
34810
|
//#region src/images/geolocation.svg?raw
|
|
34799
|
-
var
|
|
34800
|
-
let t = 2 * window.devicePixelRatio, n = new
|
|
34811
|
+
var Ci = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.571.875V0h.858v.875a5.143 5.143 0 0 1 4.696 4.696H12v.858h-.875a5.143 5.143 0 0 1-4.696 4.696V12H5.57v-.875A5.143 5.143 0 0 1 .875 6.429H0V5.57h.875A5.143 5.143 0 0 1 5.571.875Zm0 .86a4.286 4.286 0 0 0-3.835 3.836h.835v.858h-.835a4.286 4.286 0 0 0 3.835 3.835V9.43h.858v.835a4.285 4.285 0 0 0 3.835-3.835H9.43v-.86h.835A4.285 4.285 0 0 0 6.43 1.736v.835h-.86v-.835Zm-.177 3.659a.857.857 0 1 1 1.212 1.212.857.857 0 0 1-1.212-1.212Z\"/></svg>\n", wi = "<svg width=\"34\" viewBox=\"5 5 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#a)\" fill=\"#343A40\"><path d=\"M15.016 22.656a5.797 5.797 0 0 1-1.016-.46c-2.858-1.65-3.846-5.338-2.196-8.196 1.65-2.858 5.338-3.846 8.196-2.196 2.858 1.65 3.846 5.338 2.196 8.196-.2.346-.434.673-.694.962l2.933 2.72A10.1 10.1 0 0 0 25.66 22c2.75-4.763 1.103-10.91-3.66-13.66S11.09 7.237 8.34 12 7.237 22.91 12 25.66a9.61 9.61 0 0 0 1.635.748l1.381-3.752Z\"/><path d=\"m11.01 17.183-3.999.06a10.051 10.051 0 0 0 6.427 9.097l1.484-3.714a6.025 6.025 0 0 1-3.913-5.443Zm13.284 5.183 1-1.732-2.598-1.5-1 1.732 2.598 1.5Zm-3.428-10.062 1.5-2.598-1.732-1-1.5 2.598 1.732 1Zm-9.562 2.562 1-1.732-2.598-1.5-1 1.732 2.598 1.5Z\"/><path d=\"m13.366 25.294 1.5-2.598-1.732-1-1.5 2.598 1.732 1Z\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"m33.393 12.607-12 20.784-20.785-12 12-20.784z\"/></clipPath></defs></svg>\n", Ti = "<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g filter=\"url(#a)\"><circle cx=\"16\" cy=\"16\" r=\"10\" fill=\"#349CF2\"/><circle cx=\"16\" cy=\"16\" r=\"9\" stroke=\"#fff\" stroke-width=\"2\"/></g><defs><filter id=\"a\" x=\"0\" y=\"0\" width=\"32\" height=\"32\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dy=\"4\"/><feGaussianBlur stdDeviation=\"2\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_15_3175\"/><feBlend in=\"SourceGraphic\" in2=\"effect1_dropShadow_15_3175\" result=\"shape\"/></filter></defs></svg>\n", Ei = (e) => {
|
|
34812
|
+
let t = 2 * window.devicePixelRatio, n = new Rr(e).getMapLibreImageKey(Ti, t);
|
|
34801
34813
|
e.setLayoutProperty("location-dot", "icon-image", n);
|
|
34802
|
-
},
|
|
34814
|
+
}, Di = (e) => {
|
|
34803
34815
|
e.getSource("location-circle") || e.addSource("location-circle", {
|
|
34804
34816
|
type: "geojson",
|
|
34805
34817
|
data: {
|
|
@@ -34836,8 +34848,8 @@ var xi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
|
|
|
34836
34848
|
"mc-name": "location dot",
|
|
34837
34849
|
"mc-skip-load": !0
|
|
34838
34850
|
}
|
|
34839
|
-
}, "mc-before-names"),
|
|
34840
|
-
},
|
|
34851
|
+
}, "mc-before-names"), Ei(e);
|
|
34852
|
+
}, Oi = (e, t, n) => {
|
|
34841
34853
|
let r = e.getSource("location-dot");
|
|
34842
34854
|
r && r.setData({
|
|
34843
34855
|
type: "Feature",
|
|
@@ -34847,7 +34859,7 @@ var xi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
|
|
|
34847
34859
|
},
|
|
34848
34860
|
properties: {}
|
|
34849
34861
|
});
|
|
34850
|
-
},
|
|
34862
|
+
}, ki = (e, t, n) => {
|
|
34851
34863
|
let r = n / 1e3, i = [], a = r / (111.32 * Math.cos(t * Math.PI / 180)), o = r / 110.574;
|
|
34852
34864
|
for (let n = 0; n < 64; n++) {
|
|
34853
34865
|
let r = n / 64 * (2 * Math.PI), s = a * Math.cos(r), c = o * Math.sin(r);
|
|
@@ -34863,7 +34875,7 @@ var xi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
|
|
|
34863
34875
|
}
|
|
34864
34876
|
}]
|
|
34865
34877
|
};
|
|
34866
|
-
},
|
|
34878
|
+
}, Ai = () => {
|
|
34867
34879
|
let e = document.querySelector(".map"), t = document.createElement("div");
|
|
34868
34880
|
t.classList.add("location-notification"), t.textContent = "Geolocation is not available", e?.appendChild(t), setTimeout(() => {
|
|
34869
34881
|
e?.removeChild(t);
|
|
@@ -34871,7 +34883,7 @@ var xi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
|
|
|
34871
34883
|
};
|
|
34872
34884
|
//#endregion
|
|
34873
34885
|
//#region src/controls/geolocationControls.ts
|
|
34874
|
-
function
|
|
34886
|
+
function ji(e) {
|
|
34875
34887
|
let t = !1, n = (e) => {
|
|
34876
34888
|
let n = document.querySelector(".geolocation-button"), r = n?.querySelector(".geolocation-icon"), i = n?.querySelector(".locating-icon");
|
|
34877
34889
|
r && i && (r.classList.toggle("active", !e), i.classList.toggle("active", e)), t = e;
|
|
@@ -34883,21 +34895,21 @@ function ki(e) {
|
|
|
34883
34895
|
duration: 1e3
|
|
34884
34896
|
}) : e.setCenter && e.setCenter(o);
|
|
34885
34897
|
let s = e.getSource("location-circle");
|
|
34886
|
-
s && s.setData(
|
|
34898
|
+
s && s.setData(ki(r, i, a / 2)), Oi(e, r, i), e.once("moveend", () => n(!1));
|
|
34887
34899
|
}, i = (e) => {
|
|
34888
34900
|
console.error("Geolocation error:", e), n(!1);
|
|
34889
34901
|
};
|
|
34890
|
-
return
|
|
34902
|
+
return mi({
|
|
34891
34903
|
type: "button",
|
|
34892
34904
|
className: "control-button geolocation-button",
|
|
34893
34905
|
content: `
|
|
34894
|
-
<div class="location-icon geolocation-icon active">${
|
|
34895
|
-
<div class="location-icon locating-icon">${
|
|
34906
|
+
<div class="location-icon geolocation-icon active">${Ci}</div>
|
|
34907
|
+
<div class="location-icon locating-icon">${wi}</div>
|
|
34896
34908
|
`,
|
|
34897
34909
|
onClick: () => {
|
|
34898
34910
|
if (!t) {
|
|
34899
|
-
if (e.getSource("location-circle") ||
|
|
34900
|
-
|
|
34911
|
+
if (e.getSource("location-circle") || Di(e), n(!0), !navigator.geolocation) {
|
|
34912
|
+
Ai(), n(!1);
|
|
34901
34913
|
return;
|
|
34902
34914
|
}
|
|
34903
34915
|
navigator.geolocation.getCurrentPosition(r, i, {
|
|
@@ -34910,14 +34922,14 @@ function ki(e) {
|
|
|
34910
34922
|
}
|
|
34911
34923
|
//#endregion
|
|
34912
34924
|
//#region src/images/refresh.svg?raw
|
|
34913
|
-
var
|
|
34925
|
+
var Mi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.155 1.146A.546.546 0 0 1 6.53 1c.14 0 .275.053.375.146l1.588 1.5c.1.094.155.221.155.354 0 .132-.056.26-.155.353l-1.588 1.5a.546.546 0 0 1-.373.14.545.545 0 0 1-.37-.146.487.487 0 0 1-.154-.349.486.486 0 0 1 .148-.352L6.84 3.5H6c-1.878 0-3.441 1.476-3.441 3.25S4.122 10 6 10s3.441-1.476 3.441-3.25c0-.133.056-.26.155-.354a.546.546 0 0 1 .375-.146c.14 0 .275.053.374.146.1.094.155.221.155.354C10.5 9.076 8.463 11 6 11S1.5 9.076 1.5 6.75 3.537 2.5 6 2.5h.84l-.685-.647A.486.486 0 0 1 6 1.5c0-.133.056-.26.155-.354Z\"/></svg>\n";
|
|
34914
34926
|
//#endregion
|
|
34915
34927
|
//#region src/controls/refreshMapControls.ts
|
|
34916
|
-
function
|
|
34917
|
-
return
|
|
34928
|
+
function Ni(e, t) {
|
|
34929
|
+
return mi({
|
|
34918
34930
|
type: "button",
|
|
34919
34931
|
className: "control-button refresh-button",
|
|
34920
|
-
content:
|
|
34932
|
+
content: Mi,
|
|
34921
34933
|
onClick: () => {
|
|
34922
34934
|
e.easeTo({
|
|
34923
34935
|
center: t.center,
|
|
@@ -34930,7 +34942,7 @@ function ji(e, t) {
|
|
|
34930
34942
|
}
|
|
34931
34943
|
//#endregion
|
|
34932
34944
|
//#region src/images/search.svg?raw
|
|
34933
|
-
var
|
|
34945
|
+
var Pi = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\"><path d=\"M5.374.952a4.546 4.546 0 0 1 4.656 4.175 4.55 4.55 0 0 1-.958 3.184l1.824 1.81a.55.55 0 0 1 0 .765.55.55 0 0 1-.602.121.6.6 0 0 1-.179-.12l-1.807-1.81A4.544 4.544 0 0 1 .953 5.376 4.553 4.553 0 0 1 5.374.952m1.454 1.37a3.447 3.447 0 0 0-4.505 4.51 3.45 3.45 0 0 0 3.186 2.13A3.45 3.45 0 0 0 8.957 5.51a3.455 3.455 0 0 0-2.129-3.187\"/></svg>\n", Fi = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path d=\"m7.038 5.96 3.03 3.03L13.1 5.958l1.01 1.01L11.078 10l3.031 3.032-1.01 1.01-3.031-3.031-3.03 3.028-1.01-1.01L9.059 10l-3.03-3.03z\"/></svg>\n", Ii = {
|
|
34934
34946
|
da_DK: {
|
|
34935
34947
|
search: "Search",
|
|
34936
34948
|
videoAlert: "The video will only work when you publish the map",
|
|
@@ -34981,17 +34993,17 @@ var Mi = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" v
|
|
|
34981
34993
|
macHelpText: "Gebruik ⌘ + Scroll om de kaart te zoomen"
|
|
34982
34994
|
}
|
|
34983
34995
|
};
|
|
34984
|
-
function
|
|
34985
|
-
let e = navigator.language.replace("-", "_"), t = Object.keys(
|
|
34996
|
+
function Li() {
|
|
34997
|
+
let e = navigator.language.replace("-", "_"), t = Object.keys(Ii);
|
|
34986
34998
|
return t.find((t) => t === e) ?? t.find((t) => t.split("_")[0] === e.split("_")[0]) ?? "en_GB";
|
|
34987
34999
|
}
|
|
34988
|
-
var
|
|
34989
|
-
function
|
|
34990
|
-
return
|
|
35000
|
+
var Ri = Li();
|
|
35001
|
+
function zi(e) {
|
|
35002
|
+
return Ii[Ri][e] ?? e;
|
|
34991
35003
|
}
|
|
34992
35004
|
//#endregion
|
|
34993
35005
|
//#region src/utils/graphhopper.ts
|
|
34994
|
-
var
|
|
35006
|
+
var Bi = class {
|
|
34995
35007
|
async getLocationInBounds(e, t, n = 10) {
|
|
34996
35008
|
try {
|
|
34997
35009
|
let r = await this._callGraphHopper({
|
|
@@ -35006,7 +35018,7 @@ var Ri = class {
|
|
|
35006
35018
|
}
|
|
35007
35019
|
async _callGraphHopper(e) {
|
|
35008
35020
|
let t = new URLSearchParams(e);
|
|
35009
|
-
t.append("key", "c5c40ac9-ed73-4e20-aed6-cfe495604ca8"), t.append("locale",
|
|
35021
|
+
t.append("key", "c5c40ac9-ed73-4e20-aed6-cfe495604ca8"), t.append("locale", Ri.slice(0, 2));
|
|
35010
35022
|
let n = { headers: { Accept: "application/json" } }, r = `https://graphhopper.com/api/1/geocode?${t}`;
|
|
35011
35023
|
return await (await fetch(r, n)).json();
|
|
35012
35024
|
}
|
|
@@ -35033,7 +35045,7 @@ var Ri = class {
|
|
|
35033
35045
|
].filter(Boolean).join(", ")
|
|
35034
35046
|
}));
|
|
35035
35047
|
}
|
|
35036
|
-
},
|
|
35048
|
+
}, Vi = class {
|
|
35037
35049
|
map;
|
|
35038
35050
|
mapContainer;
|
|
35039
35051
|
container;
|
|
@@ -35043,7 +35055,7 @@ var Ri = class {
|
|
|
35043
35055
|
inputWrapper;
|
|
35044
35056
|
button;
|
|
35045
35057
|
isOpen = !1;
|
|
35046
|
-
geocoder = new
|
|
35058
|
+
geocoder = new Bi();
|
|
35047
35059
|
suggestions = [];
|
|
35048
35060
|
items = [];
|
|
35049
35061
|
index = 0;
|
|
@@ -35052,9 +35064,9 @@ var Ri = class {
|
|
|
35052
35064
|
this.map = e, this.container = document.createElement("div"), this.control = document.createElement("div"), this.input = document.createElement("input"), this.dropdown = document.createElement("div"), this.inputWrapper = document.createElement("div"), this.button = document.createElement("button"), this.mapContainer = this.map.getContainer();
|
|
35053
35065
|
}
|
|
35054
35066
|
init() {
|
|
35055
|
-
this.container.className = "geocoder-container", this.control.className = "geocoder-control", this.input.className = "geocoder-input", this.dropdown.className = "geocoder-dropdown", this.inputWrapper.className = "geocoder-input-wrapper", this.button.className = "control-button", this.input.type = "text", this.input.placeholder =
|
|
35067
|
+
this.container.className = "geocoder-container", this.control.className = "geocoder-control", this.input.className = "geocoder-input", this.dropdown.className = "geocoder-dropdown", this.inputWrapper.className = "geocoder-input-wrapper", this.button.className = "control-button", this.input.type = "text", this.input.placeholder = zi("search"), this.button.innerHTML = Pi;
|
|
35056
35068
|
let e = document.createElement("button");
|
|
35057
|
-
e.className = "geocoder-clear", e.innerHTML =
|
|
35069
|
+
e.className = "geocoder-clear", e.innerHTML = Fi;
|
|
35058
35070
|
let t = document.createElement("div");
|
|
35059
35071
|
return t.className = "geocoder-scrollwrapper", t.append(this.dropdown), this.inputWrapper.append(this.input, e), this.control.append(this.button, this.inputWrapper, t), e.addEventListener("click", () => this.clearAll()), this.button.addEventListener("click", () => this.toggle()), this.input.addEventListener("input", () => this.onInput()), this.input.addEventListener("keydown", (e) => this.onKeyDown(e)), this.dropdown.addEventListener("mousemove", (e) => this.onMouseMove(e)), this.mapContainer.addEventListener("mousedown", (e) => this.clickOutside(e)), window.addEventListener("resize", () => this.setMaxSizes()), this.setMaxSizes(), this.updateVisibility(), this.container.append(this.control), this.container;
|
|
35060
35072
|
}
|
|
@@ -35137,25 +35149,25 @@ var Ri = class {
|
|
|
35137
35149
|
};
|
|
35138
35150
|
//#endregion
|
|
35139
35151
|
//#region src/controls/webControls.ts
|
|
35140
|
-
function
|
|
35152
|
+
function Hi(e, t, n) {
|
|
35141
35153
|
let r = document.createElement("div");
|
|
35142
35154
|
r.classList.add("web-control", "adornment");
|
|
35143
35155
|
let i = e.buttons.flatMap((e) => e === "zoom" ? ["zoomIn", "zoomOut"] : e);
|
|
35144
|
-
return (
|
|
35156
|
+
return (Cr() ? i.filter((e) => e !== "zoomIn" && e !== "zoomOut") : i).forEach((e) => {
|
|
35145
35157
|
let i;
|
|
35146
|
-
if (e === "zoomIn") i =
|
|
35147
|
-
else if (e === "zoomOut") i =
|
|
35148
|
-
else if (e === "fullscreen") i =
|
|
35149
|
-
else if (e === "geolocation") i =
|
|
35150
|
-
else if (e === "refresh") i =
|
|
35151
|
-
else if (e === "search") i = new
|
|
35158
|
+
if (e === "zoomIn") i = hi(t);
|
|
35159
|
+
else if (e === "zoomOut") i = gi(t);
|
|
35160
|
+
else if (e === "fullscreen") i = Si(t);
|
|
35161
|
+
else if (e === "geolocation") i = ji(t);
|
|
35162
|
+
else if (e === "refresh") i = Ni(t, n);
|
|
35163
|
+
else if (e === "search") i = new Vi(t).init();
|
|
35152
35164
|
else return;
|
|
35153
35165
|
r.appendChild(i);
|
|
35154
35166
|
}), r;
|
|
35155
35167
|
}
|
|
35156
35168
|
//#endregion
|
|
35157
35169
|
//#region src/adornments/copyright.ts
|
|
35158
|
-
var
|
|
35170
|
+
var Ui = {
|
|
35159
35171
|
here: {
|
|
35160
35172
|
href: "https://www.here.com/",
|
|
35161
35173
|
label: "© HERE 2025"
|
|
@@ -35169,16 +35181,16 @@ var Vi = {
|
|
|
35169
35181
|
label: "© OpenStreetMap"
|
|
35170
35182
|
}
|
|
35171
35183
|
};
|
|
35172
|
-
function
|
|
35184
|
+
function Wi(e, t, n) {
|
|
35173
35185
|
let r = document.createElement("div");
|
|
35174
35186
|
r.className = "adornment";
|
|
35175
35187
|
let i = () => {
|
|
35176
|
-
r.innerHTML =
|
|
35188
|
+
r.innerHTML = qi(t, e, n);
|
|
35177
35189
|
};
|
|
35178
35190
|
return i(), t.on("attributionchange", i), t.on("zoomend", i), r;
|
|
35179
35191
|
}
|
|
35180
|
-
function
|
|
35181
|
-
let t = Object.values(e.style.sourceCaches), n = [
|
|
35192
|
+
function Gi(e) {
|
|
35193
|
+
let t = Object.values(e.style.sourceCaches), n = [Ui.mapcreator], r = {
|
|
35182
35194
|
osm: !1,
|
|
35183
35195
|
here: !1
|
|
35184
35196
|
};
|
|
@@ -35189,16 +35201,16 @@ function Ui(e) {
|
|
|
35189
35201
|
"attribution" in e && typeof e.attribution == "string" && (e.attribution.includes("OpenStreetMap") && (r.osm = !0), e.attribution.includes("HERE") && (r.here = !0));
|
|
35190
35202
|
}
|
|
35191
35203
|
}
|
|
35192
|
-
return r.osm && n.push(
|
|
35204
|
+
return r.osm && n.push(Ui.openStreetMap), r.here && n.push(Ui.here), n;
|
|
35193
35205
|
}
|
|
35194
|
-
function
|
|
35206
|
+
function Ki(e, t, n) {
|
|
35195
35207
|
let r = document.createElement("span");
|
|
35196
35208
|
r.style.fontFamily = t, r.style.fontSize = `${n}px`, r.style.position = "absolute", r.style.visibility = "hidden", r.innerText = e, document.body.appendChild(r);
|
|
35197
35209
|
let i = Math.max(r.offsetWidth, 1);
|
|
35198
35210
|
return r.remove(), i;
|
|
35199
35211
|
}
|
|
35200
|
-
function
|
|
35201
|
-
let { color: r = "#000000", font: i = "Arial, sans-serif", fontSize: a = 10, orientation: o = "horizontal", position: s } = t, c =
|
|
35212
|
+
function qi(e, t, n) {
|
|
35213
|
+
let { color: r = "#000000", font: i = "Arial, sans-serif", fontSize: a = 10, orientation: o = "horizontal", position: s } = t, c = Gi(e), l = Ki(c.map(({ label: e }) => e).join(" "), i, a), u = a * 1.2, d = o === "vertical", f = ["top_left", "bottom_left"].includes(s), p = d ? u : l, m = d ? l : u, h = d ? f ? -90 : 90 : 0, g = d ? f ? .38 * a : .3 * a : .38 * a, _ = c.map((e) => `<a href="${e.href}" target="_blank">${e.label}</a>`).join(" ");
|
|
35202
35214
|
return `
|
|
35203
35215
|
<svg
|
|
35204
35216
|
class="adornment-svg"
|
|
@@ -35223,15 +35235,15 @@ function Gi(e, t, n) {
|
|
|
35223
35235
|
}
|
|
35224
35236
|
//#endregion
|
|
35225
35237
|
//#region node_modules/@turf/area/dist/esm/index.js
|
|
35226
|
-
function
|
|
35227
|
-
return Hn(e, (e, t) => e +
|
|
35238
|
+
function Ji(e) {
|
|
35239
|
+
return Hn(e, (e, t) => e + Yi(t), 0);
|
|
35228
35240
|
}
|
|
35229
|
-
function
|
|
35241
|
+
function Yi(e) {
|
|
35230
35242
|
let t = 0, n;
|
|
35231
35243
|
switch (e.type) {
|
|
35232
|
-
case "Polygon": return
|
|
35244
|
+
case "Polygon": return Xi(e.coordinates);
|
|
35233
35245
|
case "MultiPolygon":
|
|
35234
|
-
for (n = 0; n < e.coordinates.length; n++) t +=
|
|
35246
|
+
for (n = 0; n < e.coordinates.length; n++) t += Xi(e.coordinates[n]);
|
|
35235
35247
|
return t;
|
|
35236
35248
|
case "Point":
|
|
35237
35249
|
case "MultiPoint":
|
|
@@ -35240,34 +35252,34 @@ function qi(e) {
|
|
|
35240
35252
|
}
|
|
35241
35253
|
return 0;
|
|
35242
35254
|
}
|
|
35243
|
-
function
|
|
35255
|
+
function Xi(e) {
|
|
35244
35256
|
let t = 0;
|
|
35245
35257
|
if (e && e.length > 0) {
|
|
35246
|
-
t += Math.abs(
|
|
35247
|
-
for (let n = 1; n < e.length; n++) t -= Math.abs(
|
|
35258
|
+
t += Math.abs($i(e[0]));
|
|
35259
|
+
for (let n = 1; n < e.length; n++) t -= Math.abs($i(e[n]));
|
|
35248
35260
|
}
|
|
35249
35261
|
return t;
|
|
35250
35262
|
}
|
|
35251
|
-
var
|
|
35252
|
-
function
|
|
35263
|
+
var Zi = Nn * Nn / 2, Qi = Math.PI / 180;
|
|
35264
|
+
function $i(e) {
|
|
35253
35265
|
let t = e.length - 1;
|
|
35254
35266
|
if (t <= 2) return 0;
|
|
35255
35267
|
let n = 0, r = 0;
|
|
35256
35268
|
for (; r < t;) {
|
|
35257
|
-
let i = e[r], a = e[r + 1 === t ? 0 : r + 1], o = e[r + 2 >= t ? (r + 2) % t : r + 2], s = i[0] *
|
|
35269
|
+
let i = e[r], a = e[r + 1 === t ? 0 : r + 1], o = e[r + 2 >= t ? (r + 2) % t : r + 2], s = i[0] * Qi, c = a[1] * Qi, l = o[0] * Qi;
|
|
35258
35270
|
n += (l - s) * Math.sin(c), r++;
|
|
35259
35271
|
}
|
|
35260
|
-
return n *
|
|
35272
|
+
return n * Zi;
|
|
35261
35273
|
}
|
|
35262
35274
|
//#endregion
|
|
35263
35275
|
//#region node_modules/topojson-client/src/identity.js
|
|
35264
|
-
function
|
|
35276
|
+
function ea(e) {
|
|
35265
35277
|
return e;
|
|
35266
35278
|
}
|
|
35267
35279
|
//#endregion
|
|
35268
35280
|
//#region node_modules/topojson-client/src/transform.js
|
|
35269
|
-
function
|
|
35270
|
-
if (e == null) return
|
|
35281
|
+
function ta(e) {
|
|
35282
|
+
if (e == null) return ea;
|
|
35271
35283
|
var t, n, r = e.scale[0], i = e.scale[1], a = e.translate[0], o = e.translate[1];
|
|
35272
35284
|
return function(e, s) {
|
|
35273
35285
|
s || (t = n = 0);
|
|
@@ -35278,21 +35290,21 @@ function $i(e) {
|
|
|
35278
35290
|
}
|
|
35279
35291
|
//#endregion
|
|
35280
35292
|
//#region node_modules/topojson-client/src/reverse.js
|
|
35281
|
-
function
|
|
35293
|
+
function na(e, t) {
|
|
35282
35294
|
for (var n, r = e.length, i = r - t; i < --r;) n = e[i], e[i++] = e[r], e[r] = n;
|
|
35283
35295
|
}
|
|
35284
35296
|
//#endregion
|
|
35285
35297
|
//#region node_modules/topojson-client/src/feature.js
|
|
35286
|
-
function
|
|
35298
|
+
function ra(e, t) {
|
|
35287
35299
|
return typeof t == "string" && (t = e.objects[t]), t.type === "GeometryCollection" ? {
|
|
35288
35300
|
type: "FeatureCollection",
|
|
35289
35301
|
features: t.geometries.map(function(t) {
|
|
35290
|
-
return
|
|
35302
|
+
return ia(e, t);
|
|
35291
35303
|
})
|
|
35292
|
-
} :
|
|
35304
|
+
} : ia(e, t);
|
|
35293
35305
|
}
|
|
35294
|
-
function
|
|
35295
|
-
var n = t.id, r = t.bbox, i = t.properties == null ? {} : t.properties, a =
|
|
35306
|
+
function ia(e, t) {
|
|
35307
|
+
var n = t.id, r = t.bbox, i = t.properties == null ? {} : t.properties, a = aa(e, t);
|
|
35296
35308
|
return n == null && r == null ? {
|
|
35297
35309
|
type: "Feature",
|
|
35298
35310
|
properties: i,
|
|
@@ -35310,12 +35322,12 @@ function na(e, t) {
|
|
|
35310
35322
|
geometry: a
|
|
35311
35323
|
};
|
|
35312
35324
|
}
|
|
35313
|
-
function
|
|
35314
|
-
var n =
|
|
35325
|
+
function aa(e, t) {
|
|
35326
|
+
var n = ta(e.transform), r = e.arcs;
|
|
35315
35327
|
function i(e, t) {
|
|
35316
35328
|
t.length && t.pop();
|
|
35317
35329
|
for (var i = r[e < 0 ? ~e : e], a = 0, o = i.length; a < o; ++a) t.push(n(i[a], a));
|
|
35318
|
-
e < 0 &&
|
|
35330
|
+
e < 0 && na(t, o);
|
|
35319
35331
|
}
|
|
35320
35332
|
function a(e) {
|
|
35321
35333
|
return n(e);
|
|
@@ -35367,7 +35379,7 @@ function ra(e, t) {
|
|
|
35367
35379
|
}
|
|
35368
35380
|
//#endregion
|
|
35369
35381
|
//#region node_modules/bignumber.js/bignumber.mjs
|
|
35370
|
-
var
|
|
35382
|
+
var oa = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, sa = Math.ceil, Y = Math.floor, ca = "[BigNumber Error] ", la = ca + "Number primitive has more than 15 significant digits: ", ua = 0x5af3107a4000, X = 14, da = 9007199254740991, fa = [
|
|
35371
35383
|
1,
|
|
35372
35384
|
10,
|
|
35373
35385
|
100,
|
|
@@ -35382,8 +35394,8 @@ var ia = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, aa = Math.ceil, oa = Math
|
|
|
35382
35394
|
1e11,
|
|
35383
35395
|
0xe8d4a51000,
|
|
35384
35396
|
0x9184e72a000
|
|
35385
|
-
],
|
|
35386
|
-
function
|
|
35397
|
+
], Z = 1e7, pa = 1e9;
|
|
35398
|
+
function ma(e) {
|
|
35387
35399
|
var t, n, r, i = v.prototype = {
|
|
35388
35400
|
constructor: v,
|
|
35389
35401
|
toString: null,
|
|
@@ -35414,15 +35426,15 @@ function Z(e) {
|
|
|
35414
35426
|
}
|
|
35415
35427
|
h = String(e);
|
|
35416
35428
|
} else {
|
|
35417
|
-
if (!
|
|
35429
|
+
if (!oa.test(h = String(e))) return r(y, h, p);
|
|
35418
35430
|
y.s = h.charCodeAt(0) == 45 ? (h = h.slice(1), -1) : 1;
|
|
35419
35431
|
}
|
|
35420
35432
|
(l = h.indexOf(".")) > -1 && (h = h.replace(".", "")), (f = h.search(/e/i)) > 0 ? (l < 0 && (l = f), l += +h.slice(f + 1), h = h.substring(0, f)) : l < 0 && (l = h.length);
|
|
35421
35433
|
} else {
|
|
35422
|
-
if (
|
|
35434
|
+
if (va(t, 2, g.length, "Base"), t == 10 && _) return y = new v(e), S(y, o + y.e + 1, s);
|
|
35423
35435
|
if (h = String(e), p = typeof e == "number") {
|
|
35424
35436
|
if (e * 0 != 0) return r(y, h, p, t);
|
|
35425
|
-
if (y.s = 1 / e < 0 ? (h = h.slice(1), -1) : 1, v.DEBUG && h.replace(/^0\.0*|\./, "").length > 15) throw Error(
|
|
35437
|
+
if (y.s = 1 / e < 0 ? (h = h.slice(1), -1) : 1, v.DEBUG && h.replace(/^0\.0*|\./, "").length > 15) throw Error(la + e);
|
|
35426
35438
|
} else y.s = h.charCodeAt(0) === 45 ? (h = h.slice(1), -1) : 1;
|
|
35427
35439
|
for (i = g.slice(0, t), l = f = 0, m = h.length; f < m; f++) if (i.indexOf(a = h.charAt(f)) < 0) {
|
|
35428
35440
|
if (a == ".") {
|
|
@@ -35441,7 +35453,7 @@ function Z(e) {
|
|
|
35441
35453
|
for (f = 0; h.charCodeAt(f) === 48; f++);
|
|
35442
35454
|
for (m = h.length; h.charCodeAt(--m) === 48;);
|
|
35443
35455
|
if (h = h.slice(f, ++m)) {
|
|
35444
|
-
if (m -= f, p && v.DEBUG && m > 15 && (e >
|
|
35456
|
+
if (m -= f, p && v.DEBUG && m > 15 && (e > da || e !== Y(e))) throw Error(la + y.s * e);
|
|
35445
35457
|
if ((l = l - f - 1) > d) y.c = y.e = null;
|
|
35446
35458
|
else if (l < u) y.c = [y.e = 0];
|
|
35447
35459
|
else {
|
|
@@ -35454,21 +35466,21 @@ function Z(e) {
|
|
|
35454
35466
|
}
|
|
35455
35467
|
} else y.c = [y.e = 0];
|
|
35456
35468
|
}
|
|
35457
|
-
v.clone =
|
|
35469
|
+
v.clone = ma, v.ROUND_UP = 0, v.ROUND_DOWN = 1, v.ROUND_CEIL = 2, v.ROUND_FLOOR = 3, v.ROUND_HALF_UP = 4, v.ROUND_HALF_DOWN = 5, v.ROUND_HALF_EVEN = 6, v.ROUND_HALF_CEIL = 7, v.ROUND_HALF_FLOOR = 8, v.EUCLID = 9, v.config = v.set = function(e) {
|
|
35458
35470
|
var t, n;
|
|
35459
35471
|
if (e != null) if (typeof e == "object") {
|
|
35460
|
-
if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (n = e[t],
|
|
35461
|
-
else if (
|
|
35462
|
-
else throw Error(
|
|
35472
|
+
if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (n = e[t], va(n, 0, pa, t), o = n), e.hasOwnProperty(t = "ROUNDING_MODE") && (n = e[t], va(n, 0, 8, t), s = n), e.hasOwnProperty(t = "EXPONENTIAL_AT") && (n = e[t], n && n.pop ? (va(n[0], -pa, 0, t), va(n[1], 0, pa, t), c = n[0], l = n[1]) : (va(n, -pa, pa, t), c = -(l = n < 0 ? -n : n))), e.hasOwnProperty(t = "RANGE")) if (n = e[t], n && n.pop) va(n[0], -pa, -1, t), va(n[1], 1, pa, t), u = n[0], d = n[1];
|
|
35473
|
+
else if (va(n, -pa, pa, t), n) u = -(d = n < 0 ? -n : n);
|
|
35474
|
+
else throw Error(ca + t + " cannot be zero: " + n);
|
|
35463
35475
|
if (e.hasOwnProperty(t = "CRYPTO")) if (n = e[t], n === !!n) if (n) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) f = n;
|
|
35464
|
-
else throw f = !n, Error(
|
|
35476
|
+
else throw f = !n, Error(ca + "crypto unavailable");
|
|
35465
35477
|
else f = n;
|
|
35466
|
-
else throw Error(
|
|
35467
|
-
if (e.hasOwnProperty(t = "MODULO_MODE") && (n = e[t],
|
|
35468
|
-
else throw Error(
|
|
35478
|
+
else throw Error(ca + t + " not true or false: " + n);
|
|
35479
|
+
if (e.hasOwnProperty(t = "MODULO_MODE") && (n = e[t], va(n, 0, 9, t), p = n), e.hasOwnProperty(t = "POW_PRECISION") && (n = e[t], va(n, 0, pa, t), m = n), e.hasOwnProperty(t = "FORMAT")) if (n = e[t], typeof n == "object") h = n;
|
|
35480
|
+
else throw Error(ca + t + " not an object: " + n);
|
|
35469
35481
|
if (e.hasOwnProperty(t = "ALPHABET")) if (n = e[t], typeof n == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(n)) _ = n.slice(0, 10) == "0123456789", g = n;
|
|
35470
|
-
else throw Error(
|
|
35471
|
-
} else throw Error(
|
|
35482
|
+
else throw Error(ca + t + " invalid: " + n);
|
|
35483
|
+
} else throw Error(ca + "Object expected: " + e);
|
|
35472
35484
|
return {
|
|
35473
35485
|
DECIMAL_PLACES: o,
|
|
35474
35486
|
ROUNDING_MODE: s,
|
|
@@ -35485,39 +35497,39 @@ function Z(e) {
|
|
|
35485
35497
|
if (!v.DEBUG) return !0;
|
|
35486
35498
|
var t, n, r = e.c, i = e.e, a = e.s;
|
|
35487
35499
|
out: if ({}.toString.call(r) == "[object Array]") {
|
|
35488
|
-
if ((a === 1 || a === -1) && i >= -
|
|
35500
|
+
if ((a === 1 || a === -1) && i >= -pa && i <= pa && i === Y(i)) {
|
|
35489
35501
|
if (r[0] === 0) {
|
|
35490
35502
|
if (i === 0 && r.length === 1) return !0;
|
|
35491
35503
|
break out;
|
|
35492
35504
|
}
|
|
35493
35505
|
if (t = (i + 1) % X, t < 1 && (t += X), String(r[0]).length == t) {
|
|
35494
|
-
for (t = 0; t < r.length; t++) if (n = r[t], n < 0 || n >=
|
|
35506
|
+
for (t = 0; t < r.length; t++) if (n = r[t], n < 0 || n >= ua || n !== Y(n)) break out;
|
|
35495
35507
|
if (n !== 0) return !0;
|
|
35496
35508
|
}
|
|
35497
35509
|
}
|
|
35498
35510
|
} else if (r === null && i === null && (a === null || a === 1 || a === -1)) return !0;
|
|
35499
|
-
throw Error(
|
|
35511
|
+
throw Error(ca + "Invalid BigNumber: " + e);
|
|
35500
35512
|
}, v.maximum = v.max = function() {
|
|
35501
35513
|
return b(arguments, -1);
|
|
35502
35514
|
}, v.minimum = v.min = function() {
|
|
35503
35515
|
return b(arguments, 1);
|
|
35504
35516
|
}, v.random = (function() {
|
|
35505
35517
|
var e = 9007199254740992, t = Math.random() * e & 2097151 ? function() {
|
|
35506
|
-
return
|
|
35518
|
+
return Y(Math.random() * e);
|
|
35507
35519
|
} : function() {
|
|
35508
35520
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
35509
35521
|
};
|
|
35510
35522
|
return function(e) {
|
|
35511
35523
|
var n, r, i, s, c, l = 0, u = [], d = new v(a);
|
|
35512
|
-
if (e == null ? e = o :
|
|
35524
|
+
if (e == null ? e = o : va(e, 0, pa), s = sa(e / X), f) if (crypto.getRandomValues) {
|
|
35513
35525
|
for (n = crypto.getRandomValues(new Uint32Array(s *= 2)); l < s;) c = n[l] * 131072 + (n[l + 1] >>> 11), c >= 9e15 ? (r = crypto.getRandomValues(new Uint32Array(2)), n[l] = r[0], n[l + 1] = r[1]) : (u.push(c % 0x5af3107a4000), l += 2);
|
|
35514
35526
|
l = s / 2;
|
|
35515
35527
|
} else if (crypto.randomBytes) {
|
|
35516
35528
|
for (n = crypto.randomBytes(s *= 7); l < s;) c = (n[l] & 31) * 281474976710656 + n[l + 1] * 1099511627776 + n[l + 2] * 4294967296 + n[l + 3] * 16777216 + (n[l + 4] << 16) + (n[l + 5] << 8) + n[l + 6], c >= 9e15 ? crypto.randomBytes(7).copy(n, l) : (u.push(c % 0x5af3107a4000), l += 7);
|
|
35517
35529
|
l = s / 7;
|
|
35518
|
-
} else throw f = !1, Error(
|
|
35530
|
+
} else throw f = !1, Error(ca + "crypto unavailable");
|
|
35519
35531
|
if (!f) for (; l < s;) c = t(), c < 9e15 && (u[l++] = c % 0x5af3107a4000);
|
|
35520
|
-
for (s = u[--l], e %= X, s && e && (c =
|
|
35532
|
+
for (s = u[--l], e %= X, s && e && (c = fa[X - e], u[l] = Y(s / c) * c); u[l] === 0; u.pop(), l--);
|
|
35521
35533
|
if (l < 0) u = [i = 0];
|
|
35522
35534
|
else {
|
|
35523
35535
|
for (i = -1; u[0] === 0; u.splice(0, 1), i -= X);
|
|
@@ -35540,21 +35552,21 @@ function Z(e) {
|
|
|
35540
35552
|
}
|
|
35541
35553
|
return function(r, i, a, c, l) {
|
|
35542
35554
|
var u, d, f, p, h, _, y, b, x = r.indexOf("."), S = o, C = s;
|
|
35543
|
-
for (x >= 0 && (p = m, m = 0, r = r.replace(".", ""), b = new v(i), _ = b.pow(r.length - x), m = p, b.c = n(
|
|
35555
|
+
for (x >= 0 && (p = m, m = 0, r = r.replace(".", ""), b = new v(i), _ = b.pow(r.length - x), m = p, b.c = n(xa(ga(_.c), _.e, "0"), 10, a, e), b.e = b.c.length), y = n(r, i, a, l ? (u = g, e) : (u = e, g)), f = p = y.length; y[--p] == 0; y.pop());
|
|
35544
35556
|
if (!y[0]) return u.charAt(0);
|
|
35545
|
-
if (x < 0 ? --f : (_.c = y, _.e = f, _.s = c, _ = t(_, b, S, C, a), y = _.c, h = _.r, f = _.e), d = f + S + 1, x = y[d], p = a / 2, h = h || d < 0 || y[d + 1] != null, h = C < 4 ? (x != null || h) && (C == 0 || C == (_.s < 0 ? 3 : 2)) : x > p || x == p && (C == 4 || h || C == 6 && y[d - 1] & 1 || C == (_.s < 0 ? 8 : 7)), d < 1 || !y[0]) r = h ?
|
|
35557
|
+
if (x < 0 ? --f : (_.c = y, _.e = f, _.s = c, _ = t(_, b, S, C, a), y = _.c, h = _.r, f = _.e), d = f + S + 1, x = y[d], p = a / 2, h = h || d < 0 || y[d + 1] != null, h = C < 4 ? (x != null || h) && (C == 0 || C == (_.s < 0 ? 3 : 2)) : x > p || x == p && (C == 4 || h || C == 6 && y[d - 1] & 1 || C == (_.s < 0 ? 8 : 7)), d < 1 || !y[0]) r = h ? xa(u.charAt(1), -S, u.charAt(0)) : u.charAt(0);
|
|
35546
35558
|
else {
|
|
35547
35559
|
if (y.length = d, h) for (--a; ++y[--d] > a;) y[d] = 0, d || (++f, y = [1].concat(y));
|
|
35548
35560
|
for (p = y.length; !y[--p];);
|
|
35549
35561
|
for (x = 0, r = ""; x <= p; r += u.charAt(y[x++]));
|
|
35550
|
-
r =
|
|
35562
|
+
r = xa(r, f, u.charAt(0));
|
|
35551
35563
|
}
|
|
35552
35564
|
return r;
|
|
35553
35565
|
};
|
|
35554
35566
|
})(), t = (function() {
|
|
35555
35567
|
function e(e, t, n) {
|
|
35556
|
-
var r, i, a, o, s = 0, c = e.length, l = t %
|
|
35557
|
-
for (e = e.slice(); c--;) a = e[c] %
|
|
35568
|
+
var r, i, a, o, s = 0, c = e.length, l = t % Z, u = t / Z | 0;
|
|
35569
|
+
for (e = e.slice(); c--;) a = e[c] % Z, o = e[c] / Z | 0, r = u * a + o * l, i = l * a + r % Z * Z + s, s = (i / n | 0) + (r / Z | 0) + u * o, e[c] = i % n;
|
|
35558
35570
|
return s && (e = [s].concat(e)), e;
|
|
35559
35571
|
}
|
|
35560
35572
|
function t(e, t, n, r) {
|
|
@@ -35573,14 +35585,14 @@ function Z(e) {
|
|
|
35573
35585
|
return function(r, i, a, o, s) {
|
|
35574
35586
|
var c, l, u, d, f, p, m, h, g, _, y, b, x, C, w, T, E, D = r.s == i.s ? 1 : -1, O = r.c, k = i.c;
|
|
35575
35587
|
if (!O || !O[0] || !k || !k[0]) return new v(!r.s || !i.s || (O ? k && O[0] == k[0] : !k) ? NaN : O && O[0] == 0 || !k ? D * 0 : D / 0);
|
|
35576
|
-
for (h = new v(D), g = h.c = [], l = r.e - i.e, D = a + l + 1, s || (s =
|
|
35588
|
+
for (h = new v(D), g = h.c = [], l = r.e - i.e, D = a + l + 1, s || (s = ua, l = ha(r.e / X) - ha(i.e / X), D = D / X | 0), u = 0; k[u] == (O[u] || 0); u++);
|
|
35577
35589
|
if (k[u] > (O[u] || 0) && l--, D < 0) g.push(1), d = !0;
|
|
35578
35590
|
else {
|
|
35579
|
-
for (C = O.length, T = k.length, u = 0, D += 2, f =
|
|
35591
|
+
for (C = O.length, T = k.length, u = 0, D += 2, f = Y(s / (k[0] + 1)), f > 1 && (k = e(k, f, s), O = e(O, f, s), T = k.length, C = O.length), x = T, _ = O.slice(0, T), y = _.length; y < T; _[y++] = 0);
|
|
35580
35592
|
E = k.slice(), E = [0].concat(E), w = k[0], k[1] >= s / 2 && w++;
|
|
35581
35593
|
do {
|
|
35582
35594
|
if (f = 0, c = t(k, _, T, y), c < 0) {
|
|
35583
|
-
if (b = _[0], T != y && (b = b * s + (_[1] || 0)), f =
|
|
35595
|
+
if (b = _[0], T != y && (b = b * s + (_[1] || 0)), f = Y(b / w), f > 1) for (f >= s && (f = s - 1), p = e(k, f, s), m = p.length, y = _.length; t(p, _, m, y) == 1;) f--, n(p, T < m ? E : k, m, s), m = p.length, c = 1;
|
|
35584
35596
|
else f == 0 && (c = f = 1), p = k.slice(), m = p.length;
|
|
35585
35597
|
if (m < y && (p = [0].concat(p)), n(_, p, y, s), y = _.length, c == -1) for (; t(k, _, T, y) < 1;) f++, n(_, T < y ? E : k, y, s), y = _.length;
|
|
35586
35598
|
} else c === 0 && (f++, _ = [0]);
|
|
@@ -35588,7 +35600,7 @@ function Z(e) {
|
|
|
35588
35600
|
} while ((x++ < C || _[0] != null) && D--);
|
|
35589
35601
|
d = _[0] != null, g[0] || g.splice(0, 1);
|
|
35590
35602
|
}
|
|
35591
|
-
if (s ==
|
|
35603
|
+
if (s == ua) {
|
|
35592
35604
|
for (u = 1, D = g[0]; D >= 10; D /= 10, u++);
|
|
35593
35605
|
S(h, a + (h.e = u + l * X - 1) + 1, o, d);
|
|
35594
35606
|
} else h.e = l, h.r = +d;
|
|
@@ -35597,18 +35609,18 @@ function Z(e) {
|
|
|
35597
35609
|
})();
|
|
35598
35610
|
function y(e, t, n, r) {
|
|
35599
35611
|
var i, a, o, u, d;
|
|
35600
|
-
if (n == null ? n = s :
|
|
35601
|
-
if (i = e.c[0], o = e.e, t == null) d =
|
|
35602
|
-
else if (e = S(new v(e), t, n), a = e.e, d =
|
|
35612
|
+
if (n == null ? n = s : va(n, 0, 8), !e.c) return e.toString();
|
|
35613
|
+
if (i = e.c[0], o = e.e, t == null) d = ga(e.c), d = r == 1 || r == 2 && (o <= c || o >= l) ? ba(d, o) : xa(d, o, "0");
|
|
35614
|
+
else if (e = S(new v(e), t, n), a = e.e, d = ga(e.c), u = d.length, r == 1 || r == 2 && (t <= a || a <= c)) {
|
|
35603
35615
|
for (; u < t; d += "0", u++);
|
|
35604
|
-
d =
|
|
35605
|
-
} else if (t -= o + (r === 2 && a > o), d =
|
|
35616
|
+
d = ba(d, a);
|
|
35617
|
+
} else if (t -= o + (r === 2 && a > o), d = xa(d, a, "0"), a + 1 > u) {
|
|
35606
35618
|
if (--t > 0) for (d += "."; t--; d += "0");
|
|
35607
35619
|
} else if (t += a - u, t > 0) for (a + 1 == u && (d += "."); t--; d += "0");
|
|
35608
35620
|
return e.s < 0 && i ? "-" + d : d;
|
|
35609
35621
|
}
|
|
35610
35622
|
function b(e, t) {
|
|
35611
|
-
for (var n, r, i = 1, a = new v(e[0]); i < e.length; i++) r = new v(e[i]), (!r.s || (n =
|
|
35623
|
+
for (var n, r, i = 1, a = new v(e[0]); i < e.length; i++) r = new v(e[i]), (!r.s || (n = _a(a, r)) === t || n === 0 && a.s === t) && (a = r);
|
|
35612
35624
|
return a;
|
|
35613
35625
|
}
|
|
35614
35626
|
function x(e, t, n) {
|
|
@@ -35625,34 +35637,34 @@ function Z(e) {
|
|
|
35625
35637
|
if (!s && (u = u.replace(e, function(e, t, n) {
|
|
35626
35638
|
return l = (n = n.toLowerCase()) == "x" ? 16 : n == "b" ? 2 : 8, !c || c == l ? t : e;
|
|
35627
35639
|
}), c && (l = c, u = u.replace(t, "$1").replace(n, "0.$1")), o != u)) return new v(u, l);
|
|
35628
|
-
if (v.DEBUG) throw Error(
|
|
35640
|
+
if (v.DEBUG) throw Error(ca + "Not a" + (c ? " base " + c : "") + " number: " + o);
|
|
35629
35641
|
a.s = null;
|
|
35630
35642
|
}
|
|
35631
35643
|
a.c = a.e = null;
|
|
35632
35644
|
};
|
|
35633
35645
|
})();
|
|
35634
35646
|
function S(e, t, n, r) {
|
|
35635
|
-
var i, a, o, s, c, l, f, p = e.c, m =
|
|
35647
|
+
var i, a, o, s, c, l, f, p = e.c, m = fa;
|
|
35636
35648
|
if (p) {
|
|
35637
35649
|
out: {
|
|
35638
35650
|
for (i = 1, s = p[0]; s >= 10; s /= 10, i++);
|
|
35639
|
-
if (a = t - i, a < 0) a += X, o = t, c = p[l = 0], f =
|
|
35640
|
-
else if (l =
|
|
35651
|
+
if (a = t - i, a < 0) a += X, o = t, c = p[l = 0], f = Y(c / m[i - o - 1] % 10);
|
|
35652
|
+
else if (l = sa((a + 1) / X), l >= p.length) if (r) {
|
|
35641
35653
|
for (; p.length <= l; p.push(0));
|
|
35642
35654
|
c = f = 0, i = 1, a %= X, o = a - X + 1;
|
|
35643
35655
|
} else break out;
|
|
35644
35656
|
else {
|
|
35645
35657
|
for (c = s = p[l], i = 1; s >= 10; s /= 10, i++);
|
|
35646
|
-
a %= X, o = a - X + i, f = o < 0 ? 0 :
|
|
35658
|
+
a %= X, o = a - X + i, f = o < 0 ? 0 : Y(c / m[i - o - 1] % 10);
|
|
35647
35659
|
}
|
|
35648
35660
|
if (r = r || t < 0 || p[l + 1] != null || (o < 0 ? c : c % m[i - o - 1]), r = n < 4 ? (f || r) && (n == 0 || n == (e.s < 0 ? 3 : 2)) : f > 5 || f == 5 && (n == 4 || r || n == 6 && (a > 0 ? o > 0 ? c / m[i - o] : 0 : p[l - 1]) % 10 & 1 || n == (e.s < 0 ? 8 : 7)), t < 1 || !p[0]) return p.length = 0, r ? (t -= e.e + 1, p[0] = m[(X - t % X) % X], e.e = -t || 0) : p[0] = e.e = 0, e;
|
|
35649
|
-
if (a == 0 ? (p.length = l, s = 1, l--) : (p.length = l + 1, s = m[X - a], p[l] = o > 0 ?
|
|
35661
|
+
if (a == 0 ? (p.length = l, s = 1, l--) : (p.length = l + 1, s = m[X - a], p[l] = o > 0 ? Y(c / m[i - o] % m[o]) * s : 0), r) for (;;) if (l == 0) {
|
|
35650
35662
|
for (a = 1, o = p[0]; o >= 10; o /= 10, a++);
|
|
35651
35663
|
for (o = p[0] += s, s = 1; o >= 10; o /= 10, s++);
|
|
35652
|
-
a != s && (e.e++, p[0] ==
|
|
35664
|
+
a != s && (e.e++, p[0] == ua && (p[0] = 1));
|
|
35653
35665
|
break;
|
|
35654
35666
|
} else {
|
|
35655
|
-
if (p[l] += s, p[l] !=
|
|
35667
|
+
if (p[l] += s, p[l] != ua) break;
|
|
35656
35668
|
p[l--] = 0, s = 1;
|
|
35657
35669
|
}
|
|
35658
35670
|
for (a = p.length; p[--a] === 0; p.pop());
|
|
@@ -35663,18 +35675,18 @@ function Z(e) {
|
|
|
35663
35675
|
}
|
|
35664
35676
|
function C(e) {
|
|
35665
35677
|
var t, n = e.e;
|
|
35666
|
-
return n === null ? e.toString() : (t =
|
|
35678
|
+
return n === null ? e.toString() : (t = ga(e.c), t = n <= c || n >= l ? ba(t, n) : xa(t, n, "0"), e.s < 0 ? "-" + t : t);
|
|
35667
35679
|
}
|
|
35668
35680
|
return i.absoluteValue = i.abs = function() {
|
|
35669
35681
|
var e = new v(this);
|
|
35670
35682
|
return e.s < 0 && (e.s = 1), e;
|
|
35671
35683
|
}, i.comparedTo = function(e, t) {
|
|
35672
|
-
return
|
|
35684
|
+
return _a(this, new v(e, t));
|
|
35673
35685
|
}, i.decimalPlaces = i.dp = function(e, t) {
|
|
35674
35686
|
var n, r, i, a = this;
|
|
35675
|
-
if (e != null) return
|
|
35687
|
+
if (e != null) return va(e, 0, pa), t == null ? t = s : va(t, 0, 8), S(new v(a), e + a.e + 1, t);
|
|
35676
35688
|
if (!(n = a.c)) return null;
|
|
35677
|
-
if (r = ((i = n.length - 1) -
|
|
35689
|
+
if (r = ((i = n.length - 1) - ha(this.e / X)) * X, i = n[i]) for (; i % 10 == 0; i /= 10, r--);
|
|
35678
35690
|
return r < 0 && (r = 0), r;
|
|
35679
35691
|
}, i.dividedBy = i.div = function(e, n) {
|
|
35680
35692
|
return t(this, new v(e, n), o, s);
|
|
@@ -35682,22 +35694,22 @@ function Z(e) {
|
|
|
35682
35694
|
return t(this, new v(e, n), 0, 1);
|
|
35683
35695
|
}, i.exponentiatedBy = i.pow = function(e, t) {
|
|
35684
35696
|
var n, r, i, o, c, l, u, d, f, p = this;
|
|
35685
|
-
if (e = new v(e), e.c && !e.isInteger()) throw Error(
|
|
35686
|
-
if (t != null && (t = new v(t)), l = e.e > 14, !p.c || !p.c[0] || p.c[0] == 1 && !p.e && p.c.length == 1 || !e.c || !e.c[0]) return f = new v(C(p) ** (l ? e.s * (2 -
|
|
35697
|
+
if (e = new v(e), e.c && !e.isInteger()) throw Error(ca + "Exponent not an integer: " + C(e));
|
|
35698
|
+
if (t != null && (t = new v(t)), l = e.e > 14, !p.c || !p.c[0] || p.c[0] == 1 && !p.e && p.c.length == 1 || !e.c || !e.c[0]) return f = new v(C(p) ** (l ? e.s * (2 - ya(e)) : +C(e))), t ? f.mod(t) : f;
|
|
35687
35699
|
if (u = e.s < 0, t) {
|
|
35688
35700
|
if (t.c ? !t.c[0] : !t.s) return new v(NaN);
|
|
35689
35701
|
r = !u && p.isInteger() && t.isInteger(), r && (p = p.mod(t));
|
|
35690
|
-
} else if (e.e > 9 && (p.e > 0 || p.e < -1 || (p.e == 0 ? p.c[0] > 1 || l && p.c[1] >= 24e7 : p.c[0] < 8e13 || l && p.c[0] <= 9999975e7))) return o = p.s < 0 &&
|
|
35691
|
-
else m && (o =
|
|
35692
|
-
for (l ? (n = new v(.5), u && (e.s = 1), d =
|
|
35702
|
+
} else if (e.e > 9 && (p.e > 0 || p.e < -1 || (p.e == 0 ? p.c[0] > 1 || l && p.c[1] >= 24e7 : p.c[0] < 8e13 || l && p.c[0] <= 9999975e7))) return o = p.s < 0 && ya(e) ? -0 : 0, p.e > -1 && (o = 1 / o), new v(u ? 1 / o : o);
|
|
35703
|
+
else m && (o = sa(m / X + 2));
|
|
35704
|
+
for (l ? (n = new v(.5), u && (e.s = 1), d = ya(e)) : (i = Math.abs(+C(e)), d = i % 2), f = new v(a);;) {
|
|
35693
35705
|
if (d) {
|
|
35694
35706
|
if (f = f.times(p), !f.c) break;
|
|
35695
35707
|
o ? f.c.length > o && (f.c.length = o) : r && (f = f.mod(t));
|
|
35696
35708
|
}
|
|
35697
35709
|
if (i) {
|
|
35698
|
-
if (i =
|
|
35710
|
+
if (i = Y(i / 2), i === 0) break;
|
|
35699
35711
|
d = i % 2;
|
|
35700
|
-
} else if (e = e.times(n), S(e, e.e + 1, 1), e.e > 14) d =
|
|
35712
|
+
} else if (e = e.times(n), S(e, e.e + 1, 1), e.e > 14) d = ya(e);
|
|
35701
35713
|
else {
|
|
35702
35714
|
if (i = +C(e), i === 0) break;
|
|
35703
35715
|
d = i % 2;
|
|
@@ -35707,21 +35719,21 @@ function Z(e) {
|
|
|
35707
35719
|
return r ? f : (u && (f = a.div(f)), t ? f.mod(t) : o ? S(f, m, s, c) : f);
|
|
35708
35720
|
}, i.integerValue = function(e) {
|
|
35709
35721
|
var t = new v(this);
|
|
35710
|
-
return e == null ? e = s :
|
|
35722
|
+
return e == null ? e = s : va(e, 0, 8), S(t, t.e + 1, e);
|
|
35711
35723
|
}, i.isEqualTo = i.eq = function(e, t) {
|
|
35712
|
-
return
|
|
35724
|
+
return _a(this, new v(e, t)) === 0;
|
|
35713
35725
|
}, i.isFinite = function() {
|
|
35714
35726
|
return !!this.c;
|
|
35715
35727
|
}, i.isGreaterThan = i.gt = function(e, t) {
|
|
35716
|
-
return
|
|
35728
|
+
return _a(this, new v(e, t)) > 0;
|
|
35717
35729
|
}, i.isGreaterThanOrEqualTo = i.gte = function(e, t) {
|
|
35718
|
-
return (t =
|
|
35730
|
+
return (t = _a(this, new v(e, t))) === 1 || t === 0;
|
|
35719
35731
|
}, i.isInteger = function() {
|
|
35720
|
-
return !!this.c &&
|
|
35732
|
+
return !!this.c && ha(this.e / X) > this.c.length - 2;
|
|
35721
35733
|
}, i.isLessThan = i.lt = function(e, t) {
|
|
35722
|
-
return
|
|
35734
|
+
return _a(this, new v(e, t)) < 0;
|
|
35723
35735
|
}, i.isLessThanOrEqualTo = i.lte = function(e, t) {
|
|
35724
|
-
return (t =
|
|
35736
|
+
return (t = _a(this, new v(e, t))) === -1 || t === 0;
|
|
35725
35737
|
}, i.isNaN = function() {
|
|
35726
35738
|
return !this.s;
|
|
35727
35739
|
}, i.isNegative = function() {
|
|
@@ -35739,7 +35751,7 @@ function Z(e) {
|
|
|
35739
35751
|
if (!d || !f) return d ? (e.s = -t, e) : new v(f ? o : NaN);
|
|
35740
35752
|
if (!d[0] || !f[0]) return f[0] ? (e.s = -t, e) : new v(d[0] ? o : s == 3 ? -0 : 0);
|
|
35741
35753
|
}
|
|
35742
|
-
if (l =
|
|
35754
|
+
if (l = ha(l), u = ha(u), d = d.slice(), c = l - u) {
|
|
35743
35755
|
for ((a = c < 0) ? (c = -c, i = d) : (u = l, i = f), i.reverse(), t = c; t--; i.push(0));
|
|
35744
35756
|
i.reverse();
|
|
35745
35757
|
} else for (r = (a = (c = d.length) < (t = f.length)) ? c : t, c = t = 0; t < r; t++) if (d[t] != f[t]) {
|
|
@@ -35747,10 +35759,10 @@ function Z(e) {
|
|
|
35747
35759
|
break;
|
|
35748
35760
|
}
|
|
35749
35761
|
if (a && (i = d, d = f, f = i, e.s = -e.s), t = (r = f.length) - (n = d.length), t > 0) for (; t--; d[n++] = 0);
|
|
35750
|
-
for (t =
|
|
35762
|
+
for (t = ua - 1; r > c;) {
|
|
35751
35763
|
if (d[--r] < f[r]) {
|
|
35752
35764
|
for (n = r; n && !d[--n]; d[n] = t);
|
|
35753
|
-
--d[n], d[r] +=
|
|
35765
|
+
--d[n], d[r] += ua;
|
|
35754
35766
|
}
|
|
35755
35767
|
d[r] -= f[r];
|
|
35756
35768
|
}
|
|
@@ -35762,8 +35774,8 @@ function Z(e) {
|
|
|
35762
35774
|
}, i.multipliedBy = i.times = function(e, t) {
|
|
35763
35775
|
var n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _ = this, y = _.c, b = (e = new v(e, t)).c;
|
|
35764
35776
|
if (!y || !b || !y[0] || !b[0]) return !_.s || !e.s || y && !y[0] && !b || b && !b[0] && !y ? e.c = e.e = e.s = null : (e.s *= _.s, !y || !b ? e.c = e.e = null : (e.c = [0], e.e = 0)), e;
|
|
35765
|
-
for (r =
|
|
35766
|
-
for (h =
|
|
35777
|
+
for (r = ha(_.e / X) + ha(e.e / X), e.s *= _.s, c = y.length, d = b.length, c < d && (m = y, y = b, b = m, i = c, c = d, d = i), i = c + d, m = []; i--; m.push(0));
|
|
35778
|
+
for (h = ua, g = Z, i = d; --i >= 0;) {
|
|
35767
35779
|
for (n = 0, f = b[i] % g, p = b[i] / g | 0, o = c, a = i + o; a > i;) l = y[--o] % g, u = y[o] / g | 0, s = p * l + u * f, l = f * l + s % g * g + m[a] + n, n = (l / h | 0) + (s / g | 0) + p * u, m[a--] = l % h;
|
|
35768
35780
|
m[a] = n;
|
|
35769
35781
|
}
|
|
@@ -35780,15 +35792,15 @@ function Z(e) {
|
|
|
35780
35792
|
if (!s || !c) return new v(i / 0);
|
|
35781
35793
|
if (!s[0] || !c[0]) return c[0] ? e : new v(s[0] ? r : i * 0);
|
|
35782
35794
|
}
|
|
35783
|
-
if (a =
|
|
35795
|
+
if (a = ha(a), o = ha(o), s = s.slice(), i = a - o) {
|
|
35784
35796
|
for (i > 0 ? (o = a, n = c) : (i = -i, n = s), n.reverse(); i--; n.push(0));
|
|
35785
35797
|
n.reverse();
|
|
35786
35798
|
}
|
|
35787
|
-
for (i = s.length, t = c.length, i - t < 0 && (n = c, c = s, s = n, t = i), i = 0; t;) i = (s[--t] = s[t] + c[t] + i) /
|
|
35799
|
+
for (i = s.length, t = c.length, i - t < 0 && (n = c, c = s, s = n, t = i), i = 0; t;) i = (s[--t] = s[t] + c[t] + i) / ua | 0, s[t] = ua === s[t] ? 0 : s[t] % ua;
|
|
35788
35800
|
return i && (s = [i].concat(s), ++o), x(e, s, o);
|
|
35789
35801
|
}, i.precision = i.sd = function(e, t) {
|
|
35790
35802
|
var n, r, i, a = this;
|
|
35791
|
-
if (e != null && e !== !!e) return
|
|
35803
|
+
if (e != null && e !== !!e) return va(e, 1, pa), t == null ? t = s : va(t, 0, 8), S(new v(a), e, t);
|
|
35792
35804
|
if (!(n = a.c)) return null;
|
|
35793
35805
|
if (i = n.length - 1, r = i * X + 1, i = n[i]) {
|
|
35794
35806
|
for (; i % 10 == 0; i /= 10, r--);
|
|
@@ -35796,12 +35808,12 @@ function Z(e) {
|
|
|
35796
35808
|
}
|
|
35797
35809
|
return e && a.e + 1 > r && (r = a.e + 1), r;
|
|
35798
35810
|
}, i.shiftedBy = function(e) {
|
|
35799
|
-
return
|
|
35811
|
+
return va(e, -da, da), this.times("1e" + e);
|
|
35800
35812
|
}, i.squareRoot = i.sqrt = function() {
|
|
35801
35813
|
var e, n, r, i, a, c = this, l = c.c, u = c.s, d = c.e, f = o + 4, p = new v("0.5");
|
|
35802
35814
|
if (u !== 1 || !l || !l[0]) return new v(!u || u < 0 && (!l || l[0]) ? NaN : l ? c : Infinity);
|
|
35803
|
-
if (u = Math.sqrt(+C(c)), u == 0 || u == Infinity ? (n =
|
|
35804
|
-
for (d = r.e, u = d + f, u < 3 && (u = 0);;) if (a = r, r = p.times(a.plus(t(c, a, f, 1))),
|
|
35815
|
+
if (u = Math.sqrt(+C(c)), u == 0 || u == Infinity ? (n = ga(l), (n.length + d) % 2 == 0 && (n += "0"), u = Math.sqrt(+n), d = ha((d + 1) / 2) - (d < 0 || d % 2), u == Infinity ? n = "5e" + d : (n = u.toExponential(), n = n.slice(0, n.indexOf("e") + 1) + d), r = new v(n)) : r = new v(u + ""), r.c[0]) {
|
|
35816
|
+
for (d = r.e, u = d + f, u < 3 && (u = 0);;) if (a = r, r = p.times(a.plus(t(c, a, f, 1))), ga(a.c).slice(0, u) === (n = ga(r.c)).slice(0, u)) if (r.e < d && --u, n = n.slice(u - 3, u + 1), n == "9999" || !i && n == "4999") {
|
|
35805
35817
|
if (!i && (S(a, a.e + o + 2, 0), a.times(a).eq(c))) {
|
|
35806
35818
|
r = a;
|
|
35807
35819
|
break;
|
|
@@ -35814,13 +35826,13 @@ function Z(e) {
|
|
|
35814
35826
|
}
|
|
35815
35827
|
return S(r, r.e + o + 1, s, e);
|
|
35816
35828
|
}, i.toExponential = function(e, t) {
|
|
35817
|
-
return e != null && (
|
|
35829
|
+
return e != null && (va(e, 0, pa), e++), y(this, e, t, 1);
|
|
35818
35830
|
}, i.toFixed = function(e, t) {
|
|
35819
|
-
return e != null && (
|
|
35831
|
+
return e != null && (va(e, 0, pa), e = e + this.e + 1), y(this, e, t);
|
|
35820
35832
|
}, i.toFormat = function(e, t, n) {
|
|
35821
35833
|
var r, i = this;
|
|
35822
35834
|
if (n == null) e != null && t && typeof t == "object" ? (n = t, t = null) : e && typeof e == "object" ? (n = e, e = t = null) : n = h;
|
|
35823
|
-
else if (typeof n != "object") throw Error(
|
|
35835
|
+
else if (typeof n != "object") throw Error(ca + "Argument not an object: " + n);
|
|
35824
35836
|
if (r = i.toFixed(e, t), i.c) {
|
|
35825
35837
|
var a, o = r.split("."), s = +n.groupSize, c = +n.secondaryGroupSize, l = n.groupSeparator || "", u = o[0], d = o[1], f = i.s < 0, p = f ? u.slice(1) : u, m = p.length;
|
|
35826
35838
|
if (c && (a = s, s = c, c = a, m -= a), s > 0 && m > 0) {
|
|
@@ -35832,26 +35844,26 @@ function Z(e) {
|
|
|
35832
35844
|
return (n.prefix || "") + r + (n.suffix || "");
|
|
35833
35845
|
}, i.toFraction = function(e) {
|
|
35834
35846
|
var n, r, i, o, c, l, u, f, p, m, h, g, _ = this, y = _.c;
|
|
35835
|
-
if (e != null && (u = new v(e), !u.isInteger() && (u.c || u.s !== 1) || u.lt(a))) throw Error(
|
|
35847
|
+
if (e != null && (u = new v(e), !u.isInteger() && (u.c || u.s !== 1) || u.lt(a))) throw Error(ca + "Argument " + (u.isInteger() ? "out of range: " : "not an integer: ") + C(u));
|
|
35836
35848
|
if (!y) return new v(_);
|
|
35837
|
-
for (n = new v(a), p = r = new v(a), i = f = new v(a), g =
|
|
35849
|
+
for (n = new v(a), p = r = new v(a), i = f = new v(a), g = ga(y), c = n.e = g.length - _.e - 1, n.c[0] = fa[(l = c % X) < 0 ? X + l : l], e = !e || u.comparedTo(n) > 0 ? c > 0 ? n : p : u, l = d, d = Infinity, u = new v(g), f.c[0] = 0; m = t(u, n, 0, 1), o = r.plus(m.times(i)), o.comparedTo(e) != 1;) r = i, i = o, p = f.plus(m.times(o = p)), f = o, n = u.minus(m.times(o = n)), u = o;
|
|
35838
35850
|
return o = t(e.minus(r), i, 0, 1), f = f.plus(o.times(p)), r = r.plus(o.times(i)), f.s = p.s = _.s, c *= 2, h = t(p, i, c, s).minus(_).abs().comparedTo(t(f, r, c, s).minus(_).abs()) < 1 ? [p, i] : [f, r], d = l, h;
|
|
35839
35851
|
}, i.toNumber = function() {
|
|
35840
35852
|
return +C(this);
|
|
35841
35853
|
}, i.toPrecision = function(e, t) {
|
|
35842
|
-
return e != null &&
|
|
35854
|
+
return e != null && va(e, 1, pa), y(this, e, t, 2);
|
|
35843
35855
|
}, i.toString = function(e) {
|
|
35844
35856
|
var t, r = this, i = r.s, a = r.e;
|
|
35845
|
-
return a === null ? i ? (t = "Infinity", i < 0 && (t = "-" + t)) : t = "NaN" : (e == null ? t = a <= c || a >= l ?
|
|
35857
|
+
return a === null ? i ? (t = "Infinity", i < 0 && (t = "-" + t)) : t = "NaN" : (e == null ? t = a <= c || a >= l ? ba(ga(r.c), a) : xa(ga(r.c), a, "0") : e === 10 && _ ? (r = S(new v(r), o + a + 1, s), t = xa(ga(r.c), r.e, "0")) : (va(e, 2, g.length, "Base"), t = n(xa(ga(r.c), a, "0"), 10, e, i, !0)), i < 0 && r.c[0] && (t = "-" + t)), t;
|
|
35846
35858
|
}, i.valueOf = i.toJSON = function() {
|
|
35847
35859
|
return C(this);
|
|
35848
35860
|
}, i._isBigNumber = !0, i[Symbol.toStringTag] = "BigNumber", i[Symbol.for("nodejs.util.inspect.custom")] = i.valueOf, e != null && v.set(e), v;
|
|
35849
35861
|
}
|
|
35850
|
-
function
|
|
35862
|
+
function ha(e) {
|
|
35851
35863
|
var t = e | 0;
|
|
35852
35864
|
return e > 0 || e === t ? t : t - 1;
|
|
35853
35865
|
}
|
|
35854
|
-
function
|
|
35866
|
+
function ga(e) {
|
|
35855
35867
|
for (var t, n, r = 1, i = e.length, a = e[0] + ""; r < i;) {
|
|
35856
35868
|
for (t = e[r++] + "", n = X - t.length; n--; t = "0" + t);
|
|
35857
35869
|
a += t;
|
|
@@ -35859,7 +35871,7 @@ function ma(e) {
|
|
|
35859
35871
|
for (i = a.length; a.charCodeAt(--i) === 48;);
|
|
35860
35872
|
return a.slice(0, i + 1 || 1);
|
|
35861
35873
|
}
|
|
35862
|
-
function
|
|
35874
|
+
function _a(e, t) {
|
|
35863
35875
|
var n, r, i = e.c, a = t.c, o = e.s, s = t.s, c = e.e, l = t.e;
|
|
35864
35876
|
if (!o || !s) return null;
|
|
35865
35877
|
if (n = i && !i[0], r = a && !a[0], n || r) return n ? r ? 0 : -s : o;
|
|
@@ -35869,17 +35881,17 @@ function ha(e, t) {
|
|
|
35869
35881
|
for (s = (c = i.length) < (l = a.length) ? c : l, o = 0; o < s; o++) if (i[o] != a[o]) return i[o] > a[o] ^ n ? 1 : -1;
|
|
35870
35882
|
return c == l ? 0 : c > l ^ n ? 1 : -1;
|
|
35871
35883
|
}
|
|
35872
|
-
function
|
|
35873
|
-
if (e < t || e > n || e !==
|
|
35884
|
+
function va(e, t, n, r) {
|
|
35885
|
+
if (e < t || e > n || e !== Y(e)) throw Error(ca + (r || "Argument") + (typeof e == "number" ? e < t || e > n ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
|
|
35874
35886
|
}
|
|
35875
|
-
function
|
|
35887
|
+
function ya(e) {
|
|
35876
35888
|
var t = e.c.length - 1;
|
|
35877
|
-
return
|
|
35889
|
+
return ha(e.e / X) == t && e.c[t] % 2 != 0;
|
|
35878
35890
|
}
|
|
35879
|
-
function
|
|
35891
|
+
function ba(e, t) {
|
|
35880
35892
|
return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (t < 0 ? "e" : "e+") + t;
|
|
35881
35893
|
}
|
|
35882
|
-
function
|
|
35894
|
+
function xa(e, t, n) {
|
|
35883
35895
|
var r, i;
|
|
35884
35896
|
if (t < 0) {
|
|
35885
35897
|
for (i = n + "."; ++t; i += n);
|
|
@@ -35890,18 +35902,18 @@ function ya(e, t, n) {
|
|
|
35890
35902
|
} else t < r && (e = e.slice(0, t) + "." + e.slice(t));
|
|
35891
35903
|
return e;
|
|
35892
35904
|
}
|
|
35893
|
-
var
|
|
35905
|
+
var Sa = ma(), Ca = class {
|
|
35894
35906
|
key;
|
|
35895
35907
|
left = null;
|
|
35896
35908
|
right = null;
|
|
35897
35909
|
constructor(e) {
|
|
35898
35910
|
this.key = e;
|
|
35899
35911
|
}
|
|
35900
|
-
},
|
|
35912
|
+
}, wa = class extends Ca {
|
|
35901
35913
|
constructor(e) {
|
|
35902
35914
|
super(e);
|
|
35903
35915
|
}
|
|
35904
|
-
},
|
|
35916
|
+
}, Ta = class {
|
|
35905
35917
|
size = 0;
|
|
35906
35918
|
modificationCount = 0;
|
|
35907
35919
|
splayCount = 0;
|
|
@@ -35988,7 +36000,7 @@ var ba = Z(), xa = class {
|
|
|
35988
36000
|
has: (e) => this.has(e)
|
|
35989
36001
|
};
|
|
35990
36002
|
}
|
|
35991
|
-
},
|
|
36003
|
+
}, Ea = class e extends Ta {
|
|
35992
36004
|
root = null;
|
|
35993
36005
|
compare;
|
|
35994
36006
|
validKey;
|
|
@@ -36007,11 +36019,11 @@ var ba = Z(), xa = class {
|
|
|
36007
36019
|
}
|
|
36008
36020
|
add(e) {
|
|
36009
36021
|
let t = this.splay(e);
|
|
36010
|
-
return t != 0 && this.addNewRoot(new
|
|
36022
|
+
return t != 0 && this.addNewRoot(new wa(e), t), this;
|
|
36011
36023
|
}
|
|
36012
36024
|
addAndReturn(e) {
|
|
36013
36025
|
let t = this.splay(e);
|
|
36014
|
-
return t != 0 && this.addNewRoot(new
|
|
36026
|
+
return t != 0 && this.addNewRoot(new wa(e), t), this.root.key;
|
|
36015
36027
|
}
|
|
36016
36028
|
addAll(e) {
|
|
36017
36029
|
for (let t of e) this.add(t);
|
|
@@ -36090,23 +36102,23 @@ var ba = Z(), xa = class {
|
|
|
36090
36102
|
let r, i;
|
|
36091
36103
|
do {
|
|
36092
36104
|
if (r = e.left, i = e.right, r != null) {
|
|
36093
|
-
let e = new
|
|
36105
|
+
let e = new wa(r.key);
|
|
36094
36106
|
n.left = e, t(r, e);
|
|
36095
36107
|
}
|
|
36096
36108
|
if (i != null) {
|
|
36097
|
-
let t = new
|
|
36109
|
+
let t = new wa(i.key);
|
|
36098
36110
|
n.right = t, e = i, n = t;
|
|
36099
36111
|
}
|
|
36100
36112
|
} while (i != null);
|
|
36101
36113
|
}
|
|
36102
|
-
let n = new
|
|
36114
|
+
let n = new wa(e.key);
|
|
36103
36115
|
return t(e, n), n;
|
|
36104
36116
|
}
|
|
36105
36117
|
toSet() {
|
|
36106
36118
|
return this.clone();
|
|
36107
36119
|
}
|
|
36108
36120
|
entries() {
|
|
36109
|
-
return new
|
|
36121
|
+
return new ka(this.wrap());
|
|
36110
36122
|
}
|
|
36111
36123
|
keys() {
|
|
36112
36124
|
return this[Symbol.iterator]();
|
|
@@ -36115,10 +36127,10 @@ var ba = Z(), xa = class {
|
|
|
36115
36127
|
return this[Symbol.iterator]();
|
|
36116
36128
|
}
|
|
36117
36129
|
[Symbol.iterator]() {
|
|
36118
|
-
return new
|
|
36130
|
+
return new Oa(this.wrap());
|
|
36119
36131
|
}
|
|
36120
36132
|
[Symbol.toStringTag] = "[object Set]";
|
|
36121
|
-
},
|
|
36133
|
+
}, Da = class {
|
|
36122
36134
|
tree;
|
|
36123
36135
|
path = [];
|
|
36124
36136
|
modificationCount = null;
|
|
@@ -36169,46 +36181,46 @@ var ba = Z(), xa = class {
|
|
|
36169
36181
|
for (this.path.pop(); this.path.length && this.path[this.path.length - 1].right === e;) e = this.path.pop();
|
|
36170
36182
|
return this.path.length > 0;
|
|
36171
36183
|
}
|
|
36172
|
-
},
|
|
36184
|
+
}, Oa = class extends Da {
|
|
36173
36185
|
getValue(e) {
|
|
36174
36186
|
return e.key;
|
|
36175
36187
|
}
|
|
36176
|
-
},
|
|
36188
|
+
}, ka = class extends Da {
|
|
36177
36189
|
getValue(e) {
|
|
36178
36190
|
return [e.key, e.key];
|
|
36179
36191
|
}
|
|
36180
|
-
},
|
|
36181
|
-
let t = e ? (t, n) => n.minus(t).abs().isLessThanOrEqualTo(e) :
|
|
36192
|
+
}, Aa = (e) => () => e, ja = (e) => {
|
|
36193
|
+
let t = e ? (t, n) => n.minus(t).abs().isLessThanOrEqualTo(e) : Aa(!1);
|
|
36182
36194
|
return (e, n) => t(e, n) ? 0 : e.comparedTo(n);
|
|
36183
36195
|
};
|
|
36184
|
-
function
|
|
36185
|
-
let t = e ? (t, n, r, i, a) => t.exponentiatedBy(2).isLessThanOrEqualTo(i.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(e)) :
|
|
36196
|
+
function Ma(e) {
|
|
36197
|
+
let t = e ? (t, n, r, i, a) => t.exponentiatedBy(2).isLessThanOrEqualTo(i.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(e)) : Aa(!1);
|
|
36186
36198
|
return (e, n, r) => {
|
|
36187
36199
|
let i = e.x, a = e.y, o = r.x, s = r.y, c = a.minus(s).times(n.x.minus(o)).minus(i.minus(o).times(n.y.minus(s)));
|
|
36188
36200
|
return t(c, i, a, o, s) ? 0 : c.comparedTo(0);
|
|
36189
36201
|
};
|
|
36190
36202
|
}
|
|
36191
|
-
var
|
|
36203
|
+
var Na = (e) => e, Pa = (e) => {
|
|
36192
36204
|
if (e) {
|
|
36193
|
-
let t = new
|
|
36205
|
+
let t = new Ea(ja(e)), n = new Ea(ja(e)), r = (e, t) => t.addAndReturn(e), i = (e) => ({
|
|
36194
36206
|
x: r(e.x, t),
|
|
36195
36207
|
y: r(e.y, n)
|
|
36196
36208
|
});
|
|
36197
36209
|
return i({
|
|
36198
|
-
x: new
|
|
36199
|
-
y: new
|
|
36210
|
+
x: new Sa(0),
|
|
36211
|
+
y: new Sa(0)
|
|
36200
36212
|
}), i;
|
|
36201
36213
|
}
|
|
36202
|
-
return
|
|
36203
|
-
},
|
|
36214
|
+
return Na;
|
|
36215
|
+
}, Q = (e) => ({
|
|
36204
36216
|
set: (e) => {
|
|
36205
|
-
|
|
36217
|
+
$ = Q(e);
|
|
36206
36218
|
},
|
|
36207
|
-
reset: () =>
|
|
36208
|
-
compare:
|
|
36209
|
-
snap:
|
|
36210
|
-
orient:
|
|
36211
|
-
}),
|
|
36219
|
+
reset: () => Q(e),
|
|
36220
|
+
compare: ja(e),
|
|
36221
|
+
snap: Pa(e),
|
|
36222
|
+
orient: Ma(e)
|
|
36223
|
+
}), $ = Q(), Fa = (e, t) => e.ll.x.isLessThanOrEqualTo(t.x) && t.x.isLessThanOrEqualTo(e.ur.x) && e.ll.y.isLessThanOrEqualTo(t.y) && t.y.isLessThanOrEqualTo(e.ur.y), Ia = (e, t) => {
|
|
36212
36224
|
if (t.ur.x.isLessThan(e.ll.x) || e.ur.x.isLessThan(t.ll.x) || t.ur.y.isLessThan(e.ll.y) || e.ur.y.isLessThan(t.ll.y)) return null;
|
|
36213
36225
|
let n = e.ll.x.isLessThan(t.ll.x) ? t.ll.x : e.ll.x, r = e.ur.x.isLessThan(t.ur.x) ? e.ur.x : t.ur.x, i = e.ll.y.isLessThan(t.ll.y) ? t.ll.y : e.ll.y, a = e.ur.y.isLessThan(t.ur.y) ? e.ur.y : t.ur.y;
|
|
36214
36226
|
return {
|
|
@@ -36221,7 +36233,7 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36221
36233
|
y: a
|
|
36222
36234
|
}
|
|
36223
36235
|
};
|
|
36224
|
-
},
|
|
36236
|
+
}, La = (e, t) => e.x.times(t.y).minus(e.y.times(t.x)), Ra = (e, t) => e.x.times(t.x).plus(e.y.times(t.y)), za = (e) => Ra(e, e).sqrt(), Ba = (e, t, n) => {
|
|
36225
36237
|
let r = {
|
|
36226
36238
|
x: t.x.minus(e.x),
|
|
36227
36239
|
y: t.y.minus(e.y)
|
|
@@ -36229,8 +36241,8 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36229
36241
|
x: n.x.minus(e.x),
|
|
36230
36242
|
y: n.y.minus(e.y)
|
|
36231
36243
|
};
|
|
36232
|
-
return
|
|
36233
|
-
},
|
|
36244
|
+
return La(i, r).div(za(i)).div(za(r));
|
|
36245
|
+
}, Va = (e, t, n) => {
|
|
36234
36246
|
let r = {
|
|
36235
36247
|
x: t.x.minus(e.x),
|
|
36236
36248
|
y: t.y.minus(e.y)
|
|
@@ -36238,29 +36250,29 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36238
36250
|
x: n.x.minus(e.x),
|
|
36239
36251
|
y: n.y.minus(e.y)
|
|
36240
36252
|
};
|
|
36241
|
-
return
|
|
36242
|
-
},
|
|
36253
|
+
return Ra(i, r).div(za(i)).div(za(r));
|
|
36254
|
+
}, Ha = (e, t, n) => t.y.isZero() ? null : {
|
|
36243
36255
|
x: e.x.plus(t.x.div(t.y).times(n.minus(e.y))),
|
|
36244
36256
|
y: n
|
|
36245
|
-
},
|
|
36257
|
+
}, Ua = (e, t, n) => t.x.isZero() ? null : {
|
|
36246
36258
|
x: n,
|
|
36247
36259
|
y: e.y.plus(t.y.div(t.x).times(n.minus(e.x)))
|
|
36248
|
-
},
|
|
36249
|
-
if (t.x.isZero()) return
|
|
36250
|
-
if (r.x.isZero()) return
|
|
36251
|
-
if (t.y.isZero()) return
|
|
36252
|
-
if (r.y.isZero()) return
|
|
36253
|
-
let i =
|
|
36260
|
+
}, Wa = (e, t, n, r) => {
|
|
36261
|
+
if (t.x.isZero()) return Ua(n, r, e.x);
|
|
36262
|
+
if (r.x.isZero()) return Ua(e, t, n.x);
|
|
36263
|
+
if (t.y.isZero()) return Ha(n, r, e.y);
|
|
36264
|
+
if (r.y.isZero()) return Ha(e, t, n.y);
|
|
36265
|
+
let i = La(t, r);
|
|
36254
36266
|
if (i.isZero()) return null;
|
|
36255
36267
|
let a = {
|
|
36256
36268
|
x: n.x.minus(e.x),
|
|
36257
36269
|
y: n.y.minus(e.y)
|
|
36258
|
-
}, o =
|
|
36270
|
+
}, o = La(a, t).div(i), s = La(a, r).div(i), c = e.x.plus(s.times(t.x)), l = n.x.plus(o.times(r.x)), u = e.y.plus(s.times(t.y)), d = n.y.plus(o.times(r.y));
|
|
36259
36271
|
return {
|
|
36260
36272
|
x: c.plus(l).div(2),
|
|
36261
36273
|
y: u.plus(d).div(2)
|
|
36262
36274
|
};
|
|
36263
|
-
},
|
|
36275
|
+
}, Ga = class e {
|
|
36264
36276
|
point;
|
|
36265
36277
|
isLeft;
|
|
36266
36278
|
segment;
|
|
@@ -36268,7 +36280,7 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36268
36280
|
consumedBy;
|
|
36269
36281
|
static compare(t, n) {
|
|
36270
36282
|
let r = e.comparePoints(t.point, n.point);
|
|
36271
|
-
return r === 0 ? (t.point !== n.point && t.link(n), t.isLeft === n.isLeft ?
|
|
36283
|
+
return r === 0 ? (t.point !== n.point && t.link(n), t.isLeft === n.isLeft ? $a.compare(t.segment, n.segment) : t.isLeft ? 1 : -1) : r;
|
|
36272
36284
|
}
|
|
36273
36285
|
static comparePoints(e, t) {
|
|
36274
36286
|
return e.x.isLessThan(t.x) ? -1 : e.x.isGreaterThan(t.x) ? 1 : e.y.isLessThan(t.y) ? -1 : e.y.isGreaterThan(t.y) ? 1 : 0;
|
|
@@ -36307,8 +36319,8 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36307
36319
|
let t = /* @__PURE__ */ new Map(), n = (n) => {
|
|
36308
36320
|
let r = n.otherSE;
|
|
36309
36321
|
t.set(n, {
|
|
36310
|
-
sine:
|
|
36311
|
-
cosine:
|
|
36322
|
+
sine: Ba(this.point, e.point, r.point),
|
|
36323
|
+
cosine: Va(this.point, e.point, r.point)
|
|
36312
36324
|
});
|
|
36313
36325
|
};
|
|
36314
36326
|
return (e, r) => {
|
|
@@ -36317,7 +36329,7 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36317
36329
|
return i.isGreaterThanOrEqualTo(0) && o.isGreaterThanOrEqualTo(0) ? a.isLessThan(s) ? 1 : a.isGreaterThan(s) ? -1 : 0 : i.isLessThan(0) && o.isLessThan(0) ? a.isLessThan(s) ? -1 : a.isGreaterThan(s) ? 1 : 0 : o.isLessThan(i) ? -1 : o.isGreaterThan(i) ? 1 : 0;
|
|
36318
36330
|
};
|
|
36319
36331
|
}
|
|
36320
|
-
},
|
|
36332
|
+
}, Ka = class e {
|
|
36321
36333
|
events;
|
|
36322
36334
|
poly;
|
|
36323
36335
|
_isExteriorRing;
|
|
@@ -36369,11 +36381,11 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36369
36381
|
let e = this.events[0].point, t = [e];
|
|
36370
36382
|
for (let n = 1, r = this.events.length - 1; n < r; n++) {
|
|
36371
36383
|
let r = this.events[n].point, i = this.events[n + 1].point;
|
|
36372
|
-
|
|
36384
|
+
$.orient(r, e, i) !== 0 && (t.push(r), e = r);
|
|
36373
36385
|
}
|
|
36374
36386
|
if (t.length === 1) return null;
|
|
36375
36387
|
let n = t[0], r = t[1];
|
|
36376
|
-
|
|
36388
|
+
$.orient(n, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
36377
36389
|
let i = this.isExteriorRing() ? 1 : -1, a = this.isExteriorRing() ? 0 : t.length - 1, o = this.isExteriorRing() ? t.length : -1, s = [];
|
|
36378
36390
|
for (let e = a; e != o; e += i) s.push([t[e].x.toNumber(), t[e].y.toNumber()]);
|
|
36379
36391
|
return s;
|
|
@@ -36392,7 +36404,7 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36392
36404
|
let e = this.events[0];
|
|
36393
36405
|
for (let t = 1, n = this.events.length; t < n; t++) {
|
|
36394
36406
|
let n = this.events[t];
|
|
36395
|
-
|
|
36407
|
+
Ga.compare(e, n) > 0 && (e = n);
|
|
36396
36408
|
}
|
|
36397
36409
|
let t = e.segment.prevInResult(), n = t ? t.prevInResult() : null;
|
|
36398
36410
|
for (;;) {
|
|
@@ -36402,7 +36414,7 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36402
36414
|
t = n.prevInResult(), n = t ? t.prevInResult() : null;
|
|
36403
36415
|
}
|
|
36404
36416
|
}
|
|
36405
|
-
},
|
|
36417
|
+
}, qa = class {
|
|
36406
36418
|
exteriorRing;
|
|
36407
36419
|
interiorRings;
|
|
36408
36420
|
constructor(e) {
|
|
@@ -36421,7 +36433,7 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36421
36433
|
}
|
|
36422
36434
|
return t;
|
|
36423
36435
|
}
|
|
36424
|
-
},
|
|
36436
|
+
}, Ja = class {
|
|
36425
36437
|
rings;
|
|
36426
36438
|
polys;
|
|
36427
36439
|
constructor(e) {
|
|
@@ -36439,20 +36451,20 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36439
36451
|
let t = [];
|
|
36440
36452
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
36441
36453
|
let r = e[n];
|
|
36442
|
-
if (!r.poly) if (r.isExteriorRing()) t.push(new
|
|
36454
|
+
if (!r.poly) if (r.isExteriorRing()) t.push(new qa(r));
|
|
36443
36455
|
else {
|
|
36444
36456
|
let e = r.enclosingRing();
|
|
36445
|
-
e?.poly || t.push(new
|
|
36457
|
+
e?.poly || t.push(new qa(e)), e?.poly?.addInterior(r);
|
|
36446
36458
|
}
|
|
36447
36459
|
}
|
|
36448
36460
|
return t;
|
|
36449
36461
|
}
|
|
36450
|
-
},
|
|
36462
|
+
}, Ya = class {
|
|
36451
36463
|
queue;
|
|
36452
36464
|
tree;
|
|
36453
36465
|
segments;
|
|
36454
|
-
constructor(e, t =
|
|
36455
|
-
this.queue = e, this.tree = new
|
|
36466
|
+
constructor(e, t = $a.compare) {
|
|
36467
|
+
this.queue = e, this.tree = new Ea(t), this.segments = [];
|
|
36456
36468
|
}
|
|
36457
36469
|
process(e) {
|
|
36458
36470
|
let t = e.segment, n = [];
|
|
@@ -36484,7 +36496,7 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36484
36496
|
}
|
|
36485
36497
|
if (a !== null || o !== null) {
|
|
36486
36498
|
let e = null;
|
|
36487
|
-
e = a === null ? o : o === null ||
|
|
36499
|
+
e = a === null ? o : o === null || Ga.comparePoints(a, o) <= 0 ? a : o, this.queue.delete(t.rightSE), n.push(t.rightSE);
|
|
36488
36500
|
let r = t.split(e);
|
|
36489
36501
|
for (let e = 0, t = r.length; e < t; e++) n.push(r[e]);
|
|
36490
36502
|
}
|
|
@@ -36514,27 +36526,27 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36514
36526
|
let r = e.split(t);
|
|
36515
36527
|
return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
36516
36528
|
}
|
|
36517
|
-
},
|
|
36529
|
+
}, Xa = new class {
|
|
36518
36530
|
type;
|
|
36519
36531
|
numMultiPolys;
|
|
36520
36532
|
run(e, t, n) {
|
|
36521
|
-
|
|
36522
|
-
let r = [new
|
|
36523
|
-
for (let e = 0, t = n.length; e < t; e++) r.push(new
|
|
36524
|
-
if (
|
|
36533
|
+
Xa.type = e;
|
|
36534
|
+
let r = [new no(t, !0)];
|
|
36535
|
+
for (let e = 0, t = n.length; e < t; e++) r.push(new no(n[e], !1));
|
|
36536
|
+
if (Xa.numMultiPolys = r.length, Xa.type === "difference") {
|
|
36525
36537
|
let e = r[0], t = 1;
|
|
36526
|
-
for (; t < r.length;)
|
|
36538
|
+
for (; t < r.length;) Ia(r[t].bbox, e.bbox) === null ? r.splice(t, 1) : t++;
|
|
36527
36539
|
}
|
|
36528
|
-
if (
|
|
36540
|
+
if (Xa.type === "intersection") for (let e = 0, t = r.length; e < t; e++) {
|
|
36529
36541
|
let t = r[e];
|
|
36530
|
-
for (let n = e + 1, i = r.length; n < i; n++) if (
|
|
36542
|
+
for (let n = e + 1, i = r.length; n < i; n++) if (Ia(t.bbox, r[n].bbox) === null) return [];
|
|
36531
36543
|
}
|
|
36532
|
-
let i = new
|
|
36544
|
+
let i = new Ea(Ga.compare);
|
|
36533
36545
|
for (let e = 0, t = r.length; e < t; e++) {
|
|
36534
36546
|
let t = r[e].getSweepEvents();
|
|
36535
36547
|
for (let e = 0, n = t.length; e < n; e++) i.add(t[e]);
|
|
36536
36548
|
}
|
|
36537
|
-
let a = new
|
|
36549
|
+
let a = new Ya(i), o = null;
|
|
36538
36550
|
for (i.size != 0 && (o = i.first(), i.delete(o)); o;) {
|
|
36539
36551
|
let e = a.process(o);
|
|
36540
36552
|
for (let t = 0, n = e.length; t < n; t++) {
|
|
@@ -36543,9 +36555,9 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36543
36555
|
}
|
|
36544
36556
|
i.size == 0 ? o = null : (o = i.first(), i.delete(o));
|
|
36545
36557
|
}
|
|
36546
|
-
return
|
|
36558
|
+
return $.reset(), new Ja(Ka.factory(a.segments)).getGeom();
|
|
36547
36559
|
}
|
|
36548
|
-
}(),
|
|
36560
|
+
}(), Za = Xa, Qa = 0, $a = class e {
|
|
36549
36561
|
id;
|
|
36550
36562
|
leftSE;
|
|
36551
36563
|
rightSE;
|
|
@@ -36599,14 +36611,14 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36599
36611
|
return i.isGreaterThan(a) ? 1 : i.isLessThan(a) || c.isLessThan(l) ? -1 : c.isGreaterThan(l) ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
|
|
36600
36612
|
}
|
|
36601
36613
|
constructor(e, t, n, r) {
|
|
36602
|
-
this.id = ++
|
|
36614
|
+
this.id = ++Qa, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
|
|
36603
36615
|
}
|
|
36604
36616
|
static fromRing(t, n, r) {
|
|
36605
|
-
let i, a, o, s =
|
|
36617
|
+
let i, a, o, s = Ga.comparePoints(t, n);
|
|
36606
36618
|
if (s < 0) i = t, a = n, o = 1;
|
|
36607
36619
|
else if (s > 0) i = n, a = t, o = -1;
|
|
36608
36620
|
else throw Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);
|
|
36609
|
-
return new e(new
|
|
36621
|
+
return new e(new Ga(i, !0), new Ga(a, !1), [r], [o]);
|
|
36610
36622
|
}
|
|
36611
36623
|
replaceRightSE(e) {
|
|
36612
36624
|
this.rightSE = e, this.rightSE.segment = this, this.rightSE.otherSE = this.leftSE, this.leftSE.otherSE = this.rightSE;
|
|
@@ -36634,26 +36646,26 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36634
36646
|
return e.x.eq(this.leftSE.point.x) && e.y.eq(this.leftSE.point.y) || e.x.eq(this.rightSE.point.x) && e.y.eq(this.rightSE.point.y);
|
|
36635
36647
|
}
|
|
36636
36648
|
comparePoint(e) {
|
|
36637
|
-
return
|
|
36649
|
+
return $.orient(this.leftSE.point, e, this.rightSE.point);
|
|
36638
36650
|
}
|
|
36639
36651
|
getIntersection(e) {
|
|
36640
|
-
let t = this.bbox(), n = e.bbox(), r =
|
|
36652
|
+
let t = this.bbox(), n = e.bbox(), r = Ia(t, n);
|
|
36641
36653
|
if (r === null) return null;
|
|
36642
|
-
let i = this.leftSE.point, a = this.rightSE.point, o = e.leftSE.point, s = e.rightSE.point, c =
|
|
36654
|
+
let i = this.leftSE.point, a = this.rightSE.point, o = e.leftSE.point, s = e.rightSE.point, c = Fa(t, o) && this.comparePoint(o) === 0, l = Fa(n, i) && e.comparePoint(i) === 0, u = Fa(t, s) && this.comparePoint(s) === 0, d = Fa(n, a) && e.comparePoint(a) === 0;
|
|
36643
36655
|
if (l && c) return d && !u ? a : !d && u ? s : null;
|
|
36644
36656
|
if (l) return u && i.x.eq(s.x) && i.y.eq(s.y) ? null : i;
|
|
36645
36657
|
if (c) return d && a.x.eq(o.x) && a.y.eq(o.y) ? null : o;
|
|
36646
36658
|
if (d && u) return null;
|
|
36647
36659
|
if (d) return a;
|
|
36648
36660
|
if (u) return s;
|
|
36649
|
-
let f =
|
|
36650
|
-
return f === null || !
|
|
36661
|
+
let f = Wa(i, this.vector(), o, e.vector());
|
|
36662
|
+
return f === null || !Fa(r, f) ? null : $.snap(f);
|
|
36651
36663
|
}
|
|
36652
36664
|
split(t) {
|
|
36653
|
-
let n = [], r = t.events !== void 0, i = new
|
|
36665
|
+
let n = [], r = t.events !== void 0, i = new Ga(t, !0), a = new Ga(t, !1), o = this.rightSE;
|
|
36654
36666
|
this.replaceRightSE(a), n.push(a), n.push(i);
|
|
36655
36667
|
let s = new e(i, o, this.rings.slice(), this.windings.slice());
|
|
36656
|
-
return
|
|
36668
|
+
return Ga.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), Ga.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), r && (i.checkForConsuming(), a.checkForConsuming()), n;
|
|
36657
36669
|
}
|
|
36658
36670
|
swapEvents() {
|
|
36659
36671
|
let e = this.rightSE;
|
|
@@ -36725,13 +36737,13 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36725
36737
|
if (this.consumedBy) return !1;
|
|
36726
36738
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
36727
36739
|
let e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
36728
|
-
switch (
|
|
36740
|
+
switch (Za.type) {
|
|
36729
36741
|
case "union":
|
|
36730
36742
|
this._isInResult = e.length === 0 != (t.length === 0);
|
|
36731
36743
|
break;
|
|
36732
36744
|
case "intersection": {
|
|
36733
36745
|
let n, r;
|
|
36734
|
-
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r ===
|
|
36746
|
+
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === Za.numMultiPolys && n < r;
|
|
36735
36747
|
break;
|
|
36736
36748
|
}
|
|
36737
36749
|
case "xor":
|
|
@@ -36745,16 +36757,16 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36745
36757
|
}
|
|
36746
36758
|
return this._isInResult;
|
|
36747
36759
|
}
|
|
36748
|
-
},
|
|
36760
|
+
}, eo = class {
|
|
36749
36761
|
poly;
|
|
36750
36762
|
isExterior;
|
|
36751
36763
|
segments;
|
|
36752
36764
|
bbox;
|
|
36753
36765
|
constructor(e, t, n) {
|
|
36754
36766
|
if (!Array.isArray(e) || e.length === 0 || (this.poly = t, this.isExterior = n, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")) throw Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
36755
|
-
let r =
|
|
36756
|
-
x: new
|
|
36757
|
-
y: new
|
|
36767
|
+
let r = $.snap({
|
|
36768
|
+
x: new Sa(e[0][0]),
|
|
36769
|
+
y: new Sa(e[0][1])
|
|
36758
36770
|
});
|
|
36759
36771
|
this.bbox = {
|
|
36760
36772
|
ll: {
|
|
@@ -36769,13 +36781,13 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36769
36781
|
let i = r;
|
|
36770
36782
|
for (let t = 1, n = e.length; t < n; t++) {
|
|
36771
36783
|
if (typeof e[t][0] != "number" || typeof e[t][1] != "number") throw Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
36772
|
-
let n =
|
|
36773
|
-
x: new
|
|
36774
|
-
y: new
|
|
36784
|
+
let n = $.snap({
|
|
36785
|
+
x: new Sa(e[t][0]),
|
|
36786
|
+
y: new Sa(e[t][1])
|
|
36775
36787
|
});
|
|
36776
|
-
n.x.eq(i.x) && n.y.eq(i.y) || (this.segments.push(
|
|
36788
|
+
n.x.eq(i.x) && n.y.eq(i.y) || (this.segments.push($a.fromRing(i, n, this)), n.x.isLessThan(this.bbox.ll.x) && (this.bbox.ll.x = n.x), n.y.isLessThan(this.bbox.ll.y) && (this.bbox.ll.y = n.y), n.x.isGreaterThan(this.bbox.ur.x) && (this.bbox.ur.x = n.x), n.y.isGreaterThan(this.bbox.ur.y) && (this.bbox.ur.y = n.y), i = n);
|
|
36777
36789
|
}
|
|
36778
|
-
(!r.x.eq(i.x) || !r.y.eq(i.y)) && this.segments.push(
|
|
36790
|
+
(!r.x.eq(i.x) || !r.y.eq(i.y)) && this.segments.push($a.fromRing(i, r, this));
|
|
36779
36791
|
}
|
|
36780
36792
|
getSweepEvents() {
|
|
36781
36793
|
let e = [];
|
|
@@ -36785,14 +36797,14 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36785
36797
|
}
|
|
36786
36798
|
return e;
|
|
36787
36799
|
}
|
|
36788
|
-
},
|
|
36800
|
+
}, to = class {
|
|
36789
36801
|
multiPoly;
|
|
36790
36802
|
exteriorRing;
|
|
36791
36803
|
interiorRings;
|
|
36792
36804
|
bbox;
|
|
36793
36805
|
constructor(e, t) {
|
|
36794
36806
|
if (!Array.isArray(e)) throw Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
36795
|
-
this.exteriorRing = new
|
|
36807
|
+
this.exteriorRing = new eo(e[0], this, !0), this.bbox = {
|
|
36796
36808
|
ll: {
|
|
36797
36809
|
x: this.exteriorRing.bbox.ll.x,
|
|
36798
36810
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -36803,7 +36815,7 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36803
36815
|
}
|
|
36804
36816
|
}, this.interiorRings = [];
|
|
36805
36817
|
for (let t = 1, n = e.length; t < n; t++) {
|
|
36806
|
-
let n = new
|
|
36818
|
+
let n = new eo(e[t], this, !1);
|
|
36807
36819
|
n.bbox.ll.x.isLessThan(this.bbox.ll.x) && (this.bbox.ll.x = n.bbox.ll.x), n.bbox.ll.y.isLessThan(this.bbox.ll.y) && (this.bbox.ll.y = n.bbox.ll.y), n.bbox.ur.x.isGreaterThan(this.bbox.ur.x) && (this.bbox.ur.x = n.bbox.ur.x), n.bbox.ur.y.isGreaterThan(this.bbox.ur.y) && (this.bbox.ur.y = n.bbox.ur.y), this.interiorRings.push(n);
|
|
36808
36820
|
}
|
|
36809
36821
|
this.multiPoly = t;
|
|
@@ -36816,7 +36828,7 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36816
36828
|
}
|
|
36817
36829
|
return e;
|
|
36818
36830
|
}
|
|
36819
|
-
},
|
|
36831
|
+
}, no = class {
|
|
36820
36832
|
isSubject;
|
|
36821
36833
|
polys;
|
|
36822
36834
|
bbox;
|
|
@@ -36827,16 +36839,16 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36827
36839
|
} catch {}
|
|
36828
36840
|
this.polys = [], this.bbox = {
|
|
36829
36841
|
ll: {
|
|
36830
|
-
x: new
|
|
36831
|
-
y: new
|
|
36842
|
+
x: new Sa(Infinity),
|
|
36843
|
+
y: new Sa(Infinity)
|
|
36832
36844
|
},
|
|
36833
36845
|
ur: {
|
|
36834
|
-
x: new
|
|
36835
|
-
y: new
|
|
36846
|
+
x: new Sa(-Infinity),
|
|
36847
|
+
y: new Sa(-Infinity)
|
|
36836
36848
|
}
|
|
36837
36849
|
};
|
|
36838
36850
|
for (let t = 0, n = e.length; t < n; t++) {
|
|
36839
|
-
let n = new
|
|
36851
|
+
let n = new to(e[t], this);
|
|
36840
36852
|
n.bbox.ll.x.isLessThan(this.bbox.ll.x) && (this.bbox.ll.x = n.bbox.ll.x), n.bbox.ll.y.isLessThan(this.bbox.ll.y) && (this.bbox.ll.y = n.bbox.ll.y), n.bbox.ur.x.isGreaterThan(this.bbox.ur.x) && (this.bbox.ur.x = n.bbox.ur.x), n.bbox.ur.y.isGreaterThan(this.bbox.ur.y) && (this.bbox.ur.y = n.bbox.ur.y), this.polys.push(n);
|
|
36841
36853
|
}
|
|
36842
36854
|
this.isSubject = t;
|
|
@@ -36849,45 +36861,45 @@ var ja = (e) => e, Ma = (e) => {
|
|
|
36849
36861
|
}
|
|
36850
36862
|
return e;
|
|
36851
36863
|
}
|
|
36852
|
-
},
|
|
36853
|
-
|
|
36864
|
+
}, ro = (e, ...t) => Za.run("intersection", e, t);
|
|
36865
|
+
$.set;
|
|
36854
36866
|
//#endregion
|
|
36855
36867
|
//#region node_modules/@turf/intersect/dist/esm/index.js
|
|
36856
|
-
function
|
|
36868
|
+
function io(e, t = {}) {
|
|
36857
36869
|
let n = [];
|
|
36858
36870
|
if (Vn(e, (e) => {
|
|
36859
36871
|
n.push(e.coordinates);
|
|
36860
36872
|
}), n.length < 2) throw Error("Must specify at least 2 geometries");
|
|
36861
|
-
let r =
|
|
36873
|
+
let r = ro(n[0], ...n.slice(1));
|
|
36862
36874
|
return r.length === 0 ? null : r.length === 1 ? Fn(r[0], t.properties) : zn(r, t.properties);
|
|
36863
36875
|
}
|
|
36864
36876
|
//#endregion
|
|
36865
36877
|
//#region node_modules/d3-geo/src/math.js
|
|
36866
|
-
var
|
|
36878
|
+
var ao = 1e-6, oo = Math.PI, so = oo / 2, co = oo / 4, lo = oo * 2, uo = 180 / oo, fo = oo / 180, po = Math.abs, mo = Math.atan, ho = Math.atan2, go = Math.cos, _o = Math.ceil, vo = Math.exp, yo = Math.log, bo = Math.sin, xo = Math.sign || function(e) {
|
|
36867
36879
|
return e > 0 ? 1 : e < 0 ? -1 : 0;
|
|
36868
|
-
},
|
|
36869
|
-
function
|
|
36870
|
-
return e > 1 ? 0 : e < -1 ?
|
|
36880
|
+
}, So = Math.sqrt, Co = Math.tan;
|
|
36881
|
+
function wo(e) {
|
|
36882
|
+
return e > 1 ? 0 : e < -1 ? oo : Math.acos(e);
|
|
36871
36883
|
}
|
|
36872
|
-
function
|
|
36873
|
-
return e > 1 ?
|
|
36884
|
+
function To(e) {
|
|
36885
|
+
return e > 1 ? so : e < -1 ? -so : Math.asin(e);
|
|
36874
36886
|
}
|
|
36875
36887
|
//#endregion
|
|
36876
36888
|
//#region node_modules/d3-geo/src/noop.js
|
|
36877
|
-
function
|
|
36889
|
+
function Eo() {}
|
|
36878
36890
|
//#endregion
|
|
36879
36891
|
//#region node_modules/d3-geo/src/stream.js
|
|
36880
|
-
function
|
|
36881
|
-
e &&
|
|
36892
|
+
function Do(e, t) {
|
|
36893
|
+
e && ko.hasOwnProperty(e.type) && ko[e.type](e, t);
|
|
36882
36894
|
}
|
|
36883
|
-
var
|
|
36895
|
+
var Oo = {
|
|
36884
36896
|
Feature: function(e, t) {
|
|
36885
|
-
|
|
36897
|
+
Do(e.geometry, t);
|
|
36886
36898
|
},
|
|
36887
36899
|
FeatureCollection: function(e, t) {
|
|
36888
|
-
for (var n = e.features, r = -1, i = n.length; ++r < i;)
|
|
36900
|
+
for (var n = e.features, r = -1, i = n.length; ++r < i;) Do(n[r].geometry, t);
|
|
36889
36901
|
}
|
|
36890
|
-
},
|
|
36902
|
+
}, ko = {
|
|
36891
36903
|
Sphere: function(e, t) {
|
|
36892
36904
|
t.sphere();
|
|
36893
36905
|
},
|
|
@@ -36898,74 +36910,74 @@ var Eo = {
|
|
|
36898
36910
|
for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) e = n[r], t.point(e[0], e[1], e[2]);
|
|
36899
36911
|
},
|
|
36900
36912
|
LineString: function(e, t) {
|
|
36901
|
-
|
|
36913
|
+
Ao(e.coordinates, t, 0);
|
|
36902
36914
|
},
|
|
36903
36915
|
MultiLineString: function(e, t) {
|
|
36904
|
-
for (var n = e.coordinates, r = -1, i = n.length; ++r < i;)
|
|
36916
|
+
for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) Ao(n[r], t, 0);
|
|
36905
36917
|
},
|
|
36906
36918
|
Polygon: function(e, t) {
|
|
36907
|
-
|
|
36919
|
+
jo(e.coordinates, t);
|
|
36908
36920
|
},
|
|
36909
36921
|
MultiPolygon: function(e, t) {
|
|
36910
|
-
for (var n = e.coordinates, r = -1, i = n.length; ++r < i;)
|
|
36922
|
+
for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) jo(n[r], t);
|
|
36911
36923
|
},
|
|
36912
36924
|
GeometryCollection: function(e, t) {
|
|
36913
|
-
for (var n = e.geometries, r = -1, i = n.length; ++r < i;)
|
|
36925
|
+
for (var n = e.geometries, r = -1, i = n.length; ++r < i;) Do(n[r], t);
|
|
36914
36926
|
}
|
|
36915
36927
|
};
|
|
36916
|
-
function
|
|
36928
|
+
function Ao(e, t, n) {
|
|
36917
36929
|
var r = -1, i = e.length - n, a;
|
|
36918
36930
|
for (t.lineStart(); ++r < i;) a = e[r], t.point(a[0], a[1], a[2]);
|
|
36919
36931
|
t.lineEnd();
|
|
36920
36932
|
}
|
|
36921
|
-
function
|
|
36933
|
+
function jo(e, t) {
|
|
36922
36934
|
var n = -1, r = e.length;
|
|
36923
|
-
for (t.polygonStart(); ++n < r;)
|
|
36935
|
+
for (t.polygonStart(); ++n < r;) Ao(e[n], t, 1);
|
|
36924
36936
|
t.polygonEnd();
|
|
36925
36937
|
}
|
|
36926
|
-
function
|
|
36927
|
-
e &&
|
|
36938
|
+
function Mo(e, t) {
|
|
36939
|
+
e && Oo.hasOwnProperty(e.type) ? Oo[e.type](e, t) : Do(e, t);
|
|
36928
36940
|
}
|
|
36929
36941
|
//#endregion
|
|
36930
36942
|
//#region node_modules/d3-geo/src/cartesian.js
|
|
36931
|
-
function
|
|
36932
|
-
return [
|
|
36943
|
+
function No(e) {
|
|
36944
|
+
return [ho(e[1], e[0]), To(e[2])];
|
|
36933
36945
|
}
|
|
36934
|
-
function
|
|
36935
|
-
var t = e[0], n = e[1], r =
|
|
36946
|
+
function Po(e) {
|
|
36947
|
+
var t = e[0], n = e[1], r = go(n);
|
|
36936
36948
|
return [
|
|
36937
|
-
r *
|
|
36938
|
-
r *
|
|
36939
|
-
|
|
36949
|
+
r * go(t),
|
|
36950
|
+
r * bo(t),
|
|
36951
|
+
bo(n)
|
|
36940
36952
|
];
|
|
36941
36953
|
}
|
|
36942
|
-
function
|
|
36954
|
+
function Fo(e, t) {
|
|
36943
36955
|
return e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
|
|
36944
36956
|
}
|
|
36945
|
-
function
|
|
36957
|
+
function Io(e, t) {
|
|
36946
36958
|
return [
|
|
36947
36959
|
e[1] * t[2] - e[2] * t[1],
|
|
36948
36960
|
e[2] * t[0] - e[0] * t[2],
|
|
36949
36961
|
e[0] * t[1] - e[1] * t[0]
|
|
36950
36962
|
];
|
|
36951
36963
|
}
|
|
36952
|
-
function
|
|
36964
|
+
function Lo(e, t) {
|
|
36953
36965
|
e[0] += t[0], e[1] += t[1], e[2] += t[2];
|
|
36954
36966
|
}
|
|
36955
|
-
function
|
|
36967
|
+
function Ro(e, t) {
|
|
36956
36968
|
return [
|
|
36957
36969
|
e[0] * t,
|
|
36958
36970
|
e[1] * t,
|
|
36959
36971
|
e[2] * t
|
|
36960
36972
|
];
|
|
36961
36973
|
}
|
|
36962
|
-
function
|
|
36963
|
-
var t =
|
|
36974
|
+
function zo(e) {
|
|
36975
|
+
var t = So(e[0] * e[0] + e[1] * e[1] + e[2] * e[2]);
|
|
36964
36976
|
e[0] /= t, e[1] /= t, e[2] /= t;
|
|
36965
36977
|
}
|
|
36966
36978
|
//#endregion
|
|
36967
36979
|
//#region node_modules/d3-geo/src/compose.js
|
|
36968
|
-
function
|
|
36980
|
+
function Bo(e, t) {
|
|
36969
36981
|
function n(n, r) {
|
|
36970
36982
|
return n = e(n, r), t(n[0], n[1]);
|
|
36971
36983
|
}
|
|
@@ -36975,63 +36987,63 @@ function Ro(e, t) {
|
|
|
36975
36987
|
}
|
|
36976
36988
|
//#endregion
|
|
36977
36989
|
//#region node_modules/d3-geo/src/rotation.js
|
|
36978
|
-
function
|
|
36979
|
-
return
|
|
36990
|
+
function Vo(e, t) {
|
|
36991
|
+
return po(e) > oo && (e -= Math.round(e / lo) * lo), [e, t];
|
|
36980
36992
|
}
|
|
36981
|
-
|
|
36982
|
-
function
|
|
36983
|
-
return (e %=
|
|
36993
|
+
Vo.invert = Vo;
|
|
36994
|
+
function Ho(e, t, n) {
|
|
36995
|
+
return (e %= lo) ? t || n ? Bo(Wo(e), Go(t, n)) : Wo(e) : t || n ? Go(t, n) : Vo;
|
|
36984
36996
|
}
|
|
36985
|
-
function
|
|
36997
|
+
function Uo(e) {
|
|
36986
36998
|
return function(t, n) {
|
|
36987
|
-
return t += e,
|
|
36999
|
+
return t += e, po(t) > oo && (t -= Math.round(t / lo) * lo), [t, n];
|
|
36988
37000
|
};
|
|
36989
37001
|
}
|
|
36990
|
-
function
|
|
36991
|
-
var t =
|
|
36992
|
-
return t.invert =
|
|
37002
|
+
function Wo(e) {
|
|
37003
|
+
var t = Uo(e);
|
|
37004
|
+
return t.invert = Uo(-e), t;
|
|
36993
37005
|
}
|
|
36994
|
-
function
|
|
36995
|
-
var n =
|
|
37006
|
+
function Go(e, t) {
|
|
37007
|
+
var n = go(e), r = bo(e), i = go(t), a = bo(t);
|
|
36996
37008
|
function o(e, t) {
|
|
36997
|
-
var o =
|
|
36998
|
-
return [
|
|
37009
|
+
var o = go(t), s = go(e) * o, c = bo(e) * o, l = bo(t), u = l * n + s * r;
|
|
37010
|
+
return [ho(c * i - u * a, s * n - l * r), To(u * i + c * a)];
|
|
36999
37011
|
}
|
|
37000
37012
|
return o.invert = function(e, t) {
|
|
37001
|
-
var o =
|
|
37002
|
-
return [
|
|
37013
|
+
var o = go(t), s = go(e) * o, c = bo(e) * o, l = bo(t), u = l * i - c * a;
|
|
37014
|
+
return [ho(c * i + l * a, s * n + u * r), To(u * n - s * r)];
|
|
37003
37015
|
}, o;
|
|
37004
37016
|
}
|
|
37005
|
-
function
|
|
37006
|
-
e =
|
|
37017
|
+
function Ko(e) {
|
|
37018
|
+
e = Ho(e[0] * fo, e[1] * fo, e.length > 2 ? e[2] * fo : 0);
|
|
37007
37019
|
function t(t) {
|
|
37008
|
-
return t = e(t[0] *
|
|
37020
|
+
return t = e(t[0] * fo, t[1] * fo), t[0] *= uo, t[1] *= uo, t;
|
|
37009
37021
|
}
|
|
37010
37022
|
return t.invert = function(t) {
|
|
37011
|
-
return t = e.invert(t[0] *
|
|
37023
|
+
return t = e.invert(t[0] * fo, t[1] * fo), t[0] *= uo, t[1] *= uo, t;
|
|
37012
37024
|
}, t;
|
|
37013
37025
|
}
|
|
37014
37026
|
//#endregion
|
|
37015
37027
|
//#region node_modules/d3-geo/src/circle.js
|
|
37016
|
-
function
|
|
37028
|
+
function qo(e, t, n, r, i, a) {
|
|
37017
37029
|
if (n) {
|
|
37018
|
-
var o =
|
|
37019
|
-
i == null ? (i = t + r *
|
|
37020
|
-
for (var l, u = i; r > 0 ? u > a : u < a; u -= c) l =
|
|
37030
|
+
var o = go(t), s = bo(t), c = r * n;
|
|
37031
|
+
i == null ? (i = t + r * lo, a = t - c / 2) : (i = Jo(o, i), a = Jo(o, a), (r > 0 ? i < a : i > a) && (i += r * lo));
|
|
37032
|
+
for (var l, u = i; r > 0 ? u > a : u < a; u -= c) l = No([
|
|
37021
37033
|
o,
|
|
37022
|
-
-s *
|
|
37023
|
-
-s *
|
|
37034
|
+
-s * go(u),
|
|
37035
|
+
-s * bo(u)
|
|
37024
37036
|
]), e.point(l[0], l[1]);
|
|
37025
37037
|
}
|
|
37026
37038
|
}
|
|
37027
|
-
function
|
|
37028
|
-
t =
|
|
37029
|
-
var n =
|
|
37030
|
-
return ((-t[2] < 0 ? -n : n) +
|
|
37039
|
+
function Jo(e, t) {
|
|
37040
|
+
t = Po(t), t[0] -= e, zo(t);
|
|
37041
|
+
var n = wo(-t[1]);
|
|
37042
|
+
return ((-t[2] < 0 ? -n : n) + lo - ao) % lo;
|
|
37031
37043
|
}
|
|
37032
37044
|
//#endregion
|
|
37033
37045
|
//#region node_modules/d3-geo/src/clip/buffer.js
|
|
37034
|
-
function
|
|
37046
|
+
function Yo() {
|
|
37035
37047
|
var e = [], t;
|
|
37036
37048
|
return {
|
|
37037
37049
|
point: function(e, n, r) {
|
|
@@ -37044,7 +37056,7 @@ function qo() {
|
|
|
37044
37056
|
lineStart: function() {
|
|
37045
37057
|
e.push(t = []);
|
|
37046
37058
|
},
|
|
37047
|
-
lineEnd:
|
|
37059
|
+
lineEnd: Eo,
|
|
37048
37060
|
rejoin: function() {
|
|
37049
37061
|
e.length > 1 && e.push(e.pop().concat(e.shift()));
|
|
37050
37062
|
},
|
|
@@ -37056,31 +37068,31 @@ function qo() {
|
|
|
37056
37068
|
}
|
|
37057
37069
|
//#endregion
|
|
37058
37070
|
//#region node_modules/d3-geo/src/pointEqual.js
|
|
37059
|
-
function
|
|
37060
|
-
return
|
|
37071
|
+
function Xo(e, t) {
|
|
37072
|
+
return po(e[0] - t[0]) < 1e-6 && po(e[1] - t[1]) < 1e-6;
|
|
37061
37073
|
}
|
|
37062
37074
|
//#endregion
|
|
37063
37075
|
//#region node_modules/d3-geo/src/clip/rejoin.js
|
|
37064
|
-
function
|
|
37076
|
+
function Zo(e, t, n, r) {
|
|
37065
37077
|
this.x = e, this.z = t, this.o = n, this.e = r, this.v = !1, this.n = this.p = null;
|
|
37066
37078
|
}
|
|
37067
|
-
function
|
|
37079
|
+
function Qo(e, t, n, r, i) {
|
|
37068
37080
|
var a = [], o = [], s, c;
|
|
37069
37081
|
if (e.forEach(function(e) {
|
|
37070
37082
|
if (!((t = e.length - 1) <= 0)) {
|
|
37071
37083
|
var t, n = e[0], r = e[t], c;
|
|
37072
|
-
if (
|
|
37084
|
+
if (Xo(n, r)) {
|
|
37073
37085
|
if (!n[2] && !r[2]) {
|
|
37074
37086
|
for (i.lineStart(), s = 0; s < t; ++s) i.point((n = e[s])[0], n[1]);
|
|
37075
37087
|
i.lineEnd();
|
|
37076
37088
|
return;
|
|
37077
37089
|
}
|
|
37078
|
-
r[0] += 2 *
|
|
37090
|
+
r[0] += 2 * ao;
|
|
37079
37091
|
}
|
|
37080
|
-
a.push(c = new
|
|
37092
|
+
a.push(c = new Zo(n, e, null, !0)), o.push(c.o = new Zo(n, null, c, !1)), a.push(c = new Zo(r, e, null, !1)), o.push(c.o = new Zo(r, null, c, !0));
|
|
37081
37093
|
}
|
|
37082
37094
|
}), a.length) {
|
|
37083
|
-
for (o.sort(t),
|
|
37095
|
+
for (o.sort(t), $o(a), $o(o), s = 0, c = o.length; s < c; ++s) o[s].e = n = !n;
|
|
37084
37096
|
for (var l = a[0], u, d;;) {
|
|
37085
37097
|
for (var f = l, p = !0; f.v;) if ((f = f.n) === l) return;
|
|
37086
37098
|
u = f.z, i.lineStart();
|
|
@@ -37100,7 +37112,7 @@ function Xo(e, t, n, r, i) {
|
|
|
37100
37112
|
}
|
|
37101
37113
|
}
|
|
37102
37114
|
}
|
|
37103
|
-
function
|
|
37115
|
+
function $o(e) {
|
|
37104
37116
|
if (t = e.length) {
|
|
37105
37117
|
for (var t, n = 0, r = e[0], i; ++n < t;) r.n = i = e[n], i.p = r, r = i;
|
|
37106
37118
|
r.n = i = e[0], i.p = r;
|
|
@@ -37108,24 +37120,24 @@ function Zo(e) {
|
|
|
37108
37120
|
}
|
|
37109
37121
|
//#endregion
|
|
37110
37122
|
//#region node_modules/d3-geo/src/polygonContains.js
|
|
37111
|
-
function
|
|
37112
|
-
return
|
|
37123
|
+
function es(e) {
|
|
37124
|
+
return po(e[0]) <= oo ? e[0] : xo(e[0]) * ((po(e[0]) + oo) % lo - oo);
|
|
37113
37125
|
}
|
|
37114
|
-
function
|
|
37115
|
-
var n =
|
|
37116
|
-
|
|
37117
|
-
-
|
|
37126
|
+
function ts(e, t) {
|
|
37127
|
+
var n = es(t), r = t[1], i = bo(r), a = [
|
|
37128
|
+
bo(n),
|
|
37129
|
+
-go(n),
|
|
37118
37130
|
0
|
|
37119
37131
|
], o = 0, s = 0, c = new U();
|
|
37120
|
-
i === 1 ? r =
|
|
37121
|
-
for (var l = 0, u = e.length; l < u; ++l) if (f = (d = e[l]).length) for (var d, f, p = d[f - 1], m =
|
|
37122
|
-
var y = d[v], b =
|
|
37123
|
-
if (c.add(
|
|
37124
|
-
var k = Po(
|
|
37125
|
-
|
|
37126
|
-
var A =
|
|
37127
|
-
|
|
37128
|
-
var j = (D ^ w >= 0 ? -1 : 1) *
|
|
37132
|
+
i === 1 ? r = so + ao : i === -1 && (r = -so - ao);
|
|
37133
|
+
for (var l = 0, u = e.length; l < u; ++l) if (f = (d = e[l]).length) for (var d, f, p = d[f - 1], m = es(p), h = p[1] / 2 + co, g = bo(h), _ = go(h), v = 0; v < f; ++v, m = b, g = S, _ = C, p = y) {
|
|
37134
|
+
var y = d[v], b = es(y), x = y[1] / 2 + co, S = bo(x), C = go(x), w = b - m, T = w >= 0 ? 1 : -1, E = T * w, D = E > oo, O = g * S;
|
|
37135
|
+
if (c.add(ho(O * T * bo(E), _ * C + O * go(E))), o += D ? w + T * lo : w, D ^ m >= n ^ b >= n) {
|
|
37136
|
+
var k = Io(Po(p), Po(y));
|
|
37137
|
+
zo(k);
|
|
37138
|
+
var A = Io(a, k);
|
|
37139
|
+
zo(A);
|
|
37140
|
+
var j = (D ^ w >= 0 ? -1 : 1) * To(A[2]);
|
|
37129
37141
|
(r > j || r === j && (k[0] || k[1])) && (s += D ^ w >= 0 ? 1 : -1);
|
|
37130
37142
|
}
|
|
37131
37143
|
}
|
|
@@ -37133,9 +37145,9 @@ function $o(e, t) {
|
|
|
37133
37145
|
}
|
|
37134
37146
|
//#endregion
|
|
37135
37147
|
//#region node_modules/d3-geo/src/clip/index.js
|
|
37136
|
-
function
|
|
37148
|
+
function ns(e, t, n, r) {
|
|
37137
37149
|
return function(i) {
|
|
37138
|
-
var a = t(i), o =
|
|
37150
|
+
var a = t(i), o = Yo(), s = t(o), c = !1, l, u, d, f = {
|
|
37139
37151
|
point: p,
|
|
37140
37152
|
lineStart: h,
|
|
37141
37153
|
lineEnd: g,
|
|
@@ -37144,8 +37156,8 @@ function es(e, t, n, r) {
|
|
|
37144
37156
|
},
|
|
37145
37157
|
polygonEnd: function() {
|
|
37146
37158
|
f.point = p, f.lineStart = h, f.lineEnd = g, u = Wt(u);
|
|
37147
|
-
var e =
|
|
37148
|
-
u.length ? (c ||= (i.polygonStart(), !0),
|
|
37159
|
+
var e = ts(l, r);
|
|
37160
|
+
u.length ? (c ||= (i.polygonStart(), !0), Qo(u, is, e, n, i)) : e && (c ||= (i.polygonStart(), !0), i.lineStart(), n(null, null, 1, i), i.lineEnd()), c &&= (i.polygonEnd(), !1), u = l = null;
|
|
37149
37161
|
},
|
|
37150
37162
|
sphere: function() {
|
|
37151
37163
|
i.polygonStart(), i.lineStart(), n(null, null, 1, i), i.lineEnd(), i.polygonEnd();
|
|
@@ -37180,32 +37192,32 @@ function es(e, t, n, r) {
|
|
|
37180
37192
|
}
|
|
37181
37193
|
return;
|
|
37182
37194
|
}
|
|
37183
|
-
r > 1 && e & 2 && t.push(t.pop().concat(t.shift())), u.push(t.filter(
|
|
37195
|
+
r > 1 && e & 2 && t.push(t.pop().concat(t.shift())), u.push(t.filter(rs));
|
|
37184
37196
|
}
|
|
37185
37197
|
}
|
|
37186
37198
|
return f;
|
|
37187
37199
|
};
|
|
37188
37200
|
}
|
|
37189
|
-
function
|
|
37201
|
+
function rs(e) {
|
|
37190
37202
|
return e.length > 1;
|
|
37191
37203
|
}
|
|
37192
|
-
function
|
|
37193
|
-
return ((e = e.x)[0] < 0 ? e[1] -
|
|
37204
|
+
function is(e, t) {
|
|
37205
|
+
return ((e = e.x)[0] < 0 ? e[1] - so - ao : so - e[1]) - ((t = t.x)[0] < 0 ? t[1] - so - ao : so - t[1]);
|
|
37194
37206
|
}
|
|
37195
37207
|
//#endregion
|
|
37196
37208
|
//#region node_modules/d3-geo/src/clip/antimeridian.js
|
|
37197
|
-
var
|
|
37209
|
+
var as = ns(function() {
|
|
37198
37210
|
return !0;
|
|
37199
|
-
},
|
|
37200
|
-
function
|
|
37211
|
+
}, os, cs, [-oo, -so]);
|
|
37212
|
+
function os(e) {
|
|
37201
37213
|
var t = NaN, n = NaN, r = NaN, i;
|
|
37202
37214
|
return {
|
|
37203
37215
|
lineStart: function() {
|
|
37204
37216
|
e.lineStart(), i = 1;
|
|
37205
37217
|
},
|
|
37206
37218
|
point: function(a, o) {
|
|
37207
|
-
var s = a > 0 ?
|
|
37208
|
-
|
|
37219
|
+
var s = a > 0 ? oo : -oo, c = po(a - t);
|
|
37220
|
+
po(c - oo) < 1e-6 ? (e.point(t, n = (n + o) / 2 > 0 ? so : -so), e.point(r, n), e.lineEnd(), e.lineStart(), e.point(s, n), e.point(a, n), i = 0) : r !== s && c >= oo && (po(t - r) < 1e-6 && (t -= r * ao), po(a - s) < 1e-6 && (a -= s * ao), n = ss(t, n, a, o), e.point(r, n), e.lineEnd(), e.lineStart(), e.point(s, n), i = 0), e.point(t = a, n = o), r = s;
|
|
37209
37221
|
},
|
|
37210
37222
|
lineEnd: function() {
|
|
37211
37223
|
e.lineEnd(), t = n = NaN;
|
|
@@ -37215,27 +37227,27 @@ function is(e) {
|
|
|
37215
37227
|
}
|
|
37216
37228
|
};
|
|
37217
37229
|
}
|
|
37218
|
-
function
|
|
37219
|
-
var i, a, o =
|
|
37220
|
-
return
|
|
37230
|
+
function ss(e, t, n, r) {
|
|
37231
|
+
var i, a, o = bo(e - n);
|
|
37232
|
+
return po(o) > 1e-6 ? mo((bo(t) * (a = go(r)) * bo(n) - bo(r) * (i = go(t)) * bo(e)) / (i * a * o)) : (t + r) / 2;
|
|
37221
37233
|
}
|
|
37222
|
-
function
|
|
37234
|
+
function cs(e, t, n, r) {
|
|
37223
37235
|
var i;
|
|
37224
|
-
if (e == null) i = n *
|
|
37225
|
-
else if (
|
|
37226
|
-
var a = e[0] < t[0] ?
|
|
37236
|
+
if (e == null) i = n * so, r.point(-oo, i), r.point(0, i), r.point(oo, i), r.point(oo, 0), r.point(oo, -i), r.point(0, -i), r.point(-oo, -i), r.point(-oo, 0), r.point(-oo, i);
|
|
37237
|
+
else if (po(e[0] - t[0]) > 1e-6) {
|
|
37238
|
+
var a = e[0] < t[0] ? oo : -oo;
|
|
37227
37239
|
i = n * a / 2, r.point(-a, i), r.point(0, i), r.point(a, i);
|
|
37228
37240
|
} else r.point(t[0], t[1]);
|
|
37229
37241
|
}
|
|
37230
37242
|
//#endregion
|
|
37231
37243
|
//#region node_modules/d3-geo/src/clip/circle.js
|
|
37232
|
-
function
|
|
37233
|
-
var t =
|
|
37244
|
+
function ls(e) {
|
|
37245
|
+
var t = go(e), n = 2 * fo, r = t > 0, i = po(t) > ao;
|
|
37234
37246
|
function a(t, r, i, a) {
|
|
37235
|
-
|
|
37247
|
+
qo(a, e, n, i, t, r);
|
|
37236
37248
|
}
|
|
37237
37249
|
function o(e, n) {
|
|
37238
|
-
return
|
|
37250
|
+
return go(e) * go(n) > t;
|
|
37239
37251
|
}
|
|
37240
37252
|
function s(e) {
|
|
37241
37253
|
var t, n, a, s, u;
|
|
@@ -37244,13 +37256,13 @@ function ss(e) {
|
|
|
37244
37256
|
s = a = !1, u = 1;
|
|
37245
37257
|
},
|
|
37246
37258
|
point: function(d, f) {
|
|
37247
|
-
var p = [d, f], m, h = o(d, f), g = r ? h ? 0 : l(d, f) : h ? l(d + (d < 0 ?
|
|
37248
|
-
if (!t && (s = a = h) && e.lineStart(), h !== a && (m = c(t, p), (!m ||
|
|
37259
|
+
var p = [d, f], m, h = o(d, f), g = r ? h ? 0 : l(d, f) : h ? l(d + (d < 0 ? oo : -oo), f) : 0;
|
|
37260
|
+
if (!t && (s = a = h) && e.lineStart(), h !== a && (m = c(t, p), (!m || Xo(t, m) || Xo(p, m)) && (p[2] = 1)), h !== a) u = 0, h ? (e.lineStart(), m = c(p, t), e.point(m[0], m[1])) : (m = c(t, p), e.point(m[0], m[1], 2), e.lineEnd()), t = m;
|
|
37249
37261
|
else if (i && t && r ^ h) {
|
|
37250
37262
|
var _;
|
|
37251
37263
|
!(g & n) && (_ = c(p, t, !0)) && (u = 0, r ? (e.lineStart(), e.point(_[0][0], _[0][1]), e.point(_[1][0], _[1][1]), e.lineEnd()) : (e.point(_[1][0], _[1][1]), e.lineEnd(), e.lineStart(), e.point(_[0][0], _[0][1], 3)));
|
|
37252
37264
|
}
|
|
37253
|
-
h && (!t || !
|
|
37265
|
+
h && (!t || !Xo(t, p)) && e.point(p[0], p[1]), t = p, a = h, n = g;
|
|
37254
37266
|
},
|
|
37255
37267
|
lineEnd: function() {
|
|
37256
37268
|
a && e.lineEnd(), t = null;
|
|
@@ -37261,36 +37273,36 @@ function ss(e) {
|
|
|
37261
37273
|
};
|
|
37262
37274
|
}
|
|
37263
37275
|
function c(e, n, r) {
|
|
37264
|
-
var i =
|
|
37276
|
+
var i = Po(e), a = Po(n), o = [
|
|
37265
37277
|
1,
|
|
37266
37278
|
0,
|
|
37267
37279
|
0
|
|
37268
|
-
], s =
|
|
37280
|
+
], s = Io(i, a), c = Fo(s, s), l = s[0], u = c - l * l;
|
|
37269
37281
|
if (!u) return !r && e;
|
|
37270
|
-
var d = t * c / u, f = -t * l / u, p =
|
|
37271
|
-
|
|
37272
|
-
var h = p, g =
|
|
37282
|
+
var d = t * c / u, f = -t * l / u, p = Io(o, s), m = Ro(o, d);
|
|
37283
|
+
Lo(m, Ro(s, f));
|
|
37284
|
+
var h = p, g = Fo(m, h), _ = Fo(h, h), v = g * g - _ * (Fo(m, m) - 1);
|
|
37273
37285
|
if (!(v < 0)) {
|
|
37274
|
-
var y =
|
|
37275
|
-
if (
|
|
37286
|
+
var y = So(v), b = Ro(h, (-g - y) / _);
|
|
37287
|
+
if (Lo(b, m), b = No(b), !r) return b;
|
|
37276
37288
|
var x = e[0], S = n[0], C = e[1], w = n[1], T;
|
|
37277
37289
|
S < x && (T = x, x = S, S = T);
|
|
37278
|
-
var E = S - x, D =
|
|
37279
|
-
if (!D && w < C && (T = C, C = w, w = T), O ? D ? C + w > 0 ^ b[1] < (
|
|
37280
|
-
var k =
|
|
37281
|
-
return
|
|
37290
|
+
var E = S - x, D = po(E - oo) < ao, O = D || E < 1e-6;
|
|
37291
|
+
if (!D && w < C && (T = C, C = w, w = T), O ? D ? C + w > 0 ^ b[1] < (po(b[0] - x) < 1e-6 ? C : w) : C <= b[1] && b[1] <= w : E > oo ^ (x <= b[0] && b[0] <= S)) {
|
|
37292
|
+
var k = Ro(h, (-g + y) / _);
|
|
37293
|
+
return Lo(k, m), [b, No(k)];
|
|
37282
37294
|
}
|
|
37283
37295
|
}
|
|
37284
37296
|
}
|
|
37285
37297
|
function l(t, n) {
|
|
37286
|
-
var i = r ? e :
|
|
37298
|
+
var i = r ? e : oo - e, a = 0;
|
|
37287
37299
|
return t < -i ? a |= 1 : t > i && (a |= 2), n < -i ? a |= 4 : n > i && (a |= 8), a;
|
|
37288
37300
|
}
|
|
37289
|
-
return
|
|
37301
|
+
return ns(o, s, a, r ? [0, -e] : [-oo, e - oo]);
|
|
37290
37302
|
}
|
|
37291
37303
|
//#endregion
|
|
37292
37304
|
//#region node_modules/d3-geo/src/clip/line.js
|
|
37293
|
-
function
|
|
37305
|
+
function us(e, t, n, r, i, a) {
|
|
37294
37306
|
var o = e[0], s = e[1], c = t[0], l = t[1], u = 0, d = 1, f = c - o, p = l - s, m = n - o;
|
|
37295
37307
|
if (!(!f && m > 0)) {
|
|
37296
37308
|
if (m /= f, f < 0) {
|
|
@@ -37332,8 +37344,8 @@ function cs(e, t, n, r, i, a) {
|
|
|
37332
37344
|
}
|
|
37333
37345
|
//#endregion
|
|
37334
37346
|
//#region node_modules/d3-geo/src/clip/rectangle.js
|
|
37335
|
-
var
|
|
37336
|
-
function
|
|
37347
|
+
var ds = 1e9, fs = -ds;
|
|
37348
|
+
function ps(e, t, n, r) {
|
|
37337
37349
|
function i(i, a) {
|
|
37338
37350
|
return e <= i && i <= n && t <= a && a <= r;
|
|
37339
37351
|
}
|
|
@@ -37345,7 +37357,7 @@ function ds(e, t, n, r) {
|
|
|
37345
37357
|
else l.point(a[0], a[1]);
|
|
37346
37358
|
}
|
|
37347
37359
|
function o(r, i) {
|
|
37348
|
-
return
|
|
37360
|
+
return po(r[0] - e) < 1e-6 ? i > 0 ? 0 : 3 : po(r[0] - n) < 1e-6 ? i > 0 ? 2 : 1 : po(r[1] - t) < 1e-6 ? i > 0 ? 1 : 0 : i > 0 ? 3 : 2;
|
|
37349
37361
|
}
|
|
37350
37362
|
function s(e, t) {
|
|
37351
37363
|
return c(e.x, t.x);
|
|
@@ -37355,7 +37367,7 @@ function ds(e, t, n, r) {
|
|
|
37355
37367
|
return n === r ? n === 0 ? t[1] - e[1] : n === 1 ? e[0] - t[0] : n === 2 ? e[1] - t[1] : t[0] - e[0] : n - r;
|
|
37356
37368
|
}
|
|
37357
37369
|
return function(o) {
|
|
37358
|
-
var c = o, l =
|
|
37370
|
+
var c = o, l = Yo(), u, d, f, p, m, h, g, _, v, y, b, x = {
|
|
37359
37371
|
point: S,
|
|
37360
37372
|
lineStart: E,
|
|
37361
37373
|
lineEnd: D,
|
|
@@ -37374,7 +37386,7 @@ function ds(e, t, n, r) {
|
|
|
37374
37386
|
}
|
|
37375
37387
|
function T() {
|
|
37376
37388
|
var e = C(), t = b && e, n = (u = Wt(u)).length;
|
|
37377
|
-
(t || n) && (o.polygonStart(), t && (o.lineStart(), a(null, null, 1, o), o.lineEnd()), n &&
|
|
37389
|
+
(t || n) && (o.polygonStart(), t && (o.lineStart(), a(null, null, 1, o), o.lineEnd()), n && Qo(u, s, e, a, o), o.polygonEnd()), c = o, u = d = f = null;
|
|
37378
37390
|
}
|
|
37379
37391
|
function E() {
|
|
37380
37392
|
x.point = O, d && d.push(f = []), y = !0, v = !1, g = _ = NaN;
|
|
@@ -37387,8 +37399,8 @@ function ds(e, t, n, r) {
|
|
|
37387
37399
|
if (d && f.push([a, o]), y) p = a, m = o, h = s, y = !1, s && (c.lineStart(), c.point(a, o));
|
|
37388
37400
|
else if (s && v) c.point(a, o);
|
|
37389
37401
|
else {
|
|
37390
|
-
var l = [g = Math.max(
|
|
37391
|
-
|
|
37402
|
+
var l = [g = Math.max(fs, Math.min(ds, g)), _ = Math.max(fs, Math.min(ds, _))], u = [a = Math.max(fs, Math.min(ds, a)), o = Math.max(fs, Math.min(ds, o))];
|
|
37403
|
+
us(l, u, e, t, n, r) ? (v || (c.lineStart(), c.point(l[0], l[1])), c.point(u[0], u[1]), s || c.lineEnd(), b = !1) : s && (c.lineStart(), c.point(a, o), b = !1);
|
|
37392
37404
|
}
|
|
37393
37405
|
g = a, _ = o, v = s;
|
|
37394
37406
|
}
|
|
@@ -37397,23 +37409,23 @@ function ds(e, t, n, r) {
|
|
|
37397
37409
|
}
|
|
37398
37410
|
//#endregion
|
|
37399
37411
|
//#region node_modules/d3-geo/src/graticule.js
|
|
37400
|
-
function
|
|
37401
|
-
var r = Gt(e, t -
|
|
37412
|
+
function ms(e, t, n) {
|
|
37413
|
+
var r = Gt(e, t - ao, n).concat(t);
|
|
37402
37414
|
return function(e) {
|
|
37403
37415
|
return r.map(function(t) {
|
|
37404
37416
|
return [e, t];
|
|
37405
37417
|
});
|
|
37406
37418
|
};
|
|
37407
37419
|
}
|
|
37408
|
-
function
|
|
37409
|
-
var r = Gt(e, t -
|
|
37420
|
+
function hs(e, t, n) {
|
|
37421
|
+
var r = Gt(e, t - ao, n).concat(t);
|
|
37410
37422
|
return function(e) {
|
|
37411
37423
|
return r.map(function(t) {
|
|
37412
37424
|
return [t, e];
|
|
37413
37425
|
});
|
|
37414
37426
|
};
|
|
37415
37427
|
}
|
|
37416
|
-
function
|
|
37428
|
+
function gs() {
|
|
37417
37429
|
var e, t, n, r, i, a, o, s, c = 10, l = c, u = 90, d = 360, f, p, m, h, g = 2.5;
|
|
37418
37430
|
function _() {
|
|
37419
37431
|
return {
|
|
@@ -37422,10 +37434,10 @@ function ms() {
|
|
|
37422
37434
|
};
|
|
37423
37435
|
}
|
|
37424
37436
|
function v() {
|
|
37425
|
-
return Gt(
|
|
37426
|
-
return
|
|
37427
|
-
}).map(f)).concat(Gt(
|
|
37428
|
-
return
|
|
37437
|
+
return Gt(_o(r / u) * u, n, u).map(m).concat(Gt(_o(s / d) * d, o, d).map(h)).concat(Gt(_o(t / c) * c, e, c).filter(function(e) {
|
|
37438
|
+
return po(e % u) > ao;
|
|
37439
|
+
}).map(f)).concat(Gt(_o(a / l) * l, i, l).filter(function(e) {
|
|
37440
|
+
return po(e % d) > ao;
|
|
37429
37441
|
}).map(p));
|
|
37430
37442
|
}
|
|
37431
37443
|
return _.lines = function() {
|
|
@@ -37453,106 +37465,106 @@ function ms() {
|
|
|
37453
37465
|
}, _.stepMinor = function(e) {
|
|
37454
37466
|
return arguments.length ? (c = +e[0], l = +e[1], _) : [c, l];
|
|
37455
37467
|
}, _.precision = function(c) {
|
|
37456
|
-
return arguments.length ? (g = +c, f =
|
|
37457
|
-
}, _.extentMajor([[-180, -90 +
|
|
37468
|
+
return arguments.length ? (g = +c, f = ms(a, i, 90), p = hs(t, e, g), m = ms(s, o, 90), h = hs(r, n, g), _) : g;
|
|
37469
|
+
}, _.extentMajor([[-180, -90 + ao], [180, 90 - ao]]).extentMinor([[-180, -80 - ao], [180, 80 + ao]]);
|
|
37458
37470
|
}
|
|
37459
37471
|
//#endregion
|
|
37460
37472
|
//#region node_modules/d3-geo/src/identity.js
|
|
37461
|
-
var
|
|
37462
|
-
point:
|
|
37463
|
-
lineStart:
|
|
37464
|
-
lineEnd:
|
|
37473
|
+
var _s = (e) => e, vs = new U(), ys = new U(), bs, xs, Ss, Cs, ws = {
|
|
37474
|
+
point: Eo,
|
|
37475
|
+
lineStart: Eo,
|
|
37476
|
+
lineEnd: Eo,
|
|
37465
37477
|
polygonStart: function() {
|
|
37466
|
-
|
|
37478
|
+
ws.lineStart = Ts, ws.lineEnd = Os;
|
|
37467
37479
|
},
|
|
37468
37480
|
polygonEnd: function() {
|
|
37469
|
-
|
|
37481
|
+
ws.lineStart = ws.lineEnd = ws.point = Eo, vs.add(po(ys)), ys = new U();
|
|
37470
37482
|
},
|
|
37471
37483
|
result: function() {
|
|
37472
|
-
var e =
|
|
37473
|
-
return
|
|
37484
|
+
var e = vs / 2;
|
|
37485
|
+
return vs = new U(), e;
|
|
37474
37486
|
}
|
|
37475
37487
|
};
|
|
37476
|
-
function
|
|
37477
|
-
|
|
37488
|
+
function Ts() {
|
|
37489
|
+
ws.point = Es;
|
|
37478
37490
|
}
|
|
37479
|
-
function
|
|
37480
|
-
|
|
37491
|
+
function Es(e, t) {
|
|
37492
|
+
ws.point = Ds, bs = Ss = e, xs = Cs = t;
|
|
37481
37493
|
}
|
|
37482
|
-
function
|
|
37483
|
-
|
|
37494
|
+
function Ds(e, t) {
|
|
37495
|
+
ys.add(Cs * e - Ss * t), Ss = e, Cs = t;
|
|
37484
37496
|
}
|
|
37485
|
-
function
|
|
37486
|
-
|
|
37497
|
+
function Os() {
|
|
37498
|
+
Ds(bs, xs);
|
|
37487
37499
|
}
|
|
37488
37500
|
//#endregion
|
|
37489
37501
|
//#region node_modules/d3-geo/src/path/bounds.js
|
|
37490
|
-
var
|
|
37491
|
-
point:
|
|
37492
|
-
lineStart:
|
|
37493
|
-
lineEnd:
|
|
37494
|
-
polygonStart:
|
|
37495
|
-
polygonEnd:
|
|
37502
|
+
var ks = Infinity, As = ks, js = -ks, Ms = js, Ns = {
|
|
37503
|
+
point: Ps,
|
|
37504
|
+
lineStart: Eo,
|
|
37505
|
+
lineEnd: Eo,
|
|
37506
|
+
polygonStart: Eo,
|
|
37507
|
+
polygonEnd: Eo,
|
|
37496
37508
|
result: function() {
|
|
37497
|
-
var e = [[
|
|
37498
|
-
return
|
|
37509
|
+
var e = [[ks, As], [js, Ms]];
|
|
37510
|
+
return js = Ms = -(As = ks = Infinity), e;
|
|
37499
37511
|
}
|
|
37500
37512
|
};
|
|
37501
|
-
function
|
|
37502
|
-
e <
|
|
37513
|
+
function Ps(e, t) {
|
|
37514
|
+
e < ks && (ks = e), e > js && (js = e), t < As && (As = t), t > Ms && (Ms = t);
|
|
37503
37515
|
}
|
|
37504
37516
|
//#endregion
|
|
37505
37517
|
//#region node_modules/d3-geo/src/path/centroid.js
|
|
37506
|
-
var
|
|
37507
|
-
point:
|
|
37508
|
-
lineStart:
|
|
37509
|
-
lineEnd:
|
|
37518
|
+
var Fs = 0, Is = 0, Ls = 0, Rs = 0, zs = 0, Bs = 0, Vs = 0, Hs = 0, Us = 0, Ws, Gs, Ks, qs, Js = {
|
|
37519
|
+
point: Ys,
|
|
37520
|
+
lineStart: Xs,
|
|
37521
|
+
lineEnd: $s,
|
|
37510
37522
|
polygonStart: function() {
|
|
37511
|
-
|
|
37523
|
+
Js.lineStart = ec, Js.lineEnd = tc;
|
|
37512
37524
|
},
|
|
37513
37525
|
polygonEnd: function() {
|
|
37514
|
-
|
|
37526
|
+
Js.point = Ys, Js.lineStart = Xs, Js.lineEnd = $s;
|
|
37515
37527
|
},
|
|
37516
37528
|
result: function() {
|
|
37517
|
-
var e =
|
|
37518
|
-
return
|
|
37529
|
+
var e = Us ? [Vs / Us, Hs / Us] : Bs ? [Rs / Bs, zs / Bs] : Ls ? [Fs / Ls, Is / Ls] : [NaN, NaN];
|
|
37530
|
+
return Fs = Is = Ls = Rs = zs = Bs = Vs = Hs = Us = 0, e;
|
|
37519
37531
|
}
|
|
37520
37532
|
};
|
|
37521
|
-
function qs(e, t) {
|
|
37522
|
-
Ns += e, Ps += t, ++Fs;
|
|
37523
|
-
}
|
|
37524
|
-
function Js() {
|
|
37525
|
-
Ks.point = Ys;
|
|
37526
|
-
}
|
|
37527
37533
|
function Ys(e, t) {
|
|
37528
|
-
|
|
37534
|
+
Fs += e, Is += t, ++Ls;
|
|
37529
37535
|
}
|
|
37530
|
-
function Xs(
|
|
37531
|
-
|
|
37532
|
-
Is += i * (Ws + e) / 2, Ls += i * (Gs + t) / 2, Rs += i, qs(Ws = e, Gs = t);
|
|
37536
|
+
function Xs() {
|
|
37537
|
+
Js.point = Zs;
|
|
37533
37538
|
}
|
|
37534
|
-
function Zs() {
|
|
37535
|
-
|
|
37539
|
+
function Zs(e, t) {
|
|
37540
|
+
Js.point = Qs, Ys(Ks = e, qs = t);
|
|
37536
37541
|
}
|
|
37537
|
-
function Qs() {
|
|
37538
|
-
Ks
|
|
37542
|
+
function Qs(e, t) {
|
|
37543
|
+
var n = e - Ks, r = t - qs, i = So(n * n + r * r);
|
|
37544
|
+
Rs += i * (Ks + e) / 2, zs += i * (qs + t) / 2, Bs += i, Ys(Ks = e, qs = t);
|
|
37539
37545
|
}
|
|
37540
37546
|
function $s() {
|
|
37541
|
-
|
|
37547
|
+
Js.point = Ys;
|
|
37548
|
+
}
|
|
37549
|
+
function ec() {
|
|
37550
|
+
Js.point = nc;
|
|
37542
37551
|
}
|
|
37543
|
-
function
|
|
37544
|
-
|
|
37552
|
+
function tc() {
|
|
37553
|
+
rc(Ws, Gs);
|
|
37545
37554
|
}
|
|
37546
|
-
function
|
|
37547
|
-
|
|
37548
|
-
|
|
37555
|
+
function nc(e, t) {
|
|
37556
|
+
Js.point = rc, Ys(Ws = Ks = e, Gs = qs = t);
|
|
37557
|
+
}
|
|
37558
|
+
function rc(e, t) {
|
|
37559
|
+
var n = e - Ks, r = t - qs, i = So(n * n + r * r);
|
|
37560
|
+
Rs += i * (Ks + e) / 2, zs += i * (qs + t) / 2, Bs += i, i = qs * e - Ks * t, Vs += i * (Ks + e), Hs += i * (qs + t), Us += i * 3, Ys(Ks = e, qs = t);
|
|
37549
37561
|
}
|
|
37550
37562
|
//#endregion
|
|
37551
37563
|
//#region node_modules/d3-geo/src/path/context.js
|
|
37552
|
-
function
|
|
37564
|
+
function ic(e) {
|
|
37553
37565
|
this._context = e;
|
|
37554
37566
|
}
|
|
37555
|
-
|
|
37567
|
+
ic.prototype = {
|
|
37556
37568
|
_radius: 4.5,
|
|
37557
37569
|
pointRadius: function(e) {
|
|
37558
37570
|
return this._radius = e, this;
|
|
@@ -37578,44 +37590,44 @@ nc.prototype = {
|
|
|
37578
37590
|
this._context.lineTo(e, t);
|
|
37579
37591
|
break;
|
|
37580
37592
|
default:
|
|
37581
|
-
this._context.moveTo(e + this._radius, t), this._context.arc(e, t, this._radius, 0,
|
|
37593
|
+
this._context.moveTo(e + this._radius, t), this._context.arc(e, t, this._radius, 0, lo);
|
|
37582
37594
|
break;
|
|
37583
37595
|
}
|
|
37584
37596
|
},
|
|
37585
|
-
result:
|
|
37597
|
+
result: Eo
|
|
37586
37598
|
};
|
|
37587
37599
|
//#endregion
|
|
37588
37600
|
//#region node_modules/d3-geo/src/path/measure.js
|
|
37589
|
-
var
|
|
37590
|
-
point:
|
|
37601
|
+
var ac = new U(), oc, sc, cc, lc, uc, dc = {
|
|
37602
|
+
point: Eo,
|
|
37591
37603
|
lineStart: function() {
|
|
37592
|
-
|
|
37604
|
+
dc.point = fc;
|
|
37593
37605
|
},
|
|
37594
37606
|
lineEnd: function() {
|
|
37595
|
-
|
|
37607
|
+
oc && pc(sc, cc), dc.point = Eo;
|
|
37596
37608
|
},
|
|
37597
37609
|
polygonStart: function() {
|
|
37598
|
-
|
|
37610
|
+
oc = !0;
|
|
37599
37611
|
},
|
|
37600
37612
|
polygonEnd: function() {
|
|
37601
|
-
|
|
37613
|
+
oc = null;
|
|
37602
37614
|
},
|
|
37603
37615
|
result: function() {
|
|
37604
|
-
var e = +
|
|
37605
|
-
return
|
|
37616
|
+
var e = +ac;
|
|
37617
|
+
return ac = new U(), e;
|
|
37606
37618
|
}
|
|
37607
37619
|
};
|
|
37608
|
-
function
|
|
37609
|
-
|
|
37620
|
+
function fc(e, t) {
|
|
37621
|
+
dc.point = pc, sc = lc = e, cc = uc = t;
|
|
37610
37622
|
}
|
|
37611
|
-
function
|
|
37612
|
-
|
|
37623
|
+
function pc(e, t) {
|
|
37624
|
+
lc -= e, uc -= t, ac.add(So(lc * lc + uc * uc)), lc = e, uc = t;
|
|
37613
37625
|
}
|
|
37614
37626
|
//#endregion
|
|
37615
37627
|
//#region node_modules/d3-geo/src/path/string.js
|
|
37616
|
-
var
|
|
37628
|
+
var mc, hc, gc, _c, vc = class {
|
|
37617
37629
|
constructor(e) {
|
|
37618
|
-
this._append = e == null ?
|
|
37630
|
+
this._append = e == null ? yc : bc(e), this._radius = 4.5, this._ = "";
|
|
37619
37631
|
}
|
|
37620
37632
|
pointRadius(e) {
|
|
37621
37633
|
return this._radius = +e, this;
|
|
@@ -37641,11 +37653,11 @@ var fc, pc, mc, hc, gc = class {
|
|
|
37641
37653
|
this._append`L${e},${t}`;
|
|
37642
37654
|
break;
|
|
37643
37655
|
default:
|
|
37644
|
-
if (this._append`M${e},${t}`, this._radius !==
|
|
37656
|
+
if (this._append`M${e},${t}`, this._radius !== gc || this._append !== hc) {
|
|
37645
37657
|
let e = this._radius, t = this._;
|
|
37646
|
-
this._ = "", this._append`m0,${e}a${e},${e} 0 1,1 0,${-2 * e}a${e},${e} 0 1,1 0,${2 * e}z`,
|
|
37658
|
+
this._ = "", this._append`m0,${e}a${e},${e} 0 1,1 0,${-2 * e}a${e},${e} 0 1,1 0,${2 * e}z`, gc = e, hc = this._append, _c = this._, this._ = t;
|
|
37647
37659
|
}
|
|
37648
|
-
this._ +=
|
|
37660
|
+
this._ += _c;
|
|
37649
37661
|
break;
|
|
37650
37662
|
}
|
|
37651
37663
|
}
|
|
@@ -37654,44 +37666,44 @@ var fc, pc, mc, hc, gc = class {
|
|
|
37654
37666
|
return this._ = "", e.length ? e : null;
|
|
37655
37667
|
}
|
|
37656
37668
|
};
|
|
37657
|
-
function
|
|
37669
|
+
function yc(e) {
|
|
37658
37670
|
let t = 1;
|
|
37659
37671
|
this._ += e[0];
|
|
37660
37672
|
for (let n = e.length; t < n; ++t) this._ += arguments[t] + e[t];
|
|
37661
37673
|
}
|
|
37662
|
-
function
|
|
37674
|
+
function bc(e) {
|
|
37663
37675
|
let t = Math.floor(e);
|
|
37664
37676
|
if (!(t >= 0)) throw RangeError(`invalid digits: ${e}`);
|
|
37665
|
-
if (t > 15) return
|
|
37666
|
-
if (t !==
|
|
37677
|
+
if (t > 15) return yc;
|
|
37678
|
+
if (t !== mc) {
|
|
37667
37679
|
let e = 10 ** t;
|
|
37668
|
-
|
|
37680
|
+
mc = t, hc = function(t) {
|
|
37669
37681
|
let n = 1;
|
|
37670
37682
|
this._ += t[0];
|
|
37671
37683
|
for (let r = t.length; n < r; ++n) this._ += Math.round(arguments[n] * e) / e + t[n];
|
|
37672
37684
|
};
|
|
37673
37685
|
}
|
|
37674
|
-
return
|
|
37686
|
+
return hc;
|
|
37675
37687
|
}
|
|
37676
37688
|
//#endregion
|
|
37677
37689
|
//#region node_modules/d3-geo/src/path/index.js
|
|
37678
|
-
function
|
|
37690
|
+
function xc(e, t) {
|
|
37679
37691
|
let n = 3, r = 4.5, i, a;
|
|
37680
37692
|
function o(e) {
|
|
37681
|
-
return e && (typeof r == "function" && a.pointRadius(+r.apply(this, arguments)),
|
|
37693
|
+
return e && (typeof r == "function" && a.pointRadius(+r.apply(this, arguments)), Mo(e, i(a))), a.result();
|
|
37682
37694
|
}
|
|
37683
37695
|
return o.area = function(e) {
|
|
37684
|
-
return
|
|
37696
|
+
return Mo(e, i(ws)), ws.result();
|
|
37685
37697
|
}, o.measure = function(e) {
|
|
37686
|
-
return
|
|
37698
|
+
return Mo(e, i(dc)), dc.result();
|
|
37687
37699
|
}, o.bounds = function(e) {
|
|
37688
|
-
return
|
|
37700
|
+
return Mo(e, i(Ns)), Ns.result();
|
|
37689
37701
|
}, o.centroid = function(e) {
|
|
37690
|
-
return
|
|
37702
|
+
return Mo(e, i(Js)), Js.result();
|
|
37691
37703
|
}, o.projection = function(t) {
|
|
37692
|
-
return arguments.length ? (i = t == null ? (e = null,
|
|
37704
|
+
return arguments.length ? (i = t == null ? (e = null, _s) : (e = t).stream, o) : e;
|
|
37693
37705
|
}, o.context = function(e) {
|
|
37694
|
-
return arguments.length ? (a = e == null ? (t = null, new
|
|
37706
|
+
return arguments.length ? (a = e == null ? (t = null, new vc(n)) : new ic(t = e), typeof r != "function" && a.pointRadius(r), o) : t;
|
|
37695
37707
|
}, o.pointRadius = function(e) {
|
|
37696
37708
|
return arguments.length ? (r = typeof e == "function" ? e : (a.pointRadius(+e), +e), o) : r;
|
|
37697
37709
|
}, o.digits = function(e) {
|
|
@@ -37702,21 +37714,21 @@ function yc(e, t) {
|
|
|
37702
37714
|
if (!(t >= 0)) throw RangeError(`invalid digits: ${e}`);
|
|
37703
37715
|
n = t;
|
|
37704
37716
|
}
|
|
37705
|
-
return t === null && (a = new
|
|
37717
|
+
return t === null && (a = new vc(n)), o;
|
|
37706
37718
|
}, o.projection(e).digits(n).context(t);
|
|
37707
37719
|
}
|
|
37708
37720
|
//#endregion
|
|
37709
37721
|
//#region node_modules/d3-geo/src/transform.js
|
|
37710
|
-
function
|
|
37722
|
+
function Sc(e) {
|
|
37711
37723
|
return function(t) {
|
|
37712
|
-
var n = new
|
|
37724
|
+
var n = new Cc();
|
|
37713
37725
|
for (var r in e) n[r] = e[r];
|
|
37714
37726
|
return n.stream = t, n;
|
|
37715
37727
|
};
|
|
37716
37728
|
}
|
|
37717
|
-
function
|
|
37718
|
-
|
|
37719
|
-
constructor:
|
|
37729
|
+
function Cc() {}
|
|
37730
|
+
Cc.prototype = {
|
|
37731
|
+
constructor: Cc,
|
|
37720
37732
|
point: function(e, t) {
|
|
37721
37733
|
this.stream.point(e, t);
|
|
37722
37734
|
},
|
|
@@ -37738,48 +37750,48 @@ xc.prototype = {
|
|
|
37738
37750
|
};
|
|
37739
37751
|
//#endregion
|
|
37740
37752
|
//#region node_modules/d3-geo/src/projection/fit.js
|
|
37741
|
-
function
|
|
37753
|
+
function wc(e, t, n) {
|
|
37742
37754
|
var r = e.clipExtent && e.clipExtent();
|
|
37743
|
-
return e.scale(150).translate([0, 0]), r != null && e.clipExtent(null),
|
|
37755
|
+
return e.scale(150).translate([0, 0]), r != null && e.clipExtent(null), Mo(n, e.stream(Ns)), t(Ns.result()), r != null && e.clipExtent(r), e;
|
|
37744
37756
|
}
|
|
37745
|
-
function
|
|
37746
|
-
return
|
|
37757
|
+
function Tc(e, t, n) {
|
|
37758
|
+
return wc(e, function(n) {
|
|
37747
37759
|
var r = t[1][0] - t[0][0], i = t[1][1] - t[0][1], a = Math.min(r / (n[1][0] - n[0][0]), i / (n[1][1] - n[0][1])), o = +t[0][0] + (r - a * (n[1][0] + n[0][0])) / 2, s = +t[0][1] + (i - a * (n[1][1] + n[0][1])) / 2;
|
|
37748
37760
|
e.scale(150 * a).translate([o, s]);
|
|
37749
37761
|
}, n);
|
|
37750
37762
|
}
|
|
37751
|
-
function
|
|
37752
|
-
return
|
|
37763
|
+
function Ec(e, t, n) {
|
|
37764
|
+
return Tc(e, [[0, 0], t], n);
|
|
37753
37765
|
}
|
|
37754
|
-
function
|
|
37755
|
-
return
|
|
37766
|
+
function Dc(e, t, n) {
|
|
37767
|
+
return wc(e, function(n) {
|
|
37756
37768
|
var r = +t, i = r / (n[1][0] - n[0][0]), a = (r - i * (n[1][0] + n[0][0])) / 2, o = -i * n[0][1];
|
|
37757
37769
|
e.scale(150 * i).translate([a, o]);
|
|
37758
37770
|
}, n);
|
|
37759
37771
|
}
|
|
37760
|
-
function
|
|
37761
|
-
return
|
|
37772
|
+
function Oc(e, t, n) {
|
|
37773
|
+
return wc(e, function(n) {
|
|
37762
37774
|
var r = +t, i = r / (n[1][1] - n[0][1]), a = -i * n[0][0], o = (r - i * (n[1][1] + n[0][1])) / 2;
|
|
37763
37775
|
e.scale(150 * i).translate([a, o]);
|
|
37764
37776
|
}, n);
|
|
37765
37777
|
}
|
|
37766
37778
|
//#endregion
|
|
37767
37779
|
//#region node_modules/d3-geo/src/projection/resample.js
|
|
37768
|
-
var
|
|
37769
|
-
function
|
|
37770
|
-
return +t ?
|
|
37780
|
+
var kc = 16, Ac = go(30 * fo);
|
|
37781
|
+
function jc(e, t) {
|
|
37782
|
+
return +t ? Nc(e, t) : Mc(e);
|
|
37771
37783
|
}
|
|
37772
|
-
function
|
|
37773
|
-
return
|
|
37784
|
+
function Mc(e) {
|
|
37785
|
+
return Sc({ point: function(t, n) {
|
|
37774
37786
|
t = e(t, n), this.stream.point(t[0], t[1]);
|
|
37775
37787
|
} });
|
|
37776
37788
|
}
|
|
37777
|
-
function
|
|
37789
|
+
function Nc(e, t) {
|
|
37778
37790
|
function n(r, i, a, o, s, c, l, u, d, f, p, m, h, g) {
|
|
37779
37791
|
var _ = l - r, v = u - i, y = _ * _ + v * v;
|
|
37780
37792
|
if (y > 4 * t && h--) {
|
|
37781
|
-
var b = o + f, x = s + p, S = c + m, C =
|
|
37782
|
-
(j * j / y > t ||
|
|
37793
|
+
var b = o + f, x = s + p, S = c + m, C = So(b * b + x * x + S * S), w = To(S /= C), T = po(po(S) - 1) < 1e-6 || po(a - d) < 1e-6 ? (a + d) / 2 : ho(x, b), E = e(T, w), D = E[0], O = E[1], k = D - r, A = O - i, j = v * k - _ * A;
|
|
37794
|
+
(j * j / y > t || po((_ * k + v * A) / y - .5) > .3 || o * f + s * p + c * m < Ac) && (n(r, i, a, o, s, c, D, O, T, b /= C, x /= C, S, h, g), g.point(D, O), n(D, O, T, b, x, S, l, u, d, f, p, m, h, g));
|
|
37783
37795
|
}
|
|
37784
37796
|
}
|
|
37785
37797
|
return function(t) {
|
|
@@ -37801,8 +37813,8 @@ function jc(e, t) {
|
|
|
37801
37813
|
u = NaN, h.point = v, t.lineStart();
|
|
37802
37814
|
}
|
|
37803
37815
|
function v(r, i) {
|
|
37804
|
-
var a =
|
|
37805
|
-
n(u, d, l, f, p, m, u = o[0], d = o[1], l = r, f = a[0], p = a[1], m = a[2],
|
|
37816
|
+
var a = Po([r, i]), o = e(r, i);
|
|
37817
|
+
n(u, d, l, f, p, m, u = o[0], d = o[1], l = r, f = a[0], p = a[1], m = a[2], kc, t), t.point(u, d);
|
|
37806
37818
|
}
|
|
37807
37819
|
function y() {
|
|
37808
37820
|
h.point = g, t.lineEnd();
|
|
@@ -37814,23 +37826,23 @@ function jc(e, t) {
|
|
|
37814
37826
|
v(r = e, t), i = u, a = d, o = f, s = p, c = m, h.point = v;
|
|
37815
37827
|
}
|
|
37816
37828
|
function S() {
|
|
37817
|
-
n(u, d, l, f, p, m, i, a, r, o, s, c,
|
|
37829
|
+
n(u, d, l, f, p, m, i, a, r, o, s, c, kc, t), h.lineEnd = y, y();
|
|
37818
37830
|
}
|
|
37819
37831
|
return h;
|
|
37820
37832
|
};
|
|
37821
37833
|
}
|
|
37822
37834
|
//#endregion
|
|
37823
37835
|
//#region node_modules/d3-geo/src/projection/index.js
|
|
37824
|
-
var
|
|
37825
|
-
this.stream.point(e *
|
|
37836
|
+
var Pc = Sc({ point: function(e, t) {
|
|
37837
|
+
this.stream.point(e * fo, t * fo);
|
|
37826
37838
|
} });
|
|
37827
|
-
function
|
|
37828
|
-
return
|
|
37839
|
+
function Fc(e) {
|
|
37840
|
+
return Sc({ point: function(t, n) {
|
|
37829
37841
|
var r = e(t, n);
|
|
37830
37842
|
return this.stream.point(r[0], r[1]);
|
|
37831
37843
|
} });
|
|
37832
37844
|
}
|
|
37833
|
-
function
|
|
37845
|
+
function Ic(e, t, n, r, i) {
|
|
37834
37846
|
function a(a, o) {
|
|
37835
37847
|
return a *= r, o *= i, [t + e * a, n - e * o];
|
|
37836
37848
|
}
|
|
@@ -37838,9 +37850,9 @@ function Pc(e, t, n, r, i) {
|
|
|
37838
37850
|
return [(a - t) / e * r, (n - o) / e * i];
|
|
37839
37851
|
}, a;
|
|
37840
37852
|
}
|
|
37841
|
-
function
|
|
37842
|
-
if (!a) return
|
|
37843
|
-
var o =
|
|
37853
|
+
function Lc(e, t, n, r, i, a) {
|
|
37854
|
+
if (!a) return Ic(e, t, n, r, i);
|
|
37855
|
+
var o = go(a), s = bo(a), c = o * e, l = s * e, u = o / e, d = s / e, f = (s * n - o * t) / e, p = (s * t + o * n) / e;
|
|
37844
37856
|
function m(e, a) {
|
|
37845
37857
|
return e *= r, a *= i, [c * e - l * a + t, n - l * e - c * a];
|
|
37846
37858
|
}
|
|
@@ -37848,61 +37860,61 @@ function Fc(e, t, n, r, i, a) {
|
|
|
37848
37860
|
return [r * (u * e - d * t + f), i * (p - d * e - u * t)];
|
|
37849
37861
|
}, m;
|
|
37850
37862
|
}
|
|
37851
|
-
function
|
|
37852
|
-
return
|
|
37863
|
+
function Rc(e) {
|
|
37864
|
+
return zc(function() {
|
|
37853
37865
|
return e;
|
|
37854
37866
|
})();
|
|
37855
37867
|
}
|
|
37856
|
-
function
|
|
37857
|
-
var t, n = 150, r = 480, i = 250, a = 0, o = 0, s = 0, c = 0, l = 0, u, d = 0, f = 1, p = 1, m = null, h =
|
|
37868
|
+
function zc(e) {
|
|
37869
|
+
var t, n = 150, r = 480, i = 250, a = 0, o = 0, s = 0, c = 0, l = 0, u, d = 0, f = 1, p = 1, m = null, h = as, g = null, _, v, y, b = _s, x = .5, S, C, w, T, E;
|
|
37858
37870
|
function D(e) {
|
|
37859
|
-
return w(e[0] *
|
|
37871
|
+
return w(e[0] * fo, e[1] * fo);
|
|
37860
37872
|
}
|
|
37861
37873
|
function O(e) {
|
|
37862
|
-
return e = w.invert(e[0], e[1]), e && [e[0] *
|
|
37874
|
+
return e = w.invert(e[0], e[1]), e && [e[0] * uo, e[1] * uo];
|
|
37863
37875
|
}
|
|
37864
37876
|
D.stream = function(e) {
|
|
37865
|
-
return T && E === e ? T : T =
|
|
37877
|
+
return T && E === e ? T : T = Pc(Fc(u)(h(S(b(E = e)))));
|
|
37866
37878
|
}, D.preclip = function(e) {
|
|
37867
37879
|
return arguments.length ? (h = e, m = void 0, A()) : h;
|
|
37868
37880
|
}, D.postclip = function(e) {
|
|
37869
37881
|
return arguments.length ? (b = e, g = _ = v = y = null, A()) : b;
|
|
37870
37882
|
}, D.clipAngle = function(e) {
|
|
37871
|
-
return arguments.length ? (h = +e ?
|
|
37883
|
+
return arguments.length ? (h = +e ? ls(m = e * fo) : (m = null, as), A()) : m * uo;
|
|
37872
37884
|
}, D.clipExtent = function(e) {
|
|
37873
|
-
return arguments.length ? (b = e == null ? (g = _ = v = y = null,
|
|
37885
|
+
return arguments.length ? (b = e == null ? (g = _ = v = y = null, _s) : ps(g = +e[0][0], _ = +e[0][1], v = +e[1][0], y = +e[1][1]), A()) : g == null ? null : [[g, _], [v, y]];
|
|
37874
37886
|
}, D.scale = function(e) {
|
|
37875
37887
|
return arguments.length ? (n = +e, k()) : n;
|
|
37876
37888
|
}, D.translate = function(e) {
|
|
37877
37889
|
return arguments.length ? (r = +e[0], i = +e[1], k()) : [r, i];
|
|
37878
37890
|
}, D.center = function(e) {
|
|
37879
|
-
return arguments.length ? (a = e[0] % 360 *
|
|
37891
|
+
return arguments.length ? (a = e[0] % 360 * fo, o = e[1] % 360 * fo, k()) : [a * uo, o * uo];
|
|
37880
37892
|
}, D.rotate = function(e) {
|
|
37881
|
-
return arguments.length ? (s = e[0] % 360 *
|
|
37882
|
-
s *
|
|
37883
|
-
c *
|
|
37884
|
-
l *
|
|
37893
|
+
return arguments.length ? (s = e[0] % 360 * fo, c = e[1] % 360 * fo, l = e.length > 2 ? e[2] % 360 * fo : 0, k()) : [
|
|
37894
|
+
s * uo,
|
|
37895
|
+
c * uo,
|
|
37896
|
+
l * uo
|
|
37885
37897
|
];
|
|
37886
37898
|
}, D.angle = function(e) {
|
|
37887
|
-
return arguments.length ? (d = e % 360 *
|
|
37899
|
+
return arguments.length ? (d = e % 360 * fo, k()) : d * uo;
|
|
37888
37900
|
}, D.reflectX = function(e) {
|
|
37889
37901
|
return arguments.length ? (f = e ? -1 : 1, k()) : f < 0;
|
|
37890
37902
|
}, D.reflectY = function(e) {
|
|
37891
37903
|
return arguments.length ? (p = e ? -1 : 1, k()) : p < 0;
|
|
37892
37904
|
}, D.precision = function(e) {
|
|
37893
|
-
return arguments.length ? (S =
|
|
37905
|
+
return arguments.length ? (S = jc(C, x = e * e), A()) : So(x);
|
|
37894
37906
|
}, D.fitExtent = function(e, t) {
|
|
37895
|
-
return
|
|
37907
|
+
return Tc(D, e, t);
|
|
37896
37908
|
}, D.fitSize = function(e, t) {
|
|
37897
|
-
return
|
|
37909
|
+
return Ec(D, e, t);
|
|
37898
37910
|
}, D.fitWidth = function(e, t) {
|
|
37899
|
-
return
|
|
37911
|
+
return Dc(D, e, t);
|
|
37900
37912
|
}, D.fitHeight = function(e, t) {
|
|
37901
|
-
return
|
|
37913
|
+
return Oc(D, e, t);
|
|
37902
37914
|
};
|
|
37903
37915
|
function k() {
|
|
37904
|
-
var e =
|
|
37905
|
-
return u =
|
|
37916
|
+
var e = Lc(n, 0, 0, f, p, d).apply(null, t(a, o)), m = Lc(n, r - e[0], i - e[1], f, p, d);
|
|
37917
|
+
return u = Ho(s, c, l), C = Bo(t, m), w = Bo(u, C), S = jc(C, x), A();
|
|
37906
37918
|
}
|
|
37907
37919
|
function A() {
|
|
37908
37920
|
return T = E = null, D;
|
|
@@ -37913,25 +37925,25 @@ function Lc(e) {
|
|
|
37913
37925
|
}
|
|
37914
37926
|
//#endregion
|
|
37915
37927
|
//#region node_modules/d3-geo/src/projection/azimuthal.js
|
|
37916
|
-
function
|
|
37928
|
+
function Bc(e) {
|
|
37917
37929
|
return function(t, n) {
|
|
37918
|
-
var r =
|
|
37919
|
-
return [
|
|
37930
|
+
var r = So(t * t + n * n), i = e(r), a = bo(i), o = go(i);
|
|
37931
|
+
return [ho(t * a, r * o), To(r && n * a / r)];
|
|
37920
37932
|
};
|
|
37921
37933
|
}
|
|
37922
37934
|
//#endregion
|
|
37923
37935
|
//#region node_modules/d3-geo/src/projection/mercator.js
|
|
37924
|
-
function
|
|
37925
|
-
return [e,
|
|
37936
|
+
function Vc(e, t) {
|
|
37937
|
+
return [e, yo(Co((so + t) / 2))];
|
|
37926
37938
|
}
|
|
37927
|
-
|
|
37928
|
-
return [e, 2 *
|
|
37939
|
+
Vc.invert = function(e, t) {
|
|
37940
|
+
return [e, 2 * mo(vo(t)) - so];
|
|
37929
37941
|
};
|
|
37930
|
-
function
|
|
37931
|
-
return Vc
|
|
37942
|
+
function Hc() {
|
|
37943
|
+
return Uc(Vc).scale(961 / lo);
|
|
37932
37944
|
}
|
|
37933
|
-
function
|
|
37934
|
-
var t =
|
|
37945
|
+
function Uc(e) {
|
|
37946
|
+
var t = Rc(e), n = t.center, r = t.scale, i = t.translate, a = t.clipExtent, o = null, s, c, l;
|
|
37935
37947
|
t.scale = function(e) {
|
|
37936
37948
|
return arguments.length ? (r(e), u()) : r();
|
|
37937
37949
|
}, t.translate = function(e) {
|
|
@@ -37942,27 +37954,27 @@ function Vc(e) {
|
|
|
37942
37954
|
return arguments.length ? (e == null ? o = s = c = l = null : (o = +e[0][0], s = +e[0][1], c = +e[1][0], l = +e[1][1]), u()) : o == null ? null : [[o, s], [c, l]];
|
|
37943
37955
|
};
|
|
37944
37956
|
function u() {
|
|
37945
|
-
var n =
|
|
37946
|
-
return a(o == null ? [[i[0] - n, i[1] - n], [i[0] + n, i[1] + n]] : e ===
|
|
37957
|
+
var n = oo * r(), i = t(Ko(t.rotate()).invert([0, 0]));
|
|
37958
|
+
return a(o == null ? [[i[0] - n, i[1] - n], [i[0] + n, i[1] + n]] : e === Vc ? [[Math.max(i[0] - n, o), s], [Math.min(i[0] + n, c), l]] : [[o, Math.max(i[1] - n, s)], [c, Math.min(i[1] + n, l)]]);
|
|
37947
37959
|
}
|
|
37948
37960
|
return u();
|
|
37949
37961
|
}
|
|
37950
37962
|
//#endregion
|
|
37951
37963
|
//#region node_modules/d3-geo/src/projection/orthographic.js
|
|
37952
|
-
function
|
|
37953
|
-
return [
|
|
37964
|
+
function Wc(e, t) {
|
|
37965
|
+
return [go(t) * bo(e), bo(t)];
|
|
37954
37966
|
}
|
|
37955
|
-
|
|
37956
|
-
function
|
|
37957
|
-
return
|
|
37967
|
+
Wc.invert = Bc(To);
|
|
37968
|
+
function Gc() {
|
|
37969
|
+
return Rc(Wc).scale(249.5).clipAngle(90 + ao);
|
|
37958
37970
|
}
|
|
37959
37971
|
//#endregion
|
|
37960
37972
|
//#region src/adornments/insetMap.ts
|
|
37961
|
-
var
|
|
37962
|
-
function
|
|
37973
|
+
var Kc = 100;
|
|
37974
|
+
function qc(e, t, n, r) {
|
|
37963
37975
|
let i = document.createElement("div");
|
|
37964
37976
|
i.className = "adornment";
|
|
37965
|
-
let a = e.scale ?? 1, o = a *
|
|
37977
|
+
let a = e.scale ?? 1, o = a * Kc;
|
|
37966
37978
|
i.style.width = `${o * r}px`, i.style.height = `${o * r}px`, i.style.flexGrow = "0", i.style.flexShrink = "0";
|
|
37967
37979
|
let s = {
|
|
37968
37980
|
id: e.id,
|
|
@@ -37990,33 +38002,30 @@ function Gc(e, t, n, r) {
|
|
|
37990
38002
|
globeGeoJsonRequested: !1,
|
|
37991
38003
|
globeGeoJson: void 0
|
|
37992
38004
|
};
|
|
37993
|
-
return fetch(
|
|
37994
|
-
|
|
37995
|
-
body: JSON.stringify({ status: "initializing" })
|
|
37996
|
-
}), fetch(`${n}/data/insetmaps/${e.fileName}`).then((e) => e.json()).then((e) => {
|
|
37997
|
-
s.geoJson = ta(e, Object.keys(e.objects)[0]), Kc(s);
|
|
38005
|
+
return fetch(`${n}/data/insetmaps/${e.fileName}`).then((e) => e.json()).then((e) => {
|
|
38006
|
+
s.geoJson = ra(e, Object.keys(e.objects)[0]), Jc(s);
|
|
37998
38007
|
}), t.on("moveend", () => {
|
|
37999
|
-
s.moveEndPosition = t.getCenter(), (s.isGlobe || s.globeFallbackActive) &&
|
|
38008
|
+
s.moveEndPosition = t.getCenter(), (s.isGlobe || s.globeFallbackActive) && Jc(s);
|
|
38000
38009
|
}), t.on("move", () => {
|
|
38001
38010
|
if (!s.isGlobe) {
|
|
38002
|
-
let [e, r, i, a] = s.boundingBox, o =
|
|
38011
|
+
let [e, r, i, a] = s.boundingBox, o = Zc(t), c = io(Ln([o, Fn([[
|
|
38003
38012
|
[e, r],
|
|
38004
38013
|
[e, a],
|
|
38005
38014
|
[i, a],
|
|
38006
38015
|
[i, r],
|
|
38007
38016
|
[e, r]
|
|
38008
|
-
]])])), l =
|
|
38009
|
-
s.globeFallbackActive !== u && (s.globeFallbackActive = u, s.moveEndPosition = t.getCenter(),
|
|
38010
|
-
s.globeGeoJson =
|
|
38017
|
+
]])])), l = Ji(o), u = (c ? Ji(c) : 0) < l * .75;
|
|
38018
|
+
s.globeFallbackActive !== u && (s.globeFallbackActive = u, s.moveEndPosition = t.getCenter(), Jc(s)), s.globeFallbackActive && !s.globeGeoJsonRequested && (s.globeGeoJsonRequested = !0, fetch(`${n}/data/insetmaps/world-110m.json`).then((e) => e.json()).then((e) => {
|
|
38019
|
+
s.globeGeoJson = ra(e, Object.keys(e.objects)[0]), s.moveEndPosition = t.getCenter(), Jc(s);
|
|
38011
38020
|
}));
|
|
38012
38021
|
}
|
|
38013
|
-
|
|
38022
|
+
Xc(s);
|
|
38014
38023
|
}), i;
|
|
38015
38024
|
}
|
|
38016
|
-
function
|
|
38025
|
+
function Jc(e) {
|
|
38017
38026
|
let { id: t, container: n, scale: r, backgroundColor: i, globeBackgroundColor: a, secondaryFillColor: o, secondaryStrokeColor: s, primaryFillColor: c, primaryStrokeColor: l, graticuleColor: u, borderColor: d, frameColor: f, frameOutlineColor: p, dotColor: m, dotOutlineColor: h } = e, g = e.globeFallbackActive && e.globeGeoJson !== void 0, _ = g ? e.globeGeoJson : e.geoJson, v = g || e.isGlobe;
|
|
38018
38027
|
if (_ === void 0) return;
|
|
38019
|
-
let y =
|
|
38028
|
+
let y = Kc * r, b = y / 2, x = .1 * r, S = [v ? `<circle cx="${b}" cy="${b}" r="${b}" fill="${a}"></circle>` : `<rect x="0" y="0" width="${y}" height="${y}" fill="${i}"></rect>`], { path: C } = Yc(e), w = C({
|
|
38020
38029
|
..._,
|
|
38021
38030
|
features: _.features.filter((e) => e.properties?.class !== "P1")
|
|
38022
38031
|
});
|
|
@@ -38040,7 +38049,7 @@ function Kc(e) {
|
|
|
38040
38049
|
stroke-width="${x}"
|
|
38041
38050
|
></path>
|
|
38042
38051
|
`), v) {
|
|
38043
|
-
let e = C(Ln(
|
|
38052
|
+
let e = C(Ln(gs().step([10, 10]).lines().map((e) => In(e.coordinates))));
|
|
38044
38053
|
S.push(`
|
|
38045
38054
|
<path
|
|
38046
38055
|
d="${e}"
|
|
@@ -38092,15 +38101,15 @@ function Kc(e) {
|
|
|
38092
38101
|
>
|
|
38093
38102
|
${S.join("")}
|
|
38094
38103
|
</svg>
|
|
38095
|
-
`,
|
|
38104
|
+
`, Xc(e);
|
|
38096
38105
|
}
|
|
38097
|
-
function
|
|
38098
|
-
let { scale: t, boundingBox: n, moveEndPosition: r } = e, i = e.globeFallbackActive && e.globeGeoJson !== void 0 || e.isGlobe, a =
|
|
38106
|
+
function Yc(e) {
|
|
38107
|
+
let { scale: t, boundingBox: n, moveEndPosition: r } = e, i = e.globeFallbackActive && e.globeGeoJson !== void 0 || e.isGlobe, a = Kc * t, o = xc(), s;
|
|
38099
38108
|
if (i) {
|
|
38100
38109
|
let { lng: e, lat: t } = r;
|
|
38101
|
-
s =
|
|
38110
|
+
s = Gc().scale(a / 2).translate([a / 2, a / 2]).rotate([-e, -t]).clipAngle(90);
|
|
38102
38111
|
} else {
|
|
38103
|
-
s =
|
|
38112
|
+
s = Hc().scale(1).translate([0, 0]);
|
|
38104
38113
|
let e = s([n[0], n[3]]), t = s([n[2], n[1]]), r = Math.abs(t[0] - e[0]), i = Math.abs(t[1] - e[1]), o = (e[0] + t[0]) / 2, c = (e[1] + t[1]) / 2, l = 1 / Math.max(r / a, i / a);
|
|
38105
38114
|
s.scale(l).translate([a / 2 - l * o, a / 2 - l * c]);
|
|
38106
38115
|
}
|
|
@@ -38109,10 +38118,10 @@ function qc(e) {
|
|
|
38109
38118
|
projection: s
|
|
38110
38119
|
};
|
|
38111
38120
|
}
|
|
38112
|
-
function
|
|
38121
|
+
function Xc(e) {
|
|
38113
38122
|
let { id: t, map: n, container: r, scale: i } = e, a = r.querySelector(`#frame-${t}`), o = r.querySelector(`#frame-outline-${t}`), s = r.querySelector(`#dot-${t}`);
|
|
38114
38123
|
if (!a || !o || !s) return;
|
|
38115
|
-
let c =
|
|
38124
|
+
let c = Zc(n), { path: l, projection: u } = Yc(e), d = Infinity, f = -Infinity, p = Infinity, m = -Infinity, h = Infinity, g = -Infinity;
|
|
38116
38125
|
Bn(c, (e) => {
|
|
38117
38126
|
let t = u(e);
|
|
38118
38127
|
d = Math.min(d, e[0]), f = Math.max(f, e[0]), p = Math.min(p, t[0]), m = Math.max(m, t[0]), h = Math.min(h, t[1]), g = Math.max(g, t[1]);
|
|
@@ -38128,7 +38137,7 @@ function Jc(e) {
|
|
|
38128
38137
|
a.setAttribute("d", e), o.setAttribute("d", e);
|
|
38129
38138
|
} else a.style.display = "none", o.style.display = "none", s.style.display = "none";
|
|
38130
38139
|
}
|
|
38131
|
-
function
|
|
38140
|
+
function Zc(e) {
|
|
38132
38141
|
let t = e.getCanvas().width, n = e.getCanvas().height, r = [];
|
|
38133
38142
|
for (let n = 0; n < 64; n++) {
|
|
38134
38143
|
let { lng: i, lat: a } = e.unprojectWithScaleCorrection([k(0, t, n / 64), 0]);
|
|
@@ -38158,14 +38167,14 @@ function Yc(e) {
|
|
|
38158
38167
|
}
|
|
38159
38168
|
//#endregion
|
|
38160
38169
|
//#region src/utils/scalebar.ts
|
|
38161
|
-
var
|
|
38170
|
+
var Qc = [
|
|
38162
38171
|
10,
|
|
38163
38172
|
5,
|
|
38164
38173
|
3,
|
|
38165
38174
|
2,
|
|
38166
38175
|
1
|
|
38167
38176
|
];
|
|
38168
|
-
function
|
|
38177
|
+
function $c(e, t = 1e-6) {
|
|
38169
38178
|
let n = Math.floor(e);
|
|
38170
38179
|
if (e -= n, e < t) return [n, 1];
|
|
38171
38180
|
if (1 - t < e) return [n + 1, 1];
|
|
@@ -38177,37 +38186,37 @@ function Zc(e, t = 1e-6) {
|
|
|
38177
38186
|
else return [n * c + s, c];
|
|
38178
38187
|
}
|
|
38179
38188
|
}
|
|
38180
|
-
function
|
|
38189
|
+
function el(e) {
|
|
38181
38190
|
let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
|
|
38182
|
-
for (let e of
|
|
38183
|
-
return
|
|
38191
|
+
for (let e of Qc) if (n >= e) return e * t;
|
|
38192
|
+
return tl(n) * t;
|
|
38184
38193
|
}
|
|
38185
|
-
function
|
|
38194
|
+
function tl(e) {
|
|
38186
38195
|
let t = 10 ** Math.ceil(-Math.log(e) / Math.LN10);
|
|
38187
38196
|
return Math.round(e * t) / t;
|
|
38188
38197
|
}
|
|
38189
38198
|
//#endregion
|
|
38190
38199
|
//#region src/adornments/scalebar.ts
|
|
38191
|
-
var
|
|
38200
|
+
var nl = {
|
|
38192
38201
|
kilometer: "km",
|
|
38193
38202
|
meter: "m",
|
|
38194
38203
|
mile: "mi",
|
|
38195
38204
|
foot: "ft",
|
|
38196
38205
|
nauticalMile: "nm"
|
|
38197
38206
|
};
|
|
38198
|
-
function
|
|
38207
|
+
function rl(e, t, n) {
|
|
38199
38208
|
let r = document.createElement("div");
|
|
38200
|
-
return r.className = "adornment", r.innerHTML =
|
|
38201
|
-
r.innerHTML =
|
|
38209
|
+
return r.className = "adornment", r.innerHTML = il(t, e, n), t.on("move", () => {
|
|
38210
|
+
r.innerHTML = il(t, e, n);
|
|
38202
38211
|
}), r;
|
|
38203
38212
|
}
|
|
38204
|
-
function
|
|
38205
|
-
let { maxWidth: r = 100, fontSize: i = 8, font: a = "Arial, sans-serif", color: o = "#000000", unit: s = "metric_and_imperial" } = t, c = e.getCenter(), l = e.projectWithScaleCorrection(c), u = x(c, e.unprojectWithScaleCorrection([l.x + r, l.y])), d = Object.fromEntries(Object.entries(
|
|
38206
|
-
let n = O("meter", e, u), r =
|
|
38213
|
+
function il(e, t, n) {
|
|
38214
|
+
let { maxWidth: r = 100, fontSize: i = 8, font: a = "Arial, sans-serif", color: o = "#000000", unit: s = "metric_and_imperial" } = t, c = e.getCenter(), l = e.projectWithScaleCorrection(c), u = x(c, e.unprojectWithScaleCorrection([l.x + r, l.y])), d = Object.fromEntries(Object.entries(nl).map(([e, t]) => {
|
|
38215
|
+
let n = O("meter", e, u), r = el(n) || 0;
|
|
38207
38216
|
return [e, {
|
|
38208
38217
|
value: n,
|
|
38209
38218
|
ratio: n ? r / n : 0,
|
|
38210
|
-
humanized: r < 1 ? `${
|
|
38219
|
+
humanized: r < 1 ? `${$c(r).join("/")} ${t}` : `${r} ${t}`
|
|
38211
38220
|
}];
|
|
38212
38221
|
})), f = d.meter.value > 1e3 ? d.kilometer : d.meter, p = d.foot.value > 5280 ? d.mile : d.foot, m = {
|
|
38213
38222
|
imperial: p,
|
|
@@ -38355,14 +38364,14 @@ function nl(e, t, n) {
|
|
|
38355
38364
|
}
|
|
38356
38365
|
//#endregion
|
|
38357
38366
|
//#region src/adornments/heading.ts
|
|
38358
|
-
function
|
|
38367
|
+
function al(e, t, n, r) {
|
|
38359
38368
|
let i = document.createElement("div");
|
|
38360
38369
|
i.className = "adornment";
|
|
38361
38370
|
let a = "ArialMT", o = [e.titleFont ?? a, e.subtitleFont ?? a];
|
|
38362
|
-
return
|
|
38371
|
+
return Er(Array.from(new Set(o)), t, n).then(() => i.innerHTML = ol(e, a, r)), i;
|
|
38363
38372
|
}
|
|
38364
|
-
function
|
|
38365
|
-
let { title: r, titleColor: i = "#000000", titleFont: a = t, titleFontSize: o = 20, titleJustify: s = "center", subtitle: c, subtitleColor: l = "#000000", subtitleFont: u = t, subtitleFontSize: d = 12, subtitleJustify: f = "center", background: p = "#ffffff", showBackground: m = !1 } = e, h = 0, g = 0, _ = 0, v = 0, y = 0, b = r.trim().length > 0 ?
|
|
38373
|
+
function ol(e, t, n) {
|
|
38374
|
+
let { title: r, titleColor: i = "#000000", titleFont: a = t, titleFontSize: o = 20, titleJustify: s = "center", subtitle: c, subtitleColor: l = "#000000", subtitleFont: u = t, subtitleFontSize: d = 12, subtitleJustify: f = "center", background: p = "#ffffff", showBackground: m = !1 } = e, h = 0, g = 0, _ = 0, v = 0, y = 0, b = r.trim().length > 0 ? Hr([r], a, o) : null, x = c.trim().length > 0 ? Hr([c], u, d) : null;
|
|
38366
38375
|
if (h = Math.max(b?.width ?? 0, x?.width ?? 0), b) {
|
|
38367
38376
|
let { ascent: e, descent: t } = b;
|
|
38368
38377
|
g = e + t, v = 8 + e;
|
|
@@ -38374,13 +38383,13 @@ function il(e, t, n) {
|
|
|
38374
38383
|
let S = h + 16, C = g + _ + 16, w = s === "center" ? S / 2 : s === "right" ? S - 8 : 8, T = f === "center" ? S / 2 : f === "right" ? S - 8 : 8, E = "";
|
|
38375
38384
|
if (E += `<svg class="adornment-svg" xmlns="http://www.w3.org/2000/svg" width="${S * n}" height="${C * n}" viewBox="0 0 ${S} ${C}">`, E += `<rect x="0" y="0" width="${S}" height="${C}" fill="${p}" rx="6" style="visibility:${m ? "visible" : "hidden"}" />`, b || x) {
|
|
38376
38385
|
let e = s === "center" ? "middle" : s === "right" ? "end" : "start", t = f === "center" ? "middle" : f === "right" ? "end" : "start";
|
|
38377
|
-
E += `<text x="${w}" y="${v}" fill="${i}" font-family="${a}" font-size="${o}" text-anchor="${e}">`, b && (E += `${
|
|
38386
|
+
E += `<text x="${w}" y="${v}" fill="${i}" font-family="${a}" font-size="${o}" text-anchor="${e}">`, b && (E += `${Tr(r)}`), x && (E += `<tspan x="${T}" y="${y}" fill="${l}" font-family="${u}" font-size="${d}" text-anchor="${t}">`, E += `${Tr(c)}`, E += "</tspan>"), E += "</text>";
|
|
38378
38387
|
}
|
|
38379
38388
|
return E += "</svg>", E;
|
|
38380
38389
|
}
|
|
38381
38390
|
//#endregion
|
|
38382
38391
|
//#region src/renderAdornments.ts
|
|
38383
|
-
var
|
|
38392
|
+
var sl = [
|
|
38384
38393
|
"top_left",
|
|
38385
38394
|
"top_right",
|
|
38386
38395
|
"bottom_left",
|
|
@@ -38389,35 +38398,35 @@ var al = [
|
|
|
38389
38398
|
"left_center",
|
|
38390
38399
|
"right_center",
|
|
38391
38400
|
"bottom_center"
|
|
38392
|
-
],
|
|
38393
|
-
function
|
|
38401
|
+
], cl = /* @__PURE__ */ new Map();
|
|
38402
|
+
function ll(e, t, n, r, i, a, o, s, c) {
|
|
38394
38403
|
let { adornments: l = [] } = e;
|
|
38395
|
-
|
|
38396
|
-
t.type === "custom" ?
|
|
38397
|
-
}),
|
|
38404
|
+
ul(n, t, s, c), l.forEach((t) => {
|
|
38405
|
+
t.type === "custom" ? fl(F(t, s), t.position, t.stacking) : t.type === "scalebar" ? fl(rl(t, n, s), t.position, t.stacking) : t.type === "northArrow" ? fl(ui(t, n, s), t.position, t.stacking) : t.type === "webControls" && t.buttons ? fl(Hi(t, n, r), t.position, t.stacking) : t.type === "insetMap" ? fl(qc(t, n, a, s), t.position, t.stacking) : t.type === "heading" ? fl(al(t, i, o, s), t.position, t.stacking) : t.type === "manualLegend" ? fl(li(t, i, o, s), t.position, t.stacking) : t.type === "connectedLegend" ? fl(ti(t, e, n, i, o, s), t.position, t.stacking) : t.type === "copyright" && c === "video" && fl(Wi(t, n, s), t.position, t.stacking);
|
|
38406
|
+
}), pl(n), n.on("moveend", () => pl(n));
|
|
38398
38407
|
}
|
|
38399
|
-
function
|
|
38408
|
+
function ul(e, t, n, r) {
|
|
38400
38409
|
let i = e.getContainer();
|
|
38401
|
-
for (let e of
|
|
38410
|
+
for (let e of sl) {
|
|
38402
38411
|
let a = document.createElement("div");
|
|
38403
|
-
a.classList.add("adornment-container", e), a.style.cssText =
|
|
38412
|
+
a.classList.add("adornment-container", e), a.style.cssText = dl(e, t[e], n, r);
|
|
38404
38413
|
let o = document.createElement("div"), s = document.createElement("div");
|
|
38405
|
-
o.classList.add("inner"), s.classList.add("inner", "vertical"), a.append(o, s), i.appendChild(a),
|
|
38414
|
+
o.classList.add("inner"), s.classList.add("inner", "vertical"), a.append(o, s), i.appendChild(a), cl.set(e, {
|
|
38406
38415
|
horizontal: o,
|
|
38407
38416
|
vertical: s
|
|
38408
38417
|
});
|
|
38409
38418
|
}
|
|
38410
38419
|
}
|
|
38411
|
-
function
|
|
38420
|
+
function dl(e, t, n, r) {
|
|
38412
38421
|
let i = _[e], a = "", o = [], s = t.x * n, c = t.y * n, { unit: l } = t;
|
|
38413
38422
|
return i.x === "center" ? o.push(`translateX(${s}${l})`) : a += `${i.x}: ${s}${l};`, i.y === "center" ? o.push(`translateY(${c}${l})`) : e === "bottom_right" && r !== "video" ? a += `${i.y}: max(${c}${l}, 25px);` : a += `${i.y}: ${c}${l};`, o.length && (a += `transform: ${o.join(" ")};`), a;
|
|
38414
38423
|
}
|
|
38415
|
-
function
|
|
38424
|
+
function fl(e, t, n) {
|
|
38416
38425
|
n ||= ["left_center", "right_center"].includes(t) ? "vertical" : "horizontal";
|
|
38417
|
-
let r =
|
|
38426
|
+
let r = cl.get(t), i = t === "left_center" || t === "right_center" ? "vertical" : "horizontal";
|
|
38418
38427
|
r?.[i].hasChildNodes() || (n = i), (r?.[n])?.appendChild(e);
|
|
38419
38428
|
}
|
|
38420
|
-
function
|
|
38429
|
+
function pl(e) {
|
|
38421
38430
|
let t = Array.from(document.querySelectorAll(".adornment, .maplibregl-ctrl-attrib")), n = [];
|
|
38422
38431
|
t.forEach((e) => {
|
|
38423
38432
|
let t = e.getBoundingClientRect();
|
|
@@ -38431,12 +38440,12 @@ function dl(e) {
|
|
|
38431
38440
|
}
|
|
38432
38441
|
//#endregion
|
|
38433
38442
|
//#region src/models/polygon.ts
|
|
38434
|
-
function
|
|
38443
|
+
function ml(e, t, n, r, i) {
|
|
38435
38444
|
e.addSource(t.id, {
|
|
38436
38445
|
type: "geojson",
|
|
38437
38446
|
data: {
|
|
38438
38447
|
type: "FeatureCollection",
|
|
38439
|
-
features: t.models.filter((e) => e.visible ?? !0).map((e) =>
|
|
38448
|
+
features: t.models.filter((e) => e.visible ?? !0).map((e) => hl(t, e, r, i))
|
|
38440
38449
|
}
|
|
38441
38450
|
}), e.addLayer({
|
|
38442
38451
|
id: t.id,
|
|
@@ -38497,15 +38506,15 @@ function fl(e, t, n, r, i) {
|
|
|
38497
38506
|
}
|
|
38498
38507
|
}, n);
|
|
38499
38508
|
}
|
|
38500
|
-
function
|
|
38509
|
+
function hl(e, t, n, r) {
|
|
38501
38510
|
let i = t.fillPattern === void 0 ? void 0 : r.getMapLibreImageKey(n[t.fillPattern], 2 * window.devicePixelRatio);
|
|
38502
38511
|
return {
|
|
38503
38512
|
type: "Feature",
|
|
38504
38513
|
id: S(t.id),
|
|
38505
38514
|
properties: {
|
|
38506
38515
|
id: t.id,
|
|
38507
|
-
"fill-color": e.fillColor || t.fillColor ?
|
|
38508
|
-
"outline-color": e.outlineColor || t.outlineColor ?
|
|
38516
|
+
"fill-color": e.fillColor || t.fillColor ? Ur(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000",
|
|
38517
|
+
"outline-color": e.outlineColor || t.outlineColor ? Ur(t.dataBindings ?? {}, t.outlineColor, e.outlineColor) : "#000000",
|
|
38509
38518
|
"outline-width": t.outlineWidth ?? 0,
|
|
38510
38519
|
"fill-pattern": i
|
|
38511
38520
|
},
|
|
@@ -38517,12 +38526,12 @@ function pl(e, t, n, r) {
|
|
|
38517
38526
|
}
|
|
38518
38527
|
//#endregion
|
|
38519
38528
|
//#region src/models/circle.ts
|
|
38520
|
-
function
|
|
38529
|
+
function gl(e, t, n, r, i) {
|
|
38521
38530
|
e.addSource(t.id, {
|
|
38522
38531
|
type: "geojson",
|
|
38523
38532
|
data: {
|
|
38524
38533
|
type: "FeatureCollection",
|
|
38525
|
-
features: t.models.filter((e) => e.visible ?? !0).map((e) =>
|
|
38534
|
+
features: t.models.filter((e) => e.visible ?? !0).map((e) => _l(t, e, 1, r, i))
|
|
38526
38535
|
}
|
|
38527
38536
|
}), e.addLayer({
|
|
38528
38537
|
id: t.id,
|
|
@@ -38620,19 +38629,19 @@ function ml(e, t, n, r, i) {
|
|
|
38620
38629
|
}
|
|
38621
38630
|
}, n);
|
|
38622
38631
|
}
|
|
38623
|
-
function
|
|
38632
|
+
function _l(e, t, n, r, i) {
|
|
38624
38633
|
let a = t.fillPattern === void 0 ? void 0 : i.getMapLibreImageKey(r[t.fillPattern], 2 * window.devicePixelRatio);
|
|
38625
38634
|
return {
|
|
38626
38635
|
type: "Feature",
|
|
38627
38636
|
id: S(t.id),
|
|
38628
38637
|
properties: {
|
|
38629
38638
|
id: t.id,
|
|
38630
|
-
"fill-color": e.fillColor || t.fillColor ?
|
|
38631
|
-
"outline-color": e.outlineColor || t.outlineColor ?
|
|
38639
|
+
"fill-color": e.fillColor || t.fillColor ? Ur(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000",
|
|
38640
|
+
"outline-color": e.outlineColor || t.outlineColor ? Ur(t.dataBindings ?? {}, t.outlineColor, e.outlineColor) : "#000000",
|
|
38632
38641
|
"outline-width": t.outlineWidth ?? 0,
|
|
38633
38642
|
"fill-pattern": a,
|
|
38634
38643
|
"radius-line-enabled": t.radiusLineEnabled ?? !1,
|
|
38635
|
-
"radius-line-color": e.radiusLineColor || t.radiusLineColor ?
|
|
38644
|
+
"radius-line-color": e.radiusLineColor || t.radiusLineColor ? Ur(t.dataBindings ?? {}, t.radiusLineColor, e.radiusLineColor) : "#000000",
|
|
38636
38645
|
"radius-line-width": t.radiusLineWidth ?? 0
|
|
38637
38646
|
},
|
|
38638
38647
|
geometry: {
|
|
@@ -38649,13 +38658,13 @@ function hl(e, t, n, r, i) {
|
|
|
38649
38658
|
}
|
|
38650
38659
|
//#endregion
|
|
38651
38660
|
//#region src/models/marker.ts
|
|
38652
|
-
var
|
|
38653
|
-
function
|
|
38661
|
+
var vl = "Roboto-Regular";
|
|
38662
|
+
function yl(e, t, n, r, i) {
|
|
38654
38663
|
let a = [], o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), c = ["match", ["get", "text-font"]], l = !!t.clustering;
|
|
38655
|
-
for (let e of t.models) (e.visible ?? !0) && a.push(
|
|
38664
|
+
for (let e of t.models) (e.visible ?? !0) && a.push(xl(t, e, 1, r, i)), o.add(e.textFont), s.add(e.textLineHeight ?? 1.2);
|
|
38656
38665
|
if (Array.from(o).length > 0) {
|
|
38657
|
-
for (let e of Array.from(o)) c.push(e, ["literal", [e,
|
|
38658
|
-
c.push(["literal", [
|
|
38666
|
+
for (let e of Array.from(o)) c.push(e, ["literal", [e, vl]]);
|
|
38667
|
+
c.push(["literal", [vl]]);
|
|
38659
38668
|
}
|
|
38660
38669
|
e.addSource(t.id, {
|
|
38661
38670
|
type: "geojson",
|
|
@@ -38751,7 +38760,7 @@ function _l(e, t, n, r, i) {
|
|
|
38751
38760
|
stops: t.clusterTextColor ?? []
|
|
38752
38761
|
} },
|
|
38753
38762
|
layout: {
|
|
38754
|
-
"text-font": ["literal", [
|
|
38763
|
+
"text-font": ["literal", [vl]],
|
|
38755
38764
|
"text-field": "{point_count_abbreviated}",
|
|
38756
38765
|
"text-size": {
|
|
38757
38766
|
property: "point_count",
|
|
@@ -38759,9 +38768,9 @@ function _l(e, t, n, r, i) {
|
|
|
38759
38768
|
stops: t.clusterTextSize ?? []
|
|
38760
38769
|
}
|
|
38761
38770
|
}
|
|
38762
|
-
}),
|
|
38771
|
+
}), bl(e, t));
|
|
38763
38772
|
}
|
|
38764
|
-
function
|
|
38773
|
+
function bl(e, t) {
|
|
38765
38774
|
e.on("click", `${t.id}-circle-cluster`, async (t) => {
|
|
38766
38775
|
let n = e.queryRenderedFeatures(t.point).find((e) => e.properties.cluster);
|
|
38767
38776
|
if (!n) return;
|
|
@@ -38774,8 +38783,8 @@ function vl(e, t) {
|
|
|
38774
38783
|
});
|
|
38775
38784
|
});
|
|
38776
38785
|
}
|
|
38777
|
-
function
|
|
38778
|
-
let a = t.svg === void 0 ? void 0 : i.getMapLibreImageKey(
|
|
38786
|
+
function xl(e, t, n, r, i) {
|
|
38787
|
+
let a = t.svg === void 0 ? void 0 : i.getMapLibreImageKey(Gr(t.dataBindings ?? {}, r[t.svg], e.svg ? r[e.svg] : void 0), window.devicePixelRatio * (t.iconScale ?? 1));
|
|
38779
38788
|
return {
|
|
38780
38789
|
type: "Feature",
|
|
38781
38790
|
id: S(t.id),
|
|
@@ -38786,15 +38795,15 @@ function yl(e, t, n, r, i) {
|
|
|
38786
38795
|
"icon-rotate": t.iconRotation ?? 0,
|
|
38787
38796
|
"icon-offset": t.iconOffset ?? [0, 0],
|
|
38788
38797
|
"icon-size": (t.iconScale ?? 1) * n,
|
|
38789
|
-
text: e.text || t.text ?
|
|
38798
|
+
text: e.text || t.text ? Wr(t.dataBindings ?? {}, t.text, e.text) : void 0,
|
|
38790
38799
|
"text-anchor": t.textAnchor ?? "center",
|
|
38791
38800
|
"text-font": t.textFont,
|
|
38792
38801
|
"text-offset": [(t.textOffset?.[0] ?? 0) / (t.textSize ?? 16), (t.textOffset?.[1] ?? 0) / (t.textSize ?? 16)],
|
|
38793
38802
|
"text-rotate": t.textRotation ?? 0,
|
|
38794
38803
|
"text-max-width": t.textMaxWidth ?? 10,
|
|
38795
38804
|
"text-size": (t.textSize ?? 16) * n,
|
|
38796
|
-
"text-color": e.textColor || t.textColor ?
|
|
38797
|
-
"text-halo-color": e.textHaloColor || t.textHaloColor ?
|
|
38805
|
+
"text-color": e.textColor || t.textColor ? Ur(t.dataBindings ?? {}, t.textColor, e.textColor) : "#000000",
|
|
38806
|
+
"text-halo-color": e.textHaloColor || t.textHaloColor ? Ur(t.dataBindings ?? {}, t.textHaloColor, e.textHaloColor) : "#000000",
|
|
38798
38807
|
"text-halo-width": t.textHaloWidth ?? 0,
|
|
38799
38808
|
"text-line-height": t.textLineHeight ?? 1.2,
|
|
38800
38809
|
"text-letter-spacing": t.textLetterSpacing ?? 0,
|
|
@@ -38808,24 +38817,24 @@ function yl(e, t, n, r, i) {
|
|
|
38808
38817
|
}
|
|
38809
38818
|
//#endregion
|
|
38810
38819
|
//#region src/utils/overlays.ts
|
|
38811
|
-
async function
|
|
38820
|
+
async function Sl(e, t, n, r, i, a) {
|
|
38812
38821
|
let o = await Promise.all(t.map((e) => `${r}/styles/${e}.json?access_token=${i}`).map((e) => fetch(e).then((e) => e.json())));
|
|
38813
38822
|
for (let t = 0; t < e.length; t++) {
|
|
38814
38823
|
let n = e[t], r = o[t];
|
|
38815
38824
|
for (let e of r.layers) e.metadata === void 0 && (e.metadata = {}), e.metadata["mc-original-layer-id"] = e.id, e.id = `${n} | ${e.id}`;
|
|
38816
38825
|
}
|
|
38817
|
-
return await Promise.all(o.map((e) =>
|
|
38826
|
+
return await Promise.all(o.map((e) => Cl(e, n, i, a))), o;
|
|
38818
38827
|
}
|
|
38819
|
-
async function
|
|
38828
|
+
async function Cl(e, t, n, r) {
|
|
38820
38829
|
for (let n in e.sources) t.getSource(n) === void 0 && t.addSource(n, e.sources[n]);
|
|
38821
|
-
e.sprite !== void 0 && await
|
|
38830
|
+
e.sprite !== void 0 && await Tl(t, e.sprite, n);
|
|
38822
38831
|
for (let n of e.layers) {
|
|
38823
38832
|
t.getLayer(n.id) !== void 0 && t.removeLayer(n.id);
|
|
38824
38833
|
let e = n.metadata?.["mc-add-before"] ?? "mc-before-none";
|
|
38825
|
-
t.addLayer(
|
|
38834
|
+
t.addLayer(wl(n, r), e);
|
|
38826
38835
|
}
|
|
38827
38836
|
}
|
|
38828
|
-
function
|
|
38837
|
+
function wl(e, t) {
|
|
38829
38838
|
let n = t ?? {}, r = e.metadata?.["mc-original-layer-id"], i = r === void 0 ? {} : n[r] ?? {}, a = {
|
|
38830
38839
|
...e,
|
|
38831
38840
|
layout: {
|
|
@@ -38843,7 +38852,7 @@ function Sl(e, t) {
|
|
|
38843
38852
|
};
|
|
38844
38853
|
return i.minzoom !== void 0 && (a.minzoom = i.minzoom), i.maxzoom !== void 0 && (a.maxzoom = i.maxzoom), "filter" in i && a.type !== "background" && (a.filter = i.filter), a;
|
|
38845
38854
|
}
|
|
38846
|
-
async function
|
|
38855
|
+
async function Tl(e, t, n) {
|
|
38847
38856
|
try {
|
|
38848
38857
|
let r = `${t}.json?access_token=${n}`, i = `${t}.png?access_token=${n}`, [a, o] = await Promise.all([fetch(r), fetch(i)]);
|
|
38849
38858
|
if (!a.ok || !o.ok) throw Error(`Failed to load sprite from ${t}`);
|
|
@@ -38865,23 +38874,23 @@ async function Cl(e, t, n) {
|
|
|
38865
38874
|
}
|
|
38866
38875
|
//#endregion
|
|
38867
38876
|
//#region src/images/popup-previous.svg?raw
|
|
38868
|
-
var
|
|
38877
|
+
var El = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"currentColor\"><path d=\"m0 4.647 4.282 4.4a.814.814 0 0 0 1.166-1.134L2.27 4.647l3.178-3.266A.814.814 0 1 0 4.282.246z\"/></svg>\n", Dl = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"11\" viewBox=\"0 0 10 11\" fill=\"currentColor\"><path d=\"M.21.71a.714.714 0 0 1 1.011 0l3.78 3.78L8.778.71a.715.715 0 0 1 1.013 1.01L6.01 5.501l3.78 3.778a.715.715 0 0 1-1.01 1.012L5 6.51l-3.779 3.78A.716.716 0 0 1 .21 9.28L3.99 5.5.21 1.721A.714.714 0 0 1 .21.71\"/></svg>\n", Ol = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"currentColor\"><path d=\"m5.678 4.647-4.282 4.4A.814.814 0 1 1 .23 7.914l3.177-3.266L.23 1.381A.814.814 0 1 1 1.396.246z\"/></svg>\n", kl = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 40 40\" stroke=\"currentColor\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20 4.167 1.667 35.834h36.667z\" stroke-width=\"2\" stroke-linejoin=\"round\"/><path d=\"M20 29.167v.834m0-14.167.007 8.333\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>\n";
|
|
38869
38878
|
//#endregion
|
|
38870
38879
|
//#region src/utils/youtube.ts
|
|
38871
|
-
function
|
|
38880
|
+
function Al(e, t) {
|
|
38872
38881
|
let { allowFullscreen: n, loop: r } = e, i = C(e.src, t), a, o = i.match(/(?:youtube\.com\/(?:watch\?.*v=|embed\/|v\/)|youtu\.be\/)([-\w]{11})/)?.[1];
|
|
38873
38882
|
a = o ? `https://www.youtube.com/embed/${o}` : i;
|
|
38874
38883
|
let s = [];
|
|
38875
|
-
if (n || s.push("fs=0"), r && o && s.push(`loop=1&playlist=${o}`), a =
|
|
38884
|
+
if (n || s.push("fs=0"), r && o && s.push(`loop=1&playlist=${o}`), a = Ml(a), a = jl(a), s.length) {
|
|
38876
38885
|
let e = a.includes("?") ? "&" : "?";
|
|
38877
38886
|
a += `${e}${s.join("&")}`;
|
|
38878
38887
|
}
|
|
38879
38888
|
return a;
|
|
38880
38889
|
}
|
|
38881
|
-
function
|
|
38890
|
+
function jl(e) {
|
|
38882
38891
|
return e.replace(/([?&])si=[^&]+(&)?/, (e, t, n) => t === "?" && !n ? "" : t === "?" && n ? "?" : n ? "&" : "");
|
|
38883
38892
|
}
|
|
38884
|
-
function
|
|
38893
|
+
function Ml(e) {
|
|
38885
38894
|
let t = new URL(e), n = t.searchParams.get("t");
|
|
38886
38895
|
if (!n) return e;
|
|
38887
38896
|
let r = 0, i = /^((\d+)m)?((\d+)s)?$/;
|
|
@@ -38897,12 +38906,12 @@ function Al(e) {
|
|
|
38897
38906
|
}
|
|
38898
38907
|
//#endregion
|
|
38899
38908
|
//#region src/utils/template.ts
|
|
38900
|
-
function
|
|
38909
|
+
function Nl(e, t, n, r) {
|
|
38901
38910
|
let i;
|
|
38902
|
-
if (t?.type === "video") i = r === "preview" ?
|
|
38911
|
+
if (t?.type === "video") i = r === "preview" ? Rl(t.src, n) : `
|
|
38903
38912
|
<div class="youtube-container">
|
|
38904
38913
|
<iframe
|
|
38905
|
-
src="${
|
|
38914
|
+
src="${Al(t, n)}"
|
|
38906
38915
|
width="100%" height="300" style="border: none" allowfullscreen>
|
|
38907
38916
|
</iframe>
|
|
38908
38917
|
</div>
|
|
@@ -38916,7 +38925,7 @@ function jl(e, t, n, r) {
|
|
|
38916
38925
|
`;
|
|
38917
38926
|
}
|
|
38918
38927
|
i = i ? `<div class="media-content">${i}</div>` : "";
|
|
38919
|
-
let a = e ? `<div class="text-content">${
|
|
38928
|
+
let a = e ? `<div class="text-content">${Il(e, n)}</div>` : "";
|
|
38920
38929
|
return `
|
|
38921
38930
|
<div class="popup-scroll-wrapper">
|
|
38922
38931
|
<div class="mc-popup">
|
|
@@ -38926,53 +38935,53 @@ function jl(e, t, n, r) {
|
|
|
38926
38935
|
</div>
|
|
38927
38936
|
`;
|
|
38928
38937
|
}
|
|
38929
|
-
var
|
|
38938
|
+
var Pl = `
|
|
38930
38939
|
<button class="mc-popup-button close">
|
|
38931
|
-
${
|
|
38940
|
+
${Dl}
|
|
38932
38941
|
</button>
|
|
38933
|
-
`,
|
|
38942
|
+
`, Fl = `
|
|
38934
38943
|
<div class="cycle-buttons">
|
|
38935
38944
|
<button class="mc-popup-button prev">
|
|
38936
|
-
${
|
|
38945
|
+
${El}
|
|
38937
38946
|
</button>
|
|
38938
38947
|
<button class="mc-popup-button next">
|
|
38939
|
-
${
|
|
38948
|
+
${Ol}
|
|
38940
38949
|
</button>
|
|
38941
38950
|
</div>
|
|
38942
38951
|
`;
|
|
38943
|
-
function
|
|
38952
|
+
function Il(e, t) {
|
|
38944
38953
|
return e ? (e = e.replace(/placeholder="[^"]+"/, ""), e = e.replace(/onerror="[^"]+"/, ""), e = e.replace(/youtube\.com\/embed\/\$([^"'<>\\]+)/gi, (e, n) => {
|
|
38945
38954
|
let r = w(t[n]);
|
|
38946
38955
|
return r ? `youtube.com/embed/${E(r)}?` : "";
|
|
38947
38956
|
}), e = e.replace(/(\S+?)\s*=\s*"\$([^"]+?)"/g, (e, n, r) => {
|
|
38948
38957
|
let i = w(t[r]);
|
|
38949
|
-
return ["src", "href"].includes(n) && !i ? "" : ["src", "href"].includes(n) ? /^(mailto:|tel:|ftp:|data:|http:\/\/|https:\/\/)/i.test(i) ? ` ${n}="${i}"` : ` ${n}="${
|
|
38958
|
+
return ["src", "href"].includes(n) && !i ? "" : ["src", "href"].includes(n) ? /^(mailto:|tel:|ftp:|data:|http:\/\/|https:\/\/)/i.test(i) ? ` ${n}="${i}"` : ` ${n}="${Ll(i)}"` : ` ${n}="${i}"`;
|
|
38950
38959
|
}), e = e.replace(/>\$(.+?)</gi, (e, n) => `>${w(t[n])}<`), e = e.replace(/<span\s+class="mention"\s+data-mention-id="[^"]*">(.*?)<\/span>/gim, (e, t) => t), e) : "";
|
|
38951
38960
|
}
|
|
38952
|
-
function
|
|
38961
|
+
function Ll(e) {
|
|
38953
38962
|
return /^https?:\/\//i.test(e) ? e : `https://${e}`;
|
|
38954
38963
|
}
|
|
38955
|
-
function
|
|
38964
|
+
function Rl(e, t) {
|
|
38956
38965
|
return `
|
|
38957
38966
|
<div class="youtube-placeholder">
|
|
38958
38967
|
<img src="${`https://img.youtube.com/vi/${E(C(e, t))}/hqdefault.jpg`}" />
|
|
38959
38968
|
<div class="popup-alert">
|
|
38960
|
-
<div class="alert-icon">${
|
|
38961
|
-
<div>${
|
|
38969
|
+
<div class="alert-icon">${kl}</div>
|
|
38970
|
+
<div>${zi("videoAlert")}</div>
|
|
38962
38971
|
</div>
|
|
38963
38972
|
</div>
|
|
38964
38973
|
`;
|
|
38965
38974
|
}
|
|
38966
38975
|
//#endregion
|
|
38967
38976
|
//#region src/Registry.ts
|
|
38968
|
-
var
|
|
38977
|
+
var zl = [
|
|
38969
38978
|
"area",
|
|
38970
38979
|
"circle",
|
|
38971
38980
|
"dot",
|
|
38972
38981
|
"line",
|
|
38973
38982
|
"marker",
|
|
38974
38983
|
"polygon"
|
|
38975
|
-
],
|
|
38984
|
+
], Bl = class {
|
|
38976
38985
|
data;
|
|
38977
38986
|
customGroupIds;
|
|
38978
38987
|
constructor(e) {
|
|
@@ -38984,7 +38993,7 @@ var Ll = [
|
|
|
38984
38993
|
marker: {},
|
|
38985
38994
|
polygon: {}
|
|
38986
38995
|
};
|
|
38987
|
-
for (let t of
|
|
38996
|
+
for (let t of zl) for (let n of e.registry?.models?.[t] ?? []) {
|
|
38988
38997
|
this.data[t][n.id] = {};
|
|
38989
38998
|
for (let e of n.models) {
|
|
38990
38999
|
if (t === "area") {
|
|
@@ -39030,7 +39039,7 @@ var Ll = [
|
|
|
39030
39039
|
}
|
|
39031
39040
|
return e.reverse();
|
|
39032
39041
|
}
|
|
39033
|
-
},
|
|
39042
|
+
}, Vl = class {
|
|
39034
39043
|
map;
|
|
39035
39044
|
popupElements;
|
|
39036
39045
|
markerLayerIds;
|
|
@@ -39179,7 +39188,7 @@ var Ll = [
|
|
|
39179
39188
|
r / i
|
|
39180
39189
|
];
|
|
39181
39190
|
}
|
|
39182
|
-
},
|
|
39191
|
+
}, Hl = class {
|
|
39183
39192
|
map;
|
|
39184
39193
|
popupPosition = "bottomLeft";
|
|
39185
39194
|
mapContainer;
|
|
@@ -39201,7 +39210,7 @@ var Ll = [
|
|
|
39201
39210
|
this.map = e, this.mode = t, this.mapContainer = this.map.getContainer(), this.popupContainer = document.createElement("div"), this.popupContainer.classList.add("popup-container"), this.map.on("mousemove", (e) => this.onMouseMove(e)), this.map.on("click", (e) => this.onClick(e));
|
|
39202
39211
|
}
|
|
39203
39212
|
setJobObject(e) {
|
|
39204
|
-
this.registry = new
|
|
39213
|
+
this.registry = new Bl(e);
|
|
39205
39214
|
}
|
|
39206
39215
|
setParams(e, t, n, r) {
|
|
39207
39216
|
this.popupPosition = e, this.language = t, this.restrictMapMovement = n, this.center = r;
|
|
@@ -39213,7 +39222,7 @@ var Ll = [
|
|
|
39213
39222
|
this.popupElements = this.registry.getPopupElements();
|
|
39214
39223
|
}
|
|
39215
39224
|
setHighlightManager() {
|
|
39216
|
-
this.highlightManager = new
|
|
39225
|
+
this.highlightManager = new Vl(this.map, this.registry.getPopupElements());
|
|
39217
39226
|
}
|
|
39218
39227
|
onMouseMove(e) {
|
|
39219
39228
|
this.feature = this.getInteractiveFeature(e), this.feature ? this.map.getCanvas().style.cursor = "pointer" : this.map.getCanvas().style.cursor = "";
|
|
@@ -39267,7 +39276,7 @@ var Ll = [
|
|
|
39267
39276
|
}
|
|
39268
39277
|
getTemplate(e) {
|
|
39269
39278
|
let { layer: t } = e, n, r = this.registry.getModel(e);
|
|
39270
|
-
if (r?.popup || r?.popupMedia) n =
|
|
39279
|
+
if (r?.popup || r?.popupMedia) n = Nl(r.popup, r.popupMedia, r.dataBindings ?? {}, this.mode);
|
|
39271
39280
|
else {
|
|
39272
39281
|
let r = [];
|
|
39273
39282
|
this.publication && (r.push(`:${this.publication}-${this.language}`), r.push(`:${this.publication}-:en`)), r.push(`:${this.language}`), r.push(":en"), r.push("");
|
|
@@ -39291,11 +39300,11 @@ var Ll = [
|
|
|
39291
39300
|
return t.innerHTML = e.trim(), t.content.firstElementChild;
|
|
39292
39301
|
}
|
|
39293
39302
|
addPopupControls() {
|
|
39294
|
-
let e = this.htmlToElement(
|
|
39303
|
+
let e = this.htmlToElement(Pl);
|
|
39295
39304
|
if (e && (e.addEventListener("click", () => {
|
|
39296
39305
|
this.hidePopup(), this.highlightManager.highlight(void 0);
|
|
39297
39306
|
}), this.popupContainer.appendChild(e)), this.popupElements.length < 2) return;
|
|
39298
|
-
let t = this.htmlToElement(
|
|
39307
|
+
let t = this.htmlToElement(Fl);
|
|
39299
39308
|
t && (t.querySelector(".prev")?.addEventListener("click", () => this.cyclePopups(!1)), t.querySelector(".next")?.addEventListener("click", () => this.cyclePopups()), this.popupContainer.appendChild(t));
|
|
39300
39309
|
}
|
|
39301
39310
|
fillDatalayerTemplate(e, t, n) {
|
|
@@ -39331,11 +39340,11 @@ var Ll = [
|
|
|
39331
39340
|
n = e ? t === this.popupElements.length - 1 ? 0 : t + 1 : t === 0 ? this.popupElements.length - 1 : t - 1;
|
|
39332
39341
|
let r = this.popupElements?.[n];
|
|
39333
39342
|
this.highlightManager.highlight(r);
|
|
39334
|
-
let i =
|
|
39343
|
+
let i = Nl(r.popup, r.popupMedia, r.dataBindings ?? {}, this.mode), a = this.popupContainer;
|
|
39335
39344
|
this.popupContainer.remove(), a.innerHTML = i, this.mapContainer.appendChild(a), this.currentModelId = r.modelId, this.addPopupControls(), e ? this.popupContainer.querySelector(".mc-popup-button.next")?.focus() : this.popupContainer.querySelector(".mc-popup-button.prev")?.focus(), this.currentFeatureId = void 0;
|
|
39336
39345
|
}
|
|
39337
39346
|
}
|
|
39338
|
-
},
|
|
39347
|
+
}, Ul = class e {
|
|
39339
39348
|
static #e(e) {
|
|
39340
39349
|
let t = 0, n = [t];
|
|
39341
39350
|
for (let r = 1; r < e.length; ++r) {
|
|
@@ -39386,19 +39395,19 @@ var Ll = [
|
|
|
39386
39395
|
get length() {
|
|
39387
39396
|
return this.#a;
|
|
39388
39397
|
}
|
|
39389
|
-
},
|
|
39398
|
+
}, Wl = {
|
|
39390
39399
|
solid: [1, 0],
|
|
39391
39400
|
dotted: [.7, .3],
|
|
39392
39401
|
dashed: [3.5, 1.5]
|
|
39393
39402
|
};
|
|
39394
|
-
function
|
|
39403
|
+
function Gl(e, t, n, r) {
|
|
39395
39404
|
e.addSource(t.id, {
|
|
39396
39405
|
type: "geojson",
|
|
39397
39406
|
data: {
|
|
39398
39407
|
type: "FeatureCollection",
|
|
39399
|
-
features: t.models.filter((e) => e.visible ?? !0).map((n) =>
|
|
39408
|
+
features: t.models.filter((e) => e.visible ?? !0).map((n) => Kl(e, t, n, 1, r))
|
|
39400
39409
|
}
|
|
39401
|
-
}), Object.entries(
|
|
39410
|
+
}), Object.entries(Wl).forEach(([r, i]) => {
|
|
39402
39411
|
t.models.some((e) => (e.lineStyle ?? "solid") === r) && e.addLayer({
|
|
39403
39412
|
id: `${t.id}-${r}`,
|
|
39404
39413
|
type: "line",
|
|
@@ -39483,18 +39492,18 @@ function Ul(e, t, n, r) {
|
|
|
39483
39492
|
]
|
|
39484
39493
|
}, n);
|
|
39485
39494
|
}
|
|
39486
|
-
function
|
|
39487
|
-
let a = new
|
|
39495
|
+
function Kl(e, t, n, r, i) {
|
|
39496
|
+
let a = new Ul(n.geometry).slice(0, r), o = n.svg === void 0 ? void 0 : i.getMapLibreImageKey(Gr(n.dataBindings ?? {}, n.svg, void 0), window.devicePixelRatio * (n.iconScale ?? 1));
|
|
39488
39497
|
return {
|
|
39489
39498
|
type: "Feature",
|
|
39490
39499
|
id: S(n.id),
|
|
39491
39500
|
properties: {
|
|
39492
39501
|
id: n.id,
|
|
39493
39502
|
"line-width": n.lineWidth ?? 3,
|
|
39494
|
-
"line-color": t.lineColor || n.lineColor ?
|
|
39503
|
+
"line-color": t.lineColor || n.lineColor ? Ur(n.dataBindings ?? {}, n.lineColor, t.lineColor) : "#000000",
|
|
39495
39504
|
"line-style": n.lineStyle ?? "solid",
|
|
39496
39505
|
"mc-image-key": o,
|
|
39497
|
-
"icon-rotate":
|
|
39506
|
+
"icon-rotate": ql(n, a, e),
|
|
39498
39507
|
"icon-offset": n.iconOffset,
|
|
39499
39508
|
"icon-size": n.iconScale
|
|
39500
39509
|
},
|
|
@@ -39510,12 +39519,12 @@ function Wl(e, t, n, r, i) {
|
|
|
39510
39519
|
}
|
|
39511
39520
|
};
|
|
39512
39521
|
}
|
|
39513
|
-
function
|
|
39522
|
+
function ql(e, t, n) {
|
|
39514
39523
|
return e.iconRotation ? e.iconAlign ? lr(t, n) + e.iconRotation : e.iconRotation : 0;
|
|
39515
39524
|
}
|
|
39516
39525
|
//#endregion
|
|
39517
39526
|
//#region src/models/area.ts
|
|
39518
|
-
function
|
|
39527
|
+
function Jl(e, t, n, r, i, a, o) {
|
|
39519
39528
|
let s = gr(t), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
|
|
39520
39529
|
for (let e of t.models) {
|
|
39521
39530
|
let n = e.featureId, a = t.id, o = [], u = sr(e), d = or(a, e), f = l.get(d) ?? {
|
|
@@ -39529,7 +39538,7 @@ function Kl(e, t, n, r, i, a, o) {
|
|
|
39529
39538
|
if (e.visible ?? !0) {
|
|
39530
39539
|
f.featureIds.push(n);
|
|
39531
39540
|
let a = e.fillPattern === void 0 ? null : i.getMapLibreImageKey(r[e.fillPattern], 2 * window.devicePixelRatio);
|
|
39532
|
-
f.modelIdToFillColor[n] = t.fillColor || e.fillColor ?
|
|
39541
|
+
f.modelIdToFillColor[n] = t.fillColor || e.fillColor ? Ur(e.dataBindings ?? {}, e.fillColor, t.fillColor, s, t.choropleth?.unmatchedColor) : "#000000", f.modelIdToFillPattern[n] = a, f.modelIdToOutlineColor[n] = t.outlineColor || e.outlineColor ? Ur(e.dataBindings ?? {}, e.outlineColor, t.outlineColor) : "#000000", f.modelIdToOutlineWidth[n] = e.outlineWidth ?? .5;
|
|
39533
39542
|
}
|
|
39534
39543
|
c.set(u, e), l.set(d, f);
|
|
39535
39544
|
}
|
|
@@ -39665,12 +39674,12 @@ function Kl(e, t, n, r, i, a, o) {
|
|
|
39665
39674
|
}
|
|
39666
39675
|
//#endregion
|
|
39667
39676
|
//#region src/models/dot.ts
|
|
39668
|
-
function
|
|
39677
|
+
function Yl(e, t, n) {
|
|
39669
39678
|
e.addSource(t.id, {
|
|
39670
39679
|
type: "geojson",
|
|
39671
39680
|
data: {
|
|
39672
39681
|
type: "FeatureCollection",
|
|
39673
|
-
features: t.models.filter((e) => e.visible ?? !0).map((e) =>
|
|
39682
|
+
features: t.models.filter((e) => e.visible ?? !0).map((e) => Xl(t, e))
|
|
39674
39683
|
}
|
|
39675
39684
|
}), e.addLayer({
|
|
39676
39685
|
id: t.id,
|
|
@@ -39692,14 +39701,14 @@ function ql(e, t, n) {
|
|
|
39692
39701
|
}
|
|
39693
39702
|
}, n);
|
|
39694
39703
|
}
|
|
39695
|
-
function
|
|
39704
|
+
function Xl(e, t) {
|
|
39696
39705
|
return {
|
|
39697
39706
|
type: "Feature",
|
|
39698
39707
|
id: t.id,
|
|
39699
39708
|
properties: {
|
|
39700
39709
|
id: t.id,
|
|
39701
39710
|
"circle-radius": t.radius,
|
|
39702
|
-
"circle-color": e.fillColor || t.fillColor ?
|
|
39711
|
+
"circle-color": e.fillColor || t.fillColor ? Ur(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000"
|
|
39703
39712
|
},
|
|
39704
39713
|
geometry: {
|
|
39705
39714
|
type: "Point",
|
|
@@ -39709,94 +39718,94 @@ function Jl(e, t) {
|
|
|
39709
39718
|
}
|
|
39710
39719
|
//#endregion
|
|
39711
39720
|
//#region src/utils/video/easings.ts
|
|
39712
|
-
function
|
|
39721
|
+
function Zl(e, t, n, r) {
|
|
39713
39722
|
return t + n / r * e;
|
|
39714
39723
|
}
|
|
39715
|
-
function
|
|
39724
|
+
function Ql(e, t, n, r) {
|
|
39716
39725
|
return n * ((e = e / r - 1) * e * e + 1) + t;
|
|
39717
39726
|
}
|
|
39718
|
-
function
|
|
39727
|
+
function $l(e, t, n, r) {
|
|
39719
39728
|
let i = 1.70158, a = 0, o = n;
|
|
39720
39729
|
return e === 0 ? t : (e /= r) === 1 ? t + n : (a ||= r * .3, o < Math.abs(n) ? (o = n, i = a / 4) : i = a / (2 * Math.PI) * Math.asin(n / o), o * 2 ** (-10 * e) * Math.sin((e * r - i) * (2 * Math.PI) / a) + n + t);
|
|
39721
39730
|
}
|
|
39722
|
-
function
|
|
39731
|
+
function eu(e, t, n, r, i) {
|
|
39723
39732
|
return i === void 0 && (i = 1.70158), n * ((e = e / r - 1) * e * ((i + 1) * e + i) + 1) + t;
|
|
39724
39733
|
}
|
|
39725
|
-
function
|
|
39734
|
+
function tu(e, t, n, r) {
|
|
39726
39735
|
return (e /= r) < 1 / 2.75 ? n * (7.5625 * e * e) + t : e < 2 / 2.75 ? n * (7.5625 * (e -= 1.5 / 2.75) * e + .75) + t : e < 2.5 / 2.75 ? n * (7.5625 * (e -= 2.25 / 2.75) * e + .9375) + t : n * (7.5625 * (e -= 2.625 / 2.75) * e + .984375) + t;
|
|
39727
39736
|
}
|
|
39728
39737
|
//#endregion
|
|
39729
39738
|
//#region src/utils/video/animations.ts
|
|
39730
|
-
var
|
|
39731
|
-
linear:
|
|
39732
|
-
easeOutCubic:
|
|
39733
|
-
easeOutBack:
|
|
39734
|
-
easeOutBounce:
|
|
39735
|
-
easeOutElastic:
|
|
39739
|
+
var nu = {
|
|
39740
|
+
linear: Zl,
|
|
39741
|
+
easeOutCubic: Ql,
|
|
39742
|
+
easeOutBack: eu,
|
|
39743
|
+
easeOutBounce: tu,
|
|
39744
|
+
easeOutElastic: $l
|
|
39736
39745
|
};
|
|
39737
|
-
function
|
|
39746
|
+
function ru(e) {
|
|
39738
39747
|
return e.entryType === "fade" || e.exitType === "fade" || e.entryType === "instant" || e.exitType === "instant";
|
|
39739
39748
|
}
|
|
39740
|
-
function
|
|
39749
|
+
function iu(e) {
|
|
39741
39750
|
return e.entryType === "grow" || e.exitType === "grow";
|
|
39742
39751
|
}
|
|
39743
|
-
function
|
|
39752
|
+
function au(e, t, n) {
|
|
39744
39753
|
let { entry: r, entryDuration: i, exit: a, exitDuration: o } = e, { entryType: s, entryEasing: c, exitType: l, exitEasing: u } = e;
|
|
39745
|
-
return n < r && (s === t || s === "instant" && t === "fade") || n > a && (l === t || l === "instant" && t === "fade") ? 0 : i > 0 && n < r + i && s === t ?
|
|
39754
|
+
return n < r && (s === t || s === "instant" && t === "fade") || n > a && (l === t || l === "instant" && t === "fade") ? 0 : i > 0 && n < r + i && s === t ? nu[c](n - r, 0, 1, i) : o > 0 && n > a - o && l === t ? nu[u](n - (a - o), 1, -1, o) : 1;
|
|
39746
39755
|
}
|
|
39747
39756
|
//#endregion
|
|
39748
39757
|
//#region src/utils/video/index.ts
|
|
39749
|
-
function
|
|
39750
|
-
let t = e.length > 0 ? [
|
|
39758
|
+
function ou(e) {
|
|
39759
|
+
let t = e.length > 0 ? [su(e[0])] : [], n = 0, r = 0;
|
|
39751
39760
|
for (let i = 1; i < e.length; ++i) {
|
|
39752
|
-
let a =
|
|
39753
|
-
n +=
|
|
39761
|
+
let a = su(e[i]);
|
|
39762
|
+
n += cu(e[i - 1].center[0], a.center[0]), r += cu(e[i - 1].bearing, a.bearing), a.center[0] += n * 360, a.x += n, a.bearing += r * 360, t.push(a);
|
|
39754
39763
|
}
|
|
39755
39764
|
return t;
|
|
39756
39765
|
}
|
|
39757
|
-
function
|
|
39766
|
+
function su(e) {
|
|
39758
39767
|
return {
|
|
39759
39768
|
...e,
|
|
39760
39769
|
center: [e.center[0], e.center[1]]
|
|
39761
39770
|
};
|
|
39762
39771
|
}
|
|
39763
|
-
function
|
|
39772
|
+
function cu(e, t) {
|
|
39764
39773
|
if (Math.abs(e) + Math.abs(t) > 180) {
|
|
39765
39774
|
if (e > 0 && t < 0) return 1;
|
|
39766
39775
|
if (e < 0 && t > 0) return -1;
|
|
39767
39776
|
}
|
|
39768
39777
|
return 0;
|
|
39769
39778
|
}
|
|
39770
|
-
function
|
|
39779
|
+
function lu(e) {
|
|
39771
39780
|
return 2 ** -e;
|
|
39772
39781
|
}
|
|
39773
|
-
function
|
|
39782
|
+
function uu(e) {
|
|
39774
39783
|
return e.length > 0 ? e[e.length - 1].time : 0;
|
|
39775
39784
|
}
|
|
39776
|
-
function
|
|
39785
|
+
function du(e) {
|
|
39777
39786
|
return P(e, 23.976) ? 24e3 / 1001 : P(e, 29.97) ? 3e4 / 1001 : P(e, 59.94) ? 6e4 / 1001 : e;
|
|
39778
39787
|
}
|
|
39779
39788
|
//#endregion
|
|
39780
39789
|
//#region node_modules/d3-shape/src/curve/monotone.js
|
|
39781
|
-
function
|
|
39790
|
+
function fu(e) {
|
|
39782
39791
|
return e < 0 ? -1 : 1;
|
|
39783
39792
|
}
|
|
39784
|
-
function
|
|
39793
|
+
function pu(e, t, n) {
|
|
39785
39794
|
var r = e._x1 - e._x0, i = t - e._x1, a = (e._y1 - e._y0) / (r || i < 0 && -0), o = (n - e._y1) / (i || r < 0 && -0), s = (a * i + o * r) / (r + i);
|
|
39786
|
-
return (
|
|
39795
|
+
return (fu(a) + fu(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(s)) || 0;
|
|
39787
39796
|
}
|
|
39788
|
-
function
|
|
39797
|
+
function mu(e, t) {
|
|
39789
39798
|
var n = e._x1 - e._x0;
|
|
39790
39799
|
return n ? (3 * (e._y1 - e._y0) / n - t) / 2 : t;
|
|
39791
39800
|
}
|
|
39792
|
-
function
|
|
39801
|
+
function hu(e, t, n) {
|
|
39793
39802
|
var r = e._x0, i = e._y0, a = e._x1, o = e._y1, s = (a - r) / 3;
|
|
39794
39803
|
e._context.bezierCurveTo(r + s, i + s * t, a - s, o - s * n, a, o);
|
|
39795
39804
|
}
|
|
39796
|
-
function
|
|
39805
|
+
function gu(e) {
|
|
39797
39806
|
this._context = e;
|
|
39798
39807
|
}
|
|
39799
|
-
|
|
39808
|
+
gu.prototype = {
|
|
39800
39809
|
areaStart: function() {
|
|
39801
39810
|
this._line = 0;
|
|
39802
39811
|
},
|
|
@@ -39812,7 +39821,7 @@ mu.prototype = {
|
|
|
39812
39821
|
this._context.lineTo(this._x1, this._y1);
|
|
39813
39822
|
break;
|
|
39814
39823
|
case 3:
|
|
39815
|
-
|
|
39824
|
+
hu(this, this._t0, mu(this, this._t0));
|
|
39816
39825
|
break;
|
|
39817
39826
|
}
|
|
39818
39827
|
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
@@ -39828,26 +39837,26 @@ mu.prototype = {
|
|
|
39828
39837
|
this._point = 2;
|
|
39829
39838
|
break;
|
|
39830
39839
|
case 2:
|
|
39831
|
-
this._point = 3,
|
|
39840
|
+
this._point = 3, hu(this, mu(this, n = pu(this, e, t)), n);
|
|
39832
39841
|
break;
|
|
39833
39842
|
default:
|
|
39834
|
-
|
|
39843
|
+
hu(this, this._t0, n = pu(this, e, t));
|
|
39835
39844
|
break;
|
|
39836
39845
|
}
|
|
39837
39846
|
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = n;
|
|
39838
39847
|
}
|
|
39839
39848
|
}
|
|
39840
39849
|
};
|
|
39841
|
-
function
|
|
39842
|
-
this._context = new
|
|
39850
|
+
function _u(e) {
|
|
39851
|
+
this._context = new vu(e);
|
|
39843
39852
|
}
|
|
39844
|
-
(
|
|
39845
|
-
|
|
39853
|
+
(_u.prototype = Object.create(gu.prototype)).point = function(e, t) {
|
|
39854
|
+
gu.prototype.point.call(this, t, e);
|
|
39846
39855
|
};
|
|
39847
|
-
function
|
|
39856
|
+
function vu(e) {
|
|
39848
39857
|
this._context = e;
|
|
39849
39858
|
}
|
|
39850
|
-
|
|
39859
|
+
vu.prototype = {
|
|
39851
39860
|
moveTo: function(e, t) {
|
|
39852
39861
|
this._context.moveTo(t, e);
|
|
39853
39862
|
},
|
|
@@ -39861,34 +39870,34 @@ gu.prototype = {
|
|
|
39861
39870
|
this._context.bezierCurveTo(t, e, r, n, a, i);
|
|
39862
39871
|
}
|
|
39863
39872
|
};
|
|
39864
|
-
function
|
|
39865
|
-
return new
|
|
39873
|
+
function yu(e) {
|
|
39874
|
+
return new gu(e);
|
|
39866
39875
|
}
|
|
39867
39876
|
//#endregion
|
|
39868
39877
|
//#region node_modules/bezier-easing/src/index.js
|
|
39869
|
-
function
|
|
39878
|
+
function bu(e) {
|
|
39870
39879
|
return e;
|
|
39871
39880
|
}
|
|
39872
|
-
var { cbrt:
|
|
39881
|
+
var { cbrt: xu, sqrt: Su, PI: Cu } = Math, wu = (e, t, n, r, i) => {
|
|
39873
39882
|
let a = t + n * e, o = a ** 2 + r;
|
|
39874
39883
|
if (o > 0) {
|
|
39875
|
-
let e =
|
|
39876
|
-
return
|
|
39884
|
+
let e = Su(o);
|
|
39885
|
+
return xu(a + e) + xu(a - e) - i;
|
|
39877
39886
|
}
|
|
39878
|
-
let s =
|
|
39879
|
-
return l = n < 0 ? (a > 0 ? 2 *
|
|
39880
|
-
},
|
|
39881
|
-
function
|
|
39887
|
+
let s = xu(Su(a * a - o)), c = a ? Math.atan(Su(-o) / a) : -Cu / 2, l;
|
|
39888
|
+
return l = n < 0 ? (a > 0 ? 2 * Cu : Cu) - c : i < 0 ? (a > 0 ? 2 * Cu : -3 * Cu) + c : (a > 0 ? 0 : Cu) + c, 2 * s * Math.cos(l / 3) - i;
|
|
39889
|
+
}, Tu = (e, t, n, r) => ((t * e + 3 * n) * e + r) * e;
|
|
39890
|
+
function Eu(e, t, n, r) {
|
|
39882
39891
|
if (!(0 <= e && e <= 1 && 0 <= n && n <= 1)) throw Error("bezier x values must be in [0, 1] range");
|
|
39883
|
-
if (e === t && n === r) return
|
|
39884
|
-
let i = 6 * (3 * e - 3 * n + 1), a = 6 * (n - 2 * e), o = 3 * e, s = i * i, c = a * a, l = a / i, u = 3 * a * o / s - c * a / (s * i), d = 2 * o / i - c / s, f = d * d * d, p = 3 / i, m = 3 * t - 3 * r + 1, h = r - 2 * t, g = 3 * t, _ = i ?
|
|
39892
|
+
if (e === t && n === r) return bu;
|
|
39893
|
+
let i = 6 * (3 * e - 3 * n + 1), a = 6 * (n - 2 * e), o = 3 * e, s = i * i, c = a * a, l = a / i, u = 3 * a * o / s - c * a / (s * i), d = 2 * o / i - c / s, f = d * d * d, p = 3 / i, m = 3 * t - 3 * r + 1, h = r - 2 * t, g = 3 * t, _ = i ? wu : bu;
|
|
39885
39894
|
return function(e) {
|
|
39886
|
-
return e === 0 || e === 1 ? e :
|
|
39895
|
+
return e === 0 || e === 1 ? e : Tu(_(e, u, p, f, l), m, h, g);
|
|
39887
39896
|
};
|
|
39888
39897
|
}
|
|
39889
39898
|
//#endregion
|
|
39890
39899
|
//#region src/utils/video/monotonicCurve.ts
|
|
39891
|
-
var
|
|
39900
|
+
var Du = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
39892
39901
|
t.exports = n;
|
|
39893
39902
|
function n(e, t, n, r) {
|
|
39894
39903
|
var i, a, o, s, c, l, u, d, f, p, m, h, g, _;
|
|
@@ -39899,11 +39908,11 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
39899
39908
|
}
|
|
39900
39909
|
return g && console.log("Newton-Raphson: Maximum iterations reached (" + c + ")"), !1;
|
|
39901
39910
|
}
|
|
39902
|
-
})))(), 1),
|
|
39911
|
+
})))(), 1), Ou = class {
|
|
39903
39912
|
segments;
|
|
39904
39913
|
constructor(e) {
|
|
39905
39914
|
this.segments = [];
|
|
39906
|
-
let t = new
|
|
39915
|
+
let t = new ku(), n = yu(t);
|
|
39907
39916
|
n.lineStart();
|
|
39908
39917
|
for (let t of e) n.point(t.x, t.y);
|
|
39909
39918
|
n.lineEnd(), this.segments = t.segments;
|
|
@@ -39915,17 +39924,17 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
39915
39924
|
return t.startY !== t.endY && t.easing !== void 0 ? k(t.startY, t.endY, t.easing(n)) : k(t.startY, t.endY, n);
|
|
39916
39925
|
}
|
|
39917
39926
|
solve(e, t) {
|
|
39918
|
-
let n = (0,
|
|
39927
|
+
let n = (0, Du.default)((t) => this.sample(t) - e, t);
|
|
39919
39928
|
return n === !1 ? t : n;
|
|
39920
39929
|
}
|
|
39921
|
-
},
|
|
39930
|
+
}, ku = class {
|
|
39922
39931
|
previousPoint = {
|
|
39923
39932
|
x: 0,
|
|
39924
39933
|
y: 0
|
|
39925
39934
|
};
|
|
39926
39935
|
segments = [];
|
|
39927
39936
|
bezierCurveTo(e, t, n, r, i, a) {
|
|
39928
|
-
let o = this.previousPoint.x, s = this.previousPoint.y, c = i === o ? void 0 :
|
|
39937
|
+
let o = this.previousPoint.x, s = this.previousPoint.y, c = i === o ? void 0 : Eu((e - o) / (i - o), (t - s) / (a - s), (n - o) / (i - o), (r - s) / (a - s));
|
|
39929
39938
|
this.segments.push({
|
|
39930
39939
|
startX: o,
|
|
39931
39940
|
endX: i,
|
|
@@ -39960,7 +39969,7 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
39960
39969
|
rect() {}
|
|
39961
39970
|
arcTo() {}
|
|
39962
39971
|
quadraticCurveTo() {}
|
|
39963
|
-
},
|
|
39972
|
+
}, Au = class {
|
|
39964
39973
|
script;
|
|
39965
39974
|
xCurve;
|
|
39966
39975
|
yCurve;
|
|
@@ -39971,10 +39980,10 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
39971
39980
|
altitudeCurve;
|
|
39972
39981
|
elevationCurve;
|
|
39973
39982
|
constructor(e) {
|
|
39974
|
-
this.script =
|
|
39983
|
+
this.script = ou(e), this.xCurve = this.createMonotonicCurve(this.script, "x"), this.yCurve = this.createMonotonicCurve(this.script, "y"), this.fovCurve = this.createMonotonicCurve(this.script, "fov"), this.zoomCurve = this.createMonotonicCurve(this.script, "zoom"), this.pitchCurve = this.createMonotonicCurve(this.script, "pitch"), this.bearingCurve = this.createMonotonicCurve(this.script, "bearing"), this.altitudeCurve = this.createMonotonicCurve(this.script, "altitude"), this.elevationCurve = this.createMonotonicCurve(this.script, "elevation");
|
|
39975
39984
|
}
|
|
39976
39985
|
sample(e) {
|
|
39977
|
-
let t = this.zoomCurve.sample(e), n = this.altitudeCurve.solve(
|
|
39986
|
+
let t = this.zoomCurve.sample(e), n = this.altitudeCurve.solve(lu(t), e), r = this.xCurve.sample(n), i = this.yCurve.sample(n), a = this.elevationCurve.sample(n), o = this.bearingCurve.sample(e), s = this.pitchCurve.sample(e), c = this.fovCurve.sample(e);
|
|
39978
39987
|
return {
|
|
39979
39988
|
center: new l.MercatorCoordinate(r, i).toLngLat(),
|
|
39980
39989
|
zoom: t,
|
|
@@ -40018,7 +40027,7 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
40018
40027
|
y: l
|
|
40019
40028
|
});
|
|
40020
40029
|
}
|
|
40021
|
-
return new
|
|
40030
|
+
return new Ou(n);
|
|
40022
40031
|
}
|
|
40023
40032
|
sampleAutoHideOpacity(e) {
|
|
40024
40033
|
let t = this.script;
|
|
@@ -40029,12 +40038,12 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
40029
40038
|
if (r.hideLabels === (a?.hideLabels ?? !1)) o = r.hideLabels ? 0 : 1;
|
|
40030
40039
|
else {
|
|
40031
40040
|
let t = e - r.time, n = Math.min(400, i.time - r.time);
|
|
40032
|
-
o = j(
|
|
40041
|
+
o = j(Ql(t, r.hideLabels ? 1 : 0, r.hideLabels ? -1 : 1, n), 0, 1);
|
|
40033
40042
|
}
|
|
40034
40043
|
let s;
|
|
40035
40044
|
if (n === t.length - 2 && r.hideLabels) {
|
|
40036
40045
|
let t = Math.max(r.time, i.time - 400);
|
|
40037
|
-
s = j(
|
|
40046
|
+
s = j(Ql(e - t, 0, 1, i.time - t), 0, 1);
|
|
40038
40047
|
} else s = 0;
|
|
40039
40048
|
return Math.max(o, s);
|
|
40040
40049
|
}
|
|
@@ -40046,10 +40055,10 @@ var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
40046
40055
|
}
|
|
40047
40056
|
}
|
|
40048
40057
|
getKeyframeValue(e, t) {
|
|
40049
|
-
return t === "altitude" ?
|
|
40058
|
+
return t === "altitude" ? lu(e.zoom) : e[t];
|
|
40050
40059
|
}
|
|
40051
|
-
},
|
|
40052
|
-
function
|
|
40060
|
+
}, ju = Mu;
|
|
40061
|
+
function Mu(e, t, n) {
|
|
40053
40062
|
var r = null, i = null, a = function() {
|
|
40054
40063
|
r &&= (clearTimeout(r), i = null, null);
|
|
40055
40064
|
}, o = function() {
|
|
@@ -40071,7 +40080,7 @@ function Au(e, t, n) {
|
|
|
40071
40080
|
}
|
|
40072
40081
|
//#endregion
|
|
40073
40082
|
//#region src/Video.ts
|
|
40074
|
-
var
|
|
40083
|
+
var Nu = class {
|
|
40075
40084
|
mcMap;
|
|
40076
40085
|
cameraCurve;
|
|
40077
40086
|
jobObject;
|
|
@@ -40095,7 +40104,7 @@ var ju = class {
|
|
|
40095
40104
|
elevation: e.elevation ?? 0
|
|
40096
40105
|
};
|
|
40097
40106
|
});
|
|
40098
|
-
this.duration =
|
|
40107
|
+
this.duration = uu(s), this.cameraCurve = new Au(s), this.jobObject = t, this.svgs = n, this.svgCache = r, this.mapstyle = i, this.overlays = a, this.layerInfo = o;
|
|
40099
40108
|
}
|
|
40100
40109
|
play() {
|
|
40101
40110
|
this.playbackContext === void 0 && this.duration > 0 && (this.playhead >= this.duration && (this.playhead = 0), this.playbackContext = {
|
|
@@ -40113,7 +40122,7 @@ var ju = class {
|
|
|
40113
40122
|
}));
|
|
40114
40123
|
}
|
|
40115
40124
|
async *frames() {
|
|
40116
|
-
let e = this.mcMap.map, t =
|
|
40125
|
+
let e = this.mcMap.map, t = du(this.jobObject.export?.frameRate ?? 60), n = Math.ceil(this.duration * t / 1e3);
|
|
40117
40126
|
e._fadeDuration = 0, e.style.stylesheet.transition = {
|
|
40118
40127
|
duration: 0,
|
|
40119
40128
|
delay: 0
|
|
@@ -40132,7 +40141,7 @@ var ju = class {
|
|
|
40132
40141
|
let r = t.querySelectorAll(".adornment-svg"), i = await Promise.all(Array.from(r).map(async (e) => {
|
|
40133
40142
|
let t = e.outerHTML, r = e.getBoundingClientRect(), i = r.left - n.left, a = r.top - n.top, o = r.width, s = r.height;
|
|
40134
40143
|
return {
|
|
40135
|
-
image: await
|
|
40144
|
+
image: await Or(t, o, s),
|
|
40136
40145
|
x: i,
|
|
40137
40146
|
y: a
|
|
40138
40147
|
};
|
|
@@ -40154,8 +40163,8 @@ var ju = class {
|
|
|
40154
40163
|
let t = this.mcMap.map, { svgs: n, svgCache: r } = this, i = this.jobObject.video?.animations ?? [];
|
|
40155
40164
|
for (let n of i) {
|
|
40156
40165
|
let { target: r } = n;
|
|
40157
|
-
if (r.type === "model" &&
|
|
40158
|
-
let { modelType: i, groupId: a, modelId: o } = r, s =
|
|
40166
|
+
if (r.type === "model" && ru(n)) {
|
|
40167
|
+
let { modelType: i, groupId: a, modelId: o } = r, s = au(n, "fade", e);
|
|
40159
40168
|
(i === "polygon" || i === "circle" || i === "line" || i === "marker" || i === "dot") && (o === void 0 ? t.setGlobalStateProperty(`opacity-${a}`, s === 1 ? null : s) : t.setFeatureState({
|
|
40160
40169
|
source: a,
|
|
40161
40170
|
id: S(o)
|
|
@@ -40165,14 +40174,14 @@ var ju = class {
|
|
|
40165
40174
|
for (let n of this.jobObject.registry?.models?.area ?? []) {
|
|
40166
40175
|
let { groupAnimation: r, modelAnimations: a } = this.getGroupAnimations(i, "area", n.id, "opacity");
|
|
40167
40176
|
if (!(r === void 0 && a.size === 0)) if (r !== void 0 && a.size === 0) {
|
|
40168
|
-
let i =
|
|
40177
|
+
let i = au(r, "fade", e);
|
|
40169
40178
|
n.models.reduce((e, t) => e.add(or(n.id, t)), /* @__PURE__ */ new Set()).forEach((e) => {
|
|
40170
40179
|
t.setPaintProperty(e, "fill-opacity", i), t.setPaintProperty(`${e}-outline`, "line-opacity", i), t.setPaintProperty(`${e}-pattern`, "fill-opacity", i);
|
|
40171
40180
|
});
|
|
40172
40181
|
} else {
|
|
40173
|
-
let i = r === void 0 ? 1 :
|
|
40182
|
+
let i = r === void 0 ? 1 : au(r, "fade", e), o = {};
|
|
40174
40183
|
for (let t of n.models) {
|
|
40175
|
-
let r = t.featureId === void 0 ? t.id : String(t.featureId), s = or(n.id, t), c = a.get(t.id), l = c === void 0 ? i :
|
|
40184
|
+
let r = t.featureId === void 0 ? t.id : String(t.featureId), s = or(n.id, t), c = a.get(t.id), l = c === void 0 ? i : au(c, "fade", e);
|
|
40176
40185
|
o[s] ??= {}, o[s][r] = l;
|
|
40177
40186
|
}
|
|
40178
40187
|
for (let [e, n] of Object.entries(o)) {
|
|
@@ -40195,32 +40204,32 @@ var ju = class {
|
|
|
40195
40204
|
}
|
|
40196
40205
|
}
|
|
40197
40206
|
for (let a of this.jobObject.registry?.models?.circle ?? []) {
|
|
40198
|
-
let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "circle", a.id, "scale"), c = o === void 0 ? 1 :
|
|
40207
|
+
let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "circle", a.id, "scale"), c = o === void 0 ? 1 : au(o, "grow", e);
|
|
40199
40208
|
(o !== void 0 || s.size > 0) && t.getSource(a.id).setData({
|
|
40200
40209
|
type: "FeatureCollection",
|
|
40201
40210
|
features: a.models.filter((e) => e.visible ?? !0).map((t) => {
|
|
40202
40211
|
let i = s.get(t.id);
|
|
40203
|
-
return
|
|
40212
|
+
return _l(a, t, i === void 0 ? c : au(i, "grow", e), n, r);
|
|
40204
40213
|
})
|
|
40205
40214
|
});
|
|
40206
40215
|
}
|
|
40207
40216
|
for (let n of this.jobObject.registry?.models?.line ?? []) {
|
|
40208
|
-
let { groupAnimation: a, modelAnimations: o } = this.getGroupAnimations(i, "line", n.id, "scale"), s = a === void 0 ? 1 :
|
|
40217
|
+
let { groupAnimation: a, modelAnimations: o } = this.getGroupAnimations(i, "line", n.id, "scale"), s = a === void 0 ? 1 : au(a, "grow", e);
|
|
40209
40218
|
(a !== void 0 || o.size > 0) && t.getSource(n.id).setData({
|
|
40210
40219
|
type: "FeatureCollection",
|
|
40211
40220
|
features: n.models.filter((e) => e.visible ?? !0).map((i) => {
|
|
40212
40221
|
let a = o.get(i.id);
|
|
40213
|
-
return
|
|
40222
|
+
return Kl(t, n, i, a === void 0 ? s : au(a, "grow", e), r);
|
|
40214
40223
|
})
|
|
40215
40224
|
});
|
|
40216
40225
|
}
|
|
40217
40226
|
for (let a of this.jobObject.registry?.models?.marker ?? []) {
|
|
40218
|
-
let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "marker", a.id, "scale"), c = o === void 0 ? 1 :
|
|
40227
|
+
let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "marker", a.id, "scale"), c = o === void 0 ? 1 : au(o, "grow", e);
|
|
40219
40228
|
(o !== void 0 || s.size > 0) && t.getSource(a.id).setData({
|
|
40220
40229
|
type: "FeatureCollection",
|
|
40221
40230
|
features: a.models.filter((e) => e.visible ?? !0).map((t) => {
|
|
40222
40231
|
let i = s.get(t.id);
|
|
40223
|
-
return
|
|
40232
|
+
return xl(a, t, i === void 0 ? c : au(i, "grow", e), n, r);
|
|
40224
40233
|
})
|
|
40225
40234
|
});
|
|
40226
40235
|
}
|
|
@@ -40241,7 +40250,7 @@ var ju = class {
|
|
|
40241
40250
|
delay: 0
|
|
40242
40251
|
}), this.restoreAfterPlayback();
|
|
40243
40252
|
}
|
|
40244
|
-
restoreAfterPlayback =
|
|
40253
|
+
restoreAfterPlayback = ju(() => {
|
|
40245
40254
|
let e = this.mcMap.map;
|
|
40246
40255
|
e.setCenterClampedToGround(!0), e.style?.stylesheet && (e.style.stylesheet.transition = void 0);
|
|
40247
40256
|
}, 300);
|
|
@@ -40249,7 +40258,7 @@ var ju = class {
|
|
|
40249
40258
|
let i, a = /* @__PURE__ */ new Map();
|
|
40250
40259
|
for (let o of e) {
|
|
40251
40260
|
let { target: e } = o;
|
|
40252
|
-
e.type === "model" && e.modelType === t && e.groupId === n && (r === "opacity" &&
|
|
40261
|
+
e.type === "model" && e.modelType === t && e.groupId === n && (r === "opacity" && ru(o) || r === "scale" && iu(o)) && (e.modelId === void 0 ? i = o : a.set(e.modelId, o));
|
|
40253
40262
|
}
|
|
40254
40263
|
return {
|
|
40255
40264
|
groupAnimation: i,
|
|
@@ -40263,7 +40272,7 @@ var ju = class {
|
|
|
40263
40272
|
let { target: e } = n;
|
|
40264
40273
|
e.type === "layer" && e.ids.includes(t.id) && e.ids.length < o && (a = n, o = e.ids.length);
|
|
40265
40274
|
}
|
|
40266
|
-
return a === void 0 ? i === void 0 ? void 0 :
|
|
40275
|
+
return a === void 0 ? i === void 0 ? void 0 : au(i, "fade", n) : au(a, "fade", n);
|
|
40267
40276
|
}
|
|
40268
40277
|
setLayerOpacity(e, t) {
|
|
40269
40278
|
let n = this.mcMap.map;
|
|
@@ -40273,11 +40282,11 @@ var ju = class {
|
|
|
40273
40282
|
let t = this.mcMap.map;
|
|
40274
40283
|
e.type === "fill" ? t.setPaintProperty(e.id, "fill-opacity", e.paint?.["fill-opacity"] ?? 1) : e.type === "line" ? t.setPaintProperty(e.id, "line-opacity", e.paint?.["line-opacity"] ?? 1) : e.type === "circle" ? (t.setPaintProperty(e.id, "circle-opacity", e.paint?.["circle-opacity"] ?? 1), t.setPaintProperty(e.id, "circle-stroke-opacity", e.paint?.["circle-stroke-opacity"] ?? 1)) : e.type === "heatmap" ? t.setPaintProperty(e.id, "heatmap-opacity", e.paint?.["heatmap-opacity"] ?? 1) : e.type === "fill-extrusion" ? t.setPaintProperty(e.id, "fill-extrusion-opacity", e.paint?.["fill-extrusion-opacity"] ?? 1) : e.type === "symbol" ? (t.setPaintProperty(e.id, "icon-opacity", e.paint?.["icon-opacity"] ?? 1), t.setPaintProperty(e.id, "text-opacity", e.paint?.["text-opacity"] ?? 1)) : e.type === "raster" ? t.setPaintProperty(e.id, "raster-opacity", e.paint?.["raster-opacity"] ?? 1) : e.type === "hillshade" ? t.setPaintProperty(e.id, "hillshade-exaggeration", e.paint?.["hillshade-exaggeration"] ?? .5) : e.type === "color-relief" ? t.setPaintProperty(e.id, "color-relief-opacity", e.paint?.["color-relief-opacity"] ?? 1) : e.type === "background" && t.setPaintProperty(e.id, "background-opacity", e.paint?.["background-opacity"] ?? 1), t.setLayoutProperty(e.id, "visibility", this.layerInfo[e.id]?.visibility ? "visible" : "none");
|
|
40275
40284
|
}
|
|
40276
|
-
},
|
|
40285
|
+
}, Pu = class extends l.Evented {
|
|
40277
40286
|
map;
|
|
40278
40287
|
video;
|
|
40279
40288
|
constructor(e, t, n, r, i, a, o) {
|
|
40280
|
-
super(), this.map = e, this.video = new
|
|
40289
|
+
super(), this.map = e, this.video = new Nu(this, t, n, r, i, a, o);
|
|
40281
40290
|
}
|
|
40282
40291
|
on(e, t) {
|
|
40283
40292
|
return super.on(e, t);
|
|
@@ -40306,9 +40315,9 @@ var ju = class {
|
|
|
40306
40315
|
};
|
|
40307
40316
|
//#endregion
|
|
40308
40317
|
//#region src/initMap.ts
|
|
40309
|
-
async function
|
|
40310
|
-
let { accessToken: t, mode: n = "sdk", env: r = "production" } = e, i = r === "bleeding" ? "https://vapi.bleeding.mc-cdn.io" : r === "beta" ? "https://vapi.beta.mc-cdn.io" : "https://vapi.mc-cdn.io", a = r === "bleeding" ? "https://cdn.bleeding.mapcreator.io" : r === "beta" ? "https://cdn.beta.mapcreator.io" : "https://cdn.mapcreator.io", o = typeof e.job == "string" ? await
|
|
40311
|
-
await
|
|
40318
|
+
async function Fu(e) {
|
|
40319
|
+
let { accessToken: t, mode: n = "sdk", env: r = "production" } = e, i = r === "bleeding" ? "https://vapi.bleeding.mc-cdn.io" : r === "beta" ? "https://vapi.beta.mc-cdn.io" : "https://vapi.mc-cdn.io", a = r === "bleeding" ? "https://cdn.bleeding.mapcreator.io" : r === "beta" ? "https://cdn.beta.mapcreator.io" : "https://cdn.mapcreator.io", o = typeof e.job == "string" ? await Iu(e.job, a, t) : e.job;
|
|
40320
|
+
await Lu();
|
|
40312
40321
|
let s = new l.Map({
|
|
40313
40322
|
container: e.container,
|
|
40314
40323
|
attributionControl: !1,
|
|
@@ -40322,17 +40331,17 @@ async function Nu(e) {
|
|
|
40322
40331
|
maxPitch: 85,
|
|
40323
40332
|
maxZoom: 22,
|
|
40324
40333
|
locale: {
|
|
40325
|
-
"CooperativeGesturesHandler.WindowsHelpText":
|
|
40326
|
-
"CooperativeGesturesHandler.MacHelpText":
|
|
40327
|
-
"CooperativeGesturesHandler.MobileHelpText":
|
|
40334
|
+
"CooperativeGesturesHandler.WindowsHelpText": zi("windowsHelpText"),
|
|
40335
|
+
"CooperativeGesturesHandler.MacHelpText": zi("macHelpText"),
|
|
40336
|
+
"CooperativeGesturesHandler.MobileHelpText": zi("mobileHelpText")
|
|
40328
40337
|
},
|
|
40329
40338
|
canvasContextAttributes: { preserveDrawingBuffer: n === "video" }
|
|
40330
40339
|
}), c = s.getContainer();
|
|
40331
40340
|
c.classList.add("mc-map"), c.classList.add(`mc-mode-${n}`);
|
|
40332
|
-
let d = new
|
|
40333
|
-
|
|
40341
|
+
let d = new Rr(s), p = new Hl(s, n), { map: { language: h, pitch: _ = 0, rotation: v = 0, center: y, hideBasemap: b, detailLevel: x = 0, projection: S = "mercator", terrain: C = !1, terrainExaggeration: w = 1 }, registry: T = {}, web: E, positionOffsets: D, title: O } = o, { models: k = {}, slots: A = {}, svgs: j = {} } = T;
|
|
40342
|
+
Bu(r, i, t), s.resize(), n === "app" && (document.title = O ? `${O} - Mapcreator` : "Mapcreator"), s.setPitch(_), s.setBearing(v);
|
|
40334
40343
|
let M = N(o, c), P, F;
|
|
40335
|
-
if (n === "video" ? (F = o.map.zoom - x, P = M) : (F = o.map.zoom - x + Math.log2(M), P = 1), s.setScale(P), s.setZoom(F), s.setCenter(y), s.setDetailLevel(x), s.setMinZoom(x), s.addControl(new l.AttributionControl({ compact: !1 })), n === "app" && s.cooperativeGestures.enable(),
|
|
40344
|
+
if (n === "video" ? (F = o.map.zoom - x, P = M) : (F = o.map.zoom - x + Math.log2(M), P = 1), s.setScale(P), s.setZoom(F), s.setCenter(y), s.setDetailLevel(x), s.setMinZoom(x), s.addControl(new l.AttributionControl({ compact: !1 })), n === "app" && s.cooperativeGestures.enable(), ll(o, D ?? g, s, {
|
|
40336
40345
|
center: y,
|
|
40337
40346
|
zoom: F,
|
|
40338
40347
|
pitch: _,
|
|
@@ -40342,16 +40351,16 @@ async function Nu(e) {
|
|
|
40342
40351
|
e && (s.boxZoom.disable(), s.doubleClickZoom.disable(), s.dragPan.disable(), s.dragRotate.disable(), s.keyboard.disable(), s.scrollZoom.disable(), s.touchPitch.disable(), s.touchZoomRotate.disable()), p.setParams(t, m(h, f.TWO), e, y);
|
|
40343
40352
|
}
|
|
40344
40353
|
let ee = await fetch(`${i}/styles/${o.meta.mapstyleSet}.json?access_token=${t}`).then((e) => e.json());
|
|
40345
|
-
s.setStyle(null), s.setStyle(ee), await s.once("style.load"), n === "app" &&
|
|
40346
|
-
let I = await
|
|
40347
|
-
|
|
40348
|
-
let ne =
|
|
40349
|
-
return
|
|
40354
|
+
s.setStyle(null), s.setStyle(ee), await s.once("style.load"), n === "app" && Vu(s.getStyle().metadata?.customCssFilePath, t), u(h, s);
|
|
40355
|
+
let I = await Sl(o.map.overlays ?? [], o.meta.layers ?? [], s, i, t, ee.metadata?.styleOverride), te = (o.map.overlays ?? []).reduce((e, t, n) => e.set(t, I[n]), /* @__PURE__ */ new Map());
|
|
40356
|
+
Wu(s, d, k, A, j, i, t), u(h, s), p.setPublication(ee.metadata?.publication), p.setpopupElements(), p.setHighlightManager(), s.setProjection({ type: S === "globe" ? "globe" : "mercator" }), Ru(s, S), C && zu(s, i, t, w);
|
|
40357
|
+
let ne = Hu(o.map.layerInfo, ee, I);
|
|
40358
|
+
return Uu(s, ne, !b), new Pu(s, o, j, d, ee, te, ne);
|
|
40350
40359
|
}
|
|
40351
|
-
function
|
|
40360
|
+
function Iu(e, t, n) {
|
|
40352
40361
|
return fetch(`${t}/jobs/${e}.json?access_token=${n}`).then((e) => e.json());
|
|
40353
40362
|
}
|
|
40354
|
-
function
|
|
40363
|
+
function Lu() {
|
|
40355
40364
|
return new Promise((e) => {
|
|
40356
40365
|
let t = () => {
|
|
40357
40366
|
window.innerWidth > 0 && window.innerHeight > 0 && (window.removeEventListener("resize", t), e());
|
|
@@ -40359,7 +40368,7 @@ function Fu() {
|
|
|
40359
40368
|
window.addEventListener("resize", t), t();
|
|
40360
40369
|
});
|
|
40361
40370
|
}
|
|
40362
|
-
function
|
|
40371
|
+
function Ru(e, t) {
|
|
40363
40372
|
let n = e.getStyle().metadata ?? {}, r = n["mc:background-color"] ?? "#f8f8f8", i = n["mc:background-color-globe"] ?? "#000000";
|
|
40364
40373
|
e.getContainer().style.backgroundColor = t === "globe" ? i : r, e.setSky(e.getStyle().sky ?? h), e.setLight({ position: [
|
|
40365
40374
|
1.15,
|
|
@@ -40367,7 +40376,7 @@ function Iu(e, t) {
|
|
|
40367
40376
|
45
|
|
40368
40377
|
] });
|
|
40369
40378
|
}
|
|
40370
|
-
function
|
|
40379
|
+
function zu(e, t, n, r) {
|
|
40371
40380
|
e.addSource("mc-dem", {
|
|
40372
40381
|
type: "raster-dem",
|
|
40373
40382
|
tiles: [`${t}/dataset/jaxa_terrainrgb/{z}/{x}/{y}?access_token=${n}`],
|
|
@@ -40379,57 +40388,57 @@ function Lu(e, t, n, r) {
|
|
|
40379
40388
|
exaggeration: r
|
|
40380
40389
|
});
|
|
40381
40390
|
}
|
|
40382
|
-
function
|
|
40391
|
+
function Bu(e, t, n) {
|
|
40383
40392
|
let r = `${t}/stylesheets/ff-${e === "beta" ? "b-" : ""}${n}.css?access_token=${n}`, i = document.createElement("link");
|
|
40384
40393
|
i.setAttribute("rel", "stylesheet"), i.setAttribute("href", r), i.setAttribute("type", "text/css"), document.head.insertBefore(i, document.head.firstChild);
|
|
40385
40394
|
}
|
|
40386
|
-
function
|
|
40395
|
+
function Vu(e, t) {
|
|
40387
40396
|
if (document.getElementById("custom-style")?.remove(), !e) return;
|
|
40388
40397
|
let n;
|
|
40389
40398
|
e.startsWith("http") ? (e = `${e}?access_token=${t}`, n = document.createElement("link"), n.setAttribute("rel", "stylesheet"), n.setAttribute("href", e.replace(/https?:/, ""))) : (n = document.createElement("style"), n.appendChild(document.createTextNode(e))), n.setAttribute("id", "custom-style"), n.setAttribute("type", "text/css"), document.head.appendChild(n);
|
|
40390
40399
|
}
|
|
40391
|
-
function
|
|
40400
|
+
function Hu(e, t, n) {
|
|
40392
40401
|
let r = e?.reduce((e, t) => (e[t.id] = { visibility: t.visibility }, e), {}) ?? {}, i = {};
|
|
40393
40402
|
for (let e of t.layers) i[e.id] = r[e.id] ?? { visibility: (e.layout?.visibility ?? "visible") === "visible" };
|
|
40394
40403
|
for (let e of n) for (let t of e.layers) i[t.id] = r[t.id] ?? { visibility: !1 };
|
|
40395
40404
|
return i;
|
|
40396
40405
|
}
|
|
40397
|
-
function
|
|
40406
|
+
function Uu(e, t, n) {
|
|
40398
40407
|
for (let r in t) e.getLayer(r) !== void 0 && e.setLayoutProperty(r, "visibility", t[r].visibility && n ? "visible" : "none");
|
|
40399
40408
|
}
|
|
40400
|
-
function
|
|
40409
|
+
function Wu(e, t, n, r, i, a, o) {
|
|
40401
40410
|
let { beforeNone: s = [], beforeNames: c = [], beforeBoundaries: l = [], beforeWaters: u = [] } = r;
|
|
40402
40411
|
s.forEach((r) => {
|
|
40403
|
-
|
|
40412
|
+
Gu(e, t, n, r, i, "mc-before-none", a, o);
|
|
40404
40413
|
}), c.forEach((r) => {
|
|
40405
|
-
|
|
40414
|
+
Gu(e, t, n, r, i, "mc-before-names", a, o);
|
|
40406
40415
|
}), l.forEach((r) => {
|
|
40407
|
-
|
|
40416
|
+
Gu(e, t, n, r, i, "mc-before-boundaries", a, o);
|
|
40408
40417
|
}), u.forEach((r) => {
|
|
40409
|
-
|
|
40418
|
+
Gu(e, t, n, r, i, "mc-before-waters", a, o);
|
|
40410
40419
|
});
|
|
40411
40420
|
}
|
|
40412
|
-
function
|
|
40421
|
+
function Gu(e, t, n, r, i, a, o, s) {
|
|
40413
40422
|
if (r.type === "marker") {
|
|
40414
40423
|
let o = n.marker?.find((e) => e.id === r.groupId);
|
|
40415
|
-
o &&
|
|
40424
|
+
o && yl(e, o, a, i, t);
|
|
40416
40425
|
} else if (r.type === "polygon") {
|
|
40417
40426
|
let o = n.polygon?.find((e) => e.id === r.groupId);
|
|
40418
|
-
o &&
|
|
40427
|
+
o && ml(e, o, a, i, t);
|
|
40419
40428
|
} else if (r.type === "circle") {
|
|
40420
40429
|
let o = n.circle?.find((e) => e.id === r.groupId);
|
|
40421
|
-
o &&
|
|
40430
|
+
o && gl(e, o, a, i, t);
|
|
40422
40431
|
} else if (r.type === "line") {
|
|
40423
40432
|
let i = n.line?.find((e) => e.id === r.groupId);
|
|
40424
|
-
i &&
|
|
40433
|
+
i && Gl(e, i, a, t);
|
|
40425
40434
|
} else if (r.type === "dot") {
|
|
40426
40435
|
let t = n.dot?.find((e) => e.id === r.groupId);
|
|
40427
|
-
t &&
|
|
40436
|
+
t && Yl(e, t, a);
|
|
40428
40437
|
} else if (r.type === "area") {
|
|
40429
40438
|
let c = n.area?.find((e) => e.id === r.groupId);
|
|
40430
|
-
c &&
|
|
40439
|
+
c && Jl(e, c, a, i, t, o, s);
|
|
40431
40440
|
}
|
|
40432
40441
|
}
|
|
40433
40442
|
//#endregion
|
|
40434
|
-
var
|
|
40435
|
-
export {
|
|
40443
|
+
var Ku = l.setRTLTextPlugin;
|
|
40444
|
+
export { Fu as initMap, Ku as setRTLTextPlugin };
|