maplair 4.0.0-alpha.1

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 (262) hide show
  1. package/CHANGELOG.md +2804 -0
  2. package/LICENSE +27 -0
  3. package/README.md +40 -0
  4. package/dist/esm/Maplair.js +71 -0
  5. package/dist/esm/Maplair.js.map +1 -0
  6. package/dist/esm/_virtual/_rolldown/runtime.js +13 -0
  7. package/dist/esm/control/AttributionControl.js +79 -0
  8. package/dist/esm/control/AttributionControl.js.map +1 -0
  9. package/dist/esm/control/Control.js +81 -0
  10. package/dist/esm/control/Control.js.map +1 -0
  11. package/dist/esm/control/LayersControl.js +220 -0
  12. package/dist/esm/control/LayersControl.js.map +1 -0
  13. package/dist/esm/control/ScaleControl.js +72 -0
  14. package/dist/esm/control/ScaleControl.js.map +1 -0
  15. package/dist/esm/control/ZoomControl.js +86 -0
  16. package/dist/esm/control/ZoomControl.js.map +1 -0
  17. package/dist/esm/core/Browser.js +31 -0
  18. package/dist/esm/core/Browser.js.map +1 -0
  19. package/dist/esm/core/Class.js +52 -0
  20. package/dist/esm/core/Class.js.map +1 -0
  21. package/dist/esm/core/Events.js +149 -0
  22. package/dist/esm/core/Events.js.map +1 -0
  23. package/dist/esm/core/Handler.js +32 -0
  24. package/dist/esm/core/Handler.js.map +1 -0
  25. package/dist/esm/core/I18n.js +36 -0
  26. package/dist/esm/core/I18n.js.map +1 -0
  27. package/dist/esm/core/Util.js +71 -0
  28. package/dist/esm/core/Util.js.map +1 -0
  29. package/dist/esm/dom/DomEvent.DoubleTap.js +74 -0
  30. package/dist/esm/dom/DomEvent.DoubleTap.js.map +1 -0
  31. package/dist/esm/dom/DomEvent.PointerEvents.js +46 -0
  32. package/dist/esm/dom/DomEvent.PointerEvents.js.map +1 -0
  33. package/dist/esm/dom/DomEvent.js +135 -0
  34. package/dist/esm/dom/DomEvent.js.map +1 -0
  35. package/dist/esm/dom/DomUtil.js +107 -0
  36. package/dist/esm/dom/DomUtil.js.map +1 -0
  37. package/dist/esm/dom/Draggable.js +107 -0
  38. package/dist/esm/dom/Draggable.js.map +1 -0
  39. package/dist/esm/dom/PosAnimation.js +56 -0
  40. package/dist/esm/dom/PosAnimation.js.map +1 -0
  41. package/dist/esm/geo/LatLng.js +65 -0
  42. package/dist/esm/geo/LatLng.js.map +1 -0
  43. package/dist/esm/geo/LatLngBounds.js +114 -0
  44. package/dist/esm/geo/LatLngBounds.js.map +1 -0
  45. package/dist/esm/geo/crs/CRS.js +51 -0
  46. package/dist/esm/geo/crs/CRS.js.map +1 -0
  47. package/dist/esm/geo/crs/EPSG3395.js +16 -0
  48. package/dist/esm/geo/crs/EPSG3395.js.map +1 -0
  49. package/dist/esm/geo/crs/EPSG3857.js +19 -0
  50. package/dist/esm/geo/crs/EPSG3857.js.map +1 -0
  51. package/dist/esm/geo/crs/EPSG4326.js +13 -0
  52. package/dist/esm/geo/crs/EPSG4326.js.map +1 -0
  53. package/dist/esm/geo/crs/EarthCRS.js +14 -0
  54. package/dist/esm/geo/crs/EarthCRS.js.map +1 -0
  55. package/dist/esm/geo/crs/SimpleCRS.js +23 -0
  56. package/dist/esm/geo/crs/SimpleCRS.js.map +1 -0
  57. package/dist/esm/geo/projection/Projection.LonLat.js +19 -0
  58. package/dist/esm/geo/projection/Projection.LonLat.js.map +1 -0
  59. package/dist/esm/geo/projection/Projection.Mercator.js +33 -0
  60. package/dist/esm/geo/projection/Projection.Mercator.js.map +1 -0
  61. package/dist/esm/geo/projection/Projection.SphericalMercator.js +27 -0
  62. package/dist/esm/geo/projection/Projection.SphericalMercator.js.map +1 -0
  63. package/dist/esm/geo/projection/index.js +14 -0
  64. package/dist/esm/geo/projection/index.js.map +1 -0
  65. package/dist/esm/geometry/Bounds.js +91 -0
  66. package/dist/esm/geometry/Bounds.js.map +1 -0
  67. package/dist/esm/geometry/LineUtil.js +169 -0
  68. package/dist/esm/geometry/LineUtil.js.map +1 -0
  69. package/dist/esm/geometry/Point.js +119 -0
  70. package/dist/esm/geometry/Point.js.map +1 -0
  71. package/dist/esm/geometry/PolyUtil.js +89 -0
  72. package/dist/esm/geometry/PolyUtil.js.map +1 -0
  73. package/dist/esm/geometry/Transformation.js +34 -0
  74. package/dist/esm/geometry/Transformation.js.map +1 -0
  75. package/dist/esm/layer/BlanketOverlay.js +87 -0
  76. package/dist/esm/layer/BlanketOverlay.js.map +1 -0
  77. package/dist/esm/layer/DivOverlay.js +192 -0
  78. package/dist/esm/layer/DivOverlay.js.map +1 -0
  79. package/dist/esm/layer/FeatureGroup.js +40 -0
  80. package/dist/esm/layer/FeatureGroup.js.map +1 -0
  81. package/dist/esm/layer/GeoJSON.js +192 -0
  82. package/dist/esm/layer/GeoJSON.js.map +1 -0
  83. package/dist/esm/layer/ImageOverlay.js +140 -0
  84. package/dist/esm/layer/ImageOverlay.js.map +1 -0
  85. package/dist/esm/layer/Layer.js +119 -0
  86. package/dist/esm/layer/Layer.js.map +1 -0
  87. package/dist/esm/layer/LayerGroup.js +58 -0
  88. package/dist/esm/layer/LayerGroup.js.map +1 -0
  89. package/dist/esm/layer/Popup.js +224 -0
  90. package/dist/esm/layer/Popup.js.map +1 -0
  91. package/dist/esm/layer/SVGOverlay.js +21 -0
  92. package/dist/esm/layer/SVGOverlay.js.map +1 -0
  93. package/dist/esm/layer/Tooltip.js +228 -0
  94. package/dist/esm/layer/Tooltip.js.map +1 -0
  95. package/dist/esm/layer/VideoOverlay.js +54 -0
  96. package/dist/esm/layer/VideoOverlay.js.map +1 -0
  97. package/dist/esm/layer/marker/DefaultIcon.js +50 -0
  98. package/dist/esm/layer/marker/DefaultIcon.js.map +1 -0
  99. package/dist/esm/layer/marker/DivIcon.js +37 -0
  100. package/dist/esm/layer/marker/DivIcon.js.map +1 -0
  101. package/dist/esm/layer/marker/Icon.js +65 -0
  102. package/dist/esm/layer/marker/Icon.js.map +1 -0
  103. package/dist/esm/layer/marker/Marker.Drag.js +77 -0
  104. package/dist/esm/layer/marker/Marker.Drag.js.map +1 -0
  105. package/dist/esm/layer/marker/Marker.js +235 -0
  106. package/dist/esm/layer/marker/Marker.js.map +1 -0
  107. package/dist/esm/layer/tile/GridLayer.js +447 -0
  108. package/dist/esm/layer/tile/GridLayer.js.map +1 -0
  109. package/dist/esm/layer/tile/TileLayer.js +139 -0
  110. package/dist/esm/layer/tile/TileLayer.js.map +1 -0
  111. package/dist/esm/layer/tile/WMSTileLayer.js +68 -0
  112. package/dist/esm/layer/tile/WMSTileLayer.js.map +1 -0
  113. package/dist/esm/layer/vector/Canvas.js +292 -0
  114. package/dist/esm/layer/vector/Canvas.js.map +1 -0
  115. package/dist/esm/layer/vector/Circle.js +35 -0
  116. package/dist/esm/layer/vector/Circle.js.map +1 -0
  117. package/dist/esm/layer/vector/CircleMarker.js +69 -0
  118. package/dist/esm/layer/vector/CircleMarker.js.map +1 -0
  119. package/dist/esm/layer/vector/Path.js +68 -0
  120. package/dist/esm/layer/vector/Path.js.map +1 -0
  121. package/dist/esm/layer/vector/Polygon.js +70 -0
  122. package/dist/esm/layer/vector/Polygon.js.map +1 -0
  123. package/dist/esm/layer/vector/Polyline.js +152 -0
  124. package/dist/esm/layer/vector/Polyline.js.map +1 -0
  125. package/dist/esm/layer/vector/Rectangle.js +25 -0
  126. package/dist/esm/layer/vector/Rectangle.js.map +1 -0
  127. package/dist/esm/layer/vector/Renderer.getRenderer.js +31 -0
  128. package/dist/esm/layer/vector/Renderer.getRenderer.js.map +1 -0
  129. package/dist/esm/layer/vector/Renderer.js +39 -0
  130. package/dist/esm/layer/vector/Renderer.js.map +1 -0
  131. package/dist/esm/layer/vector/SVG.js +115 -0
  132. package/dist/esm/layer/vector/SVG.js.map +1 -0
  133. package/dist/esm/map/Map.js +844 -0
  134. package/dist/esm/map/Map.js.map +1 -0
  135. package/dist/esm/map/handler/BoxZoomHandler.js +105 -0
  136. package/dist/esm/map/handler/BoxZoomHandler.js.map +1 -0
  137. package/dist/esm/map/handler/DoubleClickZoomHandler.js +27 -0
  138. package/dist/esm/map/handler/DoubleClickZoomHandler.js.map +1 -0
  139. package/dist/esm/map/handler/DragHandler.js +133 -0
  140. package/dist/esm/map/handler/DragHandler.js.map +1 -0
  141. package/dist/esm/map/handler/KeyboardHandler.js +117 -0
  142. package/dist/esm/map/handler/KeyboardHandler.js.map +1 -0
  143. package/dist/esm/map/handler/PinchZoomHandler.js +96 -0
  144. package/dist/esm/map/handler/PinchZoomHandler.js.map +1 -0
  145. package/dist/esm/map/handler/ScrollWheelZoomHandler.js +50 -0
  146. package/dist/esm/map/handler/ScrollWheelZoomHandler.js.map +1 -0
  147. package/dist/esm/map/handler/TapHoldHandler.js +77 -0
  148. package/dist/esm/map/handler/TapHoldHandler.js.map +1 -0
  149. package/dist/esm/package.js +6 -0
  150. package/dist/esm/package.js.map +1 -0
  151. package/dist/images/layers.svg +1 -0
  152. package/dist/images/logo.svg +1 -0
  153. package/dist/images/marker-icon.svg +1 -0
  154. package/dist/images/marker-shadow.svg +1 -0
  155. package/dist/maplair-global-src.js +6810 -0
  156. package/dist/maplair-global-src.js.map +1 -0
  157. package/dist/maplair-global.js +12 -0
  158. package/dist/maplair-global.js.map +1 -0
  159. package/dist/maplair-src.js +6704 -0
  160. package/dist/maplair-src.js.map +1 -0
  161. package/dist/maplair.css +730 -0
  162. package/dist/maplair.js +7 -0
  163. package/dist/maplair.js.map +1 -0
  164. package/i18n/cs.json +12 -0
  165. package/i18n/de.json +12 -0
  166. package/i18n/en.json +12 -0
  167. package/i18n/es.json +12 -0
  168. package/i18n/fr.json +12 -0
  169. package/i18n/hu.json +12 -0
  170. package/i18n/it.json +12 -0
  171. package/i18n/rm.json +12 -0
  172. package/i18n/sk.json +12 -0
  173. package/i18n/sl.json +12 -0
  174. package/package.json +87 -0
  175. package/src/Maplair.js +24 -0
  176. package/src/control/AttributionControl.js +147 -0
  177. package/src/control/Control.js +174 -0
  178. package/src/control/LayersControl.js +444 -0
  179. package/src/control/ScaleControl.js +141 -0
  180. package/src/control/ZoomControl.js +147 -0
  181. package/src/control/index.js +5 -0
  182. package/src/core/Browser.js +75 -0
  183. package/src/core/Class.js +97 -0
  184. package/src/core/Events.js +334 -0
  185. package/src/core/Handler.js +59 -0
  186. package/src/core/I18n.js +76 -0
  187. package/src/core/Util.js +122 -0
  188. package/src/core/index.js +8 -0
  189. package/src/dom/DomEvent.DoubleTap.js +120 -0
  190. package/src/dom/DomEvent.PointerEvents.js +75 -0
  191. package/src/dom/DomEvent.js +282 -0
  192. package/src/dom/DomUtil.js +175 -0
  193. package/src/dom/Draggable.js +204 -0
  194. package/src/dom/PosAnimation.js +115 -0
  195. package/src/dom/index.js +9 -0
  196. package/src/geo/LatLng.js +163 -0
  197. package/src/geo/LatLngBounds.js +260 -0
  198. package/src/geo/crs/CRS.js +143 -0
  199. package/src/geo/crs/EPSG3395.js +19 -0
  200. package/src/geo/crs/EPSG3857.js +26 -0
  201. package/src/geo/crs/EPSG4326.js +21 -0
  202. package/src/geo/crs/EarthCRS.js +32 -0
  203. package/src/geo/crs/SimpleCRS.js +35 -0
  204. package/src/geo/crs/index.js +6 -0
  205. package/src/geo/index.js +7 -0
  206. package/src/geo/projection/Projection.LonLat.js +30 -0
  207. package/src/geo/projection/Projection.Mercator.js +53 -0
  208. package/src/geo/projection/Projection.SphericalMercator.js +46 -0
  209. package/src/geo/projection/index.js +26 -0
  210. package/src/geometry/Bounds.js +222 -0
  211. package/src/geometry/LineUtil.js +299 -0
  212. package/src/geometry/Point.js +239 -0
  213. package/src/geometry/PolyUtil.js +129 -0
  214. package/src/geometry/Transformation.js +67 -0
  215. package/src/geometry/index.js +8 -0
  216. package/src/images/layers.svg +1 -0
  217. package/src/images/logo.svg +1 -0
  218. package/src/images/marker-icon.svg +1 -0
  219. package/src/images/marker-shadow.svg +1 -0
  220. package/src/layer/BlanketOverlay.js +171 -0
  221. package/src/layer/DivOverlay.js +353 -0
  222. package/src/layer/FeatureGroup.js +93 -0
  223. package/src/layer/GeoJSON.js +432 -0
  224. package/src/layer/ImageOverlay.js +279 -0
  225. package/src/layer/Layer.js +273 -0
  226. package/src/layer/LayerGroup.js +129 -0
  227. package/src/layer/Popup.js +528 -0
  228. package/src/layer/SVGOverlay.js +47 -0
  229. package/src/layer/Tooltip.js +469 -0
  230. package/src/layer/VideoOverlay.js +111 -0
  231. package/src/layer/index.js +18 -0
  232. package/src/layer/marker/DefaultIcon.js +79 -0
  233. package/src/layer/marker/DivIcon.js +76 -0
  234. package/src/layer/marker/Icon.js +164 -0
  235. package/src/layer/marker/Marker.Drag.js +161 -0
  236. package/src/layer/marker/Marker.js +465 -0
  237. package/src/layer/marker/index.js +5 -0
  238. package/src/layer/tile/GridLayer.js +901 -0
  239. package/src/layer/tile/TileLayer.js +299 -0
  240. package/src/layer/tile/WMSTileLayer.js +133 -0
  241. package/src/layer/tile/index.js +3 -0
  242. package/src/layer/vector/Canvas.js +479 -0
  243. package/src/layer/vector/Circle.js +87 -0
  244. package/src/layer/vector/CircleMarker.js +110 -0
  245. package/src/layer/vector/Path.js +145 -0
  246. package/src/layer/vector/Polygon.js +160 -0
  247. package/src/layer/vector/Polyline.js +296 -0
  248. package/src/layer/vector/Rectangle.js +52 -0
  249. package/src/layer/vector/Renderer.getRenderer.js +48 -0
  250. package/src/layer/vector/Renderer.js +75 -0
  251. package/src/layer/vector/SVG.js +216 -0
  252. package/src/layer/vector/index.js +10 -0
  253. package/src/map/Map.js +1830 -0
  254. package/src/map/handler/BoxZoomHandler.js +156 -0
  255. package/src/map/handler/DoubleClickZoomHandler.js +62 -0
  256. package/src/map/handler/DragHandler.js +240 -0
  257. package/src/map/handler/KeyboardHandler.js +188 -0
  258. package/src/map/handler/PinchZoomHandler.js +157 -0
  259. package/src/map/handler/ScrollWheelZoomHandler.js +98 -0
  260. package/src/map/handler/TapHoldHandler.js +111 -0
  261. package/src/map/index.js +8 -0
  262. package/src/maplair.css +730 -0
