@eyeon/map 2.0.3 → 2.0.5

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.
Files changed (149) hide show
  1. package/dist/assets/MapViewer.css +1 -1
  2. package/dist/assets/index.css +1 -1
  3. package/dist/chunks/MapViewer.js +2558 -1431
  4. package/dist/chunks/MapViewer.js.map +1 -1
  5. package/dist/chunks/stacking.js +1262 -745
  6. package/dist/chunks/stacking.js.map +1 -1
  7. package/dist/chunks/wheelZoom.js +259 -0
  8. package/dist/chunks/wheelZoom.js.map +1 -0
  9. package/dist/core/assignment.d.ts +107 -0
  10. package/dist/core/assignment.d.ts.map +1 -0
  11. package/dist/core/color.d.ts +5 -0
  12. package/dist/core/color.d.ts.map +1 -0
  13. package/dist/core/entranceIcon.d.ts +12 -0
  14. package/dist/core/entranceIcon.d.ts.map +1 -0
  15. package/dist/core/hostChrome.d.ts +2 -4
  16. package/dist/core/hostChrome.d.ts.map +1 -1
  17. package/dist/core/index.d.ts +6 -0
  18. package/dist/core/index.d.ts.map +1 -1
  19. package/dist/core/index.js +161 -89
  20. package/dist/core/labelAlign.d.ts +7 -0
  21. package/dist/core/labelAlign.d.ts.map +1 -0
  22. package/dist/core/layerStyles.d.ts +41 -7
  23. package/dist/core/layerStyles.d.ts.map +1 -1
  24. package/dist/core/outdoorDecoration.d.ts +2 -1
  25. package/dist/core/outdoorDecoration.d.ts.map +1 -1
  26. package/dist/core/publish/index.d.ts +6 -4
  27. package/dist/core/publish/index.d.ts.map +1 -1
  28. package/dist/core/stacking.d.ts +50 -3
  29. package/dist/core/stacking.d.ts.map +1 -1
  30. package/dist/core/types.d.ts +29 -1
  31. package/dist/core/types.d.ts.map +1 -1
  32. package/dist/core/voids.d.ts +41 -0
  33. package/dist/core/voids.d.ts.map +1 -0
  34. package/dist/core/wheelZoom.d.ts +30 -0
  35. package/dist/core/wheelZoom.d.ts.map +1 -0
  36. package/dist/editor/FieldResetButton.d.ts +7 -0
  37. package/dist/editor/FieldResetButton.d.ts.map +1 -0
  38. package/dist/editor/MapEditor.d.ts +12 -2
  39. package/dist/editor/MapEditor.d.ts.map +1 -1
  40. package/dist/editor/canvas/EditorCanvas.d.ts +6 -2
  41. package/dist/editor/canvas/EditorCanvas.d.ts.map +1 -1
  42. package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts +3 -1
  43. package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts.map +1 -1
  44. package/dist/editor/canvas/coords.d.ts +26 -3
  45. package/dist/editor/canvas/coords.d.ts.map +1 -1
  46. package/dist/editor/canvas/editorFill.d.ts +3 -1
  47. package/dist/editor/canvas/editorFill.d.ts.map +1 -1
  48. package/dist/editor/canvas/editorHover.d.ts +4 -0
  49. package/dist/editor/canvas/editorHover.d.ts.map +1 -1
  50. package/dist/editor/canvas/underlayHint.d.ts +8 -0
  51. package/dist/editor/canvas/underlayHint.d.ts.map +1 -1
  52. package/dist/editor/connectorAssignments.d.ts +61 -0
  53. package/dist/editor/connectorAssignments.d.ts.map +1 -1
  54. package/dist/editor/draftOps.d.ts +8 -0
  55. package/dist/editor/draftOps.d.ts.map +1 -1
  56. package/dist/editor/editorSectionReturn.d.ts.map +1 -1
  57. package/dist/editor/ellipseDraw.d.ts +12 -0
  58. package/dist/editor/ellipseDraw.d.ts.map +1 -0
  59. package/dist/editor/entranceIcon.d.ts +15 -0
  60. package/dist/editor/entranceIcon.d.ts.map +1 -0
  61. package/dist/editor/hexColor.d.ts +2 -0
  62. package/dist/editor/hexColor.d.ts.map +1 -1
  63. package/dist/editor/index.css +824 -72
  64. package/dist/editor/index.d.ts +2 -0
  65. package/dist/editor/index.d.ts.map +1 -1
  66. package/dist/editor/index.js +6711 -4161
  67. package/dist/editor/index.js.map +1 -1
  68. package/dist/editor/labelText.d.ts +12 -2
  69. package/dist/editor/labelText.d.ts.map +1 -1
  70. package/dist/editor/labels.d.ts +8 -0
  71. package/dist/editor/labels.d.ts.map +1 -1
  72. package/dist/editor/panels/AssignForm.d.ts +17 -0
  73. package/dist/editor/panels/AssignForm.d.ts.map +1 -0
  74. package/dist/editor/panels/AssignmentStyleFields.d.ts +14 -0
  75. package/dist/editor/panels/AssignmentStyleFields.d.ts.map +1 -0
  76. package/dist/editor/panels/BulkAssignForm.d.ts +11 -0
  77. package/dist/editor/panels/BulkAssignForm.d.ts.map +1 -0
  78. package/dist/editor/panels/CatalogKioskForm.d.ts +18 -0
  79. package/dist/editor/panels/CatalogKioskForm.d.ts.map +1 -0
  80. package/dist/editor/panels/ConnectorAssign.d.ts +6 -2
  81. package/dist/editor/panels/ConnectorAssign.d.ts.map +1 -1
  82. package/dist/editor/panels/CopyToLevelButton.d.ts +10 -0
  83. package/dist/editor/panels/CopyToLevelButton.d.ts.map +1 -0
  84. package/dist/editor/panels/EntranceIconForm.d.ts +11 -0
  85. package/dist/editor/panels/EntranceIconForm.d.ts.map +1 -0
  86. package/dist/editor/panels/Inspector.d.ts +24 -3
  87. package/dist/editor/panels/Inspector.d.ts.map +1 -1
  88. package/dist/editor/panels/LeftRail.d.ts +17 -6
  89. package/dist/editor/panels/LeftRail.d.ts.map +1 -1
  90. package/dist/editor/panels/PreviewOverlay.d.ts +9 -3
  91. package/dist/editor/panels/PreviewOverlay.d.ts.map +1 -1
  92. package/dist/editor/panels/TextLabelForm.d.ts +11 -0
  93. package/dist/editor/panels/TextLabelForm.d.ts.map +1 -0
  94. package/dist/editor/panels/formRows.d.ts +41 -0
  95. package/dist/editor/panels/formRows.d.ts.map +1 -0
  96. package/dist/editor/portalSurface.d.ts +10 -2
  97. package/dist/editor/portalSurface.d.ts.map +1 -1
  98. package/dist/editor/previewDocument.d.ts +2 -1
  99. package/dist/editor/previewDocument.d.ts.map +1 -1
  100. package/dist/editor/railAssignments.d.ts +9 -2
  101. package/dist/editor/railAssignments.d.ts.map +1 -1
  102. package/dist/editor/railKiosks.d.ts +27 -0
  103. package/dist/editor/railKiosks.d.ts.map +1 -0
  104. package/dist/editor/railListCopy.d.ts +31 -0
  105. package/dist/editor/railListCopy.d.ts.map +1 -0
  106. package/dist/editor/routeStubs.d.ts +1 -1
  107. package/dist/editor/routeStubs.d.ts.map +1 -1
  108. package/dist/editor/shapeCopy.d.ts +40 -0
  109. package/dist/editor/shapeCopy.d.ts.map +1 -0
  110. package/dist/editor/shapeSelection.d.ts +6 -0
  111. package/dist/editor/shapeSelection.d.ts.map +1 -0
  112. package/dist/editor/tools.d.ts +12 -2
  113. package/dist/editor/tools.d.ts.map +1 -1
  114. package/dist/fonts/assets.d.ts +4 -0
  115. package/dist/fonts/mapFont.d.ts +5 -0
  116. package/dist/fonts/mapFont.d.ts.map +1 -0
  117. package/dist/fonts/mapFontUrl.d.ts +8 -0
  118. package/dist/fonts/mapFontUrl.d.ts.map +1 -0
  119. package/dist/specialIcons.d.ts +39 -0
  120. package/dist/specialIcons.d.ts.map +1 -0
  121. package/dist/ui/ModernSelect.d.ts.map +1 -1
  122. package/dist/ui/selectSearch.d.ts +3 -0
  123. package/dist/ui/selectSearch.d.ts.map +1 -1
  124. package/dist/viewer/MapViewer.d.ts +14 -1
  125. package/dist/viewer/MapViewer.d.ts.map +1 -1
  126. package/dist/viewer/camera.d.ts +82 -1
  127. package/dist/viewer/camera.d.ts.map +1 -1
  128. package/dist/viewer/components/CameraRig.d.ts +18 -1
  129. package/dist/viewer/components/CameraRig.d.ts.map +1 -1
  130. package/dist/viewer/components/LevelMeshes.d.ts +15 -4
  131. package/dist/viewer/components/LevelMeshes.d.ts.map +1 -1
  132. package/dist/viewer/components/MapScene.d.ts +10 -4
  133. package/dist/viewer/components/MapScene.d.ts.map +1 -1
  134. package/dist/viewer/components/OpeningWell.d.ts +7 -0
  135. package/dist/viewer/components/OpeningWell.d.ts.map +1 -0
  136. package/dist/viewer/components/RouteLine.d.ts.map +1 -1
  137. package/dist/viewer/components/SvgVectorLayer.d.ts +3 -1
  138. package/dist/viewer/components/SvgVectorLayer.d.ts.map +1 -1
  139. package/dist/viewer/components/openingGeometry.d.ts +7 -0
  140. package/dist/viewer/components/openingGeometry.d.ts.map +1 -0
  141. package/dist/viewer/index.css +151 -19
  142. package/dist/viewer/index.js +3 -3
  143. package/dist/viewer/pointer.d.ts +26 -0
  144. package/dist/viewer/pointer.d.ts.map +1 -0
  145. package/dist/viewer/ui/MapControls.d.ts.map +1 -1
  146. package/dist/viewer/ui/RuntimeChrome.d.ts.map +1 -1
  147. package/package.json +4 -2
  148. package/dist/chunks/graph-tools.js +0 -246
  149. package/dist/chunks/graph-tools.js.map +0 -1
