@eyeon/map 2.0.4 → 2.0.6
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/chunks/MapViewer.js +357 -355
- package/dist/chunks/MapViewer.js.map +1 -1
- package/dist/chunks/stacking.js +83 -93
- package/dist/chunks/stacking.js.map +1 -1
- package/dist/chunks/wheelZoom.js +5 -5
- package/dist/chunks/wheelZoom.js.map +1 -1
- package/dist/core/assignment.d.ts +20 -8
- package/dist/core/assignment.d.ts.map +1 -1
- package/dist/core/import/index.d.ts.map +1 -1
- package/dist/core/layerStyles.d.ts +3 -4
- package/dist/core/layerStyles.d.ts.map +1 -1
- package/dist/core/outdoorDecoration.d.ts +2 -1
- package/dist/core/outdoorDecoration.d.ts.map +1 -1
- package/dist/core/publish/index.d.ts +3 -1
- package/dist/core/publish/index.d.ts.map +1 -1
- package/dist/core/types.d.ts +3 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/editor/canvas/EditorCanvas.d.ts.map +1 -1
- package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts +2 -1
- package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts.map +1 -1
- package/dist/editor/index.js +380 -370
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/panels/AssignForm.d.ts.map +1 -1
- package/dist/editor/railListCopy.d.ts.map +1 -1
- package/dist/viewer/ui/MapControls.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/chunks/stacking.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import Ut from "ngraph.graph";
|
|
2
|
-
import
|
|
3
|
-
const
|
|
2
|
+
import Vt from "ngraph.path";
|
|
3
|
+
const Ht = "transparent";
|
|
4
4
|
function ht(t) {
|
|
5
5
|
const e = (t ?? "").trim().toLowerCase();
|
|
6
|
-
return e ===
|
|
6
|
+
return e === Ht || e === "none";
|
|
7
7
|
}
|
|
8
8
|
const vt = "#E9F7FC", Zt = [
|
|
9
9
|
"green-area",
|
|
10
10
|
"water-area",
|
|
11
11
|
"parking-lane",
|
|
12
|
-
"parking-line",
|
|
13
12
|
"parking-icon",
|
|
14
13
|
"walking-path"
|
|
15
14
|
], jt = {
|
|
@@ -34,12 +33,6 @@ const vt = "#E9F7FC", Zt = [
|
|
|
34
33
|
renderOrder: 2,
|
|
35
34
|
extrudeHeight: 1
|
|
36
35
|
},
|
|
37
|
-
"parking-line": {
|
|
38
|
-
stroke: "#DDDDDD",
|
|
39
|
-
strokeWidth: 0.6,
|
|
40
|
-
renderOrder: 6,
|
|
41
|
-
extrudeHeight: 0.5
|
|
42
|
-
},
|
|
43
36
|
"parking-icon": {
|
|
44
37
|
fill: "#CCCCCC",
|
|
45
38
|
renderOrder: 7,
|
|
@@ -185,7 +178,7 @@ function Bn(t) {
|
|
|
185
178
|
const e = ge(t);
|
|
186
179
|
return e.complete ? { display: String(e.render), render: e.render } : { display: "0", render: 0 };
|
|
187
180
|
}
|
|
188
|
-
function
|
|
181
|
+
function w(t) {
|
|
189
182
|
if (t == null) return null;
|
|
190
183
|
const e = String(t).trim();
|
|
191
184
|
return e || null;
|
|
@@ -209,7 +202,7 @@ function Pt(t) {
|
|
|
209
202
|
function Xn(t) {
|
|
210
203
|
return t === "amenity" ? "amenity" : t === "kiosk_screen" ? "kiosk" : t === "unit" || t === "parking_zone" ? "retailer" : "none";
|
|
211
204
|
}
|
|
212
|
-
function
|
|
205
|
+
function Kn(t, e) {
|
|
213
206
|
return {
|
|
214
207
|
shapeId: t,
|
|
215
208
|
targetType: "none",
|
|
@@ -229,7 +222,7 @@ function Gn(t, e) {
|
|
|
229
222
|
textColor: null
|
|
230
223
|
};
|
|
231
224
|
}
|
|
232
|
-
function
|
|
225
|
+
function Gn(t, e = "unit") {
|
|
233
226
|
const n = t.layerType ?? t.layer_type, o = t.unitStatus ?? t.unit_status ?? "vacant";
|
|
234
227
|
return {
|
|
235
228
|
shapeId: U(
|
|
@@ -247,13 +240,13 @@ function Kn(t, e = "unit") {
|
|
|
247
240
|
t.kioskId ?? t.kiosk_id
|
|
248
241
|
),
|
|
249
242
|
unitStatus: o || "vacant",
|
|
250
|
-
unitNumber:
|
|
243
|
+
unitNumber: w(
|
|
251
244
|
t.unitNumber ?? t.unit_number
|
|
252
245
|
),
|
|
253
246
|
customLabel: be(
|
|
254
247
|
t.customLabel ?? t.custom_label
|
|
255
248
|
),
|
|
256
|
-
customImageKey:
|
|
249
|
+
customImageKey: w(
|
|
257
250
|
t.customImageKey ?? t.custom_image_key
|
|
258
251
|
),
|
|
259
252
|
layerType: ke(n) ? n : Pt(e),
|
|
@@ -267,10 +260,10 @@ function Kn(t, e = "unit") {
|
|
|
267
260
|
t.offsetY ?? t.offset_y,
|
|
268
261
|
0
|
|
269
262
|
),
|
|
270
|
-
bgColor:
|
|
263
|
+
bgColor: w(
|
|
271
264
|
t.bgColor ?? t.bg_color
|
|
272
265
|
),
|
|
273
|
-
textColor:
|
|
266
|
+
textColor: w(
|
|
274
267
|
t.textColor ?? t.text_color
|
|
275
268
|
),
|
|
276
269
|
align: Ie(t.align)
|
|
@@ -299,14 +292,14 @@ function Un(t) {
|
|
|
299
292
|
const n = Number(e);
|
|
300
293
|
return Number.isSafeInteger(n) && n > 0 ? n : null;
|
|
301
294
|
}
|
|
302
|
-
function
|
|
295
|
+
function Vn(t, e) {
|
|
303
296
|
var r;
|
|
304
297
|
const n = e == null ? void 0 : e.trim();
|
|
305
298
|
if (n) return n;
|
|
306
299
|
const o = (r = t == null ? void 0 : t.customLabel) == null ? void 0 : r.trim();
|
|
307
300
|
return o || ((t == null ? void 0 : t.amenityId) != null ? `Amenity ${t.amenityId}` : null);
|
|
308
301
|
}
|
|
309
|
-
function
|
|
302
|
+
function Hn(t, e) {
|
|
310
303
|
var r;
|
|
311
304
|
const n = (r = t == null ? void 0 : t.customLabel) == null ? void 0 : r.trim();
|
|
312
305
|
if (n) return n;
|
|
@@ -329,15 +322,15 @@ function Ft(t, e, n) {
|
|
|
329
322
|
{ style: t.style ?? {}, label: t.label },
|
|
330
323
|
e,
|
|
331
324
|
n
|
|
332
|
-
).label : t.label : _e.has(t.kind) ? X(e) ?
|
|
333
|
-
{ style: t.style ?? {}, label: t.label },
|
|
334
|
-
e,
|
|
335
|
-
n
|
|
336
|
-
).label : !((o = t.label) != null && o.text) && !((r = t.label) != null && r.imageKey) ? t.label : {
|
|
325
|
+
).label : t.label : _e.has(t.kind) ? !e || !X(e) ? !((o = t.label) != null && o.text) && !((r = t.label) != null && r.imageKey) ? t.label : {
|
|
337
326
|
...t.label,
|
|
338
327
|
text: void 0,
|
|
339
328
|
imageKey: void 0
|
|
340
|
-
} :
|
|
329
|
+
} : gt(
|
|
330
|
+
{ style: t.style ?? {}, label: t.label },
|
|
331
|
+
e,
|
|
332
|
+
n
|
|
333
|
+
).label : t.label;
|
|
341
334
|
}
|
|
342
335
|
function Ce(t, e) {
|
|
343
336
|
if (X(t)) {
|
|
@@ -349,7 +342,7 @@ function Ce(t, e) {
|
|
|
349
342
|
}
|
|
350
343
|
function Yt(t, e, n) {
|
|
351
344
|
if (!(!X(t) || !t) && !(t.layerType !== "retail_logo" && t.layerType !== "custom_image"))
|
|
352
|
-
return Se(t, e) ??
|
|
345
|
+
return Se(t, e) ?? w(n == null ? void 0 : n.imageKey) ?? void 0;
|
|
353
346
|
}
|
|
354
347
|
function Zn(t, e) {
|
|
355
348
|
var n, o;
|
|
@@ -367,8 +360,7 @@ function jn(t) {
|
|
|
367
360
|
const e = t.assignment, n = t.label;
|
|
368
361
|
return {
|
|
369
362
|
size: Ae(
|
|
370
|
-
(e == null ? void 0 : e.size) ?? (n == null ? void 0 : n.size) ?? he
|
|
371
|
-
e
|
|
363
|
+
(e == null ? void 0 : e.size) ?? (n == null ? void 0 : n.size) ?? he
|
|
372
364
|
),
|
|
373
365
|
rotate: (e == null ? void 0 : e.rotate) ?? (n == null ? void 0 : n.rotate) ?? 0,
|
|
374
366
|
offsetX: (e == null ? void 0 : e.offsetX) ?? (n == null ? void 0 : n.offsetX) ?? 0,
|
|
@@ -383,9 +375,9 @@ function qn(t, e) {
|
|
|
383
375
|
function Se(t, e) {
|
|
384
376
|
if (X(t)) {
|
|
385
377
|
if (t.layerType === "retail_logo")
|
|
386
|
-
return
|
|
378
|
+
return w(e == null ? void 0 : e.logoKey) ?? w(e == null ? void 0 : e.logoUrl) ?? w(t.customImageKey) ?? void 0;
|
|
387
379
|
if (t.layerType === "custom_image")
|
|
388
|
-
return
|
|
380
|
+
return w(t.customImageKey) ?? void 0;
|
|
389
381
|
}
|
|
390
382
|
}
|
|
391
383
|
function ot(t) {
|
|
@@ -468,7 +460,7 @@ function oo(t, e) {
|
|
|
468
460
|
function ro(t, e) {
|
|
469
461
|
return t.map((n) => ({ x: n.x, y: e - n.y }));
|
|
470
462
|
}
|
|
471
|
-
function
|
|
463
|
+
function P(t, e) {
|
|
472
464
|
const n = t.x - e.x, o = t.y - e.y;
|
|
473
465
|
return Math.hypot(n, o);
|
|
474
466
|
}
|
|
@@ -511,11 +503,11 @@ function so(t, e) {
|
|
|
511
503
|
function Re(t, e, n) {
|
|
512
504
|
const o = n.x - e.x, r = n.y - e.y, s = o * o + r * r;
|
|
513
505
|
if (s === 0)
|
|
514
|
-
return { point: { ...e }, t: 0, distance:
|
|
506
|
+
return { point: { ...e }, t: 0, distance: P(t, e) };
|
|
515
507
|
let u = ((t.x - e.x) * o + (t.y - e.y) * r) / s;
|
|
516
508
|
u = Math.max(0, Math.min(1, u));
|
|
517
509
|
const a = { x: e.x + u * o, y: e.y + u * r };
|
|
518
|
-
return { point: a, t: u, distance:
|
|
510
|
+
return { point: a, t: u, distance: P(t, a) };
|
|
519
511
|
}
|
|
520
512
|
function co(t, e) {
|
|
521
513
|
if (e.length < 2) return null;
|
|
@@ -559,15 +551,15 @@ function Ne(t, e, n, o, r, s, u) {
|
|
|
559
551
|
const N = Math.sqrt(h);
|
|
560
552
|
a *= N, i *= N;
|
|
561
553
|
}
|
|
562
|
-
const m = a * a, b = i * i, x = m * b - m * f * f - b * d * d, g = m * f * f + b * d * d, I = Math.sqrt(Math.max(0, x / g)) * (r === s ? -1 : 1), C = I * a * f / i, _ = -I * i * d / a, A = p * C - l * _ + (t.x + u.x) / 2, M = l * C + p * _ + (t.y + u.y) / 2, L = (d - C) / a,
|
|
563
|
-
let S = Math.atan2(L *
|
|
554
|
+
const m = a * a, b = i * i, x = m * b - m * f * f - b * d * d, g = m * f * f + b * d * d, I = Math.sqrt(Math.max(0, x / g)) * (r === s ? -1 : 1), C = I * a * f / i, _ = -I * i * d / a, A = p * C - l * _ + (t.x + u.x) / 2, M = l * C + p * _ + (t.y + u.y) / 2, L = (d - C) / a, F = (f - _) / i, R = (-d - C) / a, Y = (-f - _) / i, K = Math.atan2(F, L);
|
|
555
|
+
let S = Math.atan2(L * Y - F * R, L * R + F * Y);
|
|
564
556
|
!s && S > 0 ? S -= 2 * Math.PI : s && S < 0 && (S += 2 * Math.PI);
|
|
565
|
-
const O = Math.abs(S) / (Math.PI / 2) * ve,
|
|
566
|
-
for (let N = 1; N <=
|
|
567
|
-
const $ =
|
|
557
|
+
const O = Math.abs(S) / (Math.PI / 2) * ve, D = Math.max(1, Math.round(O)), v = [{ ...t }];
|
|
558
|
+
for (let N = 1; N <= D; N++) {
|
|
559
|
+
const $ = K + S * N / D, H = Math.cos($), Z = Math.sin($);
|
|
568
560
|
v.push({
|
|
569
|
-
x: A + a * p *
|
|
570
|
-
y: M + a * l *
|
|
561
|
+
x: A + a * p * H - i * l * Z,
|
|
562
|
+
y: M + a * l * H + i * p * Z
|
|
571
563
|
});
|
|
572
564
|
}
|
|
573
565
|
return v[v.length - 1] = { ...u }, v;
|
|
@@ -787,7 +779,7 @@ function Xe(t) {
|
|
|
787
779
|
}
|
|
788
780
|
return e;
|
|
789
781
|
}
|
|
790
|
-
function
|
|
782
|
+
function Ke(t) {
|
|
791
783
|
const e = /* @__PURE__ */ new Map(), n = t.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
792
784
|
for (const o of n.matchAll(/([^{]+)\{([^}]*)\}/g)) {
|
|
793
785
|
const r = o[1].split(",").map((u) => u.trim()), s = Xe(o[2]);
|
|
@@ -803,7 +795,7 @@ function Ge(t) {
|
|
|
803
795
|
}
|
|
804
796
|
return e;
|
|
805
797
|
}
|
|
806
|
-
function
|
|
798
|
+
function Ge(t, e) {
|
|
807
799
|
const n = {};
|
|
808
800
|
for (const o of t.split(/\s+/).map((r) => r.trim()).filter(Boolean))
|
|
809
801
|
Object.assign(n, e.get(o) || {});
|
|
@@ -816,14 +808,14 @@ function $e(t) {
|
|
|
816
808
|
if (e.length === 0) return t;
|
|
817
809
|
const o = /* @__PURE__ */ new Map();
|
|
818
810
|
for (const r of e)
|
|
819
|
-
for (const [s, u] of
|
|
811
|
+
for (const [s, u] of Ke(r))
|
|
820
812
|
o.set(s, { ...o.get(s) || {}, ...u });
|
|
821
813
|
return o.size === 0 ? t : t.replace(
|
|
822
814
|
/<(path|polygon|polyline|line|rect|g|circle|ellipse)\b([^>]*)>/gi,
|
|
823
815
|
(r, s, u) => {
|
|
824
816
|
const a = /\/\s*$/.test(u), i = u.replace(/\/\s*$/, ""), y = i.match(/\bclass\s*=\s*["']([^"']*)["']/i);
|
|
825
817
|
if (!y) return r;
|
|
826
|
-
const p =
|
|
818
|
+
const p = Ge(y[1], o);
|
|
827
819
|
let l = i;
|
|
828
820
|
for (const [k, c] of Object.entries(p)) {
|
|
829
821
|
const d = Be[k];
|
|
@@ -847,7 +839,7 @@ function it(t, e) {
|
|
|
847
839
|
};
|
|
848
840
|
}
|
|
849
841
|
const ft = { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 };
|
|
850
|
-
function
|
|
842
|
+
function V(t, e) {
|
|
851
843
|
return {
|
|
852
844
|
a: t.a * e.a + t.c * e.b,
|
|
853
845
|
b: t.b * e.a + t.d * e.b,
|
|
@@ -873,7 +865,7 @@ function Ue(t) {
|
|
|
873
865
|
const e = t * Math.PI / 180, n = Math.cos(e), o = Math.sin(e);
|
|
874
866
|
return { a: n, b: o, c: -o, d: n, e: 0, f: 0 };
|
|
875
867
|
}
|
|
876
|
-
function
|
|
868
|
+
function Ve(t, e) {
|
|
877
869
|
switch (t) {
|
|
878
870
|
case "matrix":
|
|
879
871
|
return e.length < 6 ? null : { a: e[0], b: e[1], c: e[2], d: e[3], e: e[4], f: e[5] };
|
|
@@ -889,8 +881,8 @@ function He(t, e) {
|
|
|
889
881
|
const n = Ue(e[0]);
|
|
890
882
|
if (e.length < 3) return n;
|
|
891
883
|
const o = e[1], r = e[2];
|
|
892
|
-
return
|
|
893
|
-
|
|
884
|
+
return V(
|
|
885
|
+
V(st(o, r), n),
|
|
894
886
|
st(-o, -r)
|
|
895
887
|
);
|
|
896
888
|
}
|
|
@@ -911,17 +903,17 @@ function Ct(t) {
|
|
|
911
903
|
for (; (n = _t.exec(t)) !== null; ) {
|
|
912
904
|
const o = n[1].toLowerCase(), r = n[2].trim().split(/[\s,]+/).filter(Boolean).map(Number);
|
|
913
905
|
if (r.some((u) => Number.isNaN(u))) continue;
|
|
914
|
-
const s =
|
|
915
|
-
s && (e =
|
|
906
|
+
const s = Ve(o, r);
|
|
907
|
+
s && (e = V(e, s));
|
|
916
908
|
}
|
|
917
909
|
return e;
|
|
918
910
|
}
|
|
919
|
-
function
|
|
911
|
+
function G(t) {
|
|
920
912
|
if (!Number.isFinite(t)) return "0";
|
|
921
913
|
const e = Math.round(t * 1e4) / 1e4;
|
|
922
914
|
return Object.is(e, -0) ? "0" : String(e);
|
|
923
915
|
}
|
|
924
|
-
function
|
|
916
|
+
function He(t, e, n, o) {
|
|
925
917
|
const r = o * Math.PI / 180, s = Math.cos(r), u = Math.sin(r), a = s * e, i = u * e, y = -u * n, p = s * n, l = t.a * a + t.c * i, k = t.b * a + t.d * i, c = t.a * y + t.c * p, d = t.b * y + t.d * p, f = (l + d) / 2, h = (l - d) / 2, m = (k + c) / 2, b = (k - c) / 2, x = Math.hypot(f, b), g = Math.hypot(h, m), I = Math.abs(x + g), C = Math.abs(x - g), _ = Math.atan2(m, h), M = (Math.atan2(b, f) + _) / 2 * (180 / Math.PI);
|
|
926
918
|
return { rx: I, ry: C, phiDeg: M };
|
|
927
919
|
}
|
|
@@ -933,7 +925,7 @@ function Ze(t, e) {
|
|
|
933
925
|
const d = Number(n[s++]);
|
|
934
926
|
return Number.isNaN(d) ? 0 : d;
|
|
935
927
|
}, k = (d, ...f) => {
|
|
936
|
-
o.push(d + (f.length ? " " + f.map(
|
|
928
|
+
o.push(d + (f.length ? " " + f.map(G).join(" ") : ""));
|
|
937
929
|
}, c = (d, f) => {
|
|
938
930
|
const h = ze(e, { x: d, y: f });
|
|
939
931
|
return [h.x, h.y];
|
|
@@ -991,9 +983,9 @@ function Ze(t, e) {
|
|
|
991
983
|
}
|
|
992
984
|
case "A":
|
|
993
985
|
case "a": {
|
|
994
|
-
const f = u === "a", h = l(), m = l(), b = l(), x = l(), g = l(), I = f ? a + l() : l(), C = f ? i + l() : l(), _ =
|
|
986
|
+
const f = u === "a", h = l(), m = l(), b = l(), x = l(), g = l(), I = f ? a + l() : l(), C = f ? i + l() : l(), _ = He(e, h, m, b), [A, M] = c(I, C);
|
|
995
987
|
o.push(
|
|
996
|
-
`A ${
|
|
988
|
+
`A ${G(_.rx)} ${G(_.ry)} ${G(_.phiDeg)} ${x ? 1 : 0} ${(g ? 1 : 0) ^ (r ? 1 : 0)} ${G(A)} ${G(M)}`
|
|
997
989
|
), a = I, i = C;
|
|
998
990
|
break;
|
|
999
991
|
}
|
|
@@ -1033,14 +1025,12 @@ const je = [
|
|
|
1033
1025
|
{ prefix: "overlay", kind: "decor" },
|
|
1034
1026
|
{ prefix: "green-area", kind: "green_area" },
|
|
1035
1027
|
{ prefix: "parking-lane", kind: "parking_zone" },
|
|
1036
|
-
{ prefix: "parking-line", kind: "decor" },
|
|
1037
1028
|
{ prefix: "parking-icon", kind: "parking_icon" },
|
|
1038
1029
|
{ prefix: "walking-path", kind: "walkable" },
|
|
1039
1030
|
{ prefix: "water", kind: "water" }
|
|
1040
1031
|
], qe = [
|
|
1041
1032
|
{ prefix: "parking-zone", kind: "parking_zone" },
|
|
1042
1033
|
{ prefix: "parking-lane", kind: "parking_zone" },
|
|
1043
|
-
{ prefix: "parking-line", kind: "decor" },
|
|
1044
1034
|
{ prefix: "parking-icon", kind: "parking_icon" },
|
|
1045
1035
|
{ prefix: "green-area", kind: "green_area" },
|
|
1046
1036
|
{ prefix: "water", kind: "water" },
|
|
@@ -1063,7 +1053,7 @@ function dt(t) {
|
|
|
1063
1053
|
const e = tt(t);
|
|
1064
1054
|
return e === "route path" || e.startsWith("route path ");
|
|
1065
1055
|
}
|
|
1066
|
-
function
|
|
1056
|
+
function Kt(t) {
|
|
1067
1057
|
const e = tt(t);
|
|
1068
1058
|
return e === "routes" || e === "route" || e === "wayfinding" || e === "wayfinding routes" || dt(t);
|
|
1069
1059
|
}
|
|
@@ -1087,7 +1077,7 @@ function tt(t) {
|
|
|
1087
1077
|
function pt(t) {
|
|
1088
1078
|
return /non[-_ ]?interactive/i.test(t);
|
|
1089
1079
|
}
|
|
1090
|
-
function
|
|
1080
|
+
function Gt(t) {
|
|
1091
1081
|
return pt(t) ? !1 : /^interactive( items)?( \d+)?$/.test(tt(t));
|
|
1092
1082
|
}
|
|
1093
1083
|
function $t(t) {
|
|
@@ -1095,7 +1085,7 @@ function $t(t) {
|
|
|
1095
1085
|
return e === "stores" || e === "store layer" || e === "units" || e === "unit layer";
|
|
1096
1086
|
}
|
|
1097
1087
|
function zt(t) {
|
|
1098
|
-
return
|
|
1088
|
+
return Gt(t) || pt(t) || $t(t) || Kt(t);
|
|
1099
1089
|
}
|
|
1100
1090
|
function ct(t) {
|
|
1101
1091
|
return t.interactiveContainer || t.nonInteractiveContainer || t.storeFolder;
|
|
@@ -1104,7 +1094,7 @@ function T(t, e) {
|
|
|
1104
1094
|
const n = t.match(new RegExp(`\\b${e}\\s*=\\s*["']([^"']*)["']`, "i"));
|
|
1105
1095
|
return n ? n[1] : null;
|
|
1106
1096
|
}
|
|
1107
|
-
function
|
|
1097
|
+
function B(t, e) {
|
|
1108
1098
|
const n = t.match(new RegExp(`\\b${e}\\s*=\\s*["']?(-?[\\d.]+)`, "i"));
|
|
1109
1099
|
return n ? Number(n[1]) : 0;
|
|
1110
1100
|
}
|
|
@@ -1117,7 +1107,7 @@ function en(t) {
|
|
|
1117
1107
|
);
|
|
1118
1108
|
}
|
|
1119
1109
|
function nn(t) {
|
|
1120
|
-
return t.some(pt) ? { interactiveContainer: !1, nonInteractiveContainer: !0, storeFolder: !1 } : t.some(
|
|
1110
|
+
return t.some(pt) ? { interactiveContainer: !1, nonInteractiveContainer: !0, storeFolder: !1 } : t.some(Gt) ? { interactiveContainer: !0, nonInteractiveContainer: !1, storeFolder: !1 } : t.some($t) ? { interactiveContainer: !1, nonInteractiveContainer: !1, storeFolder: !0 } : { interactiveContainer: !1, nonInteractiveContainer: !1, storeFolder: !1 };
|
|
1121
1111
|
}
|
|
1122
1112
|
function on(t) {
|
|
1123
1113
|
const e = t.trim().split(/[\s,]+/).map(Number);
|
|
@@ -1139,13 +1129,13 @@ function sn(t, e) {
|
|
|
1139
1129
|
}
|
|
1140
1130
|
if (t === "line")
|
|
1141
1131
|
return rn(
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1132
|
+
B(e, "x1"),
|
|
1133
|
+
B(e, "y1"),
|
|
1134
|
+
B(e, "x2"),
|
|
1135
|
+
B(e, "y2")
|
|
1146
1136
|
);
|
|
1147
1137
|
if (t === "rect") {
|
|
1148
|
-
const n =
|
|
1138
|
+
const n = B(e, "x"), o = B(e, "y"), r = B(e, "width"), s = B(e, "height");
|
|
1149
1139
|
return `M ${n} ${o} L ${n + r} ${o} L ${n + r} ${o + s} L ${n} ${o + s} Z`;
|
|
1150
1140
|
}
|
|
1151
1141
|
}
|
|
@@ -1213,35 +1203,35 @@ function cn(t) {
|
|
|
1213
1203
|
continue;
|
|
1214
1204
|
}
|
|
1215
1205
|
if (g === "g") {
|
|
1216
|
-
const O = T(I, "id"),
|
|
1206
|
+
const O = T(I, "id"), D = en(I), { interactiveContainer: v, nonInteractiveContainer: N, storeFolder: $ } = nn(D), H = l();
|
|
1217
1207
|
O && c();
|
|
1218
1208
|
const Z = {
|
|
1219
1209
|
id: O,
|
|
1220
1210
|
interactiveContainer: v,
|
|
1221
1211
|
nonInteractiveContainer: N,
|
|
1222
1212
|
storeFolder: $,
|
|
1223
|
-
inInteractive: v || $ || At(I) ||
|
|
1213
|
+
inInteractive: v || $ || At(I) || H && !N,
|
|
1224
1214
|
collectedPaths: [],
|
|
1225
1215
|
style: It(I),
|
|
1226
|
-
matrix:
|
|
1216
|
+
matrix: V(k(), Ct(T(I, "transform"))),
|
|
1227
1217
|
hasNamedChild: !1,
|
|
1228
|
-
routeContainer:
|
|
1218
|
+
routeContainer: D.some(Kt) || y()
|
|
1229
1219
|
};
|
|
1230
1220
|
C || a.push(Z);
|
|
1231
1221
|
continue;
|
|
1232
1222
|
}
|
|
1233
|
-
const _ = T(I, "id"), A = sn(g, I), M =
|
|
1234
|
-
if (_ != null && dt(_) ||
|
|
1223
|
+
const _ = T(I, "id"), A = sn(g, I), M = V(k(), Ct(T(I, "transform"))), L = A && Ze(A, M), F = At(I) || l(), R = it(p(), It(I)), Y = T(I, "data-name");
|
|
1224
|
+
if (_ != null && dt(_) || Y != null && dt(Y) || !_ && y()) {
|
|
1235
1225
|
h(g, L);
|
|
1236
1226
|
continue;
|
|
1237
1227
|
}
|
|
1238
1228
|
if (_) {
|
|
1239
|
-
c(), L && r.push({ id: _, tag: g, d: L, interactive:
|
|
1229
|
+
c(), L && r.push({ id: _, tag: g, d: L, interactive: F, style: R });
|
|
1240
1230
|
continue;
|
|
1241
1231
|
}
|
|
1242
1232
|
if (!L) continue;
|
|
1243
1233
|
const S = d();
|
|
1244
|
-
S ? (S.collectedPaths.push(L), !S.style.fill && R.fill && (S.style = R)) :
|
|
1234
|
+
S ? (S.collectedPaths.push(L), !S.style.fill && R.fill && (S.style = R)) : F && (i += 1, r.push({
|
|
1245
1235
|
id: `interactive-anon-${i}`,
|
|
1246
1236
|
tag: g,
|
|
1247
1237
|
d: L,
|
|
@@ -1415,7 +1405,7 @@ function ho(t, e) {
|
|
|
1415
1405
|
if (o.length < 3 || n <= 0) return t;
|
|
1416
1406
|
const r = o.length, s = new Array(r), u = new Array(r), a = new Array(r), i = new Array(r), y = new Array(r).fill(0), p = new Array(r).fill(0), l = new Array(r).fill(!1);
|
|
1417
1407
|
for (let c = 0; c < r; c++) {
|
|
1418
|
-
const d = o[(c - 1 + r) % r], f = o[c], h = o[(c + 1) % r], m =
|
|
1408
|
+
const d = o[(c - 1 + r) % r], f = o[c], h = o[(c + 1) % r], m = P(d, f), b = P(f, h);
|
|
1419
1409
|
if (a[c] = b, m < E || b < E) {
|
|
1420
1410
|
s[c] = { x: 1, y: 0 }, u[c] = { x: 1, y: 0 }, i[c] = 0;
|
|
1421
1411
|
continue;
|
|
@@ -1446,9 +1436,9 @@ function ho(t, e) {
|
|
|
1446
1436
|
const x = at(d, q(s[c], -f)), g = at(d, q(u[c], f)), I = i[c] > 0 ? 1 : -1, C = at(x, {
|
|
1447
1437
|
x: -s[c].y * I * b,
|
|
1448
1438
|
y: s[c].x * I * b
|
|
1449
|
-
}), _ = Math.atan2(x.y - C.y, x.x - C.x), A = Math.atan2(g.y - C.y, g.x - C.x), M = (A - _ + j) % j, L = (_ - A + j) % j,
|
|
1439
|
+
}), _ = Math.atan2(x.y - C.y, x.x - C.x), A = Math.atan2(g.y - C.y, g.x - C.x), M = (A - _ + j) % j, L = (_ - A + j) % j, F = lt(C, b, _ + M / 2), R = lt(C, b, _ - L / 2), Y = P(F, d) <= P(R, d), K = Y ? M : L, S = Math.max(8, Math.min(28, Math.ceil(K * b / 2)));
|
|
1450
1440
|
for (let O = 0; O <= S; O++) {
|
|
1451
|
-
const
|
|
1441
|
+
const D = O / S, v = Y ? _ + K * D : _ - K * D;
|
|
1452
1442
|
k.push(lt(C, b, v));
|
|
1453
1443
|
}
|
|
1454
1444
|
}
|
|
@@ -1471,7 +1461,7 @@ function yn(t, e, n = []) {
|
|
|
1471
1461
|
const y = r.get(i.fromAnchorId), p = r.get(i.toAnchorId);
|
|
1472
1462
|
if (!y || !p) continue;
|
|
1473
1463
|
let l = i.weight;
|
|
1474
|
-
l == null && (l =
|
|
1464
|
+
l == null && (l = P(y, p), y.levelId !== p.levelId && (l += ut));
|
|
1475
1465
|
let k = i.accessible;
|
|
1476
1466
|
if (i.kind === "connector" && y.connectorId != null) {
|
|
1477
1467
|
const d = s.get(y.connectorId);
|
|
@@ -1494,7 +1484,7 @@ function xn(t, e, n, o = {}) {
|
|
|
1494
1484
|
const { graph: r, anchorById: s } = t;
|
|
1495
1485
|
if (!s.has(e) || !s.has(n))
|
|
1496
1486
|
return null;
|
|
1497
|
-
const a =
|
|
1487
|
+
const a = Vt.nba(r, {
|
|
1498
1488
|
oriented: !0,
|
|
1499
1489
|
distance(c, d, f) {
|
|
1500
1490
|
const h = f.data;
|
|
@@ -1503,7 +1493,7 @@ function xn(t, e, n, o = {}) {
|
|
|
1503
1493
|
heuristic(c, d) {
|
|
1504
1494
|
const f = s.get(c.id), h = s.get(d.id);
|
|
1505
1495
|
if (!f || !h) return 0;
|
|
1506
|
-
let m =
|
|
1496
|
+
let m = P(f, h);
|
|
1507
1497
|
return f.levelId !== h.levelId && (m += ut), m;
|
|
1508
1498
|
}
|
|
1509
1499
|
}).find(e, n);
|
|
@@ -1514,7 +1504,7 @@ function xn(t, e, n, o = {}) {
|
|
|
1514
1504
|
const d = s.get(y[c]);
|
|
1515
1505
|
if (p.push({ x: d.x, y: d.y, levelId: d.levelId }), c > 0) {
|
|
1516
1506
|
const f = s.get(y[c - 1]);
|
|
1517
|
-
k +=
|
|
1507
|
+
k += P(f, d), f.levelId !== d.levelId && (k += ut, l.push({
|
|
1518
1508
|
fromLevelId: f.levelId,
|
|
1519
1509
|
toLevelId: d.levelId,
|
|
1520
1510
|
connectorId: d.connectorId ?? f.connectorId
|
|
@@ -1538,13 +1528,13 @@ function xo(t) {
|
|
|
1538
1528
|
(t.retailers ?? []).map((i) => [i.id, i])
|
|
1539
1529
|
), r = t.resolveSvgUrl ?? ((i) => i), s = t.levels.filter((i) => i.isActive).sort((i, y) => i.ordering - y.ordering).map((i) => {
|
|
1540
1530
|
const y = t.shapes.filter((l) => l.levelId === i.id).map((l) => {
|
|
1541
|
-
const k = Xt(l.geometry), c = n.get(l.id) ?? null, d = (c == null ? void 0 : c.retailerId) != null ? o.get(c.retailerId) ?? null : null;
|
|
1531
|
+
const k = Xt(l.geometry), c = n.get(l.id) ?? null, d = (c == null ? void 0 : c.retailerId) != null ? o.get(c.retailerId) ?? null : null, f = d && !t.persistMediaKeys ? { ...d, logoKey: null } : d;
|
|
1542
1532
|
return {
|
|
1543
1533
|
...l,
|
|
1544
1534
|
geometry: k,
|
|
1545
1535
|
bbox: k === l.geometry ? l.bbox : xt(k),
|
|
1546
1536
|
assignment: c,
|
|
1547
|
-
label: Ft(l, c,
|
|
1537
|
+
label: Ft(l, c, f)
|
|
1548
1538
|
};
|
|
1549
1539
|
}), p = t.anchors.filter((l) => l.levelId === i.id);
|
|
1550
1540
|
return {
|
|
@@ -1815,7 +1805,7 @@ export {
|
|
|
1815
1805
|
Qn as Q,
|
|
1816
1806
|
ye as R,
|
|
1817
1807
|
pn as S,
|
|
1818
|
-
|
|
1808
|
+
Ht as T,
|
|
1819
1809
|
Me as U,
|
|
1820
1810
|
wn as V,
|
|
1821
1811
|
vt as W,
|
|
@@ -1831,20 +1821,20 @@ export {
|
|
|
1831
1821
|
Xn as a3,
|
|
1832
1822
|
Sn as a4,
|
|
1833
1823
|
fo as a5,
|
|
1834
|
-
|
|
1835
|
-
|
|
1824
|
+
P as a6,
|
|
1825
|
+
Kn as a7,
|
|
1836
1826
|
Rt as a8,
|
|
1837
1827
|
ho as a9,
|
|
1838
1828
|
ht as aA,
|
|
1839
1829
|
mn as aB,
|
|
1840
|
-
|
|
1830
|
+
Hn as aC,
|
|
1841
1831
|
Yn as aD,
|
|
1842
1832
|
Dn as aE,
|
|
1843
1833
|
gn as aF,
|
|
1844
1834
|
to as aG,
|
|
1845
1835
|
it as aH,
|
|
1846
1836
|
ae as aI,
|
|
1847
|
-
|
|
1837
|
+
V as aJ,
|
|
1848
1838
|
co as aK,
|
|
1849
1839
|
Co as aL,
|
|
1850
1840
|
Xt as aM,
|
|
@@ -1854,7 +1844,7 @@ export {
|
|
|
1854
1844
|
po as aQ,
|
|
1855
1845
|
Rn as aR,
|
|
1856
1846
|
Un as aS,
|
|
1857
|
-
|
|
1847
|
+
Gn as aT,
|
|
1858
1848
|
cn as aU,
|
|
1859
1849
|
Ct as aV,
|
|
1860
1850
|
De as aW,
|
|
@@ -1879,12 +1869,12 @@ export {
|
|
|
1879
1869
|
Tn as ao,
|
|
1880
1870
|
Pe as ap,
|
|
1881
1871
|
We as aq,
|
|
1882
|
-
|
|
1872
|
+
Gt as ar,
|
|
1883
1873
|
zt as as,
|
|
1884
1874
|
no as at,
|
|
1885
1875
|
pt as au,
|
|
1886
1876
|
Q as av,
|
|
1887
|
-
|
|
1877
|
+
Kt as aw,
|
|
1888
1878
|
dt as ax,
|
|
1889
1879
|
mo as ay,
|
|
1890
1880
|
$t as az,
|
|
@@ -1927,7 +1917,7 @@ export {
|
|
|
1927
1917
|
Zt as k,
|
|
1928
1918
|
Nt as l,
|
|
1929
1919
|
jt as m,
|
|
1930
|
-
|
|
1920
|
+
Vn as n,
|
|
1931
1921
|
lo as o,
|
|
1932
1922
|
Jn as p,
|
|
1933
1923
|
Ln as q,
|