@@ -0,0 +1,67 @@
1
+ import {Point} from './Point.js';
2
+
3
+ /*
4
+ * @class Transformation
5
+ *
6
+ * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d`
7
+ * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing
8
+ * the reverse. Used by Maplair in its projections code.
9
+ *
10
+ * @example
11
+ *
12
+ * ```js
13
+ * const transformation = new Transformation(2, 5, -1, 10),
14
+ * p = new Point(1, 2),
15
+ * p2 = transformation.transform(p), // new Point(7, 8)
16
+ * p3 = transformation.untransform(p2); // new Point(1, 2)
17
+ * ```
18
+ */
19
+
20
+ // @constructor Transformation(a: Number, b: Number, c: Number, d: Number)
21
+ // Instantiates a Transformation object with the given coefficients.
22
+
23
+ // @alternative
24
+ // @constructor Transformation(coefficients: Array): Transformation
25
+ // Expects an coefficients array of the form
26
+ // `[a: Number, b: Number, c: Number, d: Number]`.
27
+ export class Transformation {
28
+ constructor(a, b, c, d) {
29
+ if (Array.isArray(a)) {
30
+ // use array properties
31
+ this._a = a[0];
32
+ this._b = a[1];
33
+ this._c = a[2];
34
+ this._d = a[3];
35
+ return;
36
+ }
37
+ this._a = a;
38
+ this._b = b;
39
+ this._c = c;
40
+ this._d = d;
41
+ }
42
+
43
+ // @method transform(point: Point, scale?: Number): Point
44
+ // Returns a transformed point, optionally multiplied by the given scale.
45
+ // Only accepts actual `Point` instances, not arrays.
46
+ transform(point, scale) { // (Point, Number) -> Point
47
+ return this._transform(new Point(point), scale);
48
+ }
49
+
50
+ // destructive transform (faster)
51
+ _transform(point, scale) {
52
+ scale ||= 1;
53
+ point.x = scale * (this._a * point.x + this._b);
54
+ point.y = scale * (this._c * point.y + this._d);
55
+ return point;
56
+ }
57
+
58
+ // @method untransform(point: Point, scale?: Number): Point
59
+ // Returns the reverse transformation of the given point, optionally divided
60
+ // by the given scale. Only accepts actual `Point` instances, not arrays.
61
+ untransform(point, scale) {
62
+ scale ||= 1;
63
+ return new Point(
64
+ (point.x / scale - this._b) / this._a,
65
+ (point.y / scale - this._d) / this._c);
66
+ }
67
+ }
@@ -0,0 +1,8 @@
1
+ export {Point} from './Point.js';
2
+ export {Bounds} from './Bounds.js';
3
+ export {Transformation} from './Transformation.js';
4
+
5
+ import * as LineUtil from './LineUtil.js';
6
+ export {LineUtil};
7
+ import * as PolyUtil from './PolyUtil.js';
8
+ export {PolyUtil};
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="26" height="26"><path fill="#b9b9b9" d="m.032 17.056 13-8 13 8-13 8z"/><path fill="#737373" d="m.032 17.056-.032.93 13 8 13-8 .032-.93-13 8z"/><path fill="#cdcdcd" d="m0 13.076 13-8 13 8-13 8z"/><path fill="#737373" d="M0 13.076v.91l13 8 13-8v-.91l-13 8z"/><path fill="#e9e9e9" fill-opacity=".585" stroke="#797979" stroke-width=".1" d="m0 8.986 13-8 13 8-13 8-13-8"/><path fill="#737373" d="M0 8.986v1l13 8 13-8v-1l-13 8z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="909.493" height="241.328"><defs><path id="leaf" d="m-90 2030 45-863a95 95 0 0 0-111-98l-859 151 116-320a65 65 0 0 0-20-73l-941-762 212-99a65 65 0 0 0 34-79l-186-572 542 115a65 65 0 0 0 73-38l105-247 423 454a65 65 0 0 0 111-57l-204-1052 327 189a65 65 0 0 0 91-27l332-652 332 652a65 65 0 0 0 91 27l327-189-204 1052a65 65 0 0 0 111 57l423-454 105 247a65 65 0 0 0 73 38l542-115-186 572a65 65 0 0 0 34 79l212 99-941 762a65 65 0 0 0-20 73l116 320-859-151a95 95 0 0 0-111 98l45 863z" transform="translate(0 -2030)"/><clipPath id="half"><rect x="0" y="-4200" width="2100" height="4300"/></clipPath><linearGradient id="a" x1="0" x2="1" y1="0" y2="0"><stop offset="0" stop-color="#74B844"/><stop offset="1" stop-color="#4A9634"/></linearGradient><linearGradient id="c" x1="0" x2="1" y1="0" y2="1"><stop offset="0" stop-color="#C1EA71"/><stop offset="1" stop-color="#ACDA55"/></linearGradient><linearGradient id="d" x1="0" x2="1" y1="0" y2="1"><stop offset="0" stop-color="#ACDA55"/><stop offset="1" stop-color="#89C442"/></linearGradient></defs><path fill="#6f6f6e" d="M25.745682888540035 153.38304552590267Q25.745682888540035 148.5164835164835 26.76609105180534 140.9026687598116Q27.786499215070645 133.2888540031397 30.14128728414443 119.94505494505495Q34.22291993720565 95.29827315541601 36.57770800627944 77.24489795918367Q37.990580847723706 65.94191522762951 37.990580847723706 58.4065934065934Q37.990580847723706 51.342229199372056 32.810047095761384 51.342229199372056Q28.72841444270016 51.342229199372056 22.998430141287287 55.50235478806907Q17.268445839874413 59.662480376766084 10.361067503924646 68.76766091051805Q8.16326530612245 71.75039246467817 5.4945054945054945 71.75039246467817Q3.296703296703297 71.75039246467817 1.6483516483516485 69.63108320251177Q0.0 67.51177394034536 0.0 64.84301412872841Q0.0 62.33124018838305 1.0204081632653061 59.740973312401884Q2.0408163265306123 57.15070643642072 4.395604395604395 53.85400313971742Q11.930926216640502 43.33594976452119 21.19309262166405 37.60596546310832Q30.4552590266876 31.87598116169545 39.71742543171115 31.87598116169545Q48.35164835164835 31.87598116169545 52.982731554160125 37.370486656200946Q57.6138147566719 42.86499215070644 57.6138147566719 53.38304552590267Q57.6138147566719 57.62166405023548 56.82888540031397 63.35164835164835Q56.043956043956044 69.08163265306122 55.4160125588697 72.69230769230768Q54.78806907378336 76.30298273155415 54.47409733124019 77.71585557299844Q63.42229199372057 52.12715855572998 74.56828885400314 42.00156985871271Q85.71428571428572 31.87598116169545 99.05808477237049 31.87598116169545Q109.26216640502355 31.87598116169545 115.149136577708 39.09733124018838Q121.03610675039246 46.318681318681314 121.03610675039246 59.50549450549451Q121.03610675039246 64.68602825745683 119.6232339089482 72.37833594976452Q127.47252747252747 50.71428571428571 137.99058084772372 41.29513343799058Q148.50863422291994 31.87598116169545 162.1664050235479 31.87598116169545Q173.15541601255887 31.87598116169545 179.04238618524334 38.940345368916795Q184.9293563579278 46.00470957613814 184.9293563579278 58.720565149136576Q184.9293563579278 65.62794348508635 182.88854003139718 75.51805337519623L173.31240188383046 120.41601255886971Q171.7425431711146 128.26530612244898 171.7425431711146 133.91679748822605Q171.7425431711146 140.51020408163265 174.80376766091052 143.80690737833595Q177.86499215070643 147.10361067503925 183.35949764521195 147.10361067503925Q188.54003139717426 147.10361067503925 193.4850863422292 143.64992150706436Q198.43014128728416 140.19623233908948 205.18053375196232 132.18995290423862Q207.06436420722136 129.9921507064364 209.41915227629514 129.9921507064364Q211.45996860282574 129.9921507064364 212.63736263736263 131.87598116169545Q213.81475667189954 133.75981161695447 213.81475667189954 137.05651491365776Q213.81475667189954 143.1789638932496 210.83202511773942 146.78963893249608Q202.66875981161695 156.67974882260597 194.6624803767661 161.23233908948197Q186.65620094191524 165.78492935635794 177.86499215070643 165.78492935635794Q164.52119309262167 165.78492935635794 156.98587127158555 157.85714285714286Q149.45054945054946 149.9293563579278 149.45054945054946 136.585557299843Q149.45054945054946 127.32339089481947 153.21821036106752 109.74097331240188L159.49764521193092 81.01255886970172Q159.8116169544741 79.59968602825745 160.59654631083203 75.98901098901098Q161.38147566718996 72.37833594976452 161.85243328100472 69.16012558869701Q162.32339089481948 65.94191522762951 162.32339089481948 62.802197802197796Q162.32339089481948 57.30769230769231 160.20408163265307 54.56043956043956Q158.08477237048666 51.81318681318682 154.160125588697 51.81318681318682Q146.7817896389325 51.81318681318682 138.69701726844585 61.31083202511774Q130.6122448979592 70.80847723704866 123.31240188383046 92.78649921507065Q116.01255886970173 114.76452119309262 111.45996860282575 149.9293563579278Q110.36106750392464 159.34850863422292 107.6138147566719 162.56671899529044Q104.86656200941916 165.78492935635794 98.74411302982732 165.78492935635794Q93.40659340659342 165.78492935635794 90.97331240188385 163.27315541601257Q88.54003139717426 160.76138147566718 88.54003139717426 153.85400313971743Q88.54003139717426 147.41758241758242 90.26687598116169 136.97802197802199Q91.99372056514913 126.53846153846155 94.6624803767661 112.40973312401883Q101.88383045525903 74.41915227629514 101.88383045525903 63.430141287284144Q101.88383045525903 57.464678178963894 99.60753532182105 54.638932496075356Q97.33124018838305 51.81318681318682 92.77864992150707 51.81318681318682Q85.08634222919937 51.81318681318682 76.92307692307693 60.52590266875981Q68.75981161695448 69.23861852433281 60.98901098901099 91.45211930926217Q53.218210361067506 113.66562009419152 48.03767660910518 151.49921507064363Q46.93877551020408 159.5054945054945 44.81946624803768 162.64521193092622Q42.700156985871274 165.78492935635794 36.57770800627944 165.78492935635794Q30.76923076923077 165.78492935635794 28.257456828885402 163.19466248037676Q25.745682888540035 160.6043956043956 25.745682888540035 153.38304552590267ZM199.05808477237048 140.19623233908948Q199.05808477237048 127.63736263736263 204.86656200941914 116.41287284144427Q210.6750392464678 105.18838304552591 220.3296703296703 98.35949764521193Q229.98430141287284 91.53061224489795 240.81632653061223 91.53061224489795Q244.27001569858712 91.53061224489795 245.447409733124 92.86499215070643Q246.62480376766092 94.19937205651492 247.40973312401883 97.65306122448979Q250.70643642072213 97.02511773940346 254.3171114599686 97.02511773940346Q262.0094191522763 97.02511773940346 262.0094191522763 102.51962323390894Q262.0094191522763 105.81632653061224 259.6546310832025 118.2182103610675Q256.04395604395603 136.27158555729983 256.04395604395603 143.3359497645212Q256.04395604395603 145.69073783359497 257.22135007849295 147.10361067503925Q258.3987441130298 148.5164835164835 260.28257456828885 148.5164835164835Q263.265306122449 148.5164835164835 267.5039246467818 144.67032967032966Q271.74254317111456 140.82417582417582 278.9638932496075 132.18995290423862Q280.84772370486655 129.9921507064364 283.20251177394033 129.9921507064364Q285.243328100471 129.9921507064364 286.42072213500785 131.87598116169545Q287.5981161695447 133.75981161695447 287.5981161695447 137.05651491365776Q287.5981161695447 143.3359497645212 284.61538461538464 146.78963893249608Q278.1789638932496 154.79591836734693 270.95761381475666 160.29042386185245Q263.7362637362637 165.78492935635794 256.98587127158555 165.78492935635794Q251.80533751962324 165.78492935635794 247.48822605965464 162.25274725274727Q243.17111459968604 158.72056514913658 240.97331240188382 152.59811616954474Q232.81004709576138 165.78492935635794 220.40816326530611 165.78492935635794Q210.6750392464678 165.78492935635794 204.86656200941914 158.72056514913658Q199.05808477237048 151.65620094191522 199.05808477237048 140.19623233908948ZM237.20565149136576 135.01569858712716 243.01412872841445 106.13029827315542Q236.42072213500785 106.28728414442699 230.84772370486655 111.07535321821035Q225.27472527472526 115.86342229199371 221.97802197802196 123.712715855573Q218.6813186813187 131.56200941915228 218.6813186813187 140.35321821036106Q218.6813186813187 145.2197802197802 220.64364207221348 147.57456828885398Q222.6059654631083 149.9293563579278 226.0596546310832 149.9293563579278Q229.51334379905808 149.9293563579278 232.6530612244898 145.84772370486655Q235.7927786499215 141.76609105180535 237.20565149136576 135.01569858712716ZM363.10832025117736 137.05651491365776Q363.10832025117736 143.3359497645212 360.12558869701724 146.78963893249608Q353.3751962323391 155.1098901098901 345.60439560439556 160.447409733124Q337.8335949764521 165.78492935635794 327.9434850863422 165.78492935635794Q319.6232339089482 165.78492935635794 314.44270015698584 159.81946624803768Q305.49450549450546 165.62794348508635 295.7613814756672 165.78492935635794Q293.7205651491366 196.08320251177395 286.49921507064363 216.41287284144428Q279.2778649921507 236.74254317111462 265.3061224489796 236.74254317111462Q256.82888540031394 236.74254317111462 252.74725274725273 230.62009419152278Q248.6656200941915 224.49764521193094 248.6656200941915 213.66562009419152Q248.6656200941915 198.28100470957614 255.72998430141286 177.79434850863424Q262.7943485086342 157.30769230769232 277.55102040816325 132.66091051805338Q277.55102040816325 109.74097331240188 277.2370486656201 100.7927786499215Q277.08006279434846 96.24018838304552 280.84772370486655 93.57142857142857Q284.6153846153846 90.90266875981162 290.26687598116166 90.90266875981162Q293.56357927786496 90.90266875981162 295.05494505494505 92.2370486656201Q296.5463108320251 93.57142857142857 296.7032967032967 97.49607535321822Q296.7032967032967 101.42072213500785 296.86028257456826 103.30455259026687Q301.883830455259 97.02511773940346 306.75039246467816 94.27786499215071Q311.6169544740973 91.53061224489795 317.1114599686028 91.53061224489795Q325.9026687598116 91.53061224489795 331.4756671899529 98.59497645211931Q337.0486656200942 105.65934065934066 337.0486656200942 117.11930926216641Q337.0486656200942 125.43956043956044 334.37990580847725 133.2888540031397Q331.7111459968603 141.138147566719 327.0015698587127 147.574568288854Q330.298273155416 148.5164835164835 332.4960753532182 148.5164835164835Q337.67660910518055 148.5164835164835 342.3861852433281 144.74882260596547Q347.09576138147565 140.9811616954474 354.47409733124016 132.18995290423862Q356.3579277864992 129.9921507064364 358.712715855573 129.9921507064364Q360.7535321821036 129.9921507064364 361.9309262166405 131.87598116169545Q363.10832025117736 133.75981161695447 363.10832025117736 137.05651491365776ZM317.42543171114596 116.96232339089482Q317.42543171114596 112.25274725274726 315.5416012558869 109.81946624803768Q313.65777080062793 107.3861852433281 310.5180533751962 107.3861852433281Q304.8665620094191 107.3861852433281 296.86028257456826 119.3171114599686Q296.7032967032967 126.22448979591837 296.7032967032967 139.56828885400313Q296.7032967032967 146.78963893249608 296.5463108320251 150.71428571428572Q302.19780219780216 149.45839874411303 306.98587127158555 144.51334379905808Q311.7739403453689 139.56828885400313 314.59968602825745 132.2684458398744Q317.42543171114596 124.96860282574568 317.42543171114596 116.96232339089482ZM277.2370486656201 156.99372056514915Q270.48665620094187 172.69230769230768 266.5620094191522 186.97802197802196Q262.6373626373626 201.26373626373626 262.6373626373626 210.99686028257457Q262.6373626373626 216.0204081632653 263.81475667189954 218.68916797488225Q264.9921507064364 221.3579277864992 266.5620094191523 221.3579277864992Q270.80062794348504 221.3579277864992 273.6263736263736 202.9120879120879Q276.4521193092621 184.46624803767662 277.2370486656201 156.99372056514915ZM414.2857142857143 137.05651491365776Q414.2857142857143 143.3359497645212 411.30298273155415 146.78963893249608Q404.55259026687594 155.1098901098901 396.62480376766086 160.447409733124Q388.69701726844585 165.78492935635794 378.64992150706433 165.78492935635794Q364.8351648351648 165.78492935635794 358.1632653061224 153.2260596546311Q351.49136577708003 140.66718995290424 351.49136577708003 120.72998430141287Q351.49136577708003 101.57770800627944 356.436420722135 77.08791208791209Q361.38147566718993 52.59811616954474 371.03610675039243 35.01569858712716Q380.69073783359494 17.433281004709585 394.03453689167975 17.433281004709585Q401.5698587127158 17.433281004709585 405.8869701726844 24.419152276295137Q410.204081632653 31.40502354788069 410.204081632653 44.4348508634223Q410.204081632653 63.11616954474097 399.8430141287284 87.76295133437989Q389.48194662480375 112.40973312401883 371.74254317111456 136.585557299843Q372.8414442700157 143.02197802197801 375.3532182103611 145.76923076923077Q377.8649921507064 148.5164835164835 381.94662480376763 148.5164835164835Q388.3830455259026 148.5164835164835 393.2496075353218 144.82731554160125Q398.11616954474096 141.138147566719 405.6514913657771 132.18995290423862Q407.53532182103606 129.9921507064364 409.8901098901099 129.9921507064364Q411.9309262166405 129.9921507064364 413.10832025117736 131.87598116169545Q414.2857142857143 133.75981161695447 414.2857142857143 137.05651491365776ZM370.6436420722135 115.39246467817895Q381.7896389324961 97.02511773940346 388.3830455259026 78.57927786499215Q394.9764521193092 60.133437990580845 394.9764521193092 44.905808477237045Q394.9764521193092 32.97488226059656 390.58084772370484 32.97488226059656Q386.97017268445836 32.97488226059656 382.41758241758237 46.004709576138154Q377.8649921507064 59.03453689167975 374.4113029827315 78.34379905808477Q370.95761381475666 97.65306122448979 370.6436420722135 115.39246467817895ZM399.52904238618527 140.19623233908948Q399.52904238618527 127.63736263736263 405.3375196232339 116.41287284144427Q411.1459968602826 105.18838304552591 420.8006279434851 98.35949764521193Q430.4552590266876 91.53061224489795 441.287284144427 91.53061224489795Q444.7409733124019 91.53061224489795 445.9183673469388 92.86499215070643Q447.09576138147565 94.19937205651492 447.8806907378336 97.65306122448979Q451.1773940345369 97.02511773940346 454.7880690737834 97.02511773940346Q462.48037676609107 97.02511773940346 462.48037676609107 102.51962323390894Q462.48037676609107 105.81632653061224 460.1255886970173 118.2182103610675Q456.5149136577708 136.27158555729983 456.5149136577708 143.3359497645212Q456.5149136577708 145.69073783359497 457.69230769230774 147.10361067503925Q458.8697017268446 148.5164835164835 460.75353218210364 148.5164835164835Q463.7362637362637 148.5164835164835 467.97488226059653 144.67032967032966Q472.21350078492935 140.82417582417582 479.4348508634223 132.18995290423862Q481.31868131868134 129.9921507064364 483.6734693877551 129.9921507064364Q485.7142857142857 129.9921507064364 486.89167974882264 131.87598116169545Q488.0690737833595 133.75981161695447 488.0690737833595 137.05651491365776Q488.0690737833595 143.3359497645212 485.0863422291994 146.78963893249608Q478.6499215070644 154.79591836734693 471.42857142857144 160.29042386185245Q464.2072213500785 165.78492935635794 457.45682888540034 165.78492935635794Q452.276295133438 165.78492935635794 447.9591836734694 162.25274725274727Q443.6420722135008 158.72056514913658 441.4442700156986 152.59811616954474Q433.2810047095761 165.78492935635794 420.8791208791209 165.78492935635794Q411.1459968602826 165.78492935635794 405.3375196232339 158.72056514913658Q399.52904238618527 151.65620094191522 399.52904238618527 140.19623233908948ZM437.67660910518055 135.01569858712716 443.4850863422292 106.13029827315542Q436.8916797488226 106.28728414442699 431.31868131868134 111.07535321821035Q425.74568288854005 115.86342229199371 422.44897959183675 123.712715855573Q419.15227629513345 131.56200941915228 419.15227629513345 140.35321821036106Q419.15227629513345 145.2197802197802 421.11459968602827 147.57456828885398Q423.0769230769231 149.9293563579278 426.53061224489795 149.9293563579278Q429.98430141287287 149.9293563579278 433.12401883830455 145.84772370486655Q436.2637362637363 141.76609105180535 437.67660910518055 135.01569858712716ZM482.7315541601256 69.86656200941916Q482.7315541601256 64.37205651491365 487.0486656200942 60.68288854003139Q491.3657770800628 56.99372056514913 497.80219780219784 56.99372056514913Q503.6106750392465 56.99372056514913 507.22135007849295 59.81946624803767Q510.8320251177394 62.64521193092621 510.8320251177394 67.82574568288854Q510.8320251177394 74.10518053375196 506.75039246467816 77.79434850863422Q502.66875981161695 81.48351648351648 495.9183673469388 81.48351648351648Q489.3249607535322 81.48351648351648 486.0282574568289 78.42229199372056Q482.7315541601256 75.36106750392464 482.7315541601256 69.86656200941916ZM475.1962323390895 139.41130298273154Q475.1962323390895 132.3469387755102 477.00156985871274 121.27943485086342Q478.80690737833595 110.21193092621664 481.6326530612245 100.63579277864991Q483.04552590266877 95.61224489795919 485.40031397174255 93.72841444270016Q487.7551020408163 91.84458398744113 492.93563579277867 91.84458398744113Q500.9419152276295 91.84458398744113 500.9419152276295 97.18210361067504Q500.9419152276295 101.10675039246468 497.9591836734694 115.39246467817895Q494.19152276295137 132.66091051805338 494.19152276295137 138.78335949764522Q494.19152276295137 143.49293563579278 495.447409733124 146.00470957613814Q496.7032967032967 148.5164835164835 499.6860282574568 148.5164835164835Q502.5117739403454 148.5164835164835 506.75039246467816 144.59183673469386Q510.989010989011 140.66718995290424 518.0533751962323 132.18995290423862Q519.9372056514914 129.9921507064364 522.2919937205652 129.9921507064364Q524.3328100470958 129.9921507064364 525.5102040816327 131.87598116169545Q526.6875981161695 133.75981161695447 526.6875981161695 137.05651491365776Q526.6875981161695 143.3359497645212 523.7048665620094 146.78963893249608Q508.16326530612247 165.78492935635794 494.6624803767661 165.78492935635794Q484.458398744113 165.78492935635794 479.82731554160125 158.56357927786502Q475.1962323390895 151.34222919937207 475.1962323390895 139.41130298273154ZM514.2857142857143 139.41130298273154Q514.2857142857143 119.00313971742543 520.094191522763 100.63579277864991Q521.5070643642073 96.08320251177393 524.7252747252747 93.96389324960754Q527.9434850863422 91.84458398744113 533.7519623233909 91.84458398744113Q536.8916797488226 91.84458398744113 538.1475667189953 92.62951334379906Q539.403453689168 93.41444270015698 539.403453689168 95.61224489795919Q539.403453689168 98.12401883830455 537.0486656200942 106.91522762951334Q535.4788069073784 113.19466248037676 534.5368916797488 117.90423861852433Q533.5949764521193 122.6138147566719 532.967032967033 129.52119309262167Q538.1475667189953 116.0204081632653 544.5839874411304 107.54317111459969Q551.0204081632653 99.06593406593406 557.221350078493 95.4552590266876Q563.4222919937206 91.84458398744113 568.6028257456829 91.84458398744113Q578.806907378336 91.84458398744113 578.806907378336 102.0486656200942Q578.806907378336 104.0894819466248 577.3940345368917 111.93877551020408Q576.138147566719 118.2182103610675 576.138147566719 119.78806907378336Q576.138147566719 125.28257456828885 580.0627943485086 125.28257456828885Q584.4583987441131 125.28257456828885 591.3657770800628 118.37519623233908Q593.4065934065934 116.33437990580848 595.6043956043957 116.33437990580848Q597.6452119309263 116.33437990580848 598.8226059654631 118.13971742543171Q600.0 119.94505494505495 600.0 122.92778649921507Q600.0 128.73626373626374 596.8602825745684 132.03296703296704Q592.4646781789639 136.585557299843 586.5777080062794 139.80376766091052Q580.690737833595 143.02197802197801 574.0973312401884 143.02197802197801Q565.7770800627944 143.02197802197801 561.4599686028258 138.78335949764522Q557.1428571428572 134.5447409733124 557.1428571428572 127.32339089481947Q557.1428571428572 124.96860282574568 557.6138147566719 122.6138147566719Q557.9277864992151 119.47409733124019 557.9277864992151 118.37519623233908Q557.9277864992151 115.86342229199371 556.2009419152276 115.86342229199371Q553.8461538461539 115.86342229199371 550.0 121.12244897959184Q546.1538461538462 126.38147566718996 542.3861852433281 135.01569858712716Q538.6185243328101 143.64992150706436 536.2637362637363 153.2260596546311Q534.5368916797488 160.6043956043956 532.2605965463108 163.19466248037676Q529.9843014128729 165.78492935635794 525.1177394034537 165.78492935635794Q519.1522762951334 165.78492935635794 516.7189952904239 159.5054945054945Q514.2857142857143 153.2260596546311 514.2857142857143 139.41130298273154Z"/><g transform="translate(742 188) rotate(-32) scale(.03)"><use href="#leaf" fill="url(#a)"/></g><path fill="#3c3c3b" fill-rule="evenodd" d="m419.922 236.713.618-4.337c17.52-9.335 39.344-12.934 57.105-21.945 5.328 2.4 7.697-1.06 13.38-.74 2.062 1.86-2.594 4.35 2.974 3.97 12.65 1.68 24.97-.68 37.41-1.74 13.12-1.12 26.15.13 39.02-.63 4.11-.24 10.44-5.93 15.48-3.1 2.28 4.13-7.44 4.49-4.83 9.05 25.76 6.06 90.19 31.68 101.21 3.81.15 1.7-1.93 5.06 1.11 4.59 21.72-9.72 58.63-30.71 65.13-36.21 7.14-6.04 16.66-5.85 26-8 16.82-3.87 34.77-7.81 49.33-16.29 9 6.25 27.84 9.36 37.91 7.18 10.51-2.28 26.82-19.73 35.55-25.9 3.43-2.42 8.45-7.13 12.14-4.46-2.48 1.7.44 6.68-2.6 5.82-1.59-3.04-4.76.47-7.07-.12-8.79 7.21-17.92 13.96-26.88 20.94-4.18 2.57 4.03 5.23-.87 6.07-23.14 4.6-58.38-6.92-72.968 9.07-23.115 7.91-44.98 9.92-67.76 22.2-13.09 7.06-29.108 19.9-42.734 26.65-2.31 1.15-5.693 1.55-8.423 3.23-3.32 2.04-4.136 4.6-6.937 5.204-6.98 1.503-21.4-2.14-30.48-3.46-30.28-4.4-62.61-16.746-91.184-18.31-11.3-.62-24.64 1.17-37.412 1.744-27.15 1.226-44.13 1.87-65.9 9.19-8.9 2.997-22.59 10.93-28.364 6.58z" clip-rule="evenodd"/><g transform="translate(768 180) rotate(12) scale(.045)"><use href="#leaf" fill="url(#c)"/><use href="#leaf" fill="url(#d)" clip-path="url(#half)"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round" viewBox="0 0 500 820"><defs><linearGradient id="a" x1="0" x2="1" y1="0" y2="0" gradientTransform="rotate(-90 478.727 62.272)scale(37.566)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#C2331B"/><stop offset="1" stop-color="#E2603F"/></linearGradient><linearGradient id="b" x1="0" x2="1" y1="0" y2="0" gradientTransform="rotate(-90 468.484 54.002)scale(19.053)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#8F2D20"/><stop offset="1" stop-color="#B23A27"/></linearGradient></defs><path fill="url(#a)" stroke="url(#b)" stroke-width="1.1" stroke-linejoin="miter" stroke-miterlimit="10" d="M416.500 542.096L420.919 533.569L422.024 531.437L424.460 529.996L424.233 527.174L426.670 525.732L426.382 522.881L428.720 521.213L428.075 518.393L429.979 516.125L428.342 513.639L429.080 510.777L426.581 509.207L426.168 506.292L423.266 505.773L421.781 503.221L418.898 503.859L416.511 502.112L414.131 503.870L411.248 503.241L409.766 505.793L406.865 506.302L406.439 509.216L403.933 510.775L404.661 513.641L403.023 516.136L404.935 518.393L404.271 521.204L406.590 522.896L406.299 525.752L408.738 527.189L408.516 530.011L410.956 531.448L412.065 533.578Z" transform="translate(-7889.1 -9807.44)scale(19.5417)"/><path fill="#FFF" d="m-90 2030 45-863a95 95 0 0 0-111-98l-859 151 116-320a65 65 0 0 0-20-73l-941-762 212-99a65 65 0 0 0 34-79l-186-572 542 115a65 65 0 0 0 73-38l105-247 423 454a65 65 0 0 0 111-57l-204-1052 327 189a65 65 0 0 0 91-27l332-652 332 652a65 65 0 0 0 91 27l327-189-204 1052a65 65 0 0 0 111 57l423-454 105 247a65 65 0 0 0 73 38l542-115-186 572a65 65 0 0 0 34 79l212 99-941 762a65 65 0 0 0-20 73l116 320-859-151a95 95 0 0 0-111 98l45 863z" transform="translate(250 258)scale(.068)"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 817.2 820"><radialGradient id="a" cx="526.6" cy="486.836" r="478.154" fx="275.876" fy="893.983" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#5c5c5c;stop-opacity:.9477"/><stop offset=".112" style="stop-color:#474747;stop-opacity:.7805"/><stop offset=".34" style="stop-color:#202020;stop-opacity:.4413"/><stop offset=".523" style="stop-color:#090909;stop-opacity:.1692"/><stop offset=".637" style="stop-color:#000;stop-opacity:0"/></radialGradient><path d="M254.7 820.0L430.1 664.9L473.9 626.1L541.3 599.9L561.5 548.6L629.0 522.4L648.1 470.5L715.4 440.2L726.3 388.9L789.2 347.6L774.9 302.4L817.1 250.3L775.4 221.8L792.3 168.8L732.1 159.3L721.8 112.9L651.7 124.5L614.0 92.7L545.0 124.7L486.2 113.3L430.2 159.7L360.8 169.0L325.1 222.0L255.1 250.3L245.6 302.4L186.6 347.8L209.1 388.9L169.0 440.0L205.6 470.8L173.5 522.7L215.1 548.9L184.8 600.2L226.4 626.3L232.1 665.1Z" style="fill-rule:evenodd;clip-rule:evenodd;fill:url(#a);fill-opacity:.7;filter:blur(15px)"/></svg>
@@ -0,0 +1,171 @@
1
+ import {Layer} from './Layer.js';
2
+ import * as DomUtil from '../dom/DomUtil.js';
3
+ import * as Util from '../core/Util.js';
4
+ import * as DomEvent from '../dom/DomEvent.js';
5
+ import {Bounds} from '../geometry/Bounds.js';
6
+
7
+ /*
8
+ * @class BlanketOverlay
9
+ * @inherits Layer
10
+ *
11
+ * Represents an HTML element that covers ("blankets") the entire surface
12
+ * of the map.
13
+ *
14
+ * Do not use this class directly. It's meant for `Renderer`, and for plugins
15
+ * that rely on one single HTML element
16
+ */
17
+
18
+ export class BlanketOverlay extends Layer {
19
+
20
+ static {
21
+ // @section
22
+ // @aka BlanketOverlay options
23
+ this.setDefaultOptions({
24
+ // @option padding: Number = 0.1
25
+ // How much to extend the clip area around the map view (relative to its size)
26
+ // e.g. 0.1 would be 10% of map view in each direction
27
+ padding: 0.1,
28
+
29
+ // @option continuous: Boolean = false
30
+ // When `false`, the blanket will update its position only when the
31
+ // map state settles (*after* a pan/zoom animation). When `true`,
32
+ // it will update when the map state changes (*during* pan/zoom
33
+ // animations)
34
+ continuous: false,
35
+ });
36
+ }
37
+
38
+ constructor(options) {
39
+ super();
40
+ Util.setOptions(this, options);
41
+
42
+ this.callInitHooks(BlanketOverlay);
43
+ }
44
+
45
+ onAdd() {
46
+ if (!this._container) {
47
+ this._initContainer(); // defined by renderer implementations
48
+
49
+ // always keep transform-origin as 0 0, #8794
50
+ this._container.classList.add('maplair-zoom-animated');
51
+ }
52
+
53
+ this.getPane().appendChild(this._container);
54
+ this._resizeContainer();
55
+ this._onMoveEnd();
56
+ }
57
+
58
+ onRemove() {
59
+ this._destroyContainer();
60
+ }
61
+
62
+ getEvents() {
63
+ const events = {
64
+ viewreset: this._reset,
65
+ zoom: this._onZoom,
66
+ moveend: this._onMoveEnd,
67
+ resize: this._resizeContainer,
68
+ zoomend: this._onZoomEnd
69
+ };
70
+ if (this._zoomAnimated) {
71
+ events.zoomanim = this._onAnimZoom;
72
+ }
73
+ if (this.options.continuous) {
74
+ events.move = this._onMoveEnd;
75
+ }
76
+ return events;
77
+ }
78
+
79
+ _onAnimZoom(ev) {
80
+ this._updateTransform(ev.center, ev.zoom);
81
+ }
82
+
83
+ _onZoom() {
84
+ this._updateTransform(this._map.getCenter(), this._map.getZoom());
85
+ }
86
+
87
+ _updateTransform(center, zoom) {
88
+ const scale = this._map.getZoomScale(zoom, this._zoom),
89
+ viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding),
90
+ currentCenterPoint = this._map.project(this._center, zoom),
91
+ topLeftOffset = viewHalf.multiplyBy(-scale)._add(currentCenterPoint)
92
+ ._subtract(this._map._getNewPixelOrigin(center, zoom))
93
+ ._round();
94
+
95
+ DomUtil.setTransform(this._container, topLeftOffset, scale);
96
+ }
97
+
98
+ _onMoveEnd(ev) {
99
+ // Update pixel bounds of renderer container (for positioning/sizing/clipping later)
100
+ const p = this.options.padding,
101
+ size = this._map.getSize(),
102
+ min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();
103
+
104
+ this._bounds = new Bounds(min, min.add(size.multiplyBy(1 + p * 2)).round());
105
+
106
+ this._center = this._map.getCenter();
107
+ this._zoom = this._map.getZoom();
108
+ this._updateTransform(this._center, this._zoom);
109
+
110
+ this._onSettled(ev);
111
+ }
112
+
113
+ _reset() {
114
+ this._onSettled();
115
+ this._updateTransform(this._center, this._zoom);
116
+ this._onViewReset();
117
+ }
118
+
119
+ /*
120
+ * @section Subclass interface
121
+ * @uninheritable
122
+ * Subclasses must define the following methods:
123
+ *
124
+ * @method _initContainer(): undefined
125
+ * Must initialize the HTML element to use as blanket, and store it as
126
+ * `this._container`. The base implementation creates a blank `<div>`
127
+ *
128
+ * @method _destroyContainer(): undefined
129
+ * Must destroy the HTML element in `this._container` and free any other
130
+ * resources. The base implementation destroys the element and removes
131
+ * any event handlers attached to it.
132
+ *
133
+ * @method _resizeContainer(): Point
134
+ * The base implementation resizes the container (based on the map's size
135
+ * and taking into account the padding), returning the new size in CSS pixels.
136
+ *
137
+ * Subclass implementations shall reset container parameters and data
138
+ * structures as needed.
139
+ *
140
+ * @method _onZoomEnd(ev?: PointerEvent): undefined
141
+ * (Optional) Runs on the map's `zoomend` event.
142
+ *
143
+ * @method _onViewReset(ev?: PointerEvent): undefined
144
+ * (Optional) Runs on the map's `viewreset` event.
145
+ *
146
+ * @method _onSettled(): undefined
147
+ * Runs whenever the map state settles after changing (at the end of pan/zoom
148
+ * animations, etc). This should trigger the bulk of any rendering logic.
149
+ *
150
+ * If the `continuous` option is set to `true`, then this also runs on
151
+ * any map state change (including *during* pan/zoom animations).
152
+ */
153
+ _initContainer() {
154
+ this._container = DomUtil.create('div');
155
+ }
156
+ _destroyContainer() {
157
+ DomEvent.off(this._container);
158
+ this._container.remove();
159
+ delete this._container;
160
+ }
161
+ _resizeContainer() {
162
+ const p = this.options.padding,
163
+ size = this._map.getSize().multiplyBy(1 + p * 2).round();
164
+ this._container.style.width = `${size.x}px`;
165
+ this._container.style.height = `${size.y}px`;
166
+ return size;
167
+ }
168
+ _onZoomEnd() {}
169
+ _onViewReset() {}
170
+ _onSettled() {}
171
+ }
@@ -0,0 +1,353 @@
1
+ import {Layer} from './Layer.js';
2
+ import {FeatureGroup} from './FeatureGroup.js';
3
+ import * as Util from '../core/Util.js';
4
+ import {LatLng} from '../geo/LatLng.js';
5
+ import {Point} from '../geometry/Point.js';
6
+ import * as DomUtil from '../dom/DomUtil.js';
7
+
8
+ /*
9
+ * @class DivOverlay
10
+ * @inherits Interactive layer
11
+ * Base model for Popup and Tooltip. Inherit from it for custom overlays like plugins.
12
+ */
13
+
14
+ // @namespace DivOverlay
15
+ export class DivOverlay extends Layer {
16
+
17
+ static {
18
+ // @section
19
+ // @aka DivOverlay options
20
+ this.setDefaultOptions({
21
+ // @option interactive: Boolean = false
22
+ // If true, the popup/tooltip will listen to the pointer events.
23
+ interactive: false,
24
+
25
+ // @option offset: Point = Point(0, 0)
26
+ // The offset of the overlay position.
27
+ offset: [0, 0],
28
+
29
+ // @option className: String = ''
30
+ // A custom CSS class name to assign to the overlay.
31
+ className: '',
32
+
33
+ // @option pane: String = undefined
34
+ // `Map pane` where the overlay will be added.
35
+ pane: undefined,
36
+
37
+ // @option content: String|HTMLElement|Function = ''
38
+ // Sets the HTML content of the overlay while initializing. If a function is passed the source layer will be
39
+ // passed to the function. The function should return a `String` or `HTMLElement` to be used in the overlay.
40
+ // String content is rendered as HTML; sanitize untrusted input or pass an `HTMLElement` with safe `textContent` instead.
41
+ content: ''
42
+ });
43
+ }
44
+
45
+ constructor(options, source) {
46
+ super();
47
+ if (options instanceof LatLng || Array.isArray(options)) {
48
+ this._latlng = new LatLng(options);
49
+ Util.setOptions(this, source);
50
+ } else {
51
+ Util.setOptions(this, options);
52
+ this._source = source;
53
+ }
54
+ if (this.options.content) {
55
+ this._content = this.options.content;
56
+ }
57
+
58
+ this.callInitHooks(DivOverlay);
59
+ }
60
+
61
+ // @method openOn(map: MaplairMap): this
62
+ // Adds the overlay to the map.
63
+ // Alternative to `map.openPopup(popup)`/`.openTooltip(tooltip)`.
64
+ openOn(map) {
65
+ map = arguments.length ? map : this._source._map; // experimental, not the part of public api
66
+ if (!map.hasLayer(this)) {
67
+ map.addLayer(this);
68
+ }
69
+ return this;
70
+ }
71
+
72
+ // @method close(): this
73
+ // Closes the overlay.
74
+ // Alternative to `map.closePopup(popup)`/`.closeTooltip(tooltip)`
75
+ // and `layer.closePopup()`/`.closeTooltip()`.
76
+ close() {
77
+ this._map?.removeLayer(this);
78
+ return this;
79
+ }
80
+
81
+ // @method toggle(layer?: Layer): this
82
+ // Opens or closes the overlay bound to layer depending on its current state.
83
+ // Argument may be omitted only for overlay bound to layer.
84
+ // Alternative to `layer.togglePopup()`/`.toggleTooltip()`.
85
+ toggle(layer) {
86
+ if (this._map) {
87
+ this.close();
88
+ } else {
89
+ if (arguments.length) {
90
+ this._source = layer;
91
+ } else {
92
+ layer = this._source;
93
+ }
94
+ this._prepareOpen();
95
+
96
+ // open the overlay on the map
97
+ this.openOn(layer._map);
98
+ }
99
+ return this;
100
+ }
101
+
102
+ onAdd(map) {
103
+ this._zoomAnimated = map._zoomAnimated;
104
+
105
+ if (!this._container) {
106
+ this._initLayout();
107
+ }
108
+
109
+ if (map._fadeAnimated) {
110
+ this._container.style.opacity = 0;
111
+ }
112
+
113
+ clearTimeout(this._removeTimeout);
114
+ this.getPane().appendChild(this._container);
115
+ this.update();
116
+
117
+ if (map._fadeAnimated) {
118
+ this._container.style.opacity = 1;
119
+ }
120
+
121
+ this.bringToFront();
122
+
123
+ if (this.options.interactive) {
124
+ this._container.classList.add('maplair-interactive');
125
+ this.addInteractiveTarget(this._container);
126
+ }
127
+ }
128
+
129
+ onRemove(map) {
130
+ if (map._fadeAnimated) {
131
+ this._container.style.opacity = 0;
132
+ this._removeTimeout = setTimeout(() => this._container.remove(), 200);
133
+ } else {
134
+ this._container.remove();
135
+ }
136
+
137
+ if (this.options.interactive) {
138
+ this._container.classList.remove('maplair-interactive');
139
+ this.removeInteractiveTarget(this._container);
140
+ }
141
+ }
142
+
143
+ // @namespace DivOverlay
144
+ // @method getLatLng: LatLng
145
+ // Returns the geographical point of the overlay.
146
+ getLatLng() {
147
+ return this._latlng;
148
+ }
149
+
150
+ // @method setLatLng(latlng: LatLng): this
151
+ // Sets the geographical point where the overlay will open.
152
+ setLatLng(latlng) {
153
+ this._latlng = new LatLng(latlng);
154
+ if (this._map) {
155
+ this._updatePosition();
156
+ this._adjustPan();
157
+ }
158
+ return this;
159
+ }
160
+
161
+ // @method getContent: String|HTMLElement|Function)
162
+ // Returns the content of the overlay.
163
+ getContent() {
164
+ return this._content;
165
+ }
166
+
167
+ // @method setContent(htmlContent: String|HTMLElement|Function): this
168
+ // Sets the HTML content of the overlay. A `String` argument is rendered as
169
+ // HTML; if it may contain untrusted input, sanitize it (e.g. with DOMPurify)
170
+ // or pass an `HTMLElement` with safe `textContent` instead. If a function is
171
+ // passed the source layer will be passed to the function. The function should
172
+ // return a `String` or `HTMLElement` to be used in the overlay.
173
+ setContent(content) {
174
+ this._content = content;
175
+ this.update();
176
+ return this;
177
+ }
178
+
179
+ // @method getElement: HTMLElement
180
+ // Returns the HTML container of the overlay.
181
+ getElement() {
182
+ return this._container;
183
+ }
184
+
185
+ // @method update: null
186
+ // Updates the overlay content, layout and position. Useful for updating the overlay after something inside changed, e.g. image loaded.
187
+ update() {
188
+ if (!this._map) { return; }
189
+
190
+ this._container.style.visibility = 'hidden';
191
+
192
+ this._updateContent();
193
+ this._updateLayout();
194
+ this._updatePosition();
195
+
196
+ this._container.style.visibility = '';
197
+
198
+ this._adjustPan();
199
+ }
200
+
201
+ getEvents() {
202
+ const events = {
203
+ zoom: this._updatePosition,
204
+ viewreset: this._updatePosition
205
+ };
206
+
207
+ if (this._zoomAnimated) {
208
+ events.zoomanim = this._animateZoom;
209
+ }
210
+ return events;
211
+ }
212
+
213
+ // @method isOpen: Boolean
214
+ // Returns `true` when the overlay is visible on the map.
215
+ isOpen() {
216
+ return !!this._map && this._map.hasLayer(this);
217
+ }
218
+
219
+ // @method bringToFront: this
220
+ // Brings this overlay in front of other overlays (in the same map pane).
221
+ bringToFront() {
222
+ if (this._map) {
223
+ DomUtil.toFront(this._container);
224
+ }
225
+ return this;
226
+ }
227
+
228
+ // @method bringToBack: this
229
+ // Brings this overlay to the back of other overlays (in the same map pane).
230
+ bringToBack() {
231
+ if (this._map) {
232
+ DomUtil.toBack(this._container);
233
+ }
234
+ return this;
235
+ }
236
+
237
+ // prepare bound overlay to open: update latlng pos / content source (for FeatureGroup)
238
+ _prepareOpen(latlng) {
239
+ let source = this._source;
240
+ if (!source._map) { return false; }
241
+
242
+ if (source instanceof FeatureGroup) {
243
+ source = null;
244
+ for (const layer of Object.values(this._source._layers)) {
245
+ if (layer._map) {
246
+ source = layer;
247
+ break;
248
+ }
249
+ }
250
+ if (!source) { return false; } // Unable to get source layer.
251
+
252
+ // set overlay source to this layer
253
+ this._source = source;
254
+ }
255
+
256
+ if (!latlng) {
257
+ if (source.getCenter) {
258
+ latlng = source.getCenter();
259
+ } else if (source.getLatLng) {
260
+ latlng = source.getLatLng();
261
+ } else if (source.getBounds) {
262
+ latlng = source.getBounds().getCenter();
263
+ } else {
264
+ throw new Error('Unable to get source layer LatLng.');
265
+ }
266
+ }
267
+ this.setLatLng(latlng);
268
+
269
+ if (this._map) {
270
+ // update the overlay (content, layout, etc...)
271
+ this.update();
272
+ }
273
+
274
+ return true;
275
+ }
276
+
277
+ _updateContent() {
278
+ if (!this._content) { return; }
279
+
280
+ const node = this._contentNode;
281
+ const content = (typeof this._content === 'function') ? this._content(this._source ?? this) : this._content;
282
+
283
+ if (typeof content === 'string') {
284
+ node.innerHTML = content;
285
+ } else {
286
+ while (node.hasChildNodes()) {
287
+ node.removeChild(node.firstChild);
288
+ }
289
+ node.appendChild(content);
290
+ }
291
+
292
+ // @namespace DivOverlay
293
+ // @section DivOverlay events
294
+ // @event contentupdate: Event
295
+ // Fired when the content of the overlay is updated
296
+ this.fire('contentupdate');
297
+ }
298
+
299
+ _updatePosition() {
300
+ if (!this._map) { return; }
301
+
302
+ const pos = this._map.latLngToLayerPoint(this._latlng),
303
+ anchor = this._getAnchor();
304
+ let offset = new Point(this.options.offset);
305
+
306
+ if (this._zoomAnimated) {
307
+ DomUtil.setPosition(this._container, pos.add(anchor));
308
+ } else {
309
+ offset = offset.add(pos).add(anchor);
310
+ }
311
+
312
+ const bottom = this._containerBottom = -offset.y,
313
+ left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;
314
+
315
+ // bottom position the overlay in case the height of the overlay changes (images loading etc)
316
+ this._container.style.bottom = `${bottom}px`;
317
+ this._container.style.left = `${left}px`;
318
+ }
319
+
320
+ _getAnchor() {
321
+ return [0, 0];
322
+ }
323
+
324
+ // Registers this default feature on the map class, called by `MaplairMap` itself.
325
+ static register(MaplairMap) {
326
+ MaplairMap.include({
327
+ _initOverlay(OverlayClass, content, latlng, options) {
328
+ let overlay = content;
329
+ if (!(overlay instanceof OverlayClass)) {
330
+ overlay = new OverlayClass(options).setContent(content);
331
+ }
332
+ if (latlng) {
333
+ overlay.setLatLng(latlng);
334
+ }
335
+ return overlay;
336
+ }
337
+ });
338
+
339
+ Layer.include({
340
+ _initOverlay(OverlayClass, old, content, options) {
341
+ let overlay = content;
342
+ if (overlay instanceof OverlayClass) {
343
+ Util.setOptions(overlay, options);
344
+ overlay._source = this;
345
+ } else {
346
+ overlay = (old && !options) ? old : new OverlayClass(options, this);
347
+ overlay.setContent(content);
348
+ }
349
+ return overlay;
350
+ }
351
+ });
352
+ }
353
+ }