@@ -1,68 +1,70 @@
1
- import { jsx as R, jsxs as te, Fragment as Ye } from "react/jsx-runtime";
2
- import { useRef as he, useState as ae, useMemo as re, useCallback as be, useEffect as le, useImperativeHandle as $e, Suspense as Ze } from "react";
3
- import { B as Qe, ad as Ke, d as Je, ac as We, x as et, E as tt, W as nt, J as ot, T as rt, R as st, M as Oe, U as _e, ab as it, am as at, l as ct, Q as Ne, af as lt, a2 as Be, t as De, al as Te, s as ut, Y as ft, z as mt } from "./stacking.js";
4
- import { useThree as ht, Canvas as dt } from "@react-three/fiber";
5
- import { Text as pt, OrthographicCamera as yt, OrbitControls as gt } from "@react-three/drei";
6
- import * as ue from "three";
7
- import { Loader as bt, FileLoader as xt, Matrix3 as ge, Vector2 as Q, Vector3 as Ae, Box2 as wt, ShapeUtils as kt, Shape as At, Path as Ee, BufferGeometry as Mt, Float32BufferAttribute as Ce, SRGBColorSpace as It, ShapePath as ye } from "three";
8
- import { createPortal as Nt } from "react-dom";
9
- function Tt({
10
- levels: l,
11
- activeLevelId: i,
12
- onActiveLevelChange: M,
13
- onZoomIn: I,
14
- onZoomOut: N,
15
- onReset: h,
16
- showFloors: B = !0,
17
- showZoomReset: W = !0,
18
- floorOptions: p,
19
- alwaysShowFloors: k = !1
1
+ import { jsx as T, jsxs as ct, Fragment as Pe } from "react/jsx-runtime";
2
+ import { useId as Re, useRef as at, useState as dt, useMemo as ot, useCallback as mt, useEffect as lt, useImperativeHandle as Ge, useLayoutEffect as Ve, Suspense as We } from "react";
3
+ import { ad as De, bd as Be, ah as ve, G as He, aj as Ze, a_ as Fe, j as Xe, O as Ue, i as qe, bq as Ye, ao as zt, g as Ke, b5 as Me, ay as je, a9 as Qe, B as Je, a1 as _e, af as Ot, aN as ee, aD as $e, a as tn, D as en, y as nn, z as rn, aA as Mt, b7 as ne, b4 as be, al as on, ax as cn, aw as sn, ar as Zt, az as Ft, bc as an, a8 as ln, bp as un, N as fn, av as Pt, aR as dn, aQ as re, a4 as oe, bn as Rt, bo as It, a0 as hn, aI as mn, M as pn, ab as yn } from "./stacking.js";
4
+ import { useThree as gn, useFrame as An, Canvas as xn } from "@react-three/fiber";
5
+ import { Text as ce, OrthographicCamera as vn, OrbitControls as Mn } from "@react-three/drei";
6
+ import * as rt from "three";
7
+ import { Loader as bn, FileLoader as Cn, Matrix3 as vt, Vector2 as it, Vector3 as Lt, Box2 as wn, ShapeUtils as On, Shape as In, Path as Gt, BufferGeometry as Ln, Float32BufferAttribute as Vt, SRGBColorSpace as Nn, ShapePath as xt } from "three";
8
+ import { createPortal as En } from "react-dom";
9
+ function kn({
10
+ levels: t,
11
+ activeLevelId: e,
12
+ onActiveLevelChange: s,
13
+ onZoomIn: a,
14
+ onZoomOut: d,
15
+ onReset: m,
16
+ showFloors: b = !0,
17
+ showZoomReset: Q = !0,
18
+ floorOptions: x,
19
+ alwaysShowFloors: z = !1
20
20
  }) {
21
- const z = p ?? Qe(l), O = B && (k ? z.length > 0 : Ke(l));
22
- return !O && !W ? null : /* @__PURE__ */ R("div", { className: "eyeon-map-controls", children: /* @__PURE__ */ te("div", { className: "eyeon-map-controls__stack", children: [
23
- O && /* @__PURE__ */ R("div", { className: "eyeon-map-controls__floors", role: "tablist", "aria-label": "Floors", children: z.map((C) => {
24
- const V = C.id === i;
25
- return /* @__PURE__ */ R(
21
+ const G = t.filter(
22
+ (B) => B.kind != null && B.ordering != null && B.levelIndex != null
23
+ ), k = x ?? De(G), Z = b && (z ? k.length > 0 : Be(G)), V = Q && ve(G);
24
+ return !Z && !V ? null : /* @__PURE__ */ T("div", { className: "eyeon-map-controls", children: /* @__PURE__ */ ct("div", { className: "eyeon-map-controls__stack", children: [
25
+ Z && /* @__PURE__ */ T("div", { className: "eyeon-map-controls__floors", role: "tablist", "aria-label": "Floors", children: k.map((B) => {
26
+ const w = B.id === e;
27
+ return /* @__PURE__ */ T(
26
28
  "button",
27
29
  {
28
30
  type: "button",
29
31
  role: "tab",
30
- "aria-selected": V,
31
- className: V ? "eyeon-map-controls__floor is-active" : "eyeon-map-controls__floor",
32
- onClick: () => M(C.id),
33
- children: C.name
32
+ "aria-selected": w,
33
+ className: w ? "eyeon-map-controls__floor is-active" : "eyeon-map-controls__floor",
34
+ onClick: () => s(B.id),
35
+ children: B.name
34
36
  },
35
- C.id
37
+ B.id
36
38
  );
37
39
  }) }),
38
- W && /* @__PURE__ */ te(Ye, { children: [
39
- /* @__PURE__ */ R(
40
+ V && /* @__PURE__ */ ct(Pe, { children: [
41
+ /* @__PURE__ */ T(
40
42
  "button",
41
43
  {
42
44
  type: "button",
43
45
  className: "eyeon-map-controls__reset",
44
- onClick: h,
46
+ onClick: m,
45
47
  "aria-label": "Reset map",
46
48
  children: "Reset"
47
49
  }
48
50
  ),
49
- /* @__PURE__ */ te("div", { className: "eyeon-map-controls__zoom", children: [
50
- /* @__PURE__ */ R(
51
+ /* @__PURE__ */ ct("div", { className: "eyeon-map-controls__zoom", children: [
52
+ /* @__PURE__ */ T(
51
53
  "button",
52
54
  {
53
55
  type: "button",
54
56
  className: "eyeon-map-controls__zoom-btn",
55
- onClick: N,
57
+ onClick: d,
56
58
  "aria-label": "Zoom out",
57
59
  children: "−"
58
60
  }
59
61
  ),
60
- /* @__PURE__ */ R(
62
+ /* @__PURE__ */ T(
61
63
  "button",
62
64
  {
63
65
  type: "button",
64
66
  className: "eyeon-map-controls__zoom-btn",
65
- onClick: I,
67
+ onClick: a,
66
68
  "aria-label": "Zoom in",
67
69
  children: "+"
68
70
  }
@@ -71,301 +73,1054 @@ function Tt({
71
73
  ] })
72
74
  ] }) });
73
75
  }
74
- const Et = 8;
75
- function Ct(l, i) {
76
- const M = i.trim().toLowerCase();
77
- return M ? l.filter((I) => I.label.toLowerCase().includes(M)) : l;
78
- }
79
- function St(l, i) {
80
- return i ?? l >= Et;
81
- }
82
- function Ge({
83
- value: l,
84
- options: i,
85
- onChange: M,
86
- disabled: I = !1,
87
- placeholder: N = "Select…",
88
- searchable: h,
89
- ariaLabel: B
76
+ const Jr = "Montserrat, sans-serif", se = 1.15, ht = {
77
+ Entrance: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
78
+ <path fill="none" stroke="#444444" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" d="M8.25 3.75h8.25A3.5 3.5 0 0 1 20 7.25v9.5a3.5 3.5 0 0 1-3.5 3.5H8.25"/>
79
+ <path fill="none" stroke="#444444" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" d="M3.5 12h12.35M12.2 7.85 16.4 12l-4.2 4.15"/>
80
+ </svg>`,
81
+ Kiosk: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 443.83 787.21">
82
+ <path fill="#444444" d="M451,587.7V8.14H7.14V589.5H111.43V730.89H71.27L38.59,763.58v31.78H416.36V764.93l-34.05-34H345.78V587.7ZM396.91,71.23v452.7H59.85V71.23Z" transform="translate(-7.14 -8.14)" />
83
+ </svg>`,
84
+ Escalator: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 576 445.3">
85
+ <path fill="#444444" d="M243.4,75.9c21.2,0,38.1-16.8,38.1-38S264.6,0,243.4,0c-21.2,0-38.1,16.8-38.1,38S222.1,75.9,243.4,75.9z M508.5,41.2h-88.7 c-18.5,0-41.9,7.6-56.1,21.7l-82.2,81.9V121c0-51-75.7-50.4-75.7,0v98.2l-71.3,71c-6.5,6.5-7.6,7.1-20.7,7.1H70.2 C26.1,297.2,0,336.8,0,369.9c0,33.6,26.1,75.4,74,75.4h77.9c18.5,0,40.8-7.1,58.8-24.4l228.1-226.7c4.9-4.3,7.6-5.4,15.8-5.4h56.1 c27.2,0,65.3-30.4,65.3-74.8C576.5,70.5,537.9,41.2,508.5,41.2z M504.7,150.8h-47.9c-20.1,0-29.4,2.7-41.4,14.7L185.7,394.3 c-9.3,9.2-21.2,13-36.5,13H73.5c-19.6,0-36.5-16.3-36.5-38c0-21.7,16.3-33.6,33.2-33.6H122c15.2,0,25-4.3,33.7-13L389.3,90 c9.8-9.8,19.1-10.9,35.4-10.9h80c19.6,0,32.7,21.7,32.7,34.7C537.9,126.4,528.6,150.8,504.7,150.8z" />
86
+ </svg>`,
87
+ ATM: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 577.8 577">
88
+ <path fill="#444444" d="M388.7,314c-3.7-10.3-10.3-19.8-17.7-27.2c-7.4-7.4-17.7-14-29.5-19.1c-6.6-2.9-19.2-6.6-39.1-11.8V144.2 c13.3,2.2,22.8,8.1,30.2,16.2c7.4,8.1,11.8,19.9,14,35.3l39.8-5.9c-2.9-24.3-13.3-44.1-30.2-58.1c-13.3-11-31-17.7-53.8-19.8V93.4 h-24.3v18.4c-25.8,2.2-45,9.6-58.2,21.3c-19.9,17.7-29.5,39.7-29.5,67.6c0,15.5,3.7,29.4,10.3,41.9s16.2,22,28.7,28.7 c17,9.6,33.2,16.2,49.4,20.6v121.3c-14.8-1.5-28-8.8-39.1-22.8c-7.4-9.6-13.3-25-16.2-46.3l-39.1,7.4c1.5,20.6,6.6,37.5,15.5,51.5 s19.9,23.5,31.7,30.1c12.5,6.6,28,11,47.9,13.2v39v-0.1V483h22.1v-39c28-0.7,50.1-11,67.1-28.7c17-18.4,25.8-40.4,25.8-67.6 C394.6,336,392.4,324.3,388.7,314z M278.9,145.1v107.2c-17.7-5.2-30.2-11.8-37.6-20.6s-11.1-19.8-11.1-33.1c0-14,4.4-25.7,13.3-35.3 C252.2,153.9,263.7,147.4,278.9,145.1V145h0.7C279.3,145,279.1,145,278.9,145.1z M340,394.2c-9.6,11-22.1,18.4-37.6,19.8l0,0V297.9 c20.6,5.2,34.6,11.8,42,20.6c6.6,8.1,10.3,19.8,10.3,33.8C354.8,369.2,349.6,383.1,340,394.2z" />
89
+ <path fill="#444444" d="M289.8,2.5c-158.7,0-288,128-288,287.2c0,158.3,129.3,287.2,288,287.2s288-128.9,288-287.2S448.6,2.5,289.8,2.5z M289.9,533.9C155,533.9,45.2,424.3,45.2,289.8C45.2,154.5,155,45.7,289.9,45.7s244.7,109.5,244.7,244.1S424.8,533.9,289.9,533.9z" />
90
+ </svg>`,
91
+ Management: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 576 414.6">
92
+ <path fill="#444444" d="M371.6,180.4c66.8,0,101,58.5,121.4,121.9l16.4,50.4c2.7,8.8-7.5,16.3-16.4,16.3h-56.6l-7.5-27.2 c-17.7-53.1-45-106.2-94.8-125.9c13-8.8,23.9-21.1,30.7-35.4C366.1,180.4,368.8,180.4,371.6,180.4z M441.2,145.7 c64.8,2,98.2,59.2,118.7,121.9l15.7,49.7c2.7,8.8-7.5,17.7-16.4,17.7h-35.5l-12.3-38.1c-16.4-53.1-44.3-106.2-94.8-125.9 C426.2,162.7,434.3,155.2,441.2,145.7z M51.6,334.3H16.8c-9.6,0-19.1-8.2-16.4-17.7l15.7-49.7C35.9,204.2,70.1,147.1,134.9,145 c6.1,9.5,15,18.4,24.6,24.5c-49.8,19.7-77.8,72.8-94.8,125.9L51.6,334.3L51.6,334.3z M437.7,0c35.5,0,64.8,28.6,64.8,64.7 c0,31.3-22.5,57.2-52.5,62.6c3.4-8.8,5.5-18.4,5.5-27.9c0-39.5-27.3-71.5-62.8-81C403.6,6.8,419.3,0,437.7,0L437.7,0z M137.6,0 c17.7,0,34.1,6.8,45,18.4c-35.5,9.5-62.8,41.5-62.8,81c0,9.5,2.1,19.1,5.5,27.9C96,121.9,72.8,96,72.8,64.7 C73.5,28.6,102.1,0,137.6,0L137.6,0z M287.7,0c19.8,0,37.5,8.8,49.8,22.5c-15.7,6.8-29.3,19.1-38.2,34l-3.4,5.5c-2.7,0-5.5,0-7.5,0 c-2,0-6.1,0-8.9,0l-3.4-5.5c-9.6-15-22.5-27.2-38.2-34C250.2,8.9,267.9,0,287.7,0L287.7,0z M287.7,226c66.8,0,101,58.5,122.1,121.9 l15.7,50.4c2.7,8.8-8.2,16.3-16.4,16.3H166.2c-9.6,0-19.8-8.2-16.4-16.3l15.7-50.4C186,284.6,220.8,226,287.7,226z M287.7,81 c35.5,0,64.8,28.6,64.8,64.7s-28.7,64.7-64.8,64.7c-35.5,0-64.8-28.6-64.8-64.7S252.2,81,287.7,81z M138.3,369H82.3 c-9.6,0-19.1-8.2-16.4-16.3l15.7-50.4c21.1-63.3,55.3-121.9,122.1-121.9c2.7,0,5.5,0,7.5,0c6.1,15,17.7,27.2,30.7,35.4 c-49.8,19.7-78.5,72.8-94.8,125.9C147.1,341.8,138.3,369,138.3,369z M203.8,34.7c23.9,0,44.3,12.9,55.9,31.3 c-32.1,12.2-55.9,42.9-55.9,79c0,6.1,0.7,12.2,2.1,18.4h-2.1c-35.5,0-64.8-28.6-64.8-64.7S168.3,34.7,203.8,34.7z M371.6,34.7 c35.5,0,64.8,28.6,64.8,64.7s-29.3,64-64.8,64h-2.7c2.1-6.1,2.7-12.2,2.7-18.4c0-36.8-23.9-66.7-55.9-79 C327.2,47.7,347,34.7,371.6,34.7z" />
93
+ </svg>`,
94
+ PlayArea: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 576 537.9">
95
+ <path fill="#444444" d="M384.3,137c38,0,68.8-30.7,68.8-68.5S422.3,0,384.3,0s-68.8,30.7-68.8,68.5S346.4,137,384.3,137z" />
96
+ <path fill="#444444" d="M283.3,96c20,26.3,35.9,53.3,67.6,64.4c31.2,11.1,60.5,11.1,83.5-5.3c22.9-16.4,34.7-46.8,54.1-87.2 c18.8-40.4,34.1-48,57-48c23.5,0,31.2,28.1,30.6,39.8s-10.6,31-40,52.7c-49.4,36.3-57.6,108.3-59.4,127.7 c-1.8,19.3-2.9,50.4,17.6,169.2c20.6,118.9-20,125.9-25.3,127.1c-5.3,0.6-21.2,8.2-31.1-16.4c-10-24.6-11.8-91.3-14.1-120 c-2.9-28.7-6.5-70.9-35.9-79c-30-8.2-40.6,39.8-51.7,76.1c-10.6,36.9-40,71.4-72.3,59.1s-29.4-50.4-10-78.5 c19.4-27.5,61.7-57.4,67.6-124.1c5.9-66.8-11.8-69.1-68.2-90.8c-55.8-22.3-60.5-33.4-67.6-48.6s7.6-46.8,31.1-52.7 C239.2,55.1,259.1,63.9,283.3,96L283.3,96z" />
97
+ <path fill="#444444" d="M134.7,251.7c26.9,0,48.8-21.8,48.8-48.6s-21.8-48.6-48.8-48.6s-48.8,21.8-48.8,48.6S107.7,251.7,134.7,251.7z" />
98
+ <path fill="#444444" d="M204,227.8c-15.3,17.6-28.2,35.7-51.1,41.6c-22.9,6.4-43.5,4.7-58.8-8.2c-15.3-12.9-21.7-35.1-32.9-64.4S40,161,23.5,159.8 C7.1,158.7,0,178,0,186.2c-0.6,8.2,5.9,22.3,25.3,39.2C58.2,253.5,60,305.1,60,318.5c0.6,13.5-0.6,35.7-21.7,118.3 s7.1,89.6,10.6,90.8s14.7,7,22.9-10s12.9-63.8,16.5-83.7c3.5-19.9,8.2-49.8,29.4-53.9s26.5,30.4,32.3,56.8 c5.9,26.3,24.7,52.7,47.6,45.7c22.9-7,23.5-34,11.2-54.4c-12.3-20.5-40-43.9-40.6-90.8c-0.6-47.4,12.3-48,52.9-60.3 c40.6-12.3,44.7-20.5,50.5-30.4c5.9-10-2.9-33.4-18.8-38.6C237.5,201.4,222.8,206.7,204,227.8L204,227.8z" />
99
+ </svg>`,
100
+ RestRoom: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 576 533.9">
101
+ <path fill="#444444" d="M282.3,533.9h9.2V0h-9.2V533.9z" />
102
+ <path fill="#444444" d="M118.2,97.1c25.4-4.6,41.6-30.1,34.7-55.5C146,16.2,122.9,2.3,97.4,6.9S58.1,39.3,62.8,62.4S95.1,104,118.2,97.1z" />
103
+ <path fill="#444444" d="M159.8,145.6h4.6c0,0,2.3,0,2.3,2.3L183,270.4c2.3,9.2,9.2,16.2,18.5,16.2c11.6,0,18.5-9.2,18.5-20.8l-18.5-129.4 c-2.3-13.9-13.9-23.1-27.7-23.1H44.3c-13.9,0-25.4,9.2-27.7,23.1L0.4,265.8c-2.3,11.6,6.9,20.8,18.5,20.8c9.2,0,16.2-6.9,18.5-16.2 l16.2-122.5c0,0,0-2.3,2.3-2.3h4.6c0,0,2.3,0,2.3,2.3L30.4,390.6c0,0,0,2.3,2.3,2.3h37c0,0,2.3,0,2.3,2.3v117.9 c0,9.2,6.9,16.2,16.2,16.2s16.2-6.9,16.2-16.2V393c0,0,0-2.3,2.3-2.3h11.6c0,0,2.3,0,2.3,2.3v117.9c0,9.2,6.9,16.2,16.2,16.2 c9.2,0,16.2-6.9,16.2-16.2V393c0,0,0-2.3,2.3-2.3h30.1c0,0,2.3,0,2.3-2.3l-27.7-242.7l0,0l0,0L159.8,145.6z" />
104
+ <path fill="#444444" d="M497.3,76.3c13.9-23.1,4.6-50.9-16.2-62.4s-50.9-6.9-64.7,16.2c-13.9,23.1-4.6,50.9,16.2,62.4 C455.7,106.3,483.5,99.4,497.3,76.3z" />
105
+ <path fill="#444444" d="M545.9,113.3h-178c-13.9,0-25.4,9.2-27.7,23.1v129.4c0,11.6,9.2,20.8,20.8,20.8s18.5-9.2,18.5-20.8V159.5c0,0,0-2.3,2.3-2.3 h2.3c0,0,2.3,0,2.3,2.3l25.4,161.8v187.2c0,11.6,9.2,20.8,20.8,20.8l0,0c11.6,0,20.8-9.2,20.8-20.8V323.6c0,0,0-2.3,2.3-2.3h6.9 c0,0,2.3,0,2.3,2.3v184.9c0,11.6,9.2,20.8,20.8,20.8l0,0c11.6,0,20.8-9.2,20.8-20.8V321.3l25.4-161.8c0,0,0-2.3,2.3-2.3h-2.3 c0,0,2.3,0,2.3,2.3v106.3c0,11.6,9.2,20.8,20.8,20.8s20.8-9.2,20.8-20.8V136.4C571.4,122.5,559.8,113.3,545.9,113.3L545.9,113.3 L545.9,113.3z" />
106
+ </svg>`,
107
+ FamilyRestRoom: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 576 522.5">
108
+ <path fill="#444444" d="M119.8,91.5c25-5.9,40.5-30.8,34.6-55.7c-5.9-24.9-30.9-40.4-55.9-34.5S58,32,63.9,56.9S94.8,97.3,119.8,91.5z" />
109
+ <path fill="#444444" d="M160.6,139.1h4.5c0.6,0,1.3,0.6,1.3,1.3l15.3,123.1c1.3,8.9,8.9,15.9,17.8,15.9c10.8,0,19.1-9.5,17.8-20.3l-15.9-128.9 c-1.9-13.3-13.4-24.1-27.4-24.1H43.4c-14,0-25.5,10.2-27.4,24.1L0.1,259.1c-1.3,10.8,7,20.3,17.8,20.3c8.9,0,16.5-7,17.8-15.9 l15.3-123.8c0-0.6,0.6-1.3,1.3-1.3h4.5c0.6,0,1.3,0.6,1.3,1.3L29.4,384.1c0,0.6,0.6,1.3,1.3,1.3H67c0.6,0,1.3,0.6,1.3,1.3v118.1 c0,9.5,7.6,16.5,16.5,16.5c9.5,0,16.5-7.6,16.5-16.5V387.3c0-0.6,0.6-1.3,1.3-1.3h10.8c0.6,0,1.3,0.6,1.3,1.3v118.1 c0,9.5,7.6,16.5,16.5,16.5c9.5,0,16.5-7.6,16.5-16.5V387.3c0-0.6,0.6-1.3,1.3-1.3h36.3c0.6,0,1.3-0.6,1.3-1.3L158,140.3 C159.3,139.7,159.9,139.1,160.6,139.1L160.6,139.1z" />
110
+ <path fill="#444444" d="M498.9,69.8c12.9-22.1,5.4-50.5-16.8-63.4c-22.2-12.9-50.6-5.4-63.6,16.7c-12.9,22.1-5.4,50.5,16.8,63.4 C457.5,99.4,486,91.9,498.9,69.8z" />
111
+ <path fill="#444444" d="M547.9,106.1H369.6c-14,0-25.5,10.2-27.4,24.1v128.9c0,10.8,8.9,19.7,19.7,19.7s19.7-8.9,19.7-19.7v-106 c0-0.6,0.6-1.3,1.3-1.3h2.5c0.6,0,1.3,0.6,1.3,1.3l25.5,162.5v187.3c0,10.8,8.9,19.7,19.7,19.7h0.6c10.8,0,19.7-8.9,19.7-19.7v-186 c0-0.6,0.6-1.3,1.3-1.3h10.8c0.6,0,1.3,0.6,1.3,1.3v186c0,10.8,8.9,19.7,19.7,19.7h0.6c10.8,0,19.7-8.9,19.7-19.7V315.6l25.5-162.5 c0-0.6,0.6-1.3,1.3-1.3h2.6c0.6,0,1.3,0.6,1.3,1.3v106c0,10.8,8.9,19.7,19.7,19.7s19.7-8.9,19.7-19.7V130.2 C573.4,116.2,562,106.1,547.9,106.1L547.9,106.1z" />
112
+ <path fill="#444444" d="M259.6,480l19.7-19.7L251.9,433L229,455.8c-7.6,7.6-5.7,20.3,1.3,27.3l32.5,33.6c12.7,12.7,29.3-5.1,17.2-17.1L259.6,480 L259.6,480z M288.9,347.9c19.1,0,34.4-15.2,34.4-34.3s-15.3-34.3-34.4-34.3s-34.4,15.2-34.4,34.3S269.7,347.9,288.9,347.9z M369.7,405.7l-46.5-46.3c-3.8-3.8-8.3-6.3-14.7-6.3h-41.4c-6.4,0-10.8,2.5-14,6.3l-45.9,45.7c-12.7,12.7,4.5,28.6,17.2,15.9 l28-27.9v26h72.6v-26l28.6,28.6C364.6,433.6,381.8,417.1,369.7,405.7L369.7,405.7z M324.5,433l-27.4,27.3l19.7,19.7l-20.4,20.3 c-12.1,12.1,4.5,29.2,17.2,17.1l32.5-33.6c7-7,8.9-20.3,1.3-27.3C347.4,455.9,324.5,433,324.5,433z" />
113
+ </svg>`,
114
+ Elevator: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 576 576">
115
+ <path fill="#444444" d="M576,145.2v268.6c-0.1,1.6-0.3,3.1-0.3,4.7c-0.3,33.3-0.6,66.6-0.8,99.9c-0.1,21.1-9.7,37.2-26.7,49 c-7.7,5.4-15.9,9.3-25.9,8c-3.8-0.5-7.7-0.1-11.5-0.1c-115.3,0.1-230.6,0.2-345.9,0.3c-1.1,0-2.2,0.2-3.3,0.3h-16.9 c-1.2-0.1-2.4-0.3-3.6-0.3c-30.2-0.3-60.4-0.6-90.7-0.8c-11.1-0.1-20.7-4.1-29.1-11.2c-8.7-7.4-15.5-16.7-19.9-27.3l-0.2-0.5 c-0.7-1.6-1.1-3.4-1.2-5.4v0C0,492.8,0,455.1,0,417.4c0-124.1,0-248.1,0-372.2c0-0.2,0-0.3,0-0.5c0-1.5,0.3-2.9,0.7-4.2l0,0.1 C8.3,22.5,20.5,8.9,38.7,1c1.2-0.5,2.6-0.9,4-0.9h0c162.8,0,325.6,0,488.4,0c1.5,0,2.8,0.4,4.1,0.9l-0.1,0c3.4,1.4,6.1,2.7,8.8,4.2 l-0.4-0.2c19.7,11.2,30.9,27.8,31.3,50.8c0.4,28.2,0.6,56.3,0.8,84.5C575.7,141.8,575.8,143.5,576,145.2L576,145.2z M536.4,288.6 h0.3c0-56.7,0-113.4,0-170c0-18.2-0.4-36.4-0.7-54.6c-0.1-8-8.4-19.8-15.9-22.7c-1-0.4-2.1-0.6-3.2-0.7h0c-3.2-0.3-6.4-0.6-9.5-0.6 c-25.5-0.4-51-0.9-76.6-1c-96.4-0.2-192.7-0.4-289.1-0.4c-22.9,0-45.8,0.1-68.7,0.3c-3.4,0-6.8,0.1-10,0.9 c-9.9,2.3-17.1,8.3-21.7,17.3c-1,1.9-2,3.9-2.1,5.9c-0.1,149.8-0.1,299.6-0.1,449.4c0,0.9-0.1,2,0.3,2.7c2.7,4.2,5.1,8.6,8.3,12.3 c5.6,6.3,13.2,8.4,21.6,8.4c23.7,0.1,47.5,0.6,71.2,0.6c123.5,0,247,0,370.5,0c0.1,0,0.2,0,0.3,0c1.1,0,2.1-0.2,3-0.6l-0.1,0 c8.3-3.5,15.4-8.4,20.2-16.3c1.2-1.8,2-4.1,2-6.5l0,0C536.4,438.2,536.4,363.4,536.4,288.6L536.4,288.6z" />
116
+ <path fill="#444444" d="M307,277.5l75.9,68.4l0.9-0.2V150.9h49.7v194.8l1,0.3l78.2-67.4c0.1,1,0.2,1.7,0.3,2.4c0.3,19.9,0.6,39.8,0.8,59.7 c0,0,0,0,0,0.1c0,1.4-0.5,2.6-1.4,3.6l0,0c-34.1,32.7-68.2,65.3-102.3,97.9c-0.3,0.3-0.6,0.5-1,0.9c-0.6-0.5-1.3-1-1.9-1.5 c-32.7-30.7-65.5-61.4-98.2-92c-1.4-1.2-2.3-3-2.3-5c0-0.1,0-0.3,0-0.4v0c0.2-20.9,0.3-41.9,0.4-62.8C307,280.5,307,279.4,307,277.5 L307,277.5z" />
117
+ <path fill="#444444" d="M142.2,234.5L67,301.8c-0.1-1.2-0.3-1.9-0.3-2.7c-0.3-20.7-0.7-41.5-1-62.2c0-1.3,0.5-2.5,1.3-3.4l0,0 c33.3-31.4,66.7-62.8,100.1-94.1c0.3-0.3,0.6-0.5,1-0.8c5.9,5.7,11.8,11.3,17.7,16.9c28.1,26.9,56.2,53.9,84.3,80.9 c0.9,0.8,1.4,2,1.5,3.3v0c-0.5,20.2-1.1,40.3-1.6,60.5c0,0.3-0.1,0.7-0.2,1.7l-77.4-67.1l-0.9,0.1v193.9h-48.3v-194L142.2,234.5z" />
118
+ </svg>`,
119
+ Security: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 576 597.6">
120
+ <path fill="#444444" d="M554,80.7L298.5,1.5c-6.6-2-13.2-2-19.9,0L23.2,80.7C9.3,84.7,0,97.9,0,112.4c0,352.5,178.7,436.4,274,481.9 c4.6,2,9.3,3.3,13.9,3.3c4.6,0,9.9-1.3,13.9-3.3c96-45.5,274-129.4,274-481.9C577.2,97.9,567.9,85.3,554,80.7z M288.6,527.6 C197.2,484.1,73.5,411.4,66.2,136.2l222.4-68.6L511,136.8C503.7,412.1,379.3,484.1,288.6,527.6z" />
121
+ <path fill="#444444" d="M278.7,152l-26.5,87.1l-90.7-2.6c-4.6,0-8.6,2.6-9.9,7.3c-1.3,4.6,0,9.2,4,11.9l74.8,51.5L200.6,393c-1.3,4.6,0,9.2,4,11.9 c4,2.6,8.6,2.6,12.6,0l72.1-54.8l72.1,54.8c4,2.6,8.6,2.6,12.6,0c4-2.6,5.3-7.3,4-11.9l-29.8-85.8l74.8-51.5c4-2.6,5.3-7.3,4-11.9 c-1.3-4.6-5.3-7.3-9.9-7.3l-90.7,2l-26.5-87.1c-1.3-4.6-5.3-7.3-9.9-7.3C283.9,144.1,280,147.4,278.7,152L278.7,152z" />
122
+ </svg>`,
123
+ ChildStroller: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 432 370.06">
124
+ <path fill="#444444" d="M130.29,178.61l-42.67,34L33.24,254.13c-15.48,12.09-28.32-2.64-28.32-2.64-12.08-15.86,1.89-26.06,1.89-26.06l68-53.24s7.55-7.93,26.81-2.26l28.7,8.68"/>
125
+ <path fill="#444444" d="M210,111A38.52,38.52,0,1,1,248.48,72.5,38.68,38.68,0,0,1,210,111"/>
126
+ <path fill="#444444" d="M390.84,0a42.88,42.88,0,0,0-24.92,8.31L80.44,235.63a43.71,43.71,0,0,0-13.59,22.28,40.67,40.67,0,0,0,1.89,23.41,47.9,47.9,0,0,0-22.28,41.16A47.58,47.58,0,1,0,94,274.9,41.43,41.43,0,0,0,84.22,276a22.77,22.77,0,0,1-1.51-14.35,25.82,25.82,0,0,1,8.68-13.59l17.37-14,88,29.08a33.54,33.54,0,0,0,42.67-21.53l1.51-4.91,18.88,45.32a47.09,47.09,0,0,0-22.28,40.4,47.58,47.58,0,1,0,47.58-47.58,41.43,41.43,0,0,0-9.82,1.13l-26.43-62.68,43.8-126.12,83.08-66.08a23.7,23.7,0,0,1,15.1-5.29,25.3,25.3,0,0,1,25.3,25.3,25.72,25.72,0,0,1-10.2,20.39,8,8,0,0,0,10.58,12.08A41.37,41.37,0,0,0,390.84,0ZM93.66,301.33A20.77,20.77,0,1,1,72.89,322.1,20.71,20.71,0,0,1,93.66,301.33Zm191.07,0A20.77,20.77,0,1,1,264,322.1,20.71,20.71,0,0,1,284.73,301.33Z"/>
127
+ </svg>`,
128
+ VendingMachine: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 432 594">
129
+ <circle fill="#444444" cx="324" cy="175.5" r="13.5"/>
130
+ <circle fill="#444444" cx="364.5" cy="175.5" r="13.5"/>
131
+ <circle fill="#444444" cx="324" cy="243" r="13.5"/>
132
+ <circle fill="#444444" cx="364.5" cy="243" r="13.5"/>
133
+ <circle fill="#444444" cx="324" cy="310.5" r="13.5"/>
134
+ <circle fill="#444444" cx="364.5" cy="310.5" r="13.5"/>
135
+ <path fill="#444444" d="M216,94.5H67.5C59.4,94.5,54,99.9,54,108c0,8.1,5.4,13.5,13.5,13.5H216c8.1,0,13.5-5.4,13.5-13.5 C229.5,99.9,224.1,94.5,216,94.5z"/>
136
+ <path fill="#444444" d="M216,162H67.5c-8.1,0-13.5,5.4-13.5,13.5c0,8.1,5.4,13.5,13.5,13.5H216c8.1,0,13.5-5.4,13.5-13.5 C229.5,167.4,224.1,162,216,162z"/>
137
+ <path fill="#444444" d="M216,229.5H67.5c-8.1,0-13.5,5.4-13.5,13.5c0,8.1,5.4,13.5,13.5,13.5H216c8.1,0,13.5-5.4,13.5-13.5 C229.5,234.9,224.1,229.5,216,229.5z"/>
138
+ <path fill="#444444" d="M216,297H67.5c-8.1,0-13.5,5.4-13.5,13.5S59.4,324,67.5,324H216c8.1,0,13.5-5.4,13.5-13.5S224.1,297,216,297z"/>
139
+ <path fill="#444444" d="M391.5,0H324c-8.1,0-13.5,5.4-13.5,13.5S315.9,27,324,27h67.5c8.1,0,13.5,5.4,13.5,13.5V567H27V40.5 C27,32.4,32.4,27,40.5,27h216v499.5c0,8.1,5.4,13.5,13.5,13.5s13.5-5.4,13.5-13.5v-513C283.5,5.4,278.1,0,270,0H40.5 C17.5,0,0,17.5,0,40.5v540c0,8.1,5.4,13.5,13.5,13.5h405c8.1,0,13.5-5.4,13.5-13.5v-540C432,17.5,414.5,0,391.5,0z"/>
140
+ <path fill="#444444" d="M364.5,94.5H324c-8.1,0-13.5,5.4-13.5,13.5c0,8.1,5.4,13.5,13.5,13.5h40.5c8.1,0,13.5-5.4,13.5-13.5 C378,99.9,372.6,94.5,364.5,94.5z"/>
141
+ <path fill="#444444" d="M216,432H67.5c-8.1,0-13.5,5.4-13.5,13.5V513c0,8.1,5.4,13.5,13.5,13.5H216c8.1,0,13.5-5.4,13.5-13.5v-67.5 C229.5,437.4,224.1,432,216,432z M81,499.5V459h121.5v40.5H81z"/>
142
+ </svg>`,
143
+ Stairs: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 432 448.5">
144
+ <path fill="#444444" d="M432,243.3h-81.7v33.1h-72.2v33.1h-72.2v33.1h-72.2v33.1H61.5v33.1H0v39.7h101.2v-33.1h72.2v-33.1h72.2v-33.1h72.2v-33.1 h72.2V283H432L432,243.3"/>
145
+ <path fill="#444444" d="M99.9,109.3c12,0,21.8-9.7,21.8-21.8c0-12-9.8-21.8-21.8-21.8c-12,0-21.8,9.7-21.8,21.8C78.1,99.6,87.9,109.3,99.9,109.3"/>
146
+ <path fill="#444444" d="M179.4,299.8l-56.5-47.4l11.7-82.9c12.5,14.8,20.7,33.4,22.7,53.8l17.8-4.8c-0.9-32.2-14.2-61.3-35.3-82.6 c-14.4-14.5-32.9-19.2-45.9-20.6c-0.1,0-0.2,0-0.3,0c-1.6,0-2.9,1.2-3.2,2.7c-6.5,34.7-27.7,64.2-56.9,81.9l9.3,16.1 c15.6-6.6,29.5-16.4,40.9-28.6v177.3H107l10.4-73.7l57.7,33.3L179.4,299.8"/>
147
+ <path fill="#444444" d="M294.1,43.6c12,0,21.8-9.8,21.8-21.8c0-12-9.8-21.8-21.8-21.8c-12,0-21.8,9.8-21.8,21.8C272.3,33.8,282.1,43.6,294.1,43.6" />
148
+ <path fill="#444444" d="M337.2,154.3l-41.8-24.1l3.9-20c1.4-7.5,2.2-15.2,2.2-23.1c0-12-1.8-23.7-5-34.6c-0.4-1.4-1.7-2.4-3.1-2.4c0,0-0.1,0-0.1,0 c-46.7,1.6-84.1,40-84.1,87.1c0,2.3,0.1,4.6,0.3,6.9l18.3,3.2c0-0.5,0-0.9,0-1.4c0-19.5,8.6-36.9,22.3-48.7l-10.5,201.1h23.3 l24.9-128l23,10.7L294.9,240l16.6,16.6l34.6-74.3c1.3-2.8,2-5.9,2-9.2C348.1,165.1,343.8,158,337.2,154.3"/>
149
+ </svg>`,
150
+ ChargingStation: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 432 627.4">
151
+ <polygon fill="#444444" points="314.4,282.1 133.8,467.8 188.6,334.2 114.9,334.2 225.6,148.6 314.4,148.6 236.7,282.1 "/>
152
+ <path fill="#444444" d="M374.2,0H63.3C28.4,0.1,0.1,28.4,0,63.3v503.6c0,32.8,30.1,60.5,62.6,60.5h309.2c33.3,0,60.3-27,60.3-60.3V374.2l0,0V57.8 C432,25.9,406.1,0,374.2,0z M220.3,600.4c-8.3,0.2-15.2-6.4-15.4-14.7c0-0.2,0-0.5,0-0.7c0.1-8.5,6.9-15.3,15.4-15.4 c8.3-0.2,15.2,6.4,15.4,14.7c0,0.2,0,0.5,0,0.7C235.4,593.8,229.1,600.4,220.3,600.4z M391.1,544.8H44v-465h346.7v294.4l0.4,55 V544.8z"/>
153
+ </svg>`,
154
+ WheelChair: `<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 432 492.2">
155
+ <path fill="#444444" d="M134.7,80.1l9.5,103h104.6v33.3H146.6l3.2,30.9h147.4l66.6,157l56.3-23.8l11.9,27l-84,36.4l-69.7-163.3H118.9l-19-221.9 c-3.2-5.5-4.7-11.9-4.7-18.2C95.1,18.2,112.5,0,134.7,0c22.2,0,40.4,18.2,40.4,40.4C175.2,61.8,156.9,80.1,134.7,80.1L134.7,80.1z" />
156
+ <path fill="#444444" d="M306.7,397.1c-25.3,56.3-81.6,95.1-146.6,95.1C72.1,492.2,0,420.9,0,332.1C0,268.7,37.2,214,91.1,187.9l3.2,36.5 c-36.5,22.2-61,61.8-61,107.8c0,69.8,57.1,126.8,126.8,126.8c65,0,118.1-48.3,126-110.2L306.7,397.1"/>
157
+ </svg>`
158
+ }, Ce = [
159
+ {
160
+ name: "ATM",
161
+ type: "atm",
162
+ svgCode: ht.ATM
163
+ },
164
+ {
165
+ name: "Management",
166
+ type: "management",
167
+ svgCode: ht.Management
168
+ },
169
+ {
170
+ name: "Kids Area",
171
+ type: "playarea",
172
+ svgCode: ht.PlayArea
173
+ },
174
+ {
175
+ name: "Restroom",
176
+ type: "restroom",
177
+ svgCode: ht.RestRoom
178
+ },
179
+ {
180
+ name: "Family Restroom",
181
+ type: "family-restroom",
182
+ svgCode: ht.FamilyRestRoom
183
+ },
184
+ {
185
+ name: "Elevator",
186
+ type: "elevator",
187
+ svgCode: ht.Elevator
188
+ },
189
+ {
190
+ name: "Security",
191
+ type: "security",
192
+ svgCode: ht.Security
193
+ },
194
+ {
195
+ name: "Escalator",
196
+ type: "escalator",
197
+ svgCode: ht.Escalator
198
+ },
199
+ {
200
+ name: "Child Stroller",
201
+ type: "child-stroller",
202
+ svgCode: ht.ChildStroller
203
+ },
204
+ {
205
+ name: "Vending Machine",
206
+ type: "vending-machine",
207
+ svgCode: ht.VendingMachine
208
+ },
209
+ {
210
+ name: "Stairs",
211
+ type: "stairs",
212
+ svgCode: ht.Stairs
213
+ },
214
+ {
215
+ name: "Charging Station",
216
+ type: "charging-station",
217
+ svgCode: ht.ChargingStation
218
+ },
219
+ {
220
+ name: "Wheelchair",
221
+ type: "wheelchair",
222
+ svgCode: ht.WheelChair
223
+ }
224
+ ], Tn = /* @__PURE__ */ new Set([
225
+ "elevator",
226
+ "escalator"
227
+ ]), Yt = Ce.filter(
228
+ (t) => !Tn.has(t.type)
229
+ ), Sn = ht.Kiosk, zn = ht.Entrance;
230
+ function Pn(t) {
231
+ return Yt.some((e) => e.type === t);
232
+ }
233
+ function we(t) {
234
+ return Yt.find((e) => e.type === t) ?? Ce.find((e) => e.type === t);
235
+ }
236
+ function Kt(t) {
237
+ var e;
238
+ return t === "kiosk" ? Sn : t === "entrance" ? zn : (e = we(t)) == null ? void 0 : e.svgCode;
239
+ }
240
+ function Oe(t, e) {
241
+ const s = e.startsWith("#") ? e : `#${e}`;
242
+ return t.replace(/fill="(?!none")[^"]*"/gi, `fill="${s}"`).replace(/stroke="(?!none")[^"]*"/gi, `stroke="${s}"`);
243
+ }
244
+ function jt(t, e) {
245
+ const s = e ? Oe(t, e) : t;
246
+ return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`;
247
+ }
248
+ function Rn(t) {
249
+ const e = Kt("entrance");
250
+ if (e)
251
+ return jt(e, t);
252
+ }
253
+ function _r() {
254
+ return Yt.map((t) => ({
255
+ value: t.type,
256
+ label: t.name
257
+ }));
258
+ }
259
+ function $r(t, e) {
260
+ var s;
261
+ return t == null ? "" : ((s = e.find((a) => a.id === t)) == null ? void 0 : s.code) ?? "";
262
+ }
263
+ function to(t, e) {
264
+ const s = e.find(
265
+ (a) => a.isActive !== !1 && a.code === t
266
+ );
267
+ return (s == null ? void 0 : s.id) ?? null;
268
+ }
269
+ function Gn(t, e, s) {
270
+ const a = He(t, e);
271
+ if (!a) return;
272
+ const d = Kt(a);
273
+ if (d)
274
+ return jt(d, s);
275
+ }
276
+ const Vn = "#0763b1", Wn = "#94a3b8";
277
+ function Dn(t) {
278
+ const e = (t.sourceSvgId ?? t.key).trim().toLowerCase().replace(/_/g, "-");
279
+ return e === "escalator" || e.startsWith("escalator-") ? "escalator" : e === "elevator" || e.startsWith("elevator-") ? "elevator" : null;
280
+ }
281
+ function Bn(t, e, s) {
282
+ const a = Kt(t);
283
+ if (!a) return;
284
+ const d = s != null && s.trim() ? s.trim() : e ? Vn : Wn;
285
+ return jt(a, d);
286
+ }
287
+ function Hn(t) {
288
+ const e = /* @__PURE__ */ new Set();
289
+ for (const s of t)
290
+ s.shapeId != null && s.connectorId != null && e.add(s.shapeId);
291
+ return e;
292
+ }
293
+ function Zn(t, e) {
294
+ if (t.orphanedAt) return null;
295
+ const s = Dn(t);
296
+ return !s || !e.has(t.id) ? null : s;
297
+ }
298
+ const Fn = "data:font/woff;base64,d09GRgABAAAAAFCoAA8AAAAArPAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABWAAAAHkAAAC0Eu8QH0dQT1MAAAHUAAAWjwAATB5m7jJFR1NVQgAAGGQAAAKFAAAFJGpkiWBPUy8yAAAa7AAAAE8AAABgVRslUlNUQVQAABs8AAAAPQAAAEjngsw+Y21hcAAAG3wAAAHkAAACzH9ZgPhnYXNwAAAdYAAAAAgAAAAIAAAAEGdseWYAAB1oAAApYQAARKoq7tA3aGVhZAAARswAAAA2AAAANiP81ytoaGVhAABHBAAAACEAAAAkCHQHRGhtdHgAAEcoAAACSAAABPRDVFknbG9jYQAASXAAAAJcAAACfEa4V3xtYXhwAABLzAAAABwAAAAgAVoAzm5hbWUAAEvoAAABCgAAAlo1CVy5cG9zdAAATPQAAAOyAAAHi0JlOQl42h2MUQpBYRhEz4Buim7c3HhViCSe7EBWIHuQZ2Htcvr7mjNNzTeEDitgrF5UptqL/uGr90iOphGhVXN2cs9FXrnJOw/55C39sftL6KabgRymkbNs5DYHecqZYANYqLq4OU3pdeiXBcpCz4UpVdqsmZSF5R8PWgsnAAAAeNqs1AOUJAkQBNCIrNGq17bGOq9t27Zm9vWsbdv27tm2bdu27axY6+nuxctf0dlWgQDyoxHmIqZZi3bdkDh0Wt44JI7MGz4W5cYNnpiLRMQAwD//gOCxHgAwN2bs8LxcXCgzcwbnjUW1nLE5fl9dH48EADEIfGIRp525QKAjka/s7LIV4n+N3cgGLIK3cSNK+O2KgMgPA2O7IRe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ZQKR8aCNf+clfAQpUkIIVolCFKVwRilSUohWjWMUpXglKVJKSlaJUpSldGcpUlrKVo1zlKV8FKlSRilWiUpWpXBWqVJWqVaNa1aleDWpUE/OIZi6PecETnvLydxtVgeRGDASDC2HGP7iWjgqNYaZi4+rOMkhXWkrl9bFa4z1FFVO3esbdO2O4vL68ubz1enPFanbv7WxRlWzyrrORi82nD8OQg/349v4eN6XVvuRXgkdJegRM+wP/D1OyU556UjANZaNPQblUTJ/9U1kpIK9RL/hvXS92sUITxs+WpW4QHAYh/HIht4F2BNGemtyAK2gIXzA4o097ow/uhhp/NCIBDBmi2iqdAaIzQEwGKDLAkAGGDE0oAxQZoMgAw36i/glhQpga7EUakyg6IexfGXy79unnhw9PzpniMl8wUTLFcqx90Pvx8v9yZzErmLfloiqZV7CFFPm1UaUkXJP4gFIP/JlSsqnOQ2AuG4FKGh3fJNw9I4vHFs+o9yg8U7N6F7KdUzXS1RDfEEuNrfckhIeEvbDkm9zuTnXKw1adtBmW5iakVkJGWqZ9LB5ZPL69lHI9m0vjfCuX5ZxtZKMPxiY5Ijy5RYNjtfes7bhC7AoZhDvtAHY9uqhjGLceX9QxtltP20t65q7F7WydaJLMrmJLrhA5Ao32wFoaZdy3NwclpO9Gh9+lTeC7+evtj/vtIlqFLthSMIytkEu2Pz/+9yJIvbPPEvhC0zGho/mP6g8I+wYHg79LdQ9mAAA=", Xt = Fn;
299
+ let ie = !1;
300
+ function Ie() {
301
+ if (ie || typeof document > "u" || !("fonts" in document))
302
+ return;
303
+ ie = !0, new FontFace("Montserrat", `url(${Xt})`).load().then((e) => {
304
+ document.fonts.add(e);
305
+ });
306
+ }
307
+ Ie();
308
+ const Xn = 8;
309
+ function Un(t, e) {
310
+ const s = e.trim().toLowerCase();
311
+ return s ? t.filter((a) => `${a.label} ${a.hint ?? ""}`.toLowerCase().includes(s)) : t;
312
+ }
313
+ function qn(t, e) {
314
+ return e ?? t >= Xn;
315
+ }
316
+ function ae() {
317
+ return /* @__PURE__ */ T(
318
+ "svg",
319
+ {
320
+ className: "eyeon-map-select__chevron",
321
+ width: "12",
322
+ height: "12",
323
+ viewBox: "0 0 12 12",
324
+ "aria-hidden": !0,
325
+ children: /* @__PURE__ */ T(
326
+ "path",
327
+ {
328
+ d: "M2.5 4.5 6 8l3.5-3.5",
329
+ fill: "none",
330
+ stroke: "currentColor",
331
+ strokeWidth: "1.5",
332
+ strokeLinecap: "round",
333
+ strokeLinejoin: "round"
334
+ }
335
+ )
336
+ }
337
+ );
338
+ }
339
+ function le({
340
+ value: t,
341
+ options: e,
342
+ onChange: s,
343
+ disabled: a = !1,
344
+ placeholder: d = "Select…",
345
+ searchable: m,
346
+ ariaLabel: b
90
347
  }) {
91
- const W = he(null), p = he(null), k = he(null), z = he(null), [O, C] = ae(!1), [V, P] = ae(""), [g, u] = ae(null), E = St(i.length, h), y = i.find((w) => w.value === l), m = re(
92
- () => Ct(i, V),
93
- [i, V]
94
- ), v = be(() => {
95
- C(!1), P("");
96
- }, []), U = be(() => {
97
- const w = p.current;
98
- if (!w) return;
99
- const T = w.getBoundingClientRect(), _ = window.innerHeight - T.bottom - 8, q = T.top - 8, Y = Math.min(280, Math.max(_, q, 120)), G = _ < 160 && q > _;
100
- u({
101
- top: G ? Math.max(8, T.top - Y - 4) : T.bottom + 4,
102
- left: T.left,
103
- width: Math.max(T.width, 160),
104
- maxHeight: Y
348
+ const Q = Re(), x = at(null), z = at(null), G = at(null), k = at(null), Z = at(null), [V, B] = dt(!1), [w, L] = dt(""), [M, U] = dt(0), [c, p] = dt(null), I = qn(e.length, m), u = e.find((E) => E.value === t), N = ot(
349
+ () => Un(e, I && V ? w : ""),
350
+ [V, e, w, I]
351
+ ), O = mt(() => {
352
+ B(!1), L(""), U(0);
353
+ }, []), D = mt(
354
+ (E) => {
355
+ s(E), O();
356
+ },
357
+ [O, s]
358
+ ), Y = mt(() => {
359
+ const E = z.current ?? G.current;
360
+ if (!E) return;
361
+ const q = E.getBoundingClientRect(), $ = window.innerHeight - q.bottom - 8, K = q.top - 8, l = Math.min(280, Math.max($, K, 120)), H = $ < 160 && K > $;
362
+ p({
363
+ top: H ? Math.max(8, q.top - l - 4) : q.bottom + 4,
364
+ left: q.left,
365
+ width: Math.max(q.width, 160),
366
+ maxHeight: l
105
367
  });
106
368
  }, []);
107
- le(() => {
108
- if (!O) {
109
- u(null);
369
+ lt(() => {
370
+ if (!V) {
371
+ p(null);
110
372
  return;
111
373
  }
112
- U();
113
- const w = (q) => {
114
- var G, K;
115
- const Y = q.target;
116
- (G = W.current) != null && G.contains(Y) || (K = k.current) != null && K.contains(Y) || v();
117
- }, T = (q) => {
118
- q.key === "Escape" && v();
119
- }, _ = () => U();
120
- return document.addEventListener("mousedown", w), document.addEventListener("keydown", T), window.addEventListener("resize", _), window.addEventListener("scroll", _, !0), () => {
121
- document.removeEventListener("mousedown", w), document.removeEventListener("keydown", T), window.removeEventListener("resize", _), window.removeEventListener("scroll", _, !0);
374
+ Y();
375
+ const E = (K) => {
376
+ var H, _;
377
+ const l = K.target;
378
+ (H = x.current) != null && H.contains(l) || (_ = k.current) != null && _.contains(l) || O();
379
+ }, q = (K) => {
380
+ var l;
381
+ K.key === "Escape" && (O(), (l = I ? Z.current : G.current) == null || l.blur());
382
+ }, $ = () => Y();
383
+ return document.addEventListener("mousedown", E), document.addEventListener("keydown", q), window.addEventListener("resize", $), window.addEventListener("scroll", $, !0), () => {
384
+ document.removeEventListener("mousedown", E), document.removeEventListener("keydown", q), window.removeEventListener("resize", $), window.removeEventListener("scroll", $, !0);
122
385
  };
123
- }, [O, v, U]), le(() => {
124
- !O || !E || requestAnimationFrame(() => {
125
- var w;
126
- return (w = z.current) == null ? void 0 : w.focus();
386
+ }, [O, V, Y, I]), lt(() => {
387
+ !V || !I || requestAnimationFrame(() => {
388
+ var E;
389
+ return (E = Z.current) == null ? void 0 : E.focus();
127
390
  });
128
- }, [O, E]);
129
- const d = O && g && !I ? Nt(
130
- /* @__PURE__ */ te(
391
+ }, [V, I]), lt(() => {
392
+ U(0);
393
+ }, [w, N.length]);
394
+ const tt = (E) => {
395
+ N.length !== 0 && U((q) => (q + E + N.length) % N.length);
396
+ }, F = (E) => {
397
+ if (E.key === "ArrowDown") {
398
+ E.preventDefault(), V ? tt(1) : B(!0);
399
+ return;
400
+ }
401
+ if (E.key === "ArrowUp") {
402
+ E.preventDefault(), V ? tt(-1) : B(!0);
403
+ return;
404
+ }
405
+ if (E.key === "Enter") {
406
+ E.preventDefault();
407
+ const q = N[M];
408
+ V && q ? D(q.value) : B(!0);
409
+ }
410
+ }, J = V && c && !a ? En(
411
+ /* @__PURE__ */ T(
131
412
  "div",
132
413
  {
133
414
  ref: k,
415
+ id: Q,
134
416
  className: "eyeon-map-select__menu",
135
417
  role: "listbox",
136
- "aria-label": B,
418
+ "aria-label": b,
137
419
  style: {
138
- top: g.top,
139
- left: g.left,
140
- width: g.width,
141
- maxHeight: g.maxHeight
420
+ top: c.top,
421
+ left: c.left,
422
+ width: c.width,
423
+ maxHeight: c.maxHeight
424
+ },
425
+ children: /* @__PURE__ */ T("ul", { className: "eyeon-map-select__list", children: N.length === 0 ? /* @__PURE__ */ T("li", { className: "eyeon-map-select__empty", children: "No matches" }) : N.map((E, q) => {
426
+ const $ = E.value === t, K = q === M;
427
+ return /* @__PURE__ */ T(
428
+ "li",
429
+ {
430
+ id: `${Q}-${E.value}`,
431
+ role: "option",
432
+ "aria-selected": $,
433
+ children: /* @__PURE__ */ ct(
434
+ "button",
435
+ {
436
+ type: "button",
437
+ className: [
438
+ "eyeon-map-select__option",
439
+ $ ? "is-active" : "",
440
+ K ? "is-highlight" : ""
441
+ ].filter(Boolean).join(" "),
442
+ onMouseDown: (l) => l.preventDefault(),
443
+ onMouseEnter: () => U(q),
444
+ onClick: () => D(E.value),
445
+ children: [
446
+ E.iconUrl ? /* @__PURE__ */ T(
447
+ "img",
448
+ {
449
+ className: E.iconMuted ? "eyeon-map-select__option-icon is-muted" : "eyeon-map-select__option-icon",
450
+ src: E.iconUrl,
451
+ alt: ""
452
+ }
453
+ ) : null,
454
+ /* @__PURE__ */ ct("span", { className: "eyeon-map-select__option-copy", children: [
455
+ /* @__PURE__ */ T("span", { children: E.label }),
456
+ E.hint ? /* @__PURE__ */ T("span", { className: "eyeon-map-select__option-hint", children: E.hint }) : null
457
+ ] })
458
+ ]
459
+ }
460
+ )
461
+ },
462
+ E.value
463
+ );
464
+ }) })
465
+ }
466
+ ),
467
+ document.body
468
+ ) : null;
469
+ return /* @__PURE__ */ ct("div", { ref: x, className: "eyeon-map-select", children: [
470
+ I ? /* @__PURE__ */ ct(
471
+ "div",
472
+ {
473
+ ref: z,
474
+ className: V ? "eyeon-map-select__trigger is-open" : "eyeon-map-select__trigger",
475
+ onMouseDown: (E) => {
476
+ var $;
477
+ if (a) return;
478
+ const q = E.target;
479
+ q.closest(".eyeon-map-select__chevron-btn") || (q !== Z.current && (E.preventDefault(), ($ = Z.current) == null || $.focus()), V || B(!0));
142
480
  },
143
481
  children: [
144
- E ? /* @__PURE__ */ R(
482
+ /* @__PURE__ */ T(
145
483
  "input",
146
484
  {
147
- ref: z,
148
- className: "eyeon-map-select__search",
149
- type: "search",
150
- placeholder: "Search…",
151
- value: V,
152
- "aria-label": "Search options",
153
- onChange: (w) => P(w.target.value),
154
- onKeyDown: (w) => w.stopPropagation()
485
+ ref: Z,
486
+ className: "eyeon-map-select__input",
487
+ type: "text",
488
+ role: "combobox",
489
+ "aria-label": b,
490
+ "aria-expanded": V,
491
+ "aria-haspopup": "listbox",
492
+ "aria-controls": Q,
493
+ "aria-autocomplete": "list",
494
+ "aria-activedescendant": V && N[M] ? `${Q}-${N[M].value}` : void 0,
495
+ disabled: a,
496
+ placeholder: d,
497
+ value: V ? w : (u == null ? void 0 : u.label) ?? "",
498
+ onChange: (E) => {
499
+ L(E.target.value), V || B(!0);
500
+ },
501
+ onFocus: () => {
502
+ a || B(!0);
503
+ },
504
+ onKeyDown: F
155
505
  }
156
- ) : null,
157
- /* @__PURE__ */ R("ul", { className: "eyeon-map-select__list", children: m.length === 0 ? /* @__PURE__ */ R("li", { className: "eyeon-map-select__empty", children: "No matches" }) : m.map((w) => {
158
- const T = w.value === l;
159
- return /* @__PURE__ */ R("li", { role: "option", "aria-selected": T, children: /* @__PURE__ */ R(
160
- "button",
161
- {
162
- type: "button",
163
- className: T ? "eyeon-map-select__option is-active" : "eyeon-map-select__option",
164
- onMouseDown: (_) => _.preventDefault(),
165
- onClick: () => {
166
- M(w.value), v();
167
- },
168
- children: w.label
169
- }
170
- ) }, w.value);
171
- }) })
506
+ ),
507
+ /* @__PURE__ */ T(
508
+ "button",
509
+ {
510
+ type: "button",
511
+ className: "eyeon-map-select__chevron-btn",
512
+ tabIndex: -1,
513
+ "aria-hidden": !0,
514
+ disabled: a,
515
+ onMouseDown: (E) => E.preventDefault(),
516
+ onClick: () => {
517
+ a || B((E) => !E);
518
+ },
519
+ children: /* @__PURE__ */ T(ae, {})
520
+ }
521
+ )
172
522
  ]
173
523
  }
174
- ),
175
- document.body
176
- ) : null;
177
- return /* @__PURE__ */ te("div", { ref: W, className: "eyeon-map-select", children: [
178
- /* @__PURE__ */ te(
524
+ ) : /* @__PURE__ */ ct(
179
525
  "button",
180
526
  {
181
- ref: p,
527
+ ref: G,
182
528
  type: "button",
183
529
  className: "eyeon-map-select__trigger",
184
- "aria-label": B,
185
- "aria-expanded": O,
530
+ "aria-label": b,
531
+ "aria-expanded": V,
186
532
  "aria-haspopup": "listbox",
187
- disabled: I,
533
+ disabled: a,
188
534
  onClick: () => {
189
- I || C((w) => !w);
535
+ a || B((E) => !E);
190
536
  },
191
537
  children: [
192
- /* @__PURE__ */ R("span", { className: y ? void 0 : "eyeon-map-select__placeholder", children: (y == null ? void 0 : y.label) ?? N }),
193
- /* @__PURE__ */ R(
194
- "svg",
538
+ /* @__PURE__ */ ct(
539
+ "span",
195
540
  {
196
- className: "eyeon-map-select__chevron",
197
- width: "12",
198
- height: "12",
199
- viewBox: "0 0 12 12",
200
- "aria-hidden": !0,
201
- children: /* @__PURE__ */ R(
202
- "path",
203
- {
204
- d: "M2.5 4.5 6 8l3.5-3.5",
205
- fill: "none",
206
- stroke: "currentColor",
207
- strokeWidth: "1.5",
208
- strokeLinecap: "round",
209
- strokeLinejoin: "round"
210
- }
211
- )
541
+ className: u ? "eyeon-map-select__value" : "eyeon-map-select__placeholder",
542
+ children: [
543
+ u != null && u.iconUrl ? /* @__PURE__ */ T(
544
+ "img",
545
+ {
546
+ className: u.iconMuted ? "eyeon-map-select__option-icon is-muted" : "eyeon-map-select__option-icon",
547
+ src: u.iconUrl,
548
+ alt: ""
549
+ }
550
+ ) : null,
551
+ (u == null ? void 0 : u.label) ?? d
552
+ ]
553
+ }
554
+ ),
555
+ /* @__PURE__ */ T(ae, {})
556
+ ]
557
+ }
558
+ ),
559
+ J
560
+ ] });
561
+ }
562
+ function Qt(t) {
563
+ if (t.length < 3) return null;
564
+ const e = new rt.Shape();
565
+ e.moveTo(t[0].x, t[0].y);
566
+ for (let s = 1; s < t.length; s++)
567
+ e.lineTo(t[s].x, t[s].y);
568
+ return e.closePath(), e;
569
+ }
570
+ function Yn(t) {
571
+ if (t.length < 3) return null;
572
+ const e = new rt.Path();
573
+ e.moveTo(t[0].x, t[0].y);
574
+ for (let s = 1; s < t.length; s++)
575
+ e.lineTo(t[s].x, t[s].y);
576
+ return e.closePath(), e;
577
+ }
578
+ function Kn(t, e) {
579
+ const s = Qt(t);
580
+ if (!s) return null;
581
+ for (const a of Ze(t, e)) {
582
+ const d = Yn(a);
583
+ d && s.holes.push(d);
584
+ }
585
+ return s;
586
+ }
587
+ function ue() {
588
+ }
589
+ function jn(t) {
590
+ const s = Math.max(48, Math.round(256 * Math.max(t, 0.2))), a = document.createElement("canvas");
591
+ a.width = s, a.height = 256;
592
+ const d = a.getContext("2d");
593
+ if (!d) return new rt.CanvasTexture(a);
594
+ d.clearRect(0, 0, s, 256);
595
+ const m = Math.min(s, 256) * 0.14;
596
+ d.strokeStyle = qe, d.globalAlpha = 0.82, d.lineWidth = Math.max(5, Math.min(s, 256) * 0.045), d.lineCap = "round", d.beginPath(), d.moveTo(m, m), d.lineTo(s - m, 256 - m), d.moveTo(s - m, m), d.lineTo(m, 256 - m), d.stroke();
597
+ const b = new rt.CanvasTexture(a);
598
+ return b.colorSpace = rt.SRGBColorSpace, b.anisotropy = 4, b.needsUpdate = !0, b;
599
+ }
600
+ function Qn({ polygon: t }) {
601
+ const e = ot(() => Qt(t), [t]), s = ot(() => Fe(t), [t]), a = Math.max(8, Jn(s)), d = ot(() => {
602
+ if (t.length < 2) return null;
603
+ const b = t[0], Q = [
604
+ ...t.map((k) => new rt.Vector3(k.x, k.y, 0.05)),
605
+ new rt.Vector3(b.x, b.y, 0.05)
606
+ ], x = new rt.BufferGeometry().setFromPoints(Q), z = new rt.LineDashedMaterial({
607
+ color: Xe,
608
+ dashSize: a,
609
+ gapSize: a * 0.65
610
+ }), G = new rt.Line(x, z);
611
+ return G.renderOrder = 8, G.computeLineDistances(), G.raycast = ue, G;
612
+ }, [a, t]);
613
+ lt(
614
+ () => () => {
615
+ if (!d) return;
616
+ d.geometry.dispose();
617
+ const b = d.material;
618
+ Array.isArray(b) ? b.forEach((Q) => Q.dispose()) : b.dispose();
619
+ },
620
+ [d]
621
+ );
622
+ const m = ot(() => {
623
+ const b = Math.max(s.maxX - s.minX, 1), Q = Math.max(s.maxY - s.minY, 1);
624
+ return jn(b / Q);
625
+ }, [s]);
626
+ return lt(() => () => m.dispose(), [m]), !e || !d ? null : /* @__PURE__ */ ct("group", { children: [
627
+ /* @__PURE__ */ ct(
628
+ "mesh",
629
+ {
630
+ position: [0, 0, 0.02],
631
+ renderOrder: 6,
632
+ onClick: (b) => b.stopPropagation(),
633
+ onPointerDown: (b) => b.stopPropagation(),
634
+ children: [
635
+ /* @__PURE__ */ T("shapeGeometry", { args: [e] }),
636
+ /* @__PURE__ */ T(
637
+ "meshBasicMaterial",
638
+ {
639
+ color: Ue,
640
+ side: rt.DoubleSide,
641
+ depthWrite: !1
212
642
  }
213
643
  )
214
644
  ]
215
645
  }
216
646
  ),
217
- d
647
+ /* @__PURE__ */ ct("mesh", { position: [0, 0, 0.03], renderOrder: 7, raycast: ue, children: [
648
+ /* @__PURE__ */ T("shapeGeometry", { args: [e] }),
649
+ /* @__PURE__ */ T(
650
+ "meshBasicMaterial",
651
+ {
652
+ map: m,
653
+ transparent: !0,
654
+ depthWrite: !1,
655
+ side: rt.DoubleSide,
656
+ toneMapped: !1
657
+ }
658
+ )
659
+ ] }),
660
+ d ? /* @__PURE__ */ T("primitive", { object: d }) : null
218
661
  ] });
219
662
  }
220
- function vt(l, i, M) {
221
- if (l === "walkable") return nt;
222
- if (M) return M;
223
- switch (l) {
224
- case "unit":
225
- return i.STORE_DEFAULT_COLOR;
663
+ function Jn(t) {
664
+ const e = Math.min(t.maxX - t.minX, t.maxY - t.minY);
665
+ return Math.min(18, Math.max(7, e * 0.08));
666
+ }
667
+ function _n({
668
+ polygons: t
669
+ }) {
670
+ return t.length === 0 ? null : /* @__PURE__ */ T("group", { children: t.map((e, s) => /* @__PURE__ */ T(Qn, { polygon: e }, `opening-void-${s}`)) });
671
+ }
672
+ const $n = [
673
+ "unit",
674
+ "amenity",
675
+ "kiosk_screen",
676
+ "connector",
677
+ "entrance",
678
+ "parking_zone"
679
+ ];
680
+ function Jt(t) {
681
+ return $n.includes(t);
682
+ }
683
+ function tr(t, e, s) {
684
+ return e === t || s.includes(t);
685
+ }
686
+ function er(t, e) {
687
+ return e ?? t ?? null;
688
+ }
689
+ function nr(t) {
690
+ return Jt(t) ? "pointer" : "";
691
+ }
692
+ function Wt(t, e) {
693
+ t && t.classList.toggle("is-hover-shape", e === "pointer");
694
+ }
695
+ function rr(t, e, s) {
696
+ return !s || !Jt(t) ? e : e < 0.08 ? 0.28 : e;
697
+ }
698
+ function fe(t) {
699
+ const e = t.replace("#", "").trim();
700
+ if (e.length === 3)
701
+ return [
702
+ parseInt(e[0] + e[0], 16),
703
+ parseInt(e[1] + e[1], 16),
704
+ parseInt(e[2] + e[2], 16)
705
+ ];
706
+ if (e.length !== 6) return null;
707
+ const s = parseInt(e.slice(0, 2), 16), a = parseInt(e.slice(2, 4), 16), d = parseInt(e.slice(4, 6), 16);
708
+ return [s, a, d].some((m) => Number.isNaN(m)) ? null : [s, a, d];
709
+ }
710
+ function or(t, e, s) {
711
+ const a = (d) => Math.max(0, Math.min(255, Math.round(d))).toString(16).padStart(2, "0");
712
+ return `#${a(t)}${a(e)}${a(s)}`;
713
+ }
714
+ function cr(t, e, s, a = 0.2) {
715
+ if (!s) return t;
716
+ const d = fe(t), m = fe(e);
717
+ return !d || !m ? t : or(
718
+ d[0] + (m[0] - d[0]) * a,
719
+ d[1] + (m[1] - d[1]) * a,
720
+ d[2] + (m[2] - d[2]) * a
721
+ );
722
+ }
723
+ const de = 5;
724
+ function sr(t, e) {
725
+ if ((e.button ?? 0) !== 0) return !1;
726
+ if (!t) return !0;
727
+ const s = e.x - t.x, a = e.y - t.y;
728
+ return s * s + a * a <= de * de;
729
+ }
730
+ function ir(t, e, s, a) {
731
+ if (t === "walkable") return e.WALKABLE_COLOR;
732
+ if (t === "unit")
733
+ return ne(a, e.STORE_DEFAULT_COLOR);
734
+ if (t === "connector" && (a != null && a.bgColor))
735
+ return ne(a, s || "#e2e8f0");
736
+ if (s) return s;
737
+ switch (t) {
226
738
  case "wall":
227
739
  case "boundary":
228
- return i.WALL_COLOR;
740
+ return e.WALL_COLOR;
229
741
  case "parking_zone":
230
- return i.PARKING_ZONE_COLOR;
742
+ return e.PARKING_ZONE_COLOR;
231
743
  case "green_area":
232
- return i.GREEN_AREA_COLOR;
744
+ return e.GREEN_AREA_COLOR;
233
745
  case "water":
234
- return i.WATER_COLOR;
746
+ return e.WATER_COLOR;
235
747
  case "floorplate":
236
- return i.BASE_COLOR;
748
+ return e.BASE_COLOR;
237
749
  case "void":
238
750
  return "#00000000";
239
751
  default:
240
752
  return "#e2e8f0";
241
753
  }
242
754
  }
243
- function Ot(l) {
244
- if (l.length < 3) return null;
245
- const i = new ue.Shape();
246
- i.moveTo(l[0].x, l[0].y);
247
- for (let M = 1; M < l.length; M++)
248
- i.lineTo(l[M].x, l[M].y);
249
- return i.closePath(), i;
250
- }
251
- function _t({
252
- level: l,
253
- theme: i,
254
- is3d: M,
255
- selectedRetailerId: I,
256
- onSelectShape: N,
257
- interactiveOnly: h = !1
755
+ function ar(t) {
756
+ return Qt(t);
757
+ }
758
+ function lr({
759
+ shape: t,
760
+ extrude: e,
761
+ color: s
258
762
  }) {
259
- const B = re(() => l.shapes.filter((p) => p.kind !== "void").filter((p) => {
260
- var k, z;
261
- return !(p.kind === "label" && ((z = (k = p.label) == null ? void 0 : k.text) != null && z.trim()));
262
- }).filter(
263
- (p) => {
264
- var k, z;
265
- return !h || Je.includes(p.kind) || p.kind === "label" && !!((z = (k = p.label) == null ? void 0 : k.text) != null && z.trim()) || p.kind === "walkable" && !We(p.sourceSvgId);
763
+ const a = ot(
764
+ () => e > 0 ? new rt.ExtrudeGeometry(t, {
765
+ depth: e,
766
+ bevelEnabled: !1
767
+ }) : new rt.ShapeGeometry(t),
768
+ [e, t]
769
+ );
770
+ return lt(() => () => a.dispose(), [a]), /* @__PURE__ */ ct("lineSegments", { renderOrder: 40, children: [
771
+ /* @__PURE__ */ T("edgesGeometry", { args: [a] }),
772
+ /* @__PURE__ */ T("lineBasicMaterial", { color: s, depthTest: !1 })
773
+ ] });
774
+ }
775
+ function ur({
776
+ level: t,
777
+ theme: e,
778
+ is3d: s,
779
+ onSelectShape: a,
780
+ selectedShapeIds: d = [],
781
+ hoveredShapeId: m = null,
782
+ eventSource: b,
783
+ interactiveOnly: Q = !1,
784
+ imageProxyUrl: x = null,
785
+ amenities: z = []
786
+ }) {
787
+ const [G, k] = dt(null), Z = er(
788
+ m,
789
+ G
790
+ );
791
+ lt(
792
+ () => () => Wt(b == null ? void 0 : b.current, ""),
793
+ [b]
794
+ );
795
+ const V = ot(() => Ye(t), [t]), B = ot(() => t.shapes.filter((c) => c.kind !== "void").filter((c) => {
796
+ var p, I;
797
+ return !(c.kind === "label" && ((I = (p = c.label) == null ? void 0 : p.text) != null && I.trim()));
798
+ }).filter((c) => !zt(c)).filter(
799
+ (c) => {
800
+ var p, I;
801
+ return !Q || Ke.includes(c.kind) || c.kind === "label" && !!((I = (p = c.label) == null ? void 0 : p.text) != null && I.trim()) || c.kind === "walkable" && !Me(c.sourceSvgId);
266
802
  }
267
- ).filter((p) => !p.orphanedAt).map((p) => {
268
- var g;
269
- const k = p.kind === "unit" ? i.STORE_RADIUS : 0, O = p.geometry.polygons.map(
270
- (u) => k > 0 ? et(u, k) : u
271
- ).map(Ot).filter((u) => u != null);
272
- if (O.length === 0) return null;
273
- const C = I != null && ((g = p.assignment) == null ? void 0 : g.retailerId) === I, V = C ? i.ACCENT_COLOR : vt(p.kind, i, p.style.fill), P = M && (p.kind === "unit" || p.kind === "wall") ? p.style.extrudeHeight ?? (p.kind === "unit" ? i.STORE_HEIGHT : 2) : 0;
274
- return { shape: p, threeShapes: O, color: V, extrude: P, selected: C };
275
- }).filter(Boolean), [l, i, M, I, h]), W = re(
276
- () => l.shapes.filter(
277
- (p) => {
278
- var k, z;
279
- return !p.orphanedAt && p.kind === "label" && !!((z = (k = p.label) == null ? void 0 : k.text) != null && z.trim());
803
+ ).filter((c) => !c.orphanedAt).map((c) => {
804
+ const p = c.kind === "unit" ? e.STORE_RADIUS : 0, I = je(c.kind) && V.length > 0, N = c.geometry.polygons.map(
805
+ (Y) => p > 0 ? Qe(Y, p) : Y
806
+ ).map(
807
+ (Y) => I ? Kn(Y, V) : ar(Y)
808
+ ).filter((Y) => Y != null);
809
+ if (N.length === 0) return null;
810
+ const O = ir(
811
+ c.kind,
812
+ e,
813
+ c.style.fill,
814
+ c.assignment
815
+ ), D = s && (c.kind === "unit" || c.kind === "wall") ? c.style.extrudeHeight ?? (c.kind === "unit" ? e.STORE_HEIGHT : 2) : 0;
816
+ return { shape: c, threeShapes: N, color: O, extrude: D };
817
+ }).filter(Boolean), [t, e, s, Q, V]), w = ot(
818
+ () => t.shapes.filter(
819
+ (c) => {
820
+ var p, I;
821
+ return !c.orphanedAt && c.kind === "label" && !!((I = (p = c.label) == null ? void 0 : p.text) != null && I.trim());
280
822
  }
281
823
  ),
282
- [l.shapes]
283
- );
284
- return /* @__PURE__ */ te("group", { children: [
285
- W.map((p) => {
286
- const k = tt(p.geometry);
287
- return /* @__PURE__ */ R(
288
- pt,
824
+ [t.shapes]
825
+ ), L = ot(
826
+ () => t.shapes.filter((c) => !c.orphanedAt && zt(c)),
827
+ [t.shapes]
828
+ ), M = ot(
829
+ () => t.shapes.filter(
830
+ (c) => !c.orphanedAt && c.kind !== "label" && !zt(c) && Je(c.assignment, c.label)
831
+ ),
832
+ [t.shapes]
833
+ ), U = ot(() => {
834
+ const c = Hn(t.anchors);
835
+ return t.shapes.flatMap((p) => {
836
+ const I = Zn(p, c);
837
+ if (!I) return [];
838
+ const u = _e(p), N = Bn(I, !0, u.iconColor);
839
+ if (!N) return [];
840
+ const O = Ot(p.geometry);
841
+ return [
842
+ {
843
+ shape: p,
844
+ url: N,
845
+ width: u.size,
846
+ rotation: u.rotate * Math.PI / 180,
847
+ x: (O.minX + O.maxX) / 2 + u.offsetX,
848
+ y: (O.minY + O.maxY) / 2 + u.offsetY
849
+ }
850
+ ];
851
+ });
852
+ }, [t.anchors, t.shapes]);
853
+ return /* @__PURE__ */ ct("group", { children: [
854
+ w.map((c) => {
855
+ const p = Ot(c.geometry), I = ee(c.label.align), u = (p.minX + p.maxX) / 2, N = (p.minY + p.maxY) / 2, O = (c.label.rotate ?? 0) * Math.PI / 180;
856
+ return /* @__PURE__ */ T(
857
+ "group",
858
+ {
859
+ position: [u, N, 0.15],
860
+ rotation: [0, 0, O],
861
+ children: /* @__PURE__ */ T(
862
+ ce,
863
+ {
864
+ font: Xt,
865
+ position: [$e(p, I) - u, 0, 0],
866
+ fontSize: c.label.size ?? 24,
867
+ color: c.label.color ?? e.STORE_TEXT_COLOR,
868
+ anchorX: I,
869
+ anchorY: "middle",
870
+ textAlign: I,
871
+ lineHeight: se,
872
+ scale: [1, -1, 1],
873
+ children: c.label.text
874
+ }
875
+ )
876
+ },
877
+ `label-${c.id}`
878
+ );
879
+ }),
880
+ L.map((c) => {
881
+ const p = Ot(c.geometry), I = (p.minX + p.maxX) / 2 + (c.label.offsetX ?? 0), u = (p.minY + p.maxY) / 2 + (c.label.offsetY ?? 0), N = (c.label.rotate ?? 0) * Math.PI / 180, O = c.label.size || tn, D = Rn(
882
+ c.label.color ?? e.STORE_TEXT_COLOR
883
+ );
884
+ return D ? /* @__PURE__ */ T(
885
+ Dt,
289
886
  {
290
- position: [k.minX, k.maxY, 0.15],
291
- fontSize: p.label.size ?? 24,
292
- color: p.label.color ?? i.STORE_TEXT_COLOR,
293
- anchorX: "left",
294
- anchorY: "bottom",
887
+ url: D,
888
+ width: O,
889
+ position: [I, u, 0.18],
890
+ rotation: N
891
+ },
892
+ `entrance-${c.id}`
893
+ ) : null;
894
+ }),
895
+ M.map((c) => {
896
+ var q, $, K;
897
+ const p = Ot(c.geometry), I = (p.minX + p.maxX) / 2 + (c.label.offsetX ?? 0), u = (p.minY + p.maxY) / 2 + (c.label.offsetY ?? 0), N = (c.label.rotate ?? 0) * Math.PI / 180, O = c.label.size || ((q = c.assignment) == null ? void 0 : q.size) || en, D = s && (c.kind === "unit" || c.kind === "wall") ? c.style.extrudeHeight ?? (c.kind === "unit" ? e.STORE_HEIGHT : 2) : 0, Y = D > 0 ? D + 0.15 : 0.2, tt = c.label.color ?? (($ = c.assignment) == null ? void 0 : $.textColor) ?? e.STORE_TEXT_COLOR, F = nn(c.assignment, null, c.label) ?? Gn(
898
+ c.assignment,
899
+ z,
900
+ tt
901
+ ), J = (K = c.label.text) == null ? void 0 : K.trim(), E = ee(c.label.align);
902
+ return F ? /* @__PURE__ */ T(
903
+ Dt,
904
+ {
905
+ url: F,
906
+ width: rn(O, c.assignment),
907
+ position: [I, u, Y],
908
+ rotation: N,
909
+ imageProxyUrl: x
910
+ },
911
+ `overlay-${c.id}`
912
+ ) : /* @__PURE__ */ T(
913
+ ce,
914
+ {
915
+ font: Xt,
916
+ position: [I, u, Y],
917
+ rotation: [0, 0, N],
918
+ fontSize: O,
919
+ color: c.label.color ?? e.STORE_TEXT_COLOR,
920
+ anchorX: "center",
921
+ anchorY: "middle",
922
+ textAlign: E,
923
+ lineHeight: se,
295
924
  scale: [1, -1, 1],
296
- children: p.label.text
925
+ raycast: Le,
926
+ children: J
297
927
  },
298
- `label-${p.id}`
928
+ `overlay-${c.id}`
299
929
  );
300
930
  }),
301
- B.map(({ shape: p, threeShapes: k, color: z, extrude: O, selected: C }) => /* @__PURE__ */ R("group", { children: k.map((V, P) => /* @__PURE__ */ te(
302
- "mesh",
931
+ U.map(({ shape: c, url: p, width: I, rotation: u, x: N, y: O }) => /* @__PURE__ */ T(
932
+ Dt,
303
933
  {
304
- position: [0, 0, p.zIndex * 0.01],
305
- onClick: (g) => {
306
- g.stopPropagation(), (p.kind === "unit" || p.kind === "amenity" || p.kind === "kiosk_screen" || p.kind === "entrance" || p.kind === "parking_zone") && (N == null || N(p.id));
307
- },
308
- children: [
309
- O > 0 ? /* @__PURE__ */ R(
310
- "extrudeGeometry",
311
- {
312
- args: [
313
- V,
314
- { depth: O, bevelEnabled: !1 }
315
- ]
316
- }
317
- ) : /* @__PURE__ */ R("shapeGeometry", { args: [V] }),
318
- /* @__PURE__ */ R(
319
- "meshBasicMaterial",
320
- {
321
- color: z,
322
- transparent: p.style.transparent || p.kind === "amenity",
323
- opacity: p.style.opacity ?? (p.kind === "amenity" ? 0.01 : 1),
324
- side: ue.DoubleSide
934
+ url: p,
935
+ width: I,
936
+ position: [N, O, 0.22],
937
+ rotation: u
938
+ },
939
+ `connector-icon-${c.id}`
940
+ )),
941
+ /* @__PURE__ */ T(_n, { polygons: V }),
942
+ B.map(({ shape: c, threeShapes: p, color: I, extrude: u }) => {
943
+ const N = Jt(c.kind), O = N && tr(c.id, Z, d), D = c.style.opacity ?? (c.kind === "amenity" ? 0.01 : 1), Y = Mt(I), tt = Y ? O ? 0.2 : 0 : rr(
944
+ c.kind,
945
+ D,
946
+ O
947
+ ), F = Y ? O ? e.ACCENT_COLOR : "#000000" : cr(I, e.ACCENT_COLOR, O);
948
+ return /* @__PURE__ */ T("group", { children: p.map((J, E) => /* @__PURE__ */ ct(
949
+ "mesh",
950
+ {
951
+ position: [0, 0, c.zIndex * 0.01],
952
+ onPointerOver: (q) => {
953
+ N && (q.stopPropagation(), k(c.id), Wt(
954
+ b == null ? void 0 : b.current,
955
+ nr(c.kind)
956
+ ));
957
+ },
958
+ onPointerOut: (q) => {
959
+ N && (q.stopPropagation(), k(($) => $ === c.id ? null : $), Wt(b == null ? void 0 : b.current, ""));
960
+ },
961
+ onPointerDown: (q) => {
962
+ var K;
963
+ !!(q.shiftKey || (K = q.nativeEvent) != null && K.shiftKey) && q.stopPropagation();
964
+ },
965
+ onClick: (q) => {
966
+ var $;
967
+ if (q.stopPropagation(), N) {
968
+ a == null || a(c.id, {
969
+ additive: !!(q.shiftKey || ($ = q.nativeEvent) != null && $.shiftKey)
970
+ });
971
+ return;
325
972
  }
326
- ),
327
- C && /* @__PURE__ */ te("lineSegments", { children: [
328
- /* @__PURE__ */ R(
329
- "edgesGeometry",
973
+ a == null || a(null);
974
+ },
975
+ children: [
976
+ u > 0 ? /* @__PURE__ */ T(
977
+ "extrudeGeometry",
330
978
  {
331
979
  args: [
332
- O > 0 ? new ue.ExtrudeGeometry(V, {
333
- depth: O,
334
- bevelEnabled: !1
335
- }) : new ue.ShapeGeometry(V)
980
+ J,
981
+ { depth: u, bevelEnabled: !1 }
336
982
  ]
337
983
  }
984
+ ) : /* @__PURE__ */ T("shapeGeometry", { args: [J] }),
985
+ /* @__PURE__ */ T(
986
+ "meshBasicMaterial",
987
+ {
988
+ color: F,
989
+ transparent: c.style.transparent || c.kind === "amenity" || tt < 1,
990
+ opacity: tt,
991
+ side: rt.DoubleSide
992
+ }
338
993
  ),
339
- /* @__PURE__ */ R("lineBasicMaterial", { color: i.ACCENT_COLOR })
340
- ] })
341
- ]
342
- },
343
- `${p.id}-${P}`
344
- )) }, p.id))
994
+ O ? /* @__PURE__ */ T(
995
+ lr,
996
+ {
997
+ shape: J,
998
+ extrude: u,
999
+ color: e.ACCENT_COLOR
1000
+ }
1001
+ ) : null
1002
+ ]
1003
+ },
1004
+ `${c.id}-${E}`
1005
+ )) }, c.id);
1006
+ })
345
1007
  ] });
346
1008
  }
347
- function Pt({
348
- route: l,
349
- activeLevelId: i,
350
- color: M
1009
+ function Le() {
1010
+ }
1011
+ function fr(t, e) {
1012
+ return new Promise((s, a) => {
1013
+ const d = new Image(), m = () => {
1014
+ e == null || e.removeEventListener("abort", b), d.onload = null, d.onerror = null;
1015
+ }, b = () => {
1016
+ m(), d.src = "", a(new DOMException("Image load aborted", "AbortError"));
1017
+ };
1018
+ if (e != null && e.aborted) {
1019
+ b();
1020
+ return;
1021
+ }
1022
+ e == null || e.addEventListener("abort", b, { once: !0 }), d.crossOrigin = "anonymous", d.onload = () => {
1023
+ m();
1024
+ const Q = d.naturalWidth || d.width, x = d.naturalHeight || d.height;
1025
+ if (!Q || !x) {
1026
+ a(new Error("empty image"));
1027
+ return;
1028
+ }
1029
+ const z = document.createElement("canvas");
1030
+ z.width = Q, z.height = x;
1031
+ const G = z.getContext("2d");
1032
+ if (!G) {
1033
+ a(new Error("canvas"));
1034
+ return;
1035
+ }
1036
+ G.drawImage(d, 0, 0);
1037
+ const k = new rt.CanvasTexture(z);
1038
+ k.colorSpace = rt.SRGBColorSpace, k.needsUpdate = !0, s({ texture: k, aspect: x / Q });
1039
+ }, d.onerror = () => {
1040
+ m(), a(new Error(`Failed to load ${t}`));
1041
+ }, d.src = t;
1042
+ });
1043
+ }
1044
+ function Dt({
1045
+ url: t,
1046
+ width: e,
1047
+ position: s,
1048
+ rotation: a,
1049
+ imageProxyUrl: d
351
1050
  }) {
352
- const I = re(() => l.points.filter((h) => i == null || h.levelId === i).map((h) => new ue.Vector3(h.x, h.y, 2)), [l, i]);
353
- if (I.length < 2) return null;
354
- const N = new ue.CatmullRomCurve3(I);
355
- return /* @__PURE__ */ te("mesh", { children: [
356
- /* @__PURE__ */ R("tubeGeometry", { args: [N, Math.max(I.length * 4, 8), 1.5, 8, !1] }),
357
- /* @__PURE__ */ R("meshBasicMaterial", { color: M })
358
- ] });
1051
+ const [m, b] = dt(null), [Q, x] = dt(1);
1052
+ return lt(() => {
1053
+ let z = !1, G = null;
1054
+ const k = new AbortController();
1055
+ b(null);
1056
+ const Z = be(t, d), V = Z === t ? [t] : [Z, t];
1057
+ return (async () => {
1058
+ let w;
1059
+ for (const L of V)
1060
+ try {
1061
+ const M = await fr(L, k.signal);
1062
+ if (z) {
1063
+ M.texture.dispose();
1064
+ return;
1065
+ }
1066
+ G = M.texture, x(M.aspect), b(M.texture);
1067
+ return;
1068
+ } catch (M) {
1069
+ if (k.signal.aborted) return;
1070
+ w = M;
1071
+ }
1072
+ z || (b(null), w && console.warn("Retail logo failed to load", t, w));
1073
+ })(), () => {
1074
+ z = !0, k.abort(), G == null || G.dispose();
1075
+ };
1076
+ }, [t, d]), !m || e <= 0 ? null : /* @__PURE__ */ ct(
1077
+ "mesh",
1078
+ {
1079
+ position: s,
1080
+ rotation: [0, 0, a],
1081
+ scale: [1, -1, 1],
1082
+ renderOrder: 30,
1083
+ raycast: Le,
1084
+ children: [
1085
+ /* @__PURE__ */ T("planeGeometry", { args: [e, e * Q] }),
1086
+ /* @__PURE__ */ T(
1087
+ "meshBasicMaterial",
1088
+ {
1089
+ map: m,
1090
+ transparent: !0,
1091
+ depthTest: !1,
1092
+ depthWrite: !1,
1093
+ side: rt.DoubleSide,
1094
+ toneMapped: !1
1095
+ }
1096
+ )
1097
+ ]
1098
+ }
1099
+ );
359
1100
  }
360
- const Rt = It;
361
- class Me extends bt {
1101
+ function dr({
1102
+ route: t,
1103
+ activeLevelId: e,
1104
+ color: s
1105
+ }) {
1106
+ const a = ot(() => t.points.filter((m) => e == null || m.levelId === e).map((m) => new rt.Vector3(m.x, m.y, 2)), [t, e]), d = ot(
1107
+ () => a.length >= 2 ? new rt.CatmullRomCurve3(a) : null,
1108
+ [a]
1109
+ );
1110
+ return d ? /* @__PURE__ */ ct("mesh", { children: [
1111
+ /* @__PURE__ */ T("tubeGeometry", { args: [d, Math.max(a.length * 4, 8), 1.5, 8, !1] }),
1112
+ /* @__PURE__ */ T("meshBasicMaterial", { color: s })
1113
+ ] }) : null;
1114
+ }
1115
+ const hr = Nn;
1116
+ class kt extends bn {
362
1117
  /**
363
1118
  * Constructs a new SVG loader.
364
1119
  *
365
1120
  * @param {LoadingManager} [manager] - The loading manager.
366
1121
  */
367
- constructor(i) {
368
- super(i), this.defaultDPI = 90, this.defaultUnit = "px";
1122
+ constructor(e) {
1123
+ super(e), this.defaultDPI = 90, this.defaultUnit = "px";
369
1124
  }
370
1125
  /**
371
1126
  * Starts loading from the given URL and passes the loaded SVG asset
@@ -376,15 +1131,15 @@ class Me extends bt {
376
1131
  * @param {onProgressCallback} onProgress - Executed while the loading is in progress.
377
1132
  * @param {onErrorCallback} onError - Executed when errors occur.
378
1133
  */
379
- load(i, M, I, N) {
380
- const h = this, B = new xt(h.manager);
381
- B.setPath(h.path), B.setRequestHeader(h.requestHeader), B.setWithCredentials(h.withCredentials), B.load(i, function(W) {
1134
+ load(e, s, a, d) {
1135
+ const m = this, b = new Cn(m.manager);
1136
+ b.setPath(m.path), b.setRequestHeader(m.requestHeader), b.setWithCredentials(m.withCredentials), b.load(e, function(Q) {
382
1137
  try {
383
- M(h.parse(W));
384
- } catch (p) {
385
- N ? N(p) : console.error(p), h.manager.itemError(i);
1138
+ s(m.parse(Q));
1139
+ } catch (x) {
1140
+ d ? d(x) : console.error(x), m.manager.itemError(e);
386
1141
  }
387
- }, I, N);
1142
+ }, a, d);
388
1143
  }
389
1144
  /**
390
1145
  * Parses the given SVG data and returns the resulting data.
@@ -393,377 +1148,377 @@ class Me extends bt {
393
1148
  * @return {{paths:Array<ShapePath>,xml:string}} An object holding an array of shape paths and the
394
1149
  * SVG XML document.
395
1150
  */
396
- parse(i) {
397
- const M = this;
398
- function I(r, o) {
399
- if (r.nodeType !== 1) return;
400
- const t = v(r);
401
- let e = !1, c = null;
402
- switch (r.nodeName) {
1151
+ parse(e) {
1152
+ const s = this;
1153
+ function a(h, i) {
1154
+ if (h.nodeType !== 1) return;
1155
+ const r = p(h);
1156
+ let n = !1, C = null;
1157
+ switch (h.nodeName) {
403
1158
  case "svg":
404
- o = P(r, o);
1159
+ i = B(h, i);
405
1160
  break;
406
1161
  case "style":
407
- h(r);
1162
+ m(h);
408
1163
  break;
409
1164
  case "g":
410
- o = P(r, o);
1165
+ i = B(h, i);
411
1166
  break;
412
1167
  case "path":
413
- o = P(r, o), r.hasAttribute("d") && (c = N(r));
1168
+ i = B(h, i), h.hasAttribute("d") && (C = d(h));
414
1169
  break;
415
1170
  case "rect":
416
- o = P(r, o), c = p(r);
1171
+ i = B(h, i), C = x(h);
417
1172
  break;
418
1173
  case "polygon":
419
- o = P(r, o), c = k(r);
1174
+ i = B(h, i), C = z(h);
420
1175
  break;
421
1176
  case "polyline":
422
- o = P(r, o), c = z(r);
1177
+ i = B(h, i), C = G(h);
423
1178
  break;
424
1179
  case "circle":
425
- o = P(r, o), c = O(r);
1180
+ i = B(h, i), C = k(h);
426
1181
  break;
427
1182
  case "ellipse":
428
- o = P(r, o), c = C(r);
1183
+ i = B(h, i), C = Z(h);
429
1184
  break;
430
1185
  case "line":
431
- o = P(r, o), c = V(r);
1186
+ i = B(h, i), C = V(h);
432
1187
  break;
433
1188
  case "defs":
434
- e = !0;
1189
+ n = !0;
435
1190
  break;
436
1191
  case "use":
437
- o = P(r, o);
438
- const S = (r.getAttributeNS("http://www.w3.org/1999/xlink", "href") || "").substring(1), L = r.viewportElement.getElementById(S);
439
- L ? I(L, o) : console.warn("SVGLoader: 'use node' references non-existent node id: " + S);
1192
+ i = B(h, i);
1193
+ const P = (h.getAttributeNS("http://www.w3.org/1999/xlink", "href") || "").substring(1), X = h.viewportElement.getElementById(P);
1194
+ X ? a(X, i) : console.warn("SVGLoader: 'use node' references non-existent node id: " + P);
440
1195
  break;
441
1196
  }
442
- c && (o.fill !== void 0 && o.fill !== "none" && c.color.setStyle(o.fill, Rt), d(c, ie), G.push(c), c.userData = { node: r, style: o });
443
- const b = r.childNodes;
444
- for (let a = 0; a < b.length; a++) {
445
- const S = b[a];
446
- e && S.nodeName !== "style" && S.nodeName !== "defs" || I(S, o);
1197
+ C && (i.fill !== void 0 && i.fill !== "none" && C.color.setStyle(i.fill, hr), u(C, et), F.push(C), C.userData = { node: h, style: i });
1198
+ const R = h.childNodes;
1199
+ for (let g = 0; g < R.length; g++) {
1200
+ const P = R[g];
1201
+ n && P.nodeName !== "style" && P.nodeName !== "defs" || a(P, i);
447
1202
  }
448
- t && (Z.pop(), Z.length > 0 ? ie.copy(Z[Z.length - 1]) : ie.identity());
1203
+ r && (E.pop(), E.length > 0 ? et.copy(E[E.length - 1]) : et.identity());
449
1204
  }
450
- function N(r) {
451
- const o = new ye(), t = new Q(), e = new Q(), c = new Q();
452
- let b = !0, a = !1;
453
- const S = r.getAttribute("d");
454
- if (S === "" || S === "none") return null;
455
- const L = S.match(/[a-df-z][^a-df-z]*/ig);
456
- for (let D = 0, f = L.length; D < f; D++) {
457
- const A = L[D], F = A.charAt(0), j = A.slice(1).trim();
458
- b === !0 && (a = !0, b = !1);
459
- let s;
460
- switch (F) {
1205
+ function d(h) {
1206
+ const i = new xt(), r = new it(), n = new it(), C = new it();
1207
+ let R = !0, g = !1;
1208
+ const P = h.getAttribute("d");
1209
+ if (P === "" || P === "none") return null;
1210
+ const X = P.match(/[a-df-z][^a-df-z]*/ig);
1211
+ for (let A = 0, y = X.length; A < y; A++) {
1212
+ const v = X[A], S = v.charAt(0), W = v.slice(1).trim();
1213
+ R === !0 && (g = !0, R = !1);
1214
+ let f;
1215
+ switch (S) {
461
1216
  case "M":
462
- s = u(j);
463
- for (let n = 0, H = s.length; n < H; n += 2)
464
- t.x = s[n + 0], t.y = s[n + 1], e.x = t.x, e.y = t.y, n === 0 ? o.moveTo(t.x, t.y) : o.lineTo(t.x, t.y), n === 0 && c.copy(t);
1217
+ f = L(W);
1218
+ for (let o = 0, j = f.length; o < j; o += 2)
1219
+ r.x = f[o + 0], r.y = f[o + 1], n.x = r.x, n.y = r.y, o === 0 ? i.moveTo(r.x, r.y) : i.lineTo(r.x, r.y), o === 0 && C.copy(r);
465
1220
  break;
466
1221
  case "H":
467
- s = u(j);
468
- for (let n = 0, H = s.length; n < H; n++)
469
- t.x = s[n], e.x = t.x, e.y = t.y, o.lineTo(t.x, t.y), n === 0 && a === !0 && c.copy(t);
1222
+ f = L(W);
1223
+ for (let o = 0, j = f.length; o < j; o++)
1224
+ r.x = f[o], n.x = r.x, n.y = r.y, i.lineTo(r.x, r.y), o === 0 && g === !0 && C.copy(r);
470
1225
  break;
471
1226
  case "V":
472
- s = u(j);
473
- for (let n = 0, H = s.length; n < H; n++)
474
- t.y = s[n], e.x = t.x, e.y = t.y, o.lineTo(t.x, t.y), n === 0 && a === !0 && c.copy(t);
1227
+ f = L(W);
1228
+ for (let o = 0, j = f.length; o < j; o++)
1229
+ r.y = f[o], n.x = r.x, n.y = r.y, i.lineTo(r.x, r.y), o === 0 && g === !0 && C.copy(r);
475
1230
  break;
476
1231
  case "L":
477
- s = u(j);
478
- for (let n = 0, H = s.length; n < H; n += 2)
479
- t.x = s[n + 0], t.y = s[n + 1], e.x = t.x, e.y = t.y, o.lineTo(t.x, t.y), n === 0 && a === !0 && c.copy(t);
1232
+ f = L(W);
1233
+ for (let o = 0, j = f.length; o < j; o += 2)
1234
+ r.x = f[o + 0], r.y = f[o + 1], n.x = r.x, n.y = r.y, i.lineTo(r.x, r.y), o === 0 && g === !0 && C.copy(r);
480
1235
  break;
481
1236
  case "C":
482
- s = u(j);
483
- for (let n = 0, H = s.length; n < H; n += 6)
484
- o.bezierCurveTo(
485
- s[n + 0],
486
- s[n + 1],
487
- s[n + 2],
488
- s[n + 3],
489
- s[n + 4],
490
- s[n + 5]
491
- ), e.x = s[n + 2], e.y = s[n + 3], t.x = s[n + 4], t.y = s[n + 5], n === 0 && a === !0 && c.copy(t);
1237
+ f = L(W);
1238
+ for (let o = 0, j = f.length; o < j; o += 6)
1239
+ i.bezierCurveTo(
1240
+ f[o + 0],
1241
+ f[o + 1],
1242
+ f[o + 2],
1243
+ f[o + 3],
1244
+ f[o + 4],
1245
+ f[o + 5]
1246
+ ), n.x = f[o + 2], n.y = f[o + 3], r.x = f[o + 4], r.y = f[o + 5], o === 0 && g === !0 && C.copy(r);
492
1247
  break;
493
1248
  case "S":
494
- s = u(j);
495
- for (let n = 0, H = s.length; n < H; n += 4)
496
- o.bezierCurveTo(
497
- g(t.x, e.x),
498
- g(t.y, e.y),
499
- s[n + 0],
500
- s[n + 1],
501
- s[n + 2],
502
- s[n + 3]
503
- ), e.x = s[n + 0], e.y = s[n + 1], t.x = s[n + 2], t.y = s[n + 3], n === 0 && a === !0 && c.copy(t);
1249
+ f = L(W);
1250
+ for (let o = 0, j = f.length; o < j; o += 4)
1251
+ i.bezierCurveTo(
1252
+ w(r.x, n.x),
1253
+ w(r.y, n.y),
1254
+ f[o + 0],
1255
+ f[o + 1],
1256
+ f[o + 2],
1257
+ f[o + 3]
1258
+ ), n.x = f[o + 0], n.y = f[o + 1], r.x = f[o + 2], r.y = f[o + 3], o === 0 && g === !0 && C.copy(r);
504
1259
  break;
505
1260
  case "Q":
506
- s = u(j);
507
- for (let n = 0, H = s.length; n < H; n += 4)
508
- o.quadraticCurveTo(
509
- s[n + 0],
510
- s[n + 1],
511
- s[n + 2],
512
- s[n + 3]
513
- ), e.x = s[n + 0], e.y = s[n + 1], t.x = s[n + 2], t.y = s[n + 3], n === 0 && a === !0 && c.copy(t);
1261
+ f = L(W);
1262
+ for (let o = 0, j = f.length; o < j; o += 4)
1263
+ i.quadraticCurveTo(
1264
+ f[o + 0],
1265
+ f[o + 1],
1266
+ f[o + 2],
1267
+ f[o + 3]
1268
+ ), n.x = f[o + 0], n.y = f[o + 1], r.x = f[o + 2], r.y = f[o + 3], o === 0 && g === !0 && C.copy(r);
514
1269
  break;
515
1270
  case "T":
516
- s = u(j);
517
- for (let n = 0, H = s.length; n < H; n += 2) {
518
- const $ = g(t.x, e.x), ce = g(t.y, e.y);
519
- o.quadraticCurveTo(
520
- $,
521
- ce,
522
- s[n + 0],
523
- s[n + 1]
524
- ), e.x = $, e.y = ce, t.x = s[n + 0], t.y = s[n + 1], n === 0 && a === !0 && c.copy(t);
1271
+ f = L(W);
1272
+ for (let o = 0, j = f.length; o < j; o += 2) {
1273
+ const nt = w(r.x, n.x), pt = w(r.y, n.y);
1274
+ i.quadraticCurveTo(
1275
+ nt,
1276
+ pt,
1277
+ f[o + 0],
1278
+ f[o + 1]
1279
+ ), n.x = nt, n.y = pt, r.x = f[o + 0], r.y = f[o + 1], o === 0 && g === !0 && C.copy(r);
525
1280
  }
526
1281
  break;
527
1282
  case "A":
528
- s = u(j, [3, 4], 7);
529
- for (let n = 0, H = s.length; n < H; n += 7) {
530
- if (s[n + 5] == t.x && s[n + 6] == t.y) continue;
531
- const $ = t.clone();
532
- t.x = s[n + 5], t.y = s[n + 6], e.x = t.x, e.y = t.y, B(
533
- o,
534
- s[n],
535
- s[n + 1],
536
- s[n + 2],
537
- s[n + 3],
538
- s[n + 4],
539
- $,
540
- t
541
- ), n === 0 && a === !0 && c.copy(t);
1283
+ f = L(W, [3, 4], 7);
1284
+ for (let o = 0, j = f.length; o < j; o += 7) {
1285
+ if (f[o + 5] == r.x && f[o + 6] == r.y) continue;
1286
+ const nt = r.clone();
1287
+ r.x = f[o + 5], r.y = f[o + 6], n.x = r.x, n.y = r.y, b(
1288
+ i,
1289
+ f[o],
1290
+ f[o + 1],
1291
+ f[o + 2],
1292
+ f[o + 3],
1293
+ f[o + 4],
1294
+ nt,
1295
+ r
1296
+ ), o === 0 && g === !0 && C.copy(r);
542
1297
  }
543
1298
  break;
544
1299
  case "m":
545
- s = u(j);
546
- for (let n = 0, H = s.length; n < H; n += 2)
547
- t.x += s[n + 0], t.y += s[n + 1], e.x = t.x, e.y = t.y, n === 0 ? o.moveTo(t.x, t.y) : o.lineTo(t.x, t.y), n === 0 && c.copy(t);
1300
+ f = L(W);
1301
+ for (let o = 0, j = f.length; o < j; o += 2)
1302
+ r.x += f[o + 0], r.y += f[o + 1], n.x = r.x, n.y = r.y, o === 0 ? i.moveTo(r.x, r.y) : i.lineTo(r.x, r.y), o === 0 && C.copy(r);
548
1303
  break;
549
1304
  case "h":
550
- s = u(j);
551
- for (let n = 0, H = s.length; n < H; n++)
552
- t.x += s[n], e.x = t.x, e.y = t.y, o.lineTo(t.x, t.y), n === 0 && a === !0 && c.copy(t);
1305
+ f = L(W);
1306
+ for (let o = 0, j = f.length; o < j; o++)
1307
+ r.x += f[o], n.x = r.x, n.y = r.y, i.lineTo(r.x, r.y), o === 0 && g === !0 && C.copy(r);
553
1308
  break;
554
1309
  case "v":
555
- s = u(j);
556
- for (let n = 0, H = s.length; n < H; n++)
557
- t.y += s[n], e.x = t.x, e.y = t.y, o.lineTo(t.x, t.y), n === 0 && a === !0 && c.copy(t);
1310
+ f = L(W);
1311
+ for (let o = 0, j = f.length; o < j; o++)
1312
+ r.y += f[o], n.x = r.x, n.y = r.y, i.lineTo(r.x, r.y), o === 0 && g === !0 && C.copy(r);
558
1313
  break;
559
1314
  case "l":
560
- s = u(j);
561
- for (let n = 0, H = s.length; n < H; n += 2)
562
- t.x += s[n + 0], t.y += s[n + 1], e.x = t.x, e.y = t.y, o.lineTo(t.x, t.y), n === 0 && a === !0 && c.copy(t);
1315
+ f = L(W);
1316
+ for (let o = 0, j = f.length; o < j; o += 2)
1317
+ r.x += f[o + 0], r.y += f[o + 1], n.x = r.x, n.y = r.y, i.lineTo(r.x, r.y), o === 0 && g === !0 && C.copy(r);
563
1318
  break;
564
1319
  case "c":
565
- s = u(j);
566
- for (let n = 0, H = s.length; n < H; n += 6)
567
- o.bezierCurveTo(
568
- t.x + s[n + 0],
569
- t.y + s[n + 1],
570
- t.x + s[n + 2],
571
- t.y + s[n + 3],
572
- t.x + s[n + 4],
573
- t.y + s[n + 5]
574
- ), e.x = t.x + s[n + 2], e.y = t.y + s[n + 3], t.x += s[n + 4], t.y += s[n + 5], n === 0 && a === !0 && c.copy(t);
1320
+ f = L(W);
1321
+ for (let o = 0, j = f.length; o < j; o += 6)
1322
+ i.bezierCurveTo(
1323
+ r.x + f[o + 0],
1324
+ r.y + f[o + 1],
1325
+ r.x + f[o + 2],
1326
+ r.y + f[o + 3],
1327
+ r.x + f[o + 4],
1328
+ r.y + f[o + 5]
1329
+ ), n.x = r.x + f[o + 2], n.y = r.y + f[o + 3], r.x += f[o + 4], r.y += f[o + 5], o === 0 && g === !0 && C.copy(r);
575
1330
  break;
576
1331
  case "s":
577
- s = u(j);
578
- for (let n = 0, H = s.length; n < H; n += 4)
579
- o.bezierCurveTo(
580
- g(t.x, e.x),
581
- g(t.y, e.y),
582
- t.x + s[n + 0],
583
- t.y + s[n + 1],
584
- t.x + s[n + 2],
585
- t.y + s[n + 3]
586
- ), e.x = t.x + s[n + 0], e.y = t.y + s[n + 1], t.x += s[n + 2], t.y += s[n + 3], n === 0 && a === !0 && c.copy(t);
1332
+ f = L(W);
1333
+ for (let o = 0, j = f.length; o < j; o += 4)
1334
+ i.bezierCurveTo(
1335
+ w(r.x, n.x),
1336
+ w(r.y, n.y),
1337
+ r.x + f[o + 0],
1338
+ r.y + f[o + 1],
1339
+ r.x + f[o + 2],
1340
+ r.y + f[o + 3]
1341
+ ), n.x = r.x + f[o + 0], n.y = r.y + f[o + 1], r.x += f[o + 2], r.y += f[o + 3], o === 0 && g === !0 && C.copy(r);
587
1342
  break;
588
1343
  case "q":
589
- s = u(j);
590
- for (let n = 0, H = s.length; n < H; n += 4)
591
- o.quadraticCurveTo(
592
- t.x + s[n + 0],
593
- t.y + s[n + 1],
594
- t.x + s[n + 2],
595
- t.y + s[n + 3]
596
- ), e.x = t.x + s[n + 0], e.y = t.y + s[n + 1], t.x += s[n + 2], t.y += s[n + 3], n === 0 && a === !0 && c.copy(t);
1344
+ f = L(W);
1345
+ for (let o = 0, j = f.length; o < j; o += 4)
1346
+ i.quadraticCurveTo(
1347
+ r.x + f[o + 0],
1348
+ r.y + f[o + 1],
1349
+ r.x + f[o + 2],
1350
+ r.y + f[o + 3]
1351
+ ), n.x = r.x + f[o + 0], n.y = r.y + f[o + 1], r.x += f[o + 2], r.y += f[o + 3], o === 0 && g === !0 && C.copy(r);
597
1352
  break;
598
1353
  case "t":
599
- s = u(j);
600
- for (let n = 0, H = s.length; n < H; n += 2) {
601
- const $ = g(t.x, e.x), ce = g(t.y, e.y);
602
- o.quadraticCurveTo(
603
- $,
604
- ce,
605
- t.x + s[n + 0],
606
- t.y + s[n + 1]
607
- ), e.x = $, e.y = ce, t.x = t.x + s[n + 0], t.y = t.y + s[n + 1], n === 0 && a === !0 && c.copy(t);
1354
+ f = L(W);
1355
+ for (let o = 0, j = f.length; o < j; o += 2) {
1356
+ const nt = w(r.x, n.x), pt = w(r.y, n.y);
1357
+ i.quadraticCurveTo(
1358
+ nt,
1359
+ pt,
1360
+ r.x + f[o + 0],
1361
+ r.y + f[o + 1]
1362
+ ), n.x = nt, n.y = pt, r.x = r.x + f[o + 0], r.y = r.y + f[o + 1], o === 0 && g === !0 && C.copy(r);
608
1363
  }
609
1364
  break;
610
1365
  case "a":
611
- s = u(j, [3, 4], 7);
612
- for (let n = 0, H = s.length; n < H; n += 7) {
613
- if (s[n + 5] == 0 && s[n + 6] == 0) continue;
614
- const $ = t.clone();
615
- t.x += s[n + 5], t.y += s[n + 6], e.x = t.x, e.y = t.y, B(
616
- o,
617
- s[n],
618
- s[n + 1],
619
- s[n + 2],
620
- s[n + 3],
621
- s[n + 4],
622
- $,
623
- t
624
- ), n === 0 && a === !0 && c.copy(t);
1366
+ f = L(W, [3, 4], 7);
1367
+ for (let o = 0, j = f.length; o < j; o += 7) {
1368
+ if (f[o + 5] == 0 && f[o + 6] == 0) continue;
1369
+ const nt = r.clone();
1370
+ r.x += f[o + 5], r.y += f[o + 6], n.x = r.x, n.y = r.y, b(
1371
+ i,
1372
+ f[o],
1373
+ f[o + 1],
1374
+ f[o + 2],
1375
+ f[o + 3],
1376
+ f[o + 4],
1377
+ nt,
1378
+ r
1379
+ ), o === 0 && g === !0 && C.copy(r);
625
1380
  }
626
1381
  break;
627
1382
  case "Z":
628
1383
  case "z":
629
- o.currentPath.autoClose = !0, o.currentPath.curves.length > 0 && (t.copy(c), o.currentPath.currentPoint.copy(t), b = !0);
1384
+ i.currentPath.autoClose = !0, i.currentPath.curves.length > 0 && (r.copy(C), i.currentPath.currentPoint.copy(r), R = !0);
630
1385
  break;
631
1386
  default:
632
- console.warn(A);
1387
+ console.warn(v);
633
1388
  }
634
- a = !1;
1389
+ g = !1;
635
1390
  }
636
- return o;
1391
+ return i;
637
1392
  }
638
- function h(r) {
639
- if (!(!r.sheet || !r.sheet.cssRules || !r.sheet.cssRules.length))
640
- for (let o = 0; o < r.sheet.cssRules.length; o++) {
641
- const t = r.sheet.cssRules[o];
642
- if (t.type !== 1) continue;
643
- const e = t.selectorText.split(/,/gm).filter(Boolean).map((c) => c.trim());
644
- for (let c = 0; c < e.length; c++) {
645
- const b = Object.fromEntries(
646
- Object.entries(t.style).filter(([, a]) => a !== "")
1393
+ function m(h) {
1394
+ if (!(!h.sheet || !h.sheet.cssRules || !h.sheet.cssRules.length))
1395
+ for (let i = 0; i < h.sheet.cssRules.length; i++) {
1396
+ const r = h.sheet.cssRules[i];
1397
+ if (r.type !== 1) continue;
1398
+ const n = r.selectorText.split(/,/gm).filter(Boolean).map((C) => C.trim());
1399
+ for (let C = 0; C < n.length; C++) {
1400
+ const R = Object.fromEntries(
1401
+ Object.entries(r.style).filter(([, g]) => g !== "")
647
1402
  );
648
- K[e[c]] = Object.assign(
649
- K[e[c]] || {},
650
- b
1403
+ J[n[C]] = Object.assign(
1404
+ J[n[C]] || {},
1405
+ R
651
1406
  );
652
1407
  }
653
1408
  }
654
1409
  }
655
- function B(r, o, t, e, c, b, a, S) {
656
- if (o == 0 || t == 0) {
657
- r.lineTo(S.x, S.y);
1410
+ function b(h, i, r, n, C, R, g, P) {
1411
+ if (i == 0 || r == 0) {
1412
+ h.lineTo(P.x, P.y);
658
1413
  return;
659
1414
  }
660
- e = e * Math.PI / 180, o = Math.abs(o), t = Math.abs(t);
661
- const L = (a.x - S.x) / 2, D = (a.y - S.y) / 2, f = Math.cos(e) * L + Math.sin(e) * D, A = -Math.sin(e) * L + Math.cos(e) * D;
662
- let F = o * o, j = t * t;
663
- const s = f * f, n = A * A, H = s / F + n / j;
664
- if (H > 1) {
665
- const ke = Math.sqrt(H);
666
- o = ke * o, t = ke * t, F = o * o, j = t * t;
1415
+ n = n * Math.PI / 180, i = Math.abs(i), r = Math.abs(r);
1416
+ const X = (g.x - P.x) / 2, A = (g.y - P.y) / 2, y = Math.cos(n) * X + Math.sin(n) * A, v = -Math.sin(n) * X + Math.cos(n) * A;
1417
+ let S = i * i, W = r * r;
1418
+ const f = y * y, o = v * v, j = f / S + o / W;
1419
+ if (j > 1) {
1420
+ const wt = Math.sqrt(j);
1421
+ i = wt * i, r = wt * r, S = i * i, W = r * r;
667
1422
  }
668
- const $ = F * n + j * s, ce = (F * j - $) / $;
669
- let me = Math.sqrt(Math.max(0, ce));
670
- c === b && (me = -me);
671
- const se = me * o * A / t, pe = -me * t * f / o, xe = Math.cos(e) * se - Math.sin(e) * pe + (a.x + S.x) / 2, Pe = Math.sin(e) * se + Math.cos(e) * pe + (a.y + S.y) / 2, we = W(1, 0, (f - se) / o, (A - pe) / t), Ie = W((f - se) / o, (A - pe) / t, (-f - se) / o, (-A - pe) / t) % (Math.PI * 2);
672
- r.currentPath.absellipse(xe, Pe, o, t, we, we + Ie, b === 0, e);
1423
+ const nt = S * o + W * f, pt = (S * W - nt) / nt;
1424
+ let yt = Math.sqrt(Math.max(0, pt));
1425
+ C === R && (yt = -yt);
1426
+ const ft = yt * i * v / r, gt = -yt * r * y / i, bt = Math.cos(n) * ft - Math.sin(n) * gt + (g.x + P.x) / 2, _t = Math.sin(n) * ft + Math.cos(n) * gt + (g.y + P.y) / 2, Ct = Q(1, 0, (y - ft) / i, (v - gt) / r), St = Q((y - ft) / i, (v - gt) / r, (-y - ft) / i, (-v - gt) / r) % (Math.PI * 2);
1427
+ h.currentPath.absellipse(bt, _t, i, r, Ct, Ct + St, R === 0, n);
673
1428
  }
674
- function W(r, o, t, e) {
675
- const c = r * t + o * e, b = Math.sqrt(r * r + o * o) * Math.sqrt(t * t + e * e);
676
- let a = Math.acos(Math.max(-1, Math.min(1, c / b)));
677
- return r * e - o * t < 0 && (a = -a), a;
1429
+ function Q(h, i, r, n) {
1430
+ const C = h * r + i * n, R = Math.sqrt(h * h + i * i) * Math.sqrt(r * r + n * n);
1431
+ let g = Math.acos(Math.max(-1, Math.min(1, C / R)));
1432
+ return h * n - i * r < 0 && (g = -g), g;
678
1433
  }
679
- function p(r) {
680
- const o = m(r.getAttribute("x") || 0), t = m(r.getAttribute("y") || 0), e = m(r.getAttribute("rx") || r.getAttribute("ry") || 0), c = m(r.getAttribute("ry") || r.getAttribute("rx") || 0), b = m(r.getAttribute("width")), a = m(r.getAttribute("height")), S = 1 - 0.551915024494, L = new ye();
681
- return L.moveTo(o + e, t), L.lineTo(o + b - e, t), (e !== 0 || c !== 0) && L.bezierCurveTo(
682
- o + b - e * S,
683
- t,
684
- o + b,
685
- t + c * S,
686
- o + b,
687
- t + c
688
- ), L.lineTo(o + b, t + a - c), (e !== 0 || c !== 0) && L.bezierCurveTo(
689
- o + b,
690
- t + a - c * S,
691
- o + b - e * S,
692
- t + a,
693
- o + b - e,
694
- t + a
695
- ), L.lineTo(o + e, t + a), (e !== 0 || c !== 0) && L.bezierCurveTo(
696
- o + e * S,
697
- t + a,
698
- o,
699
- t + a - c * S,
700
- o,
701
- t + a - c
702
- ), L.lineTo(o, t + c), (e !== 0 || c !== 0) && L.bezierCurveTo(o, t + c * S, o + e * S, t, o + e, t), L;
1434
+ function x(h) {
1435
+ const i = c(h.getAttribute("x") || 0), r = c(h.getAttribute("y") || 0), n = c(h.getAttribute("rx") || h.getAttribute("ry") || 0), C = c(h.getAttribute("ry") || h.getAttribute("rx") || 0), R = c(h.getAttribute("width")), g = c(h.getAttribute("height")), P = 1 - 0.551915024494, X = new xt();
1436
+ return X.moveTo(i + n, r), X.lineTo(i + R - n, r), (n !== 0 || C !== 0) && X.bezierCurveTo(
1437
+ i + R - n * P,
1438
+ r,
1439
+ i + R,
1440
+ r + C * P,
1441
+ i + R,
1442
+ r + C
1443
+ ), X.lineTo(i + R, r + g - C), (n !== 0 || C !== 0) && X.bezierCurveTo(
1444
+ i + R,
1445
+ r + g - C * P,
1446
+ i + R - n * P,
1447
+ r + g,
1448
+ i + R - n,
1449
+ r + g
1450
+ ), X.lineTo(i + n, r + g), (n !== 0 || C !== 0) && X.bezierCurveTo(
1451
+ i + n * P,
1452
+ r + g,
1453
+ i,
1454
+ r + g - C * P,
1455
+ i,
1456
+ r + g - C
1457
+ ), X.lineTo(i, r + C), (n !== 0 || C !== 0) && X.bezierCurveTo(i, r + C * P, i + n * P, r, i + n, r), X;
703
1458
  }
704
- function k(r) {
705
- function o(b, a, S) {
706
- const L = m(a), D = m(S);
707
- c === 0 ? e.moveTo(L, D) : e.lineTo(L, D), c++;
1459
+ function z(h) {
1460
+ function i(R, g, P) {
1461
+ const X = c(g), A = c(P);
1462
+ C === 0 ? n.moveTo(X, A) : n.lineTo(X, A), C++;
708
1463
  }
709
- const t = /([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g, e = new ye();
710
- let c = 0;
711
- return r.getAttribute("points").replace(t, o), e.currentPath.autoClose = !0, e;
1464
+ const r = /([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g, n = new xt();
1465
+ let C = 0;
1466
+ return h.getAttribute("points").replace(r, i), n.currentPath.autoClose = !0, n;
712
1467
  }
713
- function z(r) {
714
- function o(b, a, S) {
715
- const L = m(a), D = m(S);
716
- c === 0 ? e.moveTo(L, D) : e.lineTo(L, D), c++;
1468
+ function G(h) {
1469
+ function i(R, g, P) {
1470
+ const X = c(g), A = c(P);
1471
+ C === 0 ? n.moveTo(X, A) : n.lineTo(X, A), C++;
717
1472
  }
718
- const t = /([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g, e = new ye();
719
- let c = 0;
720
- return r.getAttribute("points").replace(t, o), e.currentPath.autoClose = !1, e;
1473
+ const r = /([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g, n = new xt();
1474
+ let C = 0;
1475
+ return h.getAttribute("points").replace(r, i), n.currentPath.autoClose = !1, n;
721
1476
  }
722
- function O(r) {
723
- const o = m(r.getAttribute("cx") || 0), t = m(r.getAttribute("cy") || 0), e = m(r.getAttribute("r") || 0), c = new Ee();
724
- c.absarc(o, t, e, 0, Math.PI * 2);
725
- const b = new ye();
726
- return b.subPaths.push(c), b;
1477
+ function k(h) {
1478
+ const i = c(h.getAttribute("cx") || 0), r = c(h.getAttribute("cy") || 0), n = c(h.getAttribute("r") || 0), C = new Gt();
1479
+ C.absarc(i, r, n, 0, Math.PI * 2);
1480
+ const R = new xt();
1481
+ return R.subPaths.push(C), R;
727
1482
  }
728
- function C(r) {
729
- const o = m(r.getAttribute("cx") || 0), t = m(r.getAttribute("cy") || 0), e = m(r.getAttribute("rx") || 0), c = m(r.getAttribute("ry") || 0), b = new Ee();
730
- b.absellipse(o, t, e, c, 0, Math.PI * 2);
731
- const a = new ye();
732
- return a.subPaths.push(b), a;
1483
+ function Z(h) {
1484
+ const i = c(h.getAttribute("cx") || 0), r = c(h.getAttribute("cy") || 0), n = c(h.getAttribute("rx") || 0), C = c(h.getAttribute("ry") || 0), R = new Gt();
1485
+ R.absellipse(i, r, n, C, 0, Math.PI * 2);
1486
+ const g = new xt();
1487
+ return g.subPaths.push(R), g;
733
1488
  }
734
- function V(r) {
735
- const o = m(r.getAttribute("x1") || 0), t = m(r.getAttribute("y1") || 0), e = m(r.getAttribute("x2") || 0), c = m(r.getAttribute("y2") || 0), b = new ye();
736
- return b.moveTo(o, t), b.lineTo(e, c), b.currentPath.autoClose = !1, b;
1489
+ function V(h) {
1490
+ const i = c(h.getAttribute("x1") || 0), r = c(h.getAttribute("y1") || 0), n = c(h.getAttribute("x2") || 0), C = c(h.getAttribute("y2") || 0), R = new xt();
1491
+ return R.moveTo(i, r), R.lineTo(n, C), R.currentPath.autoClose = !1, R;
737
1492
  }
738
- function P(r, o) {
739
- o = Object.assign({}, o);
740
- let t = {};
741
- if (r.hasAttribute("class")) {
742
- const a = r.getAttribute("class").split(/\s/).filter(Boolean).map((S) => S.trim());
743
- for (let S = 0; S < a.length; S++)
744
- t = Object.assign(t, K["." + a[S]]);
1493
+ function B(h, i) {
1494
+ i = Object.assign({}, i);
1495
+ let r = {};
1496
+ if (h.hasAttribute("class")) {
1497
+ const g = h.getAttribute("class").split(/\s/).filter(Boolean).map((P) => P.trim());
1498
+ for (let P = 0; P < g.length; P++)
1499
+ r = Object.assign(r, J["." + g[P]]);
745
1500
  }
746
- r.hasAttribute("id") && (t = Object.assign(t, K["#" + r.getAttribute("id")]));
747
- function e(a, S, L) {
748
- L === void 0 && (L = function(f) {
749
- return f.startsWith("url") && console.warn("SVGLoader: url access in attributes is not implemented."), f;
750
- }), r.hasAttribute(a) && (o[S] = L(r.getAttribute(a))), t[a] && (o[S] = L(t[a])), r.style && r.style[a] !== "" && (o[S] = L(r.style[a]));
1501
+ h.hasAttribute("id") && (r = Object.assign(r, J["#" + h.getAttribute("id")]));
1502
+ function n(g, P, X) {
1503
+ X === void 0 && (X = function(y) {
1504
+ return y.startsWith("url") && console.warn("SVGLoader: url access in attributes is not implemented."), y;
1505
+ }), h.hasAttribute(g) && (i[P] = X(h.getAttribute(g))), r[g] && (i[P] = X(r[g])), h.style && h.style[g] !== "" && (i[P] = X(h.style[g]));
751
1506
  }
752
- function c(a) {
753
- return Math.max(0, Math.min(1, m(a)));
1507
+ function C(g) {
1508
+ return Math.max(0, Math.min(1, c(g)));
754
1509
  }
755
- function b(a) {
756
- return Math.max(0, m(a));
1510
+ function R(g) {
1511
+ return Math.max(0, c(g));
757
1512
  }
758
- return e("fill", "fill"), e("fill-opacity", "fillOpacity", c), e("fill-rule", "fillRule"), e("opacity", "opacity", c), e("stroke", "stroke"), e("stroke-opacity", "strokeOpacity", c), e("stroke-width", "strokeWidth", b), e("stroke-linejoin", "strokeLineJoin"), e("stroke-linecap", "strokeLineCap"), e("stroke-miterlimit", "strokeMiterLimit", b), e("visibility", "visibility"), o;
1513
+ return n("fill", "fill"), n("fill-opacity", "fillOpacity", C), n("fill-rule", "fillRule"), n("opacity", "opacity", C), n("stroke", "stroke"), n("stroke-opacity", "strokeOpacity", C), n("stroke-width", "strokeWidth", R), n("stroke-linejoin", "strokeLineJoin"), n("stroke-linecap", "strokeLineCap"), n("stroke-miterlimit", "strokeMiterLimit", R), n("visibility", "visibility"), i;
759
1514
  }
760
- function g(r, o) {
761
- return r - (o - r);
1515
+ function w(h, i) {
1516
+ return h - (i - h);
762
1517
  }
763
- function u(r, o, t) {
764
- if (typeof r != "string")
765
- throw new TypeError("Invalid input: " + typeof r);
766
- const e = {
1518
+ function L(h, i, r) {
1519
+ if (typeof h != "string")
1520
+ throw new TypeError("Invalid input: " + typeof h);
1521
+ const n = {
767
1522
  WHITESPACE: /[ \t\r\n]/,
768
1523
  DIGIT: /[\d]/,
769
1524
  SIGN: /[-+]/,
@@ -771,80 +1526,80 @@ class Me extends bt {
771
1526
  COMMA: /,/,
772
1527
  EXP: /e/i,
773
1528
  FLAGS: /[01]/
774
- }, c = 0, b = 1, a = 2, S = 3;
775
- let L = c, D = !0, f = "", A = "";
776
- const F = [];
777
- function j($, ce, me) {
778
- const se = new SyntaxError('Unexpected character "' + $ + '" at index ' + ce + ".");
779
- throw se.partial = me, se;
1529
+ }, C = 0, R = 1, g = 2, P = 3;
1530
+ let X = C, A = !0, y = "", v = "";
1531
+ const S = [];
1532
+ function W(nt, pt, yt) {
1533
+ const ft = new SyntaxError('Unexpected character "' + nt + '" at index ' + pt + ".");
1534
+ throw ft.partial = yt, ft;
780
1535
  }
781
- function s() {
782
- f !== "" && (A === "" ? F.push(Number(f)) : F.push(Number(f) * Math.pow(10, Number(A)))), f = "", A = "";
1536
+ function f() {
1537
+ y !== "" && (v === "" ? S.push(Number(y)) : S.push(Number(y) * Math.pow(10, Number(v)))), y = "", v = "";
783
1538
  }
784
- let n;
785
- const H = r.length;
786
- for (let $ = 0; $ < H; $++) {
787
- if (n = r[$], Array.isArray(o) && o.includes(F.length % t) && e.FLAGS.test(n)) {
788
- L = b, f = n, s();
1539
+ let o;
1540
+ const j = h.length;
1541
+ for (let nt = 0; nt < j; nt++) {
1542
+ if (o = h[nt], Array.isArray(i) && i.includes(S.length % r) && n.FLAGS.test(o)) {
1543
+ X = R, y = o, f();
789
1544
  continue;
790
1545
  }
791
- if (L === c) {
792
- if (e.WHITESPACE.test(n))
1546
+ if (X === C) {
1547
+ if (n.WHITESPACE.test(o))
793
1548
  continue;
794
- if (e.DIGIT.test(n) || e.SIGN.test(n)) {
795
- L = b, f = n;
1549
+ if (n.DIGIT.test(o) || n.SIGN.test(o)) {
1550
+ X = R, y = o;
796
1551
  continue;
797
1552
  }
798
- if (e.POINT.test(n)) {
799
- L = a, f = n;
1553
+ if (n.POINT.test(o)) {
1554
+ X = g, y = o;
800
1555
  continue;
801
1556
  }
802
- e.COMMA.test(n) && (D && j(n, $, F), D = !0);
1557
+ n.COMMA.test(o) && (A && W(o, nt, S), A = !0);
803
1558
  }
804
- if (L === b) {
805
- if (e.DIGIT.test(n)) {
806
- f += n;
1559
+ if (X === R) {
1560
+ if (n.DIGIT.test(o)) {
1561
+ y += o;
807
1562
  continue;
808
1563
  }
809
- if (e.POINT.test(n)) {
810
- f += n, L = a;
1564
+ if (n.POINT.test(o)) {
1565
+ y += o, X = g;
811
1566
  continue;
812
1567
  }
813
- if (e.EXP.test(n)) {
814
- L = S;
1568
+ if (n.EXP.test(o)) {
1569
+ X = P;
815
1570
  continue;
816
1571
  }
817
- e.SIGN.test(n) && f.length === 1 && e.SIGN.test(f[0]) && j(n, $, F);
1572
+ n.SIGN.test(o) && y.length === 1 && n.SIGN.test(y[0]) && W(o, nt, S);
818
1573
  }
819
- if (L === a) {
820
- if (e.DIGIT.test(n)) {
821
- f += n;
1574
+ if (X === g) {
1575
+ if (n.DIGIT.test(o)) {
1576
+ y += o;
822
1577
  continue;
823
1578
  }
824
- if (e.EXP.test(n)) {
825
- L = S;
1579
+ if (n.EXP.test(o)) {
1580
+ X = P;
826
1581
  continue;
827
1582
  }
828
- e.POINT.test(n) && f[f.length - 1] === "." && j(n, $, F);
1583
+ n.POINT.test(o) && y[y.length - 1] === "." && W(o, nt, S);
829
1584
  }
830
- if (L === S) {
831
- if (e.DIGIT.test(n)) {
832
- A += n;
1585
+ if (X === P) {
1586
+ if (n.DIGIT.test(o)) {
1587
+ v += o;
833
1588
  continue;
834
1589
  }
835
- if (e.SIGN.test(n)) {
836
- if (A === "") {
837
- A += n;
1590
+ if (n.SIGN.test(o)) {
1591
+ if (v === "") {
1592
+ v += o;
838
1593
  continue;
839
1594
  }
840
- A.length === 1 && e.SIGN.test(A) && j(n, $, F);
1595
+ v.length === 1 && n.SIGN.test(v) && W(o, nt, S);
841
1596
  }
842
1597
  }
843
- e.WHITESPACE.test(n) ? (s(), L = c, D = !1) : e.COMMA.test(n) ? (s(), L = c, D = !0) : e.SIGN.test(n) ? (s(), L = b, f = n) : e.POINT.test(n) ? (s(), L = a, f = n) : j(n, $, F);
1598
+ n.WHITESPACE.test(o) ? (f(), X = C, A = !1) : n.COMMA.test(o) ? (f(), X = C, A = !0) : n.SIGN.test(o) ? (f(), X = R, y = o) : n.POINT.test(o) ? (f(), X = g, y = o) : W(o, nt, S);
844
1599
  }
845
- return s(), F;
1600
+ return f(), S;
846
1601
  }
847
- const E = ["mm", "cm", "in", "pt", "pc", "px"], y = {
1602
+ const M = ["mm", "cm", "in", "pt", "pc", "px"], U = {
848
1603
  mm: {
849
1604
  mm: 1,
850
1605
  cm: 0.1,
@@ -889,64 +1644,64 @@ class Me extends bt {
889
1644
  px: 1
890
1645
  }
891
1646
  };
892
- function m(r) {
893
- let o = "px";
894
- if (typeof r == "string" || r instanceof String)
895
- for (let e = 0, c = E.length; e < c; e++) {
896
- const b = E[e];
897
- if (r.endsWith(b)) {
898
- o = b, r = r.substring(0, r.length - b.length);
1647
+ function c(h) {
1648
+ let i = "px";
1649
+ if (typeof h == "string" || h instanceof String)
1650
+ for (let n = 0, C = M.length; n < C; n++) {
1651
+ const R = M[n];
1652
+ if (h.endsWith(R)) {
1653
+ i = R, h = h.substring(0, h.length - R.length);
899
1654
  break;
900
1655
  }
901
1656
  }
902
- let t;
903
- return o === "px" && M.defaultUnit !== "px" ? t = y.in[M.defaultUnit] / M.defaultDPI : (t = y[o][M.defaultUnit], t < 0 && (t = y[o].in * M.defaultDPI)), t * parseFloat(r);
1657
+ let r;
1658
+ return i === "px" && s.defaultUnit !== "px" ? r = U.in[s.defaultUnit] / s.defaultDPI : (r = U[i][s.defaultUnit], r < 0 && (r = U[i].in * s.defaultDPI)), r * parseFloat(h);
904
1659
  }
905
- function v(r) {
906
- if (!(r.hasAttribute("transform") || r.nodeName === "use" && (r.hasAttribute("x") || r.hasAttribute("y"))))
1660
+ function p(h) {
1661
+ if (!(h.hasAttribute("transform") || h.nodeName === "use" && (h.hasAttribute("x") || h.hasAttribute("y"))))
907
1662
  return null;
908
- const o = U(r);
909
- return Z.length > 0 && o.premultiply(Z[Z.length - 1]), ie.copy(o), Z.push(o), o;
1663
+ const i = I(h);
1664
+ return E.length > 0 && i.premultiply(E[E.length - 1]), et.copy(i), E.push(i), i;
910
1665
  }
911
- function U(r) {
912
- const o = new ge(), t = oe;
913
- if (r.nodeName === "use" && (r.hasAttribute("x") || r.hasAttribute("y"))) {
914
- const e = m(r.getAttribute("x")), c = m(r.getAttribute("y"));
915
- o.translate(e, c);
1666
+ function I(h) {
1667
+ const i = new vt(), r = q;
1668
+ if (h.nodeName === "use" && (h.hasAttribute("x") || h.hasAttribute("y"))) {
1669
+ const n = c(h.getAttribute("x")), C = c(h.getAttribute("y"));
1670
+ i.translate(n, C);
916
1671
  }
917
- if (r.hasAttribute("transform")) {
918
- const e = r.getAttribute("transform").split(")");
919
- for (let c = e.length - 1; c >= 0; c--) {
920
- const b = e[c].trim();
921
- if (b === "") continue;
922
- const a = b.indexOf("("), S = b.length;
923
- if (a > 0 && a < S) {
924
- const L = b.slice(0, a), D = u(b.slice(a + 1));
925
- switch (t.identity(), L) {
1672
+ if (h.hasAttribute("transform")) {
1673
+ const n = h.getAttribute("transform").split(")");
1674
+ for (let C = n.length - 1; C >= 0; C--) {
1675
+ const R = n[C].trim();
1676
+ if (R === "") continue;
1677
+ const g = R.indexOf("("), P = R.length;
1678
+ if (g > 0 && g < P) {
1679
+ const X = R.slice(0, g), A = L(R.slice(g + 1));
1680
+ switch (r.identity(), X) {
926
1681
  case "translate":
927
- if (D.length >= 1) {
928
- const f = D[0];
929
- let A = 0;
930
- D.length >= 2 && (A = D[1]), t.translate(f, A);
1682
+ if (A.length >= 1) {
1683
+ const y = A[0];
1684
+ let v = 0;
1685
+ A.length >= 2 && (v = A[1]), r.translate(y, v);
931
1686
  }
932
1687
  break;
933
1688
  case "rotate":
934
- if (D.length >= 1) {
935
- let f = 0, A = 0, F = 0;
936
- f = D[0] * Math.PI / 180, D.length >= 3 && (A = D[1], F = D[2]), J.makeTranslation(-A, -F), X.makeRotation(f), x.multiplyMatrices(X, J), J.makeTranslation(A, F), t.multiplyMatrices(J, x);
1689
+ if (A.length >= 1) {
1690
+ let y = 0, v = 0, S = 0;
1691
+ y = A[0] * Math.PI / 180, A.length >= 3 && (v = A[1], S = A[2]), $.makeTranslation(-v, -S), K.makeRotation(y), l.multiplyMatrices(K, $), $.makeTranslation(v, S), r.multiplyMatrices($, l);
937
1692
  }
938
1693
  break;
939
1694
  case "scale":
940
- if (D.length >= 1) {
941
- const f = D[0];
942
- let A = f;
943
- D.length >= 2 && (A = D[1]), t.scale(f, A);
1695
+ if (A.length >= 1) {
1696
+ const y = A[0];
1697
+ let v = y;
1698
+ A.length >= 2 && (v = A[1]), r.scale(y, v);
944
1699
  }
945
1700
  break;
946
1701
  case "skewX":
947
- D.length === 1 && t.set(
1702
+ A.length === 1 && r.set(
948
1703
  1,
949
- Math.tan(D[0] * Math.PI / 180),
1704
+ Math.tan(A[0] * Math.PI / 180),
950
1705
  0,
951
1706
  0,
952
1707
  1,
@@ -957,11 +1712,11 @@ class Me extends bt {
957
1712
  );
958
1713
  break;
959
1714
  case "skewY":
960
- D.length === 1 && t.set(
1715
+ A.length === 1 && r.set(
961
1716
  1,
962
1717
  0,
963
1718
  0,
964
- Math.tan(D[0] * Math.PI / 180),
1719
+ Math.tan(A[0] * Math.PI / 180),
965
1720
  1,
966
1721
  0,
967
1722
  0,
@@ -970,13 +1725,13 @@ class Me extends bt {
970
1725
  );
971
1726
  break;
972
1727
  case "matrix":
973
- D.length === 6 && t.set(
974
- D[0],
975
- D[2],
976
- D[4],
977
- D[1],
978
- D[3],
979
- D[5],
1728
+ A.length === 6 && r.set(
1729
+ A[0],
1730
+ A[2],
1731
+ A[4],
1732
+ A[1],
1733
+ A[3],
1734
+ A[5],
980
1735
  0,
981
1736
  0,
982
1737
  1
@@ -984,95 +1739,95 @@ class Me extends bt {
984
1739
  break;
985
1740
  }
986
1741
  }
987
- o.premultiply(t);
1742
+ i.premultiply(r);
988
1743
  }
989
1744
  }
990
- return o;
1745
+ return i;
991
1746
  }
992
- function d(r, o) {
993
- function t(a) {
994
- ee.set(a.x, a.y, 1).applyMatrix3(o), a.set(ee.x, ee.y);
1747
+ function u(h, i) {
1748
+ function r(g) {
1749
+ _.set(g.x, g.y, 1).applyMatrix3(i), g.set(_.x, _.y);
995
1750
  }
996
- function e(a) {
997
- const S = a.xRadius, L = a.yRadius, D = Math.cos(a.aRotation), f = Math.sin(a.aRotation), A = new Ae(S * D, S * f, 0), F = new Ae(-L * f, L * D, 0), j = A.applyMatrix3(o), s = F.applyMatrix3(o), n = oe.set(
998
- j.x,
999
- s.x,
1751
+ function n(g) {
1752
+ const P = g.xRadius, X = g.yRadius, A = Math.cos(g.aRotation), y = Math.sin(g.aRotation), v = new Lt(P * A, P * y, 0), S = new Lt(-X * y, X * A, 0), W = v.applyMatrix3(i), f = S.applyMatrix3(i), o = q.set(
1753
+ W.x,
1754
+ f.x,
1000
1755
  0,
1001
- j.y,
1002
- s.y,
1756
+ W.y,
1757
+ f.y,
1003
1758
  0,
1004
1759
  0,
1005
1760
  0,
1006
1761
  1
1007
- ), H = J.copy(n).invert(), me = X.copy(H).transpose().multiply(H).elements, se = Y(me[0], me[1], me[4]), pe = Math.sqrt(se.rt1), xe = Math.sqrt(se.rt2);
1008
- if (a.xRadius = 1 / pe, a.yRadius = 1 / xe, a.aRotation = Math.atan2(se.sn, se.cs), !((a.aEndAngle - a.aStartAngle) % (2 * Math.PI) < Number.EPSILON)) {
1009
- const we = J.set(
1010
- pe,
1762
+ ), j = $.copy(o).invert(), yt = K.copy(j).transpose().multiply(j).elements, ft = tt(yt[0], yt[1], yt[4]), gt = Math.sqrt(ft.rt1), bt = Math.sqrt(ft.rt2);
1763
+ if (g.xRadius = 1 / gt, g.yRadius = 1 / bt, g.aRotation = Math.atan2(ft.sn, ft.cs), !((g.aEndAngle - g.aStartAngle) % (2 * Math.PI) < Number.EPSILON)) {
1764
+ const Ct = $.set(
1765
+ gt,
1011
1766
  0,
1012
1767
  0,
1013
1768
  0,
1014
- xe,
1769
+ bt,
1015
1770
  0,
1016
1771
  0,
1017
1772
  0,
1018
1773
  1
1019
- ), Ie = X.set(
1020
- se.cs,
1021
- se.sn,
1774
+ ), St = K.set(
1775
+ ft.cs,
1776
+ ft.sn,
1022
1777
  0,
1023
- -se.sn,
1024
- se.cs,
1778
+ -ft.sn,
1779
+ ft.cs,
1025
1780
  0,
1026
1781
  0,
1027
1782
  0,
1028
1783
  1
1029
- ), ke = we.multiply(Ie).multiply(n), Re = (Le) => {
1030
- const { x: qe, y: Xe } = new Ae(Math.cos(Le), Math.sin(Le), 0).applyMatrix3(ke);
1031
- return Math.atan2(Xe, qe);
1784
+ ), wt = Ct.multiply(St).multiply(o), $t = (te) => {
1785
+ const { x: Se, y: ze } = new Lt(Math.cos(te), Math.sin(te), 0).applyMatrix3(wt);
1786
+ return Math.atan2(ze, Se);
1032
1787
  };
1033
- a.aStartAngle = Re(a.aStartAngle), a.aEndAngle = Re(a.aEndAngle), w(o) && (a.aClockwise = !a.aClockwise);
1788
+ g.aStartAngle = $t(g.aStartAngle), g.aEndAngle = $t(g.aEndAngle), N(i) && (g.aClockwise = !g.aClockwise);
1034
1789
  }
1035
1790
  }
1036
- function c(a) {
1037
- const S = _(o), L = q(o);
1038
- a.xRadius *= S, a.yRadius *= L;
1039
- const D = S > Number.EPSILON ? Math.atan2(o.elements[1], o.elements[0]) : Math.atan2(-o.elements[3], o.elements[4]);
1040
- a.aRotation += D, w(o) && (a.aStartAngle *= -1, a.aEndAngle *= -1, a.aClockwise = !a.aClockwise);
1791
+ function C(g) {
1792
+ const P = D(i), X = Y(i);
1793
+ g.xRadius *= P, g.yRadius *= X;
1794
+ const A = P > Number.EPSILON ? Math.atan2(i.elements[1], i.elements[0]) : Math.atan2(-i.elements[3], i.elements[4]);
1795
+ g.aRotation += A, N(i) && (g.aStartAngle *= -1, g.aEndAngle *= -1, g.aClockwise = !g.aClockwise);
1041
1796
  }
1042
- const b = r.subPaths;
1043
- for (let a = 0, S = b.length; a < S; a++) {
1044
- const D = b[a].curves;
1045
- for (let f = 0; f < D.length; f++) {
1046
- const A = D[f];
1047
- A.isLineCurve ? (t(A.v1), t(A.v2)) : A.isCubicBezierCurve ? (t(A.v0), t(A.v1), t(A.v2), t(A.v3)) : A.isQuadraticBezierCurve ? (t(A.v0), t(A.v1), t(A.v2)) : A.isEllipseCurve && (ne.set(A.aX, A.aY), t(ne), A.aX = ne.x, A.aY = ne.y, T(o) ? e(A) : c(A));
1797
+ const R = h.subPaths;
1798
+ for (let g = 0, P = R.length; g < P; g++) {
1799
+ const A = R[g].curves;
1800
+ for (let y = 0; y < A.length; y++) {
1801
+ const v = A[y];
1802
+ v.isLineCurve ? (r(v.v1), r(v.v2)) : v.isCubicBezierCurve ? (r(v.v0), r(v.v1), r(v.v2), r(v.v3)) : v.isQuadraticBezierCurve ? (r(v.v0), r(v.v1), r(v.v2)) : v.isEllipseCurve && (H.set(v.aX, v.aY), r(H), v.aX = H.x, v.aY = H.y, O(i) ? n(v) : C(v));
1048
1803
  }
1049
1804
  }
1050
1805
  }
1051
- function w(r) {
1052
- const o = r.elements;
1053
- return o[0] * o[4] - o[1] * o[3] < 0;
1806
+ function N(h) {
1807
+ const i = h.elements;
1808
+ return i[0] * i[4] - i[1] * i[3] < 0;
1054
1809
  }
1055
- function T(r) {
1056
- const o = r.elements, t = o[0] * o[3] + o[1] * o[4];
1057
- if (t === 0) return !1;
1058
- const e = _(r), c = q(r);
1059
- return Math.abs(t / (e * c)) > Number.EPSILON;
1810
+ function O(h) {
1811
+ const i = h.elements, r = i[0] * i[3] + i[1] * i[4];
1812
+ if (r === 0) return !1;
1813
+ const n = D(h), C = Y(h);
1814
+ return Math.abs(r / (n * C)) > Number.EPSILON;
1060
1815
  }
1061
- function _(r) {
1062
- const o = r.elements;
1063
- return Math.sqrt(o[0] * o[0] + o[1] * o[1]);
1816
+ function D(h) {
1817
+ const i = h.elements;
1818
+ return Math.sqrt(i[0] * i[0] + i[1] * i[1]);
1064
1819
  }
1065
- function q(r) {
1066
- const o = r.elements;
1067
- return Math.sqrt(o[3] * o[3] + o[4] * o[4]);
1820
+ function Y(h) {
1821
+ const i = h.elements;
1822
+ return Math.sqrt(i[3] * i[3] + i[4] * i[4]);
1068
1823
  }
1069
- function Y(r, o, t) {
1070
- let e, c, b, a, S;
1071
- const L = r + t, D = r - t, f = Math.sqrt(D * D + 4 * o * o);
1072
- return L > 0 ? (e = 0.5 * (L + f), S = 1 / e, c = r * S * t - o * S * o) : L < 0 ? c = 0.5 * (L - f) : (e = 0.5 * f, c = -0.5 * f), D > 0 ? b = D + f : b = D - f, Math.abs(b) > 2 * Math.abs(o) ? (S = -2 * o / b, a = 1 / Math.sqrt(1 + S * S), b = S * a) : Math.abs(o) === 0 ? (b = 1, a = 0) : (S = -0.5 * b / o, b = 1 / Math.sqrt(1 + S * S), a = S * b), D > 0 && (S = b, b = -a, a = S), { rt1: e, rt2: c, cs: b, sn: a };
1824
+ function tt(h, i, r) {
1825
+ let n, C, R, g, P;
1826
+ const X = h + r, A = h - r, y = Math.sqrt(A * A + 4 * i * i);
1827
+ return X > 0 ? (n = 0.5 * (X + y), P = 1 / n, C = h * P * r - i * P * i) : X < 0 ? C = 0.5 * (X - y) : (n = 0.5 * y, C = -0.5 * y), A > 0 ? R = A + y : R = A - y, Math.abs(R) > 2 * Math.abs(i) ? (P = -2 * i / R, g = 1 / Math.sqrt(1 + P * P), R = P * g) : Math.abs(i) === 0 ? (R = 1, g = 0) : (P = -0.5 * R / i, R = 1 / Math.sqrt(1 + P * P), g = P * R), A > 0 && (P = R, R = -g, g = P), { rt1: n, rt2: C, cs: R, sn: g };
1073
1828
  }
1074
- const G = [], K = {}, Z = [], oe = new ge(), J = new ge(), X = new ge(), x = new ge(), ne = new Q(), ee = new Ae(), ie = new ge(), de = new DOMParser().parseFromString(i, "image/svg+xml");
1075
- return I(de.documentElement, {
1829
+ const F = [], J = {}, E = [], q = new vt(), $ = new vt(), K = new vt(), l = new vt(), H = new it(), _ = new Lt(), et = new vt(), st = new DOMParser().parseFromString(e, "image/svg+xml");
1830
+ return a(st.documentElement, {
1076
1831
  fill: "#000",
1077
1832
  fillOpacity: 1,
1078
1833
  strokeOpacity: 1,
@@ -1080,7 +1835,7 @@ class Me extends bt {
1080
1835
  strokeLineJoin: "miter",
1081
1836
  strokeLineCap: "butt",
1082
1837
  strokeMiterLimit: 4
1083
- }), { paths: G, xml: de.documentElement };
1838
+ }), { paths: F, xml: st.documentElement };
1084
1839
  }
1085
1840
  /**
1086
1841
  * Creates from the given shape path and array of shapes.
@@ -1088,8 +1843,8 @@ class Me extends bt {
1088
1843
  * @param {ShapePath} shapePath - The shape path.
1089
1844
  * @return {Array<Shape>} An array of shapes.
1090
1845
  */
1091
- static createShapes(i) {
1092
- const I = {
1846
+ static createShapes(e) {
1847
+ const a = {
1093
1848
  ORIGIN: 0,
1094
1849
  DESTINATION: 1,
1095
1850
  BETWEEN: 2,
@@ -1097,133 +1852,133 @@ class Me extends bt {
1097
1852
  RIGHT: 4,
1098
1853
  BEHIND: 5,
1099
1854
  BEYOND: 6
1100
- }, N = {
1101
- loc: I.ORIGIN,
1855
+ }, d = {
1856
+ loc: a.ORIGIN,
1102
1857
  t: 0
1103
1858
  };
1104
- function h(g, u, E, y) {
1105
- const m = g.x, v = u.x, U = E.x, d = y.x, w = g.y, T = u.y, _ = E.y, q = y.y, Y = (d - U) * (w - _) - (q - _) * (m - U), G = (v - m) * (w - _) - (T - w) * (m - U), K = (q - _) * (v - m) - (d - U) * (T - w), Z = Y / K, oe = G / K;
1106
- if (K === 0 && Y !== 0 || Z <= 0 || Z >= 1 || oe < 0 || oe > 1)
1859
+ function m(w, L, M, U) {
1860
+ const c = w.x, p = L.x, I = M.x, u = U.x, N = w.y, O = L.y, D = M.y, Y = U.y, tt = (u - I) * (N - D) - (Y - D) * (c - I), F = (p - c) * (N - D) - (O - N) * (c - I), J = (Y - D) * (p - c) - (u - I) * (O - N), E = tt / J, q = F / J;
1861
+ if (J === 0 && tt !== 0 || E <= 0 || E >= 1 || q < 0 || q > 1)
1107
1862
  return null;
1108
- if (Y === 0 && K === 0) {
1109
- for (let J = 0; J < 2; J++)
1110
- if (B(J === 0 ? E : y, g, u), N.loc == I.ORIGIN) {
1111
- const X = J === 0 ? E : y;
1112
- return { x: X.x, y: X.y, t: N.t };
1113
- } else if (N.loc == I.BETWEEN) {
1114
- const X = +(m + N.t * (v - m)).toPrecision(10), x = +(w + N.t * (T - w)).toPrecision(10);
1115
- return { x: X, y: x, t: N.t };
1863
+ if (tt === 0 && J === 0) {
1864
+ for (let $ = 0; $ < 2; $++)
1865
+ if (b($ === 0 ? M : U, w, L), d.loc == a.ORIGIN) {
1866
+ const K = $ === 0 ? M : U;
1867
+ return { x: K.x, y: K.y, t: d.t };
1868
+ } else if (d.loc == a.BETWEEN) {
1869
+ const K = +(c + d.t * (p - c)).toPrecision(10), l = +(N + d.t * (O - N)).toPrecision(10);
1870
+ return { x: K, y: l, t: d.t };
1116
1871
  }
1117
1872
  return null;
1118
1873
  } else {
1119
- for (let x = 0; x < 2; x++)
1120
- if (B(x === 0 ? E : y, g, u), N.loc == I.ORIGIN) {
1121
- const ne = x === 0 ? E : y;
1122
- return { x: ne.x, y: ne.y, t: N.t };
1874
+ for (let l = 0; l < 2; l++)
1875
+ if (b(l === 0 ? M : U, w, L), d.loc == a.ORIGIN) {
1876
+ const H = l === 0 ? M : U;
1877
+ return { x: H.x, y: H.y, t: d.t };
1123
1878
  }
1124
- const J = +(m + Z * (v - m)).toPrecision(10), X = +(w + Z * (T - w)).toPrecision(10);
1125
- return { x: J, y: X, t: Z };
1879
+ const $ = +(c + E * (p - c)).toPrecision(10), K = +(N + E * (O - N)).toPrecision(10);
1880
+ return { x: $, y: K, t: E };
1126
1881
  }
1127
1882
  }
1128
- function B(g, u, E) {
1129
- const y = E.x - u.x, m = E.y - u.y, v = g.x - u.x, U = g.y - u.y, d = y * U - v * m;
1130
- if (g.x === u.x && g.y === u.y) {
1131
- N.loc = I.ORIGIN, N.t = 0;
1883
+ function b(w, L, M) {
1884
+ const U = M.x - L.x, c = M.y - L.y, p = w.x - L.x, I = w.y - L.y, u = U * I - p * c;
1885
+ if (w.x === L.x && w.y === L.y) {
1886
+ d.loc = a.ORIGIN, d.t = 0;
1132
1887
  return;
1133
1888
  }
1134
- if (g.x === E.x && g.y === E.y) {
1135
- N.loc = I.DESTINATION, N.t = 1;
1889
+ if (w.x === M.x && w.y === M.y) {
1890
+ d.loc = a.DESTINATION, d.t = 1;
1136
1891
  return;
1137
1892
  }
1138
- if (d < -Number.EPSILON) {
1139
- N.loc = I.LEFT;
1893
+ if (u < -Number.EPSILON) {
1894
+ d.loc = a.LEFT;
1140
1895
  return;
1141
1896
  }
1142
- if (d > Number.EPSILON) {
1143
- N.loc = I.RIGHT;
1897
+ if (u > Number.EPSILON) {
1898
+ d.loc = a.RIGHT;
1144
1899
  return;
1145
1900
  }
1146
- if (y * v < 0 || m * U < 0) {
1147
- N.loc = I.BEHIND;
1901
+ if (U * p < 0 || c * I < 0) {
1902
+ d.loc = a.BEHIND;
1148
1903
  return;
1149
1904
  }
1150
- if (Math.sqrt(y * y + m * m) < Math.sqrt(v * v + U * U)) {
1151
- N.loc = I.BEYOND;
1905
+ if (Math.sqrt(U * U + c * c) < Math.sqrt(p * p + I * I)) {
1906
+ d.loc = a.BEYOND;
1152
1907
  return;
1153
1908
  }
1154
- let w;
1155
- y !== 0 ? w = v / y : w = U / m, N.loc = I.BETWEEN, N.t = w;
1909
+ let N;
1910
+ U !== 0 ? N = p / U : N = I / c, d.loc = a.BETWEEN, d.t = N;
1156
1911
  }
1157
- function W(g, u) {
1158
- const E = [], y = [];
1159
- for (let m = 1; m < g.length; m++) {
1160
- const v = g[m - 1], U = g[m];
1161
- for (let d = 1; d < u.length; d++) {
1162
- const w = u[d - 1], T = u[d], _ = h(v, U, w, T);
1163
- _ !== null && E.find((q) => q.t <= _.t + Number.EPSILON && q.t >= _.t - Number.EPSILON) === void 0 && (E.push(_), y.push(new Q(_.x, _.y)));
1912
+ function Q(w, L) {
1913
+ const M = [], U = [];
1914
+ for (let c = 1; c < w.length; c++) {
1915
+ const p = w[c - 1], I = w[c];
1916
+ for (let u = 1; u < L.length; u++) {
1917
+ const N = L[u - 1], O = L[u], D = m(p, I, N, O);
1918
+ D !== null && M.find((Y) => Y.t <= D.t + Number.EPSILON && Y.t >= D.t - Number.EPSILON) === void 0 && (M.push(D), U.push(new it(D.x, D.y)));
1164
1919
  }
1165
1920
  }
1166
- return y;
1921
+ return U;
1167
1922
  }
1168
- function p(g, u, E) {
1169
- const y = new Q();
1170
- u.getCenter(y);
1171
- const m = [];
1172
- return E.forEach((v) => {
1173
- v.boundingBox.containsPoint(y) && W(g, v.points).forEach((d) => {
1174
- m.push({ identifier: v.identifier, isCW: v.isCW, point: d });
1923
+ function x(w, L, M) {
1924
+ const U = new it();
1925
+ L.getCenter(U);
1926
+ const c = [];
1927
+ return M.forEach((p) => {
1928
+ p.boundingBox.containsPoint(U) && Q(w, p.points).forEach((u) => {
1929
+ c.push({ identifier: p.identifier, isCW: p.isCW, point: u });
1175
1930
  });
1176
- }), m.sort((v, U) => v.point.x - U.point.x), m;
1931
+ }), c.sort((p, I) => p.point.x - I.point.x), c;
1177
1932
  }
1178
- function k(g, u, E, y, m) {
1179
- (m == null || m === "") && (m = "nonzero");
1180
- const v = new Q();
1181
- g.boundingBox.getCenter(v);
1182
- const U = [new Q(E, v.y), new Q(y, v.y)], d = p(U, g.boundingBox, u);
1183
- d.sort((G, K) => G.point.x - K.point.x);
1184
- const w = [], T = [];
1185
- d.forEach((G) => {
1186
- G.identifier === g.identifier ? w.push(G) : T.push(G);
1933
+ function z(w, L, M, U, c) {
1934
+ (c == null || c === "") && (c = "nonzero");
1935
+ const p = new it();
1936
+ w.boundingBox.getCenter(p);
1937
+ const I = [new it(M, p.y), new it(U, p.y)], u = x(I, w.boundingBox, L);
1938
+ u.sort((F, J) => F.point.x - J.point.x);
1939
+ const N = [], O = [];
1940
+ u.forEach((F) => {
1941
+ F.identifier === w.identifier ? N.push(F) : O.push(F);
1187
1942
  });
1188
- const _ = w[0].point.x, q = [];
1189
- let Y = 0;
1190
- for (; Y < T.length && T[Y].point.x < _; )
1191
- q.length > 0 && q[q.length - 1] === T[Y].identifier ? q.pop() : q.push(T[Y].identifier), Y++;
1192
- if (q.push(g.identifier), m === "evenodd") {
1193
- const G = q.length % 2 === 0, K = q[q.length - 2];
1194
- return { identifier: g.identifier, isHole: G, for: K };
1195
- } else if (m === "nonzero") {
1196
- let G = !0, K = null, Z = null;
1197
- for (let oe = 0; oe < q.length; oe++) {
1198
- const J = q[oe];
1199
- G ? (Z = u[J].isCW, G = !1, K = J) : Z !== u[J].isCW && (Z = u[J].isCW, G = !0);
1943
+ const D = N[0].point.x, Y = [];
1944
+ let tt = 0;
1945
+ for (; tt < O.length && O[tt].point.x < D; )
1946
+ Y.length > 0 && Y[Y.length - 1] === O[tt].identifier ? Y.pop() : Y.push(O[tt].identifier), tt++;
1947
+ if (Y.push(w.identifier), c === "evenodd") {
1948
+ const F = Y.length % 2 === 0, J = Y[Y.length - 2];
1949
+ return { identifier: w.identifier, isHole: F, for: J };
1950
+ } else if (c === "nonzero") {
1951
+ let F = !0, J = null, E = null;
1952
+ for (let q = 0; q < Y.length; q++) {
1953
+ const $ = Y[q];
1954
+ F ? (E = L[$].isCW, F = !1, J = $) : E !== L[$].isCW && (E = L[$].isCW, F = !0);
1200
1955
  }
1201
- return { identifier: g.identifier, isHole: G, for: K };
1956
+ return { identifier: w.identifier, isHole: F, for: J };
1202
1957
  } else
1203
- console.warn('fill-rule: "' + m + '" is currently not implemented.');
1958
+ console.warn('fill-rule: "' + c + '" is currently not implemented.');
1204
1959
  }
1205
- let z = 999999999, O = -999999999, C = i.subPaths.map((g) => {
1206
- const u = g.getPoints();
1207
- let E = -999999999, y = 999999999, m = -999999999, v = 999999999;
1208
- for (let U = 0; U < u.length; U++) {
1209
- const d = u[U];
1210
- d.y > E && (E = d.y), d.y < y && (y = d.y), d.x > m && (m = d.x), d.x < v && (v = d.x);
1960
+ let G = 999999999, k = -999999999, Z = e.subPaths.map((w) => {
1961
+ const L = w.getPoints();
1962
+ let M = -999999999, U = 999999999, c = -999999999, p = 999999999;
1963
+ for (let I = 0; I < L.length; I++) {
1964
+ const u = L[I];
1965
+ u.y > M && (M = u.y), u.y < U && (U = u.y), u.x > c && (c = u.x), u.x < p && (p = u.x);
1211
1966
  }
1212
- return O <= m && (O = m + 1), z >= v && (z = v - 1), { curves: g.curves, points: u, isCW: kt.isClockWise(u), identifier: -1, boundingBox: new wt(new Q(v, y), new Q(m, E)) };
1967
+ return k <= c && (k = c + 1), G >= p && (G = p - 1), { curves: w.curves, points: L, isCW: On.isClockWise(L), identifier: -1, boundingBox: new wn(new it(p, U), new it(c, M)) };
1213
1968
  });
1214
- C = C.filter((g) => g.points.length > 1);
1215
- for (let g = 0; g < C.length; g++)
1216
- C[g].identifier = g;
1217
- const V = C.map((g) => k(g, C, z, O, i.userData ? i.userData.style.fillRule : void 0)), P = [];
1218
- return C.forEach((g) => {
1219
- if (!V[g.identifier].isHole) {
1220
- const E = new At();
1221
- E.curves = g.curves, V.filter((m) => m.isHole && m.for === g.identifier).forEach((m) => {
1222
- const v = C[m.identifier], U = new Ee();
1223
- U.curves = v.curves, E.holes.push(U);
1224
- }), P.push(E);
1969
+ Z = Z.filter((w) => w.points.length > 1);
1970
+ for (let w = 0; w < Z.length; w++)
1971
+ Z[w].identifier = w;
1972
+ const V = Z.map((w) => z(w, Z, G, k, e.userData ? e.userData.style.fillRule : void 0)), B = [];
1973
+ return Z.forEach((w) => {
1974
+ if (!V[w.identifier].isHole) {
1975
+ const M = new In();
1976
+ M.curves = w.curves, V.filter((c) => c.isHole && c.for === w.identifier).forEach((c) => {
1977
+ const p = Z[c.identifier], I = new Gt();
1978
+ I.curves = p.curves, M.holes.push(I);
1979
+ }), B.push(M);
1225
1980
  }
1226
- }), P;
1981
+ }), B;
1227
1982
  }
1228
1983
  /**
1229
1984
  * Returns a stroke style object from the given parameters.
@@ -1235,13 +1990,13 @@ class Me extends bt {
1235
1990
  * @param {number} [miterLimit=4] - Maximum join length, in multiples of the `width` parameter (join is truncated if it exceeds that distance).
1236
1991
  * @return {Object} The style object.
1237
1992
  */
1238
- static getStrokeStyle(i, M, I, N, h) {
1239
- return i = i !== void 0 ? i : 1, M = M !== void 0 ? M : "#000", I = I !== void 0 ? I : "miter", N = N !== void 0 ? N : "butt", h = h !== void 0 ? h : 4, {
1240
- strokeColor: M,
1241
- strokeWidth: i,
1242
- strokeLineJoin: I,
1243
- strokeLineCap: N,
1244
- strokeMiterLimit: h
1993
+ static getStrokeStyle(e, s, a, d, m) {
1994
+ return e = e !== void 0 ? e : 1, s = s !== void 0 ? s : "#000", a = a !== void 0 ? a : "miter", d = d !== void 0 ? d : "butt", m = m !== void 0 ? m : 4, {
1995
+ strokeColor: s,
1996
+ strokeWidth: e,
1997
+ strokeLineJoin: a,
1998
+ strokeLineCap: d,
1999
+ strokeMiterLimit: m
1245
2000
  };
1246
2001
  }
1247
2002
  /**
@@ -1254,12 +2009,12 @@ class Me extends bt {
1254
2009
  * @return {?BufferGeometry} The stroke geometry. UV coordinates are generated ('u' along path. 'v' across it, from left to right).
1255
2010
  * Returns `null` if not geometry was generated.
1256
2011
  */
1257
- static pointsToStroke(i, M, I, N) {
1258
- const h = [], B = [], W = [];
1259
- if (Me.pointsToStrokeWithBuffers(i, M, I, N, h, B, W) === 0)
2012
+ static pointsToStroke(e, s, a, d) {
2013
+ const m = [], b = [], Q = [];
2014
+ if (kt.pointsToStrokeWithBuffers(e, s, a, d, m, b, Q) === 0)
1260
2015
  return null;
1261
- const p = new Mt();
1262
- return p.setAttribute("position", new Ce(h, 3)), p.setAttribute("normal", new Ce(B, 3)), p.setAttribute("uv", new Ce(W, 2)), p;
2016
+ const x = new Ln();
2017
+ return x.setAttribute("position", new Vt(m, 3)), x.setAttribute("normal", new Vt(b, 3)), x.setAttribute("uv", new Vt(Q, 2)), x;
1263
2018
  }
1264
2019
  /**
1265
2020
  * Creates a stroke from an array of points.
@@ -1274,887 +2029,1259 @@ class Me extends bt {
1274
2029
  * @param {number} [vertexOffset=0] - The vertex offset.
1275
2030
  * @return {number} The number of vertices.
1276
2031
  */
1277
- static pointsToStrokeWithBuffers(i, M, I, N, h, B, W, p) {
1278
- const k = new Q(), z = new Q(), O = new Q(), C = new Q(), V = new Q(), P = new Q(), g = new Q(), u = new Q(), E = new Q(), y = new Q(), m = new Q(), v = new Q(), U = new Q(), d = new Q(), w = new Q(), T = new Q(), _ = new Q();
1279
- I = I !== void 0 ? I : 12, N = N !== void 0 ? N : 1e-3, p = p !== void 0 ? p : 0, i = D(i);
1280
- const q = i.length;
1281
- if (q < 2) return 0;
1282
- const Y = i[0].equals(i[q - 1]);
1283
- let G, K = i[0], Z;
1284
- const oe = M.strokeWidth / 2, J = 1 / (q - 1);
1285
- let X = 0, x, ne, ee, ie, de = !1, fe = 0, r = p * 3, o = p * 2;
1286
- t(i[0], i[1], k).multiplyScalar(oe), u.copy(i[0]).sub(k), E.copy(i[0]).add(k), y.copy(u), m.copy(E);
1287
- for (let f = 1; f < q; f++) {
1288
- G = i[f], f === q - 1 ? Y ? Z = i[1] : Z = void 0 : Z = i[f + 1];
1289
- const A = k;
1290
- if (t(K, G, A), O.copy(A).multiplyScalar(oe), v.copy(G).sub(O), U.copy(G).add(O), x = X + J, ne = !1, Z !== void 0) {
1291
- t(G, Z, z), O.copy(z).multiplyScalar(oe), d.copy(G).sub(O), w.copy(G).add(O), ee = !0, O.subVectors(Z, K), A.dot(O) < 0 && (ee = !1), f === 1 && (de = ee), O.subVectors(Z, G), O.normalize();
1292
- const F = Math.abs(A.dot(O));
1293
- if (F > Number.EPSILON) {
1294
- const j = oe / F;
1295
- O.multiplyScalar(-j), C.subVectors(G, K), V.copy(C).setLength(j).add(O), T.copy(V).negate();
1296
- const s = V.length(), n = C.length();
1297
- C.divideScalar(n), P.subVectors(Z, G);
1298
- const H = P.length();
1299
- switch (P.divideScalar(H), C.dot(T) < n && P.dot(T) < H && (ne = !0), _.copy(V).add(G), T.add(G), ie = !1, ne ? ee ? (w.copy(T), U.copy(T)) : (d.copy(T), v.copy(T)) : b(), M.strokeLineJoin) {
2032
+ static pointsToStrokeWithBuffers(e, s, a, d, m, b, Q, x) {
2033
+ const z = new it(), G = new it(), k = new it(), Z = new it(), V = new it(), B = new it(), w = new it(), L = new it(), M = new it(), U = new it(), c = new it(), p = new it(), I = new it(), u = new it(), N = new it(), O = new it(), D = new it();
2034
+ a = a !== void 0 ? a : 12, d = d !== void 0 ? d : 1e-3, x = x !== void 0 ? x : 0, e = A(e);
2035
+ const Y = e.length;
2036
+ if (Y < 2) return 0;
2037
+ const tt = e[0].equals(e[Y - 1]);
2038
+ let F, J = e[0], E;
2039
+ const q = s.strokeWidth / 2, $ = 1 / (Y - 1);
2040
+ let K = 0, l, H, _, et, st = !1, ut = 0, h = x * 3, i = x * 2;
2041
+ r(e[0], e[1], z).multiplyScalar(q), L.copy(e[0]).sub(z), M.copy(e[0]).add(z), U.copy(L), c.copy(M);
2042
+ for (let y = 1; y < Y; y++) {
2043
+ F = e[y], y === Y - 1 ? tt ? E = e[1] : E = void 0 : E = e[y + 1];
2044
+ const v = z;
2045
+ if (r(J, F, v), k.copy(v).multiplyScalar(q), p.copy(F).sub(k), I.copy(F).add(k), l = K + $, H = !1, E !== void 0) {
2046
+ r(F, E, G), k.copy(G).multiplyScalar(q), u.copy(F).sub(k), N.copy(F).add(k), _ = !0, k.subVectors(E, J), v.dot(k) < 0 && (_ = !1), y === 1 && (st = _), k.subVectors(E, F), k.normalize();
2047
+ const S = Math.abs(v.dot(k));
2048
+ if (S > Number.EPSILON) {
2049
+ const W = q / S;
2050
+ k.multiplyScalar(-W), Z.subVectors(F, J), V.copy(Z).setLength(W).add(k), O.copy(V).negate();
2051
+ const f = V.length(), o = Z.length();
2052
+ Z.divideScalar(o), B.subVectors(E, F);
2053
+ const j = B.length();
2054
+ switch (B.divideScalar(j), Z.dot(O) < o && B.dot(O) < j && (H = !0), D.copy(V).add(F), O.add(F), et = !1, H ? _ ? (N.copy(O), I.copy(O)) : (u.copy(O), p.copy(O)) : R(), s.strokeLineJoin) {
1300
2055
  case "bevel":
1301
- a(ee, ne, x);
2056
+ g(_, H, l);
1302
2057
  break;
1303
2058
  case "round":
1304
- S(ee, ne), ee ? c(G, v, d, x, 0) : c(G, w, U, x, 1);
2059
+ P(_, H), _ ? C(F, p, u, l, 0) : C(F, N, I, l, 1);
1305
2060
  break;
1306
2061
  case "miter":
1307
2062
  case "miter-clip":
1308
2063
  default:
1309
- const $ = oe * M.strokeMiterLimit / s;
1310
- if ($ < 1)
1311
- if (M.strokeLineJoin !== "miter-clip") {
1312
- a(ee, ne, x);
2064
+ const nt = q * s.strokeMiterLimit / f;
2065
+ if (nt < 1)
2066
+ if (s.strokeLineJoin !== "miter-clip") {
2067
+ g(_, H, l);
1313
2068
  break;
1314
2069
  } else
1315
- S(ee, ne), ee ? (P.subVectors(_, v).multiplyScalar($).add(v), g.subVectors(_, d).multiplyScalar($).add(d), e(v, x, 0), e(P, x, 0), e(G, x, 0.5), e(G, x, 0.5), e(P, x, 0), e(g, x, 0), e(G, x, 0.5), e(g, x, 0), e(d, x, 0)) : (P.subVectors(_, U).multiplyScalar($).add(U), g.subVectors(_, w).multiplyScalar($).add(w), e(U, x, 1), e(P, x, 1), e(G, x, 0.5), e(G, x, 0.5), e(P, x, 1), e(g, x, 1), e(G, x, 0.5), e(g, x, 1), e(w, x, 1));
2070
+ P(_, H), _ ? (B.subVectors(D, p).multiplyScalar(nt).add(p), w.subVectors(D, u).multiplyScalar(nt).add(u), n(p, l, 0), n(B, l, 0), n(F, l, 0.5), n(F, l, 0.5), n(B, l, 0), n(w, l, 0), n(F, l, 0.5), n(w, l, 0), n(u, l, 0)) : (B.subVectors(D, I).multiplyScalar(nt).add(I), w.subVectors(D, N).multiplyScalar(nt).add(N), n(I, l, 1), n(B, l, 1), n(F, l, 0.5), n(F, l, 0.5), n(B, l, 1), n(w, l, 1), n(F, l, 0.5), n(w, l, 1), n(N, l, 1));
1316
2071
  else
1317
- ne ? (ee ? (e(E, X, 1), e(u, X, 0), e(_, x, 0), e(E, X, 1), e(_, x, 0), e(T, x, 1)) : (e(E, X, 1), e(u, X, 0), e(_, x, 1), e(u, X, 0), e(T, x, 0), e(_, x, 1)), ee ? d.copy(_) : w.copy(_)) : ee ? (e(v, x, 0), e(_, x, 0), e(G, x, 0.5), e(G, x, 0.5), e(_, x, 0), e(d, x, 0)) : (e(U, x, 1), e(_, x, 1), e(G, x, 0.5), e(G, x, 0.5), e(_, x, 1), e(w, x, 1)), ie = !0;
2072
+ H ? (_ ? (n(M, K, 1), n(L, K, 0), n(D, l, 0), n(M, K, 1), n(D, l, 0), n(O, l, 1)) : (n(M, K, 1), n(L, K, 0), n(D, l, 1), n(L, K, 0), n(O, l, 0), n(D, l, 1)), _ ? u.copy(D) : N.copy(D)) : _ ? (n(p, l, 0), n(D, l, 0), n(F, l, 0.5), n(F, l, 0.5), n(D, l, 0), n(u, l, 0)) : (n(I, l, 1), n(D, l, 1), n(F, l, 0.5), n(F, l, 0.5), n(D, l, 1), n(N, l, 1)), et = !0;
1318
2073
  break;
1319
2074
  }
1320
2075
  } else
1321
- b();
2076
+ R();
1322
2077
  } else
1323
- b();
1324
- !Y && f === q - 1 && L(i[0], y, m, ee, !0, X), X = x, K = G, u.copy(d), E.copy(w);
2078
+ R();
2079
+ !tt && y === Y - 1 && X(e[0], U, c, _, !0, K), K = l, J = F, L.copy(u), M.copy(N);
1325
2080
  }
1326
- if (!Y)
1327
- L(G, v, U, ee, !1, x);
1328
- else if (ne && h) {
1329
- let f = _, A = T;
1330
- de !== ee && (f = T, A = _), ee ? (ie || de) && (A.toArray(h, 0 * 3), A.toArray(h, 3 * 3), ie && f.toArray(h, 1 * 3)) : (ie || !de) && (A.toArray(h, 1 * 3), A.toArray(h, 3 * 3), ie && f.toArray(h, 0 * 3));
2081
+ if (!tt)
2082
+ X(F, p, I, _, !1, l);
2083
+ else if (H && m) {
2084
+ let y = D, v = O;
2085
+ st !== _ && (y = O, v = D), _ ? (et || st) && (v.toArray(m, 0 * 3), v.toArray(m, 3 * 3), et && y.toArray(m, 1 * 3)) : (et || !st) && (v.toArray(m, 1 * 3), v.toArray(m, 3 * 3), et && y.toArray(m, 0 * 3));
1331
2086
  }
1332
- return fe;
1333
- function t(f, A, F) {
1334
- return F.subVectors(A, f), F.set(-F.y, F.x).normalize();
2087
+ return ut;
2088
+ function r(y, v, S) {
2089
+ return S.subVectors(v, y), S.set(-S.y, S.x).normalize();
1335
2090
  }
1336
- function e(f, A, F) {
1337
- h && (h[r] = f.x, h[r + 1] = f.y, h[r + 2] = 0, B && (B[r] = 0, B[r + 1] = 0, B[r + 2] = 1), r += 3, W && (W[o] = A, W[o + 1] = F, o += 2)), fe += 3;
2091
+ function n(y, v, S) {
2092
+ m && (m[h] = y.x, m[h + 1] = y.y, m[h + 2] = 0, b && (b[h] = 0, b[h + 1] = 0, b[h + 2] = 1), h += 3, Q && (Q[i] = v, Q[i + 1] = S, i += 2)), ut += 3;
1338
2093
  }
1339
- function c(f, A, F, j, s) {
1340
- k.copy(A).sub(f).normalize(), z.copy(F).sub(f).normalize();
1341
- let n = Math.PI;
1342
- const H = k.dot(z);
1343
- Math.abs(H) < 1 && (n = Math.abs(Math.acos(H))), n /= I, O.copy(A);
1344
- for (let $ = 0, ce = I - 1; $ < ce; $++)
1345
- C.copy(O).rotateAround(f, n), e(O, j, s), e(C, j, s), e(f, j, 0.5), O.copy(C);
1346
- e(C, j, s), e(F, j, s), e(f, j, 0.5);
2094
+ function C(y, v, S, W, f) {
2095
+ z.copy(v).sub(y).normalize(), G.copy(S).sub(y).normalize();
2096
+ let o = Math.PI;
2097
+ const j = z.dot(G);
2098
+ Math.abs(j) < 1 && (o = Math.abs(Math.acos(j))), o /= a, k.copy(v);
2099
+ for (let nt = 0, pt = a - 1; nt < pt; nt++)
2100
+ Z.copy(k).rotateAround(y, o), n(k, W, f), n(Z, W, f), n(y, W, 0.5), k.copy(Z);
2101
+ n(Z, W, f), n(S, W, f), n(y, W, 0.5);
1347
2102
  }
1348
- function b() {
1349
- e(E, X, 1), e(u, X, 0), e(v, x, 0), e(E, X, 1), e(v, x, 0), e(U, x, 1);
2103
+ function R() {
2104
+ n(M, K, 1), n(L, K, 0), n(p, l, 0), n(M, K, 1), n(p, l, 0), n(I, l, 1);
1350
2105
  }
1351
- function a(f, A, F) {
1352
- A ? f ? (e(E, X, 1), e(u, X, 0), e(v, x, 0), e(E, X, 1), e(v, x, 0), e(T, x, 1), e(v, F, 0), e(d, F, 0), e(T, F, 0.5)) : (e(E, X, 1), e(u, X, 0), e(U, x, 1), e(u, X, 0), e(T, x, 0), e(U, x, 1), e(U, F, 1), e(T, F, 0), e(w, F, 1)) : f ? (e(v, F, 0), e(d, F, 0), e(G, F, 0.5)) : (e(U, F, 1), e(w, F, 0), e(G, F, 0.5));
2106
+ function g(y, v, S) {
2107
+ v ? y ? (n(M, K, 1), n(L, K, 0), n(p, l, 0), n(M, K, 1), n(p, l, 0), n(O, l, 1), n(p, S, 0), n(u, S, 0), n(O, S, 0.5)) : (n(M, K, 1), n(L, K, 0), n(I, l, 1), n(L, K, 0), n(O, l, 0), n(I, l, 1), n(I, S, 1), n(O, S, 0), n(N, S, 1)) : y ? (n(p, S, 0), n(u, S, 0), n(F, S, 0.5)) : (n(I, S, 1), n(N, S, 0), n(F, S, 0.5));
1353
2108
  }
1354
- function S(f, A) {
1355
- A && (f ? (e(E, X, 1), e(u, X, 0), e(v, x, 0), e(E, X, 1), e(v, x, 0), e(T, x, 1), e(v, X, 0), e(G, x, 0.5), e(T, x, 1), e(G, x, 0.5), e(d, X, 0), e(T, x, 1)) : (e(E, X, 1), e(u, X, 0), e(U, x, 1), e(u, X, 0), e(T, x, 0), e(U, x, 1), e(U, X, 1), e(T, x, 0), e(G, x, 0.5), e(G, x, 0.5), e(T, x, 0), e(w, X, 1)));
2109
+ function P(y, v) {
2110
+ v && (y ? (n(M, K, 1), n(L, K, 0), n(p, l, 0), n(M, K, 1), n(p, l, 0), n(O, l, 1), n(p, K, 0), n(F, l, 0.5), n(O, l, 1), n(F, l, 0.5), n(u, K, 0), n(O, l, 1)) : (n(M, K, 1), n(L, K, 0), n(I, l, 1), n(L, K, 0), n(O, l, 0), n(I, l, 1), n(I, K, 1), n(O, l, 0), n(F, l, 0.5), n(F, l, 0.5), n(O, l, 0), n(N, K, 1)));
1356
2111
  }
1357
- function L(f, A, F, j, s, n) {
1358
- switch (M.strokeLineCap) {
2112
+ function X(y, v, S, W, f, o) {
2113
+ switch (s.strokeLineCap) {
1359
2114
  case "round":
1360
- s ? c(f, F, A, n, 0.5) : c(f, A, F, n, 0.5);
2115
+ f ? C(y, S, v, o, 0.5) : C(y, v, S, o, 0.5);
1361
2116
  break;
1362
2117
  case "square":
1363
- if (s)
1364
- k.subVectors(A, f), z.set(k.y, -k.x), O.addVectors(k, z).add(f), C.subVectors(z, k).add(f), j ? (O.toArray(h, 1 * 3), C.toArray(h, 0 * 3), C.toArray(h, 3 * 3)) : (O.toArray(h, 1 * 3), W[3 * 2 + 1] === 1 ? C.toArray(h, 3 * 3) : O.toArray(h, 3 * 3), C.toArray(h, 0 * 3));
2118
+ if (f)
2119
+ z.subVectors(v, y), G.set(z.y, -z.x), k.addVectors(z, G).add(y), Z.subVectors(G, z).add(y), W ? (k.toArray(m, 1 * 3), Z.toArray(m, 0 * 3), Z.toArray(m, 3 * 3)) : (k.toArray(m, 1 * 3), Q[3 * 2 + 1] === 1 ? Z.toArray(m, 3 * 3) : k.toArray(m, 3 * 3), Z.toArray(m, 0 * 3));
1365
2120
  else {
1366
- k.subVectors(F, f), z.set(k.y, -k.x), O.addVectors(k, z).add(f), C.subVectors(z, k).add(f);
1367
- const H = h.length;
1368
- j ? (O.toArray(h, H - 1 * 3), C.toArray(h, H - 2 * 3), C.toArray(h, H - 4 * 3)) : (C.toArray(h, H - 2 * 3), O.toArray(h, H - 1 * 3), C.toArray(h, H - 4 * 3));
2121
+ z.subVectors(S, y), G.set(z.y, -z.x), k.addVectors(z, G).add(y), Z.subVectors(G, z).add(y);
2122
+ const j = m.length;
2123
+ W ? (k.toArray(m, j - 1 * 3), Z.toArray(m, j - 2 * 3), Z.toArray(m, j - 4 * 3)) : (Z.toArray(m, j - 2 * 3), k.toArray(m, j - 1 * 3), Z.toArray(m, j - 4 * 3));
1369
2124
  }
1370
2125
  break;
1371
2126
  }
1372
2127
  }
1373
- function D(f) {
1374
- let A = !1;
1375
- for (let j = 1, s = f.length - 1; j < s; j++)
1376
- if (f[j].distanceTo(f[j + 1]) < N) {
1377
- A = !0;
2128
+ function A(y) {
2129
+ let v = !1;
2130
+ for (let W = 1, f = y.length - 1; W < f; W++)
2131
+ if (y[W].distanceTo(y[W + 1]) < d) {
2132
+ v = !0;
1378
2133
  break;
1379
2134
  }
1380
- if (!A) return f;
1381
- const F = [];
1382
- F.push(f[0]);
1383
- for (let j = 1, s = f.length - 1; j < s; j++)
1384
- f[j].distanceTo(f[j + 1]) >= N && F.push(f[j]);
1385
- return F.push(f[f.length - 1]), F;
2135
+ if (!v) return y;
2136
+ const S = [];
2137
+ S.push(y[0]);
2138
+ for (let W = 1, f = y.length - 1; W < f; W++)
2139
+ y[W].distanceTo(y[W + 1]) >= d && S.push(y[W]);
2140
+ return S.push(y[y.length - 1]), S;
1386
2141
  }
1387
2142
  }
1388
2143
  }
1389
- const Lt = -2;
1390
- function Bt(l) {
1391
- if (!l || l.nodeType !== 1) return;
1392
- let i = l;
1393
- for (; i; ) {
1394
- const M = i.getAttribute("id");
1395
- if (M) return M;
1396
- i = i.parentElement;
2144
+ const mr = -2;
2145
+ function pr(t) {
2146
+ if (!t || t.nodeType !== 1) return;
2147
+ let e = t;
2148
+ for (; e; ) {
2149
+ const s = e.getAttribute("id");
2150
+ if (s) return s;
2151
+ e = e.parentElement;
1397
2152
  }
1398
2153
  }
1399
- function Se(l) {
1400
- if (!l) return !1;
1401
- let i = l;
1402
- for (; i; ) {
1403
- const M = i.getAttribute("id") ?? "", I = i.getAttribute("data-name") ?? "";
1404
- if (Oe(M) || Oe(I) || _e(M) || _e(I)) return !0;
1405
- i = i.parentElement;
2154
+ function Bt(t) {
2155
+ if (!t) return !1;
2156
+ let e = t;
2157
+ for (; e; ) {
2158
+ const s = e.getAttribute("id") ?? "", a = e.getAttribute("data-name") ?? "";
2159
+ if (Zt(s) || Zt(a) || Ft(s) || Ft(a)) return !0;
2160
+ e = e.parentElement;
1406
2161
  }
1407
2162
  return !1;
1408
2163
  }
1409
- function Dt({
1410
- url: l,
1411
- suppressIds: i,
1412
- imageProxyUrl: M,
1413
- is3d: I = !1
2164
+ function yr({
2165
+ url: t,
2166
+ suppressIds: e,
2167
+ imageProxyUrl: s,
2168
+ is3d: a = !1,
2169
+ theme: d
1414
2170
  }) {
1415
- const [N, h] = ae(null);
1416
- le(() => {
1417
- let W = !1;
1418
- const p = it(l, M);
1419
- return fetch(p).then((k) => {
2171
+ const [m, b] = dt(null);
2172
+ lt(() => {
2173
+ let x = !1;
2174
+ const z = new AbortController(), G = be(t, s);
2175
+ return fetch(G, { signal: z.signal }).then((k) => {
1420
2176
  if (!k.ok) throw new Error(`SVG fetch ${k.status}`);
1421
2177
  return k.text();
1422
2178
  }).then((k) => {
1423
- if (W) return;
1424
- const z = ot(k), O = new Me();
1425
- h(O.parse(z));
2179
+ if (x) return;
2180
+ const Z = on(k), V = new kt();
2181
+ b(V.parse(Z));
1426
2182
  }).catch((k) => {
1427
- W || (h(null), console.warn(
1428
- `[eyeon-map] Outdoor SVG failed to load from ${p}. If this is a cross-origin error, pass \`imageProxyUrl\` to MapViewer.`,
2183
+ x || k instanceof DOMException && k.name === "AbortError" || (b(null), console.warn(
2184
+ `[eyeon-map] Outdoor SVG failed to load from ${G}. If this is a cross-origin error, pass \`imageProxyUrl\` to MapViewer.`,
1429
2185
  k
1430
2186
  ));
1431
2187
  }), () => {
1432
- W = !0;
2188
+ x = !0, z.abort();
1433
2189
  };
1434
- }, [l, M]);
1435
- const B = re(() => {
1436
- var k, z, O;
1437
- if (!N) return [];
1438
- const W = [];
1439
- let p = 0;
1440
- for (const C of N.paths) {
1441
- const V = (k = C.userData) == null ? void 0 : k.node, P = Bt(V);
1442
- if (P != null && P.toLowerCase().startsWith("route-path") || P && (rt(P) || st(P)) || P && (i != null && i.has(P)) || Se(V) && !P || P && (Oe(P) || _e(P)) || V && Se(V) && P && (i != null && i.has(P)) || V && Se(V)) continue;
1443
- const g = Me.createShapes(C);
1444
- if (g.length === 0) continue;
1445
- const u = We(P), E = new ue.Color();
1446
- u != null && u.fill ? E.set(u.fill) : C.color ? E.copy(C.color) : E.set("#cccccc"), u != null && u.stroke && !u.fill && E.set(u.stroke);
1447
- const y = typeof ((O = (z = C.userData) == null ? void 0 : z.style) == null ? void 0 : O.opacity) == "number" ? C.userData.style.opacity : 1, m = I && (u == null ? void 0 : u.extrudeHeight) != null ? u.extrudeHeight : 0;
1448
- W.push({
1449
- key: `${P ?? "path"}-${p++}`,
1450
- shapes: g,
1451
- color: E,
1452
- opacity: y,
1453
- extrude: m,
1454
- renderOrder: (u == null ? void 0 : u.renderOrder) ?? 2
2190
+ }, [t, s]);
2191
+ const Q = ot(() => {
2192
+ var G, k, Z;
2193
+ if (!m) return [];
2194
+ const x = [];
2195
+ let z = 0;
2196
+ for (const V of m.paths) {
2197
+ const B = (G = V.userData) == null ? void 0 : G.node, w = pr(B);
2198
+ if (w != null && w.toLowerCase().startsWith("route-path") || w && (cn(w) || sn(w)) || w && (e != null && e.has(w)) || Bt(B) && !w || w && (Zt(w) || Ft(w)) || B && Bt(B) && w && (e != null && e.has(w)) || B && Bt(B)) continue;
2199
+ const L = kt.createShapes(V);
2200
+ if (L.length === 0) continue;
2201
+ const M = Me(w, d), U = Mt(M == null ? void 0 : M.fill), c = Mt(M == null ? void 0 : M.stroke), p = new rt.Color();
2202
+ M != null && M.fill && !U ? p.set(M.fill) : V.color && !U ? p.copy(V.color) : p.set("#cccccc"), M != null && M.stroke && !M.fill && !c && p.set(M.stroke);
2203
+ const I = U || c && !(M != null && M.fill) ? 0 : typeof ((Z = (k = V.userData) == null ? void 0 : k.style) == null ? void 0 : Z.opacity) == "number" ? V.userData.style.opacity : 1, u = a && (M == null ? void 0 : M.extrudeHeight) != null ? M.extrudeHeight : 0;
2204
+ x.push({
2205
+ key: `${w ?? "path"}-${z++}`,
2206
+ shapes: L,
2207
+ color: p,
2208
+ opacity: I,
2209
+ extrude: u,
2210
+ renderOrder: (M == null ? void 0 : M.renderOrder) ?? 2
1455
2211
  });
1456
2212
  }
1457
- return W;
1458
- }, [N, i, I]);
1459
- return !N || B.length === 0 ? null : /* @__PURE__ */ R("group", { position: [0, 0, Lt], renderOrder: -20, children: B.map(
1460
- (W) => W.shapes.map((p, k) => /* @__PURE__ */ te("mesh", { renderOrder: W.renderOrder, children: [
1461
- W.extrude > 0 ? /* @__PURE__ */ R(
1462
- "extrudeGeometry",
1463
- {
1464
- args: [p, { depth: W.extrude, bevelEnabled: !1 }]
1465
- }
1466
- ) : /* @__PURE__ */ R("shapeGeometry", { args: [p] }),
1467
- /* @__PURE__ */ R(
1468
- "meshBasicMaterial",
1469
- {
1470
- color: W.color,
1471
- transparent: W.opacity < 1,
1472
- opacity: W.opacity,
1473
- depthWrite: !1,
1474
- toneMapped: !1,
1475
- side: ue.DoubleSide
1476
- }
1477
- )
1478
- ] }, `${W.key}-${k}`))
2213
+ return x;
2214
+ }, [m, e, a, d]);
2215
+ return !m || Q.length === 0 ? null : /* @__PURE__ */ T("group", { position: [0, 0, mr], renderOrder: -20, children: Q.map(
2216
+ (x) => x.shapes.map((z, G) => /* @__PURE__ */ ct(
2217
+ "mesh",
2218
+ {
2219
+ renderOrder: x.renderOrder,
2220
+ raycast: () => {
2221
+ },
2222
+ children: [
2223
+ x.extrude > 0 ? /* @__PURE__ */ T(
2224
+ "extrudeGeometry",
2225
+ {
2226
+ args: [z, { depth: x.extrude, bevelEnabled: !1 }]
2227
+ }
2228
+ ) : /* @__PURE__ */ T("shapeGeometry", { args: [z] }),
2229
+ /* @__PURE__ */ T(
2230
+ "meshBasicMaterial",
2231
+ {
2232
+ color: x.color,
2233
+ transparent: x.opacity < 1,
2234
+ opacity: x.opacity,
2235
+ depthWrite: !1,
2236
+ toneMapped: !1,
2237
+ side: rt.DoubleSide
2238
+ }
2239
+ )
2240
+ ]
2241
+ },
2242
+ `${x.key}-${G}`
2243
+ ))
1479
2244
  ) });
1480
2245
  }
1481
- const Gt = [1, -1, 1];
1482
- function zt(l) {
2246
+ const gr = [1, -1, 1];
2247
+ function Ne(t) {
2248
+ return {
2249
+ ...t,
2250
+ minY: -t.maxY,
2251
+ maxY: -t.minY,
2252
+ cy: -t.cy
2253
+ };
2254
+ }
2255
+ function Nt(t, e, s, a) {
2256
+ const d = Math.max(t, 1) / Math.max(s, 1), m = Math.max(e, 1) / Math.max(a, 1);
2257
+ return Math.min(d, m);
2258
+ }
2259
+ function Et(t) {
1483
2260
  return {
1484
- ...l,
1485
- minY: -l.maxY,
1486
- maxY: -l.minY,
1487
- cy: -l.cy
2261
+ width: Math.max(t.maxX - t.minX, 1),
2262
+ height: Math.max(t.maxY - t.minY, 1)
1488
2263
  };
1489
2264
  }
1490
- function ze(l, i, M, I) {
1491
- const N = Math.max(l, 1) / Math.max(M, 1), h = Math.max(i, 1) / Math.max(I, 1);
1492
- return Math.min(N, h);
2265
+ const he = 240, Ar = 400, Tt = 1, xr = 2, vr = 400, Ee = 80, ke = 52, Te = 8, Mr = 14, br = 16;
2266
+ function Cr(t, e, s = Tt, a = Ee, d = xr, m = vr) {
2267
+ const b = Math.max(t, e);
2268
+ if (b <= a) return s;
2269
+ const Q = Math.max(m - a, 1), x = Math.min(1, (b - a) / Q);
2270
+ return s + (d - s) * x;
1493
2271
  }
1494
- function Ve(l) {
2272
+ function wr(t, e = Tt, s = ke) {
2273
+ const a = t.maxX - t.minX, d = t.maxY - t.minY, m = Math.max(a, s), b = Math.max(d, s), Q = Cr(a, d, e), x = (m + m * Q) / 2, z = (b + b * Q) / 2;
1495
2274
  return {
1496
- width: Math.max(l.maxX - l.minX, 1),
1497
- height: Math.max(l.maxY - l.minY, 1)
2275
+ minX: t.cx - x,
2276
+ minY: t.cy - z,
2277
+ maxX: t.cx + x,
2278
+ maxY: t.cy + z,
2279
+ cx: t.cx,
2280
+ cy: t.cy,
2281
+ size: Math.max(x, z) * 2
1498
2282
  };
1499
2283
  }
1500
- const Vt = 240;
1501
- function Ft(l) {
1502
- return 1 - (1 - Math.min(1, Math.max(0, l))) ** 3;
2284
+ function Or(t, e, s = Te, a = Mr) {
2285
+ const d = Math.max(t, e), m = Ee * (1 + Tt);
2286
+ if (d >= m) return s;
2287
+ const b = ke * (1 + Tt);
2288
+ if (d <= b) return a;
2289
+ const Q = Math.max(m - b, 1), x = (d - b) / Q;
2290
+ return a + (s - a) * x;
1503
2291
  }
1504
- function jt(l, i, M) {
1505
- return l + (i - l) * M;
2292
+ function Ir(t, e, s = Te) {
2293
+ const a = Math.max(e, 1e-3) * s;
2294
+ return Math.min(t, a);
1506
2295
  }
1507
- function Ht(l, i, M, I, N) {
1508
- const h = 1 + Math.min(Math.max(M, 0.15), 1) * 0.5, B = i > 0 ? l * h : l / h;
1509
- return Math.min(N, Math.max(I, B));
2296
+ function Lr(t) {
2297
+ const e = [...new Set(t.filter((s) => Number.isFinite(s)))].sort(
2298
+ (s, a) => s - a
2299
+ );
2300
+ return e.length > 0 ? e.join(",") : null;
1510
2301
  }
1511
- const Ut = 0, Fe = 1, ve = 2, Wt = 0, qt = 1, je = 2;
1512
- function Xt(l) {
1513
- return l ? { LEFT: Ut, MIDDLE: Fe, RIGHT: ve } : { LEFT: ve, MIDDLE: Fe, RIGHT: ve };
2302
+ function Ut(t, e) {
2303
+ const s = new Set(e);
2304
+ if (s.size === 0) return null;
2305
+ let a = null;
2306
+ for (const d of t)
2307
+ for (const m of d.shapes) {
2308
+ if (!s.has(m.id)) continue;
2309
+ const b = an(m.bbox, d.transform);
2310
+ a = a ? ln(a, b) : b;
2311
+ }
2312
+ return a ? Ne(wr(a)) : null;
1514
2313
  }
1515
- function Yt(l) {
1516
- return l ? { ONE: Wt, TWO: je } : { ONE: qt, TWO: je };
2314
+ function Nr(t, e) {
2315
+ return Ut(t, [e]);
1517
2316
  }
1518
- function $t({
1519
- bounds: l,
1520
- theme: i,
1521
- is3d: M,
1522
- controlsRef: I,
1523
- cameraRef: N
2317
+ function qt(t) {
2318
+ return 1 - (1 - Math.min(1, Math.max(0, t))) ** 3;
2319
+ }
2320
+ function At(t, e, s) {
2321
+ return t + (e - t) * s;
2322
+ }
2323
+ function me(t, e, s, a = qt) {
2324
+ const d = a(s);
2325
+ return {
2326
+ zoom: At(t.zoom, e.zoom, d),
2327
+ position: [
2328
+ At(t.position[0], e.position[0], d),
2329
+ At(t.position[1], e.position[1], d),
2330
+ At(t.position[2], e.position[2], d)
2331
+ ],
2332
+ target: [
2333
+ At(t.target[0], e.target[0], d),
2334
+ At(t.target[1], e.target[1], d),
2335
+ At(t.target[2], e.target[2], d)
2336
+ ]
2337
+ };
2338
+ }
2339
+ function pe(t, e, s = 1e-3) {
2340
+ return Math.abs(t.zoom - e.zoom) < s && Math.abs(t.position[0] - e.position[0]) < s && Math.abs(t.position[1] - e.position[1]) < s && Math.abs(t.position[2] - e.position[2]) < s && Math.abs(t.target[0] - e.target[0]) < s && Math.abs(t.target[1] - e.target[1]) < s && Math.abs(t.target[2] - e.target[2]) < s;
2341
+ }
2342
+ function Er(t, e, s, a, d) {
2343
+ const m = 1 + Math.min(Math.max(s, 0.15), 1) * 0.5, b = e > 0 ? t * m : t / m;
2344
+ return Math.min(d, Math.max(a, b));
2345
+ }
2346
+ const kr = 0, ye = 1, Ht = 2, Tr = 0, Sr = 1, ge = 2, zr = !0;
2347
+ function Pr(t) {
2348
+ return t ? { LEFT: kr, MIDDLE: ye, RIGHT: Ht } : { LEFT: Ht, MIDDLE: ye, RIGHT: Ht };
2349
+ }
2350
+ function Rr(t) {
2351
+ return t ? { ONE: Tr, TWO: ge } : { ONE: Sr, TWO: ge };
2352
+ }
2353
+ function Gr(t, e) {
2354
+ return [
2355
+ t.cx,
2356
+ t.cy,
2357
+ t.minX,
2358
+ t.minY,
2359
+ t.maxX,
2360
+ t.maxY,
2361
+ t.size,
2362
+ e ? "3d" : "2d"
2363
+ ].join("|");
2364
+ }
2365
+ function Vr({
2366
+ bounds: t,
2367
+ theme: e,
2368
+ is3d: s,
2369
+ controlsRef: a,
2370
+ cameraRef: d,
2371
+ persistedViewRef: m,
2372
+ focusKey: b = null,
2373
+ focusViewBounds: Q = null
1524
2374
  }) {
1525
- const { camera: h, size: B, invalidate: W } = ht(), p = he(!1), k = he(null), z = be(() => {
1526
- k.current != null && (cancelAnimationFrame(k.current), k.current = null);
1527
- }, []), O = be(
1528
- (g) => {
1529
- if (!(h instanceof ue.OrthographicCamera)) return;
1530
- z();
1531
- const u = h.zoom;
1532
- if (u === g) return;
1533
- const E = performance.now(), y = (m) => {
1534
- if (!(h instanceof ue.OrthographicCamera)) return;
1535
- const v = Math.min(1, (m - E) / Vt);
1536
- if (h.zoom = jt(u, g, Ft(v)), h.updateProjectionMatrix(), W(), v < 1) {
1537
- k.current = requestAnimationFrame(y);
2375
+ const { camera: x, size: z, invalidate: G } = gn(), k = at(!1), Z = at(!1), V = at(null), B = at(null), w = at(b);
2376
+ w.current = b;
2377
+ const L = at(Q);
2378
+ L.current = Q;
2379
+ const M = at(null), U = Gr(t, s), c = mt(() => {
2380
+ V.current != null && (cancelAnimationFrame(V.current), V.current = null);
2381
+ }, []), p = mt(
2382
+ (l = k.current) => {
2383
+ const H = a.current;
2384
+ return {
2385
+ is3d: s,
2386
+ boundsKey: U,
2387
+ zoom: x instanceof rt.OrthographicCamera ? x.zoom : 1,
2388
+ position: [x.position.x, x.position.y, x.position.z],
2389
+ target: H ? [H.target.x, H.target.y, H.target.z] : [t.cx, t.cy, 0],
2390
+ userAdjusted: l,
2391
+ focusKey: w.current
2392
+ };
2393
+ },
2394
+ [t.cx, t.cy, U, x, a, s]
2395
+ ), I = mt(
2396
+ (l) => {
2397
+ Z.current = !0, c(), x.up.set(0, 1, 0), x.position.set(l.position[0], l.position[1], l.position[2]), x instanceof rt.OrthographicCamera ? (x.zoom = l.zoom, x.updateProjectionMatrix()) : x.lookAt(l.target[0], l.target[1], l.target[2]);
2398
+ const H = a.current;
2399
+ H && (H.target.set(l.target[0], l.target[1], l.target[2]), H.update()), m.current = { ...l, boundsKey: U, is3d: s }, k.current = l.userAdjusted, G(), Z.current = !1;
2400
+ },
2401
+ [U, x, c, a, G, s, m]
2402
+ ), u = mt(
2403
+ (l) => {
2404
+ if (!(x instanceof rt.OrthographicCamera)) return;
2405
+ c();
2406
+ const H = x.zoom;
2407
+ if (H === l) return;
2408
+ const _ = performance.now(), et = (st) => {
2409
+ if (!(x instanceof rt.OrthographicCamera)) return;
2410
+ const ut = Math.min(1, (st - _) / he);
2411
+ if (x.zoom = At(H, l, qt(ut)), x.updateProjectionMatrix(), m.current = p(), G(), ut < 1) {
2412
+ V.current = requestAnimationFrame(et);
1538
2413
  return;
1539
2414
  }
1540
- k.current = null;
2415
+ V.current = null;
2416
+ };
2417
+ V.current = requestAnimationFrame(et);
2418
+ },
2419
+ [x, c, p, G, m]
2420
+ ), N = mt(() => {
2421
+ const l = a.current;
2422
+ return {
2423
+ zoom: x instanceof rt.OrthographicCamera ? x.zoom : 1,
2424
+ position: [x.position.x, x.position.y, x.position.z],
2425
+ target: l ? [l.target.x, l.target.y, l.target.z] : [t.cx, t.cy, 0]
2426
+ };
2427
+ }, [t.cx, t.cy, x, a]), O = mt(() => {
2428
+ const { width: l, height: H } = Et(t);
2429
+ return x instanceof rt.OrthographicCamera && !s ? {
2430
+ zoom: Nt(z.width, z.height, l, H),
2431
+ position: [t.cx, t.cy, 500],
2432
+ target: [t.cx, t.cy, 0]
2433
+ } : {
2434
+ zoom: x instanceof rt.OrthographicCamera ? x.zoom : 1,
2435
+ position: [t.cx, t.cy - t.size * 0.35, t.size * 0.85],
2436
+ target: [t.cx, t.cy, 0]
2437
+ };
2438
+ }, [t, x, s, z.height, z.width]), D = mt(
2439
+ (l, H) => {
2440
+ Z.current = !0, x.up.set(0, 1, 0), x.position.set(l.position[0], l.position[1], l.position[2]), x instanceof rt.OrthographicCamera && (x.zoom = l.zoom, x.updateProjectionMatrix()), H && x.lookAt(l.target[0], l.target[1], l.target[2]);
2441
+ const _ = a.current;
2442
+ _ && (_.target.set(l.target[0], l.target[1], l.target[2]), _.update()), G(), Z.current = !1;
2443
+ },
2444
+ [x, a, G]
2445
+ ), Y = mt(
2446
+ (l) => {
2447
+ const { width: H, height: _ } = Et(l);
2448
+ if (x instanceof rt.OrthographicCamera && !s) {
2449
+ const st = Et(t), ut = Nt(
2450
+ z.width,
2451
+ z.height,
2452
+ st.width,
2453
+ st.height
2454
+ );
2455
+ return {
2456
+ zoom: Ir(
2457
+ Nt(z.width, z.height, H, _),
2458
+ ut,
2459
+ Or(H, _)
2460
+ ),
2461
+ position: [l.cx, l.cy, 500],
2462
+ target: [l.cx, l.cy, 0]
2463
+ };
2464
+ }
2465
+ const et = Math.max(l.size, 1);
2466
+ return {
2467
+ zoom: x instanceof rt.OrthographicCamera ? x.zoom : 1,
2468
+ position: [l.cx, l.cy - et * 0.35, et * 0.85],
2469
+ target: [l.cx, l.cy, 0]
1541
2470
  };
1542
- k.current = requestAnimationFrame(y);
1543
2471
  },
1544
- [h, z, W]
1545
- ), C = be(() => {
1546
- z();
1547
- const g = I.current, { width: u, height: E } = Ve(l);
1548
- if (h.up.set(0, 1, 0), h instanceof ue.OrthographicCamera && !M) {
1549
- const y = ze(B.width, B.height, u, E);
1550
- h.position.set(l.cx, l.cy, 500), h.zoom = y, h.updateProjectionMatrix();
1551
- } else
1552
- h.position.set(l.cx, l.cy - l.size * 0.35, l.size * 0.85), h.lookAt(l.cx, l.cy, 0);
1553
- g && (g.target.set(l.cx, l.cy, 0), g.update()), W();
2472
+ [t, x, s, z.height, z.width]
2473
+ ), tt = mt(() => {
2474
+ c(), M.current = null, D(O(), s), m.current = p(!1);
2475
+ }, [D, c, p, O, s, m]), F = mt(
2476
+ (l) => {
2477
+ const H = Y(l), _ = N();
2478
+ if (k.current = !0, B.current = w.current, c(), pe(_, H)) {
2479
+ M.current = null, m.current = p(!0);
2480
+ return;
2481
+ }
2482
+ M.current = {
2483
+ from: _,
2484
+ dest: H,
2485
+ started: performance.now(),
2486
+ lookAt: s
2487
+ }, Z.current = !0, G();
2488
+ },
2489
+ [
2490
+ c,
2491
+ p,
2492
+ N,
2493
+ G,
2494
+ s,
2495
+ m,
2496
+ Y
2497
+ ]
2498
+ ), J = mt(() => {
2499
+ const l = O(), H = N();
2500
+ if (M.current = null, pe(H, l)) {
2501
+ k.current = !1, m.current = p(!1);
2502
+ return;
2503
+ }
2504
+ c();
2505
+ const _ = performance.now(), et = s, st = (ut) => {
2506
+ const h = Math.min(1, (ut - _) / he);
2507
+ if (D(me(H, l, h), et), m.current = p(!1), h < 1) {
2508
+ Z.current = !0, V.current = requestAnimationFrame(st);
2509
+ return;
2510
+ }
2511
+ V.current = null, k.current = !1, Z.current = !1;
2512
+ };
2513
+ Z.current = !0, V.current = requestAnimationFrame(st);
1554
2514
  }, [
1555
- l.cx,
1556
- l.cy,
1557
- l.maxX,
1558
- l.maxY,
1559
- l.minX,
1560
- l.minY,
1561
- l.size,
1562
- h,
1563
- I,
1564
- W,
1565
- M,
1566
- B.height,
1567
- B.width,
1568
- z
1569
- ]), V = he(C);
1570
- V.current = C;
1571
- const P = be(
1572
- (g) => {
1573
- p.current = !0;
1574
- const u = I.current;
1575
- if (h instanceof ue.OrthographicCamera && !M) {
1576
- const { width: E, height: y } = Ve(l), m = ze(B.width, B.height, E, y);
1577
- O(
1578
- Ht(
1579
- h.zoom,
1580
- g,
1581
- i.ZOOM_STEP,
1582
- m * 0.2,
1583
- m * 10
2515
+ D,
2516
+ c,
2517
+ p,
2518
+ N,
2519
+ O,
2520
+ s,
2521
+ m
2522
+ ]), E = at(tt);
2523
+ E.current = tt;
2524
+ const q = at(I);
2525
+ q.current = I;
2526
+ const $ = at(F);
2527
+ $.current = F;
2528
+ const K = mt(
2529
+ (l) => {
2530
+ k.current = !0, M.current = null;
2531
+ const H = a.current;
2532
+ if (x instanceof rt.OrthographicCamera && !s) {
2533
+ const { width: _, height: et } = Et(t), st = Nt(z.width, z.height, _, et);
2534
+ u(
2535
+ Er(
2536
+ x.zoom,
2537
+ l,
2538
+ e.ZOOM_STEP,
2539
+ st * 0.2,
2540
+ st * br
1584
2541
  )
1585
2542
  );
1586
- } else if (u) {
1587
- const E = h.position.clone().sub(u.target), y = 1 + Math.min(Math.max(i.ZOOM_STEP, 0.15), 1) * 0.5, m = g > 0 ? E.length() / y : E.length() * y;
1588
- E.setLength(
1589
- Math.min(i.CAMERA_MAX_DISTANCE, Math.max(i.CAMERA_MIN_DISTANCE, m))
1590
- ), h.position.copy(u.target).add(E);
2543
+ } else if (H) {
2544
+ const _ = x.position.clone().sub(H.target), et = 1 + Math.min(Math.max(e.ZOOM_STEP, 0.15), 1) * 0.5, st = l > 0 ? _.length() / et : _.length() * et;
2545
+ _.setLength(
2546
+ Math.min(e.CAMERA_MAX_DISTANCE, Math.max(e.CAMERA_MIN_DISTANCE, st))
2547
+ ), x.position.copy(H.target).add(_), m.current = p();
1591
2548
  }
1592
- u == null || u.update(), W();
2549
+ H == null || H.update(), G();
1593
2550
  },
1594
- [O, l, h, I, W, M, B.height, B.width, i]
2551
+ [
2552
+ u,
2553
+ t,
2554
+ x,
2555
+ p,
2556
+ a,
2557
+ G,
2558
+ s,
2559
+ m,
2560
+ z.height,
2561
+ z.width,
2562
+ e
2563
+ ]
1595
2564
  );
1596
- return le(() => () => z(), [z]), $e(
1597
- N,
2565
+ return lt(() => () => c(), [c]), lt(() => {
2566
+ const l = a.current;
2567
+ if (!l) return;
2568
+ const H = () => {
2569
+ Z.current || (k.current = !0, m.current = p(!0));
2570
+ }, _ = () => {
2571
+ Z.current || (k.current = !0, M.current = null, m.current = p(!0));
2572
+ };
2573
+ return l.addEventListener("change", H), l.addEventListener("start", _), () => {
2574
+ l.removeEventListener("change", H), l.removeEventListener("start", _);
2575
+ };
2576
+ }, [x, p, a, m]), Ge(
2577
+ d,
1598
2578
  () => ({
1599
- zoomIn: () => P(1),
1600
- zoomOut: () => P(-1),
2579
+ zoomIn: () => {
2580
+ K(1);
2581
+ },
2582
+ zoomOut: () => {
2583
+ K(-1);
2584
+ },
1601
2585
  reset: () => {
1602
- p.current = !1, C();
2586
+ k.current = !1, M.current = null, B.current = null, w.current = null, J();
2587
+ },
2588
+ focusBounds: (l) => {
2589
+ F(l);
1603
2590
  }
1604
2591
  }),
1605
- [C, P]
1606
- ), le(() => {
1607
- B.width < 2 || B.height < 2 || (p.current = !1, V.current());
1608
- }, [l.cx, l.cy, l.maxX, l.maxY, l.minX, l.minY, M]), le(() => {
1609
- B.width < 2 || B.height < 2 || p.current || V.current();
1610
- }, [B.height, B.width]), null;
1611
- }
1612
- const Zt = -1, He = [0, 1, 0], Qt = [1, 2], Kt = { antialias: !0 };
1613
- function Jt({
1614
- doc: l,
1615
- theme: i,
1616
- activeLevelId: M,
1617
- route: I,
1618
- selectedRetailerId: N,
1619
- cameraRef: h,
1620
- onSelectShape: B,
1621
- imageProxyUrl: W,
1622
- eventSource: p
2592
+ [F, J, K]
2593
+ ), Ve(() => {
2594
+ if (z.width < 2 || z.height < 2) return;
2595
+ b == null && (B.current = null, M.current = null);
2596
+ const l = m.current, H = L.current, _ = b != null && H != null && B.current !== b, et = l != null && l.is3d === s && l.boundsKey === U && l.focusKey === b;
2597
+ if (b != null && H != null) {
2598
+ if (et) {
2599
+ B.current = b, M.current == null && q.current(l);
2600
+ return;
2601
+ }
2602
+ if (_) {
2603
+ if (m.current == null) {
2604
+ B.current = b, k.current = !0, c(), D(Y(H), s), m.current = p(!0);
2605
+ return;
2606
+ }
2607
+ l && !et && q.current(l), $.current(H);
2608
+ return;
2609
+ }
2610
+ return;
2611
+ }
2612
+ if (l && l.is3d === s && l.boundsKey === U) {
2613
+ q.current(l);
2614
+ return;
2615
+ }
2616
+ k.current = !1, E.current();
2617
+ }, [
2618
+ D,
2619
+ U,
2620
+ x,
2621
+ c,
2622
+ p,
2623
+ b,
2624
+ s,
2625
+ m,
2626
+ Y
2627
+ ]), lt(() => {
2628
+ z.width < 2 || z.height < 2 || k.current || E.current();
2629
+ }, [z.height, z.width]), An(() => {
2630
+ const l = M.current;
2631
+ if (!l) return;
2632
+ const H = Math.min(1, (performance.now() - l.started) / Ar);
2633
+ if (D(
2634
+ me(l.from, l.dest, H, qt),
2635
+ l.lookAt
2636
+ ), m.current = p(!0), H < 1) {
2637
+ G();
2638
+ return;
2639
+ }
2640
+ M.current = null;
2641
+ }), null;
2642
+ }
2643
+ const Wr = -1, Ae = [0, 1, 0], Dr = [1, 2], Br = { antialias: !0 };
2644
+ function Hr({
2645
+ doc: t,
2646
+ theme: e,
2647
+ activeLevelId: s,
2648
+ route: a,
2649
+ selectedShapeId: d,
2650
+ selectedShapeIds: m,
2651
+ hoveredShapeId: b = null,
2652
+ focusKey: Q,
2653
+ focusViewBounds: x,
2654
+ cameraRef: z,
2655
+ onSelectShape: G,
2656
+ imageProxyUrl: k,
2657
+ eventSource: Z
1623
2658
  }) {
1624
- const k = i.MAP_STYLE === "3D", z = he(null), O = re(
1625
- () => at(l.levels, M),
1626
- [l.levels, M]
1627
- ), C = re(
1628
- () => ct(l.levels, M, l.baseViewbox),
1629
- [l.levels, l.baseViewbox, M]
1630
- ), V = re(
1631
- () => zt(C),
2659
+ const V = e.MAP_STYLE === "3D", B = at(null), w = at(null), L = at(null), M = ot(
2660
+ () => un(t.levels, s),
2661
+ [t.levels, s]
2662
+ ), U = ot(
2663
+ () => fn(t.levels, s, t.baseViewbox),
2664
+ [t.levels, t.baseViewbox, s]
2665
+ ), c = ot(
2666
+ () => Ne(U),
1632
2667
  [
1633
- C.cx,
1634
- C.cy,
1635
- C.maxX,
1636
- C.maxY,
1637
- C.minX,
1638
- C.minY,
1639
- C.size
2668
+ U.cx,
2669
+ U.cy,
2670
+ U.maxX,
2671
+ U.maxY,
2672
+ U.minX,
2673
+ U.minY,
2674
+ U.size
1640
2675
  ]
1641
- ), P = re(
1642
- () => [V.cx, V.cy, 500],
1643
- [V.cx, V.cy]
1644
- ), g = re(
1645
- () => [V.cx, V.cy, 0],
1646
- [V.cx, V.cy]
1647
- ), u = re(
1648
- () => [V.cx, V.cy - V.size * 0.35, V.size * 0.85],
1649
- [V.cx, V.cy, V.size]
1650
- ), E = re(() => Xt(k), [k]), y = re(() => Yt(k), [k]), m = re(
1651
- () => l.levels.find((w) => Ne(w)) ?? null,
1652
- [l.levels]
1653
- ), v = (m == null ? void 0 : m.sourceSvgUrl) ?? l.baseSvgUrl ?? null, U = re(() => m ? lt(m.shapes, { omitStaticLayers: !0 }) : /* @__PURE__ */ new Set(), [m]), d = O.some((w) => Ne(w));
1654
- return /* @__PURE__ */ te(
1655
- dt,
2676
+ ), p = ot(
2677
+ () => [c.cx, c.cy, 500],
2678
+ [c.cx, c.cy]
2679
+ ), I = ot(
2680
+ () => [c.cx, c.cy - c.size * 0.35, c.size * 0.85],
2681
+ [c.cx, c.cy, c.size]
2682
+ ), u = ot(() => Pr(V), [V]), N = ot(() => Rr(V), [V]), O = ot(
2683
+ () => t.levels.find((J) => Pt(J)) ?? null,
2684
+ [t.levels]
2685
+ ), D = (O == null ? void 0 : O.sourceSvgUrl) ?? t.baseSvgUrl ?? null, Y = ot(
2686
+ () => dn(t.levels),
2687
+ [t.levels]
2688
+ ), tt = M.some((J) => Pt(J)), F = ot(
2689
+ () => ({
2690
+ GREEN_AREA_COLOR: e.GREEN_AREA_COLOR,
2691
+ WATER_COLOR: e.WATER_COLOR,
2692
+ PARKING_LANE_COLOR: e.PARKING_LANE_COLOR,
2693
+ PARKING_ICON_COLOR: e.PARKING_ICON_COLOR,
2694
+ WALKABLE_COLOR: e.WALKABLE_COLOR
2695
+ }),
2696
+ [
2697
+ e.GREEN_AREA_COLOR,
2698
+ e.PARKING_ICON_COLOR,
2699
+ e.PARKING_LANE_COLOR,
2700
+ e.WALKABLE_COLOR,
2701
+ e.WATER_COLOR
2702
+ ]
2703
+ );
2704
+ return /* @__PURE__ */ ct(
2705
+ xn,
1656
2706
  {
1657
- style: { width: "100%", height: "100%", background: i.MAP_BACKGROUND_COLOR },
1658
- eventSource: p ?? void 0,
2707
+ style: {
2708
+ width: "100%",
2709
+ height: "100%",
2710
+ background: Mt(e.MAP_BACKGROUND_COLOR) ? "transparent" : e.MAP_BACKGROUND_COLOR
2711
+ },
2712
+ eventSource: Z,
1659
2713
  eventPrefix: "offset",
1660
- orthographic: !k,
1661
- dpr: Qt,
2714
+ orthographic: !V,
2715
+ frameloop: "demand",
2716
+ dpr: Dr,
1662
2717
  flat: !0,
1663
- gl: Kt,
1664
- camera: k ? {
1665
- position: u,
2718
+ gl: Br,
2719
+ onPointerDown: (J) => {
2720
+ L.current = { x: J.clientX, y: J.clientY };
2721
+ },
2722
+ onPointerMissed: (J) => {
2723
+ sr(L.current, {
2724
+ x: J.clientX,
2725
+ y: J.clientY,
2726
+ button: J.button
2727
+ }) && (G == null || G(null, s ?? 0));
2728
+ },
2729
+ camera: V ? {
2730
+ position: I,
1666
2731
  fov: 50,
1667
2732
  near: 1,
1668
2733
  far: 1e4,
1669
- up: He
2734
+ up: Ae
1670
2735
  } : void 0,
1671
2736
  children: [
1672
- !k && /* @__PURE__ */ R(
1673
- yt,
2737
+ !V && /* @__PURE__ */ T(
2738
+ vn,
1674
2739
  {
1675
2740
  makeDefault: !0,
1676
- position: P,
1677
- up: He,
2741
+ position: p,
2742
+ up: Ae,
1678
2743
  near: 0.1,
1679
2744
  far: 5e3
1680
2745
  }
1681
2746
  ),
1682
- /* @__PURE__ */ R("color", { attach: "background", args: [i.MAP_BACKGROUND_COLOR] }),
1683
- /* @__PURE__ */ R("ambientLight", { intensity: 4, color: "#c4c4c4" }),
1684
- /* @__PURE__ */ R("directionalLight", { position: [0, 400, 0], color: "#ffffff", intensity: 0.3 }),
1685
- /* @__PURE__ */ R("directionalLight", { position: [0, 0, 400], color: "#c4c4c4", intensity: 0.2 }),
1686
- /* @__PURE__ */ R("directionalLight", { position: [0, 0, -400], color: "#c4c4c4", intensity: 0.2 }),
1687
- /* @__PURE__ */ te("group", { scale: Gt, children: [
1688
- d && v ? /* @__PURE__ */ R(
1689
- Dt,
2747
+ Mt(e.MAP_BACKGROUND_COLOR) ? null : /* @__PURE__ */ T("color", { attach: "background", args: [e.MAP_BACKGROUND_COLOR] }),
2748
+ /* @__PURE__ */ T("ambientLight", { intensity: 4, color: "#c4c4c4" }),
2749
+ /* @__PURE__ */ T("directionalLight", { position: [0, 400, 0], color: "#ffffff", intensity: 0.3 }),
2750
+ /* @__PURE__ */ T("directionalLight", { position: [0, 0, 400], color: "#c4c4c4", intensity: 0.2 }),
2751
+ /* @__PURE__ */ T("directionalLight", { position: [0, 0, -400], color: "#c4c4c4", intensity: 0.2 }),
2752
+ /* @__PURE__ */ ct("group", { scale: gr, children: [
2753
+ tt && D ? /* @__PURE__ */ T(
2754
+ yr,
1690
2755
  {
1691
- url: v,
1692
- suppressIds: U,
1693
- imageProxyUrl: W,
1694
- is3d: k
2756
+ url: D,
2757
+ suppressIds: Y,
2758
+ imageProxyUrl: k,
2759
+ is3d: V,
2760
+ theme: F
1695
2761
  }
1696
2762
  ) : null,
1697
- O.map((w) => {
1698
- const T = Ne(w), _ = w.transform;
1699
- return /* @__PURE__ */ R(
2763
+ M.map((J) => {
2764
+ const E = Pt(J), q = J.transform;
2765
+ return /* @__PURE__ */ T(
1700
2766
  "group",
1701
2767
  {
1702
2768
  position: [
1703
- _.translateX,
1704
- _.translateY,
1705
- T ? Zt : 0
2769
+ q.translateX,
2770
+ q.translateY,
2771
+ E ? Wr : 0
1706
2772
  ],
1707
- rotation: [0, 0, _.rotate * Math.PI / 180],
1708
- scale: _.scale || 1,
1709
- children: /* @__PURE__ */ R(
1710
- _t,
2773
+ rotation: [0, 0, q.rotate * Math.PI / 180],
2774
+ scale: q.scale || 1,
2775
+ children: /* @__PURE__ */ T(
2776
+ ur,
1711
2777
  {
1712
- level: w,
1713
- theme: i,
1714
- is3d: k,
1715
- selectedRetailerId: N,
1716
- interactiveOnly: T && !!v,
1717
- onSelectShape: (q) => B == null ? void 0 : B(q, w.id)
2778
+ level: J,
2779
+ theme: e,
2780
+ is3d: V,
2781
+ eventSource: Z,
2782
+ selectedShapeIds: m,
2783
+ hoveredShapeId: b,
2784
+ interactiveOnly: E && !!D,
2785
+ imageProxyUrl: k,
2786
+ amenities: t.amenities,
2787
+ onSelectShape: ($, K) => G == null ? void 0 : G($, J.id, K)
1718
2788
  }
1719
2789
  )
1720
2790
  },
1721
- w.id
2791
+ J.id
1722
2792
  );
1723
2793
  }),
1724
- I && /* @__PURE__ */ R(
1725
- Pt,
2794
+ a && /* @__PURE__ */ T(
2795
+ dr,
1726
2796
  {
1727
- route: I,
1728
- activeLevelId: M,
1729
- color: i.ACCENT_COLOR
2797
+ route: a,
2798
+ activeLevelId: s,
2799
+ color: e.ACCENT_COLOR
1730
2800
  }
1731
2801
  )
1732
2802
  ] }),
1733
- /* @__PURE__ */ R(
1734
- gt,
2803
+ /* @__PURE__ */ T(
2804
+ Mn,
1735
2805
  {
1736
- ref: z,
2806
+ ref: B,
1737
2807
  makeDefault: !0,
1738
2808
  enableDamping: !1,
1739
- enableRotate: k,
2809
+ enableRotate: V,
1740
2810
  enablePan: !0,
2811
+ enableZoom: !0,
1741
2812
  screenSpacePanning: !0,
1742
- mouseButtons: E,
1743
- touches: y,
1744
- target: g,
1745
- maxDistance: i.CAMERA_MAX_DISTANCE,
1746
- minDistance: i.CAMERA_MIN_DISTANCE
2813
+ zoomSpeed: 1,
2814
+ zoomToCursor: zr,
2815
+ mouseButtons: u,
2816
+ touches: N,
2817
+ maxDistance: e.CAMERA_MAX_DISTANCE,
2818
+ minDistance: e.CAMERA_MIN_DISTANCE
1747
2819
  }
1748
2820
  ),
1749
- /* @__PURE__ */ R(
1750
- $t,
2821
+ /* @__PURE__ */ T(
2822
+ Vr,
1751
2823
  {
1752
- bounds: V,
1753
- theme: i,
1754
- is3d: k,
1755
- controlsRef: z,
1756
- cameraRef: h
2824
+ bounds: c,
2825
+ theme: e,
2826
+ is3d: V,
2827
+ controlsRef: B,
2828
+ cameraRef: z,
2829
+ persistedViewRef: w,
2830
+ focusKey: Q ?? d ?? null,
2831
+ focusViewBounds: x ?? null
1757
2832
  }
1758
2833
  )
1759
2834
  ]
1760
2835
  }
1761
2836
  );
1762
2837
  }
1763
- function Ue(l, i) {
1764
- var M, I;
1765
- return ((M = l.assignment) == null ? void 0 : M.customLabel) || i || l.label.text || ((I = l.assignment) == null ? void 0 : I.unitNumber) || l.key;
1766
- }
1767
- function en({
1768
- doc: l,
1769
- amenities: i,
1770
- onActiveLevelChange: M,
1771
- fromAnchorId: I,
1772
- toAnchorId: N,
1773
- onFromChange: h,
1774
- onToChange: B,
1775
- accessibleOnly: W,
1776
- onAccessibleOnlyChange: p,
1777
- route: k,
1778
- showSearch: z = !0,
1779
- showAmenities: O = !0
2838
+ function xe(t, e) {
2839
+ var s, a;
2840
+ return ((s = t.assignment) == null ? void 0 : s.customLabel) || e || t.label.text || ((a = t.assignment) == null ? void 0 : a.unitNumber) || t.key;
2841
+ }
2842
+ function Zr({
2843
+ doc: t,
2844
+ amenities: e,
2845
+ onActiveLevelChange: s,
2846
+ fromAnchorId: a,
2847
+ toAnchorId: d,
2848
+ onFromChange: m,
2849
+ onToChange: b,
2850
+ accessibleOnly: Q,
2851
+ onAccessibleOnlyChange: x,
2852
+ route: z,
2853
+ showSearch: G = !0,
2854
+ showAmenities: k = !0
1780
2855
  }) {
1781
- const [C, V] = ae(""), [P, g] = ae(null), u = re(() => {
1782
- var w;
1783
- const d = [];
1784
- for (const T of l.levels)
1785
- for (const _ of T.shapes) {
1786
- const q = T.anchors.find((Y) => Y.shapeId === _.id) ?? null;
1787
- if (_.kind === "unit" && d.push({
1788
- id: `store-${_.id}`,
1789
- label: Ue(_),
1790
- group: T.name,
1791
- anchorId: (q == null ? void 0 : q.id) ?? null,
1792
- levelId: T.id,
2856
+ const [Z, V] = dt(""), [B, w] = dt(null), L = ot(() => {
2857
+ var N;
2858
+ const u = [];
2859
+ for (const O of t.levels)
2860
+ for (const D of O.shapes) {
2861
+ const Y = O.anchors.find((tt) => tt.shapeId === D.id) ?? null;
2862
+ if (D.kind === "unit" && u.push({
2863
+ id: `store-${D.id}`,
2864
+ label: xe(D),
2865
+ group: O.name,
2866
+ anchorId: (Y == null ? void 0 : Y.id) ?? null,
2867
+ levelId: O.id,
1793
2868
  kind: "store",
1794
2869
  amenityId: null
1795
- }), _.kind === "amenity" && ((w = _.assignment) != null && w.amenityId)) {
1796
- const Y = i.find((G) => G.id === _.assignment.amenityId);
1797
- d.push({
1798
- id: `amenity-${_.id}`,
1799
- label: Ue(_, Y == null ? void 0 : Y.name),
2870
+ }), D.kind === "amenity" && ((N = D.assignment) != null && N.amenityId)) {
2871
+ const tt = e.find((F) => F.id === D.assignment.amenityId);
2872
+ u.push({
2873
+ id: `amenity-${D.id}`,
2874
+ label: xe(D, tt == null ? void 0 : tt.name),
1800
2875
  group: "Amenities",
1801
- anchorId: (q == null ? void 0 : q.id) ?? null,
1802
- levelId: T.id,
2876
+ anchorId: (Y == null ? void 0 : Y.id) ?? null,
2877
+ levelId: O.id,
1803
2878
  kind: "amenity",
1804
- amenityId: (Y == null ? void 0 : Y.id) ?? _.assignment.amenityId
2879
+ amenityId: (tt == null ? void 0 : tt.id) ?? D.assignment.amenityId
1805
2880
  });
1806
2881
  }
1807
2882
  }
1808
- return d;
1809
- }, [l, i]), E = re(() => {
1810
- const d = C.trim().toLowerCase();
1811
- return d ? u.filter((w) => w.label.toLowerCase().includes(d)) : u;
1812
- }, [u, C]), y = re(() => {
1813
- const d = /* @__PURE__ */ new Map();
1814
- for (const w of E) {
1815
- const T = d.get(w.group) ?? [];
1816
- T.push(w), d.set(w.group, T);
2883
+ return u;
2884
+ }, [t, e]), M = ot(() => {
2885
+ const u = Z.trim().toLowerCase();
2886
+ return u ? L.filter((N) => N.label.toLowerCase().includes(u)) : L;
2887
+ }, [L, Z]), U = ot(() => {
2888
+ const u = /* @__PURE__ */ new Map();
2889
+ for (const N of M) {
2890
+ const O = u.get(N.group) ?? [];
2891
+ O.push(N), u.set(N.group, O);
1817
2892
  }
1818
- return Array.from(d.entries());
1819
- }, [E]), m = u.filter((d) => d.anchorId != null), v = C.trim().length > 0, U = (d) => {
1820
- g(d), d.anchorId != null && (B(d.anchorId), M(d.levelId));
2893
+ return Array.from(u.entries());
2894
+ }, [M]), c = L.filter((u) => u.anchorId != null), p = Z.trim().length > 0, I = (u) => {
2895
+ w(u), u.anchorId != null && (b(u.anchorId), s(u.levelId));
1821
2896
  };
1822
- return !z && !(O && i.length > 0) ? null : /* @__PURE__ */ te("div", { className: "eyeon-map-chrome", children: [
1823
- /* @__PURE__ */ te("div", { className: "eyeon-map-chrome__top", children: [
1824
- z && /* @__PURE__ */ R(
2897
+ return !G && !(k && e.length > 0) ? null : /* @__PURE__ */ ct("div", { className: "eyeon-map-chrome", children: [
2898
+ /* @__PURE__ */ ct("div", { className: "eyeon-map-chrome__top", children: [
2899
+ G && /* @__PURE__ */ T(
1825
2900
  "input",
1826
2901
  {
1827
2902
  type: "search",
1828
2903
  className: "eyeon-map-chrome__search-input",
1829
2904
  placeholder: "Search...",
1830
2905
  "aria-label": "Search...",
1831
- value: C,
1832
- onChange: (d) => V(d.target.value)
2906
+ value: Z,
2907
+ onChange: (u) => V(u.target.value)
1833
2908
  }
1834
2909
  ),
1835
- O && i.length > 0 && /* @__PURE__ */ R("div", { className: "eyeon-map-chrome__amenities", children: i.map((d) => /* @__PURE__ */ R(
2910
+ k && e.length > 0 && /* @__PURE__ */ T("div", { className: "eyeon-map-chrome__amenities", children: e.map((u) => /* @__PURE__ */ T(
1836
2911
  "button",
1837
2912
  {
1838
2913
  type: "button",
1839
2914
  className: "eyeon-map-chrome__amenity",
1840
- "aria-label": d.name,
2915
+ "aria-label": u.name,
1841
2916
  onClick: () => {
1842
- const w = u.find(
1843
- (T) => T.kind === "amenity" && T.amenityId === d.id && T.anchorId != null
2917
+ const N = L.find(
2918
+ (O) => O.kind === "amenity" && O.amenityId === u.id && O.anchorId != null
1844
2919
  );
1845
- w && U(w);
2920
+ N && I(N);
1846
2921
  },
1847
- children: d.builtinIcon ? /* @__PURE__ */ R("span", { className: "eyeon-map-chrome__amenity-icon", children: d.builtinIcon }) : /* @__PURE__ */ R("span", { className: "eyeon-map-chrome__amenity-label", children: d.name.slice(0, 2) })
2922
+ children: (() => {
2923
+ const N = we(u.code);
2924
+ return N ? /* @__PURE__ */ T(
2925
+ "span",
2926
+ {
2927
+ className: "eyeon-map-chrome__amenity-icon",
2928
+ dangerouslySetInnerHTML: {
2929
+ __html: Oe(N.svgCode, "#334155")
2930
+ }
2931
+ }
2932
+ ) : /* @__PURE__ */ T("span", { className: "eyeon-map-chrome__amenity-label", children: u.name.slice(0, 2) });
2933
+ })()
1848
2934
  },
1849
- d.id
2935
+ u.id
1850
2936
  )) })
1851
2937
  ] }),
1852
- z && v && /* @__PURE__ */ te("div", { className: "eyeon-map-chrome__panel", children: [
1853
- /* @__PURE__ */ R("div", { className: "eyeon-map-chrome__groups", children: y.length === 0 ? /* @__PURE__ */ R("div", { className: "eyeon-map-chrome__empty", children: "No matching stores" }) : y.map(([d, w]) => /* @__PURE__ */ te("div", { className: "eyeon-map-chrome__group", children: [
1854
- /* @__PURE__ */ R("div", { className: "eyeon-map-chrome__group-title", children: d }),
1855
- w.map((T) => /* @__PURE__ */ R(
2938
+ G && p && /* @__PURE__ */ ct("div", { className: "eyeon-map-chrome__panel", children: [
2939
+ /* @__PURE__ */ T("div", { className: "eyeon-map-chrome__groups", children: U.length === 0 ? /* @__PURE__ */ T("div", { className: "eyeon-map-chrome__empty", children: "No matching stores" }) : U.map(([u, N]) => /* @__PURE__ */ ct("div", { className: "eyeon-map-chrome__group", children: [
2940
+ /* @__PURE__ */ T("div", { className: "eyeon-map-chrome__group-title", children: u }),
2941
+ N.map((O) => /* @__PURE__ */ T(
1856
2942
  "button",
1857
2943
  {
1858
2944
  type: "button",
1859
- className: (P == null ? void 0 : P.id) === T.id ? "eyeon-map-chrome__item is-selected" : "eyeon-map-chrome__item",
1860
- onClick: () => U(T),
1861
- children: T.label
2945
+ className: (B == null ? void 0 : B.id) === O.id ? "eyeon-map-chrome__item is-selected" : "eyeon-map-chrome__item",
2946
+ onClick: () => I(O),
2947
+ children: O.label
1862
2948
  },
1863
- T.id
2949
+ O.id
1864
2950
  ))
1865
- ] }, d)) }),
1866
- P && /* @__PURE__ */ te("div", { className: "eyeon-map-chrome__detail", children: [
1867
- /* @__PURE__ */ R("div", { className: "eyeon-map-chrome__detail-title", children: P.label }),
1868
- /* @__PURE__ */ R("div", { className: "eyeon-map-chrome__detail-meta", children: P.group })
2951
+ ] }, u)) }),
2952
+ B && /* @__PURE__ */ ct("div", { className: "eyeon-map-chrome__detail", children: [
2953
+ /* @__PURE__ */ T("div", { className: "eyeon-map-chrome__detail-title", children: B.label }),
2954
+ /* @__PURE__ */ T("div", { className: "eyeon-map-chrome__detail-meta", children: B.group })
1869
2955
  ] }),
1870
- /* @__PURE__ */ te("div", { className: "eyeon-map-chrome__route", children: [
1871
- /* @__PURE__ */ te("label", { children: [
2956
+ /* @__PURE__ */ ct("div", { className: "eyeon-map-chrome__route", children: [
2957
+ /* @__PURE__ */ ct("label", { children: [
1872
2958
  "From",
1873
- /* @__PURE__ */ R(
1874
- Ge,
2959
+ /* @__PURE__ */ T(
2960
+ le,
1875
2961
  {
1876
2962
  ariaLabel: "From",
1877
- value: I != null ? String(I) : "",
2963
+ value: a != null ? String(a) : "",
1878
2964
  placeholder: "Select start",
1879
2965
  searchable: !0,
1880
- options: m.map((d) => ({
1881
- value: String(d.anchorId),
1882
- label: `${d.label} · ${d.group}`
2966
+ options: c.map((u) => ({
2967
+ value: String(u.anchorId),
2968
+ label: `${u.label} · ${u.group}`
1883
2969
  })),
1884
- onChange: (d) => h(d ? Number(d) : null)
2970
+ onChange: (u) => m(u ? Number(u) : null)
1885
2971
  }
1886
2972
  )
1887
2973
  ] }),
1888
- /* @__PURE__ */ te("label", { children: [
2974
+ /* @__PURE__ */ ct("label", { children: [
1889
2975
  "To",
1890
- /* @__PURE__ */ R(
1891
- Ge,
2976
+ /* @__PURE__ */ T(
2977
+ le,
1892
2978
  {
1893
2979
  ariaLabel: "To",
1894
- value: N != null ? String(N) : "",
2980
+ value: d != null ? String(d) : "",
1895
2981
  placeholder: "Select destination",
1896
2982
  searchable: !0,
1897
- options: m.map((d) => ({
1898
- value: String(d.anchorId),
1899
- label: `${d.label} · ${d.group}`
2983
+ options: c.map((u) => ({
2984
+ value: String(u.anchorId),
2985
+ label: `${u.label} · ${u.group}`
1900
2986
  })),
1901
- onChange: (d) => B(d ? Number(d) : null)
2987
+ onChange: (u) => b(u ? Number(u) : null)
1902
2988
  }
1903
2989
  )
1904
2990
  ] }),
1905
- /* @__PURE__ */ te("label", { className: "eyeon-map-chrome__accessible", children: [
1906
- /* @__PURE__ */ R(
2991
+ /* @__PURE__ */ ct("label", { className: "eyeon-map-chrome__accessible", children: [
2992
+ /* @__PURE__ */ T(
1907
2993
  "input",
1908
2994
  {
1909
2995
  type: "checkbox",
1910
- checked: W,
1911
- onChange: (d) => p(d.target.checked)
2996
+ checked: Q,
2997
+ onChange: (u) => x(u.target.checked)
1912
2998
  }
1913
2999
  ),
1914
3000
  "Accessible route"
1915
3001
  ] }),
1916
- k && /* @__PURE__ */ R("div", { className: "eyeon-map-chrome__route-meta", children: k.levelChanges.length > 0 ? `${k.levelChanges.length} level change(s)` : "Same level" })
3002
+ z && /* @__PURE__ */ T("div", { className: "eyeon-map-chrome__route-meta", children: z.levelChanges.length > 0 ? `${z.levelChanges.length} level change(s)` : "Same level" })
1917
3003
  ] })
1918
3004
  ] })
1919
3005
  ] });
1920
3006
  }
1921
- async function tn(l, i, M) {
1922
- const I = l.replace(/\/$/, ""), N = new URLSearchParams();
1923
- i != null && i > 0 && N.set("center_id", String(i)), M && N.set("draft", "1");
1924
- const h = N.toString(), B = await fetch(`${I}/v1/map/document${h ? `?${h}` : ""}`, {
1925
- credentials: "include"
3007
+ async function Fr(t, e, s, a) {
3008
+ const d = t.replace(/\/$/, ""), m = new URLSearchParams();
3009
+ e != null && e > 0 && m.set("center_id", String(e)), s && m.set("draft", "1");
3010
+ const b = m.toString(), Q = await fetch(`${d}/v1/map/document${b ? `?${b}` : ""}`, {
3011
+ credentials: "include",
3012
+ signal: a
1926
3013
  });
1927
- if (!B.ok)
1928
- throw new Error(`Failed to load map document (${B.status})`);
1929
- return B.json();
3014
+ if (!Q.ok)
3015
+ throw new Error(`Failed to load map document (${Q.status})`);
3016
+ return Q.json();
1930
3017
  }
1931
- function un(l) {
3018
+ function eo(t) {
3019
+ Ie();
1932
3020
  const {
1933
- document: i,
1934
- webApiURI: M,
1935
- centerId: I,
1936
- host: N = "WEBSITE",
1937
- kioskId: h = null,
1938
- selectedRetailerId: B = null,
1939
- themeOverrides: W,
1940
- onExtractedAmenities: p,
1941
- createRouteRef: k,
1942
- className: z,
1943
- style: O,
1944
- activeLevelId: C,
3021
+ document: e,
3022
+ webApiURI: s,
3023
+ centerId: a,
3024
+ host: d = "WEBSITE",
3025
+ kioskId: m = null,
3026
+ selectedRetailerId: b = null,
3027
+ themeOverrides: Q,
3028
+ onExtractedAmenities: x,
3029
+ createRouteRef: z,
3030
+ className: G,
3031
+ style: k,
3032
+ activeLevelId: Z,
1945
3033
  onActiveLevelChange: V,
1946
- routeOnSelect: P = !0,
1947
- imageProxyUrl: g
1948
- } = l, [u, E] = ae(i ?? null), y = re(
1949
- () => u ? Be(u) : null,
1950
- [u]
1951
- ), [m, v] = ae(null), [U, d] = ae(null), [w, T] = ae(null), [_, q] = ae(null), [Y, G] = ae(!1), [K, Z] = ae(() => i ? De(Be(i).levels) : null), oe = he(null), J = he(null), X = C ?? K, x = (r) => {
1952
- Z(r), r != null && (V == null || V(r));
3034
+ routeOnSelect: B = !0,
3035
+ imageProxyUrl: w,
3036
+ selectedShapeId: L = null,
3037
+ selectedShapeIds: M,
3038
+ hoveredShapeId: U = null,
3039
+ focusNonce: c
3040
+ } = t, [p, I] = dt(e ?? null), u = ot(
3041
+ () => p ? re(p) : null,
3042
+ [p]
3043
+ ), [N, O] = dt(null), [D, Y] = dt(null), [tt, F] = dt(null), [J, E] = dt(null), [q, $] = dt(!1), [K, l] = dt(() => e ? oe(re(e).levels) : null), H = at(null), _ = at(null), et = Z ?? K, st = (A) => {
3044
+ l(A), A != null && (V == null || V(A));
1953
3045
  };
1954
- le(() => {
1955
- if (i) {
1956
- E(i);
3046
+ lt(() => {
3047
+ if (e) {
3048
+ I(e);
1957
3049
  return;
1958
3050
  }
1959
- if (!M) return;
1960
- let r = !1;
1961
- const o = Te(N).fetchDraft;
1962
- return tn(M, I, o).then((t) => {
1963
- r || E(t);
1964
- }).catch((t) => {
1965
- r || v(t instanceof Error ? t.message : String(t));
3051
+ if (!s) return;
3052
+ let A = !1;
3053
+ const y = new AbortController(), v = Rt(d).fetchDraft;
3054
+ return Fr(s, a, v, y.signal).then((S) => {
3055
+ A || I(S);
3056
+ }).catch((S) => {
3057
+ !A && !(S instanceof DOMException && S.name === "AbortError") && O(S instanceof Error ? S.message : String(S));
1966
3058
  }), () => {
1967
- r = !0;
3059
+ A = !0, y.abort();
1968
3060
  };
1969
- }, [i, M, I, N]), le(() => {
1970
- var t;
1971
- if (!y) return;
1972
- const r = new Set(y.levels.map((e) => e.id));
1973
- (X == null || !r.has(X)) && x(De(y.levels));
1974
- const o = /* @__PURE__ */ new Set();
1975
- for (const e of y.levels)
1976
- for (const c of e.shapes)
1977
- if (c.kind === "amenity" && ((t = c.assignment) == null ? void 0 : t.amenityId) != null) {
1978
- const b = y.amenities.find((a) => a.id === c.assignment.amenityId);
1979
- b && o.add(b.code);
3061
+ }, [e, s, a, d]), lt(() => {
3062
+ var v;
3063
+ if (!u) return;
3064
+ const A = new Set(u.levels.map((S) => S.id));
3065
+ (et == null || !A.has(et)) && st(oe(u.levels));
3066
+ const y = /* @__PURE__ */ new Set();
3067
+ for (const S of u.levels)
3068
+ for (const W of S.shapes)
3069
+ if (W.kind === "amenity" && ((v = W.assignment) == null ? void 0 : v.amenityId) != null) {
3070
+ const f = u.amenities.find((o) => o.id === W.assignment.amenityId);
3071
+ f && y.add(f.code);
1980
3072
  }
1981
- p == null || p(Array.from(o));
1982
- }, [y, X, p]), le(() => {
1983
- var r;
1984
- if (!(!y || B == null)) {
1985
- for (const o of y.levels)
1986
- for (const t of o.shapes)
1987
- if (((r = t.assignment) == null ? void 0 : r.retailerId) === B) {
1988
- x(o.id);
3073
+ x == null || x(Array.from(y));
3074
+ }, [u, et, x]), lt(() => {
3075
+ var A;
3076
+ if (!(!u || b == null)) {
3077
+ for (const y of u.levels)
3078
+ for (const v of y.shapes)
3079
+ if (((A = v.assignment) == null ? void 0 : A.retailerId) === b) {
3080
+ st(
3081
+ It(u.levels, et, y.id)
3082
+ );
1989
3083
  return;
1990
3084
  }
1991
3085
  }
1992
- }, [y, B]), le(() => {
1993
- var r;
1994
- if (!(!y || !Te(N).kioskOrigin || h == null)) {
1995
- for (const o of y.levels)
1996
- for (const t of o.shapes)
1997
- if (t.kind === "kiosk_screen" && ((r = t.assignment) == null ? void 0 : r.kioskId) === h) {
1998
- const e = o.anchors.find((c) => c.shapeId === t.id);
1999
- e && T(e.id);
3086
+ }, [u, b]);
3087
+ const ut = ot(() => M && M.length > 0 ? M : L != null ? [L] : [], [L, M]), h = Lr(ut), i = h == null ? null : c != null ? `${h}#${c}` : h, r = ot(() => !u || ut.length === 0 ? null : Ut(u.levels, ut), [u, ut]);
3088
+ lt(() => {
3089
+ var A;
3090
+ if (!(!u || !Rt(d).kioskOrigin || m == null)) {
3091
+ for (const y of u.levels)
3092
+ for (const v of y.shapes)
3093
+ if (v.kind === "kiosk_screen" && ((A = v.assignment) == null ? void 0 : A.kioskId) === m) {
3094
+ const S = y.anchors.find((W) => W.shapeId === v.id);
3095
+ S && F(S.id);
2000
3096
  }
2001
3097
  }
2002
- }, [y, N, h]);
2003
- const ne = re(() => y ? ut(
2004
- y.graph.nodes.map((r) => ({
2005
- id: r.id,
2006
- levelId: r.levelId,
2007
- shapeId: r.shapeId,
2008
- kind: r.kind,
2009
- x: r.x,
2010
- y: r.y,
2011
- connectorId: r.connectorId
3098
+ }, [u, d, m]);
3099
+ const n = ot(() => u ? hn(
3100
+ u.graph.nodes.map((A) => ({
3101
+ id: A.id,
3102
+ levelId: A.levelId,
3103
+ shapeId: A.shapeId,
3104
+ kind: A.kind,
3105
+ x: A.x,
3106
+ y: A.y,
3107
+ connectorId: A.connectorId
2012
3108
  })),
2013
- y.graph.edges.map((r) => ({
2014
- id: r.id,
2015
- mapId: y.mapId,
2016
- fromAnchorId: r.from,
2017
- toAnchorId: r.to,
2018
- weight: r.weight,
2019
- directed: r.directed,
2020
- accessible: r.accessible,
2021
- kind: r.kind
3109
+ u.graph.edges.map((A) => ({
3110
+ id: A.id,
3111
+ mapId: u.mapId,
3112
+ fromAnchorId: A.from,
3113
+ toAnchorId: A.to,
3114
+ weight: A.weight,
3115
+ directed: A.directed,
3116
+ accessible: A.accessible,
3117
+ kind: A.kind
2022
3118
  })),
2023
- y.connectors
2024
- ) : null, [y]), ee = (r, o) => {
2025
- if (!ne || r == null || o == null) {
2026
- d(null);
3119
+ u.connectors
3120
+ ) : null, [u]), C = (A, y) => {
3121
+ if (!n || A == null || y == null) {
3122
+ Y(null);
2027
3123
  return;
2028
3124
  }
2029
- const t = mt(ne, r, o, { accessibleOnly: Y });
2030
- d(t);
3125
+ const v = yn(n, A, y, { accessibleOnly: q });
3126
+ Y(v);
2031
3127
  };
2032
- le(() => {
2033
- ee(w, _);
2034
- }, [w, _, Y, ne]), le(() => {
2035
- !k || !y || (k.current = {
2036
- createRouteToStore(r) {
2037
- var o;
2038
- for (const t of y.levels)
2039
- for (const e of t.shapes)
2040
- if (((o = e.assignment) == null ? void 0 : o.retailerId) === r) {
2041
- const c = t.anchors.find((b) => b.shapeId === e.id);
2042
- c && (q(c.id), x(t.id));
3128
+ lt(() => {
3129
+ C(tt, J);
3130
+ }, [tt, J, q, n]), lt(() => {
3131
+ if (!z || !u) return;
3132
+ const A = {
3133
+ createRouteToStore(y) {
3134
+ var v;
3135
+ for (const S of u.levels)
3136
+ for (const W of S.shapes)
3137
+ if (((v = W.assignment) == null ? void 0 : v.retailerId) === y) {
3138
+ const f = S.anchors.find((o) => o.shapeId === W.id);
3139
+ f && (E(f.id), st(
3140
+ It(u.levels, et, S.id)
3141
+ ));
2043
3142
  }
2044
3143
  },
2045
- createRouteToAmenity(r) {
2046
- var t;
2047
- const o = y.amenities.find((e) => e.code === r);
2048
- if (o) {
2049
- for (const e of y.levels)
2050
- for (const c of e.shapes)
2051
- if (((t = c.assignment) == null ? void 0 : t.amenityId) === o.id) {
2052
- const b = e.anchors.find((a) => a.shapeId === c.id);
2053
- if (b) {
2054
- q(b.id), x(e.id);
3144
+ createRouteToAmenity(y) {
3145
+ var S;
3146
+ const v = u.amenities.find((W) => W.code === y);
3147
+ if (v) {
3148
+ for (const W of u.levels)
3149
+ for (const f of W.shapes)
3150
+ if (((S = f.assignment) == null ? void 0 : S.amenityId) === v.id) {
3151
+ const o = W.anchors.find((j) => j.shapeId === f.id);
3152
+ if (o) {
3153
+ E(o.id), st(
3154
+ It(u.levels, et, W.id)
3155
+ );
2055
3156
  return;
2056
3157
  }
2057
3158
  }
2058
3159
  }
2059
3160
  },
2060
3161
  clearRoute() {
2061
- q(null), d(null);
3162
+ E(null), Y(null);
2062
3163
  }
2063
- });
2064
- }, [k, y]);
2065
- const ie = ft(y == null ? void 0 : y.theme, W);
2066
- if (m)
2067
- return /* @__PURE__ */ R("div", { className: `eyeon-map-viewer eyeon-map-viewer--error ${z ?? ""}`, style: O, children: /* @__PURE__ */ R("div", { className: "eyeon-map-viewer__error", children: m }) });
2068
- if (!y)
2069
- return /* @__PURE__ */ R("div", { className: `eyeon-map-viewer eyeon-map-viewer--loading ${z ?? ""}`, style: O, children: /* @__PURE__ */ R("div", { className: "eyeon-map-viewer__loading", children: "Loading map…" }) });
2070
- const de = y.amenities.filter(
2071
- (r) => y.levels.some(
2072
- (o) => o.shapes.some((t) => {
2073
- var e;
2074
- return ((e = t.assignment) == null ? void 0 : e.amenityId) === r.id;
3164
+ };
3165
+ return z.current = A, () => {
3166
+ z.current === A && (z.current = null);
3167
+ };
3168
+ }, [et, z, u]);
3169
+ const R = mn(u == null ? void 0 : u.theme, Q);
3170
+ if (N)
3171
+ return /* @__PURE__ */ T("div", { className: `eyeon-map-viewer eyeon-map-viewer--error ${G ?? ""}`, style: k, children: /* @__PURE__ */ T("div", { className: "eyeon-map-viewer__error", children: N }) });
3172
+ if (!u)
3173
+ return /* @__PURE__ */ T("div", { className: `eyeon-map-viewer eyeon-map-viewer--loading ${G ?? ""}`, style: k, children: /* @__PURE__ */ T("div", { className: "eyeon-map-viewer__loading", children: "Loading map…" }) });
3174
+ const g = u.amenities.filter(
3175
+ (A) => Pn(A.code) && u.levels.some(
3176
+ (y) => y.shapes.some((v) => {
3177
+ var S;
3178
+ return ((S = v.assignment) == null ? void 0 : S.amenityId) === A.id;
2075
3179
  })
2076
3180
  )
2077
- ), fe = Te(N);
2078
- return /* @__PURE__ */ te(
3181
+ ), P = Rt(d), X = ve(u.levels);
3182
+ return /* @__PURE__ */ ct(
2079
3183
  "div",
2080
3184
  {
2081
- className: `eyeon-map-viewer eyeon-map-viewer--${N} ${z ?? ""}`,
3185
+ className: `eyeon-map-viewer eyeon-map-viewer--${d}${X ? "" : " eyeon-map-viewer--empty"} ${G ?? ""}`,
2082
3186
  style: {
2083
- ...O,
2084
- "--map-accent": ie.ACCENT_COLOR,
2085
- "--map-bg": ie.MAP_BACKGROUND_COLOR
3187
+ ...k,
3188
+ "--map-accent": R.ACCENT_COLOR,
3189
+ "--map-bg": R.MAP_BACKGROUND_COLOR
2086
3190
  },
2087
3191
  children: [
2088
- (fe.search || fe.amenities) && /* @__PURE__ */ R(
2089
- en,
3192
+ X ? null : /* @__PURE__ */ T("div", { className: "eyeon-map-viewer__empty", children: pn }),
3193
+ X && (P.search || P.amenities) && /* @__PURE__ */ T(
3194
+ Zr,
2090
3195
  {
2091
- doc: y,
2092
- amenities: de,
2093
- activeLevelId: X,
2094
- onActiveLevelChange: x,
2095
- fromAnchorId: w,
2096
- toAnchorId: _,
2097
- onFromChange: T,
2098
- onToChange: q,
2099
- accessibleOnly: Y,
2100
- onAccessibleOnlyChange: G,
2101
- route: U,
2102
- showSearch: fe.search,
2103
- showAmenities: fe.amenities
3196
+ doc: u,
3197
+ amenities: g,
3198
+ activeLevelId: et,
3199
+ onActiveLevelChange: st,
3200
+ fromAnchorId: tt,
3201
+ toAnchorId: J,
3202
+ onFromChange: F,
3203
+ onToChange: E,
3204
+ accessibleOnly: q,
3205
+ onAccessibleOnlyChange: $,
3206
+ route: D,
3207
+ showSearch: P.search,
3208
+ showAmenities: P.amenities
2104
3209
  }
2105
3210
  ),
2106
- /* @__PURE__ */ R(
2107
- Tt,
3211
+ X ? /* @__PURE__ */ T(
3212
+ kn,
2108
3213
  {
2109
- levels: y.levels,
2110
- activeLevelId: X,
2111
- onActiveLevelChange: x,
3214
+ levels: u.levels,
3215
+ activeLevelId: et,
3216
+ onActiveLevelChange: st,
2112
3217
  onZoomIn: () => {
2113
- var r;
2114
- return (r = oe.current) == null ? void 0 : r.zoomIn();
3218
+ var A;
3219
+ return (A = H.current) == null ? void 0 : A.zoomIn();
2115
3220
  },
2116
3221
  onZoomOut: () => {
2117
- var r;
2118
- return (r = oe.current) == null ? void 0 : r.zoomOut();
3222
+ var A;
3223
+ return (A = H.current) == null ? void 0 : A.zoomOut();
2119
3224
  },
2120
3225
  onReset: () => {
2121
- var r;
2122
- return (r = oe.current) == null ? void 0 : r.reset();
3226
+ var A;
3227
+ return (A = H.current) == null ? void 0 : A.reset();
2123
3228
  },
2124
- showFloors: fe.floors,
2125
- showZoomReset: fe.zoomReset
3229
+ showFloors: P.floors,
3230
+ showZoomReset: P.zoomReset
2126
3231
  }
2127
- ),
2128
- /* @__PURE__ */ R("div", { ref: J, className: "eyeon-map-viewer__canvas", children: /* @__PURE__ */ R(Ze, { fallback: null, children: /* @__PURE__ */ R(
2129
- Jt,
3232
+ ) : null,
3233
+ X ? /* @__PURE__ */ T("div", { ref: _, className: "eyeon-map-viewer__canvas", children: /* @__PURE__ */ T(We, { fallback: null, children: /* @__PURE__ */ T(
3234
+ Hr,
2130
3235
  {
2131
- doc: y,
2132
- theme: ie,
2133
- activeLevelId: X,
2134
- route: U,
2135
- selectedRetailerId: B,
2136
- cameraRef: oe,
2137
- eventSource: J,
2138
- imageProxyUrl: g,
2139
- onSelectShape: (r, o) => {
2140
- var t;
2141
- if (x(o), P) {
2142
- const e = y.levels.find((b) => b.id === o), c = e == null ? void 0 : e.anchors.find((b) => b.shapeId === r);
2143
- c && q(c.id);
3236
+ doc: u,
3237
+ theme: R,
3238
+ activeLevelId: et,
3239
+ route: D,
3240
+ selectedShapeId: L,
3241
+ selectedShapeIds: ut,
3242
+ hoveredShapeId: U,
3243
+ focusKey: i,
3244
+ focusViewBounds: r,
3245
+ cameraRef: H,
3246
+ eventSource: _,
3247
+ imageProxyUrl: w,
3248
+ onSelectShape: (A, y, v) => {
3249
+ var S, W, f;
3250
+ if (A == null) {
3251
+ (S = t.onSelectShape) == null || S.call(t, null);
3252
+ return;
3253
+ }
3254
+ if (v != null && v.additive || st(
3255
+ It(u.levels, et, y)
3256
+ ), B) {
3257
+ const o = u.levels.find((nt) => nt.id === y), j = o == null ? void 0 : o.anchors.find((nt) => nt.shapeId === A);
3258
+ j && E(j.id);
3259
+ }
3260
+ if ((W = t.onSelectShape) == null || W.call(t, A, v), !(v != null && v.additive) && A === L) {
3261
+ const o = Ut(u.levels, ut) ?? Nr(u.levels, A);
3262
+ o && ((f = H.current) == null || f.focusBounds(o));
2144
3263
  }
2145
- (t = l.onSelectShape) == null || t.call(l, r);
2146
3264
  }
2147
3265
  }
2148
- ) }) })
3266
+ ) }) }) : null
2149
3267
  ]
2150
3268
  }
2151
3269
  );
2152
3270
  }
2153
3271
  export {
2154
- Tt as M,
2155
- en as R,
2156
- Jt as a,
2157
- un as b,
2158
- Ge as c
3272
+ kn as M,
3273
+ Zr as R,
3274
+ Hr as a,
3275
+ eo as b,
3276
+ Jr as c,
3277
+ se as d,
3278
+ Ie as e,
3279
+ Rn as f,
3280
+ le as g,
3281
+ Bn as h,
3282
+ we as i,
3283
+ _r as j,
3284
+ $r as k,
3285
+ to as l
2159
3286
  };
2160
3287
  //# sourceMappingURL=MapViewer.js.map