@eyeon/map 2.0.5 → 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.
@@ -1,15 +1,14 @@
1
1
  import Ut from "ngraph.graph";
2
- import Ht from "ngraph.path";
3
- const Vt = "transparent";
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 === Vt || e === "none";
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 B(t) {
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 Gn(t, e) {
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 Kn(t, e = "unit") {
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: B(
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: B(
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: B(
263
+ bgColor: w(
271
264
  t.bgColor ?? t.bg_color
272
265
  ),
273
- textColor: B(
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 Hn(t, e) {
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 Vn(t, e) {
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,7 +322,7 @@ 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) || !e ? !((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 : {
333
326
  ...t.label,
334
327
  text: void 0,
335
328
  imageKey: void 0
@@ -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) ?? B(n == null ? void 0 : n.imageKey) ?? void 0;
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;
@@ -382,9 +375,9 @@ function qn(t, e) {
382
375
  function Se(t, e) {
383
376
  if (X(t)) {
384
377
  if (t.layerType === "retail_logo")
385
- return B(e == null ? void 0 : e.logoUrl) ?? B(t.customImageKey) ?? void 0;
378
+ return w(e == null ? void 0 : e.logoKey) ?? w(e == null ? void 0 : e.logoUrl) ?? w(t.customImageKey) ?? void 0;
386
379
  if (t.layerType === "custom_image")
387
- return B(t.customImageKey) ?? void 0;
380
+ return w(t.customImageKey) ?? void 0;
388
381
  }
389
382
  }
390
383
  function ot(t) {
@@ -467,7 +460,7 @@ function oo(t, e) {
467
460
  function ro(t, e) {
468
461
  return t.map((n) => ({ x: n.x, y: e - n.y }));
469
462
  }
470
- function w(t, e) {
463
+ function P(t, e) {
471
464
  const n = t.x - e.x, o = t.y - e.y;
472
465
  return Math.hypot(n, o);
473
466
  }
@@ -510,11 +503,11 @@ function so(t, e) {
510
503
  function Re(t, e, n) {
511
504
  const o = n.x - e.x, r = n.y - e.y, s = o * o + r * r;
512
505
  if (s === 0)
513
- return { point: { ...e }, t: 0, distance: w(t, e) };
506
+ return { point: { ...e }, t: 0, distance: P(t, e) };
514
507
  let u = ((t.x - e.x) * o + (t.y - e.y) * r) / s;
515
508
  u = Math.max(0, Math.min(1, u));
516
509
  const a = { x: e.x + u * o, y: e.y + u * r };
517
- return { point: a, t: u, distance: w(t, a) };
510
+ return { point: a, t: u, distance: P(t, a) };
518
511
  }
519
512
  function co(t, e) {
520
513
  if (e.length < 2) return null;
@@ -558,15 +551,15 @@ function Ne(t, e, n, o, r, s, u) {
558
551
  const N = Math.sqrt(h);
559
552
  a *= N, i *= N;
560
553
  }
561
- 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, P = (f - _) / i, R = (-d - C) / a, F = (-f - _) / i, G = Math.atan2(P, L);
562
- let S = Math.atan2(L * F - P * R, L * R + P * F);
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);
563
556
  !s && S > 0 ? S -= 2 * Math.PI : s && S < 0 && (S += 2 * Math.PI);
564
- const O = Math.abs(S) / (Math.PI / 2) * ve, Y = Math.max(1, Math.round(O)), v = [{ ...t }];
565
- for (let N = 1; N <= Y; N++) {
566
- const $ = G + S * N / Y, V = Math.cos($), Z = Math.sin($);
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($);
567
560
  v.push({
568
- x: A + a * p * V - i * l * Z,
569
- y: M + a * l * V + i * p * Z
561
+ x: A + a * p * H - i * l * Z,
562
+ y: M + a * l * H + i * p * Z
570
563
  });
571
564
  }
572
565
  return v[v.length - 1] = { ...u }, v;
@@ -786,7 +779,7 @@ function Xe(t) {
786
779
  }
787
780
  return e;
788
781
  }
789
- function Ge(t) {
782
+ function Ke(t) {
790
783
  const e = /* @__PURE__ */ new Map(), n = t.replace(/\/\*[\s\S]*?\*\//g, "");
791
784
  for (const o of n.matchAll(/([^{]+)\{([^}]*)\}/g)) {
792
785
  const r = o[1].split(",").map((u) => u.trim()), s = Xe(o[2]);
@@ -802,7 +795,7 @@ function Ge(t) {
802
795
  }
803
796
  return e;
804
797
  }
805
- function Ke(t, e) {
798
+ function Ge(t, e) {
806
799
  const n = {};
807
800
  for (const o of t.split(/\s+/).map((r) => r.trim()).filter(Boolean))
808
801
  Object.assign(n, e.get(o) || {});
@@ -815,14 +808,14 @@ function $e(t) {
815
808
  if (e.length === 0) return t;
816
809
  const o = /* @__PURE__ */ new Map();
817
810
  for (const r of e)
818
- for (const [s, u] of Ge(r))
811
+ for (const [s, u] of Ke(r))
819
812
  o.set(s, { ...o.get(s) || {}, ...u });
820
813
  return o.size === 0 ? t : t.replace(
821
814
  /<(path|polygon|polyline|line|rect|g|circle|ellipse)\b([^>]*)>/gi,
822
815
  (r, s, u) => {
823
816
  const a = /\/\s*$/.test(u), i = u.replace(/\/\s*$/, ""), y = i.match(/\bclass\s*=\s*["']([^"']*)["']/i);
824
817
  if (!y) return r;
825
- const p = Ke(y[1], o);
818
+ const p = Ge(y[1], o);
826
819
  let l = i;
827
820
  for (const [k, c] of Object.entries(p)) {
828
821
  const d = Be[k];
@@ -846,7 +839,7 @@ function it(t, e) {
846
839
  };
847
840
  }
848
841
  const ft = { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 };
849
- function H(t, e) {
842
+ function V(t, e) {
850
843
  return {
851
844
  a: t.a * e.a + t.c * e.b,
852
845
  b: t.b * e.a + t.d * e.b,
@@ -872,7 +865,7 @@ function Ue(t) {
872
865
  const e = t * Math.PI / 180, n = Math.cos(e), o = Math.sin(e);
873
866
  return { a: n, b: o, c: -o, d: n, e: 0, f: 0 };
874
867
  }
875
- function He(t, e) {
868
+ function Ve(t, e) {
876
869
  switch (t) {
877
870
  case "matrix":
878
871
  return e.length < 6 ? null : { a: e[0], b: e[1], c: e[2], d: e[3], e: e[4], f: e[5] };
@@ -888,8 +881,8 @@ function He(t, e) {
888
881
  const n = Ue(e[0]);
889
882
  if (e.length < 3) return n;
890
883
  const o = e[1], r = e[2];
891
- return H(
892
- H(st(o, r), n),
884
+ return V(
885
+ V(st(o, r), n),
893
886
  st(-o, -r)
894
887
  );
895
888
  }
@@ -910,17 +903,17 @@ function Ct(t) {
910
903
  for (; (n = _t.exec(t)) !== null; ) {
911
904
  const o = n[1].toLowerCase(), r = n[2].trim().split(/[\s,]+/).filter(Boolean).map(Number);
912
905
  if (r.some((u) => Number.isNaN(u))) continue;
913
- const s = He(o, r);
914
- s && (e = H(e, s));
906
+ const s = Ve(o, r);
907
+ s && (e = V(e, s));
915
908
  }
916
909
  return e;
917
910
  }
918
- function K(t) {
911
+ function G(t) {
919
912
  if (!Number.isFinite(t)) return "0";
920
913
  const e = Math.round(t * 1e4) / 1e4;
921
914
  return Object.is(e, -0) ? "0" : String(e);
922
915
  }
923
- function Ve(t, e, n, o) {
916
+ function He(t, e, n, o) {
924
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);
925
918
  return { rx: I, ry: C, phiDeg: M };
926
919
  }
@@ -932,7 +925,7 @@ function Ze(t, e) {
932
925
  const d = Number(n[s++]);
933
926
  return Number.isNaN(d) ? 0 : d;
934
927
  }, k = (d, ...f) => {
935
- o.push(d + (f.length ? " " + f.map(K).join(" ") : ""));
928
+ o.push(d + (f.length ? " " + f.map(G).join(" ") : ""));
936
929
  }, c = (d, f) => {
937
930
  const h = ze(e, { x: d, y: f });
938
931
  return [h.x, h.y];
@@ -990,9 +983,9 @@ function Ze(t, e) {
990
983
  }
991
984
  case "A":
992
985
  case "a": {
993
- const f = u === "a", h = l(), m = l(), b = l(), x = l(), g = l(), I = f ? a + l() : l(), C = f ? i + l() : l(), _ = Ve(e, h, m, b), [A, M] = c(I, C);
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);
994
987
  o.push(
995
- `A ${K(_.rx)} ${K(_.ry)} ${K(_.phiDeg)} ${x ? 1 : 0} ${(g ? 1 : 0) ^ (r ? 1 : 0)} ${K(A)} ${K(M)}`
988
+ `A ${G(_.rx)} ${G(_.ry)} ${G(_.phiDeg)} ${x ? 1 : 0} ${(g ? 1 : 0) ^ (r ? 1 : 0)} ${G(A)} ${G(M)}`
996
989
  ), a = I, i = C;
997
990
  break;
998
991
  }
@@ -1032,14 +1025,12 @@ const je = [
1032
1025
  { prefix: "overlay", kind: "decor" },
1033
1026
  { prefix: "green-area", kind: "green_area" },
1034
1027
  { prefix: "parking-lane", kind: "parking_zone" },
1035
- { prefix: "parking-line", kind: "decor" },
1036
1028
  { prefix: "parking-icon", kind: "parking_icon" },
1037
1029
  { prefix: "walking-path", kind: "walkable" },
1038
1030
  { prefix: "water", kind: "water" }
1039
1031
  ], qe = [
1040
1032
  { prefix: "parking-zone", kind: "parking_zone" },
1041
1033
  { prefix: "parking-lane", kind: "parking_zone" },
1042
- { prefix: "parking-line", kind: "decor" },
1043
1034
  { prefix: "parking-icon", kind: "parking_icon" },
1044
1035
  { prefix: "green-area", kind: "green_area" },
1045
1036
  { prefix: "water", kind: "water" },
@@ -1062,7 +1053,7 @@ function dt(t) {
1062
1053
  const e = tt(t);
1063
1054
  return e === "route path" || e.startsWith("route path ");
1064
1055
  }
1065
- function Gt(t) {
1056
+ function Kt(t) {
1066
1057
  const e = tt(t);
1067
1058
  return e === "routes" || e === "route" || e === "wayfinding" || e === "wayfinding routes" || dt(t);
1068
1059
  }
@@ -1086,7 +1077,7 @@ function tt(t) {
1086
1077
  function pt(t) {
1087
1078
  return /non[-_ ]?interactive/i.test(t);
1088
1079
  }
1089
- function Kt(t) {
1080
+ function Gt(t) {
1090
1081
  return pt(t) ? !1 : /^interactive( items)?( \d+)?$/.test(tt(t));
1091
1082
  }
1092
1083
  function $t(t) {
@@ -1094,7 +1085,7 @@ function $t(t) {
1094
1085
  return e === "stores" || e === "store layer" || e === "units" || e === "unit layer";
1095
1086
  }
1096
1087
  function zt(t) {
1097
- return Kt(t) || pt(t) || $t(t) || Gt(t);
1088
+ return Gt(t) || pt(t) || $t(t) || Kt(t);
1098
1089
  }
1099
1090
  function ct(t) {
1100
1091
  return t.interactiveContainer || t.nonInteractiveContainer || t.storeFolder;
@@ -1103,7 +1094,7 @@ function T(t, e) {
1103
1094
  const n = t.match(new RegExp(`\\b${e}\\s*=\\s*["']([^"']*)["']`, "i"));
1104
1095
  return n ? n[1] : null;
1105
1096
  }
1106
- function D(t, e) {
1097
+ function B(t, e) {
1107
1098
  const n = t.match(new RegExp(`\\b${e}\\s*=\\s*["']?(-?[\\d.]+)`, "i"));
1108
1099
  return n ? Number(n[1]) : 0;
1109
1100
  }
@@ -1116,7 +1107,7 @@ function en(t) {
1116
1107
  );
1117
1108
  }
1118
1109
  function nn(t) {
1119
- return t.some(pt) ? { interactiveContainer: !1, nonInteractiveContainer: !0, storeFolder: !1 } : t.some(Kt) ? { interactiveContainer: !0, nonInteractiveContainer: !1, storeFolder: !1 } : t.some($t) ? { interactiveContainer: !1, nonInteractiveContainer: !1, storeFolder: !0 } : { interactiveContainer: !1, nonInteractiveContainer: !1, storeFolder: !1 };
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 };
1120
1111
  }
1121
1112
  function on(t) {
1122
1113
  const e = t.trim().split(/[\s,]+/).map(Number);
@@ -1138,13 +1129,13 @@ function sn(t, e) {
1138
1129
  }
1139
1130
  if (t === "line")
1140
1131
  return rn(
1141
- D(e, "x1"),
1142
- D(e, "y1"),
1143
- D(e, "x2"),
1144
- D(e, "y2")
1132
+ B(e, "x1"),
1133
+ B(e, "y1"),
1134
+ B(e, "x2"),
1135
+ B(e, "y2")
1145
1136
  );
1146
1137
  if (t === "rect") {
1147
- const n = D(e, "x"), o = D(e, "y"), r = D(e, "width"), s = D(e, "height");
1138
+ const n = B(e, "x"), o = B(e, "y"), r = B(e, "width"), s = B(e, "height");
1148
1139
  return `M ${n} ${o} L ${n + r} ${o} L ${n + r} ${o + s} L ${n} ${o + s} Z`;
1149
1140
  }
1150
1141
  }
@@ -1212,35 +1203,35 @@ function cn(t) {
1212
1203
  continue;
1213
1204
  }
1214
1205
  if (g === "g") {
1215
- const O = T(I, "id"), Y = en(I), { interactiveContainer: v, nonInteractiveContainer: N, storeFolder: $ } = nn(Y), V = l();
1206
+ const O = T(I, "id"), D = en(I), { interactiveContainer: v, nonInteractiveContainer: N, storeFolder: $ } = nn(D), H = l();
1216
1207
  O && c();
1217
1208
  const Z = {
1218
1209
  id: O,
1219
1210
  interactiveContainer: v,
1220
1211
  nonInteractiveContainer: N,
1221
1212
  storeFolder: $,
1222
- inInteractive: v || $ || At(I) || V && !N,
1213
+ inInteractive: v || $ || At(I) || H && !N,
1223
1214
  collectedPaths: [],
1224
1215
  style: It(I),
1225
- matrix: H(k(), Ct(T(I, "transform"))),
1216
+ matrix: V(k(), Ct(T(I, "transform"))),
1226
1217
  hasNamedChild: !1,
1227
- routeContainer: Y.some(Gt) || y()
1218
+ routeContainer: D.some(Kt) || y()
1228
1219
  };
1229
1220
  C || a.push(Z);
1230
1221
  continue;
1231
1222
  }
1232
- const _ = T(I, "id"), A = sn(g, I), M = H(k(), Ct(T(I, "transform"))), L = A && Ze(A, M), P = At(I) || l(), R = it(p(), It(I)), F = T(I, "data-name");
1233
- if (_ != null && dt(_) || F != null && dt(F) || !_ && y()) {
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()) {
1234
1225
  h(g, L);
1235
1226
  continue;
1236
1227
  }
1237
1228
  if (_) {
1238
- c(), L && r.push({ id: _, tag: g, d: L, interactive: P, style: R });
1229
+ c(), L && r.push({ id: _, tag: g, d: L, interactive: F, style: R });
1239
1230
  continue;
1240
1231
  }
1241
1232
  if (!L) continue;
1242
1233
  const S = d();
1243
- S ? (S.collectedPaths.push(L), !S.style.fill && R.fill && (S.style = R)) : P && (i += 1, r.push({
1234
+ S ? (S.collectedPaths.push(L), !S.style.fill && R.fill && (S.style = R)) : F && (i += 1, r.push({
1244
1235
  id: `interactive-anon-${i}`,
1245
1236
  tag: g,
1246
1237
  d: L,
@@ -1414,7 +1405,7 @@ function ho(t, e) {
1414
1405
  if (o.length < 3 || n <= 0) return t;
1415
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);
1416
1407
  for (let c = 0; c < r; c++) {
1417
- const d = o[(c - 1 + r) % r], f = o[c], h = o[(c + 1) % r], m = w(d, f), b = w(f, h);
1408
+ const d = o[(c - 1 + r) % r], f = o[c], h = o[(c + 1) % r], m = P(d, f), b = P(f, h);
1418
1409
  if (a[c] = b, m < E || b < E) {
1419
1410
  s[c] = { x: 1, y: 0 }, u[c] = { x: 1, y: 0 }, i[c] = 0;
1420
1411
  continue;
@@ -1445,9 +1436,9 @@ function ho(t, e) {
1445
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, {
1446
1437
  x: -s[c].y * I * b,
1447
1438
  y: s[c].x * I * b
1448
- }), _ = 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, P = lt(C, b, _ + M / 2), R = lt(C, b, _ - L / 2), F = w(P, d) <= w(R, d), G = F ? M : L, S = Math.max(8, Math.min(28, Math.ceil(G * b / 2)));
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)));
1449
1440
  for (let O = 0; O <= S; O++) {
1450
- const Y = O / S, v = F ? _ + G * Y : _ - G * Y;
1441
+ const D = O / S, v = Y ? _ + K * D : _ - K * D;
1451
1442
  k.push(lt(C, b, v));
1452
1443
  }
1453
1444
  }
@@ -1470,7 +1461,7 @@ function yn(t, e, n = []) {
1470
1461
  const y = r.get(i.fromAnchorId), p = r.get(i.toAnchorId);
1471
1462
  if (!y || !p) continue;
1472
1463
  let l = i.weight;
1473
- l == null && (l = w(y, p), y.levelId !== p.levelId && (l += ut));
1464
+ l == null && (l = P(y, p), y.levelId !== p.levelId && (l += ut));
1474
1465
  let k = i.accessible;
1475
1466
  if (i.kind === "connector" && y.connectorId != null) {
1476
1467
  const d = s.get(y.connectorId);
@@ -1493,7 +1484,7 @@ function xn(t, e, n, o = {}) {
1493
1484
  const { graph: r, anchorById: s } = t;
1494
1485
  if (!s.has(e) || !s.has(n))
1495
1486
  return null;
1496
- const a = Ht.nba(r, {
1487
+ const a = Vt.nba(r, {
1497
1488
  oriented: !0,
1498
1489
  distance(c, d, f) {
1499
1490
  const h = f.data;
@@ -1502,7 +1493,7 @@ function xn(t, e, n, o = {}) {
1502
1493
  heuristic(c, d) {
1503
1494
  const f = s.get(c.id), h = s.get(d.id);
1504
1495
  if (!f || !h) return 0;
1505
- let m = w(f, h);
1496
+ let m = P(f, h);
1506
1497
  return f.levelId !== h.levelId && (m += ut), m;
1507
1498
  }
1508
1499
  }).find(e, n);
@@ -1513,7 +1504,7 @@ function xn(t, e, n, o = {}) {
1513
1504
  const d = s.get(y[c]);
1514
1505
  if (p.push({ x: d.x, y: d.y, levelId: d.levelId }), c > 0) {
1515
1506
  const f = s.get(y[c - 1]);
1516
- k += w(f, d), f.levelId !== d.levelId && (k += ut, l.push({
1507
+ k += P(f, d), f.levelId !== d.levelId && (k += ut, l.push({
1517
1508
  fromLevelId: f.levelId,
1518
1509
  toLevelId: d.levelId,
1519
1510
  connectorId: d.connectorId ?? f.connectorId
@@ -1537,13 +1528,13 @@ function xo(t) {
1537
1528
  (t.retailers ?? []).map((i) => [i.id, i])
1538
1529
  ), r = t.resolveSvgUrl ?? ((i) => i), s = t.levels.filter((i) => i.isActive).sort((i, y) => i.ordering - y.ordering).map((i) => {
1539
1530
  const y = t.shapes.filter((l) => l.levelId === i.id).map((l) => {
1540
- 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;
1541
1532
  return {
1542
1533
  ...l,
1543
1534
  geometry: k,
1544
1535
  bbox: k === l.geometry ? l.bbox : xt(k),
1545
1536
  assignment: c,
1546
- label: Ft(l, c, d)
1537
+ label: Ft(l, c, f)
1547
1538
  };
1548
1539
  }), p = t.anchors.filter((l) => l.levelId === i.id);
1549
1540
  return {
@@ -1814,7 +1805,7 @@ export {
1814
1805
  Qn as Q,
1815
1806
  ye as R,
1816
1807
  pn as S,
1817
- Vt as T,
1808
+ Ht as T,
1818
1809
  Me as U,
1819
1810
  wn as V,
1820
1811
  vt as W,
@@ -1830,20 +1821,20 @@ export {
1830
1821
  Xn as a3,
1831
1822
  Sn as a4,
1832
1823
  fo as a5,
1833
- w as a6,
1834
- Gn as a7,
1824
+ P as a6,
1825
+ Kn as a7,
1835
1826
  Rt as a8,
1836
1827
  ho as a9,
1837
1828
  ht as aA,
1838
1829
  mn as aB,
1839
- Vn as aC,
1830
+ Hn as aC,
1840
1831
  Yn as aD,
1841
1832
  Dn as aE,
1842
1833
  gn as aF,
1843
1834
  to as aG,
1844
1835
  it as aH,
1845
1836
  ae as aI,
1846
- H as aJ,
1837
+ V as aJ,
1847
1838
  co as aK,
1848
1839
  Co as aL,
1849
1840
  Xt as aM,
@@ -1853,7 +1844,7 @@ export {
1853
1844
  po as aQ,
1854
1845
  Rn as aR,
1855
1846
  Un as aS,
1856
- Kn as aT,
1847
+ Gn as aT,
1857
1848
  cn as aU,
1858
1849
  Ct as aV,
1859
1850
  De as aW,
@@ -1878,12 +1869,12 @@ export {
1878
1869
  Tn as ao,
1879
1870
  Pe as ap,
1880
1871
  We as aq,
1881
- Kt as ar,
1872
+ Gt as ar,
1882
1873
  zt as as,
1883
1874
  no as at,
1884
1875
  pt as au,
1885
1876
  Q as av,
1886
- Gt as aw,
1877
+ Kt as aw,
1887
1878
  dt as ax,
1888
1879
  mo as ay,
1889
1880
  $t as az,
@@ -1926,7 +1917,7 @@ export {
1926
1917
  Zt as k,
1927
1918
  Nt as l,
1928
1919
  jt as m,
1929
- Hn as n,
1920
+ Vn as n,
1930
1921
  lo as o,
1931
1922
  Jn as p,
1932
1923
  Ln as q,